0% found this document useful (0 votes)
4 views14 pages

ECA II Lab Report

The lab report details an experiment on the frequency response of an RLC band-pass filter using Multisim and MATLAB. The experiment measured gain and phase shift over a frequency range of 2000 Hz to 8000 Hz, with results showing strong agreement with theoretical predictions and a resonant frequency closely matching the expected value. The methodology included circuit construction, data collection, and analysis, confirming the filter's behavior in selecting a narrow frequency range.

Uploaded by

mwendwakelvin842
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)
4 views14 pages

ECA II Lab Report

The lab report details an experiment on the frequency response of an RLC band-pass filter using Multisim and MATLAB. The experiment measured gain and phase shift over a frequency range of 2000 Hz to 8000 Hz, with results showing strong agreement with theoretical predictions and a resonant frequency closely matching the expected value. The methodology included circuit construction, data collection, and analysis, confirming the filter's behavior in selecting a narrow frequency range.

Uploaded by

mwendwakelvin842
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

Bsc Mechatronics

ECA II LAB REPORT

6th February, 2026

Practical Title: Band Pass Filter

Prepared by;

Kelvin Mwendwa Muia - ENM221-0073/2023


Abstract

This experiment investigates the frequency response of an RLC band-pass filter using Multisim
simulation and MATLAB analysis. ​
Gain and phase shift were measured over a frequency range of 2000 Hz to 8000 Hz and compared
with theoretical predictions. ​
The measured resonant frequency closely matched the theoretical value, with a percentage error below
1%. MATLAB was used to process experimental data, compute gain and phase, and overlay
theoretical and experimental frequency responses. ​
The results confirm the expected behavior of an RLC band-pass filter and demonstrate strong
agreement between theory and simulation.

Objectives

1.​ To measure the gain and phase angle of a band-pass filter.


2.​ To verify that an RLC band pass filter passes (or selects) a small frequency range.

Softwares Used

Multisim​
MATLAB

Theoretical Background

An RLC band-pass filter allows signals within a narrow frequency range to pass while attenuating
signals outside this range. The circuit used consists of a resistor R in series with a parallel
inductor–capacitor (LC) network.

The impedance of the parallel LC branch is given by;​

𝑗ω𝐿
​ 𝑍𝐿𝐶 = 2
1−ω 𝐿𝐶
The transfer function of the circuit is:

𝑉𝑜𝑢𝑡 𝑍𝑙𝑐
​ 𝐺(𝑗ω) = 𝑉𝑖𝑛
= 𝑅+𝑍𝑙𝑐

AT resonance, the impedance of the parallel LC branch reaches a maximum, causing the output
voltage to peak.​
The resonant angular frequency of an ideal LC circuit is:

1
​ ω0 =
𝐿𝐶

1
And the resonant frequency is: ​ 𝑓𝑜 =
2Π 𝐿𝐶

For 𝐿 = 1𝑚𝐻 and 𝐶 = 1µ𝐹:​ ​ 𝑓0 = 5032 𝐻𝑧

The phase difference between two sinusoidal signals of the same frequency can be determined from
the time delay Δt between corresponding points on the waveforms.​
Since one full cycle corresponds to 360°, the phase angle is given by: ​

​ ϕ = − 360𝑓∆𝑡

The negative sign ensures the correct convention:

●​ Positive Δt → output lags input → negative phase


●​ Negative Δt → output leads input → positive phase

This method allows accurate phase measurement using time-domain oscilloscope data.​
For this RLC band-pass filter:

●​ Low frequencies: output phase approaches +90°


●​ At resonance: phase crosses 0°
●​ High frequencies: phase approaches −90°

This smooth transition is characteristic of second-order band-pass systems.


Multisim is used to:

●​ Construct and simulate the RLC circuit


●​ Generate sinusoidal inputs at controlled frequencies
●​ Measure voltage amplitudes and time delays
●​ Emulate laboratory instruments such as oscilloscopes and function generators

It provides a realistic virtual laboratory environment for validating theoretical predictions.

MATLAB is used to:

●​ Compute gain and phase from measured data


●​ Generate theoretical frequency responses
●​ Overlay experimental and theoretical results
●​ Accurately identify resonance frequency

MATLAB enables efficient numerical computation, curve plotting, and comparison with analytical
models.

Methodology

1.​ The circuit was constructed in Multisim as shown below

2.​ A function generator provided a sinusoidal input of a constant amplitude of 4V


3.​ An oscilloscope measured:
○​ Channel A: input voltage Vin
○​ Channel B: output voltage Vout​
4.​ The frequency was swept from 2000 Hz to 8000 Hz..
5.​ At each frequency, the following were recorded: Vin​(Vpp), Vout​(Vpp), Time delay Δt
between input and output. After changing the input frequency, sufficient time was allowed
before recording voltage amplitudes and time delay measurements. This ensured that transient
responses had fully decayed and the circuit reached steady-state operation. Recording data
before steady state would introduce errors due to temporary energy storage effects in the
inductor and capacitor
6.​ MATLAB was used to calculate gain and phase shift and to generate plots using the following
codes

For the experimental plots:


clear; clc; close all;​

% Columns: [f_Hz, Vin_Vpp, Vout_Vpp, dt_seconds]​
data = [​
2000 7.998 0.11938 -12.3928e-5​
2500 7.998 0.16678 -9.8189e-5​
3000 7.998 0.23390 -8.1030e-5​
3500 7.998 0.34080 -7.1970e-5​
4000 7.998 0.55400 -5.9659e-5​
4500 7.998 0.71000 -5.0524e-5 ​
4600 7.998 1.39100 -4.9242e-5​
4700 7.998 1.80600 -4.5455e-5​
4800 7.998 2.54600 -4.1667e-5​
4900 7.998 4.10400 -3.3551e-5​
5000 7.998 7.44400 -1.1916e-5​
5100 7.998 6.06800 2.1926e-5​
5200 7.998 3.45600 3.5272e-5​
5300 7.998 2.32400 3.8132e-5​
5400 7.998 1.71200 3.9561e-5​
5500 7.998 1.39580 4.0515e-5​
5600 7.998 1.16700 4.0991e-5​
6000 7.998 0.71680 3.9561e-5​
6500 7.998 0.48860 3.7655e-5​
7000 7.998 0.37280 3.4795e-5​
7500 7.998 0.30426 3.2888e-5​
8000 7.998 0.13150 3.0982e-5​
];​

% Split columns into named variables​
f = data(:,1); % frequency (Hz)​
Vin = data(:,2); % input Vpp​
Vout= data(:,3); % output Vpp​
dt = data(:,4); % time delay (seconds)​

% ====== CALCULATIONS ======​
gain = Vout ./ Vin; % |G| = Vout/Vin​
phase_deg = -360 .* f .* dt; % phase in degrees​

% Find resonance (max gain)​
[maxGain, idx] = max(gain);​
f_res = f(idx);​

% Print results​
disp('----- RESULTS -----');​
disp(['Max gain = ', num2str(maxGain)]);​
disp(['Resonant frequency (measured) = ', num2str(f_res), ' Hz']);​

% ====== PLOT 1: GAIN ======​
figure;​
plot(f, gain, 'o-');​
grid on;​
xlabel('Frequency (Hz)');​
ylabel('Gain |G| = Vout/Vin');​
title('Measured Gain vs Frequency');​

% ====== PLOT 2: PHASE ======​
figure;​
plot(f, phase_deg, 'o-');​
grid on;​
xlabel('Frequency (Hz)');​
ylabel('Phase (degrees)');​
title('Measured Phase vs Frequency');

For the overlay of the theoretical and experimental values;

clear; clc; close all;​



data = [​
2000 7.998 0.11938 -12.3928e-5​
2500 7.998 0.16678 -9.8189e-5​
3000 7.998 0.23390 -8.1030e-5​
3500 7.998 0.34080 -7.1970e-5​
4000 7.998 0.55400 -5.9659e-5​
4500 7.998 0.71000 -5.0524e-5​
4600 7.998 1.39100 -4.9242e-5​
4700 7.998 1.80600 -4.5455e-5​
4800 7.998 2.54600 -4.1667e-5​
4900 7.998 4.10400 -3.3551e-5​
5000 7.998 7.44400 -1.1916e-5​
5100 7.998 6.06800 2.1926e-5​
5200 7.998 3.45600 3.5272e-5​
5300 7.998 2.32400 3.8132e-5​
5400 7.998 1.71200 3.9561e-5​
5500 7.998 1.39580 4.0515e-5​
5600 7.998 1.16700 4.0991e-5​
6000 7.998 0.71680 3.9561e-5​
6500 7.998 0.48860 3.7655e-5​
7000 7.998 0.37280 3.4795e-5​
7500 7.998 0.30426 3.2888e-5​
8000 7.998 0.13150 3.0982e-5​
];​

f = data(:,1);​
Vin = data(:,2);​
Vout= data(:,3);​
dt = data(:,4);​

gain_meas = Vout ./ Vin;​
phase_meas = -360 .* f .* dt;​

R = 1000; L = 1e-3; C = 1e-6; j = 1i;​

f_th = linspace(2000,8000,2000);​
w = 2*pi*f_th;​

Z_LC = (j*w*L) ./ (1 - w.^2*L*C);​
G_th = Z_LC ./ (R + Z_LC);​

gain_th = abs(G_th);​
phase_th = angle(G_th)*180/pi;​

[maxGain, idx] = max(gain_meas);​
f_res = f(idx);​

figure;​
plot(f_th, gain_th, 'Color',[0.2 0.6 1], 'LineWidth',0.8); hold on;​
plot(f, gain_meas,'o','MarkerEdgeColor',[0.4 0.7
1],'MarkerFaceColor',[0.75 0.88 1],'MarkerSize',5);​
plot(f_res, maxGain,'o','MarkerEdgeColor',[0.6 0.4
1],'MarkerFaceColor',[0.85 0.78 1],'MarkerSize',7);​
grid on;​
xlabel('Frequency (Hz)'); ylabel('Gain |V_{out}/V_{in}|');​
title('Gain vs Frequency (Measured vs Theoretical)');​
legend('Theoretical','Measured','Resonance','Location','Best');​
text(f_res+80, maxGain, sprintf('f_r = %d Hz',f_res),'FontSize',9);​

figure;​
plot(f_th, phase_th, 'Color',[0.2 0.6 1], 'LineWidth',0.8); hold on;​
plot(f, phase_meas,'o','MarkerEdgeColor',[0.4 0.7
1],'MarkerFaceColor',[0.75 0.88 1],'MarkerSize',5);​
grid on;​
xlabel('Frequency (Hz)'); ylabel('Phase (degrees)');​
title('Phase vs Frequency (Measured vs Theoretical)');​
legend('Theoretical','Measured','Location','Best');​



Data Representation

Frequency (Hz) Vin pp (V) Vout pp (V) △t (s) Phase shift Ø

2000 7.998 0.11938 − 12. 3928 × 10


−5 89.23 °

2500 7.998 0.16678 − 9. 8189 × 10


−5 88.37 °

3000 7.998 0.2339 − 8. 103 × 10


−5 87.51 °

3500 7.998 0.3408 − 7. 197 × 10


−5 90.68 °

4000 7.998 0.554 − 5. 9659 × 10


−5 85.91 °

4500 7.998 0.71 − 5. 0524 × 10


−5 81.85 °

4600 7.998 1.391 − 4. 9242 × 10


−5 81.54 °

4700 7.998 1.806 − 4. 5455 × 10


−5 76.91 °

4800 7.998 2.546 − 4. 1667 × 10


−5 72.11 °

4900 7.998 4.104 − 3. 3551 × 10


−5 59.18 °

5000 7.998 7.444 − 1. 1916 × 10


−5 21.45 °

5100 7.998 6.068 2.1926× 10


−5 -40.26 °

5200 7.998 3.456 3. 5272 × 10


−5 -66.03 °

5300 7.998 2.324 3. 8132 × 10


−5 -72.76 °

5400 7.998 1.712 3.9561× 10


−5 -76.91 °

5500 7.998 1.3958 4. 0515 × 10


−5 -80.22 °

5600 7.998 1.167 4. 0991 × 10


−5 -82.64 °

6000 7.998 0.7168 3. 9561 × 10


−5 -85.45 °

6500 7.998 0.4886 3. 7655 × 10


−5 -88.11 °

7000 7.998 0.3728 3. 4795 × 10


−5 -87.68 °

7500 7.998 0.30426 3. 2888 × 10


−5 -88.80 °
8000 7.998 0.1315 −5
3. 0982 × 10 -89.23 °

The measured gain and phase shift were calculated as:

𝑉𝑜𝑢𝑡
​ |𝐺| = 𝑉𝑖𝑛
ϕ = − 360𝑓∆𝑡

Key Results:​
Max G = 0.9307​
Measures resonant f = 5000Hz​
Theoretical resonant frequency = 5032 Hz​
Percentage error

|5000−5032|

5032
× 100 = 0. 63593%
Data Analysis


Discussion

The experimental gain and phase responses closely match the theoretical predictions. The measured
resonant frequency is slightly lower than the theoretical value due to component tolerances and
resistive losses, particularly in the inductor. The peak gain is less than unity, which is expected in
practical circuits with non-ideal components.

The phase response exhibits the characteristic transition of a band-pass filter, moving from +90° at
low frequencies to −90° at high frequencies, with a zero-degree crossing near resonance.

Because the circuit is linear and time-invariant, each sinusoidal component of the input signal is
processed independently. The total output is the sum of the individual outputs corresponding to each
frequency component.

For an input of the form:

x(t) = A·sin(ωt)

the output of the system is:

y(t) = A·|G(ω)|·sin(ωt + φ(ω))

where |G(ω)| is the magnitude of the frequency response at angular frequency ω, and φ(ω) is the phase
shift introduced by the circuit at that frequency.

Given input signal​


x(t) = 10·sin(10000t) + 3.3·sin(30000t) + 2·sin(50000t)​
This input contains three sinusoidal components with angular frequencies:

●​ ω₁ = 10000 rad/s (≈ 1.59 kHz)


●​ ω₂ = 30000 rad/s (≈ 4.77 kHz)
●​ ω₃ = 50000 rad/s (≈ 7.96 kHz)

Output signal

Applying the frequency response of the circuit to each component individually, the output signal is:

y(t) = 10·|G(10000)|·sin(10000t + φ(10000)) + 3.3·|G(30000)|·sin(30000t + φ(30000)) + ​


2·|G(50000)|·sin(50000t + φ(50000))
Conclusion

The frequency response of the RLC band-pass filter was successfully measured and analyzed. Both
gain and phase characteristics agree well with theoretical predictions and MATLAB simulations. The
experiment confirms the expected behavior of an RLC band-pass filter and demonstrates the
usefulness of MATLAB for analyzing frequency response data.


References

Alexander, C. K., & Sadiku, M. N. O.​


Fundamentals of Electric Circuits, 6th ed.,​
McGraw-Hill Education, New York, 2017.​

Nilsson, J. W., & Riedel, S. A.​


Electric Circuits, 10th ed.,​
Pearson Education, Boston, 2015.

You might also like