0% found this document useful (0 votes)
20 views6 pages

LabVIEW Filter Design Guide

Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as DOCX, PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
20 views6 pages

LabVIEW Filter Design Guide

Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as DOCX, PDF, TXT or read online on Scribd
You are on page 1/ 6

2022F-BBM-014

LAB # 03
OBJECT:
Follow instructions to design virtual filters (low pass, high pass, band pass, bandstop) using
NI LabVIEW.

THEORY:
In digital signal processing and electronics, filters are essential tools used to process signals
by selectively allowing or attenuating certain frequency components. This lab involves
designing and analyzing virtual implementations of low-pass, high-pass, bandpass, and
bandstop filters in NI LabVIEW, providing hands-on experience with these filters’ behavior
and characteristics.
Overview of Filters
1. Low-pass filter (LPF): Allows frequencies below a specified cutoff frequency to pass
while attenuating higher frequencies.
2. High-pass filter (HPF): Allows frequencies above a cutoff frequency to pass while
attenuating lower frequencies.
3. Bandpass filter (BPF): Allows a specific range of frequencies to pass while attenuating
frequencies outside this range.
4. Bandstop filter (BSF): Attenuates frequencies within a specified range while allowing
others outside this range to pass.
Filters are integral in various applications, from audio processing, where noise must be
filtered out, to biomedical signal processing, where certain frequency bands must be isolated.
For example, low-pass filters are used to remove high-frequency noise, while bandpass filters
are used in radio communication to isolate specific frequency channels.
Key Parameters in Filter Design
a. Cutoff Frequency
The cutoff frequency is a critical point in filter design, representing the boundary between the
passband (frequencies allowed to pass) and the stopband (frequencies attenuated by the
filter). In analog filters, this is usually defined at the point where the output signal's power
drops to half (corresponding to a -3dB reduction). For digital filters, cutoff frequencies are
normalized according to the sampling rate.
b. Filter Order
The order of the filter refers to the number of reactive components (like capacitors or
inductors) in an analog filter or the complexity of the algorithm in a digital filter. Higher-
order filters result in sharper transitions between the passband and stopband, providing a
steeper attenuation slope but potentially increasing phase distortion and computational
complexity.
2022F-BBM-014

c. Passband and Stopband


Passband: The range of frequencies that the filter allows to pass with minimal attenuation.
Stopband: The range of frequencies significantly attenuated by the filter. The level of
attenuation is determined by the filter’s design and order.
d. Quality Factor (Q Factor)
The Q factor is particularly relevant for bandpass and bandstop filters. It indicates the
selectivity or sharpness of the filter's frequency range. A high Q factor means a narrow
bandwidth, meaning that the filter targets a very specific range of frequencies, while a lower
Q factor indicates a wider bandwidth.
Filter Design and Implementation in NI LabVIEW
In this lab, a merger tool is used to combine three signals, each with a distinct frequency, into
a single composite signal. This merged signal is then passed through each filter—low-pass,
high-pass, bandpass, and bandstop—allowing a detailed examination of how the filter
handles different frequency components simultaneously.
The merger of signals provides a practical way to understand how each filter selectively
attenuates or passes frequencies. For instance, a low-pass filter will pass only the lowest-
frequency signal from the merged input, attenuating the higher frequencies; a high-pass filter
will do the opposite, allowing only the highest frequency component to pass. A bandpass
filter will isolate a specified middle frequency range, attenuating both lower and higher
frequencies, while a bandstop filter will remove a specific range, allowing frequencies
outside that range to pass.

STEPS OF CONSTRUCTION:
Constructing the Initial Setup

1. Simulate Signals
- Place three Simulate Signal VIs from the Functions Palette > Express > Signal Analysis
section onto your Block Diagram. These will act as your input signals.
- Configure each Simulate Signal to produce a sine wave by double-clicking on each one
and setting:
- Signal Type: Sine
- Frequency: Assign different frequencies for each (for example, 1 Hz, 10 Hz, and 50 Hz)
to see the effects of filtering on various frequencies.

2. Merge Signals
- Insert a Merge Signals VI (found in Express > Signal Manipulation) to combine the
outputs of the three Simulate Signal VIs into a single multi-signal line.
- Connect each Simulate Signal output to an input of the Merge Signals VI.
2022F-BBM-014

3. Filter
- Place a Filter VI from Express > Signal Analysis after the **Merge Signals** block.
- Connect the merged signal output to the **Signal** input of the **Filter** VI.
- This **Filter** VI will allow you to configure the type of filter (low-pass, high-pass,
band-pass, or band-stop) and adjust the frequency parameters.

4. Waveform Graph
- Add a Waveform Graph from Express > Graph Indicators to display the filtered output.
- Connect the Filtered Signal output of the Filter VI to the Waveform Graph input to
visualize the effects of the filter.

Configuring Filter Types

1. Low-Pass Filter
- Double-click the Filter VI to open its configuration panel.
- Set the following parameters:
- Filter Type: Lowpass
- Cutoff Frequency: Choose a cutoff frequency (e.g., 20 Hz) to allow signals below this
frequency to pass through while attenuating higher frequencies.
- Click OK to apply the settings.

2. High-Pass Filter
- Double-click the Filter VI to reconfigure it.
- Set the following parameters:
- Filter Type: Highpass
- Cutoff Frequency: Set a cutoff frequency (e.g., 5 Hz) to allow signals above this
frequency to pass through while attenuating lower frequencies.
- Click OK to apply the settings.

3. Band-Pass Filter
- Double-click the Filter VI to reconfigure it.
- Set the following parameters:
-Filter Type: Bandpass
-Lower Cutoff Frequency: Set a lower cutoff frequency (e.g., 5 Hz).
-Upper Cutoff Frequency: Set an upper cutoff frequency (e.g., 30 Hz).
- Click OK to apply the settings. This filter will allow signals within this range to pass
while attenuating signals outside of it.

4. Band-Stop Filter
- Double-click the Filter VI to reconfigure it.
- Set the following parameters:
- Filter Type: Bandstop
- Lower Cutoff Frequency: Set a lower cutoff frequency (e.g., 10 Hz).
- Upper Cutoff Frequency: Set an upper cutoff frequency (e.g., 20 Hz).
- Click OK to apply the settings. This filter will attenuate signals within this range while
allowing others to pass.
2022F-BBM-014

Running and Observing:

1. Run the VI to see the filtered signal on the Waveform Graph.


2. You should see the effects of the filter type selected on the waveform output based on the
cutoff frequencies and the filter type (low-pass, high-pass, band-pass, or band-stop).

BLOCK DIAGRAM:

RESULTS / OUTPUT:

Low Pass:

White: Below the cutoff frequency (highest amplitude).


Red: Near the cutoff frequency (moderate amplitude).
Green: Above the cutoff frequency (smallest amplitude)
2022F-BBM-014

High Pass:

Green: Above the cutoff frequency (largest amplitude).


Red: Near the cutoff frequency (moderate amplitude).
White: Below the cutoff frequency (smallest amplitude)

Band pass:

Red: Within the passband (highest amplitude).


White: Below the passband (smallest or near-zero amplitude).
Green: Above the passband (moderately attenuated amplitude)

Band stop
2022F-BBM-014

Green: Outside the stopband


Red: Inside the stopband
White: Outside stopband

Conclusion:
In this lab, we successfully designed and tested various filters (low-pass, high-pass, and
bandpass) using NI LabVIEW. By simulating sine wave signals of different frequencies and
passing them through each filter type, we were able to observe and analyze the frequency-
selective behaviors inherent to each filter.

You might also like