Regelungstechnik 2 für EIT Teil 4/5: Z-Transformation und Stabilität
z = e sTA
Version 1.0 Prof. Dr. David Zogg Institut für Automation IA Hochschule für Technik Fachhochschule Nordwestschweiz Windisch, Januar 2012
RT2, Teil 4/5, Z-Transformation und Stabilität – Prof. Dr. D. Zogg
31.01.2012
1/19
Dokumentenkontrolle
Änderungen Version
Datum
Autoren
Bemerkung
1.0
19.01.2012
David Zogg
Erstellung
RT2, Teil 4/5, Z-Transformation und Stabilität – Prof. Dr. D. Zogg
31.01.2012
2/19
1.
Zweck
4
2.
Referenzen
4
3.
Symbol- und Abkürzungsverzeichnis
4
4.
Einführung
6
4.1.
Lernziele
6
4.2.
Von der rekursiven Darstellung zur Z-Transformation
6
4.3.
Z-Transformation des vollständigen PID-Reglers
7
4.4.
Z-Transformation allgemein
8
4.5.
Zusammenhang zwischen Z- und S-Bereich
8
4.6.
Herleitung der Approximation nach Rechteckregel
9
4.7.
Herleitung der bilinearen Approximation
10
4.8.
Übungen zur Z-Transformation
11
4.9.
Zusammenfassung Laplace- und Z-Transformation
12
4.10.
Z-Transformation in MATLAB
12
4.11.
Stabilitätskriterium in der Z-Ebene
14
4.12.
Beispiel in MATLAB zur Stabilitätsanalyse in der Z-Ebene
16
4.13.
Zusammenfassung
18
RT2, Teil 4/5, Z-Transformation und Stabilität – Prof. Dr. D. Zogg
31.01.2012
3/19
1.
Zweck
Das vorliegende Skript dient als Grundlage für das Modul „Regelungstechnik 2“ (rt2) im 6. Semester des Studiengangs Elektro- und Informationstechnik (EIT). Im Modul „Regelungstechnik 1“ (rt1) des 5. Semesters wurde die Auslegung von zeitkontinuierlichen PID- und Zustandsreglern behandelt. Das vorliegende Modul „Regelungstechnik 2“ (rt2) befasst sich nun mit der zeitdiskreten Darstellung. In den bisherigen Teilen 1 bis 3 wurden die Grundlagen der Signalabtastung im Zeitbereich und Frequenzbereich erarbeitet. Im vorliegenden vierten Teil wird die Z-Transformation zur Umrechnung zwischen zeitkontinuierlichem und zeitdiskretem Fall eingeführt. Zudem wird in einem kurzen fünften Teil die Stabilität im zeitdiskreten Fall anhand der Pollage in der Z-Ebene behandelt. Der vierte und fünfte Teil ist hier in einem Skript-Teil zusammengefasst.
2.
Referenzen
[ 1 ] H. Mann, H. Schiffelgen, R. Froriep: Einführung in die Regelungstechnik, 11. Auflage, Hanser Verlag, München 2009 [ 2 ] M. Reuter, S. Zacher: Regelungstechnik für Ingenieure, 12. Auflage, Vieweg+Teubner Verlag, Wiesbaden 2008 [ 3 ] H. Gassmann: Theorie der Regelungstechnink, 2. Auflage, Verlag Harri Deutsch, Rapperswil/Frankfurt 2003 [ 4 ] H.P. Geering: Regelungstechnik, 3. Auflage, Springer Verlag, Zürich/Berlin 1994
3.
Symbol- und Abkürzungsverzeichnis
A
Aktuator
A/D
Analog-Digital-Wandler
CAN
Controller Area Network (Realtime-Bussystem)
D/A
Digital-Analog-Wandler
e
Regelfehler
FOH
First Order Hold (Abtastung erster Ordnung)
G
Strecke (Übertragungsfunktion)
i
Imaginär-Anteil
K
Regler (Übertragungsfunktion)
KP
Verstärkung P-Anteil
RT2, Teil 4/5, Z-Transformation und Stabilität – Prof. Dr. D. Zogg
31.01.2012
4/19
KI
Verstärkung I-Anteil
KD
Verstärkung D-Anteil
LZI
Linear zeitinvariant (Übertragungsglied)
MU
Messumformer
PWM
Pulse Width Modulation (Pulsbreitenmodulation)
S
Sensor
s
Laplace-Operator (zeitkontinuierlich)
TA
Abtastzeit
TT
Totzeit
TN
Nachstellzeit (I-Anteil)
TV
Vorhaltezeit (D-Anteil)
u
Eingangsgrösse (Stellgrösse, Steuergrösse)
w
Führungsgrösse (Sollwert)
x
Zustandsgrösse
y
Ausgangsgrösse (Messgrösse, Istwert)
z
Z-Operator (zeitdiskret, „Time Shift Operator“)
ZOH
Zero Order Hold (Abtastung nullter Ordnung)
ϕ
Phasendrehung / Phasenverschiebung (rad oder °)
ω
Kreisfrequenz (rad/s)
RT2, Teil 4/5, Z-Transformation und Stabilität – Prof. Dr. D. Zogg
31.01.2012
5/19
4.
Einführung
4.1. Lernziele Teil 4 Lernziel Sinn und Zweck der Z-Transformation kennen Zeitdiskrete Darstellung im Z-Bereich beherrschen Wichtigste Transformationen zwischen Laplace(s)und Z-Bereich durchführen können Z-Transformation in MATLAB ausführen können
Taxonomiestufe (Bloom) Verständnis Anwendung Anwendung
Teil 5 Lernziel Zusammenhang zwischen Z- und Laplace-Ebene kennen Stabilität und Pole im Z-Bereich beurteilen können
Taxonomiestufe (Bloom) Verständnis Anwendung/Analyse
4.2. Von der rekursiven Darstellung zur Z-Transformation Wir gehen von der rekursiven Darstellung des PID-Reglers aus (Skript Teil 2, Abschnitt 4.5). Hier ist nochmals die rekursive Darstellung des I-Anteils gegeben (Rechteckregel): (1)
u I ,k = u I ,k −1 + K I ⋅ TA ⋅ ek
Nun wollen wir direkt Anhand dieses Beispiels die Z-Transformation kennen lernen. Diese Transformation dient dazu, die zeitlichen Verschiebungen zwischen den Abtastzeitpunkten darzustellen. In Gleichung ( 1 ) wird die Stellgrösse uI zu den Zeitpunkten k-1 und k abgetastet (uI,k-1 und uI,k) sowie der Regelfehler e zum Zeitpunkt k (ek). Zunächst zur Definition der Z-Transformation in Gleichung ( 2 ). Der z-Operator ist als Zeit-Verschiebungs-Operator oder engl. „Time Shift Operator“ definiert. Die abgetastete Grösse x zum Abtastzeitpunkt k-1 (xk-1) kann demnach wie folgt dargestellt werden: (2)
xk −1 = z −1 ⋅ x
z-1 bedeutet, dass 1 Zeitschritt in die Vergangenheit „geschoben“ wird (also k-1). Im ZBereich (rechte Seite der Gleichung) wird nur noch die Grösse x mit einer Funktion in z multipliziert. Dies ist ähnlich wie im Laplace-Bereich (s-Bereich), welchen wir von früher kennen. Anstelle der Laplace-Transformation im zeitkontinuierlichen Fall tritt im zeitdiskreten Fall also die Z-Transformation. Wenn wir 2 Zeitschritte zurück nach k-2 schieben, folgt: (3)
xk − 2 = z − 2 ⋅ x
…oder für den Wert zum Zeitpunkt k (Gegenwart): (4)
xk = z 0 ⋅ x = x
RT2, Teil 4/5, Z-Transformation und Stabilität – Prof. Dr. D. Zogg
31.01.2012
6/19
Jetzt können wir die Definition der Z-Transformation ( 2 ) auf die rekursive Darstellung des I-Anteils in Gleichung ( 1 ) anwenden: (5)
u I = z −1u I + K I ⋅ TA ⋅ e
Obige Gleichung wird mit z multipliziert: (6)
z ⋅ u I = u I + K I ⋅ TA ⋅ z ⋅ e
…und nachher nach uI aufgelöst: (7)
u I = K I ⋅ TA ⋅
z ⋅e z −1
Somit haben wir den zeitdiskreten I-Anteil nach der Rechteckregel im Z-Bereich aufgeschrieben. Damit wurde die Z-Transformation für Systeme im Prinzip schon verstanden. In den folgenden Abschnitten wollen wir dies auf verschiedene Systeme anwenden und noch etwas ausweiten.
4.3. Z-Transformation des vollständigen PID-Reglers Wir nehmen nun die Gleichung des vollständigen, zeitdiskreten PID-Reglers aus Skript Teil 2, Abschnitt 4.5 (Rechteckregel): (8)
u k = u k −1 + b0 ⋅ ek + b1 ⋅ ek −1 + b2 ⋅ ek − 2
mit den Koeffizienten: (9)
b0 = K P + K I TA +
KD TA
b1 = − K P − 2
KD TA
b2 =
KD TA
Nun führen wir für die Gleichung ( 8 ) die Z-Transformation aus: ( 10 )
u = z −1u + b0 ⋅ e + b1 ⋅ z −1e + b2 ⋅ z −2 e
…multipliziert mit z2: ( 11 )
z 2 u = zu + b0 ⋅ z 2 e + b1 ⋅ ze + b2 ⋅ e
…und aufgelöst nach u: ( 12 )
u=
b0 ⋅ z 2 + b1 ⋅ z + b2 ⋅e z ⋅ ( z − 1)
Die Übertragungsfunktion des Reglers K(z) im Z-Bereich ist also gegeben durch: ( 13 )
K ( z) =
b0 ⋅ z 2 + b1 ⋅ z + b2 z ⋅ ( z − 1)
RT2, Teil 4/5, Z-Transformation und Stabilität – Prof. Dr. D. Zogg
31.01.2012
7/19
4.4. Z-Transformation allgemein Ein allgemeines lineares, zeitinvariantes (LZI) Übertragungsglied mit Eingangsgrösse u und Ausgangsgrösse y lautet in zeitdiskreter Form (mit den zeitinvarianten Parametern ai, bi): ( 14 )
a n ⋅ y k −n + an −1 ⋅ y k −n +1 + ... + a1 ⋅ y k −1 + yk = bm ⋅ u k −m + bm−1 ⋅ u k −m +1 + ... + b1 ⋅ u k −1 + b0 ⋅ u k
Wir führen nun die Z-Transformation aus und erhalten: ( 15 )
a n ⋅ z − n y + an −1 ⋅ z − n +1 y + ... + a1 ⋅ z −1 y + y = bm ⋅ z − mu + bm−1 ⋅ z − m+1u + ... + b1 ⋅ z −1u + b0 ⋅ u
…aufgelöst nach der Ausgangsgrösse y: ( 16 )
y=
b0 + b1 ⋅ z −1 + ... + bm −1 ⋅ z − m +1 + bm ⋅ z − m ⋅u 1 + a1 ⋅ z −1 + ... + an −1 ⋅ z − n +1 + an ⋅ z − n 1444444 424444444 3 G( z)
…womit die allgemeine Übertragungsfunktion G(z) des zeitdiskreten LZI-Gliedes im ZBereich gegeben ist.
4.5. Zusammenhang zwischen Z- und S-Bereich Der allgemeine Zusammenhang zwischen Z-Bereich und Laplace-Bereich (S-Bereich) ist wie folgt definiert (TA = Abtastzeit): ( 17 )
z = e sTA
In ( 17 ) ist sofort die Ähnlichkeit zum Totzeitelement (Skript Teil 2, Abschnitt 4.3) ersichtlich! Das ist kein Zufall, denn es handelt hier um eine „Abtastung“ zwischen zeitkontinuierlichem s-Bereich und zeitdiskretem z-Bereich. Um von einer Übertragungsfunktion im s-Bereich G(s) in den z-Bereich G(z) zu gelangen (Zeitdiskretisierung), brauchen wir die Umkehrfunktion von ( 17 ): ( 18 )
s=
1 ⋅ ln( z ) TA
Die Gleichung ( 18 ) kann jedoch nicht direkt verwendet werden, sondern sie muss approximiert werden. Es bestehen verschiedene Approximationen, welche wir nun näher kennenlernen wollen (siehe auch Buch [ 1 ], Tabelle/Bild 6.15, S. 250). Die erste Approximation läuft nach der bekannten Rechteckregel. Wir haben diese bereits bei der zeitdiskreten Integration im Skript Teil 2, Abschnitt 4.4 kennengelernt. Man unterscheidet Vorwärts-Rechteckregel ( 19 ) und Rückwärts-Rechteckregel ( 20 ). Man kann diese Approximation auch als Euler-Methode bezeichnen. In MATLAB werden sie als ZOH (Zero-Order Hold) bezeichnet. ( 19 )
( 20 )
z −1 TA z −1 s≈ TA ⋅ z s≈
RT2, Teil 4/5, Z-Transformation und Stabilität – Prof. Dr. D. Zogg
31.01.2012
8/19
Genauer ist die bilineare Approximation ( 21 ), welche auch als Tustin-Approximation bezeichnet wird. Zudem entspricht sie der Trapezregel für die Integration, welche wir auch bereits kennen. ( 21 )
s≈
2 z −1 TA z + 1
In MATLAB wird diese Methode als TUSTIN bezeichnet. Folgende Abschnitte geben eine kurze Herleitung obiger Formeln. Damit wird das Verständnis für die Zusammenhänge zu Rechteckregel, Euler und Trapezregel gelegt.
4.6. Herleitung der Approximation nach Rechteckregel Zur Herleitung der Rückwärts-Rechteckregel ( 20 ) betrachten wir zunächst Abbildung 1, welche wir bereits in einer ähnlichen Form aus Skript Teil 2, Abschnitt 4.4 kennen (Integral nach Rechteckregel).
Abbildung 1: Integral nach Rückwärts-Rechteckregel (blau) bzw. Differenzenbildung nach Euler (rot).
Es geht nun darum, einen reinen Integrator im Z-Bereich abzubilden. Dazu betrachten wir zunächst das zeitkontinuierliche System, welches nur aus einem Integrator besteht (Eingangsgrösse u, Ausgangsgrösse y): ( 22 )
1 y= u s
∫
y = u ⋅ dt
Bilden wir die Ableitung davon, so folgt: ( 23 )
y& = u
Nun diskretisieren wir die Ableitung von y in ( 23 ), indem wir die Differenzengleichung nach Euler aufstellen: ( 24 )
yk − y k −1 ≈ uk TA
In der Approximation ( 24 ) haben wir den aktuellen Abtastzeitpunkt k und den alten Abtastzeitpunkt k-1 genommen. Wir haben also die „Rückwärts-Regel“ angewandt, oder bei Euler spricht man auch von „Links-Regel“ (alter Abtastzeitpunkt liegt links vom aktuellen). Im nächsten Schritt lösen wir Gleichung ( 24 ) nach der gesuchten Ausgangsgrösse yk auf: ( 25 )
yk ≈ TA ⋅ u k + y k −1
RT2, Teil 4/5, Z-Transformation und Stabilität – Prof. Dr. D. Zogg
31.01.2012
9/19
Gleichung ( 25 ) ist gerade die (rekursive) Integration nach der Rechteckregel! Somit ist der Zusammenhang zwischen Differenzenbildung nach Euler und Integration nach Rechteckregel nachgewiesen. Uns interessiert nun die Z-Transformation der Gleichung ( 25 ): ( 26 )
y = TA ⋅ u + z −1 y
…multipliziert mit z: ( 27 )
zy = TA ⋅ zu + y
…und aufgelöst nach y: ( 28 )
y=
TA ⋅ z u z −1
Um den Zusammenhang zwischen Z- und S-Bereich herzuleiten, vergleichen wir einfach Gleichung ( 28 ) mit Gleichung ( 22 ). Es folgt für s: ( 29 )
s≈
z −1 TA ⋅ z
Somit haben wir die Rückwärts-Rechteckregel nach der Approximation ( 20 ) hergeleitet. Übung: Leiten Sie nach dem gleichen Prinzip die Approximation nach der VorwärtsRechteckregel her.
4.7. Herleitung der bilinearen Approximation Die Herleitung der bilinearen Approximation ( 21 ) basiert auf der mathematischen Reihenentwicklung des natürlichen Logarithmus im Ausdruck ( 18 ): ( 30 )
s=
1 2 ⋅ ln( z ) = TA TA
z − 1 1 (z − 1)3 1 (z − 1)5 + + + ... 3 5 z + 1 3 ( z + 1) 5 (z + 1)
Für die Approximation nehmen wir nur den ersten Term: ( 31 )
s≈
2 z − 1 TA z + 1
Damit haben wir die bilineare Approximation ( 21 ) bereits hergeleitet. Uns interessiert nun aber der Zusammenhang zur Trapezregel. Dazu nehmen wir wieder die Gleichung ( 22 ) des reinen Integrators und setzen die Approximation ( 31 ) anstelle von s ein: ( 32 )
1 T z + 1 y= u≈ A ⋅u s 2 z − 1
…und ausmultipliziert:
RT2, Teil 4/5, Z-Transformation und Stabilität – Prof. Dr. D. Zogg
31.01.2012
10/19
( 33 )
zy − y =
TA [zu + u ] 2
…dividiert durch z: ( 34 )
y − z −1 y =
TA u + z −1u 2
[
]
…und rücktransformiert in den Zeitbereich: ( 35 )
yk =
TA [uk + uk −1 ] + y k −1 2
Wenn wir Gleichung ( 35 ) näher betrachten, erkennen wir die (rekursive) Trapezregel (vgl. Skript Teil 2, Abschnitt 4.4, Integral nach Trapezregel), welche in folgender Abbildung dargestellt ist:
Abbildung 2: Integral nach Trapezregel (blau)
4.8. Übungen zur Z-Transformation Mit den Approximationen ( 19 ) bis ( 21 ) können Systeme nun auf sehr elegante Weise vom zeitkontinuierlichen S-Bereich in den zeitdiskreten Z-Bereich transformiert werden, also diskretisiert werden. Dazu dienen folgende Übungen: •
PI-Regler diskretisieren nach bilinearer Approximation (Tustin): 1 2 z −1 s≈ K ( s ) = K p (1 + ) TA z + 1 TN ⋅ s
•
PI-Regler diskretisieren nach Vorwärts-Rechteckregel: 1 z −1 K ( s ) = K p (1 + ) s≈ TN ⋅ s TA
•
PD-Regler diskretisieren nach Rückwärts-Rechteckregel: z −1 K ( s) = K p (1 + TV ⋅ s ) s≈ TA ⋅ z
•
PID-Regler diskretisieren nach Rückwärts-Rechteckregel: 1 z −1 K ( s ) = K p (1 + + TV ⋅ s ) s≈ TN ⋅ s TA ⋅ z
•
* PID-T1-Regler diskretisieren nach bilinearer Approximation für I-Anteil und Rückwärts-Rechteckregel für D-T1-Anteil: T ⋅s 1 2 z −1 z −1 K ( s ) = K p (1 + + V ) s≈ (I-Anteil) s ≈ (D-T1-Anteil) TN ⋅ s T1 ⋅ s + 1 TA z + 1 TA ⋅ z
* Das Resultat der letzten Übung ist im Buch [ 1 ], Beispiel 6.3, Seite 250 zu finden. Tabelle/Bild 6.16 auf Seite 252 gibt eine Übersicht zu diskretisierten PID-Algorithmen.
RT2, Teil 4/5, Z-Transformation und Stabilität – Prof. Dr. D. Zogg
31.01.2012
11/19
4.9. Zusammenfassung Laplace- und Z-Transformation Folgende Abbildung gibt eine Übersicht der Transformationen: • • •
•
Im zeitkontinuierlichen Bereich (links) führt die Laplace-Transformation vom Zeitbereich (Zeit t) in den s-Bereich. Im zeitdiskreten Bereich (rechts) führt die Z-Transformation vom abgetasteten Zeitbereich (Abtastzeitpunkte k) zum z-Bereich. Vom zeitkontinuierlichem zum zeitdiskretem Bereich kann entweder direkt im Zeitbereich diskretisiert werden (oben) oder vom s- in den z-Bereich umgerechnet werden über die Approximationen ( 19 ) bis ( 21 ). Umgekehrt findet der Übergang vom zeitdiskreten in den zeitkontinuierlichen Bereich entweder über das „Halteglied“ im Zeitbereich oder die Funktion
z = e sTA vom z- zum s-Bereich statt.
Abbildung 3: Übersicht der Transformationen
4.10. Z-Transformation in MATLAB In MATLAB® kann eine Übertragungsfunktion direkt im Z-Bereich definiert werden. Dazu verwenden wir wieder den Regelkreis der Kaffeemaschine aus Skript, Teil 1. In Skript, Teil 3, Abschnitt 4.8 haben wir dafür bereits einen zeitdiskreten Regler ausgelegt, und zwar mit der TUSTIN-Methode. Wir haben dort den zeitdiskreten Regler Kz also aus dem zeitkontinuierlichen Regler K berechnet. Hier wollen wir nun den zeitdiskreten PID-Regler Kz gemäss Gleichung ( 13 ) direkt im Z-Bereich definieren. Wir verwenden dazu folgende MATLAB-Befehle: Funktion Definition des Reglers im Z-Bereich Gleichung ( 13 ) mit Koeffizienten ( 9 )
Reglereinstellung Abtastzeit
MATLAB-Befehl z = tf(‘z’, TAbtast) b0 = Kp+Ki*TAbtast+Kd/TAbtast b1 = -Kp-2*Kd/Tabtast b2 = Kd/Tabtast Kz = (b0*z^2+b1*z+b2)/(z*(z-1)) Kp = 0.5; Ki = 0.2; Kd = 0.3; TAbtast = 0.1
File: RT2_Lektion4_Regler_ZTrafo_Kaffeemaschine.m (als Vorlage kann RT2_Lektion3_Regelkreis_Diskret_Kaffeemaschine.m verwendet werden)
RT2, Teil 4/5, Z-Transformation und Stabilität – Prof. Dr. D. Zogg
31.01.2012
12/19
Im Gegensatz zur TUSTIN-Methode verbirgt sich hinter Gleichung ( 13 ) „nur“ die Rechteckregel, welche eine tiefere Robustheit aufweist (grössere Phasendrehung). Zudem ist der D-Anteil bei hohen Frequenzen unbegrenzt (ohne T1-Glied). Dies ist in untenstehenden Bode-Plots ersichtlich. Der Bode-Plot des Reglers ist in der folgenden Abbildung dargestellt (mit einer Abtastzeit von 0.1 sec).
Bode Diagram
50
Magnitude (dB)
40 30 20 10 0 -10 90 K Kz
Phase (deg)
45
0
-45
-90 -3 10
-2
10
-1
0
10
10
1
10
2
10
3
10
Frequency (rad/s)
Abbildung 4: Bode-Plot des zeitkontinuierlichen (K blau) und des zeitdiskreten PID-Reglers nach Rechteckregel (Kz rot).
Abbildung 4 oben wird nun mit Abbildung 10 aus Skript Teil 3 verglichen. Wiederum ist hier bei ca. 30 rad/s die Shannon-Frequenz ersichtlich. Der D-Anteil ist hier nicht begrenzt (steigt bei hohen Frequenzen ins Unendliche an), was in der Realität nicht umsetzbar wäre. Unterhalt der Shannon-Frequenz sehen wir einen deutlich früher einsetzenden Phasenabfall in Abbildung 4. Der Grund liegt in der verwendeten Rechteckregel. Abbildung 5 zeigt den Bode-Plot des offenen Kreises (open loop L). Im Vergleich zur Abbildung 11 aus Skript Teil 3 ist hier eine etwas reduzierte Phasenreserve ersichtlich (aber immer noch knapp 90°). Oberhalb der Durchtrittsfrequenz nimmt der Phasenabfall deutlich zu.
RT2, Teil 4/5, Z-Transformation und Stabilität – Prof. Dr. D. Zogg
31.01.2012
13/19
Bode Diagram
100
Magnitude (dB)
50
0
-50
-100 -45
Phase (deg)
-90 L Lz
-135
-180
-225 -3 10
-2
10
-1
0
10
10
1
10
2
10
3
10
Frequency (rad/s)
Abbildung 5: Bode-Plot des zeitkontinuierlichen (L blau) und des zeitdiskreten offenen Loops nach Rechteckregel (Lz rot).
Übung: Zeichnen Sie die Bode-Plots für eine 10-fach höhere Abtastfrequenz auf (Abtastzeit = 0.01 sec) und erklären Sie den Einfluss auf die Robustheit!
4.11. Stabilitätskriterium in der Z-Ebene Als nächster Schritt wollen wir nun ein Kriterium für die Stabilität eines Systems im ZBereich entwickeln. Wir erinnern uns aus dem zeitkontinuierlichen Bereich an die Pollage in der S-Ebene, Abbildung 6. Die Pole in der linken Halbebene sind stabil (negativer Realteil σ) und die Pole in der rechten Halbebene sind instabil (positiver Realteil σ). Die Lage in der imaginären Richtung (iω) gibt die Schwingfähigkeit an.
Abbildung 6: Pole in der S-Ebene (Realteil σ, Imaginärteil iω)
RT2, Teil 4/5, Z-Transformation und Stabilität – Prof. Dr. D. Zogg
31.01.2012
14/19
In Gleichung ( 17 ) ist der Zusammenhang zwischen Z- und S-Bereich gegeben. Wir setzen für den Laplace-Operator s nun s = σ + iω und erhalten folgende Transformation: ( 36 )
z = e sTA = e (σ +iω )TA = eσTA ⋅ e iωTA
Nun setzen wir die Pole aus Abbildung 6 in Gleichung ( 36 ) ein. Für den Grenzfall eines Pols auf der imaginären Achse mit σ = 0 erhalten wir: ( 37 )
z (σ = 0,ω ) = e 0TA ⋅ e iωTA = 1 ⋅ eiωTA
Wir „landen“ also auf dem Einheitskreis mit Radius 1. Die Phase ist ωTA und entspricht dem Winkel in der Z-Ebene. Die Stabilitätsgrenze wird also von der vertikalen Linie in einen Einheitskreis verformt. Für einen Pol in der linken Halbebene mit σ < 0 von Abbildung 6 folgt:
( 38 )
z (σ < 0, ω ) = e
− σ TA
1
⋅ e iωTA = e
σ TA
⋅ e iωTA
Dieser hat also einen Radius < 1 und liegt innerhalb des Einheitskreises. Im Gegensatz dazu werden Pole in der rechten Halbebene mit σ > 0 in Pole ausserhalb des Einheitskreises transformiert. Somit folgt das Stabilitätskriterium in der Z-Ebene gemäss Abbildung 7.
Abbildung 7: Pole in der Z-Ebene
RT2, Teil 4/5, Z-Transformation und Stabilität – Prof. Dr. D. Zogg
31.01.2012
15/19
4.12. Beispiel in MATLAB zur Stabilitätsanalyse in der Z-Ebene Wir wollen nun die Pollage unseres bekannten Regelkreises der Kaffeemaschine aus Abschnitt 4.10 mit MATLAB® in der Z-Ebene analysieren. Wir verwenden dazu folgende MATLAB-Befehle: Funktion Pole im Z-Bereich manuell aus dem S-Bereich berechnen Pole mit MATLAB-Befehl berechnen (im S- und Z-Bereich)
Nullstellen mit MATLAB-Befehl berechnen (im S- und Z-Bereich) Pole-Zero-Map
MATLAB-Befehl exp(ai*Tabtast) für jeden Pol ai des S-Bereichs pole(G) S-Bereich pole(Gz) Z-Bereich auf Regelstrecke G/Gz, Open Loop L/Lz, und Closed Loop T/Tz anwenden zero(G) S-Bereich zero(Gz) Z-Bereich auf Regelstrecke G/Gz, Open Loop L/Lz, und Closed Loop T/Tz anwenden pzmap(G) S-Bereich pzmap(Gz) Z-Bereich auf Regelstrecke G/Gz, Open Loop L/Lz, und Closed Loop T/Tz anwenden
File: RT2_Lektion4_Stabilitaet_ZBereich_Kaffeemaschine.m (als Vorlage kann RT2_Lektion4_Regler_ZTrafo_Kaffeemaschine.m verwendet werden) Folgend sind die Plots der Pole-Zero-Maps für die Regelstrecke, Open Loop und Closed Loop dargestellt, und zwar für den zeitkontinuierlichen Fall (S-Ebene, links) und den zeitdiskreten Fall (Z-Ebene, rechts). Für die Regelstrecke (Abbildung 8) ist die Pollage einfach nachzurechnen. Aus der zeitkontinuierlichen Darstellung ( 39 ) sind die Pole s1 und s2 durch ( 40 ) gegeben. G ( s) = ( 39 )
( 40 )
b ( s + a1 ) ⋅ ( s + a 2 )
s1 = −a1 = −1
s2 = −a2 = −1
Die Pole im zeitdiskreten Bereich können einfach durch folgende Formel aus dem zeitkontinuierlichen Bereich berechnet werden: ( 41 )
z1 = e − a1⋅TA = e −1⋅0.1 = 0.9048
z2 = e − a2⋅TA = e −1⋅0.1 = 0.9048
Wir haben also einen Doppelpol bei 0.9048 (Abbildung 8 rechts). Offenbar hat es im zeitdiskreten Fall auch Nullstellen, welche durch die Diskretisierung entstanden sind. Dazu muss die Übertragungsfunktion ( 39 ) diskretisiert werden, und zwar nach der TUSTIN-Approximation (diese wurde in MATLAB ja verwendet). Setzt man für s die Approximation ( 21 ) ein, folgt: ( 42 )
b
G( z) ≈ (
2 z −1 2 z −1 + a1 ) ⋅ ( + a2 ) TA z + 1 TA z + 1
RT2, Teil 4/5, Z-Transformation und Stabilität – Prof. Dr. D. Zogg
31.01.2012
16/19
…und nach kurzem Umformen (Übung!): ( 43 )
G( z) ≈
TA ( z + 1)b
[(2 + TAa1 ) z − (2 −T Aa1 )][(2 + TA a2 ) z − (2 −T Aa2 )]
Also für die Nullstellen im Z-Bereich (Zähler = 0 gesetzt): ( 44 )
z1 = z2 = −1
… und die Pole im Z-Bereich (Nenner = 0 gesetzt): ( 45 )
z1 =
2 − TAa1 2 − 0.1 ⋅1 1.9 = = = 0.9048 2 + TAa1 2 + 0.1 ⋅1 2.1
z2 =
2 − TAa 2 2 − 0.1 ⋅1 1.9 = = = 0.9048 2 + TA a2 2 + 0.1 ⋅ 1 2.1
Das Resultat in ( 45 ) haben wir bereits mit der einfacheren Berechnungsmethode ( 41 ) gefunden!
Abbildung 8: Pole (x) und Nullstellen (o) der Regelstrecke G in der S-Ebene (links) und Z-Ebene (rechts)
Auf ähnliche Weise könnten wir auch die Pole und Nullstellen des offenen Regelkreises L in Abbildung 9 berechnen (Übung!). Hier ist das Resultat des MATLAB-Befehls „pzmap“ dargestellt. Zusätzlichen zu den Polen der Regelstrecke kommt hier noch ein Pol bei 0 (S-Ebene, links) bzw. bei 1 (Z-Ebene, rechts), welcher vom I-Anteil des Reglers stammt. Die zusätzlichen Nullstellen kommen ebenfalls von der Multiplikation der Regelstrecke G(s) bzw. G(z) mit der PID-Regler-Übertragungsfunktion K(s) bzw. K(z).
Abbildung 9: Pole (x) und Nullstellen (o) des Open Loops L in der S-Ebene (links) und Z-Ebene (rechts)
RT2, Teil 4/5, Z-Transformation und Stabilität – Prof. Dr. D. Zogg
31.01.2012
17/19
Für die Analyse der Stabilität des geschlossenen Regelkreises T ist nun die Pollage in Abbildung 10 massgebend. Bis auf den Pol bei 0 (S-Ebene) bzw. 1 (Z-Ebene) sind alle Pole in der linken Halbebene (S-Ebene) bzw. innerhalb des Einheitskreises (Z-Ebene). Der Pol bei 0/1 wird durch die Nullstelle bei 0/1 aufgehoben. Somit ist sowohl der zeitkontinuierliche wie auch der zeitdiskrete Regelkreis stabil.
Abbildung 10: Pole (x) und Nullstellen (o) des Closed Loops T in der S-Ebene (links) und Z-Ebene (rechts)
Die Werte der entsprechenden Pole und Nullstellen können mit dem MATLAB-Befehl „pole“ bzw. „zero“ auch numerisch ausgegeben werden (Übung!).
4.13. Zusammenfassung Teil 4 Gelerntes Der Zweck der Z-Transformation ist die einfachere Darstellung von Systemen im zeitdiskreten Bereich. Sie ist analog zur Laplace-Transformation im zeitkontinuierlichen Bereich zu verstehen. Der Z-Operator ist eine Art „Time-Shift-Operator“. Übertragungsfunktionen können im Z-Bereich dargestellt werden. Sie können miteinander multipliziert werden, analog zum S-Bereich. Die wichtigsten Transformationen zwischen Laplace(s)– und ZBereich können durchgeführt werden. Dazu gehören die Approximationen nach Rechteckregel und die bilineare Transformation (TUSTIN). Auch in MATLAB können die Z-Transformationen durchgeführt werden. Für die Diskretisierung (Transformation vom zeitkontinuierlichen in den zeitdiskreten Bereich) gibt es die einfache Methode „c2d“, welche direkt eine Übertragungsfunktion im ZBereich ausgibt. Zudem kann mit dem einfachen Trick z = tf(‘z’, TAbtast)eine Übertragungsfunktion direkt im ZBereich definiert werden.
RT2, Teil 4/5, Z-Transformation und Stabilität – Prof. Dr. D. Zogg
Lernziel erreicht? ☺☺☺
☺☺
☺☺☺
☺☺☺
31.01.2012
18/19
Teil 5 Gelerntes Der Zusammenhang zwischen Z- und Laplace-Ebene ist verstanden. Die Transformationen können in alle Richtungen stattfinden, also vom zeitkontinuierlichen in den zeitdiskreten Bereich und vom Zeitbereich in den Z-/S-Bereich bzw. umgekehrt. Die einzelnen Operationen wurden besprochen. Die Stabilität eines Systems kann auch im Z-Bereich durch die Pollage beurteilt werden. Hier ist die Stabilitätsgrenze allerdings durch den Einheitskreis gegeben. Die Pole innerhalb sind stabil, ausserhalb instabil. Dies kann auch mit dem MATLAB-Befehl „pzmap“ dargestellt werden.
RT2, Teil 4/5, Z-Transformation und Stabilität – Prof. Dr. D. Zogg
Lernziel erreicht? ☺☺
☺☺☺
31.01.2012
19/19