Lab 1 - EE 420L
Steven Leung
Today's
date 1/23/15
Email: leungs@unlv.nevada.edu
Prelab:
1) Request a CMOSedu account
2) Review the material to edit webpages
3) Read write-up before lab
Lab Description - Analyze basic RC circuits including magnitude, phase, frequency response.
Lab Requirments for each circuit
- Circuit schematic showing values and simulation parameters (snip the image from LTspice).
- Hand calculations to detail the circuit's operation.
- Simulation results using LTspice verifying hand calculations.
- Scope waverforms verifying simulation results and hand calculations.
- Comments on any differences or further potential testing that may be useful (don't just give the results, discuss them).
1) Fig
1.21
Simulation results
From
the simulation we can see that the peak voltage of the input is 1 V and
the peak voltage of the output is 622.8 mV. From this we can calculate
the magnitude to be .623 by dividing output by input. The change in
time from input to output peak is 718.7 uS. Using the formula
<(degrees) = (td * 360*f) where td is the delay time and f is the
frequency, the phase shift can be calculated to be 51.7°. From
the simulation result we can see that the output lags the input which
means that our calculated phase shift should be -51.7°.
Hand calculations
From
the hand calculations we can see that both the magnitude and phase from
the hand calculations match the simulations. In the calcultions the
phase shift is already negative just as we predicted from the
simulation.
Scope Waveforms
From
the first picture we can calculate the magnitude by dividing the two
max voltages of the input and output which becomes .642. From the
second picture, after using the curser function to measure the dealy
between the two peaks (720 uS), the phase shift can be calculated using
the formula <(degrees) = (td * 360*f) and comes out to become 51.84° . Since the output lags the input, the phase change should be -51.84° instead of 51.84°. Both of the results match the hand and spice simulations.
Final results
| Magnitude | Phase change in degrees |
LTSpice | .623 | -51.7 |
Oscilloscope | .642 | -51.8 |
Hand Calculations | .623 | -51.5 |
AC analysis of Fig. 1.21
While
using the frequency response feature of LT spice, we can easily see the
magnitude and phase change of the circuit at any frequency. The curser
in the picture above shows that at 200 Hz, the magnitude is -4.13 Db
and the phase change is -51.56. To change from Db into the magnitude we
calculated above, we can follow the formula: Db = 20 log (Vout/Vin).
Therefore the magnitude of Vout/Vin becomes .62. Notice that these
values at 200 Hz are exactly the same as the values we got from doing a
transiant analysis. Using AC analysis will be useful to understand how
the circuit will behave at a large range of frequencies. For example,
based on the AC analysis of Fig 1.21, we can see that this is a low
pass filter because the circuit will pass very low frequencies with a
gain of 1 but as the frequency increases, the gain or magnitude will
begin to decrease.
To
get the frequency response from an oscilloscope, we can measure
the amplitue and phase change at different frequencies and then plot on
a lograthamic plot with the frequency on the X-axis and magnitude and
phase on the Y-axis. The magnitue response can be chnaged into Db with
the forlmula 20 Log(Vout/Vin).
Frequency (Hz) | Output magnitude (assume input= 1V) | Magnitude in Db | Phase difference in degrees |
50 | 1V | 0 | -16.2 |
100 | 920 mV | -.724 | -31 |
500 | 340mV | -9.37 | -72 |
1K | 200mV | -13.98 | -77.3 |
10K | 60mV | -24.44 | -85.1 |
2)
Fig.
1.22
Simulation results
From
the simulation we can see that the peak voltage of the input is 1 V and
the peak voltage of the output is 703.4 mV. From this we can calculate
the magnitude to be .703 by dividing output by input. The change in
time from input to output peak is 106 uS. Using the formula
<(degrees) = (td * 360*f) where td is the delay time and f is the
frequency, the phase shift can be calculated to be 7.632°.
From the simulation result we can see that the output lags the input
which means that our calculated phase shift should be -7.632°.
Hand calculations
From
the hand calculations we can see that both the magnitude and phase from
the hand calculations match the simulations. There is a slight
difference in values but this may be from inaccurate readings off the
waveform of the sumulation. Again in the calcultions the
phase shift is already negative just as we predicted from the
simulation.
Scope Waveforms
From
the first picture we can calculate the magnitude by dividing the two
max voltages of the input and output which becomes .709. From the
second picture, after using the curser function to measure the dealy
between the two peaks (100 uS), the phase shift can be calculated using
the formula <(degrees) = (td * 360*f) and comes out to become 7.2° . Again since the output lags the input the phase change should be -7.2°. Both
of the results are similar to the hand and spice simulations. The
reasons for the differences may be becuase of different values on the
componenets or the accuracy of the instruments.
Final results
| Magnitude | Phase Change in degrees |
LT Spice | .7 | -7.6 |
Oscilloscope | .709 | -7.2 |
Hand Calculations | .694 | -6.84 |
3)
Fig. 1.24
Simulation results
Once
the voltage source jumps to 1 Volt, the capacitor starts charging up to
that 1 Volt. and once the voltage goes back to zero, the capacitor
starts to discharge through the resistor. Time it takes for the
capcacitor to charge and discharge depends on the RC constant which is
calculated by multiplying the Resistance value by the Capacitor value.
It will take around 5 RC (5 time constants) for the capacitor to fully charge or discharge.
Return to EE 420L Labs