ece 220 laboratory 5 step response and frequency response michael w ma
Search for question
Question
ECE 220 Laboratory 5
Step Response and Frequency Response
Michael W. Marcellin
Please follow all rules, procedures and report requirements as described at the beginning of the
document entitled ECE 220 Laboratory 1.
Always wear your safety glasses when performing your lab experiments.
Prelab Part 1
Consider the RC circuit shown below in Figure 1. We will examine the step response and natural
response of this circuit. Recall the FIFE equation from class:
x(t) = x(∞) + (x(t₁) − x(∞))e-(t-to)/T
vi(t)
1 ΚΩ
+
1 μFvc(t)
Figure 1. RC step response and natural response.
Suppose to = 0, vc (to) = 0 V, and v¿(t) = 5 V for t ≥ to.
a) Write an equation for vc (t) for t≥ 0 (step response).
b) About when will vc (t) reach its final value?
Now assume to
=
10 ms, vc(to) = 5 V, and v¿(t) = 0 V for t ≥ to.
c) Write an equation for vc (t) for t≥ 10 ms (natural response).
d) About when will vc (t) reach its final value?
Now, assume that vi(t) is the square wave shown in Figure 2 below. 5 V
↑ Vi(t)
10 ms 20 ms 30 ms 40 ms
t
Figure 2. Square wave.
Assume vc (0) = 0 V. Then your equation from a) above is good for 0 ≤ t < 10 ms. Now, from
your answer to b) above, vc (t) reaches 5 V well before 10 ms. So, your equation from c) above
is good for 10 ≤ t < 20 ms.
We will verify this using PSpice. Start a new project as usual, and draw the circuit shown below
in Figure 3. We use a new part in this circuit called VPULSE to generate the square wave of
Figure 2. This part can generate a very general periodic pulse sequence. Set the parameters as
shown in the figure. The meanings of the parameters are as follows:
PER is the period
V1 is the "first" voltage
V2 is the "second" voltage (usually higher than V1)
TD is the Time Delay before switching from V1 to V2
PW is the Pulse Width (time voltage stays at V2 before returning to V1)
TR is the Rise Time (time voltage takes to transition from V1 to V2)
TF is the Fall Time (time voltage takes to transition from V1 to V2)
Λ
V10
V2=5
V1
TD = 0
TF = 1n
TR = 1n
PW = 10m
PER = 20m
R1
w
1k
HH
C1
1u
152
Figure 3. RC circuit with square wave input.
Double click carefully on the capacitor symbol itself (not the label or value). The property editor
spreadsheet opens. Scroll left or right until you find the column labeled IC. This is the initial
condition for the capacitor voltage. Set the cell below IC to 0. Click on the tab labeled PAGE 1 to
return to your schematic. Create a new simulation profile and set Analysis Type to Time Domain (Transient).
Set the parameters as follows:
Run to time: 40 m
Start saving data after: 0
Maximum step size: 0.1 m
Add voltage markers as shown in the figure and run your simulation. Verify that the resulting
curves agree with your answers to a)-d) above.
e) print your graph.
Prelab Part 2
Consider the RC circuit shown below in Figure 4.
a) Use complex phasor analysis to calculate the steady state output voltage vo(t) for three
different values of f. Specifically, ƒ = 10 Hz, f = 1 kHz, and ƒ = 100 kHz.
==
Don't forget that w = 2πf, so that the three different inputs are v¿(t) = cos(20πt), vi(t) =
cos(2000πt), and v₁(t) = cos (200000πt). If you have done this correctly, you should get
something fairly close to vo (t) = cos(20πt), v,(t) = 1½ ½ cos (2000πt - 45°), and v₁ (t) =
0.01cos (200000πt – 90°), for the three different inputs, respectively.
+
vi(t) = cos(2Пft) V
15.7 ΚΩ
w
10 nF
vo(t)
Figure 4. Steady state response for RC circuit.
Note that the only thing that changed in your three calculations is the frequency of the cosine
input (10 Hz, 1 kHz, 100 kHz). In particular, the circuit is exactly the same in all three cases.
From your calculations, we can see that the 10 Hz cosine passes through the circuit essentially
unaltered. On the other hand, the 100 kHz cosine essentially does not pass through the circuit.
From this, we conclude that the circuit is a "low pass" filter. That is, low frequency sinusoids
pass through the circuit, while high frequency sinusoids are "filtered out."
We will verify your results for the f = 1 kHz case using PSpice. Start a new project and draw
the circuit of Figure 5. As in previous labs, use the part VSIN to generate the input voltage v¿(t).
This part generates sin (2πft) by default. We can get cos (2лft) by setting the parameter
TD = 1/1/
For the example here with f
4f
= 1 kHz, we need TD =
-1
4000
= −0.25 ms. To set this value, click carefully on the VSIN part (not the labels or values). The property editor
spreadsheet opens. Scroll left or right until you see the column labeled TD. Enter –0.25 m in
the cell below TD. To understand this choice for TD, see the appendix.
Create a new simulation profile. Set the Analysis Type to Time Domain (Transient), and enter
the following parameters:
Run to time: 6.5 ms
Start saving data after: 5 ms
Maximum step size: 1 us (don't forget that u means “micro” in PSpice)
The parameters above will collect 1.5 ms of data starting at time t = 5 ms. We wait until 5 ms
have elapsed before collecting data so that the circuit is in steady state (transient response has
died away).
VOFF = 0
VAMPL = 1
FREQ=1000
AC =
R1
ww
15.7k
V1
C1
10n
Figure 5. PSpice RC circuit.
Place voltage markers as shown in the figure to measure the input voltage and output
(capacitor) voltage. Run the simulation.
The resulting figure should show two sinusoids. Verify that they appear as expected. Checking
the amplitudes is easily done by inspection. The phase of the output voltage is a little trickier.
We can obtain it as follows: First note that the input voltage crosses through 0 V (with negative
slope) at 5.25 ms. The output voltage passes through 0 V (with negative slope) a short time
later. You can determine this time fairly accurately using the PSpice cursor.
Click Trace->Cursor->Display
Now, in the lower left corner of the graph (the black part of the screen) is a legend which shows
symbols for the two voltage curves (traces). Click carefully on the legend symbol (not the label
next to it) for the output voltage curve. Now, click anywhere on the graph to initially place the
PSpice cursor. Then, drag the cursor left/right with the mouse (or use the left/right cursor keys
on your keyboard) to move the PSpice cursor to the place where the output voltage is closest to
0 V. Hint: Watch the values in the cursor window in the lower right corner of your screen. Once
you have the cursor in the correct place,
Click Plot->Label->Mark This will label the (x, y) coordinates of the PSpice cursor on the screen.
As an example, Figure 6 below shows what this looks like for the first zero crossing of the input
voltage. Your task is to mark the first zero crossing of the output voltage.
b) print your graph showing the appropriate mark.
Temper at ure: 27.0
C:\Users\ mwm Desktop\ 2201 220 I abs\ ab 5\ ps pi ce\ Freq_Response\fre
Steady St at e active)
Profile: "SCHEMATI C1- Steady St at e"
Dat e/ Ti me run: 08/26/12 09: 59: 40
Г
(A)
1. OV
0. 5V-
ov-
-0. 5V-
785m
- 1. Ov
5. Oms
5. 2ms
5. 4ms
V(V1: +)
V( C1: 2)
A1: (5. 2506m - 3. 8785m)
Date: August 26, 2012
A2: (5. 0000m 1. 0000)
5. 6ms
5. 8ms
Ti me
6. Oms
6. 2ms
6. 4mb
6. 6ms
DI FF( A) : (250. 617u, - 1. 0039)
Page 1
Ti me:
10: 02: 41
Figure 6. Voltage marking example.
Now, back to calculation of the output voltage phase. As mentioned above, and as shown in
Figure 6, the input voltage crosses through 0 V at 5.25 ms. Your graph shows the time at which
the output voltage crosses through 0 V a short time later. The difference between these two
times is the time delay, At. You can find the phase delay of the output voltage, relative to the
input voltage, using unit analysis, as
40 (degrees) = At (seconds) × f
cycles
\second/
× 360
degrees
cycle
c) Calculate 40. Verify that your answer agrees with your calculations from part a).
Prelab Part 3
We discovered above that changing the frequency of the input cosine changes both the
magnitude and phase of the output cosine. That is, the magnitude and phase of the output
cosine are both functions of frequency, say A(f) and 0 (f), respectively. The function A(f) is
called the magnitude response of the circuit, while the function 0 (f) is called the phase
response of the circuit. We now consider making plots of these two functions. From the
resulting graphs, we can easily see how the magnitude and phase of the output cosine will
behave as a function of the input cosine frequency. We could create these graphs by computing/nLab report 5 (rubric)
Lab part 1
Pulse response circuit: (5 points)
Write the equation for V(t) for t≥0. Write the value of V(t) when t = 0, t=5.
Write the equation for V(t) for t≥ 10ms and value of V(t) when t = 10ms
Lab part 2
Low pass filter: (5 points)
Error analysis Vpeak-peak of V.(t) and phase difference A