270 likes | 378 Views
Engineering 43. 2 nd order Filters MATLAB BodePlt. Bruce Mayer, PE Licensed Electrical & Mechanical Engineer BMayer@ChabotCollege.edu. Signal Filters. The FOUR Basic Filter Types: Low pass filters PASS LOW frequencies and attenuate high frequencies.
E N D
Engineering 43 2nd order FiltersMATLAB BodePlt Bruce Mayer, PE Licensed Electrical & Mechanical EngineerBMayer@ChabotCollege.edu
Signal Filters • The FOUR Basic Filter Types: • Lowpass filters PASS LOW frequencies and attenuate high frequencies. • Highpass filters PASS HIGH frequencies and attenuate low frequencies. • Bandpass filters PASS A CERTAIN BAND of frequencies, and attenuate all else • Bandstop (also called bandREJECT or NOTCH) filters ATTENUATE A CERTAIN BAND of frequencies, and pass all else
IDEAL Signal Filters • Ideal Filters Characteristics: • The lowpass filter passes all frequencies below fc. • The highpass filter passes all frequencies above fc. • The bandpass filter passes all frequencies between fc1 and fc2. • The bandstop (or Notch) filter attenuates all frequencies between fc1 and fc2.
RLC LOWpass Filter • Last Time We analyzed the RLC BAND-pass Filter • ReArrange the RLC Series Ckt to Produce LOW-passBehavior
RLC LOWpass Filter • Using Frequency Domain Voltage-Divider Analysis: • As beforeuse: • With Enough Complex Algebra find:
RLC LoPass Performance Don’t Like the Humps, Take Q≈1 u = logspace(-1,3,500); % u = f/f0 H_5 = 20*log10(abs((-j*0.5*(1./u))./(1+j*0.5*(u-1./u)))); H1 = 20*log10(abs((-j*1*(1./u))./(1+j*1*(u-1./u)))); H2 = 20*log10(abs((-j*2*(1./u))./(1+j*2*(u-1./u)))); H5 = 20*log10(abs((-j*5*(1./u))./(1+j*5*(u-1./u)))); semilogx(u,H_5, u,H1, u,H2, u,H5, 'LineWidth',3), grid axis([0.1 100 -80 20]) LoPasslegend = legend('Q=0.5','Q=1','Q=2','Q=5'); xlabel('f/f_{0}') ylabel(' RLC LoPass |H(f)| (dB)‘)
RLC HIGHpass Filter • Last Time We analyzed the RLC BAND-pass Filter • ReArrange the RLC Series Ckt to Produce HIGH-passBehavior
RLC HIGHpass Filter • Using Frequency Domain Voltage-Divider Analysis: • As beforeuse: • With Enough Complex Algebra find:
RLC HiPass Performance Don’t Like the Humps, Take Q≈1 u = logspace(-1,3,500); % u = f/f0 H_5 = 20*log10(abs((j*0.5*u)./(1+j*0.5*(u-1./u)))); H1 = 20*log10(abs((j*1*u)./(1+j*1*(u-1./u)))); H2 = 20*log10(abs((j*2*u)./(1+j*2*(u-1./u)))); H5 = 20*log10(abs((j*5*u)./(1+j*5*(u-1./u)))); semilogx(u,H_5, u,H1, u,H2, u,H5, 'LineWidth',3), grid axis([0.1 100 -40 20]) LoPasslegend = legend('Q=0.5','Q=1','Q=2','Q=5'); xlabel('f/f_{0}') ylabel(' RLC LoPass |H(f)| (dB)')
RLC NOTCH (BandReject) Filter • Last Time We analyzed the RLC Band-PASS Filter • ReArrange the RLC Series Ckt to Produce BandREJECT Behavior
RLC BandReject (notch) Filter • Using Frequency Domain Voltage-Divider Analysis: • As beforeuse: • With Enough Complex Algebra find:
RLC Notch Performance u = logspace(-2,2,1500); % u = f/f0 H_5 = 20*log10(abs((j*0.5*(u-1./u))./(1+j*0.5*(u-1./u)))); H1 = 20*log10(abs((j*1*(u-1./u))./(1+j*1*(u-1./u)))); H2 = 20*log10(abs((j*2*(u-1./u))./(1+j*2*(u-1./u)))); H5 = 20*log10(abs((j*5*(u-1./u))./(1+j*5*(u-1./u)))); semilogx(u,H_5, u,H1, u,H2, u,H5, 'LineWidth',2), grid axis([0.01 100 -50 10]) LoPasslegend = legend('Q=0.5','Q=1','Q=2','Q=5'); xlabel('f/f_{0}') ylabel(' RLC Notch |H(f)| (dB)‘)
RLC bandPASS Performance u = logspace(-2,2,1500); % u = f/f0 H_5 = 20*log10(abs((j*0.5*(u-1./u))./(1+j*0.5*(u-1./u)))); H1 = 20*log10(abs((j*1*(u-1./u))./(1+j*1*(u-1./u)))); H2 = 20*log10(abs((j*2*(u-1./u))./(1+j*2*(u-1./u)))); H5 = 20*log10(abs((j*5*(u-1./u))./(1+j*5*(u-1./u)))); semilogx(u,H_5, u,H1, u,H2, u,H5, 'LineWidth',2), grid axis([0.01 100 -50 10]) LoPasslegend = legend('Q=0.5','Q=1','Q=2','Q=5'); xlabel('f/f_{0}') ylabel(' RLC Notch |H(f)| (dB)‘)
WhiteBoard Work • The RLC Notch Filter has the disadvantage of Using an INDUCTOR • L’s are Large & Heavy relative to R’s & C’s • An Alternative is the “dual-T” Notch FilterWhichEliminatestheInductor
WhiteBoard Work • For the Dual-T Notch Filter • Use Hand-Analysis to Derive the TRANSFER FUNCTION • Use MATLAB to Create the BODE PLOT for the case where R = 2kΩ & C=120nF
% Bruce Mayer, PE % ENGR43 • 17Jul11 % Lec6c_Dual_T_NotchFilter_1107.m % w = logspace(1,6,1500); % w = 2*pi*f % symsK HK = ((1+1/K)+ K*(1+K))/(2*(1+K)^2*(1+1/K)-K*(1+K)-(1+1/K)) Hsimp = simplify(HK) % C = 120e-9; R = 2000; H = (1-C^2*R^2*w.^2)./((1-C^2*R^2*w.^2) + j*4*w*C*R); Hmag = 20*log10(abs(H)); Hphi = angle(H)*180/(2*pi); semilogx(w,Hmag, 'LineWidth',3), grid axis([10 1e6 -50 10]) xlabel('\omega = 2\pif (rad/s)') ylabel('|H(f)| (dB)') title('Dual-T Notch Filter: R=2k, C=120n') % PAUSE Coming disp('showing MAG plot; hit ANY KEY to continue') pause % Plot Phase Angle semilogx(w,Hphi, 'LineWidth',3), grid axis([10 1e6 -50 50]) xlabel('\omega = 2\pif (rad/s)') ylabel('Angle H(f) (°)') title('Dual-T Notch Filter: R=2k, C=120n') MATLAB Code
All Done for Today Butterworth’sOriginal1930 Work
Engineering 43 Appendix Bruce Mayer, PE Licensed Electrical & Mechanical EngineerBMayer@ChabotCollege.edu