lab 5

13
Page 1 of 13 Department of Electrical Engineering City College The City University of New York Electrical Engineering Laboratory I EE221 Fall 2011 Lab Report: Experiment #5 RC Circuit Frequency and Time Response Student Last Name: Vazquez First Name: Juan ID #: 6503 Partner’s name: Adrian Encalada Due: November 14 2011 Prof. Orhan Celebi

Upload: juan-antonio-vazquez-perez

Post on 31-Jul-2015

29 views

Category:

Documents


2 download

TRANSCRIPT

Page 1: Lab 5

Page 1 of 10

Department of Electrical EngineeringCity CollegeThe City University of New York

Electrical Engineering Laboratory IEE221

Fall 2011

Lab Report: Experiment #5

RC Circuit Frequency and Time Response

Student Last Name: Vazquez First Name: Juan ID #: 6503

Partner’s name: Adrian Encalada

Due: November 14 2011

Prof. Orhan Celebi

Page 2: Lab 5

Page 2 of 10

Aim: To introduce the student to simple elementary concepts of circuit response in the frequency

and time domain.

Pre-lab: The pre-lab asked us to find the expressions for gain, G(jω), in polar form as a function

of ω for figures one and two. (ωπf)

Where: G(jω) = |Vout/Vin| ∠tan-1(imaginary/real)

Figure 1:Low Pass Filter

Figure 2: High Pass Filter

Page 3: Lab 5

Page 3 of 10

Calculations for Pre-lab:

For figure 1: Low Pass Filter

|Vout| = ZC = 1/(j ωC) = 1 = sqrt(1 2 ) = 1 _

|Vin | ZR + ZC R + 1/(jωC) jωCR – 1 sqrt(12 + ωCR2) 1 + ωCR

∠tan-1(imaginary/real) = ∠tan-1(0/1) - ∠tan-1(ωCR /1) = -∠tan-1(ωCR)

For Figure 2: High Pass Filter

|Vout| = ZR = R = j ωCR = sqrt(0 2 + ωCR 2 ) = ωCR _

|Vin | ZR + ZC R + 1/(jωC) jωCR – 1 sqrt(12 + ωCR2) 1+ ωCR

∠tan-1(imaginary/real) = ∠tan-1(ωCR /0) - ∠tan-1(ωCR /1) = 90˚ - ∠tan-1(ωCR)

Laboratory (and simulations) Procedure: My partner Adrian and I used MATLAB program to

plot the magnitude versus frequency of the above equations for both figures over a range of 10Hz

to 10 MHz. We then continued the laboratory and simulation and we plotted the phase angle

versus the above range of frequency.

The above figures show the magnitude of gain and phase angle, versus frequency for pre-lab.

Page 4: Lab 5

Page 4 of 10

Next we marked the cutoff frequency, fc= 1/(2πRC), on all the figures. And lastly we ran an AC

analysis using Multisim program for the third figure and using MATLAB we plotted the

magnitude versus the frequency, 10 Hz to 10MHz.

Figure 3: Band-Pass Filter

Time Domain Response: For the circuit in figure one, Adrian and I simulated it with Multisim,

using the transient analysis and using the square wave given below.

We performed three calculations with the period equal to 4RC, 2RC and RC. We repeated the

same procedure for figure two except that we used periods equal to 4RC, RC and RC/2.

Laboratory Measurements

Page 5: Lab 5

Page 5 of 10

Frequency Domain Response Procedure: Adrian and I constructed figure one on our

protoboard with the same given values of the resistor and the capacitor. For the voltage source

we set our function generator to give a 1 VPP sinusoidal waveform with variable frequency. The

oscilloscope was then connected to the output voltage on our protoboard using channel one and

input voltage on channel two. Step two we made sure that our circuit was attached correctly by

measuring the gain at the following frequencies, 100 Hz, 300 Hz, 1 KHz, 10 KHz, 100KHz,

300KHz, and 1 MHz, and comparing with the laboratory (and simulations) procedure. Step three

we used the custom VI, “Frequency Response”, which sweeps the function generator over the

range of fifty hertz to two megahertz. After the VI recorded the gain directly from the

oscilloscope, we saved the records in an ASCII file for later analysis. Step four was to repeat

steps one, two and three for the high-pass filter and step five was to repeat steps one, two and

three for the band-pass filter.

Time Domain Response Procedure: This procedure was repeated for figure one and figure two.

The first step was setting up the function generator to give a square pulse train such that the low

voltage was equal to zero and the high voltage was equal to one. The periods were the same as

described by the simulation in the Time Domain Response one page back. The oscilloscope

measured the output voltage on channel one and the input voltage on channel two. The last step

was comparing the oscilloscope traces to the results obtained using Multisim. This time we used

the LabVIEW VI “Save the Oscilloscope Data: time, ch1 and ch2” and we saved both of the

output waveforms as ASCII files.

Page 6: Lab 5

Page 6 of 10

Analysis (Post-Lab):

This figure compares the gain

versus the frequency for the

low-pass filter as shown in

the figure 1 circuit. Both are

in decibels and I did this by

taking the log of the absolute

gain and multiplying by

twenty. They are both similar

because at high frequencies the magnitude drops, but at about ten thousand hertz the rate of

change is constant for the LabVIEW simulation and is declining for the Multisim simulation.

Some of the sources of errors are the input voltages. For the Multisim input voltage we have 120

VRMS and for the LabVIEW input voltage we have 1VPP. This explains why the magnitude is

different in both graphs but it still does not explain why the rate of change in gain versus

frequency is different. Those sources of errors may come from faulty lab equipment, faulty

protoboard circuit, faulty lab measurements given from LabVIEW, and not using the correct

capacitor and resistor values.

Page 7: Lab 5

Page 7 of 10

High Pass Filter

The high-pass filter simulations are very similar since they look very much alike. The only

difference is the magnitude of the gain has been shifted down and this is most likely due to the

fact that the input voltages

were different for both

simulations. The frequency

range shows that both circuits

act in the similar manner.

Band Pass Filter

For the band pass filter we

can see that the two simulations are

not a like at all. Similarly the sources

of error from the low-pass filter

apply to the band pass filter. Another

thing that did not make sense to me

was that the input voltage reading of

the band pass filter circuit was 9.9 x 1037 volts. This is clearly an error and it is most likely due to

the fact that the oscilloscope was not getting a correct reading. Another source of error is that

LabVIEW and the oscilloscope were not configured correctly.

Time Domain Response: Doing the Multisim simulation we arrived at correct results, but

Adrian and I doing the LabVIEW VI simulations proved to be much harder. We were unable to

get similar traces. The possible errors were that the rise time of the input waveform was not

Page 8: Lab 5

Page 8 of 10

smaller than the rise time of the entire circuit. This could have caused the output of the circuit to

behave the way it did, because the output of the circuit resembled very close to the pulse

waveform. Another mistake is that the output voltage of LabVIEW dips below 0 volts and that is

another error. It could have been caused by a faulty oscilloscope connection and also human

error by using the LabVIEW program incorrectly. The LabVIEW program seemed confusing to

use.

0 0.1 0.2 0.3 0.4 0.5 0.6 0.7 0.8 0.9 1

x 10-3

-0.6

-0.4

-0.2

0

0.2

0.4

0.6

0.8

Time

Vol

tage

Time Domain Response of a Low Pass Filter with RC period

Multisim

LabView

0 0.1 0.2 0.3 0.4 0.5 0.6 0.7 0.8 0.9 1

x 10-3

-0.4

-0.2

0

0.2

0.4

0.6

0.8

1

Time

Vol

tage

Time Domain Response with a 2RC period

High time domain response: The same goes for these graphs. They seem to have the same

sources of errors as the above graphs. I am sure that after finishing this lab report we could

probably do the experiment again and receive better traces of these graphs since doing the lab

0 0.2 0.4 0.6 0.8 1 1.2 1.4 1.6 1.8 2

x 10-3

-0.4

-0.2

0

0.2

0.4

0.6

0.8

1

Time

Vol

tage

Time Domain Response of a Low Pass Filter at 4RC period

Multisim

LabView

Page 9: Lab 5

Page 9 of 10

helped my understanding of the time domain response. The weird thing about these graphs is that

the voltage changes very rapidly from positive and negative, very similar to a unit impulse. I

can’t really explain too much of the sources of errors but I believe it came from us when we

carried out the experiment. It is possible that some of our parameters may have been off and we

did not take into consideration the rise and fall time of the input waveform.

0 0.1 0.2 0.3 0.4 0.5 0.6 0.7 0.8 0.9 1

x 10-3

-1

-0.8

-0.6

-0.4

-0.2

0

0.2

0.4

0.6

0.8

1

Time

Vol

tage

Time Domain Response High Pass Filter at RC period

Multisim

LabView

0 0.1 0.2 0.3 0.4 0.5 0.6 0.7 0.8 0.9 1

x 10-3

-1

-0.8

-0.6

-0.4

-0.2

0

0.2

0.4

0.6

0.8

1

Time

Vol

tage

Time Domain Response of High Pass Filter at RC/2

Multisim

LabView

0 0.5 1 1.5 2 2.5 3 3.5 4 4.5 5

x 10-3

-1

-0.8

-0.6

-0.4

-0.2

0

0.2

0.4

0.6

0.8

1

Time

Vol

tage

Time Domain Response of a High Pass Filter at 4RC period

Multisim

LabView

Conclusion: Phasors are very useful in some cases for circuit analysis. They help by skipping

the first order differential equations that prove to be very tedious to students and engineers

during calculations. Therefore the phasor method is a quick way of analyzing a circuit and

comparing it to the frequency response of that circuit. It is easier to see the magnitudes of the

voltages and gain if we convert voltage to decibel form. The logarithmic formula also helps us to

Page 10: Lab 5

Page 10 of 10

present the graphs more nicely. The time response of the circuit also helps visualize and analyze

how the circuit works best. The time domain shows how the circuit reacts to the input voltage

and in our case to the impulse of 1 volts and then back down to zero volts. The low pass filter

will reach a peak and then go down little by little until another impulse of one volt is given to the

circuit. The high-pass filter has an even more interesting affect because it dips below zero and

gives off a negative voltage. What happens is that when the input waveform gives a one volt

impulse the output is also 1 volt and then slowly declines and when the input waveform goes

from one volt to zero volts then the output waveform also spikes down but to a negative voltage

and slowly increases in voltage as the input waveform stays at zero and then it repeats again at

input square waveform peak.