Title | CG lab 3: Digital Control Systems |
---|---|
Author | Johann Schwarze Fernández |
Course | Control and Guidance |
Institution | Universitat Politècnica de Catalunya |
Pages | 20 |
File Size | 932.4 KB |
File Type | |
Total Downloads | 219 |
Total Views | 273 |
Control and GuidanceB. in Aerospace Systems EngineeringPolytechnic University of CataloniaDIGITALCONTROL SYSTEMSJohann SchwarzeMay 2020Contents 1 Satellite attitude control 1 Plant stability 1.1 Open loop 1.1 Closed loop 1 Sampling time 1.2 Open loop 1.2 Closed loop 1 Root locus 1 FOH discretization...
Control and Guidance B.Sc. in Aerospace Systems Engineering Polytechnic University of Catalonia
DIGITAL CONTROL SYSTEMS
Johann Schwarze
May 2020
Contents 1 Satellite attitude control 1.1 Plant stability . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
1 2
1.1.1 Open loop . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 1.1.2 Closed loop . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 1.2 Sampling time . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
2 3 4
1.2.1 1.2.2
Open loop . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . Closed loop . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
4 5
1.3 Root locus . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 1.4 FOH discretization method . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
6 8
1.5 Adding a zero . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 1.6 Compensation . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 1.7 Dead-beat controller feasibility . . . . . . . . . . . . . . . . . . . . . . . . . . .
9 10 12
1.8 Dead-beat controller design . . . . . . . . . . . . . . . . . . . . . . . . . . . .
13
2 Additional considerations on the sampling period 2.1 Open loop . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 2.2 Closed loop . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
16 16 18
ii
1.
Satellite attitude control
Space vehicles need attitude control systems in order to orientate their antennas and solar panels in the correct direction so they can work properly. The movement of the spacecraft around the y-axis (pitch angle) can be described by the following expression: d2 θ(t) = MD + FC (t)d (1.1) dt2 where θ(t) is the spacecraft orientation given by the pitch angle, MD is the momentum of the perturbations and FC (t) is the applied thrust.
Figure 1.1: Space vehicle axis system and attitude If no perturbations are considered and initial conditions are settled to zero in the Laplace domain: d2 θ(t) = FC (t)d dt2 ˜ θ(s) 1 Gp (s) = = 2 ˜ s FC (s) 1
(1.2) (1.3)
The design requirements of our attitude control system are the following:
(1.4) (1.5)
ωn ≥ 0.3 rad/s ζ ≥ 0.5
1.1
Plant stability
1.1.1
Open loop
The transfer function Gp (s) presents a double pole exactly at s = 0 in open loop, so the system will be marginally unstable, as we can appreciate in the impulse response and the root locus and the gain and phase margins in its bode diagram.
Root Locus
Impulse Response 45
1.5
40
Imaginary Axis (seconds -1 )
1 35
25 20 15 10
0.5
0
-0.5
-1 5 0 5
10
15
20
25
30
35
-1.5 -0.15
40
-0.1
-0.05
0
0.05
0.1
Real Axis (seconds -1 )
Time (seconds)
((a)) Open loop impulse response
((b)) Open loop root locus Bode Diagram
10
Magnitude (dB)
0
0 -10 -20 -30
-40 -179
Phase (deg)
Amplitude
30
-179.5 -180 -180.5 -181 100
10 1
Frequency (rad/s)
((c)) Open loop bode diagram
2
0.15
1.1.2
Closed loop
Giving a unitary feedback to the previous system, the following closed loop transfer function is obtained: Gc (s) =
s2
1 +1
(1.6)
which presents a pair of complex conjugated poles s = ±i, being i the imaginary unit. Notice that these poles present real part equal 0, so the system will also be marginally unstable but this time it will show oscillations, as it can be observed again in the impulse response and the root locus and the gain and phase margins in its bode diagram.
Root Locus
Impulse Response 5
0.8
4
0.6
3
Imaginary Axis (seconds -1 )
1
0.2 0 -0.2 -0.4
2 1 0 -1 -2
-0.6
-3
-0.8
-4
-1 0
10
20
30
40
50
60
70
80
90
-5 -0.5
100
-0.4
Time (seconds)
-0.3
-0.2
-0.1
Bode Diagram
Magnitude (dB)
0.1
0.2
0.3
((e)) Closed loop root locus
150 100 50 0 -50 0 -45 -90 -135 -180 10-1
0
Real Axis (seconds -1 )
((d)) Closed loop impulse response
Phase (deg)
Amplitude
0.4
10 0
Frequency (rad/s)
((f)) Closed loop bode diagram
3
10 1
0.4
0.5
1.2
Sampling time
1.2.1
Open loop
Different values of sampling time Ts will be tested in order to study the dependence of the system on this parameter. For those values, the following discrete transfer functions are obtained in the open loop case: 0.5z+0.5 z 2 −2z +1
• Ts = 1 −→ G(z) = • Ts = 0.1 −→ G(z) =
0.005z+0.005 z 2 −2z+1
• Ts = 0.01 −→ G(z) =
5×10−5 z +5×10−5 z 2 −2z +1
Notice that all three transfer functions keep the same poles and zeros, being the proportional gain the only affected parameter, which decreases as sampling time decreases too. The obtained step responses for each sampling time value are shown in the plot below.
6
Step Response
×107
5
1.0276
T = 1s T = 0.1s T = 0.01s
1.0274
Amplitude
4
Amplitude
Step Response
×107 1.0278
T = 1s T = 0.1s T = 0.01s
3
1.0272 1.027
2 1.0268 1 1.0266 0 0
1000
2000
3000
4000
5000
6000
7000
8000
9000 10000
4531.5
Time (seconds)
4532
4532.5
4533
4533.5
Time (seconds)
((h)) Zoom
Figure 1.2: Open loop step response for different sampling times Notice that as the sampling time decreases, the system presents a more realistic behaviour and more similar to the continuous one.
4
1.2.2
Closed loop
In order to study the dependence on the sampling time Ts in a closed loop system, a unitary feedback will be added to the previous system. For the aforementioned sampling time values, the following discrete transfer functions are obtained in the closed loop case: 0.5z+0.5 • Ts = 1 −→ G(z) = z 2 −1.5 z +1.5 0.005z+0.005 • Ts = 0.1 −→ G(z) = z 2 −1.995z+1.005
• Ts = 0.01 −→ G(z) =
5×10−5 z +5×10−5 z 2 −2z+1
Notice that, in contrast with the open loop case, the poles do change with the sampling time this time. On the other hand, the proportional gain for each Ts value follows the same tendency as in the previous case. The obtained step responses for each sampling time value are shown in the plot below.
2.5
Step Response
×1026
Step Response
×1025 2
2
1.5 1 0.5
1
Amplitude
Amplitude
1.5
0.5 0
0 -0.5 -1
-0.5
-1.5 -2
-1
-2.5 -1.5 0
50
100
150
200
250
300
265
Time (seconds)
270
275
280
285
Time (seconds)
((a)) Ts = 1 s
((b)) Zoom
5
290
295
1.5
Step Response
×1027
Step Response
×1025 1
1
Amplitude
Amplitude
0.5
0
0
-0.5
-1 -1 -1.5 0
500
1000
1500
2000
2500
2298
2300
2302
2304
Time (seconds)
2306
2308
2310
2312
2314
2316
Time (seconds)
((c)) Ts = 0.1 s
((d)) Zoom
Step Response
Step Response
2.5 2.09 2 2.085
Amplitude
Amplitude
1.5
1
0.5
2.08
2.075
0 2.07 -0.5 0
10
20
30
40
50
60
70
80
90
100
34.2
34.3
Time (seconds)
34.4
34.5
34.6
34.7
34.8
34.9
Time (seconds)
((e)) Ts = 0.01 s
((f)) Zoom
Figure 1.3: Closed loop step response for different sampling times Notice that for Ts = 1 s no realistic behaviour is obtained.
1.3
Root locus
The root locus for different sampling time Ts values are shown in the following plots.
6
Root Locus
Root Locus 2.5
2.5 2
2
1.5
1.5 1
Imaginary Axis
Imaginary Axis
1 0.5 0 -0.5
0.5 0 -0.5
-1
-1
-1.5
-1.5
-2
-2
-2.5 -7
-2.5 -7
-6
-5
-4
-3
-2
-1
0
1
2
System: Gz1 Gain: 16 Pole: -3 Damping: -0.33 Overshoot (%): 300 Frequency (rad/s): 3.33
-6
-5
-4
-3
-2
-1
0
1
2
1
2
1
2
Real Axis
Real Axis
((a)) Ts = 1 s Root Locus
Root Locus
2.5
2.5
2
2
1.5
1.5 1
Imaginary Axis
Imaginary Axis
1
System: Gz2 Gain: 1.6e+03 Pole: -3 Damping: -0.33 Overshoot (%): 300 Frequency (rad/s): 33.3
0.5 0 -0.5
0.5 0 -0.5
-1
-1
-1.5
-1.5
-2
-2
-2.5 -7
-2.5 -7
-6
-5
-4
-3
-2
-1
0
1
2
-6
-5
-4
Real Axis
-3
-2
-1
0
Real Axis
((c)) Ts = 0.1 s Root Locus
Root Locus 2.5
2
2
1.5
1.5
1
1
Imaginary Axis
Imaginary Axis
2.5
0.5 0 -0.5
0.5 0 -0.5
-1
-1
-1.5
-1.5
-2
-2
-2.5 -7
-2.5 -7
-6
-5
-4
-3
-2
-1
0
1
2
Real Axis
System: Gz3 Gain: 1.6e+05 Pole: -3 - 3.73e-08i Damping: -0.33 Overshoot (%): 300 Frequency (rad/s): 333
-6
-5
-4
-3
-2
Real Axis
((e)) Ts = 0.01 s
Figure 1.4: Root locus for different sampling time values
7
-1
0
Apparently, the root locus is the same for all three cases. Nevertheless, the gain and frequency values increase as sampling time decreases, whereas the root locus shape, damping and overshoot values stay the same.
1.4
FOH discretization method
Discretizing the initial open loop continuous transfer function using the first order hold (FOH) method instead of the zero order hold (ZOH) method and using a sampling time Ts = 0.1 s, the following discrete transfer function is obtained. G(z) =
0.001667z 2 + 0.006667z + 0.001667 z 2 − 2z + 1
(1.7)
The plot below shows a comparison of the different step responses for the continuous transfer function and both aforementioned discretization methods.
Step Response
Step Response
250 53
Continuous ZOH FOH
200
Continuous ZOH FOH
52
Amplitude
Amplitude
51 150
100
50 49 48
50
47 46
0 0
2
4
6
8
10
12
14
16
18
20
9.7
Time (seconds)
9.8
9.9
10
10.1
10.2
Time (seconds)
Figure 1.5: Step response for different discretization methods. As it can be observed, the FOH discretization method guarantees a good global approximation as does the ZOH method. In order to study again the effect of different sampling times on the FOH discretized step response, we will try again with the previous section values, which are shown in the following figure.
8
Step Response
Step Response
250 88
Ts = 1s Ts = 0.1s
86
Ts = 0.01s
200
Ts = 1s Ts = 0.1s Ts = 0.01s
Amplitude
Amplitude
84 150
100
82 80 78
50
76 74
0 0
2
4
6
8
10
12
14
16
18
20
12.2
12.4
12.6
Time (seconds)
12.8
13
13.2
Time (seconds)
Figure 1.6: FOH step response for different sampling time values. As in the ZOH method case, as the sampling time decreases, the step response presents a better approximation of the continuous case.
1.5
Adding a zero
From now on, we will focus on the ZOH discretization method with a sampling time Ts = 0.1 s. The chosen system presents a double pole at z = 1 and a zero at z = −1, as it can be observed in the p-z diagram and root locus below.
Root Locus
Pole-Zero Map 1
2.5
0.8
2
0.6
1.5 1
Imaginary Axis
Imaginary Axis
0.4 0.2 0 -0.2
0.5 0 -0.5
-0.4
-1
-0.6
-1.5
-0.8 -1 -1
-2
-0.8
-0.6
-0.4
-0.2
0
0.2
0.4
0.6
0.8
-2.5 -7
1
Real Axis
-6
-5
-4
-3
-2
-1
0
1
2
Real Axis
((a)) p-z diagram.
((b)) Root locus.
As we can appreciate, the key to stabilize the plant seems to be adding a zero between z = −1 and z = 1. In order to fulfill the design requirements, a zero at z = −0.15 is added, so the values for the natural frequency and damping factor are respectively: 9
(1.8)
ωn = 36.7 rad/s
(1.9)
ζ = 0.517 The root locus with the added zero is shown in the figure below. 1
Root Locus Editor for Open Loop 1(OL1)
0.8 0.6 0.4
Imag Axis
0.2 0 -0.2 -0.4 -0.6 -0.8 -1 -1.5
-1
-0.5
0
0.5
1
Real Axis
Figure 1.7: Root locus with zero at z = −0.15. However, a requirement for the system to be causal is to have more poles than zeros, so anyway adding only a zero would not be a feasible solution.
1.6
Compensation
Using a differentiator implies to add a zero at z = 0, so the same situation as in the previous section is achieved; no zeros can be added without adding poles if we want to keep the system causal and feasible. In order to properly stabilize the plant, a lead compensator can be used, with proportional gain = 3, a real zero at z = 0.9 and a real pole at z = 0.3. The root locus with the lead compensator is shown in the figure below.
10
Root Locus Editor for Open Loop 1(OL1)
1 0.8 0.6 0.4
Imag Axis
0.2 0 -0.2 -0.4 -0.6 -0.8 -1 -1.5
-1
-0.5
0
0.5
1
Real Axis
Figure 1.8: Root locus with lead compensator. Notice that the pink points stay within the unitary circumference whereas they also stay in the white area, which ensures stability and satisfying the design requirements respectively. The lead controller transfer functions stands for: C(z) = 3 with w =
z−1 Ts
1 + 1w 1 + 0.14w
(1.10)
and Ts = 0.1 s.
The response of the system to a discrete step with θref = 12° is shown in the following plot: Step Response 16 14
Amplitude
12 10 8 6 4 2 0 0
0.5
1
1.5
2
Time (seconds)
11
2.5
3
3.5
The response presents the following overshoot and peak time:
M = 15.24% tp = 0.9 s
1.7
(1.11) (1.12)
Dead-beat controller feasibility
The global closed loop transfer function of the system can be defined as: T (z) =
C(z )G(z) 1 + C(z )G(z)
(1.13)
From this point, the controller transfer function C(z) can be isolated: C(z) =
T (z) G(z)(1 − T (z))
(1.14)
If the global closed loop transfer function T (z) operates as a delay of a sampling period, the transfer function will stand for: T (z) =
1 z
(1.15)
As the global closed loop transfer function is known and the discrete plant transfer functions for different sampling time values were computed in section 1.2.2, now the controller transfer functions for different sampling times can be expressed as: 3
2
z −2z +z • Ts = 1 −→ C(z) = 0.5z 3 −3.886 ×10−6 z 2 −0.5z
• Ts = 0.1 −→ C(z) =
z 3 −2z 2 +z 0.005z 3 −2.602×10−1...