Vous êtes sur la page 1sur 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


following given transfer functions using pole and
zero commands and identify stable unstable and
marginally stable system and why?
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)
pzmap(g)

b)coding
n=[1]
d=[1 3 0]
g=tf(n,d)
pzmap(g)

C) Coding
n=[0.005]
d=[1 0.1 0]
g=tf(n,d)
pzmap(g)

D) Coding
n=[1 1]
d=[1 4 6 4]
g=tf(n,d)
pzmap(g)

E) Coding
n=[1 2]
d=[1 0.1 0]
g=tf(n,d)
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
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)
rlocus(g)

B) Coding

SIR SYED UNIVERSITY OF ENGINEERING & TECHNOLOGY Page 3


LINEAR CONTROL SYSTEM 2016-EE-113

n=[1]
d=[1 3 0]
g=tf(n,d)
rlocus(g)

C) Coding
n=[0.005]
d=[1 0.1 0]
g=tf(n,d)
rlocus(g)

D) Coding
n=[1 2]
d=[1 0.1 0]
g=tf(n,d)
rlocus(g)

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
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)
bodeplot(g)

B) Coding
n=[1 ]
d=[1 3 0 ]
g=tf(n,d)
bodeplot(g)

C) Coding
n=[0.005 ]
d=[1 0.1 0 ]
g=tf(n,d)
bodeplot(g)

D) Coding

n=[1 1 ]
d=[1 4 6 4]
g=tf(n,d)
bodeplot(g)

E) Coding

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

0.6

G(s)=s/s^3+4s^2+s+6 0.4
Imaginary Axis (seconds-1)

1/s^3+3s^2+2s
0.2

-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 A xis (seconds -1)

d=[1 2]
g=tf(n,d) 1
Pole-Zero Map

pzmap(g) 0.8

0.6

System: g System: g
0.4
Zero : -1 Pole : 0
Imaginary Axis (seconds-1)

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

B) Coding
0

-0.2

n=[1 1]
-0.4

-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 A xis (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

n=[200 200] 0.8

0.6

d=[1 20 100]
System: g System: g
0.4
Pole : -10 Zero : -1

Imaginary Axis (seconds-1)


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

g=tf(n,d) 0

-0.2

pzmap(g) -0.4

-0.6

-0.8

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

d) Coding Real A xis (seconds -1)

n=[1]
d=[1 0 0]
g=tf(n,d)
pzmap(g)

E) Coding
n=[1]
d=[1 4 1 6]
g=tf(n,d)
pzmap(g)

f) Coding
n=[1]
d=[1 3 2 0]
g=tf(n,d)
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)=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] 20 System: g
Gain: 0
Pole: -20
System: g
Gain: 312
Imaginary Axis (seconds-1)

Pole: 0.24 - 1.07i


Damping: 1 Damping: -0.218
Overshoot (%): 0

d=[1 22.1 42.2 4 0]


Overshoot (%): 202
Frequency (rad/s): 20 Frequency (rad/s): 1.1
0
System: g
Gain: 0
Pole: -2
Damping: 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
n=[1 1]
d=[1 0 0]
g=tf(n,d)
rlocus(g)

C) Coding
n=[200 200]
d=[1 20 100]
g=tf(n,d)
rlocus(g)

SIR SYED UNIVERSITY OF ENGINEERING & TECHNOLOGY Page 8


LINEAR CONTROL SYSTEM 2016-EE-113

d)
n=[1]
d=[1 0 0]
g=tf(n,d)
rlocus(g)

f)
n=[1]
d=[1 4 1 6]
g=tf(n,d)
rlocus(g)

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

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

Magnitude (dB)
-20

-40

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


-60

-80

A) Coding
-90

Phase (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) 50
Bode Diagram

0
Magnitude (dB)

-50

B) Coding -100

-150
-180

n=[1 ] -225
Phase (deg)

-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
100

C) Coding
Magnitude (dB)

50

n=[1 1] -50
-90

d=[1 0 0]
Phase (deg)

-135

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

bodeplot(g) Frequency (rad/s)

Bode Diagram
50

D) Coding
Magnitude (dB)

-50

-100

n=[0.01]
-150

-200
-90

-135

d=[1 2.1 0.2 0]


Phase (deg)

-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 0
Bode Diagram

n=[0.2 ] -50
Magnitude (dB)

d=[1 22.1 42.24 0] -100

g=tf(n,d)
-150

-200
-90

bodeplot(g) -135
Phase (deg)

-180

-225

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

SIR SYED UNIVERSITY OF ENGINEERING & TECHNOLOGY Page 9

Vous aimerez peut-être aussi