: Modify the MATLAB m-script to produce a new file with the design of an RLC band-pass filter. Provide its Bode plot. cl

Business, Finance, Economics, Accounting, Operations Management, Computer Science, Electrical Engineering, Mechanical Engineering, Civil Engineering, Chemical Engineering, Algebra, Precalculus, Statistics and Probabilty, Advanced Math, Physics, Chemistry, Biology, Nursing, Psychology, Certifications, Tests, Prep, and more.
Post Reply
answerhappygod
Site Admin
Posts: 899604
Joined: Mon Aug 02, 2021 8:13 am

: Modify the MATLAB m-script to produce a new file with the design of an RLC band-pass filter. Provide its Bode plot. cl

Post by answerhappygod »

: Modify the MATLAB m-script to produce a new file
with the design of an RLC band-pass filter. Provide its Bode
plot.
Modify The Matlab M Script To Produce A New File With The Design Of An Rlc Band Pass Filter Provide Its Bode Plot Cl 1
Modify The Matlab M Script To Produce A New File With The Design Of An Rlc Band Pass Filter Provide Its Bode Plot Cl 1 (14.5 KiB) Viewed 59 times
Modify The Matlab M Script To Produce A New File With The Design Of An Rlc Band Pass Filter Provide Its Bode Plot Cl 2
Modify The Matlab M Script To Produce A New File With The Design Of An Rlc Band Pass Filter Provide Its Bode Plot Cl 2 (12.49 KiB) Viewed 59 times
clear
close all
%
%*******Parameter Settings********
%
Fs=5000;
%Sampling Frequency
Ts=1/Fs;
%Sampling Period or Sampling Time
N=200;
%Length of each discrete signal or
vector
V=N*Ts;
%Time duration (in seconds) for each
signal
fm=600;
%Cut-off frequency
Wn=2*fm/Fs;
%Normalized frequency
M=200;
%Length of the impulse response
signal
R=100;
%Value of Resistor
C=1/(2*pi*fm*R); %Value of
Capacitor
a=1/(R*C);
%Time Constant Parameter
h0=a;
%Initial Condition Parameter
t=0:Ts:V-Ts;
%General time axis
th=0:Ts:M*Ts-Ts; %Time
axis to plot impulse response signal
f=-Fs/2:Fs/M:Fs/2-Fs/M; %Frequency axis
%
%CAUSAL FIRST-ORDER LOW-PASS RC-FILTER
%
hRC=h0*exp(-a*th); %RC-Filter impulse response
function
hmax=max(hRC); %Maximum value of
impulse response function
hRC=(hRC/hmax); %Normalized impulse
response function
fhRC=fft(hRC); %Fourier Transform
of impulse response function
sfhRC=fftshift(fhRC); %Frequency shift for two-sided
spectrum plot
asfhRC=abs(sfhRC); %Absolute value
calculation
Hmax=max(asfhRC); %Maximum value of frequency
response function
asfhRC=(asfhRC/Hmax); %Normalized frequency response
function
%
%MATLAB IDEAL FIR APPROXIMATION FILTER
%
Wn=(2*fm)/Fs; %Normalized
cut-off frequency for ideal filter
h=fir1(N-1,Wn); %Impulse response
function of ideal filter
fh=fft(h); %Fourier
transform of impulse response function
sfh=fftshift(fh); %Frequency shift for
two-sided spectrum plot
msfh=abs(sfh); %Absolute value calculation
%
%*********************************
%**********Signals Plots**********
%********************************* %
plot(f,asfhRC,f, msfh,'r') %Plots of RC & Ideal
filters
% grid
xlabel('Frequency in Hz.') %Horizontal axis
ylabel('Magnitude') %Vertical
axis
title('HL(f) and HRC(f)') %Title of plot
%
figure
plot(f,20*log10(asfhRC),f,20*log10(msfh),'r') %Plots of RC &
Ideal filters
grid
xlabel('Frequency in Hz.') %Horizontal
axis
ylabel('20*Log10 (Magnitude)') %Vertical axis
title('HL(f) and HRC(f)') %Title of plot
axis([min(f) max(f) -100 +50]);
The impulse response function of the RC-filter is denoted h(t): 1 h(t) = T{8(t)} = h,e-Btu(t); B = RC' ho = B = =
Its step response function is denoted s(t): s(t) = T{u(t)} = B(1 - e-bt)u(t) =
Join a community of subject matter experts. Register for FREE to view solutions, replies, and use search function. Request answer by replying!
Post Reply