Lecture 6 FREQUENCY RESPONSE OF SIMPLE CIRCUITS Ray DeCarlo School of ECE Purdue University West Lafayette, IN 47907-285 decarlo@ecn.purdue.edu
EE-202, Frequency Response p 2 R. A. DeCarlo I. WHAT IS FREQUENCY RESPONSE?. Recall Sinusoidal Steady State Analysis K cos(ωt +θ) Stable Circuit with TF H(s) s= jω M(ω )cos( ωt +ϕ(ω )) (a) M (ω ) = K H ( jω ) -- ω -dependent magnitude (b) ϕ(ω ) = H ( jω ) + θ -- ω -dependent phase-shift
EE-202, Frequency Response p 3 R. A. DeCarlo 2. DEFINITION frequency response: H ( jω ) = H (s)] s= jω, i.e., H (s) evaluated along the imaginary axis of complex plane. NOTE: H ( jω ) is an ω -dependent complex number: H ( jω ) H ( jω ) H ( jω ) (a) H ( jω ) is phase response, (b) H ( jω ) is magnitude response/gain.
EE-202, Frequency Response p 4 R. A. DeCarlo EXAMPLE. Plot the Phase and Magnitude of H (s) = s +0 s + 400. s = jω j0 j j0 j400 H( jω ) 0+0 0+ 400 + 0 j + 400 j j0+0 j0+ 400 j400+0 j400+ 400 H ( jω ) 0.025 H ( jω ) 0 0 0 2 0 2 + 400 2 = 2 400 0 + j0 400 + j0 = 45 o 0 = 45 o 400 400 2 = 2 0 + j400 400 + j400 = 90 o 45 o = 45 o
EE-202, Frequency Response p 5 R. A. DeCarlo 80 70 60 Phase in degrees 50 40 30 45 degrees 20 0 0 0 0 0 0 2 0 3 w in rad/sec What are the important angles?
EE-202, Frequency Response p 6 R. A. DeCarlo 0.9 0.8 0.7 0.707 0.6 Magnitude 0.5 0.4 0.3 0.2 0. 0 0 0 0 0 2 0 3 w in rad/s What are the important magnitudes besides 0.707? What does the frequency response magnitude do to low and high frequency sinusoids?
EE-202, Frequency Response p 7 R. A. DeCarlo EXAMPLE 2. Band pass (BP) transfer functions: pass frequencies in a (narrow) frequency band (passband) and significantly reject/attenuate frequencies outside the passband. (i) 2 nd order BP transfer function (blue curve): H (s) = 0.25s s 2 + 0.25s + = 0.25s (s + 0.25) 2 + (0.992) 2 (ii) 4 th order BP transfer function (green curve): H 2 (s) = 0.0625s 2 s 4 + 0.35355s 3 + 2.0625s 2 + 0.35355s + = 0.0625s (s + 0.0962) 2 + (.0884) 2 0.0625s (s + 0.08058) 2 + (0.964) 2 Question: What are the magnitudes at s = jω = 0 and s = jω =? ANSWER: (a) H (0) = H ( j ) = 0 (magnitude is zero at dc and infinity) (b) H 2 (0) = H 2 ( j ) = 0
EE-202, Frequency Response p 8 R. A. DeCarlo 0.9 0.8 0.7 Magnitude response 0.6 0.5 0.4 0.3 4th Order BP 0.2 2nd Order BP 0. 0 0.2 0.4 0.6 0.8.2.4.6.8 2 Frequency r/s What are the differences/similarties between the 2 nd and 4 th order BP magnitude responses?
EE-202, Frequency Response p 9 R. A. DeCarlo (iii) Plot H ( jω ) using the following MATLAB code: n = 0.25*[ 0]; % numerator coefficients H d = [ 0.25 ]; % denom coefficients H2 n2 = 0.0625*[ 0 0]; % numerator coefficients H2 d2 = [ 3.5355e-0 2.0625 3.5355e-0 ]; w=0.2:0.005:2; % Frequency range h = freqs(n,d,w); % Freq response calculation h2 = freqs(n2,d2,w); plot(w,abs(h),w,abs(h2)) grid xlabel('frequency r/s') ylabel('magnitude response') gtext('2nd Order BP') gtext('4th Order BP')
EE-202, Frequency Response p 0 R. A. DeCarlo (c) The Idea of Frequency Scaling: s H old (s old ) = H old s new K f = H new (s new ) s K f : Remark: We generally drop the new and old notation in practice: H(s) H s = H new (s). K f Kf = 000; % Frequency Scale Factor n = 0.25*[/Kf 0]; % s! s/kf in num coefficients of H d = [/Kf^2 0.25/Kf ]; % s! s/kf in denom coefficients of H n2 = 0.0625*[/Kf^2 0 0]; % s! s/kf in num coefficients of H2 d2 = [/Kf^4 3.5355e-0/Kf^3 2.0625/Kf^2 3.5355e-0/Kf ]; w=0.2*kf::2*kf; % Freq range is scaled up proportionately h = freqs(n,d,w); h2 = freqs(n2,d2,w); plot(w,abs(h),w,abs(h2)) grid xlabel('frequency r/s') ylabel('magnitude response') gtext('2nd Order BP') gtext('4th Order BP')
EE-202, Frequency Response p R. A. DeCarlo 0.9 0.8 0.7 Magnitude response 0.6 0.5 0.4 0.3 2nd Order BP 0.2 0. 4th Order BP 0 200 400 600 800 000 200 400 600 800 2000 Frequency r/s
EE-202, Frequency Response p 2 R. A. DeCarlo EXAMPLE 3. Magnitude response H ( jω ) of three (so called) normalized low pass (LP) Butterworth filter transfer functions: (a) First Order Normalized LP Butterworth H (s) = s + (b) 2 nd Order Normalized Butterworth (how many zeros) H (s) = LC s 2 + R s L s + LC = s 2 + 2 s +
EE-202, Frequency Response p 3 R. A. DeCarlo (c) 3 rd Order Normalized Butterworth (how many zeros) H (s) = s 3 + 2s 2 + 2s + (d) MATLAB Code for frequency response calculation given H(s):»w = logspace(-2,2,800);»n = ; d = [ ];»n2 = ; d2 = [ sqrt(2) ];»n3 = ; d3 = [ 2 2 ];»h = freqs(n,d,w);»h2 = freqs(n2,d2,w);»h3 = freqs(n3,d3,w);»semilogx(w,abs(h),w,abs(h2),w,abs(h3))»grid»xlabel('normalized rad frequency')»ylabel('magnitude Response')
EE-202, Frequency Response p 4 R. A. DeCarlo (e) Magnitude Response Plots (Note transitions of gain from to near 0) 0.9 0.8 0.7 Magnitude Response 0.6 0.5 0.4 0.3 TextEnd 0.2 0. 0 0-2 0-0 0 0 0 2 Normalized rad frequency
EE-202, Frequency Response p 5 R. A. DeCarlo (f) Pole-Zero Plot of 2 nd and 3 rd Order (Normalized) Butterworth Filters Notes: How many infinite zeros? Poles lie on the unit circle in left half complex plane. Are such filters stable??
EE-202, Frequency Response p 6 R. A. DeCarlo EXAMPLE 4. Plot of H ( jω ) of three low pass Butterworth transfer functions frequency scaled by K f = 000 : H new (s) = H old s K f = s 000 + H new (s) = H old s K f = 2 s 000 + 2 s 000 + H new (s) = H old s K f = 3 s s 000 + 2 000 2 s + 2 000 +
EE-202, Frequency Response p 7 R. A. DeCarlo Note: Same Plots as before with cut-off frequency at 000. 0.9 0.8 0.7 Magnitude Response 0.6 0.5 0.4 TextEnd 0.3 0.2 0. 0 0 0 0 0 2 0 3 0 4 0 5 Normalized rad frequency
EE-202, Frequency Response p 8 R. A. DeCarlo EXAMPLE 5. Frequency response of the (High Pass-HP) RC circuit; Capacitor has high impedance for low frequencies and low impedance for high frequencies. (a) Transfer function: H (s) = s s + C = s s +00 (i) One pole at s = 00; one zero at s = 0. by V-division. (b) s = jω, H ( jω ) = R R + jωc = jωcr jωcr + = ω j 00 j ω 00 +
EE-202, Frequency Response p 9 R. A. DeCarlo STEP 2. ASYMPTOTIC BEHAVIOR: IMPORTANT FREQUENCIES ARE: 0,, AND???? ω H ( jω ) = R R + jωc H ( jω ) 0 ω 0 H ( jω ) = jωcr jωcr + 0 H ( jω ) 90o ω 00 H ( jω ) = j ω 00 j ω 00 + 2 H ( jω ) 45 o
EE-202, Frequency Response p 20 R. A. DeCarlo STEP 3. PLOTS FROM MATLAB: w = logspace(0,4,500); H = freqs([ 0],[ 00],w); semilogx(w,abs(h)) grid xlabel('frequency in rad/sec') ylabel('magnitude') MAGNITUDE 0.9 0.8 0.7 High Pass Response 0.6 Magnitude 0.5 0.4 0.3 0.2 0. 0 0 0 0 0 2 0 3 0 4 Frequency in rad/sec
EE-202, Frequency Response p 2 R. A. DeCarlo semilogx(w,80*angle(h)/pi) grid xlabel('frequency rad/sec') ylabel('angle in degrees') 90 PHASE 80 70 60 Angle in degrees 50 40 30 20 0 0 0 0 0 0 2 0 3 0 4 Frequency rad/sec
EE-202, Frequency Response p 22 R. A. DeCarlo EXAMPLE 6. Frequency response of the (Band Pass-BP) RLC circuit STEP : CALCULATION OF TRANSFER FUNCTION: By V-division, H(s) = V out (s) V in (s) = R R + Ls + Cs = R L s s 2 + R L s + LC NOTE: a finite zero at s = 0 and one infinite zero; two finite poles at s = 50 ± j86.6
EE-202, Frequency Response p 23 R. A. DeCarlo STEP 2: IMPORTANT FREQUENCIES AND ASYMPTOTIC BEHAVIOR ω (rad/sec) H ( jω ) = j ω L LC ω 2 + j ω L = j0ω 0 4 ω 2 + j0ω ω 0 ω ω 00???? H ( jω ) H ( jω ) 0 90 o H ( jω ) H ( jω ) 0 0 o H ( jω ) H ( jω ) 0 o H ( jω ) H ( jω ) 2 45o H ( jω ) H ( jω ) 2 45o Hint: for what values of ω are the magnitudes of the real and imaginary parts of the denominator equal?
EE-202, Frequency Response p 24 R. A. DeCarlo STEP 4. PLOTS FROM MATLAB: w = logspace(0,4,000); R = 0; L = 0.; C = e-3; n = [R/L 0]; d = [ R/L /(L*C)]; h = freqs(n,d,w); semilogx(w,abs(h)) grid xlabel('frequency in rad/s') ylabel('magnitude Response') 0.9 0.8 0.7 Magnitude Response 0.6 0.5 0.4 0.3 0.2 0. 0 0 0 0 0 2 0 3 0 4 Frequency in rad/s NOTE: a finite zero at s = 0 and one infinite zero; two finite poles at s = 50 ± j86.6
EE-202, Frequency Response p 25 R. A. DeCarlo semilogx(w,angle(h)*80/pi) grid xlabel('frequency in rad/s') ylabel('phase Response') 00 80 60 40 Phase Response 20 0 20 40 60 80 00 0 0 0 0 2 0 3 0 4 Frequency in rad/s
EE-202, Frequency Response p 26 R. A. DeCarlo EXAMPLE 7. Frequency response of the (Band Reject-BR) RLC circuit: Passes most frequencies with little or no attenuation and rejects a small band of frequencies. STEP : CALCULATION OF TRANSFER FUNCTION: By V-division, H (s) = R + R Cs + Ls = s 2 + LC s 2 + RC s + LC When is numerator magnitude zero? H ( jω ) = LC ω 2 LC ω 2 + j ω RC. Zeros at ± j LC = ± j00.
EE-202, Frequency Response p 27 R. A. DeCarlo Step 2. Some analysis (fill in the missing information) ω (rad/sec) ω 0 ω ω 00 H ( jω ) = LC ω 2 LC ω 2 + j ω RC H ( jω ) H ( jω ) H ( jω ) H ( jω ) H ( jω ) H ( jω )?? H ( jω ) H ( jω )?? H ( jω ) H ( jω )
EE-202, Frequency Response p 28 R. A. DeCarlo STEP 3. PLOTS FROM MATLAB: Band Reject Response 0.8 Magnitude 0.6 0.4 0.2 0 0 0 2 Frequency in rad/sec 0 3 Close-up Band Reject Response 0.9 0.8 0.7 Magnitude 0.6 0.5 0.4 0.3 0.2 0. 0 85 90 95 00 05 0 5 Frequency in rad/sec
EE-202, Frequency Response p 29 R. A. DeCarlo And the Phase 00 Band Reject Response 50 Phase in degrees 0-50 -00 0 0 2 Frequency in rad/sec 0 3