0% found this document useful (0 votes)
6 views

CI2 Coursework Lab Assignment (2)

The document outlines the design of a digital controller Gc(z) using both indirect and direct design methods, detailing calculations for damping ratio, natural frequency, and characteristic equations. It includes the derivation of compensator parameters in the s-domain and the conversion to the z-domain using Tustin’s bilinear transformation, culminating in the simulation results in Simulink. The final compensator gain and transfer functions are provided, along with performance metrics such as settling time and overshoot.

Uploaded by

f4rfskw7xp
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as DOCX, PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
6 views

CI2 Coursework Lab Assignment (2)

The document outlines the design of a digital controller Gc(z) using both indirect and direct design methods, detailing calculations for damping ratio, natural frequency, and characteristic equations. It includes the derivation of compensator parameters in the s-domain and the conversion to the z-domain using Tustin’s bilinear transformation, culminating in the simulation results in Simulink. The final compensator gain and transfer functions are provided, along with performance metrics such as settling time and overshoot.

Uploaded by

f4rfskw7xp
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as DOCX, PDF, TXT or read online on Scribd
You are on page 1/ 13

Part A – Designing the digital controller Gc(z) using indirect design method

Qn 1) Finding Damping Ratio, Natural Frequency and Characteristic Equation


−πζ

Overshoot M p=e √ 1−ζ


2

−πζ
√1−ζ 2
0.05=e
−πζ
ln 0.05=
√1−ζ 2
−2.996 ( √1−ζ )=−πζ
2

−2.996 (1 −ζ )=−πζ
1
2

−2.996+ 2.996 ζ=−πζ


πζ +2.996 ζ =2.996
2.996
ζ=
( π +2.996 )
2.996
ζ=
6.138
Damping Ratio ζ=0. 488

Settling Time ( 2 % ) T s =30 ms


4
T s=
ζ ωn
−3 4
30 x 10 =
( 0.488 ) ω n
4
0.488 ω n= −3
30 x 10
4
0.03
ω n=
0.488
133.333
ω n=
0.488
Natural Frequency ω n=273.22

Characteristic Equation:
2 2
s +2 ζ ω n s+ω n =0
2 2
s +2(0.488)(273.22) s+ 273.22 =0
2
s +266.66 s+74649.17=0
Qn 2) Finding compensator parameters in s-domain
Km
Tm
G p (s)=
(
s s+
1
Tm )
1
Let zero=
Tm
zero=50

70
G p (s)=
s (s+50)

Gc (s)=k c ( s+s+ zero


pole )

Let “ zero ”be a .


Let “ pole ” be b .

G c (s)=k c ( s+s+ ab )
OLTF=k c ( s+s+ ab ) x s(s+7050)
k c ( 70 ) ( s+ a )
OLTF=
s (s+50)( s+b)

Since a=50 ,

k c ( 70 ) ( s +50 )
OLTF=
s (s+50)( s+b)

k c ( 70 )
OLTF=
s (s+b)

N
CLTF=
N +D

70 k c
CLTF=
s ( s +b ) +70 k

70 k
CLTF= 2
s +sb +70 k
Closed Loop Characteristic Equation :
2 2
s +2 ζ ω n s+ω n =0
2
s + sb+70 k c =0

Deducing from sb=2ζ ω n s


b=2(0.488)(273.22)
b=266.66

Deducing from 70 k c =ωn2


2
70 k c =273.22
k c =1066.42

Therefore b=266.66 , a=50 , k c =1066.42


Compensator transfer function Gc ( s ) =k c ( ss +a+b )
G c (s)=1066.42 ( s +266.66
s+50
)
Qn 3) Finding the digital compensator using Tustin’s bilinear transformation

T s=0.002

2 z−1
s=
T s z +1

z−1
s=1000
z +1

Substituting s=1000
z−1
z +1
into Gc (s)=1066.42 (
s+50
s+266.66 )

( ( z+ 1 )

)
z−1
1000 +50
( z−1 )
G ( z ) =1066.42
c x
1000 ( )
z −1 ( z−1 )
+266.66
z+1

Gc ( z ) =1066.42
( 1000 ( z +1 ) +50( z −1)
1000 ( z +1 ) +266.66( z−1) )
G c ( z ) =1066.42 ( 10001000
z +1000+266.66 z−266.66 )
z +1000+50 z−50

Gc ( z ) =1066.42 ( 1266.66 z +733.34 )


1050 z +950

Gc ( z ) =1066.42
( 1050 (z+ 0.905)
1266.66 (z +0.579) )
Gc ( z ) =884.01 ( z+z+ 0.905
0.579 )

Finally ,∈the z−domain , a=0.905 , b=0.579 , k c =884.01


Qn 4) Simulation using Simulink and Matlab

Command in Matlab

Block diagram in Simulink


Simulation result to steady state in Simulink

Steady state value = 1, steady state error = 0


Settling time (2%) = 0.042sec

Overshoot = 1.319
Part B – Designing the digital controller Gc(z) using direct design method

Qn 1) As found in Part A, question 1,

Natural Frequency ω n=273.22

Damping Ratio ζ=0. 488

Using the Natural Frequency and Damping Ratio, we can now find the desired closed-
loop poles in the s-domain,
s=−ζ ωn ± j ωn √ 1−ζ 2
s=−0.488(273.22)± j(273.22) √ 1−(−0.488)2
s=−133.33 ± j304.02
Desired poles S1 = -133.33 + j304.02 and S2 = -133.33 – j304.02.

From the s-domain to the z-domain,


sTs
z=e
(−ζω ± j ω √ 1−ζ ) T
, where T s = 2 ms
2

z=e n n s

0.002 (−133.33 ) ± j 0.002(304.02)


z=e e
( −0.267 ) (± j 0.608)
z=e e
z=¿ z∨( cos ∠ z ± jsin ∠ z )
z=¿ 0.765∨( cos ∠ 0.608 ± jsin ∠ 0.608 )

Desired poles in the Z-domain are


Z = 0.765 ∠ 0.608º = 0.765 ± j0.00812
Qn 2) Finding the plant, GHP(z).
G HP ( z )=(1−Z ) Z
−1G p (s)
s { }
−1
G HP ( z )=(1−Z ) Z 2
70
s ( s+ 50){ }
{ }
−1
(1−Z ) 1
G HP ( z )= Z 2
70 s (s +50)
(1−Z −1)
{ }
2
50
G HP ( z )= Z 2
3500 s (s +50)

a=50
aT =0.1
−aT
e =0.9048
−aT
aT e =0.0905

[ ]
−1
(1−Z ) ( 0.1−1+ 0.9048 ) z +(1−0.9048−0.0905)
G HP ( z )=
3500 ( 1−Z −1) ( z−1 ) (z −0.9048)

[ ]
−1
(1−Z ) 0.1 z−1 z+0.9048 z +1−0.9048−0.0905
G HP ( z )=
3500 ( 1−Z −1 ) ( z−1 ) (z−0.9048)

G HP ( z )=
1
[0.0048 z +0.0047
3500 ( z−1 )( z−0.9048) ]
G HP ( z )=
1
[ 0.0048(z +0.98)
3500 ( z−1 )( z−0.9048) ]
G HP ( z )=0.0014
[ z+ 0.98
( z−1 ) (z−0.9048) ]
Now that we have found G HP ( z ), we can derive our OLTF.
OLTF=0.0014 K c
[ z +0.98
( z−1 ) (z−b) ]
jm

Desired pole,
Z = 0.765 + j0.00812

∠ Pole 1
∠ Pole β
∠Zero
Re
Zero = -0.98 0 Pole β Pole = 1

∠ Zero=tan−1 ( 0.765+0.98
0.00812
)
∠ Zero=0.27 °

180−∠ Pole 1=tan−1 ( 1−0.765


0.00812
)
∠ Pole 1=178.02°

Conditions of angles,
Total angles of zeros – Total angles of poles = ±180°

Hence,
∠ Pole β=180 °−0.27 °−178.02 °
∠ Pole β=1.71 °

0.00812
tan (1.71 )=
0.765−Pole β
0.765−Pole β=0.272
Pole β=0.493
Now we can the compensator gain K c ,
0.0014 K c = [
( z −1 ) ( z−0.493)
z+ 0.98 ]
0.0014 K c = [
[ ( 0.765+ j 0.00812 )−1 ] [(1∠178.02)−0.493 ]
[(0.493 ∠ 1.71)+ 0.98] ]
0.0014 K c =¿ 0.238− j 0.016∨¿
K c =170

Lastly, we can now derive GC ( z ).


GC ( z )=170 ( z+z−0.493
0.9048
)

Command in Matlab
Block diagram in Simulink

Simulation result in Simulink

You might also like