FREQUENCY RESPONSES

Signals and System Analysis G(s)

s =jω

Frequency response G(jω)

Frequency (strictly angular frequency) ω

Magnitude |G(jω)|

Phase ∠G(jω)

Signals and System Analysis Significance of the It indicates how much the system responds to a sinusoidal input at different frequencies

Frequency response G(jω)

Mmagnitude |G(jω)|

Phase ∠G(jω)

Signals and System Analysis There are several ways of plotting frequency responses but the two most common are:

Direct plotting |G|-ω ∠G-ω

Bode diagrams |G| - ω in log scale ∠G- ω in log scale

Nyquist (or polar) Real(G) -Imag(G)

Signals and System Analysis Any transfer function can be plotted

1. using the Control Kit in MATLAB. or

2. write a program using MATLAB codes

Signals and System Analysis The Bode diagram consists of two graphs:

1. |G(jω)| against ω on a log scale The gain in dB, that is 20log10 |G(jω)|, is plotted on a linear scale

2. ∠G(jω) against ω on a log scale

The Nyquist plot is a locus with ω as a parameter showing |G(jω)| and ∠G(jω as a curve as ω varies.

Signals and System Analysis Bode plots of the following transfer functions

K – a gain

1/sT – an integrator

1/(1+sT) – a time constant or first order system

2 2 2 ω0 /(s +2ζsω0+ω0 ) – a complex pole pair or second order system.

Signals and System Analysis K – a gain

G(s)=K G(jω)=K

G(ωj ) = K 0 ∠G( jω) = tan −1 = 0 K

Signals and System Analysis - K – a negative gain

G(s)=-K G(jω)=-K

G(ωj ) = K 0 ∠G( jω) = tan −1 =180o − K

Signals and System Analysis Plot Frequency Response for K gain 2

1.5

1 |G|

0.5

0 0 10 20 30 40 50 60 70 80 90 100

1 K=1; 0.5 omega=0:0.1:100; 0 G(1:1001)=K; phase -0.5 G_mag=abs(G); G_phase=atan(imag(G)./ -1 0 10 20 30 40 50 60 70 80 90 100 real(G)); omega subplot(2,1,1); plot(omega, G_mag); ylabel('|G|'); title('Plot Frequency Response for K gain');

subplot(2,1,2); plot(omega, G_phase); ylabel('phase');

xlabel('omega'); Signals and System Analysis Plot Frequency Response for K gain 1

0.5

0

-0.5 20*log10(|G|) (db) 20*log10(|G|) -1 -1 0 1 2 10 10 10 10

1

0.5

0 phase K=1; -0.5 omega=0:0.1:100; G(1:1001)=K; -1 -1 0 1 2 G_mag=abs(G); 10 10 10 10 G_phase=atan(imag(G)./ real(G)); omega subplot(2,1,1); semilogx(omega, 20*log10(G_mag)); ylabel('20*log10(|G|) (db)'); grid; title('Plot Frequency Response for K gain'); subplot(2,1,2); semilogx(omega, G_phase); ylabel('phase'); grid; xlabel('omega');

Signals and System Analysis 1/sT – an integrator

G(jω) = 1/jωT

|G(jω)| = 1/ωT

∠G(jω = –90º.

In dB the gain

20log10|G(jω)| = 20log10(1/ωT)

On a graph with frequency on a log scale this will be a straight line with a negative slope.

Signals and System Analysis Plot Frequency Response for integrator 10

5 |G|

0 0 10 20 30 40 50 60 70 80 90 100

2

0 omega=0.1:0.1:100; phase G=1 ./(j .*omega); -2 G_mag=abs(G); G_phase=atan(imag(G)./0 10 20 30 40 50 60 70 80 90 100 (real(G)+0.0000001)); omega subplot(2,1,1); plot(omega, G_mag); ylabel('|G|'); title('Plot Frequency Response for integrator'); subplot(2,1,2); plot(omega, G_phase); ylabel('phase'); axis([0 100 -pi pi]); xlabel('omega'); Signals and System Analysis Plot Frequency Response for integrator 20

0

-20 20*log10(|G|) (db) 20*log10(|G|) -40 -1 0 1 2 T=1; 10 10 10 10 omega=0.1:0.1:100; G=1 ./(j .*omega); 2 G_mag=abs(G); G_phase=atan(imag(G)./ 0 (real(G)+0.0000001)); subplot(2,1,1); phase semilogx(omega, -2

20*log10(G_mag)); -1 0 1 2 ylabel('20*log10(|G|) 10 10 10 10 (db)'); omega grid; title('Plot Frequency Response for integrator'); Slope is –6dB/octave subplot(2,1,2); –20dB/decade semilogx(omega, G_phase); axis([0 100 -pi pi]); ∠G(jω = –90º = -π/2 =-1.57 rad ylabel('phase'); grid; xlabel('omega');

Signals and System Analysis An octave is a frequency change of 2.

A decade is a frequency change of 10.

Geometric mean of two frequencies ωa ω and ωb is the aωb .

Signals and System Analysis 1/(1+sT) – a time constant (first order system)

G(jω) = 1/(1+jωT)

= 1 for ω small

= 1/jωT an integrator for ω large.

Signals and System Analysis Plot Frequency Response for 1st-order system 1

0.5 |G|

0 0 10 20 30 40 50 60 70 80 90 100

0

T=1; -1 omega=0.1:0.1:100; G=1 ./(1+T*j .*omega);

phase -2 G_mag=abs(G); G_phase=atan(imag(G)./ (real(G))); -3 subplot(2,1,1); 0 10 20 30 40 50 60 70 80 90 100 plot(omega, G_mag); omega ylabel('|G|'); title('Plot Frequency Response for 1st-order system'); subplot(2,1,2); plot(omega, G_phase); ylabel('phase'); axis([0 100 -pi 0]); xlabel('omega'); Signals and System Analysis Plot Frequency Response for 1st order system 0

-10

T=1; -20 omega=0.1:0.1:100; G=1 ./(1+T*j .*omega); -30 20*log10(|G|) (db) 20*log10(|G|) G_mag=abs(G); -40 -1 0 1 2 G_phase=atan(imag(G)./ 10 10 10 10 real(G)); subplot(2,1,1); 0 semilogx(omega, 20*log10(G_mag)); -1 ylabel('20*log10(|G|)

phase -2 (db)'); grid; -3 title('Plot Frequency -1 0 1 2 Response for 1st order 10 10 10 10 omega system'); subplot(2,1,2); semilogx(omega, 0dB line to ωT = 1, G_phase); axis([0 100 -pi 0]); `Integrator’ line has slope –6dB/octave ylabel('phase'); The phase shift from 0 to –90º grid; xlabel('omega'); –45º at ωT = 1.

Signals and System Analysis breakpoint

ωT 0.1 0.125 0.25 0.5 1.0 2.0 4.0 8.0 10 dB -0.05 -0.1 -0.3 -1 -3 -7 -12.3 -18.1 -20.05 Approx 0 0 0 0 0 -6 -12 -18 -20.0 dB ϕ -6° -7° -14° -26° -45° -64° -76° -83° -84°

Table for 1/(1+sT)

Signals and System Analysis In DB scale

20log10 (|G(jω)|)

• If |G(jω)|=1

20log10 (|G(jω)|) =0 (db)

• If 2 ×

20log10(2|G(jω)|) =20log10 (2) +20log10 (|G(jω)|)=6+20log10 (|G(jω)|) (db)

• If 10 ×

20log10 (10|G(jω)|) =20log10 (10) +20log10 (|G(jω)|)=20+20log10 (|G(jω)|)(db)

Signals and System Analysis 2 2 2 ω0 /(s +2ζsω0+ω0 ) – a complex pole pair or second order system.

At low frequencies s->0 the gain of this transfer function is unity (0dB).

2 2 At high frequencies G(jω)> -ω0 /ω ; this is two integrators with 0dB gain at ω = ω0.

The asymptotic approximation is therefore two straight lines, 0dB for ω < ω0 and –12dB/oct for ω > ω0.

The shape of both the gain and phase curves near to ω0 change significantly with the value of ζ.

Signals and System Analysis Plot Frequency Response for 2st-order system 6

4 |G| 2 omega0=1; 0 zeta=0.1; 0 1 2 3 4 5 6 7 8 9 10 omega=0.1:0.1:10; G=omega0^2 ./(- omega 0 .^2 +j* 2*zeta*omega0 .*omega +omega0^2); -1 G_mag=abs(G); G_phase=atan2(imag(G),

phase -2 (real(G+0.000001))); subplot(2,1,1); plot(omega, G_mag); -3 ylabel('|G|'); 0 1 2 3 4 5 6 7 8 9 10 title('Plot Frequency omega Response for 2st-order system'); subplot(2,1,2); plot(omega, G_phase); ylabel('phase'); axis([0 10 -pi 0]); xlabel('omega');

Signals and System Analysis Plot Frequency Response for 2st order system 20

0

-20 omega0=1; 20*log10(|G|) (db) 20*log10(|G|) zeta=0.1; -40 -1 0 1 omega=0.1:0.1:10; 10 10 10 G=omega0^2 ./(- omega .^2 +j* 2*zeta*omega0 .*omega 0 +omega0^2); G_mag=abs(G); -1 G_phase=atan2(imag(G), (real(G+0.000001))); subplot(2,1,1); phase -2 semilogx(omega, 20*log10(G_mag)); -3 ylabel('20*log10(|G|) -1 0 1 (db)'); 10 10 10 grid; omega title('Plot Frequency Response for 2st order system'); 0dB for ω < 1 subplot(2,1,2); semilogx(omega, G_phase); –12dB/oct for ω > 1. axis([0 10 -pi 0]); ylabel('phase'); grid; xlabel('omega');

Signals and System Analysis Plot Frequency Response for 2st order system 20 ζ=0.05, 0 ζ=0.1 -20 ζ=0.25 -40 ζ=0.707 20*log10(|G|) (db)

-60 ζ=1 -1 0 1 10 10 10

0

-1

phase -2

-3 -1 0 1 10 10 10 omega

Phase symmetrical about the –90º phase shift at ω = 1 for any ζ.

Signals and System Analysis Nyquist (or polar) plot %Nyquist and clear all;

Example: w=logspace(-1,1,500); s=j*w; g=1 ./(s.^2+0.6 .*s+1); 1 Re=real(g); G(s) = Im=imag(g); s2 + 0.6s +1 ω figure(1); plot(Re, Im,'*'); axis([-2 2 -2 2]); ω 1 grid; G( j ) = title ('Nyquist Plot'); − 2 + 0.6 jω +1 figure(2); subplot(2,1,1); semilogx(w,20*log10(abs(g))); ylabel('20log10(|G|)'); title ('Bode Plot'); grid; subplot(2,1,2); semilogx(w,atan2(Im,Re)); ylabel('Phase (rad)'); grid;

Signals and System Analysis Nyquist Plot 2

1.5

1

0.5

0

-0.5

-1

-1.5

-2 -2 -1.5 -1 -0.5 0 0.5 1 1.5 2 Bode Plot 10

0

-10

-20 20log10(|G|) -30

-40 -1 0 1 10 10 10

0

-1

-2

Phase (rad) Phase -3

-4 -1 0 1 10 10 10

Signals and System Analysis FILTERS

For many signal processing situations we need to design filters to remove or amplify specific frequency components.

Classify filters according to four basic frequency response properties:

1. Low pass 2. High pass 3. Band pass 4. Band reject

Signals and System Analysis A filter’s prpoerty can be described by the frequency response

G(ω)

Or by the loss function

H (ω) where ω 1 H ( ) = G(ω)

Signals and System Analysis A simple low-pass filter

I(s) R

Vi(s) 1 Vo(s) sC

ω

V 0 (s) 1 / sC 1 The transfer function: G (s) = ω = or G (s) = V i (s) R +ω1 / sC 1 + sT 1 1 The frequency response: G ( ) = , G ( ) = 1 + j T 1 + ω 2 T 2

|G (ω )|

ω

Signals and System Analysis There are many types of filters, including

Butterworth Filter

Chebyshev Filter

- both low-pass filters

Signals and System Analysis

ω 1 G( )= 2n 1/ 2  ω   1+    ω    1  

ω1 - cut-off frequency

Signals and System Analysis Chebyshevω Filter 1 G( )= 1/ 2  ε 2n   2 2 ω   1+ Cn    ω    1  

ω1 - cut-off frequency

Cn - Chebyshev nth order Chebyshev polynomial

Parameterε links t the pass-band ripple δ δ =1− (1+ ε 2 )−1/ 2

Signals and System Analysis |G(ω )|

δ

Signals and System Analysis