frequency response objective - bode and nyquist plots for control analysis - determination of...

Post on 14-Dec-2015

233 Views

Category:

Documents

7 Downloads

Preview:

Click to see full reader

TRANSCRIPT

Frequency ResponseFrequency Response

OBJECTIVEOBJECTIVE- Bode and Nyquist plots for control

analysis- Determination of transfer function- Gain and Phase margins- Stability in frequency response

Magnitude and Phase AngleMagnitude and Phase Angle

Transfer function is

)(

)()(

sR

sYsG R(s)

)(sGY(s)

By replacing we can find its magnitude

)(

)(

)(

)()(

jR

jY

sR

sYsG

and its phase angle

)()()( sRsYsG

)).....(()(

)).....(()(

)(

)()(

21

21

n

m

i

o

pspsps

zszszsK

s

ssG

Higher order transfer function

Can be presented in magnitude-phase form as

)()( jGjG

js

A system with transfer function of G(s) is subjected to a sinusoidal input.Determine the time response of the system.

SolutionThe input in phasor form (magnitude-phase form) can be presented as

As the transfer function is

Hence the output is by replacing

In time domain which give the time response of the system, the output is

)(si

tati sin)(

)()(

)(sG

s

s

i

o

)j(Gaa)j(G)j(o 0

)sin()()( tjGato

)(sG )(so

0)( aji

js

ExampleExample

First orderFirst order

1)(

s

KsG

Frequency response

1

1)(

jjG

Its magnitude

221

1)(

jG

and phase angle

)(tan1

tan 11

Transfer function

by replacing js

Second orderSecond order

Transfer function

22

2

2)(

nn

n

ss

KsG

Frequency response by replacing

222

2

21

21)(

nn

nn jjG

Its magnitude

222 21

1)(

nn

jG

and phase angle

21

1

2tan

n

n

js

Higher OrderHigher Order

Cascade form)().....()()( 21 sGsGsGsG n

Frequency response by replacing

)().....()()( 21 jGjGjGjG n

Or in phasor form

)....()(....)()(

)(.....)()()(

2121

2211

nn

nn

jGjGjG

jGjGjGjG

js

Example:

Find the frequency response of the following transfer function

50336

5)(

23

ssssG

)()()( 21 sGsGsG

ExampleExample

Where

15.0

1.0

2

2.0)(1

ss

sG and 254

25)(

22

sssG

Respective magnitude and phase angle

222125.01

1.0

5.01

1.0)(

jG )5.0(tan)( 1

1 jand

2222

540251

1

n).()j(G

and

2

12

51

5)4.0(2tan)(

j

)()()(.)(

)()().()()(

2121

2211

jjjGjG

jjGjjGjG

ExampleExample

222 540251

1

n).(

Bode PlotBode Plot

Consider higher order system

)()()......()().()()( 2211 jjGjjGjjGjG nn

)(log....)(log)(log)(log 21 jGjGjGjG n

Logarithmic form

In dB.

)(log20....)(log20)(log20)(log20 21 jGjGjGjGLM n

Phase angle

)().....()()( 21 jjjj n

Bode PlotBode Plot

0

0.2

0.4

0.6

0.8

1

Magnitu

de (

dB

)

100

101

102

103

0

0.2

0.4

0.6

0.8

1

Phase (

deg)

Bode Diagram

Frequency (rad/sec)

Bode Plot for constant gainBode Plot for constant gain

KsG )(Log magnitude in dB

KLM log20

Its phase angle

0

>> bode([200],[1]);grid

Let K=200

Bode Plot for constant gainBode Plot for constant gain

45

45.5

46

46.5

47

47.5

Magnitu

de (

dB

)

100

101

102

103

104

-1

-0.5

0

0.5

1

Phase (

deg)

Bode Plot G(s)=200

Frequency (rad/sec)

Bode Plot of pole on the originBode Plot of pole on the origin

ssG 1)(

)(1)( jjsG Log magnitude in dB

)log(201log20 LM

)rad.s( 1 dB)(LM

1 0

10 -20

102 -40

103 -60

)rad.s( 1 dB)(LM

01

10-1 20

10-2 40

10-3 60

1 0

2 -6

22 -12

23 -18

)rad.s( 1 dB)(LM

Slope of –20dB/decade or –6dB/octave.

Its phase angle

90)(tan0tan 11 >>bode([1],[1 0]);grid

Bode Plot of pole on the originBode Plot of pole on the origin

Bode Plot of pole on the originBode Plot of pole on the origin

-50

-40

-30

-20

-10

0

10

Magnitu

de (

dB

)

100

101

102

103

-91

-90.5

-90

-89.5

-89

Phase (

deg)

Bode Plot G(s)=1/s

Frequency (rad/sec)

Bode Plot for Real PoleBode Plot for Real Pole

1

1)(

ssG

Frequency response

221

1

1

1

1

1)(

j

j

j

jjG

Logarithmic magnitude in dB

22

221log20

1

1log20

LM

Phase angle

)(tan1tan 11

For low frequency, 1

01log20 LM

and 0

log20LM

1For high frequency,

and90)(tan 1

1.0Can also be defined as a tenth of the corner frequency i.e.

The corner frequency is 1c

Can also be defined as a tenth of the corner frequency i.e. 10

Bode Plot for Real PoleBode Plot for Real Pole

A straight line approximation for a first order system of transfer functionA straight line approximation for a first order system of transfer function

1

1)(

ssG

Bode Plot for Real PoleBode Plot for Real Pole

The actual Bode plot can be obtained by using the exact equation for the log magnitude and phase angle. There are small differences between the actual and approximate as shown by the following table

Using MATLAB we can display the Bode plot of an open-loop transfer function of

And the MATLAB command used is given by

1

1)(

ssG

» nr=[1];» dr=[1 1];» sys=tf(nr,dr)» bode(sys)

Bode Plot for Real PoleBode Plot for Real Pole

Actual and approximate value of log magnitude for an open-loop Actual and approximate value of log magnitude for an open-loop transfer function of transfer function of

for a frequency range between 0.1-20 rad/sfor a frequency range between 0.1-20 rad/s

1

1)(

ssG

Bode Plot for Real PoleBode Plot for Real Pole

Actual and approximate value of phase angle for an open-loop transfer Actual and approximate value of phase angle for an open-loop transfer function of function of

for a frequency range between 0.1-20 rad/sfor a frequency range between 0.1-20 rad/s1

1)(

ssG

Bode Plot for Real PoleBode Plot for Real Pole

dBLM 32log2011

1log20

4511tan 1

Bode Plot for Real PoleBode Plot for Real Pole

Bode Plot for Complex polesBode Plot for Complex poles

22

2

2)(

nn

n

ss

KsG

222 21log20)(log20 nnjGLM

2

1

1

2tan

n

n

For low frequency ,

10n

1n 01log20 LM

and 0)10(tan 1

For high frequency 1n

nnLM log40log20 2

180tan2

1

and

Is the corner frequency

We define the low frequency as a tenth of the corner frequency i.e.

n

While the high frequency as ten time of the corner frequency i.e. n10

Bode Plot for Complex polesBode Plot for Complex poles

Based on straight line approximation the Bode plots for LM and phase angle Based on straight line approximation the Bode plots for LM and phase angle are shownare shown

Bode Plot for Complex polesBode Plot for Complex poles

We can observe the Bode plots in MATLAB by considering

In MATLAB

>>zeta=0.25;wn=1;num=[1];den1=[1 2*zeta*wn wn*wn];

sys1=tf(num,den1); >>zeta=0.5;wn=1;num=[1];den2=[1 2*zeta*wn wn*wn];

sys2=tf(num,den2);

>>zeta=0.75;wn=1;num=[1];den3=[1 2*zeta*wn*wn*wn];sys3=tf(num,den3); >> bode(sys1,sys2,sys3);grid

22 2

1)(

nnsssG

1n 75.0and5.0,25.0for and

Bode Plot for Complex polesBode Plot for Complex poles

Bode Plot for Complex polesBode Plot for Complex poles

Obtain the bode plot of the following block diagram if )200)(10(

)4(5000)(

sss

ssGo

)(sGo+

_

ExampleExample

5000 1/s s+4 10

1

s 200

1

s

1200

1.

110

1.1

4.

1.10

1200

1.

110

1.1

4.

1.

20010

45000)(

jj

j

j

jj

j

jjGo

By replacing with s=j and making the open-loop transform function into corner frequency form

ExampleExample

dBLM 401.0

110log20)1.0(

90)1.0(

The initial LM and phase at start frequency is given by

ExampleExample

For the magnitude plot of the Bode plot, we build a table to show the For the magnitude plot of the Bode plot, we build a table to show the contribution of gradient/slope by the zero and poles at respective corner contribution of gradient/slope by the zero and poles at respective corner frequencies. The pole at origin will provide a slope of -20db/decade for all frequencies. The pole at origin will provide a slope of -20db/decade for all range of frequencyrange of frequency

ExampleExample

- For the phase plot, we need to know the change of gradient of the phase at low and - For the phase plot, we need to know the change of gradient of the phase at low and high frequencies of respective corner frequencyhigh frequencies of respective corner frequency- The pole at the origin does not contribute to gradient of the phase angle as its phase - The pole at the origin does not contribute to gradient of the phase angle as its phase angle is a constant 90angle is a constant 90oo

ExampleExample

The LM vs. freq. plot can be determined the LM value at the corner frequency, this can be obtained by simple trigonometry

2log1log

LM (dB/dec)1LM

2LM

LM

LMLM

12

12

loglog

1212 loglog LMLMLM

Using the trigonometry’s formula, we tabulate the values at the initial, corner frequencies and final value.

ExampleExample

dB.loglogLM 810420402 Eg:

As for the LM slope, we apply a trigonometry's formula to obtain the

phase angle slope at the low and high frequency for each cornerfrequency as in table below

2log1log

1

2

(deg/decade)

12

12

loglog 1212 loglog

ExampleExample

Eg: 9010400902 .log.log

Bode plot for the magnitude and phase using straight line approximationsBode plot for the magnitude and phase using straight line approximations

ExampleExample

We can obtain the actual Bode plot using MATLAB as We can obtain the actual Bode plot using MATLAB as >>bode([5000 20000],[1 210 2000 0],{10^-1,10^4});>>bode([5000 20000],[1 210 2000 0],{10^-1,10^4});

ExampleExample

-100

-50

0

50

Magnitude (

dB

)

10-1

100

101

102

103

104

-180

-135

-90

-45

Phase (

deg)

Bode Diagram

Frequency (rad/sec)

Determination of transfer functionDetermination of transfer function

Constant gain

Example:

If 36yK dB, determine the transfer function.

dB

yK

(rad.s-1)

yKK log20

36yK dB

1.6320

36antilog

K

Pole/zero at originPole/zero at origin

Example:101 10yK 40 LMIf rad.s-1, dB and slope of dB/decade.

dB

yK

1

(rad.s-1)

40 LM dB/decade

2s

K

yKK

log

21

20

101 10yKWe know rad.s-1, dB

6.3120

10antilog102

K

Real pole/zeroReal pole/zero

Example:

dB

45 201 LM dB/decade

402 LM dB/decade

203 LM dB/decade

(rad.s-1) 250 40 0.01

140

1250

jj

jK

4501.0

log20)01.0(

KLM

78.120

45antilog10 2

K

)s(s

)s(.s

s

s.

40

250280

140

1250

781

ExampleExample

Pair of complex polesPair of complex poles

Example:

Assume damping ratio of 0.5.

dB

60

0.1 50 400

602 LM dB/decade

(rad.s-1)

401 LM dB/decade

5025011400

2 j

j

K

2" nKK

60)"log(20)1.0( KLM

100020

60antilog"

K

4.050

10002K

250050)400(

160

50)5.0)(50(2)400(

4004.0)(

2

22

sss

ssssG

ExampleExample

Nyquist PlotNyquist Plot

)j(G )( j

0and phase angleNyquist plot is a plot of magnitude, for frequency

on s-plane.

(rad.s-1) 0

)( jG

)j(

)0( jG

)0( j

1)( 1jG

)( 1j

)( jG

)( j

However we can obtain the sketch of the plot by obtaining the following vectors:

(i) at

0

(ii) at

(iii) 180or0 , crossing on the real axisat, crossing on the imaginary axis

(iv) 90at

First orderFirst order

1)(

s

KsG

Frequency response

221

1

1)(

j

Kj

KjG

Magnitude

221)(

KjG and

Phase angle

)(tan 1

(i) At, 0 KK

jG

01

)( ,, and 0)0(tan 1

0)( jG(ii) At , dan

11 tan1

tan 90tan 1 . i.e. or 270

90(iii) No crossing in the real axis as ,

90(iv) No crossing in the imaginary axis as ,

KjG 222)(

is a circle.

First orderFirst order

Example:

Nyquist plot of

125.0

5)(

ssG

4

20)(

ssG

Frequency response

20625.01

5)(

jG and )25.0(tan 1

At 0 501

5)0(

jG 0)0(tan 1 and

At

,

01

5)(

jG

11 tan1

tan 90and

,

.

>> nyquist([5],[.25 1])

First orderFirst order

Plot Nyquist G(s)=5/(0.25s+1)

Paksi Hakiki

Paks

i Khayali

-1 0 1 2 3 4 5 6

-2.5

-2

-1.5

-1

-0.5

0

0.5

1

1.5

2

2.5

System: sys Real: 0.917 Imag: 1.93 Freq (rad/sec): -8.46

System: sys Real: 5 Imag: 0

Freq (rad/sec): 0

System: sys Real: 0.000335 Imag: -0.0409 Freq (rad/sec): 489

System: sys Real: 1.24 Imag: -2.16 Freq (rad/sec): 6.98

System: sys Real: 4.52

Imag: -1.47 Freq (rad/sec): 1.3

System: sys Real: 3.64 Imag: 2.22 Freq (rad/sec): -2.45

First orderFirst order

-1 -0.8 -0.6 -0.4 -0.2 0 0.2 0.4 0.6 0.8 1-1

-0.8

-0.6

-0.4

-0.2

0

0.2

0.4

0.6

0.8

1Nyquist Diagram

Real Axis

Imag

inar

y A

xis

)()(1 jHjG

Second OrderSecond Order

Second OrderSecond Order

22

2

2)(

nn

n

ssKsG

Frequency response

nn jjG

21

1)(

2

Rearrange

222

2

21

21

nn

nn

j

)j(G

Magnitude

222

21

1)(

nn

jG

Phase angle

2

1

1

2

tan

n

n

and (i) at 0 1)( jG, 0

0)( jG 1801

tan2

1

(ii) At , and .

(iii) No crossing on the real axis.

01

2

n

n (iv) Crossing of the imaginary axis when , .

2

1)( njG 9002tan 1 and

Second OrderSecond Order

Example:

)1)(12(

1)(

2

ssssG

Frequency response

2322

32

322

)23()31(

)23()31(

)23()31(

1

)1)(12(

1)(

j

jjjjG

Magnitude

2322 )23()31(

1)(

jG

Phase angle

2

31

31

23tan

Second OrderSecond Order

(i) At , 0and1)0( jG

0)( jG 2701

tan2

31

(ii) At , and

0

(iii) Real axis crossing at 023 3 ,, 0 2.123 2.1and rad.s-1 or

Magnitude

3.00)2.131(

1)2.1(

22

jG

(iv) Imaginary crossing at 031 2 31 =0.6 rad.s-1 ,

Magnitude 7.0)3323(0

1)6.0(

2

jG

»dr1=[2 1]; » dr2=[1 1 1];

» dr=conv(dr1,dr2);» nr=1;

» nyquist(nr,dr)

Second OrderSecond Order

,

Plot Nyquist G(s)=1/(2s+1)(s2+s+1)

Paksi Hakiki

Paksi K

hayali

-1 -0.8 -0.6 -0.4 -0.2 0 0.2 0.4 0.6 0.8 1-0.8

-0.6

-0.4

-0.2

0

0.2

0.4

0.6

0.8

System: sys Real: -0.00357 Imag: -0.74 Freq (rad/sec): 0.579

System: sys Real: -0.297 Imag: 0.0104 Freq (rad/sec): -1.21

System: sys Real: 0.999

Imag: 0.00365 Freq (rad/sec): -0.00126

Second OrderSecond Order

Nyquist PathNyquist Path

For Nyquist path

j

r

s-plane

Contour of )()(1 sHsG which will give the closed loop poles for till by replacing

js to become )()(1 jHjG

j

)j(H)j(G 1

F(j)-plane

However

)(1)()(11)()( jFjHjGjHjG

Hence on F(j)-plane, we represent GH(j)-plane to plot )()(1 jHjG

)()( jHjG

j

-1+j0

)()(1 jHjG

.

Nyquist PathNyquist Path

GH(j)-plane

Nyquist Stability CriterionNyquist Stability Criterion

The criteria states that the number of closed poles of a system is equal to the number of open-loop, G(s)H(s), zeros plus the number of encirclements in the clockwise direction by the Nyquist plot of the open-loop, G(s)H(s). Or, it can be represented in mathematic form as PNZ

where

Z = Number of zeros )(sF on the right-half plane of j-axis, where .

N = Number of clockwise encirclement of 01 jP = Number of open-loop poles )()( sHsG on the right-half plane of j-axis.

)()(1)( sHsGsF

• Consider , applying the Nyquist stability criteria Z=N+P=1+0=1

Hence the system has 1 closed-loop pole on the right of the imaginary axis

2)1(

)2()()(

s

sKsHsG

ExampleExample

s^2 + 10 s + 24 --------------- s^2 - 8 s + 15

ExampleExample

•The first thing we need to do is find the number of positive real poles in our open-loop transfer function, P:

•>>roots([1 -8 15]) ans = 5

3 •The second thing we need to do is find the number of positive real zeros in our open-loop transfer function, Z:

•>>roots([1 10 24])ans =-6.0000-4.0000

•Z=N+P•N=Z-P=0-2=-2•The poles of the open-loop transfer function are both positive. Therefore, we need two anti-clockwise (N = -2) encirclements of the Nyquist diagram in order to have a stable closed-loop system (Z = P + N).

•If the number of encirclements is less than two or the encirclements are not anti-clockwise, our system will be unstable.

•Let's look at our Nyquist diagram for a gain of 1: •nyquist([ 1 10 24], [ 1 -8 15])

ExampleExampleNyquist Diagram

Real Axis

Imag

inar

y A

xis

-1.5 -1 -0.5 0 0.5 1 1.5 2-1.5

-1

-0.5

0

0.5

1

1.5

Stability analysis

There is no encirclement of the -1+j0 point. This implies that the system is stable if there are no poles of G(s)H(s) in the right-half s plane; otherwise, the system is unstable.

There are one or more counterclockwise encirclements of the -1+j0 point. In this case the system is stable if the number of counterclockwise encirclements is the same as the number of poles of G(s)H(s) in the right-half s plane; otherwise, the system is unstable.

There are one or more clockwise encirclements of the -1+j0 point. In this case the system is unstable.

Nyquist Stability CriterionNyquist Stability Criterion

Is the reciprocal of the magnitude at the frequency at which the phase angle is -1800.)j(G

Phase crossover frequency, pFrequency where the phase angle of )()( jHjG is –180 o

Gain crossover frequency, gFrequency where the magnitude of )()( jHjG

180)(1

jGGM

Gain margin,)(

1

)(

1

180 pjGjGGM

)(log20)(log20)(180 pjGjGdBGM

Gain margin in Nyquist Plot

1)( gjG

GH(j)-planej

)( pjG

-1+j0

1/GM p

g

Gain margin,

Phase margin in Nyquist PlotPhase margin in Nyquist Plot

1)( gjG

j

-1+j0

GH(j)-plane

Unit circle

1)( gjG will give phase angle of )( gjG hence the phase margin

Phase margin, 180

Negative gain and phase margins Negative gain and phase margins in Nyquist Plotin Nyquist Plot

1)( pjG negativejGdBGM p )(log20)(

180

-1+j0

j GH(j)-plane

As , the gain margin

As , the phase margin negative 180

)( pjG

For

Example:

8K , shows the Nyquist plot and its respective gain and phase margin

74

52 ss

K

3

1

s

+

-

Open loop transfer function

)74)(3(

5)(

2

sss

KsGOL

Frequency response

)19()721(

5

)47)(3(

5)(

222

j

K

jj

KjG

ExampleExample

Magnitude

22222 )19()721(

5)(

KjG

Phase angle

)721(

)19(tan

2

21

(i) At, 0

9.121

)8(5)0( jG and 0

21

0tan)0( 1

j

(ii) At,

0)8(5

)(

jG and 90270tan)(2

31

j

ExampleExample

Real crossing, when .(iii) 0)19( 2

then 1.19 srad 36.00)19721(

)8(5)19(

2

jG

Imaginary crossing, when (iv) 0721 2

1.3 srad

then 44.1)319(30

)8(5)3(

2

jG

» nr=40;» dr1=[ 1 3];» dr2=[1 4 7];» dr=conv(dr1,dr2);» nyquist(nr,dr)

ExampleExample

ExampleExample

Nyquist Diagram

Real Axis

Imag

inar

y Ax

is

-1 -0.5 0 0.5 1 1.5 2-2

-1.5

-1

-0.5

0

0.5

1

1.5

2

180)(1

jGGM

36.0)19()(180

jGjG

dB87.8)36.0log(20

)(log20180

jGGM

ExampleExample

At =2.54 1)( gjG

8352.

Positive gain and Phase margins Positive gain and Phase margins in Bode plotin Bode plot

g

LM (dB)

(rad.s-1)g p0

GMpLM

0o

PM g

-180o

GM – gain marginPM – phase margin

p- Gain crossover frequency

- Phase crossover frequency

Negative gain and Phase margins in Bode plotNegative gain and Phase margins in Bode plot

LM (dB)

GM g (rad.s-1)

p

PM

0

-180 o

0o

Note that, negative gain or phase margin means that the system is not stable

Example:

If 1)( sGc and K=96 determine gain and phase crossover frequencies. Consequently what is the system gain and phase margin.

cG )40)(2( sss

K+

-

ExampleExample

Frequency response

140

12

)(

2.1

140

12

)(402

96)(

jjj

jjj

jG

140

12

)(

2.1log20)(

22

jLM

)025.0(tan)5.0(tan90)( 11 j

dB22)1.0(

2.1log20)1.0(

jLM and 90)1.0( j

ExampleExample

s

1

2

1

s

40

1

s

kutub orijin

kutub hakiki

kutub hakiki

(rad.s-1) 0.1 2 40

(dB/dekad)

-20 -20 -20

(dB/dekad)

0 -20 -20

(dB/dekad)

0 0 -20

Total slope dB/decade

-20 -40 -60

Table of LM slope for the 3 poles

ExampleExample

2

1

s

40

1

s

kutub hakiki

kutub hakiki

(rad.s-1) 0.1 0.2 4 20 400

kecerunan (darjah/dekad)

0 -45 -45 0 0

kecerunan (darjah/dekad)

0 0 -45 -45 0

jumlah kecerunan(darjah/dekad)

0 -45 -90 -45 0

Table for phase angle slope from the two poles, notes that the pole at origin does not contribute to the slope as the angle is constant -90o

ExampleExample

(rad.s-1) 0.1 2 40 400 1000

Total slope(dB/dec)

-20 -40 -60 -60 -60

LM (dB) 22 -4 -56 -116 -140

To obtain the LM vs freq. plot, we determine the LM value at the corner frequency, this can be obtained by simple trignometry

2log1log

LM (dB/dekad)1LM

2LM

LM

LMLM

12

12

loglog

1212 loglog LMLMLM

Using the trignometry’s formula,

ExampleExample

As for the LM slope, we apply a trignometry’s formula to obtain the

phase angle slope at the low and high frequency for each cornerfrequency as in table below

(rad.s-1) 0.1 0.2 4 20 400 1000

Total slope(deg/dec)

0 -45 -90 -45 0 0

(deg) -90 -90 -149 -212 -271 -271

2log1log

1

2

(deg/decade)

12

12

loglog 1212 loglog

ExampleExample

10-1

100

101

102

103

-150

-100

-50

0

50

10-1

100

101

102

103

-300

-250

-200

-150

-100

-50

PM

GM

wg

wp

ExampleExample

1rad.s5.8 p1rad.s3.1 g

50PM

dB30GM

>> bode([96],[1 42 80 0])

ExampleExample

-150

-100

-50

0

50

10-1

100

101

102

103

-270

-225

-180

-135

-90

PM

GM

Wg Wp

>>[GM,PM,Wg,Wp] = margin(sys)

ExampleExample

>> num=[96];den=[1 42 80 0];>> sys=tf(num,den);>> [GM,PM,Wg,Wp] = margin(sys)Gm = 35.0000Pm = 60.5601Wg = 8.9443Wp = 1.0599

>> Gm_dB = 20*log10(Gm)Gm_dB = 30.8814

ExampleExample

top related