EE 221-Lab 5

Download as pdf or txt
Download as pdf or txt
You are on page 1of 22

1

Experiment #5
RC Circuit Frequency and Time Response

Name: Md Mehedi Hasan Khan.


Lab partner: Qudrat E Khoda
Instructor’s name: Muhammad Irfan
Course title and section: EE 221 (5AC)
Spring 2024
Date: 03/29/24
2

Table of Contents
Purpose ...........................................................................................................................................3
Introduction ................................................................................................................................ 3-5
Equipment .......................................................................................................................................5
Pre-lab (Frequency Domain Response) ...................................................................................... 6-7
Pre-lab (Time Domain Response) ............................................................................................... 7-8
Laboratory Simulation............................................................................................................... 9-13
Frequency Domain Response...................................................................................................9-10
Time Domain Response.......................................................................................................... 11-13
Laboratory Measurements...................................................................................................... 14-16
Frequency Domain Response.................................................................................................14-15
Time Domain Response...............................................................................................................16
Post Lab ................................................................................................................................... 16-21
Frequency Domain Response.................................................................................................16-17
Time Domain Response......................................................................................................... 18-21
Conclusion ....................................................................................................................................21

References ....................................................................................................................................22
3

Purpose
The purpose of this experiment is to be introduced to simple elementary concepts of circuit

response in the frequency and time domain.

Introduction
The frequency and time response of circuits in an extremely important concept in filter design,

feedback, communications etc. In this lab, simple RC series circuits and their behaviors are

observed while they are excited by an AC signal. However, this time, it is the gain of the circuit

throughout various elements which is studied and compared, accordingly. For the simple RC

circuit, the effects of alterations in different elements of the circuit such as frequency, input

amplitude, resistor value and capacitor value are looked at. Additionally, gains across the

capacitor or the resistor are observed and given the voltage division across different elements,

differing results are expected.

Two RC circuits were used in this experiment. They contain almost the same construction and

components, Just the output is measured across a different component each time.

For the low pass filter, the resistor and capacitor is connected in series, the input is a AC signal

generated by the signal generator. The output voltage will be measured across the capacitor.

Figure 1: Low-pass filter circuit


4

Then the second circuit which is called a high pass filter, is also contained with a resistor (Same

value as low pass filter) and capacitor (same value as the low pass filter) which are connected in

series. The input is as always an AC signal generated by signal generator. This time the output

will be measured across the resistor.

Figure 2: High-pass filter circuit

Also, a band pass filter was developed later on. A band pass filter passes a range of frequencies

from low to high. The band pass filter can be implemented by connecting together a high pass

and a low pass filter.

High pass Low pass out


in
filter filter

Figure 3: diagram for the construction of band pass filter

The circuit was constructed using a pair of resistors and a pair of capacitors. The input was an

AC signal as before.
5

Figure 4: Band-pass filter circuit

Equipment

• Power supply
• DMM (Digital Multi Meter)
• Resistors (1.5k, 1.5k, 3.3k, 3.3k)
• Capacitor (0.1µF, 0.001µF)
• MATLAB
• LabVIEW
• Multisim
• Protoboard
• Signal Generator
• Oscilloscope
6

Pre-Lab (Frequency Domain Response)

In this section, for the low-pass and high-pass filter circuits two equations were constructed.

These two equations give the magnitude of gain for the respective set-up.

For low pass filter circuit:

1
𝐺𝑎ⅈ𝑛 =
√(2𝜋𝑅𝑓𝑐 )2 + 1

For High pass circuit:

2𝜋𝑓𝑐𝑅
𝐺𝑎ⅈ𝑛 =
√(2𝜋𝑅𝑓𝑐 )2 + 1

Then using MATLAB, the magnitude of the gain vs frequency for both circuits was plotted on

the same graph. The ‘loglog’ feature was used to generate the graph.

Figure 5: Gain vs frequency graph for low and high pass filter
7

The ‘X’ axis contains frequency, and the ‘Y’ axis contains the magnitude of the gain.

Pre-Lab (Time Domain Response)

This time, two different equations were constructed/given to calculate the output for both low-

pass and high-pass filter circuits.

For low-pass filter circuit:

𝑣𝑂𝑢𝑡 = 𝑣𝑖𝑛 (1 − ⅇ −(𝑡∕𝑅𝐶) )

For high-pass filter circuit:

𝑣0𝑢𝑡 = 𝑣𝑖𝑛 (ⅇ −(𝑡∕𝑅𝑐) )

Now, these two equations were plotted into MATLAB to a 1-volt step input on the same plot.

The ‘X’ axis will contain the time (t = 0 to t = 6RC) and the ‘Y’ axis will contain the output

voltage.
8

Figure 6: Output of low pass and high pass filter circuits to a step input

In the graph, the figure-1 refers to low pass filter circuit and figure-2 refers to high pass filter

circuit.
9

Laboratory Simulation

Frequency Domain Response

Using Multisim, the band-pass filter circuit was constructed. Then an AC analysis was performed

on the circuit and the output was captured.

Figure 8: Multisim simulation for the gain and phase of the band-pass filter circuit.

Figure 9: Band-pass filter circuit


10

Now the Multisim simulation data was saved into an ASCII file and it was plotted on a loglog

scale. The frequency limit was 10 < f < 10MEG.

Figure 10: Gain vs Frequency graph for band-pass filter

From the graph, a clear picture of what a band-pass filter does is portrayed. It combines the

features of a high and low pass filter to create a “band” pass filter that allows the gain of the

circuit to be near 1 for a certain “band” of frequencies. For our circuit, those frequencies lie

between 103 and 104 Hz.


11

Time Domain Response

Now using Multisim a transient analysis was applied to both high-pass and low-pass filters.

The analysis was applied to both circuits under some conditions. The circuit had a input signal
with specific pulse period.

Figure 11: Low pass filter circuit for transient analysis

For Figure 1 (Low-pass filter circuit):

i) Pulse period = 12RC

End Time = 5ms

Figure 12: Multisim output for low pass filter transient analysis (pulse period 12RC)
12

ii) Pulse Period = 4RC

End time = 5ms

Figure 13: Multisim output for low pass filter transient analysis (pulse period 4RC)

The same steps were repeated for the high-pas filter circuit.

Figure 14: High pass filter circuit for transient analysis


13

For figure 2 (High-pass filter circuit):

i) Pulse Period = 12RC

End time = 5ms

Figure 15: Multisim output for high pass filter transient analysis (pulse period 12RC)

ii) Pulse period = (2/3)RC ; End time = 1ms

Figure 16: Multisim output for high-pass filter transient analysis-pulse period (2/3)RC
14

Laboratory Measurements

Frequency Domain Response

1. The RC low-pass filter circuit was constructed on the protoboard. The function generator

was set to 10Vp-p sinusoidal waveform with variable frequency. The Vin was measured in

channel 1 and the Vout was measured in channel 2 by the oscilloscope.

2. Then the gain was measured with some sample frequencies just to verify the correctness

of the setup.

3. Then the function generator was swept over the range 50 < f < 2 Meg on a scale of 40 pts

by using the custom VI, “Frequency Response”. The VI records the gain directly using

the oscilloscope gain measurement mode.

Figure 17: Frequency response sweep for low-pass filter circuit


15

4. The high-pass circuit was also constructed and the above steps were repeated for it as

well.

Figure 18: Frequency response sweep for high-pass filter circuit

5. The bandpass circuit was also constructed, and the above steps were repeated.

Figure 19: Frequency response sweep for band-pass filter circuit


16

Time Domain Response

The following steps were followed for both low-pass and high-pass filter circuits.

1. The function generator was set to give a square pulse train such that V L = 0V, VH = 1V.

The Vout was measured on channel 1 and the Vin in channel 2.

2. The LabVIEW VI “Save Oscilloscope Data: time, ch1, ch2” was used to save both the

output and waveforms as ASCII files.

Post Lab

Frequency Domain Response

At this stage we were asked to create multiple graphs using the data collected during the

calculation (pre-lab), simulation and laboratory phases. The first graph includes the measured

and calculated values of the gain for the low pass filter. The figure below shows this graph.

Figure 20: Gain comparison for low pass filter(Measured and calculated)
17

Now for the high pass filter:

Figure 21: Gain comparison for high pass filter(Measured and calculated)

Now comparing the results for band-pass filter:

Figure 22: Gain comparison for band pass filter(Measured and simulated)
18

Time Domain Response

Then the next step is to compare all of the measured, calculated, and simulated data for the

low and high-pass filters. For convenience, all of them have been graphed on the same plot in

different subplots.

Figure 23: Measured Output and Simulated Output for Low Pass Filter (Settings: Pulse

Period = 12RC, End Time = 5 mS)


19

Figure 24: Measured Output and Simulated Output for Low Pass Filter (Settings: Pulse

Period = 4RC, End Time = 5 mS)

Figure 25: Measured Output and Simulated Output for High Pass Filter (Settings: Pulse

Period = 12RC, End Time = 5 mS)


20

Figure 26: Measured Output and Simulated Output for High Pass Filter (Settings: Pulse

Period = (2/3)RC, End Time = 1 mS)

a. For every single one of these graphs, it is seen that they are nearly identical for both

measured and calculated. The only real difference seen is in the last graph where the

Pulse Period was set to 2RC/3. Here, the simulated output starts at 1V but rests at just

above 0.5V later on. However, for the measured values, we they rest at just above 0.5V

all throughout. This is because the simulated output is measuring from time = 0 where the

voltage is read as the total voltage input. Since the circuit doesn’t have enough time to

totally charge or discharge, there is a cutoff voltage that the circuit cannot surpass in

either the positive or negative direction.

b. In terms of the rise and fall times of the circuits, from our measured values it is obvious

that from a max of 1V to a min of 0V, a time of just about 2.4*10 -7 s is given, an
21

extremely small amount of time for the input parameter to make such a jump. This does,

however, give a pretty good reading for the output when graphed.

c. The given equation:

𝑣0𝑢𝑡 = 𝑣𝑖𝑛 (ⅇ −(𝑡∕𝑅𝑐) )

Solving the equation for RC and we get:

RC = -t / ln(Vout / Vin)

Now putting sample values from the dataset,

RC = (-7.48 * 10-5 s) / ln (0.6 V / 1.0 V)

= 1.4643 * 10-4 s

This is the actual value of RC.

Conclusion

What we could gather from this lab is for the most part, the analysis of time domain

responses and frequency domain responses of different circuits. Whether it was through

Multisim or LabVIEW, our values came very close to each other with errors that were very

small (many of them being less than 1%). As it is apparent from the analysis section, the

measured values within the experiment, for the most part, coincide with the calculated ones,

most especially when there were dealings with time domain responses.
22

References

1. MATLAB tutorial (Located in the manual)

2. Instrument manuals (Located on the lab computers)

3. Multisim Tutorial (Located on the lab computers)

4. LabVIEW (Located on the lab computers)

You might also like