Вы находитесь на странице: 1из 9

LINEAR CONTROL SYSTEM 2016-EE-113

LAB#11
Objective: Generate a matlab code to study the stability of the given transfer function of control system by
implementing the root locus and bode plot commands.
Task1: Find the roots of numerator and denominator of the following given transfer functions using root
command.
G(S)=1/S^3
G(S)=1/S^2+3S
G(S)=0.005/S^2+0.1S
G(S)=S+1/S^3+4^2+6S+4
G(S)=S+2/S^2+0.1S
A) Coding
n=[1]
d=[1 0 0 0]
r=roots(n)
y=roots(d)
Result
r = 0×1 empty double column vector
y= 0
0
0
b)Coding:
n=[1]
d=[1 3 0]
r=roots(n)
y=roots(d)
Result
R= 0×1 empty double column vector
y= 0
-3
c)Coding
n=[0.005]
d=[1 0.1 0]
r=roots(n)
y=roots(d)
Result
r =0×1 empty double column vector
y= 0
-0.1000
C)Coding
n=[1 1]
d=[1 4 6 4]
r=roots(n)
y=roots(d)
Result
r = -1
y=
-2.0000 + 0.0000i
-1.0000 + 1.0000i
-1.0000 - 1.0000i
D)Coding
n=[1 2]
d=[1 0.1]
r=roots(n)

SIR SYED UNIVERSITY OF ENGINEERING & TECHNOLOGY Page 1


LINEAR CONTROL SYSTEM 2016-EE-113

y=roots(d)
Result
r = -2
y = -0.1000
Task 2 Find the poles and zeros of the following given transfer functions by using pole and zero command
G(S)=1/S^3
G(S)=1/S^2+3S
G(S)=0.005/S^2+0.1S
G(S)=S+1/S^3+4^2+6S+4
G(S)=S+2/S^2+0.1S
A)Coding
n=[1]
d=[1 0 0 0]
g=tf(n,d)
p=pole(g)
z=zero(g)
Result
p= 0
0
0
z = 0×1 empty double column vector
B)Coding
n=[1]
d=[1 3 0]
g=tf(n,d)
p=pole(g)
z=zero(g)
Result
p=0
-3
z = 0×1 empty double column vector
C)
n=[0.005]
d=[1 0.1 0]
g=tf(n,d)
p=pole(g)
z=zero(g)
Result:
p= 0
-0.1000
z=
0×1 empty double column vector
D)Coding
n=[1 1]
d=[1 4 6 4]
g=tf(n,d)
p=pole(g)
z=zero(g)
Result
p = -2.0000 + 0.0000i
-1.0000 + 1.0000i
-1.0000 - 1.0000i
z =-1

SIR SYED UNIVERSITY OF ENGINEERING & TECHNOLOGY Page 2


LINEAR CONTROL SYSTEM 2016-EE-113

Task 3: Find and plot the poles and zeros of Pole-Zero Map
1

following given transfer functions using pole and 0.8

zero commands and identify stable unstable and 0.6


System: g

Imaginary Axis (seconds-1)


0.4 Pole : 0
Damping: -1
marginally stable system and why? 0.2 Overshoot (%): 0
Frequency (rad/s): 0
0
G(S)=1/S^3 -0.2

G(S)=1/S^2+3S -0.4

-0.6

G(S)=0.005/S^2+0.1S -0.8

G(S)=S+1/S^3+4^2+6S+4 -1
-1 -0.8 -0.6 -0.4 -0.2
Real Axis (seconds -1 )
0 0.2 0.4 0.6 0.8 1

G(S)=S+2/S^2+0.1S
A) Coding
n=[1] 1
Pole-Zero Map

d=[1 0 0 0] 0.8

0.6
System: g System: g

Imaginary Axis (seconds )


g=tf(n,d)

-1
0.4 Pole : -3 Pole : 0
Damping: 1 Damping: -1
0.2 Overshoot (%): 0 Overshoot (%): 0

pzmap(g) 0
Frequency (rad/s): 3 Frequency (rad/s): 0

-0.2

-0.4

-0.6

b)coding -0.8

-1

n=[1] -3 -2.5 -2 -1.5


Real Axis (seconds -1 )
-1 -0.5 0

d=[1 3 0] 1
Pole-Zero Map

g=tf(n,d) 0.8

0.6

pzmap(g) System: g System: g

Imaginary Axis (seconds -1)


0.4 Pole : -0.1 Pole : 0
Damping: 1 Damping: -1
0.2 Overshoot (%): 0 Overshoot (%): 0
Frequency (rad/s): 0.1 Frequency (rad/s): 0
0

C) Coding -0.2

-0.4

n=[0.005] -0.6

-0.8
d=[1 0.1 0] -1
-0.1 -0.09 -0.08 -0.07 -0.06 -0.05 -0.04 -0.03 -0.02 -0.01 0

g=tf(n,d) Real Axis (seconds -1 )

pzmap(g) 1
Pole-Zero Map

0.8

0.6
System: g System: g
Imaginary Axis (seconds-1)

0.4 Pole : -2 Zero : -1

D) Coding 0.2

0
Damping: 1
Overshoot (%): 0
Frequency (rad/s): 2
Damping: 1
Overshoot (%): 0
Frequency (rad/s): 1

n=[1 1] -0.2

-0.4

d=[1 4 6 4] -0.6

-0.8

g=tf(n,d) -1
-2.5 -2 -1.5
Real Axis (seconds -1)
-1 -0.5 0

pzmap(g) 1
Pole-Zero Map

0.8

0.6
System: g System: g
Imaginary Axis (seconds -1)

0.4 Zero : -2 Pole : -0.1

E) Coding 0.2

0
Damping: 1
Overshoot (%): 0
Frequency (rad/s): 2
Damping: 1
Overshoot (%): 0
Frequency (rad/s): 0.1

n=[1 2] -0.2

-0.4
System: g
Pole : 0
Damping: -1
Overshoot (%): 0

d=[1 0.1 0] -0.6

-0.8
Frequency (rad/s): 0

g=tf(n,d) -1
-2 -1.8 -1.6 -1.4 -1.2 -1
Real Axis (seconds-1 )
-0.8 -0.6 -0.4 -0.2 0

pzmap(g)

Task 4 Sketch the root locus by using rlocus commands of the following griven transfer functions of the system and
identify stable unstable nd marginalyy stable system and why
G(S)=1/S^3 1.5
Root Locus

G(S)=1/S^2+3S 1
Imaginary Axis (seconds-1)

G(S)=0.005/S^2+0.1S 0.5

G(S)=S+1/S^3+4^2+6S+4
0

-0.5

G(S)=S+2/S^2+0.1S -1

A) Coding -1.5
-1.2 -1 -0.8 -0.6 -0.4 -0.2 0 0.2 0.4 0.6 0.8
Real Axis (seconds-1 )
n=[1]
d=[1 0 0 0]
g=tf(n,d)
rlocus(g)

SIR SYED UNIVERSITY OF ENGINEERING & TECHNOLOGY Page 3


LINEAR CONTROL SYSTEM 2016-EE-113

B) Coding
n=[1] 2
Root Locus

d=[1 3 0]
1.5
System: g System: g
Gain: 0 Gain: 0.0775

Imaginary Axis (seconds-1)


1
Pole: -3 Pole: -0.0261
Damping: 1 Damping: 1

g=tf(n,d) 0.5

0
Overshoot (%): 0
Frequency (rad/s): 3
Overshoot (%): 0
Frequency (rad/s): 0.0261

rlocus(g) -0.5

-1

-1.5

-2
-3.5 -3 -2.5 -2 -1.5 -1 -0.5 0 0.5

C) Coding Real Axis (seconds -1)

n=[0.005] 0.03
Root Locus

d=[1 0.1 0] 0.02 System: g


Gain: 0
System: g
Gain: 0

Imaginary Axis (seconds -1)


Pole: -0.1 Pole: 0
0.01 Damping: 1 Damping: -1

g=tf(n,d) 0
Overshoot (%): 0
Frequency (rad/s): 0.1
Overshoot (%): 0
Frequency (rad/s): 0

rlocus(g) -0.01

-0.02

-0.03
-0.12 -0.1 -0.08 -0.06 -0.04 -0.02 0 0.02
-1
Real Axis (seconds )

Root Locus

D) Coding 2.5

n=[1 2] 1.5
System: g
Gain: 218

Imaginary Axis (seconds -1)


1 Pole: -2.02
Damping: 1

d=[1 0.1 0] 0.5 Overshoot (%): 0


Frequency (rad/s): 2.02
0

g=tf(n,d) -0.5
System: g
Gain: 0
Pole: -0.1
-1 Damping: 1

rlocus(g) -1.5
Overshoot (%): 0
Frequency (rad/s): 0.1
-2

-2.5
-8 -7 -6 -5 -4 -3 -2 -1 0 1
-1
Real Axis (seconds )

Task 5 Draw the bode plot to show frequency response by using bode command of the following given transfer
functions of the systems
G(S)=1/S^3 20
Bode Diagram

G(S)=1/S^2+3S Magnitude (dB)


-20
0

G(S)=0.005/S^2+0.1S -40

G(S)=S+1/S^3+4^2+6S+4 -60
-269
Phase (deg)

-269.5

G(S)=S+2/S^2+0.1S -270

-270.5

A) Coding -271
10 0 10 1

n=[1 ] Frequency (rad/s)

Bode Diagram
20

d=[1 0 0 0 ] 0
Magnitude (dB)

-20

g=tf(n,d) -40

-60

bodeplot(g) -80
-90
Phase (deg)

-135

B) Coding
-180

n=[1 ] 10 -1 10 0
Frequency (rad/s)
Bode Diagram
10 1 10 2

50

d=[1 3 0 ]
Magnitude (dB)

g=tf(n,d) -50

bodeplot(g) -100
-90
Phase (deg)

-135

C) Coding -180
10 -3 10 -2
Frequency
10 -1
(rad/s)
10 0 10 1

n=[0.005 ]
d=[1 0.1 0 ] 0
Bode Diagram

g=tf(n,d)
-20
Magnitude (dB)

-40

-60

bodeplot(g) -80

-100
0

-45
Phase (deg)

D) Coding
-90

-135

-180

n=[1 1 ] 10 -1 10 0
Frequency (rad/s)
10 1 10 2

d=[1 4 6 4] 100
Bode Diagram
Magnitude (dB)

g=tf(n,d) 50

bodeplot(g) 0

-50
-90
Phase (deg)

-120

E) Coding -150

-180
10 -3 10-2 10-1 10 0 101 102
Frequency (rad/s)

SIR SYED UNIVERSITY OF ENGINEERING & TECHNOLOGY Page 4


LINEAR CONTROL SYSTEM 2016-EE-113

n=[1 2]
d=[1 .1 0]
g=tf(n,d)
bodeplot(g)

LAB ASSIGNMENT
Task1: Find the roots of numerator and denominator of the following given transfer functions using root
command.
G(s)=1/s^2+2s
G(s)=1/s^3+4s^2+s+6
G(s)=s+1/s^2
G(s)=0.01/s^3+2.1s^2+0.2s
G(s)=200s+200/s^2+20s+100.
A) Coding
n=[1]
d=[1 2 0]
r=roots(n)
y=roots(d)
result
Empty matrix: 0-by-1
y= 0
-2
B) Coding
n=[1]
d=[1 4 1 6]
r=roots(n)
y=roots(d)
Result
Empty matrix: 0-by-1
y= -4.1117
0.0558 + 1.2067i
0.0558 - 1.2067i
C) Coding
n=[1 1]
d=[1 0 0]
r=roots(n)
y=roots(d)
result
r =-1
y= 0
0
D) Coding
n=[0.01]
d=[1 2.1 0.2 0]
r=roots(n)
y=roots(d)
result
y= 0
-2.0000
-0.1000
E) Coding
n=[0.2]
d=[1 22.1 42.2 4 0]

SIR SYED UNIVERSITY OF ENGINEERING & TECHNOLOGY Page 5


LINEAR CONTROL SYSTEM 2016-EE-113

r=roots(n)
y=roots(d)
result
r =Empty matrix: 0-by-1
y= 0
-20.0000
-2.0000
-0.1000

Task 2 Find the poles and zeros of the following given transfer functions by using pole and zero command
G(s)=1/s^2+2s
G(s)=1/s^3+4s^2+s+6
G(s)=s+1/s^2
G(s)=0.01/s^3+2.1s^2+0.2s
G(s)=200s+200/s^2+20s+100.
G(s)=s+4/s^3+5S^2+9s+5
A) Coding
n=[1]
d=[1 2 0]
g=tf(n,d)
p=pole(g)
z=zero(g)
Result
p= 0
-2
z = Empty matrix: 0-by-1

B) Coding
n=[1]
d=[1 4 1 6]
g=tf(n,d)
p=pole(g)
z=zero(g)
Result
p = -4.1117
0.0558 + 1.2067i
0.0558 - 1.2067i
z = Empty matrix: 0-by-1

C) Coding
n=[1 1]
d=[1 0 0]
g=tf(n,d)
p=pole(g)
z=zero(g)
Result
p= 0
0
z = -1

D) Coding
n=[0.01]
d=[1 2.1 0.2]

SIR SYED UNIVERSITY OF ENGINEERING & TECHNOLOGY Page 6


LINEAR CONTROL SYSTEM 2016-EE-113

g=tf(n,d)
p=pole(g)
z=zero(g)
Result
p = -2.0000
-0.1000
z = Emptymatrix: 0-by-1

E) Coding
n=[0.2]
d=[1 22.1 42.2 4 0]
g=tf(n,d)
p=pole(g)
z=zero(g
Result
p= 0
-20.0000
-2.0000
-0.1000
z = Empty matrix: 0-by-1

E) Coding
n=[1 4]
d=[1 5 9 5]
g=tf(n,d)
p=pole(g)
z=zero(g)
Result
p = -2.0000 + 1.0000i
-2.0000 - 1.0000i
-1.0000
z =-4
Task 3: Find and plot the poles and zeros of following given transfer functions using pole and zero commands and
identify stable unstable and marginally stable system and why?
G(S)=1/s^2+2s
G(s)=S+1/S^2
G(s)=200s+200/s^2+20s+100 1
Pole-Zero Map

G(S)=1/s^2 0.8
Im a g in a r y A x is- 1)( s e c o n d s

0.6

G(s)=s/s^3+4s^2+s+6 0.4

0.2

1/s^3+3s^2+2s 0

-0.2

-0.4

A) Coding -0.6

-0.8

n=[1] -1
-2 -1.8 -1.6 -1.4 -1.2 -1 -0.8 -0.6 -0.4 -0.2 0
Real Axis (seconds- 1)

d=[1 2]
g=tf(n,d) 1
Pole-Zero Map
Im a g in a r y A x- 1)is ( s e c o n d s

pzmap(g) 0.8

0.6

System : g System : g
0.4
Zero : -1 Pole : 0
Dam ping: 1 Damping: -1
0.2 Overshoot (%): 0 Overshoot (%): 0
Frequency (rad/s): 1 Frequency (rad/s): 0
0

B) Coding -0.2

-0.4

n=[1 1] -0.6

-0.8

d=[1 0 0] -1
-1 -0.9 -0.8 -0.7 -0.6 -0.5 -0.4 -0.3 -0.2 -0.1 0
Real Axis (seconds-1)

g=tf(n,d)
pzmap(g)

SIR SYED UNIVERSITY OF ENGINEERING & TECHNOLOGY Page 7


LINEAR CONTROL SYSTEM 2016-EE-113

C) Coding 1
Pole-Zero Map

Im a g in a r y A x is- 1) ( s e c o n d s
n=[200 200] 0.8

0.6

System: g System: g

d=[1 20 100] 0.4

0.2
Pole : -10
Damping: 1
Overshoot (%): 0
Zero : -1
Damping: 1
Overshoot (%): 0
Frequency (rad/s): 10 Frequency (rad/s): 1

g=tf(n,d) -0.2
0

pzmap(g) -0.4

-0.6

-0.8

-1
- 10 -9 -8 -7 -6 -5 -4 -3 -2 -1 0

d) Coding Real Axis (seconds-1)

n=[1] 1
Pole-Zero Map

d=[1 0 0] 0.8

0.6
System: g

Imaginary Axis (seconds-1)


g=tf(n,d) 0.4

0.2
Pole : 0
Damping: -1
Overshoot (%): 0
Frequency (rad/s): 0

pzmap(g) -0.2
0

-0.4

-0.6

E) Coding -0.8

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

n=[1] 1.5
Real Pole-Zero
Axis (seconds -1
Map )

d=[1 4 1 6] 1 System: g
Pole : 0.0558 + 1.21i
System: g

Imaginary Axis (seconds-1)


Damping: -0.0462

g=tf(n,d) 0.5
Pole : -4.11
Damping: 1
Overshoot (%): 0
Overshoot (%): 116
Frequency (rad/s): 1.21

Frequency (rad/s): 4.11

pzmap(g) 0

System: g
-0.5
Pole : 0.0558 - 1.21i
Damping: -0.0462
Overshoot (%): 116
-1 Frequency (rad/s): 1.21

-1.5

f) Coding -4.5
1
-4 -3.5 -3 -2.5 -2 -1.5
Pole-Zero Map
Real Axis (seconds -1)
-1 -0.5 0 0.5

0.8

n=[1] 0.6
System: g System: g

Imaginary Axis (seconds-1)


0.4 Pole : -2 Pole : -1

d=[1 3 2 0] 0.2

0
Damping: 1
Overshoot (%): 0
Frequency (rad/s): 2
Damping: 1
Overshoot (%): 0
Frequency (rad/s): 1

g=tf(n,d)
System: g
-0.2 Pole : 0
Damping: -1
-0.4 Overshoot (%): 0
Frequency (rad/s): 0

pzmap(g) -0.6

-0.8

-1
-2 -1.8 -1.6 -1.4 -1.2 -1 -0.8 -0.6 -0.4 -0.2 0
Real Axis (seconds -1)

Task 4 Sketch the root locus by using rlocus commands of the following griven transfer functions of the system and
identify stable unstable nd marginalyy stable system and why
G(S)=0.2/S^4+22.1S^3+42.2S^2+4S
G(s)=S+1/S^2
G(s)=200s+200/s^2+20s+100
G(S)=1/s^2
G(s)=s/s^3+4s^2+s+6
1/s^3+3s^2+2s

a) CODING 60
Root Locus

40

n=[0.2]
Im a gin a ry A x is (s- 1)e co n d s

20 System: g System: g
Gain: 0 Gain: 312
Pole: -20 Pole: 0.24 - 1.07i
Damping: 1 Damping: -0.218
Overshoot (%): 0 Overshoot (%): 202

d=[1 22.1 42.2 4 0]


Frequency (rad/s): 20 Frequency (rad/s): 1.1
0
System: g
Gain: 0
Pole: -2
Dam ping: 1
Overshoot (%): 0
-20 Frequency (rad/s): 2

g=tf(n,d) -40

rlocus(g)
-60
-60 -40 -20 0 20 40 60
Real Axis (seconds-1)

B) Coding 1.5
Root Locus

n=[1 1] 1
Imaginary Axis (seconds-1)

0.5

d=[1 0 0] 0
Sy stem: g Sy stem: g
Gain: Inf Gain: 0

g=tf(n,d) -0.5

-1
Pole: -1
Damping: 1
Overshoot (%): 0
Frequency (rad/s ): 1
Pole: -0
Damping: -1
Overshoot (%): 0
Frequency (rad/s ): 0

rlocus(g) -1.5
-4 -3.5 -3 -2.5 -2 -1.5 -1 -0.5 0 0.5
Real Axis (seconds-1 )

C) Coding Root Locus

n=[200 200]
2

1.5
System: g
Gain: 3.11e-07

d=[1 20 100]
Imaginary Axis (seconds -1)

1
Pole: -10
Damping: 1
0.5 Overshoot (%): 0
Frequency (rad/s): 10

g=tf(n,d) -0.5
0
System: g
Gain: 3.47
Pole: -1.11

rlocus(g)
Damping: 1
-1 Overshoot (%): 0
Frequency (rad/s): 1.11
-1.5

-2
-35 -30 -25 -20 -15 -10 -5 0 5
Real Axis (seconds -1 )

SIR SYED UNIVERSITY OF ENGINEERING & TECHNOLOGY Page 8


LINEAR CONTROL SYSTEM 2016-EE-113

d) 1.5
Root Locus

n=[1] 1 System: g
Gain: 0.00138

Imaginary Axis (seconds-1)


Pole: 0 + 0.0372i

d=[1 0 0] 0.5 Damping: -0


Overshoot (%): 100
Frequency (rad/s): 0.0372
0

g=tf(n,d) -0.5

rlocus(g) -1

-1.5
-0.15 -0.1 -0.05 0 0.05 0.1 0.15
Real Axis (seconds -1 )

f)
n=[1] 15
Root Locus

d=[1 4 1 6] 10

Imaginary Axis (seconds-1)


g=tf(n,d) 5

rlocus(g) -5

-10

-15
-14 -12 -10 -8 -6 -4 -2 0 2 4 6
Real Axis (seconds-1)

Task 5 Draw the bode plot to show frequency response by using bode command of the following given transfer
functions of the systems
G(s)=1/s^2+2s
G(s)=s/s^3+4s^2+s+6
G(s)=S+1/S^2 20
Bode Diagram

M a g n itu d e ( d B )
0

G(s)=0.1/s^3+2.1s^2+0.2s -20

-40

G(S)=0.2/s^4+22.1s^3+42.2s^2 +4s -100


-60

-80

A) Coding
-90

P has e (deg)
n=[1 ]
-135

d=[1 2 0 ]
-180
-1 0 1 2
10 10 10 10
Frequency (rad/s)

g=tf(n,d)
bodeplot(g)
M a g n itu d e ( d B )

Bode Diagram
50

- 50

B) Coding - 100

- 150
P ha s e (d e g )

- 180

n=[1 ] - 225

- 270

d=[1 4 1 6 ] - 315

- 360

- 405

g=tf(n,d)
-1 0 1 2
10 10 10 10
Frequency (rad/s)

bodeplot(g)
Bode Diagram
M a g n itu d e ( d B )

100

C) Coding 50

n=[1 1] -50
-90
P hase (deg)

d=[1 0 0] -135

g=tf(n,d) -180
-2 -1 0 1 2
10 10 10 10 10

bodeplot(g) Frequency (rad/s)

Bode Diagram
50

0
M a g nitu d e ( dB )

D) Coding -50

-100

-150

n=[0.01] -200
-90

-135

d=[1 2.1 0.2 0]


P h a se ( d eg )

-180

-225

g=tf(n,d) -270
10
-3 -2
10
-1
10
Frequency (rad/ s)
0
10
1
10
2
10

bodeplot(g)

E) Coding
M a g n itu d e ( d B )

Bode Diagram
0

n=[0.2 ] -50

d=[1 22.1 42.24 0] -100

-150

g=tf(n,d) -200
P has e (deg )

-90

bodeplot(g) -135

-180

-225

-270
-1 0 1 2 3
10 10 10 10 10
Frequency (rad/s)

SIR SYED UNIVERSITY OF ENGINEERING & TECHNOLOGY Page 9

Вам также может понравиться