You are on page 1of 6

HW6

EEE 304

Answer 1
Given
BW =10 Hz
Task=¿ ¿ find samplingtime T s

According to Rise time rule


2
T r=
BW
rad
s ( )
For the DT controller to work efficiently the it should have 6 samples/s
Tr 1
T s= =
6 3 { BW }

=
1 1 1
= = s
{ 3∗2 π∗10 } {6∗π∗10 } {60 π }
¿ 5.3 ms
rad
Now according to phase margin rule the controller should have 6 ° ≡0.1 delay at
s
crossover frequency
Moreover
BW =1.5 ω c

BW { 2 π∗10 }
⇒ ωc= =
1.5 1.5
Now ZoH contribution to the system is 0.5 sample delay at crossover
T s∗ω c rad
=0.1
2 s
{0.1∗2 } { 0.1∗2 } { 0.1∗2∗1.5 }
⇒ T s= = = =0.00477 ≈ 4.8 ms
ωc
[{ 2 π∗10 }
1.5 ] {2 π∗10 }

Now since the sampling time from rise time is 5.3 ms and from phase margin rule is 4.8 ms.
Which is approximately equal and this difference will be due to approximation of phase lag
contribution at crossover. Hence, the sampling time is equal to 5.3 ms.
Answer 2
Given
segway control system
1
T F 1=
{s −49 }
2

Part 1
Given
f s {max }=100 Hz

According to condition, The ZOH causes the system's right-half-plane (RHP) zero to
experience a 1/2-sample delay. This is denoted by e−{ 2 }. Now again since it is strictly causal
sT

PID then and extra sample delay will be introduced e−{ sT }.


Now again due to both these effect the combined delay is denoted by

delay=e
− { s 32T }
Now transfer function is

T F 2= 1−e ( − { s32T })
Now using the Taylor series approximation

e
− { s 32T }=1− s 3 T
2
Hence

T F 2=1− 1− ( s3T
2
=
s3T
2 )
2
From the transfer function, we can see that it is has a zero at s= , hence frequency
3T
condition is given by
2 2 200 rad
s= = = =66.6666 ≈ 67
3T 3∗1
100{ } 3 s

1 rad
Now from the system T F 1= s=7
[ s −49 ] , we can see that it has a pole at
2
s

So, the range of BW is


7< BW <67
Since
BW =1.5 ω c

So, the range of ω c ,our constraints, is given by


7< BW <67
¿ 7<1.5 ω c <67

rad rad
¿ 4.7 <ω c < 44
s s
Part b
PM angle equation is given by
3 T s ωc
∗180
−1 −1 2
−180 ° + PM =∠ P−90 ° + N tan τ z ω c −tan τ p ωc −
π
Since the phase of the TF1= −180 ° , and N=2for PID
Ts
And τ p= (given)
2

−1 −1 ω c 3∗57.3∗ω c
−135 °=−180 °−90° +2 tan τ z ω c −tan −
200 100∗2

−1 −1 ω c 3∗57.3∗ω c
⇒ 135 °=2 tan τ z ω c −tan −
200 100∗2

−1 −1 ωc
⇒ 135 °=2 tan τ z ω c −tan −0.857 ωc
200
Next, we make the assumption that no PID zero should contribute more than 75 ° .

−1 ωc
15 ° ≥ tan +0.857 ω c
200
the angles are small, hence tan−1 θ=θ

180 ωc
15 ° ≥ ¿ + 0.86 ωc
π 200
⇒ 15 ° ≥1.146 ω c

rad
⇒ ω c ≤ 13.1
s
Though the essential ideas stay the same, we would normally anticipate plants to show
growing lag with frequency, which would make this problem excessively hard. In such a
circumstance, we would require a numerical solution.
Now for PID zeroes
−1 tan 75 ° tan 75°
tan τ z ω c =75 ° ⇒ τ z= = =0.285 s
ωc 13.1

Additionally, the PID pole was chosen to ensure


Ts 1
τ p= = =0.005 s
2 200
So, controller gain is given by
2
K ( 0.285 s+1 )
C ( s )=
s ( 0.005 s+ 1 )
So, K = 194. Using the MATLAB, it is discovered that this controller gives roughly 56° PM
to compensate for the ZOH and the delay, yielding the needed PM after discretization. Tustin
is used to discretize C and add the delay to achieve strict causality.

1000 ( 1.63 z 2−3.15 z +1.52 )


2
∗1
z −z
C DT ( z )=
z
Answer 3
Given
1
P ( s )=
s +1
K ( z−a )
C ( z )=
z ( z−1 )
rad
ω c =10
s
PM =50 °
f s=50 Hz

Part 1
The PM equation is given by
−180 ° + PM =∠ P+ ∠ C+∠ ZOH + delay
Now phase for P(s) is given by

−1 ωc −1 10
∠ P=−tan =−tan =84 °
1 1
3 T s ωc
∗180
−1 2
⇒−180 ° +50 °=−84 °−90 °+ tan τ z ω c−
π
3
∗1
2
∗10∗180
50
⇒ 44 °=tan−1 10 τ z −
π
−1
⇒ 61 °=tan 10 τ z
⇒ τ z =0.18 s

The controller is given by


K ( τ z s+1 ) K ( 0.18 s +1 )
C ( s )= =
s s
Now for K, using crossover equation

|PC ( jω )|=¿

| |
1
∗K √ 0. 0 324 ω 2+ 1
√ω + 1
2
=1
ω

1
∗K √ 4.24

√ 101
=1
10
⇒ K =48.8 06 ≈ 49
Now C(s) is given by
49 ( 0.18 s +1 ) 8.8 s+ 49
C ( s )= =
s s
After discretising using Tustin, we get
9.27 z−8.30
C D ( z )=
z ( z−1 )
Part 2
P(s) in discretized form is given by
0.0198
PD (z )=
z−0.9802
For PI the PM equation is given by

−130 °=−tan
−1
( sin ω c T s
cos ωc T s −0.98 )
−tan
−1
(
sin ω c T s
cos ωc T s−1
+ tan
−1
) (
sin ω c T s
cos ω c T s−a )
Since ω c T s=0.2
Now solving for a
tan
−1
( sin ω c T s
cos ω c T s−a
=67 °
)
⇒ tan
−1
( cossin0.2−a
0.2
)=67 °
⇒ a=0.897
Now using MATLAB with the application of phase cross over equation we can find the K

|P D C D (e{
j ωc }
)|=1
⇒ K =9.30
The controller discretized TF is given by
9.30 z−8.35
C D ( z )=
z ( z−1 )

You might also like