Download as pdf or txt
Download as pdf or txt
You are on page 1of 17

Systeem en Regeltechniek Blok B

April 5, 2024

1 Deel 1: State-space representation and transfer functions


1.1 1A
 
−6 −25
A=
1 0
 
1
B=
0
 
C1 = 1 0

 
C2 = 0 1

 
D1 = D2 = 0

s
G1 (s) =
s2 + 6s + 25
1
G2 (s) =
s2 + 6s + 25

1.2 1B
Expressing in ordinary differential equations:

ẋ1 = −6x1 (t) − 25x2 (t) + u(t)


ẋ2 = x1 (t)
After laplace transforming both equations you get:

sX1 (s) = sY1 (s) = −6Y1 (s) − 25Y2 (s) + U (s)


sX2 (s) = sY2 (s) = Y1 (s)
The substituting in both equations get:

sY1 (s) = −6Y1 (s) − 25Y1 (s)/s + U (s)


Y1 (s) s
G1 (s) = = 2
U (s) s + 6s + 25
And for Y2 :

s2 Y2 (s) = −6sY2 (s) − 25Y2 (s) + U (s)


Y2 (s) 1
G2 (s) = = 2
U (s) s + 6s + 25

1
1.3 1C
˙ + k2 e(t) + d(t)
u(t) = k1 e(t)
e(t) = −y(t)
Laplace transformation

U (s) = (k1 s + k2 )E(s)


U (s)
C(s) = = k1 s + k2
E(s)

1.4 1D
Y2 (s)U (s) Y2 (s) k1 s + k2
L(s) = = = 2
U (s)E(s) E(s) s + 6s + 25

1.5 1E
k2
red|L(jωgc )| = 2
=1
jωgc + 25 − ωgc
q
k2 = 2 + (25 − ω 2 )2
36ωgc gc

k22 = 36ωgc
2 2 2
+ (25 − ωgc )

k22 = 36ωgc
2 2
+ 625 − 50ωgc 4
+ ωgc

4 2
−ωgc + (50 − 36)ωgc + k22 − 625 = 0

4 2
−ωgc + 14ωgc + k22 − 625 = 0


p
2 −14 ± 142 + 4 · k22 − 625 n o
ωgc = = 7 ± 0.5 7696 ≈ {−36.86, 50.86}
−2

ωgc ≈ 50.86 ≈ 7.13 rad/s
We checked in Bode by observing |L(j7.13j)| ≈ 1. The phase margin is obtained by calculating
̸ L(jωgc ), and checking how far away from 180 degrees this is:
2
̸ L(jωgc ) = ̸ L(50) − ̸ L(jωgc + 25 − ωgc )
 
60ωgc
̸ L(jωgc ) = 0◦ − (180◦ − tan−1 2 − 25
) ≈ −121.1◦
ωgc
The phase margin for this particular controller is thus 58.9 degrees.

2
1.6 1F

Increasing the gain k will elevate the entire plot of |L(jω)| across all frequencies ω, yet it has no
impact on the phase. The gain crossover frequency will shift to a higher frequency. Given that the
phase of L(jω) diminishes with increasing ω, the phase margin would correspondingly decrease.

3
1.7 1G

The concept of a phase crossover frequency is not possible here, as the phase angle ̸ L(jω) remains
above −180◦ for all ω > 0 (with the Bode plot approaching but never reaching the -180-degree
asymptote). This implies that the system has an infinite gain margin.

4
1.8 2A
It a is a notch filter. Standard form is:
s2 + 2ζ1 ωn s + ωn2
N (s) =
s2 + 2ζ2 ωn s + ωn2

Rewriting G(s) in standard form results in

2s2 + 0.8s + 8 2 s2 + 0.4s + 4


G(s) = 2
=
4s + 16s + 16 4 s2 + 4s + 4

so the zero frequency gain is K = G(0) = 12 . Now we can equate the terms present in G(s) to the
ones in the standard form N (s).
In this standard form you can see that: ωn = 2, ζ1 = 0.1 and ζ2 = 1.

1.9 2B
To determine the poles and zeros of the transfer function G(s) manually, We eximed G(s)

1 s2 + 0.4s + 4
G(s) =
2 s2 + 4s + 4
To find the zeros, solve the equation:

s2 + 0.4s + 4 = 0

The solutions yield the zeros of the transfer function:

s = −0.2 + 1.99j, s = −0.2 − 1.99j

For the poles, solve the equation:


s2 + 4s + 4 = 0
Which gives the poles:
p1 = p2 = −2

1.10 2C
For ω = 0.2:

2 (0.2j)2 + 0.4(0.2j) + 4 2 −0.04 + 0.08j


G(j0.2) = · = ·
4 (0.2j)2 + 4(0.2j) + 4 4 −0.04 + 0.8j
8 0.99 + 0.02j
G(0.2j) =
16 0.99 + 0.2j
Multiplying with complex conjugate denominator:

1 (0.99 + 0.02j)(0.99 − 0.2j)


·
G(0.1j) =
2 0.992 + 0.22
Now compute the magnitude of the expression above:

|G(0.2j)| ≈ 0.49
   
0.02 0.2
̸ G(0.2j) = arctan − arctan ≈ −10.26◦
0.99 0.99
For ω = 2:

2 (2j)2 + 0.4(2j) + 4 1 −8j


G(j2) = · = · = 0.05
4 (2j)2 + 4(2j) + 4 2 8j

|G(2j)| = 0.05
̸ G(2j) = 0◦

5
For ω = 20:

2 (20j)2 + 0.4(20j) + 4 2 −396 + 8j 200 3.96 − 0.08j


G(20j) = · 2
= · ≈ ·
4 (20j) + 4(20j) + 4 4 −396 + 80j 400 3.96 − 0.8j

|G(20j)| ≈ 0.49
̸ G(20j) ≈ +10.26◦

1.11 2D
We can do this by changing one of the damping values so that when you fill in 2j in the transfer
function the result is 0.25. To do this we found that sdf asdf ζ1 can be changed to a value of 0.5,
then the ratio ζ1 /ζ2 is also 0.5.

2 s2 + 2s + 4
G2 (s) = ·
4 s2 + 4s + 4

2 (2j)2 + 2(2j) + 4 2 −4 + 4j + 4 2 2
G2 (2j) = · 2
= · = · = 0.25
4 (2j) + 4(2j) + 4 4 −4 + 8j + 4 4 2

6
1.12 3A
To derive G(s) we can use the following formula:

G(s) = C(sI − A)−1 B + D


Given the system:
   
−0.125 2.5 0.25  
A= , B= , C= 0 1 , D=0
1 0 0
The transfer function G(s) becomes
0.25
G(s) =
s2 + 0.125s − 2.5
With the python control code we find the poles s = −1.64, which is in the left-half of the s-plane,
and another pole at s = 1.52, which is in the right-half of the s-plane. Since there is at least one
pole with a positive real part, the system is unstable.

1.13 3B
Because N = Z − P = 0 − 2 = −2, means you circle counter clock wise. Given that the loop transfer
function L(s) has a single unstable open-loop pole, for stability, the point −1 must be encircled once
in the counter-clockwise direction. This is based on the relationship N = Z − P , where Z represents
the number of closed-loop unstable poles (desired to be 0), N the number of CCW encirclements of
−1, and P the number of unstable open-loop poles. Thus, to achieve Z = 0, we require N = −P ,
implying one CCW encirclement of −1 for one unstable open-loop pole.

7
1.14 3C
Given the transfer function
0.25
G(s) = ,
s2 + 0.125s − 2.5
indicating a system with its characteristics defined by the denominator of G(s). The closed-loop
transfer function is defined as
L(s)
T (s) = ,
1 + L(s)
where L(s) = G(s)C(s). For system stability, all zeros of 1+L(s) = 1+G(s)C(s) must have negative
real parts. For a P-controller, where Lp (s) = G(s)kp , the characteristic equation becomes

0.25kp
1 + Lp (s) = 1 + G(s)kp = 1 + .
s2 + 0.125s − 2.5
Solving this for when all zeros are in the LHP, yields the condition for kp ¿10

For a PD-controller, where Lpd (s) = G(s)(kp + kd s), the characteristic equation is

0.25(kp + kd s)
1 + Lpd (s) = 1 + G(s)(kp + kd s) = 1 + .
s2 + 0.125s − 2.5
”To ensure stability and have all the poles in the Left Half Plane (LHP) for the PD controller, the
conditions are kp > 10 and kd > −0.5.”

1.15 3D
A PD controller is better than the P controller for stability, This is because the PD controller is
able to alter the shape of L(S), the loop function, to increase stability. So the margins

• Gain Margin: For the PD controller, the gain margin is effectively infinite, as the
Nyquist plot does not cross the negative real axis. This can be cross-verified with the
Bode plot of L(s).
• Phase Margin: The phase margin is determined by the angle at which the Nyquist loci
of the controllers cross the negative real axis. The PD controller allows adjustment of
this crossing point—and consequently, the phase margin—through manipulation of the
derivative gain.
• Stability Margin: The stability margin, illustrated by the radius of the largest circle
that fits at −1 without intersecting the Nyquist loci, is maximized with the use of the PD
controller. This signifies a larger tolerance for system variations before instability issues
arise.

Stability Criterion: For stability, it’s important that the Nyquist plot encircles the −1 point
once in the counter-clockwise direction, which is more effectively ensured by the PD controller.

1.16 3E
L1 (s) L2 (s)
T1 (s) = and T2 (s) =
1 + L1 (s) 1 + L2 (s)
By substituting L1 (s) and L2 (s) into the formulas for T1 (s) and T2 (s), we get:
2kp
T1 (s) =
8s2 + s + (2kp − 20)
2kp + 2kd s
T2 (s) =
8s2 + (2kd + 1)s + (2kp − 20)
For the given values of kp = 11 and kd = 2, the complementary sensitivity functions are:
22
T1 (s) =
8s2
+s+2
22 + 4s
T2 (s) = 2
8s + 5s + 2

8
You can see that the PD-controller does a much better job at getting it to the right steady state.

9
1.17 4A
Kp
L(s) = C(s)G(s) =
M s2
p K
L(s) M Kp
T (s) = = Kp
= 2+K
1 + L(s) 2
s + M M s p

1.18 4B

1.19 4C
The formula of T(s) is:
Kp /M
T (s) =
s2 + Kp /M
To find the poles: r
Kp
2 Kp
s + =0⇒s=± − j
M M
Filling in the values Kp = 250 and M=0.1 gives
r
2 250 250
s + =0⇒s=± − j
0.1 0.1
Simplifying this gives:
s2 + 2500 = 0 ⇒ s = ±50j
Increasing the gain Kp with a factor α results in:

• Larger imaginary parts of the poles: α times larger.
• The real part of the poles remains unchanged as it is not affected by the proportional controller.
• The step response will continue to oscillate because the poles are purely imaginary (real part
is 0).
• The frequency of oscillations in the step response is determined by the imaginary parts of the
poles. An increase in Kp leads to a higher frequency and a shorter period of oscillation in the
step response.

1.20 4D
The controller will always lead to oscillation around reference point, so it is not very usefull.

10
1.21 4E
From the phase condition of the open-loop transfer function at the gain crossover frequency:

̸ 2
L2 (jωgc ) = ̸ [Kp (Td · ωgc j + 1)] − ̸ [−M ωgc ] = −180◦ (1)

Given that the phase angle of the controller term is:

̸ [Kp (Td · ωgc j + 1)] = 45◦ (2)

Now de can derive Td


1
Td = ≈ 0.032 (3)
ωgc
And the magnitude:

Kp (Td ωgc j + 1) Kp j + 1 Kp 2
|L2 (jωgc )| = 2
= = 2
=1 (4)
−M ωgc −M ωgc M · ωgc
Solving for Kp yields:
2
M ωgc
Kp = √ ≈ 69.8 Degrees (5)
2
And for Kd :
Kp M ωgc
Kd = = √ ≈ 2.22 Degrees (6)
ωgc 2
The step response is damped better and more stable than in the previous question.

1.22 4F

11
• The gain crossover frequency is given by:

ωgc = 20 Hz · 2π = 40π rad/s

• The proportional gain, Kp , is calculated based on the magnitude condition at the gain crossover
frequency:
2
M ωgc
Kp = √ ≈ 1116.6
2
• The derivative time constant, Td , which is inversely proportional to the gain crossover fre-
quency, is:
1
Td = ≈ 0.00795
ωgc

• The phase margin is determined to be 45 degrees, which indicates the system has an appropriate
level of stability without excessive overshoot or poor damping.

• The step response of the system with the newly designed controller will have a faster response
time compared to the previous design but will not affect the overall behavior like overshoot or
damping.
• The Bode plot for the new controller design indicates a shift to the right on the frequency axis,
showing a speed increase by a factor of 4 in logarithmic scale.

12
1.23 4G

• The presence of a delay in the controlled system affects the phase of the system by introducing
additional phase loss.
• The frequency at which the delay starts to significantly impact the system is approximately

Td , where Td represents the delay in seconds.

• For a delay of 0.005 seconds, the impact on the first controlled system is minimal due to its
lower gain crossover frequency.
• Conversely, the second controlled system has a gain crossover frequency close to the critical
frequency where delay induces phase loss, making it more sensitive to the delay.
• A slight increase in delay can lead to instability in the faster second controlled system.

1.24 4H
1. There is a phase margin of 45◦ available before exceeding the stability limit.
2. The phase delay introduced by the time delay can be calculated as:
 
−jωgc − 2/Td
̸ Gd (jωgc ) = ̸
jωgc + 2/Td
   
−ωgc ωgc
= arctan − arctan
2/Td 2/Td
 
ωgc
= −2 arctan
2/Td
= −45◦

From this, the maximum time delay Td is derived as:


2
Td = tan(22.5◦ ) ≈ 0.026 sec (7)
ωgc

13
1.25 5A
Our plots:

14
In the design of the PD (Proportional-Derivative) controller for our system, we focused on achieving
a desired bandwidth while ensuring proper gain and phase margins. The PD controller was designed
with a specific cross-over frequency in mind, targeting the maximum phase lead at the frequency
ω = T10d .

Given the system’s open-loop transfer function G(s), we determined the desired cross-over frequency
ωgc = 0.5 × 2π rad/s, which relates to the derivative time Td as Td = ω10gc
. The magnitude of the
system’s transfer function G(s) at ωgc was used to calibrate the proportional gain Kp as follows:
1
Kp = (8)
10 · |G(jωgc )|
The derivative gain Kd is then determined by multiplying Kp by Td to provide the required phase
lead, which assists in reducing the system’s overshoot and settling time:

Kd = Td · Kp (9)
Using these parameters, we defined the transfer function for the PD controller as:
!
sTd + 1
Cpd (s) = Kp sTd (10)
100 + 1

We assessed the stability and performance of the system using Bode plots and the step response.
We aimed to provide a phase margin of approximately 60 degrees to ensure robustness against
model uncertainties and a gain margin much higher than 1 to ensure that the system does not reach
instability with slight gain increases.

1.26 5B
By analyzing T (s), we can infer certain characteristics of the system’s response. For our designed
controller, we can observe two key features:

• In the lower frequency region, the magnitude of the complementary sensitivity |T (jω)| ap-
proaches 1. This characteristic ensures that the step response of the system has a steady-state
value close to 1, as the complementary sensitivity function dictates the system’s ability to track
a reference input without steady-state error. Specifically, the magnitude plot of T begins to
decrease around the desired bandwidth frequency, which correlates with the system’s designed
performance specification.
• At higher frequencies, T (s) exhibits a resonance peak, which is due to the double unity gain
cross-over frequency. This peak is indicative of a frequency at which the system’s response
to a disturbance is amplified. Consequently, this results in an observable ripple in the step
response, which corresponds to the additional frequency content introduced by the resonance
peak. This ripple is an inherent trade-off for achieving a faster response in the time domain
and can be observed in the step response as oscillations or variations around the steady-state
value.

1.27 5C
Our controller:
wgc = 0.14 * 2 * np . pi

Td = 10 / wgc

G_mag_wgc = cm . freqresp ( G2 , wgc ) [0]

Kp = 1 / (10 * G_mag_wgc )
Kd = Td * Kp

With the plots:

15
The most notable difference between the Bode plots of G(s) and G2 (s) lies in the absence of a dip
in the frequency response for G2 (s). This dip is related to specific points in the system where zeros
are present. Without these zeros, as is the case with G2 (s), the phase of the system starts at a
disadvantage, losing 180 degrees right off the bat and continues to drop further near the frequencies
where the system’s poles are. This means we need to lower the bandwidth. With the peak in the
Bode plot of L needing to stay below 1. Aiming for a high-performance, fast-responding system
could lead to instability. We tune this sytem to be stable, but this tuning results in a less agile
response to inputs.

16
1.28 5D
Because the system has a double integrator. There is no need for a additional integrator to eliminate
the steady state error

17

You might also like