A
CTIVE
A
NALOG
F
ILTER
L
ABORATORY
The objective of this lab is to analyze, construct, and test two analog filters. The required hardware includes:
• Breadboard
• Low–Pass Filter: LM741 Op–Amp (1), 33 k Ω Resistor (2), and 0.01 μ F Capacitor (1)
• High–Pass Filter: LM741 Op–Amp (1), 27 k Ω Resistor (2), and 0.01 μ F Capacitor (1)
• Band–Pass Filter: LM741 Op–Amp (3), 10 k Ω Resistor (2), 27 k Ω Resistor (2), 33 k Ω
Resistor (2), and 0.01 μ F Capacitor (2)
• Notch Filter: LM741 Op–Amp (3), 22 k Ω Resistor (2), 27 k Ω Resistor (3), 56 k Ω
Resistor (2), and 0.01 μ F Capacitor (2)
• Dual power supply with common ground
• xPC TargetBox
• NI PCI 6040E multifunction card with connector blocks
The required software includes:
• Matlab, Simulink, Real–Time Workshop, and xPC Target
• acanalysis.mdl
Active Analog Filters Laboratory
Choose the low–pass OR the high–pass filter and complete the following tasks:
1.
Build the low–pass OR the high–pass filter (Figures 1 and 2, respectively). Refer to the op–amp pin diagram in Figure 5.
2.
Determine the transfer function
V o
V i
and the circuit cutoff frequency.
3.
Connect the circuit to the multifunction board in the xPC TargetBox (Table 1).
4.
Open the program acanalysis.mdl.
5.
Double click on the sinusoidal source block and change the amplitude to 5. Note: The program does not need to be recompiled when changing the sinusoidal source amplitude, frequency, or off set. Set the frequency of the sinusoidal source to the calculated cutoff frequency (in rad/s).
6.
Click the “Incremental Build” button to compile the program. Click the “Connect to
Target” button to connect to the xPC TargetBox. Click the “Start Real Time Code” button to start the program.
7.
The program will generate the specified sinusoidal signal on the circuit input terminals.
Then, a text file containing the experimental data will be created: the first column is time
(s), the second column is input voltage (V), and the third column is output voltage (V).
8.
Using the same input waveform as in step 5, simulate the output voltage of the system in
Simulink. Plot the input, measured output, and simulated output voltages as functions of time on the same graph. Measure the ratio of the output voltage magnitude to the input voltage magnitude in the steady–state and measure the phase shift between the output and input voltages in the steady–state.
9.
Repeat steps 5–8 with an input frequency of 100 Hz.
10.
Repeat steps 5–8 with an input frequency of 800 Hz.
2
Active Analog Filters Laboratory
11.
Plot the bode magnitude and phase plots for the transfer function determined in step 2.
On the same graphs, plot the experimental magnitude ratios and phase shifts from step 8.
Compute the percent error between the theoretical and experimental magnitude ratios and phase shifts.
Choose the band–pass OR the notch filter and complete the following tasks:
12.
Build the band–pass OR the notch filter (Figures 3 and 4, respectively). Refer to the op– amp pin diagram in Figure 5.
13.
Determine the transfer function
V o
V i
and the circuit center frequency.
14.
Connect the circuit to the multifunction board in the xPC TargetBox (Table 1).
15.
Open the file acanalysis.mdl.
16.
Double click on the sinusoidal source block and change the amplitude to 5 and the input frequency to the calculated lower cutoff frequency.
17.
Click the “Incremental Build” button to compile the program. Click the “Connect to
Target” button to connect to the xPC TargetBox. Click the “Start Real Time Code” button to start the program.
18.
The program will generate the specified sinusoidal signal on the circuit input terminals.
Then, a text file containing the experimental data will be created: the first column is time
(s), the second column is input voltage (V), and the third column is output voltage (V).
19.
Using the same input waveform as in step 5, simulate the output voltage of the system in
Simulink. Plot the input, measured output, and simulated output voltages as functions of time on the same graph. Determine the ratios of the output voltage magnitude to the input
3
Active Analog Filters Laboratory voltage magnitude in the steady–state and determine the phase shift between the output and input voltages in the steady–state.
20.
Repeat steps 16–19 with an input frequency equal to the upper cutoff frequency.
21.
Repeat steps 16–19 with an input frequency of 100 Hz.
22.
Repeat steps 16–19 with an input frequency of 800 Hz.
23.
Plot the bode magnitude and phase plots for the transfer function determined in step 13.
On the same graphs, plot the experimental magnitude ratios and phase shifts from step
19. Compute the percent error between the theoretical and experimental magnitude ratios and phase shifts.
The project report must include the following:
1.
Cover page with the following information: laboratory number and title, student names,
ID numbers, and email addresses, course title, instructor’s name, and date.
2.
Derivation of circuit transfer functions (see Tasks 2 and 13).
3.
Six time history plots (see Tasks 8 and 19).
4.
Two Bode Plots (see Tasks 11 and 22).
5.
Calculation of the percent errors (see Tasks 11 and 22).
6.
Description of why the measured and theoretical output voltages may have been different.
Report Format
The report must be created in MS Word, include page numbers, and be written clearly and concisely. Documents must be printed on a laser printer, equations must be created in the MS
4
Active Analog Filters Laboratory
Word equation editor and numbered, plots must be numbered and contain a descriptive caption and units, axes must be labeled and contain units, and diagrams must be drawn with a software package.
Table 1: Voltage Amplifier Circuit Connections to PCI 6040E Multifunction Card. Note: the input to the multifunction card is a differential input across two analog input channels.
Pin Number
68
34
Description channel 0 analog input channel 8 analog input
55 analog output ground
Figure 1: Active Low–Pass Filter Circuit. Note: the 14 V and the –14 V power supply leads must also be connected to the operational amplifier.
5
Active Analog Filters Laboratory
Figure 2: Active High–Pass Filter Circuit. Note: the 14 V and the –14 V power supply leads must also be connected to the operational amplifier.
R
2
= 27 k
Pin 21
V i
R
1
= 27 k
C
1
= 0.01 F
-
+
R
3
= 33 k C
2
= 0.01 F
R
4
= 33 k
-
+
R
5
= 10 k
R
6
= 10 k
-
+
Pin 68
V o
Pin 55 Pin 34
Figure 3: Active Band–Pass Filter Circuit. Note: the 14 V and the –14 V power supply leads must also be connected to the operational amplifiers.
6
Active Analog Filters Laboratory
R
2
= 56 k
R
1
= 56 k
C
1
= 0.01 F
-
+
R
5
= 27 k
R
6
= 27 k
-
+
Pin 68
Pin 21
V i
R
3
= 22 k C
2
= 0.01 F
R
4
= 22 k
-
+
R
7
= 27 k
V o
Pin 34
Pin 55
Figure 4: Active Notch Filter Circuit. Note: the 14 V and the –14 V power supply leads must also be connected to the operational amplifiers, and the ground of the operational amplifier is the same as the ground for the other operational amplifiers.
OFFSET NULL
INVERTING INPUT
NON-INVERTING INPUT
V
-
1
2
3
4
8
7
6
5
NC
V
+
OUTPUT
OFFSET NULL
Figure 5: Pin Diagram for LM741 Operational Amplifier.
7