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

21EL026

Muhammad Sami

CEP Statement:
This project designs and analyzes first-order and second-order low pass filters for audio signal
processing. The filters aim to remove high-frequency noise from an audio signal with a frequency range
of 0-20 kHz and a peak amplitude of 5 volts. The design requirements include a cutoff frequency of 15
kHz and a gain of -3 dB at the cutoff frequency. The filters are designed using standard electrical
components and operate with a power supply of 9 volts.
The project delivers a comprehensive analysis of the filters, including transfer functions, impulse and
step responses, and frequency responses. The performance of the first-order and second-order filters is
compared in terms of noise attenuation and roll-off rate. The results show that the second-order filter
outperforms the first-order filter in terms of noise attenuation and roll-off rate.

Introduction:
Audio signal processing is a crucial aspect of various applications, including music recording and
playback, speech processing, and noise reduction. One of the most common issues in audio signal
processing is the presence of high-frequency noise, which can degrade the quality of the audio signal.
Low pass filters are widely used to remove high-frequency noise from audio signals, and they are an
essential component in many audio processing systems.
We will design and analyze first-order and second-order low pass filters for audio signal processing.
The goal is to remove high-frequency noise from an audio signal with a frequency range of 0-20 kHz
and a peak amplitude of 5 volts. The design requirements include a cutoff frequency of 15 kHz and a
gain of -3 dB at the cutoff frequency.
First-order and second-order low pass filters are two common types of filters used in audio signal
processing. First-order filters have a gradual roll-off and are suitable for applications where a gentle
filtering is required. Second-order filters have a steeper roll-off and are suitable for applications where
a more aggressive filtering is required.
This project aims to provide a comprehensive understanding of low pass filters and their applications
in audio signal processing. The project's findings can be used to improve audio quality in various
applications, such as music recording and playback, speech processing, and noise reduction.

Literature Review:
First-order RC low pass filters are simple and widely used, but they have a limited roll-off rate of -20
dB/decade. Second-order RLC low pass filters offer a higher roll-off rate of -40 dB/decade, making
them more effective in removing high-frequency noise. However, they are more complex and require
careful design to avoid resonance and distortion.

Matematical Modelling:
First-Order Low Pass Filter:
Transfer Function (Laplace Domain):
H(s) = 1 / (sRC + 1)
21EL026
Muhammad Sami

Stability:
The system is stable if all poles are in the left half of the s-plane.
Pole: s = -1/RC (left half plane, stable)
Impulse Response (Time Domain):
h(t) = (1/RC) * e^(-t/RC)
Step Response (Time Domain):
H(t) = 1 - e^(-t/RC)
Frequency Response (Frequency Domain):
H(jw) = 1 / (jwRC + 1)

Second-Order Low Pass Filter:


Transfer Function (Laplace Domain):
H(s) = 1 / (s^2LC + sRC + 1)
Stability:
The system is stable if all poles are in the left half of the s-plane.
Poles: s = (-R/2L) ± sqrt((R/2L)^2 - 1/LC) (left half plane, stable)
Impulse Response (Time Domain):
h(t) = (1/LC) * e^(-Rt/2L) * sin(sqrt(1/LC - (R/2L)^2) * t)
Step Response (Time Domain):
H(t) = 1 - (R/2L) * e^(-Rt/2L) * sin(sqrt(1/LC - (R/2L)^2) * t)
Frequency Response (Frequency Domain):
H(jw) = 1 / (jw^2LC + jwRC + 1)
21EL026
Muhammad Sami

Schematic Diagram:

Figure 1a: Frequency Response of Low-Pass Filter using RC Circuit

Figure 2a: Frequency Response of Low-Pass Filter using RLC Circuit


21EL026
Muhammad Sami

Figure 1b: Shows the Impulse Response of RC Circuit

Figure 1c: Shows the Step Response of RC Circuit


21EL026
Muhammad Sami

Figure 2b: Shows the Impulse response of RLC Circuit

Figure 2c: Shows the Step response of RLC Circuit


21EL026
Muhammad Sami

Matlab Code for 1st & 2nd Order low pass:


% First-Order Low Pass Filter
R = 1000;
C = 3.3e-6;
fc = 1 / (2*pi*R*C);
[num, den] = butter(1, fc/(100000/2));
[h, w] = freqz(num, den, 1000);
plot(w/pi, 20*log10(abs(h)));
title('Frequency Response of RC Circuit');
legend('RC Circuit');
% Plot impulse response
figure;
fplot(h2_num, [0, 2e-3]);
title('Impulse Response of First Order Low-Pass Filter');
xlabel('Time (s)');
ylabel('Amplitude');
grid on;
% Plot step response
figure;
fplot(c2_num, [0, 2e-3]);
title('Step Response of First Order Low-Pass Filter');
xlabel('Time (s)');
ylabel('Amplitude');
grid on;

% Second-Order Low Pass Filter


R = 1000;
L = 3.3e-3;
C = 3.3e-6;
fc = 1 / (2*pi*sqrt(R*L*C));
[num, den] = butter(2, fc/(100000/2));
[h, w] = freqz(num, den, 1000);
plot(w/pi, 20*log10(abs(h)));
title('Frequency Response of RLC Circuit');
legend('RLC Circuit');
% Plot impulse response
figure;
fplot(h2_num, [0, 5e-3]);
title('Impulse Response of First Order Low-Pass Filter');
xlabel('Time (s)');
ylabel('Amplitude');
grid on;
% Plot step response
figure;
fplot(c2_num, [0, 5e-3]);
title('Step Response of First Order Low-Pass Filter');
xlabel('Time (s)');
ylabel('Amplitude');
grid on;

MatLab Code For Implementation:


% Define the system parameters
R = 1000; % Resistance in ohms
C = 3.3e-6; % Capacitance in farads
L = 3.3e-3; % Inductance in henries
fc = 15000; % Cutoff frequency in Hz
21EL026
Muhammad Sami

% Define the system models


[num, den] = butter(1, fc/(100000/2)); % First-order low pass filter
[num2, den2] = butter(2, fc/(100000/2)); % Second-order low pass filter

% Plot the amplitude and phase spectrum


w = logspace(0, 5, 1000); % Frequency vector
H = freqs(num, den, w); % Frequency response of the first-order system
H2 = freqs(num2, den2, w); % Frequency response of the second-order system

% Amplitude spectrum
semilogx(w, 20*log10(abs(H))); % First-order system
hold on;
semilogx(w, 20*log10(abs(H2))); % Second-order system
% Phase spectrum
semilogx(w, angle(H)); % First-order system
hold on;
semilogx(w, angle(H2)); % Second-order system

% Legend and labels


legend('First-order', 'Second-order');
xlabel('Frequency (Hz)');
ylabel('Amplitude (dB)');
title('Amplitude Spectrum');
%figure;
legend('First-order', 'Second-order');
xlabel('Frequency (Hz)');
ylabel('Phase (rad)');
title('Phase Spectrum');

Results:

Figure 3: Shows the Phase Spectrum and Amplitude Spectrum


21EL026
Muhammad Sami

The frequency response plots show that the second-order filter has a sharper roll-off and better noise
attenuation than the first-order filter.

Conclusion:
his topic has covered the design and analysis of first-order and second-order low pass filters using
electrical circuits. We have discussed the transfer functions, frequency responses, and impulse and
step responses of the filters. We have also implemented the system models in MATLAB to obtain the
amplitude and phase spectrum, and determined the response of the system to a sinusoidal input signal
with frequencies in the pass band and stop band.
First-order low pass filters have a gradual roll-off and are suitable for applications where a gentle
filtering is required.
Second-order low pass filters have a steeper roll-off and are suitable for applications where a more
aggressive filtering is required.
The frequency response of the filters can be analyzed using the transfer function and the frequency
response plot.
The impulse and step responses of the filters can be used to determine the transient behavior of the
system.
MATLAB can be used to implement the system models and obtain the amplitude and phase spectrum.

Acknowledgement and References:


I would like to acknowledge the contributions of the following sources, which were used to research
and prepare this topic:
[1] Filter Theory" by R. W. De Doncker
[2] Signals and Systems" by A. V. Oppenheim and A. S. Willsky
[3] Electric Circuits" by J. W. Nilsson and S. A. Riedel

You might also like