0% found this document useful (0 votes)
138 views3 pages

ECE100 Lab 2

This document describes the design, simulation, and testing of a low-pass filter to separate digital signals from voice signals on telephone lines. The specifications require a second-order filter with a passband up to 4 kHz and stopband above 32 kHz. Theoretical calculations and MATLAB simulations are used to design a filter that meets the specifications while minimizing costs. The filter circuit is then built, measured, and its transfer function is found to match the simulation, demonstrating the successful completion of the lab assignment.

Uploaded by

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

ECE100 Lab 2

This document describes the design, simulation, and testing of a low-pass filter to separate digital signals from voice signals on telephone lines. The specifications require a second-order filter with a passband up to 4 kHz and stopband above 32 kHz. Theoretical calculations and MATLAB simulations are used to design a filter that meets the specifications while minimizing costs. The filter circuit is then built, measured, and its transfer function is found to match the simulation, demonstrating the successful completion of the lab assignment.

Uploaded by

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

ECE 100 Lab 2 DSL Low-pass Active Filter Design

The objective of this assignment is to design, simulate, build


and test the low pass filter that is needed to separate the digital
DSL signal from the voice signal on a telephone line. The
specifications for this filter are sketched below.
1. Approximation: The basic objective is (always) to realize
the circuit as economically as possible. The cost of a circuit
depends on the “order” because the higher the order the more
components you need. So the first step in any filter design, is
to find the lowest order rational function of s that will meet
the spec. In this case it is easy to see by eye that we will need
a stop band that falls at least as fast as 40dB/decade, so we
start by checking to see if a second order filter will work. We
start with a Butterworth for convenience.
(a) The “Butterworth” |H(f)|2 = 1 / (1 + (f/f0)4). To see if the transfer function meets the spec we choose f0 so the
transfer function just hits the passband edge. This is the lowest possible value of f0. Then we check to see if |H(f)|2
clears the stopband edge. Find this value of f0 analytically. Calculate the resulting |H(f)|2 at 32 Khz and 180 Khz.
Does the filter meet the spec?
(b) You will find that the maximally flat transfer function does meet the spec (as you can see in the figure), but it
is a very tight fit. This leaves little room for component errors. We could increase the order from n = 2 to n = 3,
but this will increase the cost by, roughly, 50%. So instead we consider allowing |H(f)|2 in the passband to
“ripple” from –1dB at dc, up to 0dB, then down to –1dB at 4 KHz. Thus |H(f)|2 will have a peak 1dB greater than
the dc value. This peak is |H(fPK)|2 / |H(0)|2 = 1/(4ζ2(1 - ζ2)), as was found in Lab 1. It is not easy to solve this
expression for the necessary ζ but it is easy to calculate and plot. Use Matlab to plot |H(fPK)|2 / |H(0)|2 in dB vs ζ
in the range 0.1 < ζ < 0.7 and find the value of ζ that will provide a 1dB peak (i.e. |H(fPK)|2 = 1/0.7943). Make a
hard copy.
(c) Now we have the necessary ζ we can correct the dc gain using a voltage divider to get |H(f)|2 = 0.7943/((1 -
(f/f0)2)2 + (2ζ f/f0)2). All that remains is to choose the resonant frequency f0 so |H(f)|2 = –1dB at 4 KHz. It is not
easy to invert this equation for f0 either. Take a guess at f0, say f0 = 5000 Hz, and plot |H(f)|2 in dB vs f over the
range 1000 < f < 10000. Find the frequency at which |H(f)|2 drops to –1dB, say this value is X. We therefore need
to scale f0 by the factor 4000/X, i.e. f0 = 5000*4000/X. Find the required f0 and plot |H(f)|2 in dB vs f for 200 < f <
1Mhz on a semilogx plot. The resulting function will drop faster in the transition band and will meet the spec with
more clearance than the Butterworth approximation. There is no need to save a copy of this plot.
(d) Finally we need to adjust f0 upwards a bit so |H(f)|2 clears the passband edge and the stopband edge by the
same factor. What is your final value of f0? Save a copy of this graph to show that it meets the spec.
2. Realization/Simulation: This filter can be realized with a passive RLC circuit or an active RC circuit. The
most attractive topology for an active RC lowpass filter is the Sallen-Key form shown below. However the
Sallen-Key circuit has a dc gain of unity, so we’ll need to modify it slightly. The circuit components are not ideal
and we will have to simulate the realization to make sure that non-ideal effects don’t interfere with the design.
(a) The most important “non-ideal” opamp effect for this circuit is the output resistance of the opamp itself. This
is typically about 50 Ω. At the highest frequencies you can assume that the capacitors are short circuits and the
opamp gain is zero. Show that under these conditions |H| →ROUT/R. Given this approximation we might expect to
use resistors a bit smaller than 100K.
(b) Analyze the Sallen-Key circuit as shown below. Put the transfer function in the general form. With this circuit
any transfer second-order transfer function can be realized with equal resistors (but not with equal capacitors). So
for simplicity we usually set R1 = R2. Assume that the resistors are R1 = R2 = 100K. Calculate the component
values needed to obtain the necessary values of f0 and ζ. Finally we can correct the dc gain, setting it to –1dB, by
converting R2 into a potential divider with a dc gain of –1dB and a Thevenin resistance of 100K. Do this too.
(c) Simulate the circuit using the LF411 (Check the EVAL library)
macromodel and confirm that it meets the spec. If you cut all the resistors
exactly in half and double all the capacitors, it won’t change the theoretical
transfer function, but it will increase the effect of the output resistance. Try
it. Does the transfer function still meet the spec? Find the lowest resistance
for which the simulation still meets the spec and make a hard copy to take to
the lab.
Save the simulated |H(f)|2 as an ascii text file, so you can compare it with
the theoretical filter and the measurements of the experimental filter using
Matlab later. To do this select the trace name (under the plot), then choose
copy from the edit menu. Open notepad and paste the data in. You will see a header line and frequency followed
by the amplitudes in dB. Save this with a name.txt in a convenient place. Create a Matlab script that will plot your
theoretical |H(f)|2, then read and plot your simulated |H(f)|2, and then read a table of observations and over-plot
them as distinct symbols (i.e. not connected by a line). If you want to be really fancy have it plot the specs too, as
in the first figure in these instructions. Remember to include this script as well as the final plot containing the
theoretical, simulated, and experimental sets in your final report.
3. Measurement: When you go into your scheduled lab period have hard copies of two plots (from part 1e and
part 2) for the TA to check. Have your plotting script ready so you can compare your measurements with the
simulations immediately. We will use the LF411 opamp with the pins shown below.
Build and test the active circuit. Here we have lots of 1% resistors in stock so you should be able to get pretty
close to the three resistors you need. You can always use a resister larger than the minimum value determined in
your simulation to make the choice easier. However we don’t have nearly as wide a range of capacitors, you will
probably have to put two capacitors in parallel to approximate C1 and the same for C2.
Put probes on both the input and the output and trigger the scope from the input probe. This will allow you to
measure low-level signals at the output without losing the trigger. Measure the transfer function at the spec
frequencies in dB: dc, fPEAK, 4 Khz, 32 Khz, 180 Khz, and 1 Mhz. At high frequencies the output voltage will be
weak and noisy. You can’t use the scope’s peak-to-peak measurement with noisy data because it will give you the
sum of the signal and noise. You will have to work to get the noise down: (1) use a good strong signal as high as
you can achieve on the signal generator (aim for at least 10v pk-pk); (2) use the probe in X1 mode (remember to
change the channel setting to match the probe; (3) use trace averaging; (4) reduce the channel bandwidth. With all
these features you should be able to reach –60dB. In this circuit you can use X1 mode on the probe. This is often
not possible because you need a high impedance probe. But in this circuit the probe is connected to the low
impedance output of an opamp, so the probe impedance is not a problem.
Explore the remainder of the frequency range up to the generator limit and make sure there are no unexpected
“features.” Since this is an active circuit you have to make sure that the signal does not drive the opamp into a
nonlinear operating condition. So long as the output voltage still looks like a sin wave you are probably OK. A
good way to confirm that the system is being tested in a linear range is to change the input voltage by a factor of
two and re-measure |H(f)|2, if it is the same you are OK. Be sure to take a scope image before and after changing
the input voltage to include in your lab. If they differ then reduce the input voltage another factor of two and try
again.
Put your measurements in an ascii file so you can read them into Matlab and plot them on top of the simulation.
Put your measurements on your simulated transfer function. When you are finished
show the TA and ask him/her to sign your plot. This is the final proof of
performance.
Lab Report: Your report should contain a short discussion of the prelab with the
requested plots. It should include a diagram of the measured circuits with the actual
components used. The most important part of the report is the plot showing that the
measured transfer function meets the spec.
Make sure to include the following in your lab report (This list is not all
encompassing, check with your TAs, but serves as a helpful checklist)
• Hand calculations and the requested plots from 1a-d
• Hand calculations for 2a-b
• Plot from simulationusing minimum working resistance value from 2c
• Script for plotting the theoretical |H(f)|2, saving and plotting the simulated |H(f)|2, and then read and
overplot the experimental values of |H(f)|2 from part 2c
• The requested experimental transfer function values from part 3
• The Final plot overplotting theoretical, simulated, and experimental |H(f)|2
• Include the two plots from part 3 showing that the opamp is in the linear range
• A picture of the circuit you built on your breadboard

You might also like