Skip to content
Snippets Groups Projects
Commit 5a5b45fa authored by Sebastian Schwarz's avatar Sebastian Schwarz
Browse files

correction of notebook titles

parent 8cb31be2
Branches
Tags
No related merge requests found
Showing
with 12 additions and 12 deletions
%% Cell type:markdown id: tags: %% Cell type:markdown id: tags:
# <span style='color:OrangeRed'>V2 Z-TRANSFORMATION </span> # <span style='color:OrangeRed'>V2 Z-TRANSFORMATION - TEIL 1</span>
%% Cell type:markdown id: tags: %% Cell type:markdown id: tags:
<div style="font-family: 'times'; font-size: 13pt; text-align: justify"> <div style="font-family: 'times'; font-size: 13pt; text-align: justify">
Hier vergleichen und überprüfen wir verschiedene Methoden zur Berechnung der Inverse der z-Transformation. Hier vergleichen und überprüfen wir verschiedene Methoden zur Berechnung der Inverse der z-Transformation.
%% Cell type:code id: tags: %% Cell type:code id: tags:
``` octave ``` octave
% Necessary to use control toolbox % Necessary to use control toolbox
pkg load control pkg load control
clear all clear all
``` ```
%% Cell type:markdown id: tags: %% Cell type:markdown id: tags:
<div style="font-family: 'times'; font-size: 13pt; text-align: justify"> <div style="font-family: 'times'; font-size: 13pt; text-align: justify">
Ein bestimmtes Signal wird durch seine z-Transformation beschrieben, für die wir Zähler und Nenner kennen. Ein bestimmtes Signal wird durch seine z-Transformation beschrieben, für die wir Zähler und Nenner kennen.
%% Cell type:code id: tags: %% Cell type:code id: tags:
``` octave ``` octave
num = [6 0] num = [6 0]
den = [1 -4 3] den = [1 -4 3]
G = tf(num,den,1) G = tf(num,den,1)
``` ```
%% Output %% Output
num = num =
6 0 6 0
den = den =
1 -4 3 1 -4 3
Transfer function 'G' from input 'u1' to output ... Transfer function 'G' from input 'u1' to output ...
6 z 6 z
y1: ------------- y1: -------------
z^2 - 4 z + 3 z^2 - 4 z + 3
Sampling time: 1 s Sampling time: 1 s
Discrete-time model. Discrete-time model.
%% Cell type:markdown id: tags: %% Cell type:markdown id: tags:
<div style="font-family: 'times'; font-size: 13pt; text-align: justify"> <div style="font-family: 'times'; font-size: 13pt; text-align: justify">
Erste Option ist eine Potenzreihenentwicklung, d.h. wir wenden die Division von Zähler und Nenner mehrfach an: Erste Option ist eine Potenzreihenentwicklung, d.h. wir wenden die Division von Zähler und Nenner mehrfach an:
%% Cell type:code id: tags: %% Cell type:code id: tags:
``` octave ``` octave
k=0:4; k=0:4;
[x(1) r] = deconv(num,den) [x(1) r] = deconv(num,den)
for j = 1:4 for j = 1:4
numnew = conv(r,[1 0]) numnew = conv(r,[1 0])
[p r] = deconv(numnew,den) [p r] = deconv(numnew,den)
x(j+1) = p(length(p)) x(j+1) = p(length(p))
end end
plot(k,x) plot(k,x)
``` ```
%% Output %% Output
x = 0 x = 0
r = r =
6 0 6 0
numnew = numnew =
6 0 0 6 0 0
p = 6 p = 6
r = r =
0 24 -18 0 24 -18
x = x =
0 6 0 6
numnew = numnew =
0 24 -18 0 0 24 -18 0
p = p =
0 24 0 24
r = r =
0 0 78 -72 0 0 78 -72
x = x =
0 6 24 0 6 24
numnew = numnew =
0 0 78 -72 0 0 0 78 -72 0
p = p =
0 0 78 0 0 78
r = r =
0 0 0 240 -234 0 0 0 240 -234
x = x =
0 6 24 78 0 6 24 78
numnew = numnew =
0 0 0 240 -234 0 0 0 0 240 -234 0
p = p =
0 0 0 240 0 0 0 240
r = r =
0 0 0 0 726 -720 0 0 0 0 726 -720
x = x =
0 6 24 78 240 0 6 24 78 240
%% Cell type:markdown id: tags: %% Cell type:markdown id: tags:
<div style="font-family: 'times'; font-size: 13pt; text-align: justify"> <div style="font-family: 'times'; font-size: 13pt; text-align: justify">
Zunächst beginnen wir mit der Partialbruchzerlegung. In Matlab/Octave gibt es die Funktion <code>residue</code>. Zunächst beginnen wir mit der Partialbruchzerlegung. In Matlab/Octave gibt es die Funktion <code>residue</code>.
Diese Funktion wird verwendet, um einen Bruch in Terme des Typs a/(z-b) zu zerlegen. Diese Funktion wird verwendet, um einen Bruch in Terme des Typs a/(z-b) zu zerlegen.
Dann müssen wir zunächst den Zähler durch z dividieren und dann die Funktion verwenden. Dann müssen wir zunächst den Zähler durch z dividieren und dann die Funktion verwenden.
%% Cell type:code id: tags: %% Cell type:code id: tags:
``` octave ``` octave
numz = deconv(num, [1 0]) numz = deconv(num, [1 0])
[r,p,q]=residue(numz,den) [r,p,q]=residue(numz,den)
``` ```
%% Output %% Output
numz = 6 numz = 6
r = r =
3.0000 3.0000
-3.0000 -3.0000
p = p =
3 3
1 1
q = [](0x0) q = [](0x0)
%% Cell type:markdown id: tags: %% Cell type:markdown id: tags:
<div style="font-family: 'times'; font-size: 13pt; text-align: justify"> <div style="font-family: 'times'; font-size: 13pt; text-align: justify">
r sind die Koeffizienten für die Zähler, p sind die Pole r sind die Koeffizienten für die Zähler, p sind die Pole
das Signal ist dann die Summe von Termen des Typs r*p^k das Signal ist dann die Summe von Termen des Typs r*p^k
%% Cell type:code id: tags: %% Cell type:code id: tags:
``` octave ``` octave
npoles = length(p) npoles = length(p)
for i=1:npoles for i=1:npoles
s(i,:) = r(i).*p(i).^k s(i,:) = r(i).*p(i).^k
end end
``` ```
%% Output %% Output
npoles = 2 npoles = 2
s = s =
3.0000 9.0000 27.0000 81.0000 243.0000 3.0000 9.0000 27.0000 81.0000 243.0000
s = s =
3.0000 9.0000 27.0000 81.0000 243.0000 3.0000 9.0000 27.0000 81.0000 243.0000
-3.0000 -3.0000 -3.0000 -3.0000 -3.0000 -3.0000 -3.0000 -3.0000 -3.0000 -3.0000
%% Cell type:code id: tags: %% Cell type:code id: tags:
``` octave ``` octave
plot(k,s(1,:),k,s(2,:),k,s(1,:)+s(2,:)) plot(k,s(1,:),k,s(2,:),k,s(1,:)+s(2,:))
``` ```
%% Output %% Output
%% Cell type:markdown id: tags: %% Cell type:markdown id: tags:
<div style="font-family: 'times'; font-size: 13pt; text-align: justify"> <div style="font-family: 'times'; font-size: 13pt; text-align: justify">
Wir können das Ergebnis auch mit Hilfe der symbolischen Toolbox überprüfen. Wir können das Ergebnis auch mit Hilfe der symbolischen Toolbox überprüfen.
%% Cell type:code id: tags: %% Cell type:code id: tags:
``` octave ``` octave
pkg load symbolic pkg load symbolic
syms z syms z
``` ```
%% Output %% Output
Symbolic pkg v2.8.0: Python communication link active, SymPy v1.5.1. Symbolic pkg v2.8.0: Python communication link active, SymPy v1.5.1.
%% Cell type:code id: tags: %% Cell type:code id: tags:
``` octave ``` octave
F= 6*z/(z^2-4*z+3) F= 6*z/(z^2-4*z+3)
F1 = F*1/z F1 = F*1/z
G1 = partfrac(F1) G1 = partfrac(F1)
Gs = expand(G1*z) Gs = expand(G1*z)
``` ```
%% Output %% Output
F = (sym) F = (sym)
6⋅z 6⋅z
──────────── ────────────
2 2
z - 4⋅z + 3 z - 4⋅z + 3
F1 = (sym) F1 = (sym)
6 6
──────────── ────────────
2 2
z - 4⋅z + 3 z - 4⋅z + 3
G1 = (sym) G1 = (sym)
3 3 3 3
- ───── + ───── - ───── + ─────
z - 1 z - 3 z - 1 z - 3
Gs = (sym) Gs = (sym)
3⋅z 3⋅z 3⋅z 3⋅z
- ───── + ───── - ───── + ─────
z - 1 z - 3 z - 1 z - 3
%% Cell type:markdown id: tags: %% Cell type:markdown id: tags:
<div style="font-family: 'times'; font-size: 13pt; text-align: justify"> <div style="font-family: 'times'; font-size: 13pt; text-align: justify">
Per Definition ist dies auch die Impulsantwort der Übertragungsfunktion, was wir wiederum mit der Funktion <code>impulse</code> aus Matlab/Octave überprüfen können. Per Definition ist dies auch die Impulsantwort der Übertragungsfunktion, was wir wiederum mit der Funktion <code>impulse</code> aus Matlab/Octave überprüfen können.
%% Cell type:code id: tags: %% Cell type:code id: tags:
``` octave ``` octave
x2 = impulse(G) x2 = impulse(G)
plot(k,x2(1:5)) plot(k,x2(1:5))
``` ```
%% Output %% Output
x2 = x2 =
0 0
6 6
24 24
78 78
240 240
726 726
%% Cell type:code id: tags: %% Cell type:code id: tags:
``` octave ``` octave
``` ```
......
%% Cell type:markdown id:59c50ced-b94e-4c1d-aa16-8f65866afa45 tags: %% Cell type:markdown id:59c50ced-b94e-4c1d-aa16-8f65866afa45 tags:
# <span style='color:OrangeRed'>V2 Z-TRANSFORMATION Teil 2</span> # <span style='color:OrangeRed'>V2 Z-TRANSFORMATION - TEIL 2</span>
%% Cell type:code id:4e30e058-443f-49de-a6e7-c30cc52f8e8d tags: %% Cell type:code id:4e30e058-443f-49de-a6e7-c30cc52f8e8d tags:
``` octave ``` octave
% Necessary to use control toolbox % Necessary to use control toolbox
pkg load control pkg load control
pkg load symbolic pkg load symbolic
clear all clear all
``` ```
%% Cell type:markdown id:a51cd9c5-1e6a-4aab-9444-a1b43fdb600d tags: %% Cell type:markdown id:a51cd9c5-1e6a-4aab-9444-a1b43fdb600d tags:
Gegeben sei das folgende System: Gegeben sei das folgende System:
%% Cell type:code id:d6746c08-e7f2-4981-a180-356ee45880d6 tags: %% Cell type:code id:d6746c08-e7f2-4981-a180-356ee45880d6 tags:
``` octave ``` octave
syms s syms s
G = (7*s^2+2)/s^2 G = (7*s^2+2)/s^2
``` ```
%% Output %% Output
Symbolic pkg v2.8.0: Python communication link active, SymPy v1.5.1. Symbolic pkg v2.8.0: Python communication link active, SymPy v1.5.1.
G = (sym) G = (sym)
2 2
7⋅s + 2 7⋅s + 2
──────── ────────
2 2
s s
%% Cell type:markdown id:5118b918-ba4d-4edd-80ef-077f71033c0c tags: %% Cell type:markdown id:5118b918-ba4d-4edd-80ef-077f71033c0c tags:
G(s) ist ein zeitkontinuierliches System, das nun in Reihe mit einem Halteglied nullter Ordnung H(s) geschaltet ist. Berechnen Sie die Impulsantwort des diskreten Zeitsystems, indem Sie den Ausgang von G(s) mit einem Zeitschritt von Ts=1sec abtasten. G(s) ist ein zeitkontinuierliches System, das nun in Reihe mit einem Halteglied nullter Ordnung H(s) geschaltet ist. Berechnen Sie die Impulsantwort des diskreten Zeitsystems, indem Sie den Ausgang von G(s) mit einem Zeitschritt von Ts=1sec abtasten.
%% Cell type:code id:af9db619-01ea-4d4c-90a3-f00111b7c1dc tags: %% Cell type:code id:af9db619-01ea-4d4c-90a3-f00111b7c1dc tags:
``` octave ``` octave
Ts = 1 Ts = 1
``` ```
%% Output %% Output
Ts = 1 Ts = 1
%% Cell type:markdown id:b44b6573-db3c-4af8-9b2b-abb2e60b47ba tags: %% Cell type:markdown id:b44b6573-db3c-4af8-9b2b-abb2e60b47ba tags:
Wir müssen zuerst die Impulsatwort des Systems G(s)/s berechnen: Wir müssen zuerst die Impulsatwort des Systems G(s)/s berechnen:
%% Cell type:code id:24be4f5f-9a68-4961-8342-a34c916739a3 tags: %% Cell type:code id:24be4f5f-9a68-4961-8342-a34c916739a3 tags:
``` octave ``` octave
Gs = G/s Gs = G/s
gk = ilaplace(Gs) gk = ilaplace(Gs)
``` ```
%% Output %% Output
Gs = (sym) Gs = (sym)
2 2
7⋅s + 2 7⋅s + 2
──────── ────────
3 3
s s
gk = (sym) gk = (sym)
2 2
t + 7 t + 7
%% Cell type:markdown id:ba598b0d-29f4-4f1b-848d-8599d13a37e4 tags: %% Cell type:markdown id:ba598b0d-29f4-4f1b-848d-8599d13a37e4 tags:
Die ersten 4 Abtastwerte dieser Funktion sind: Die ersten 4 Abtastwerte dieser Funktion sind:
%% Cell type:code id:4adb2d94-f7f8-4d81-8f56-59fe177ed5c9 tags: %% Cell type:code id:4adb2d94-f7f8-4d81-8f56-59fe177ed5c9 tags:
``` octave ``` octave
t = 0 t = 0
gks0 = subs(gk) gks0 = subs(gk)
``` ```
%% Output %% Output
t = 0 t = 0
gks0 = (sym) 7 gks0 = (sym) 7
%% Cell type:code id:6604c416-b4e3-4399-ac50-f40460f64559 tags: %% Cell type:code id:6604c416-b4e3-4399-ac50-f40460f64559 tags:
``` octave ``` octave
t = 1 t = 1
gks1 = subs(gk) gks1 = subs(gk)
``` ```
%% Output %% Output
t = 1 t = 1
gks1 = (sym) 8 gks1 = (sym) 8
%% Cell type:code id:802539df-4b11-425f-89f5-a1f81d34ba15 tags: %% Cell type:code id:802539df-4b11-425f-89f5-a1f81d34ba15 tags:
``` octave ``` octave
t = 2 t = 2
gks2 = subs(gk) gks2 = subs(gk)
``` ```
%% Output %% Output
t = 2 t = 2
gks2 = (sym) 11 gks2 = (sym) 11
%% Cell type:code id:3d2038eb-d51e-48ab-be3c-ae923e0104aa tags: %% Cell type:code id:3d2038eb-d51e-48ab-be3c-ae923e0104aa tags:
``` octave ``` octave
t = 3 t = 3
gks3 = subs(gk) gks3 = subs(gk)
``` ```
%% Output %% Output
t = 3 t = 3
gks3 = (sym) 16 gks3 = (sym) 16
%% Cell type:markdown id:2bdc50a1-49eb-4ece-9d3d-b37c9aaaa15a tags: %% Cell type:markdown id:2bdc50a1-49eb-4ece-9d3d-b37c9aaaa15a tags:
Dann müssen wir das Signal nach der Verschiebung um eine Abtastzeit nach rechts subtrahieren. Es ergibt sich: Dann müssen wir das Signal nach der Verschiebung um eine Abtastzeit nach rechts subtrahieren. Es ergibt sich:
%% Cell type:code id:a6b84605-74bc-43e4-a6bd-8ac18679f0c4 tags: %% Cell type:code id:a6b84605-74bc-43e4-a6bd-8ac18679f0c4 tags:
``` octave ``` octave
gk0 = gks0 gk0 = gks0
gk1 = gks1-gks0 gk1 = gks1-gks0
gk2 = gks2-gks1 gk2 = gks2-gks1
gk3 = gks3-gks2 gk3 = gks3-gks2
``` ```
%% Output %% Output
gk0 = (sym) 7 gk0 = (sym) 7
gk1 = (sym) 1 gk1 = (sym) 1
gk2 = (sym) 3 gk2 = (sym) 3
gk3 = (sym) 5 gk3 = (sym) 5
%% Cell type:markdown id:14cc4493-49b0-46e5-8a2c-73828a4d5f3e tags: %% Cell type:markdown id:14cc4493-49b0-46e5-8a2c-73828a4d5f3e tags:
Die andere Möglichkeit besteht darin, zunächst mit der Übertragungsfunktion des gesamten Halteglieds nullter Ordnung zu multiplizieren und dann die inverse Laplace-Transformation und die Abtastung durchzuführen: Die andere Möglichkeit besteht darin, zunächst mit der Übertragungsfunktion des gesamten Halteglieds nullter Ordnung zu multiplizieren und dann die inverse Laplace-Transformation und die Abtastung durchzuführen:
%% Cell type:code id:efe763dc-0216-4b77-b962-3cd0122a37ef tags: %% Cell type:code id:efe763dc-0216-4b77-b962-3cd0122a37ef tags:
``` octave ``` octave
Gh = (1-exp(-s*Ts))/s Gh = (1-exp(-s*Ts))/s
``` ```
%% Output %% Output
Gh = (sym) Gh = (sym)
-s -s
1 - ℯ 1 - ℯ
─────── ───────
s s
%% Cell type:code id:fd678060-ad64-466b-9100-16e4c6c72161 tags: %% Cell type:code id:fd678060-ad64-466b-9100-16e4c6c72161 tags:
``` octave ``` octave
G2 = G*Gh G2 = G*Gh
``` ```
%% Output %% Output
G2 = (sym) G2 = (sym)
⎛ -s⎞ ⎛ 2 ⎞ ⎛ -s⎞ ⎛ 2 ⎞
⎝1 - ℯ ⎠⋅⎝7⋅s + 2⎠ ⎝1 - ℯ ⎠⋅⎝7⋅s + 2⎠
──────────────────── ────────────────────
3 3
s s
%% Cell type:code id:6147d6a0-1cab-4eb3-b508-f5dd355a06f9 tags: %% Cell type:code id:6147d6a0-1cab-4eb3-b508-f5dd355a06f9 tags:
``` octave ``` octave
gkt = ilaplace(G2) gkt = ilaplace(G2)
``` ```
%% Output %% Output
gkt = (sym) gkt = (sym)
2 ⎛ 2 ⎞ 2 ⎛ 2 ⎞
t - ⎝t - 2⋅t + 8⎠⋅θ(t - 1) + 7 t - ⎝t - 2⋅t + 8⎠⋅θ(t - 1) + 7
%% Cell type:code id:43ec85a8-43c8-4dc0-a489-8d7b257abe34 tags: %% Cell type:code id:43ec85a8-43c8-4dc0-a489-8d7b257abe34 tags:
``` octave ``` octave
t = 0 t = 0
subs(gkt) subs(gkt)
``` ```
%% Output %% Output
t = 0 t = 0
ans = (sym) 7 ans = (sym) 7
%% Cell type:code id:7a2553b6-24ce-4e10-8706-866c8203b02b tags: %% Cell type:code id:7a2553b6-24ce-4e10-8706-866c8203b02b tags:
``` octave ``` octave
t = 1 t = 1
subs(gkt) subs(gkt)
``` ```
%% Output %% Output
t = 1 t = 1
ans = (sym) 8 - 7⋅θ(0) ans = (sym) 8 - 7⋅θ(0)
%% Cell type:code id:56d47b5b-3083-464d-8530-a0b3f4aa9a69 tags: %% Cell type:code id:56d47b5b-3083-464d-8530-a0b3f4aa9a69 tags:
``` octave ``` octave
t = 2 t = 2
subs(gkt) subs(gkt)
``` ```
%% Output %% Output
t = 2 t = 2
ans = (sym) 3 ans = (sym) 3
%% Cell type:code id:aec1ea71-51e0-444b-b45d-0de2e0143581 tags: %% Cell type:code id:aec1ea71-51e0-444b-b45d-0de2e0143581 tags:
``` octave ``` octave
t = 3 t = 3
subs(gkt) subs(gkt)
``` ```
%% Output %% Output
t = 3 t = 3
ans = (sym) 5 ans = (sym) 5
%% Cell type:code id:f56036d9-6ac0-4f7f-afde-86f4222b2c3d tags: %% Cell type:code id:f56036d9-6ac0-4f7f-afde-86f4222b2c3d tags:
``` octave ``` octave
``` ```
......
%% Cell type:markdown id:04105e65-6705-4c92-a009-48c54bd38ad4 tags: %% Cell type:markdown id:04105e65-6705-4c92-a009-48c54bd38ad4 tags:
# <span style='color:OrangeRed'>V3 STABILTÄT DISKRETER SYSTEME </span> # <span style='color:OrangeRed'>V3 STABILTÄT DISKRETER SYSTEME - TEIL 1</span>
%% Cell type:markdown id:ffe7d73f-7986-44b6-a9fd-a678b9aaa182 tags: %% Cell type:markdown id:ffe7d73f-7986-44b6-a9fd-a678b9aaa182 tags:
<div style="font-family: 'times'; font-size: 13pt; text-align: justify"> <div style="font-family: 'times'; font-size: 13pt; text-align: justify">
Wir analysieren hier die Stabilität eines diskreten Systems mit dem Jury-Verfahren. Am Ende validieren wir das Ergebnis mit einer Sprungantwort. Wir betrachten der Einfachheit wegen nur ein System zweiter Ordnung. Wir analysieren hier die Stabilität eines diskreten Systems mit dem Jury-Verfahren. Am Ende validieren wir das Ergebnis mit einer Sprungantwort. Wir betrachten der Einfachheit wegen nur ein System zweiter Ordnung.
%% Cell type:code id:3a336fb9-2f73-44ce-ab67-91b96ccfc1c1 tags: %% Cell type:code id:3a336fb9-2f73-44ce-ab67-91b96ccfc1c1 tags:
``` octave ``` octave
% Necessary to use control toolbox % Necessary to use control toolbox
pkg load control pkg load control
clear all clear all
``` ```
%% Cell type:markdown id:53866cc1-a0ea-4d77-8d9c-c8345704d874 tags: %% Cell type:markdown id:53866cc1-a0ea-4d77-8d9c-c8345704d874 tags:
<div style="font-family: 'times'; font-size: 13pt; text-align: justify"> <div style="font-family: 'times'; font-size: 13pt; text-align: justify">
Es ist das folgende System in Form einer Übertragungsfunktion gegeben: Es ist das folgende System in Form einer Übertragungsfunktion gegeben:
%% Cell type:code id:a0b9d775-f176-483e-aaca-43da284aa2e4 tags: %% Cell type:code id:a0b9d775-f176-483e-aaca-43da284aa2e4 tags:
``` octave ``` octave
a1 = 1 a1 = 1
a2 = 2 a2 = 2
b1 = 0.1 b1 = 0.1
b2 = 0.2 b2 = 0.2
num = [a1 a2] num = [a1 a2]
den = [1 b1 b2] den = [1 b1 b2]
G = tf(num,den, 1) G = tf(num,den, 1)
``` ```
%% Output %% Output
a1 = 1 a1 = 1
a2 = 2 a2 = 2
b1 = 0.10000 b1 = 0.10000
b2 = 0.20000 b2 = 0.20000
num = num =
1 2 1 2
den = den =
1.00000 0.10000 0.20000 1.00000 0.10000 0.20000
Transfer function 'G' from input 'u1' to output ... Transfer function 'G' from input 'u1' to output ...
z + 2 z + 2
y1: ----------------- y1: -----------------
z^2 + 0.1 z + 0.2 z^2 + 0.1 z + 0.2
Sampling time: 1 s Sampling time: 1 s
Discrete-time model. Discrete-time model.
%% Cell type:markdown id:1cb98bc6-138b-45bc-9178-74f8493d4171 tags: %% Cell type:markdown id:1cb98bc6-138b-45bc-9178-74f8493d4171 tags:
<div style="font-family: 'times'; font-size: 13pt; text-align: justify"> <div style="font-family: 'times'; font-size: 13pt; text-align: justify">
Berechnet man die Nullstellen des Nenners, erhält man die Pole des Systems: Berechnet man die Nullstellen des Nenners, erhält man die Pole des Systems:
%% Cell type:code id:03459a21-1072-416b-a04b-5de7b9a30813 tags: %% Cell type:code id:03459a21-1072-416b-a04b-5de7b9a30813 tags:
``` octave ``` octave
p = roots(den) p = roots(den)
q = abs(p) q = abs(p)
``` ```
%% Output %% Output
p = p =
-0.05000 + 0.44441i -0.05000 + 0.44441i
-0.05000 - 0.44441i -0.05000 - 0.44441i
q = q =
0.44721 0.44721
0.44721 0.44721
%% Cell type:markdown id:071800da-0e16-4189-bb65-5746c0415165 tags: %% Cell type:markdown id:071800da-0e16-4189-bb65-5746c0415165 tags:
<div style="font-family: 'times'; font-size: 13pt; text-align: justify"> <div style="font-family: 'times'; font-size: 13pt; text-align: justify">
Für Stabilität, müssen sich die Pole im Inneren des Einheitskreises befinden. Das bedeutet, dass die Werte von q betragsmäßig kleiner als 1 sein müssen, was hier offensichtlich erfüllt ist. Für Stabilität, müssen sich die Pole im Inneren des Einheitskreises befinden. Das bedeutet, dass die Werte von q betragsmäßig kleiner als 1 sein müssen, was hier offensichtlich erfüllt ist.
%% Cell type:markdown id:c9e8bd3b-e932-4710-9a6a-220f67d882e9 tags: %% Cell type:markdown id:c9e8bd3b-e932-4710-9a6a-220f67d882e9 tags:
<div style="font-family: 'times'; font-size: 13pt; text-align: justify"> <div style="font-family: 'times'; font-size: 13pt; text-align: justify">
Wir wollen nun die Stabilität mit dem Jury-Kriterium nachweisen. Dafür werten wir zunächst die Übertragungsfunktion in 1 und -1 aus. Wir wollen nun die Stabilität mit dem Jury-Kriterium nachweisen. Dafür werten wir zunächst die Übertragungsfunktion in 1 und -1 aus.
%% Cell type:code id:5adb101b-4286-428a-a4bd-eeb57e860e9c tags: %% Cell type:code id:5adb101b-4286-428a-a4bd-eeb57e860e9c tags:
``` octave ``` octave
F1 = 1+b1+b2 F1 = 1+b1+b2
Fm1 = 1-b1+b2 Fm1 = 1-b1+b2
``` ```
%% Output %% Output
F1 = 1.3000 F1 = 1.3000
Fm1 = 1.1000 Fm1 = 1.1000
%% Cell type:markdown id:eae75561-2795-400d-802d-f649281ff316 tags: %% Cell type:markdown id:eae75561-2795-400d-802d-f649281ff316 tags:
<div style="font-family: 'times'; font-size: 13pt; text-align: justify"> <div style="font-family: 'times'; font-size: 13pt; text-align: justify">
F1 und Fm1 müssen beide positiv sein. Dies ist erfüllt. F1 und Fm1 müssen beide positiv sein. Dies ist erfüllt.
%% Cell type:markdown id:fb81055e-1e14-4401-afb2-f90884c549be tags: %% Cell type:markdown id:fb81055e-1e14-4401-afb2-f90884c549be tags:
<div style="font-family: 'times'; font-size: 13pt; text-align: justify"> <div style="font-family: 'times'; font-size: 13pt; text-align: justify">
Die zweite Bedingung ist, dass der Betrag von a2 kleiner als 1 sein muss. Die zweite Bedingung ist, dass der Betrag von a2 kleiner als 1 sein muss.
%% Cell type:code id:acf57137-23eb-4be3-87ef-eb9d08076f07 tags: %% Cell type:code id:acf57137-23eb-4be3-87ef-eb9d08076f07 tags:
``` octave ``` octave
pkg load symbolic pkg load symbolic
syms z syms z
syms w syms w
F1 = (a1*z+a2)/(z^2 + b1*z +b2) F1 = (a1*z+a2)/(z^2 + b1*z +b2)
F2 = subs(F1,z,(1+w)/(1-w)) F2 = subs(F1,z,(1+w)/(1-w))
simplify(F2) simplify(F2)
``` ```
%% Output %% Output
Symbolic pkg v2.9.0: Python communication link active, SymPy v1.5.1. Symbolic pkg v2.9.0: Python communication link active, SymPy v1.5.1.
warning: passing floating-point values to sym is dangerous, see "help sym" warning: passing floating-point values to sym is dangerous, see "help sym"
warning: called from warning: called from
double_to_sym_heuristic at line 50 column 7 double_to_sym_heuristic at line 50 column 7
sym at line 379 column 13 sym at line 379 column 13
mtimes at line 63 column 5 mtimes at line 63 column 5
warning: passing floating-point values to sym is dangerous, see "help sym" warning: passing floating-point values to sym is dangerous, see "help sym"
warning: called from warning: called from
double_to_sym_heuristic at line 50 column 7 double_to_sym_heuristic at line 50 column 7
sym at line 379 column 13 sym at line 379 column 13
plus at line 61 column 5 plus at line 61 column 5
F1 = (sym) F1 = (sym)
z + 2 z + 2
─────────── ───────────
2 z 1 2 z 1
z + ── + ─ z + ── + ─
10 5 10 5
F2 = (sym) F2 = (sym)
w + 1 w + 1
2 + ───── 2 + ─────
1 - w 1 - w
───────────────────────── ─────────────────────────
2 2
1 w + 1 (w + 1) 1 w + 1 (w + 1)
─ + ────────── + ──────── ─ + ────────── + ────────
5 10⋅(1 - w) 2 5 10⋅(1 - w) 2
(1 - w) (1 - w)
ans = (sym) ans = (sym)
⎛ 2 ⎞ ⎛ 2 ⎞
10⋅⎝w - 4⋅w + 3⎠ 10⋅⎝w - 4⋅w + 3⎠
───────────────── ─────────────────
2 2
11⋅w + 16⋅w + 13 11⋅w + 16⋅w + 13
%% Cell type:markdown id:56641183-2cb4-48c2-b61d-7f612a56d0a7 tags: %% Cell type:markdown id:56641183-2cb4-48c2-b61d-7f612a56d0a7 tags:
<div style="font-family: 'times'; font-size: 13pt; text-align: justify"> <div style="font-family: 'times'; font-size: 13pt; text-align: justify">
Alle Zeichen im Nenner müssen positiv sein. Alle Zeichen im Nenner müssen positiv sein.
%% Cell type:markdown id:ab36a55a-6239-4214-9d36-85f4d111c61e tags: %% Cell type:markdown id:ab36a55a-6239-4214-9d36-85f4d111c61e tags:
<div style="font-family: 'times'; font-size: 13pt; text-align: justify"> <div style="font-family: 'times'; font-size: 13pt; text-align: justify">
Zum Schluss überprüfen wir die Ergebnisse mit der Simulation einer Sprungantwort. Zum Schluss überprüfen wir die Ergebnisse mit der Simulation einer Sprungantwort.
%% Cell type:code id:578daff8-f4fd-4001-bb09-aea89d809eec tags: %% Cell type:code id:578daff8-f4fd-4001-bb09-aea89d809eec tags:
``` octave ``` octave
addpath("../Octsim"); addpath("../Octsim");
tini = 0 # Start time tini = 0 # Start time
tfinal = 20 # End time tfinal = 20 # End time
dt = 0.1 # Time Step dt = 0.1 # Time Step
nflows = 2 #Number of data flows in the schematic, Zahlenwert entspricht nicht dem in Matlab (hier um 1 größer) nflows = 2 #Number of data flows in the schematic, Zahlenwert entspricht nicht dem in Matlab (hier um 1 größer)
Ts = 1 # Sampling time for discrete time Ts = 1 # Sampling time for discrete time
c1{1} = StepSource(1,0,1,0.1); #StepSource(self,out,startv,endv,ts) c1{1} = StepSource(1,0,1,0.1); #StepSource(self,out,startv,endv,ts)
c1{2} = DTTransferFunction(1,2,num,den,Ts); #DTTransferFunction(self,inp,out,num,den,Ts) c1{2} = DTTransferFunction(1,2,num,den,Ts); #DTTransferFunction(self,inp,out,num,den,Ts)
% Instance of the simulation schematic % Instance of the simulation schematic
sc1 = Schema(tini,tfinal,dt,nflows); sc1 = Schema(tini,tfinal,dt,nflows);
sc1.AddListComponents(c1); sc1.AddListComponents(c1);
% Run the schematic and plot % Run the schematic and plot
out1 = sc1.Run([1 2]); out1 = sc1.Run([1 2]);
plot(out1(1,:),out1(2,:),out1(1,:),out1(3,:)); plot(out1(1,:),out1(2,:),out1(1,:),out1(3,:));
ylim([-2, 4]); ylim([-2, 4]);
``` ```
%% Output %% Output
tini = 0 tini = 0
tfinal = 20 tfinal = 20
dt = 0.10000 dt = 0.10000
nflows = 2 nflows = 2
Ts = 1 Ts = 1
%% Cell type:code id:9e1a668f-07ac-442a-bb62-950dacd49832 tags: %% Cell type:code id:9e1a668f-07ac-442a-bb62-950dacd49832 tags:
``` octave ``` octave
``` ```
......
%% Cell type:markdown id:4e14da09-e18a-4a73-a754-5514c4046d1c tags: %% Cell type:markdown id:4e14da09-e18a-4a73-a754-5514c4046d1c tags:
# <span style='color:OrangeRed'>V3 STABILITÄT DISKRETER SYSTEME TEIL 2</span> # <span style='color:OrangeRed'>V3 STABILITÄT DISKRETER SYSTEME - TEIL 2</span>
%% Cell type:markdown id:33f7d33e-5729-4ee8-8fc5-8f97428f7b35 tags: %% Cell type:markdown id:33f7d33e-5729-4ee8-8fc5-8f97428f7b35 tags:
Betrachtet wird der in den nachfolgenden Abbildung dargestellte Abstastregelkreis bestehend aus einer zeitkontinuierlichen Regelstrecke Gs(s), einem Halteglied nullter Ordnung Ho(s) und einem zeitdiskreten Regler Gr(z). Betrachtet wird der in den nachfolgenden Abbildung dargestellte Abstastregelkreis bestehend aus einer zeitkontinuierlichen Regelstrecke Gs(s), einem Halteglied nullter Ordnung Ho(s) und einem zeitdiskreten Regler Gr(z).
%% Cell type:markdown id:9dc0ece7-9602-45c5-b55d-f2e5acfd2e00 tags: %% Cell type:markdown id:9dc0ece7-9602-45c5-b55d-f2e5acfd2e00 tags:
<img src="figures/SampledControlLoop.jpeg" alt="drawing" width="600" height="300"/> <img src="figures/SampledControlLoop.jpeg" alt="drawing" width="600" height="300"/>
%% Cell type:markdown id:e24e18ab-6d8c-4500-8f12-aa5b6629e9f4 tags: %% Cell type:markdown id:e24e18ab-6d8c-4500-8f12-aa5b6629e9f4 tags:
Die Gesamtübertragungsfunktion Gges(z) des geschlossenes Regelkreis mit Abtastzeit Ts = 0.1sec lautet: Die Gesamtübertragungsfunktion Gges(z) des geschlossenes Regelkreis mit Abtastzeit Ts = 0.1sec lautet:
%% Cell type:code id:4f8424b7-b29a-4dcc-85e0-1e00fe14c2a6 tags: %% Cell type:code id:4f8424b7-b29a-4dcc-85e0-1e00fe14c2a6 tags:
``` octave ``` octave
pkg load control pkg load control
Z = [0.2 -0.8 -0.9 0] Z = [0.2 -0.8 -0.9 0]
N = [1 -1.7 0.8 0.5 -0.5] N = [1 -1.7 0.8 0.5 -0.5]
G = tf(Z,N,0.1) G = tf(Z,N,0.1)
``` ```
%% Output %% Output
Z = Z =
0.20000 -0.80000 -0.90000 0.00000 0.20000 -0.80000 -0.90000 0.00000
N = N =
1.00000 -1.70000 0.80000 0.50000 -0.50000 1.00000 -1.70000 0.80000 0.50000 -0.50000
Transfer function 'G' from input 'u1' to output ... Transfer function 'G' from input 'u1' to output ...
0.2 z^3 - 0.8 z^2 - 0.9 z 0.2 z^3 - 0.8 z^2 - 0.9 z
y1: ------------------------------------- y1: -------------------------------------
z^4 - 1.7 z^3 + 0.8 z^2 + 0.5 z - 0.5 z^4 - 1.7 z^3 + 0.8 z^2 + 0.5 z - 0.5
Sampling time: 0.1 s Sampling time: 0.1 s
Discrete-time model. Discrete-time model.
%% Cell type:markdown id:9b66b0b0-767e-4140-83d3-a9017969e1b2 tags: %% Cell type:markdown id:9b66b0b0-767e-4140-83d3-a9017969e1b2 tags:
Es soll die Stabilität des geschlossenen Regelkreises unteresucht werden. Es soll die Stabilität des geschlossenen Regelkreises unteresucht werden.
Wenden Sie zu diesem Zweck das algebraische Stabilitätskriterium nach Jury an. Wenden Sie zu diesem Zweck das algebraische Stabilitätskriterium nach Jury an.
Prüfung der notwendigen Bedingung: Prüfung der notwendigen Bedingung:
%% Cell type:code id:195ef940-7487-4010-8dff-56b74852c8b7 tags: %% Cell type:code id:195ef940-7487-4010-8dff-56b74852c8b7 tags:
``` octave ``` octave
T1 = polyval(N,1) T1 = polyval(N,1)
T2 = polyval(N,-1)*(-1)^(length(N)-1) T2 = polyval(N,-1)*(-1)^(length(N)-1)
``` ```
%% Output %% Output
T1 = 0.10000 T1 = 0.10000
T2 = 2.5000 T2 = 2.5000
%% Cell type:markdown id:542aa21b-775e-4018-8265-66e8250e7f58 tags: %% Cell type:markdown id:542aa21b-775e-4018-8265-66e8250e7f58 tags:
T1 und T2 müssen größer als 0 sein. T1 und T2 müssen größer als 0 sein.
Prüfung der hinreichenden Bedingungen: Prüfung der hinreichenden Bedingungen:
%% Cell type:code id:32221e0c-874a-4791-b21e-ef736934c7cc tags: %% Cell type:code id:32221e0c-874a-4791-b21e-ef736934c7cc tags:
``` octave ``` octave
R1 = [N(5) N(4) N(3) N(2) N(1)] R1 = [N(5) N(4) N(3) N(2) N(1)]
R2 = [N(1) N(2) N(3) N(4) N(5)] R2 = [N(1) N(2) N(3) N(4) N(5)]
``` ```
%% Output %% Output
R1 = R1 =
-0.50000 0.50000 0.80000 -1.70000 1.00000 -0.50000 0.50000 0.80000 -1.70000 1.00000
R2 = R2 =
1.00000 -1.70000 0.80000 0.50000 -0.50000 1.00000 -1.70000 0.80000 0.50000 -0.50000
%% Cell type:code id:3bb8fef7-d016-487f-b599-43d8378dc10c tags: %% Cell type:code id:3bb8fef7-d016-487f-b599-43d8378dc10c tags:
``` octave ``` octave
b0 = R1(1)*R1(1)-R1(5)*R1(5) b0 = R1(1)*R1(1)-R1(5)*R1(5)
b1 = R1(1)*R1(2)-R1(5)*R1(4) b1 = R1(1)*R1(2)-R1(5)*R1(4)
b2 = R1(1)*R1(3)-R1(5)*R1(3) b2 = R1(1)*R1(3)-R1(5)*R1(3)
b3 = R1(1)*R1(4)-R1(5)*R1(2) b3 = R1(1)*R1(4)-R1(5)*R1(2)
``` ```
%% Output %% Output
b0 = -0.75000 b0 = -0.75000
b1 = 1.4500 b1 = 1.4500
b2 = -1.2000 b2 = -1.2000
b3 = 0.35000 b3 = 0.35000
%% Cell type:code id:9427eb80-a325-44cc-a871-159ebe4bbd4d tags: %% Cell type:code id:9427eb80-a325-44cc-a871-159ebe4bbd4d tags:
``` octave ``` octave
R3 = [b0 b1 b2 b3] R3 = [b0 b1 b2 b3]
R4 = [b3 b2 b1 b0] R4 = [b3 b2 b1 b0]
``` ```
%% Output %% Output
R3 = R3 =
-0.75000 1.45000 -1.20000 0.35000 -0.75000 1.45000 -1.20000 0.35000
R4 = R4 =
0.35000 -1.20000 1.45000 -0.75000 0.35000 -1.20000 1.45000 -0.75000
%% Cell type:code id:a39447bd-d38a-43e1-adc8-68060eda571a tags: %% Cell type:code id:a39447bd-d38a-43e1-adc8-68060eda571a tags:
``` octave ``` octave
c0 = R3(1)*R3(1)-R3(4)*R3(4) c0 = R3(1)*R3(1)-R3(4)*R3(4)
c1 = R3(1)*R3(2)-R3(4)*R3(3) c1 = R3(1)*R3(2)-R3(4)*R3(3)
c2 = R3(1)*R3(3)-R3(4)*R3(2) c2 = R3(1)*R3(3)-R3(4)*R3(2)
``` ```
%% Output %% Output
c0 = 0.44000 c0 = 0.44000
c1 = -0.66750 c1 = -0.66750
c2 = 0.39250 c2 = 0.39250
%% Cell type:code id:ee8b51ef-9da2-4bec-9c40-e30f81bfeaf3 tags: %% Cell type:code id:ee8b51ef-9da2-4bec-9c40-e30f81bfeaf3 tags:
``` octave ``` octave
R5 = [c0 c1 c2] R5 = [c0 c1 c2]
``` ```
%% Output %% Output
R5 = R5 =
0.44000 -0.66750 0.39250 0.44000 -0.66750 0.39250
%% Cell type:markdown id:2d41a11a-f281-4a07-9687-06d0eee47328 tags: %% Cell type:markdown id:2d41a11a-f281-4a07-9687-06d0eee47328 tags:
Die zu überprüfenden Bedigungen sind Die zu überprüfenden Bedigungen sind
abs(R1(1))<abs(R1(5)), abs(R1(1))<abs(R1(5)),
abs(R3(1))>abs(R3(4)), abs(R3(1))>abs(R3(4)),
abs(R5(1))>abs(R5(3)). abs(R5(1))>abs(R5(3)).
%% Cell type:markdown id:7529de03-0e61-425b-b2ad-cdec6b9c2260 tags: %% Cell type:markdown id:7529de03-0e61-425b-b2ad-cdec6b9c2260 tags:
Wie können das auch überprufen. Wir berechnen die Nullstellen von N und betrachten deren Betrag: Wie können das auch überprufen. Wir berechnen die Nullstellen von N und betrachten deren Betrag:
%% Cell type:code id:7c6efadd-827e-4089-abaa-3f285e6e4a23 tags: %% Cell type:code id:7c6efadd-827e-4089-abaa-3f285e6e4a23 tags:
``` octave ``` octave
p = roots(N) p = roots(N)
abs(p) abs(p)
``` ```
%% Output %% Output
p = p =
-0.60477 + 0.00000i -0.60477 + 0.00000i
0.71290 + 0.65756i 0.71290 + 0.65756i
0.71290 - 0.65756i 0.71290 - 0.65756i
0.87896 + 0.00000i 0.87896 + 0.00000i
ans = ans =
0.60477 0.60477
0.96986 0.96986
0.96986 0.96986
0.87896 0.87896
%% Cell type:markdown id:2617cdc0-e2fc-4951-9d4b-5cab91647dc4 tags: %% Cell type:markdown id:2617cdc0-e2fc-4951-9d4b-5cab91647dc4 tags:
Die Beträge müssen kleiner als 1 sein. Die Beträge müssen kleiner als 1 sein.
%% Cell type:code id:05064e3d-36a8-46ae-9661-dcbaddf31a95 tags: %% Cell type:code id:05064e3d-36a8-46ae-9661-dcbaddf31a95 tags:
``` octave ``` octave
``` ```
......
%% Cell type:markdown id:6cfcdd9e-6413-43fd-bb20-950c852ec0f7 tags: %% Cell type:markdown id:6cfcdd9e-6413-43fd-bb20-950c852ec0f7 tags:
# <span style='color:OrangeRed'>V4 REGELALGORITHMEN FÜR DIE DIGITALE REGELUNG </span> # <span style='color:OrangeRed'>V4 REGELALGORITHMEN FÜR DIE DIGITALE REGELUNG - TEIL 1</span>
%% Cell type:markdown id:9653081e-df65-4ccd-9204-e11c542a469f tags: %% Cell type:markdown id:9653081e-df65-4ccd-9204-e11c542a469f tags:
<div style="font-family: 'times'; font-size: 13pt; text-align: justify"> <div style="font-family: 'times'; font-size: 13pt; text-align: justify">
Die Vorschubregelung einer Werkzeugmaschine hat die dargestellte Kaskadenstruktur: Die Vorschubregelung einer Werkzeugmaschine hat die dargestellte Kaskadenstruktur:
%% Cell type:code id:e050a273-a079-40b9-ac0c-194e5e7f12e8 tags: %% Cell type:code id:e050a273-a079-40b9-ac0c-194e5e7f12e8 tags:
``` octave ``` octave
% Necessary to use control toolbox % Necessary to use control toolbox
pkg load control pkg load control
clear all clear all
``` ```
%% Cell type:markdown id:5e5b8b04-c7af-4bf4-9d9b-40cbb759ee0a tags: %% Cell type:markdown id:5e5b8b04-c7af-4bf4-9d9b-40cbb759ee0a tags:
<img src="figures/Schema.png"> <img src="figures/Schema.png">
%% Cell type:markdown id:880aa4ff-2004-4875-affc-5759aba8104e tags: %% Cell type:markdown id:880aa4ff-2004-4875-affc-5759aba8104e tags:
<div style="font-family: 'times'; font-size: 13pt; text-align: justify"> <div style="font-family: 'times'; font-size: 13pt; text-align: justify">
Die Regelstrecke GS1(s) wird als PT1-Glied mit der Verstärkung K1 = 10 und der Die Regelstrecke GS1(s) wird als PT1-Glied mit der Verstärkung K1 = 10 und der
Zeitkonstante T1 = 0,25 sec definiert. Zeitkonstante T1 = 0,25 sec definiert.
Die Regelstrecke GS2(s) wird als PT1-Glied mit der Verstärkung K2 = 10 und der Die Regelstrecke GS2(s) wird als PT1-Glied mit der Verstärkung K2 = 10 und der
Zeitkonstante T2 = 2,5 sec beschrieben. Zeitkonstante T2 = 2,5 sec beschrieben.
Die Abtastzeit beträgt Ts = 0,01 sec. Die Abtastzeit beträgt Ts = 0,01 sec.
%% Cell type:markdown id:9855df6b-fb07-4a92-a364-da2b80c50b17 tags: %% Cell type:markdown id:9855df6b-fb07-4a92-a364-da2b80c50b17 tags:
<div style="font-family: 'times'; font-size: 13pt; text-align: justify"> <div style="font-family: 'times'; font-size: 13pt; text-align: justify">
Es wird zunächst der innere Regelkreis, d.h. der Geschwindigkeitsregelkreis, Es wird zunächst der innere Regelkreis, d.h. der Geschwindigkeitsregelkreis,
betrachtet. betrachtet.
a1) Bestimmen Sie die zeitdiskrete Übertragungsfunktion HG1(z) für die Regelstrecke a1) Bestimmen Sie die zeitdiskrete Übertragungsfunktion HG1(z) für die Regelstrecke
GS1(s). Es wird ein Halteglied nullter Ordnung angenommen. GS1(s). Es wird ein Halteglied nullter Ordnung angenommen.
%% Cell type:code id:ef3d3be5-73cd-48d2-a773-d177b638230a tags: %% Cell type:code id:ef3d3be5-73cd-48d2-a773-d177b638230a tags:
``` octave ``` octave
K1 = 10 K1 = 10
tau1 = 0.25; tau1 = 0.25;
Num = [K1]; Num = [K1];
Den = [tau1 1]; Den = [tau1 1];
Gs1 = tf(Num,Den) Gs1 = tf(Num,Den)
``` ```
%% Output %% Output
K1 = 10 K1 = 10
Transfer function 'Gs1' from input 'u1' to output ... Transfer function 'Gs1' from input 'u1' to output ...
10 10
y1: ---------- y1: ----------
0.25 s + 1 0.25 s + 1
Continuous-time model. Continuous-time model.
%% Cell type:markdown id:1943a7dc-b837-4623-8792-a1775026155d tags: %% Cell type:markdown id:1943a7dc-b837-4623-8792-a1775026155d tags:
<div style="font-family: 'times'; font-size: 13pt; text-align: justify"> <div style="font-family: 'times'; font-size: 13pt; text-align: justify">
Diskretisierung mit Halteglied (zoh) Diskretisierung mit Halteglied (zoh)
%% Cell type:code id:402f525f-8a64-4584-8d05-dbd5e42e5516 tags: %% Cell type:code id:402f525f-8a64-4584-8d05-dbd5e42e5516 tags:
``` octave ``` octave
Ts = 0.01 Ts = 0.01
G1z = c2d(Gs1,Ts,'zoh') G1z = c2d(Gs1,Ts,'zoh')
``` ```
%% Output %% Output
Ts = 0.010000 Ts = 0.010000
Transfer function 'G1z' from input 'u1' to output ... Transfer function 'G1z' from input 'u1' to output ...
0.3921 0.3921
y1: ---------- y1: ----------
z - 0.9608 z - 0.9608
Sampling time: 0.01 s Sampling time: 0.01 s
Discrete-time model. Discrete-time model.
%% Cell type:markdown id:971a3f7a-3c0d-4a88-895f-3777326d7440 tags: %% Cell type:markdown id:971a3f7a-3c0d-4a88-895f-3777326d7440 tags:
<div style="font-family: 'times'; font-size: 13pt; text-align: justify"> <div style="font-family: 'times'; font-size: 13pt; text-align: justify">
Im Geschwindigkeitsregelkreis wird ein digitaler PI-Regler eingesetzt. Im Geschwindigkeitsregelkreis wird ein digitaler PI-Regler eingesetzt.
Bestimmen Sie die Parameter Kp und Ki des digitalen PI-Reglers durch Anwendung Bestimmen Sie die Parameter Kp und Ki des digitalen PI-Reglers durch Anwendung
des vereinfachten Nyquist-Kriteriums, sodass die Phasenreserve des offenen des vereinfachten Nyquist-Kriteriums, sodass die Phasenreserve des offenen
Regelkreises 60 beträgt. Die Durchtrittsfrequenz beträgt om = 7,2 rad/sec. Eine Regelkreises 60 beträgt. Die Durchtrittsfrequenz beträgt om = 7,2 rad/sec. Eine
quasi-kontinuierliche Darstellung des Geschwindigkeitsregelkreises ist nicht möglich. quasi-kontinuierliche Darstellung des Geschwindigkeitsregelkreises ist nicht möglich.
%% Cell type:code id:d8ab8054-efd1-4987-9600-24dbe480a40e tags: %% Cell type:code id:d8ab8054-efd1-4987-9600-24dbe480a40e tags:
``` octave ``` octave
omb = 7.2 omb = 7.2
fim = 60 fim = 60
[Gw fi] = bode(G1z,omb) [Gw fi] = bode(G1z,omb)
th = -180+fim-fi th = -180+fim-fi
Kp = cos(th*pi/180)/Gw Kp = cos(th*pi/180)/Gw
Ki = -sin(th*pi/180)*omb/Gw Ki = -sin(th*pi/180)*omb/Gw
``` ```
%% Output %% Output
omb = 7.2000 omb = 7.2000
fim = 60 fim = 60
Gw = 4.8575 Gw = 4.8575
fi = -63.022 fi = -63.022
th = -56.978 th = -56.978
Kp = 0.11219 Kp = 0.11219
Ki = 1.2428 Ki = 1.2428
%% Cell type:markdown id:9d90b015-72bf-4fb8-82a0-4ec0701232f6 tags: %% Cell type:markdown id:9d90b015-72bf-4fb8-82a0-4ec0701232f6 tags:
<div style="font-family: 'times'; font-size: 13pt; text-align: justify"> <div style="font-family: 'times'; font-size: 13pt; text-align: justify">
Discretisierung mach Tustin Discretisierung mach Tustin
%% Cell type:code id:1ed03ed5-3913-4107-95c9-f48e52bb50ee tags: %% Cell type:code id:1ed03ed5-3913-4107-95c9-f48e52bb50ee tags:
``` octave ``` octave
KiT = Ki*Ts/2 KiT = Ki*Ts/2
n1 = Kp+KiT n1 = Kp+KiT
n2 = KiT-Kp n2 = KiT-Kp
Gr1 = tf([n1 n2],[1 -1], Ts) Gr1 = tf([n1 n2],[1 -1], Ts)
``` ```
%% Output %% Output
KiT = 0.0062141 KiT = 0.0062141
n1 = 0.11840 n1 = 0.11840
n2 = -0.10598 n2 = -0.10598
Transfer function 'Gr1' from input 'u1' to output ... Transfer function 'Gr1' from input 'u1' to output ...
0.1184 z - 0.106 0.1184 z - 0.106
y1: ---------------- y1: ----------------
z - 1 z - 1
Sampling time: 0.01 s Sampling time: 0.01 s
Discrete-time model. Discrete-time model.
%% Cell type:markdown id:0353e887-ebe2-44d0-b7fb-a191622cabff tags: %% Cell type:markdown id:0353e887-ebe2-44d0-b7fb-a191622cabff tags:
<div style="font-family: 'times'; font-size: 13pt; text-align: justify"> <div style="font-family: 'times'; font-size: 13pt; text-align: justify">
Bestimmen Sie die Übertragungsfunktion des geschlossenen Geschwindigkeitsregelkreises Bestimmen Sie die Übertragungsfunktion des geschlossenen Geschwindigkeitsregelkreises
%% Cell type:code id:0d90c253-316f-47ed-9f7b-561ff0ed4868 tags: %% Cell type:code id:0d90c253-316f-47ed-9f7b-561ff0ed4868 tags:
``` octave ``` octave
Gcl = G1z*Gr1/(1+G1z*Gr1) Gcl = G1z*Gr1/(1+G1z*Gr1)
Gcl = minreal(Gcl) Gcl = minreal(Gcl)
``` ```
%% Output %% Output
Transfer function 'Gcl' from input 'u1' to output ... Transfer function 'Gcl' from input 'u1' to output ...
0.04643 z^3 - 0.1326 z^2 + 0.1261 z - 0.03992 0.04643 z^3 - 0.1326 z^2 + 0.1261 z - 0.03992
y1: ---------------------------------------------- y1: ----------------------------------------------
z^4 - 3.875 z^3 + 5.634 z^2 - 3.642 z + 0.8832 z^4 - 3.875 z^3 + 5.634 z^2 - 3.642 z + 0.8832
Sampling time: 0.01 s Sampling time: 0.01 s
Discrete-time model. Discrete-time model.
Transfer function 'Gcl' from input 'u1' to output ... Transfer function 'Gcl' from input 'u1' to output ...
0.04643 z - 0.04155 0.04643 z - 0.04155
y1: ---------------------- y1: ----------------------
z^2 - 1.914 z + 0.9192 z^2 - 1.914 z + 0.9192
Sampling time: 0.01 s Sampling time: 0.01 s
Discrete-time model. Discrete-time model.
%% Cell type:markdown id:d4fac333-e43d-49c7-aaec-6168b86bd6a6 tags: %% Cell type:markdown id:d4fac333-e43d-49c7-aaec-6168b86bd6a6 tags:
<div style="font-family: 'times'; font-size: 13pt; text-align: justify"> <div style="font-family: 'times'; font-size: 13pt; text-align: justify">
Begründen Sie, weshalb der geschlossene Regelkreis mit der Übertragungsfunktion Begründen Sie, weshalb der geschlossene Regelkreis mit der Übertragungsfunktion
HGges(z) ein Überschwingen aufweist. Bestimmen Sie das prozentuale Überschwingen HGges(z) ein Überschwingen aufweist. Bestimmen Sie das prozentuale Überschwingen
des geschlossenen Geschwindigkeitsregelkreises in Bezug auf die Führungsgröße. des geschlossenen Geschwindigkeitsregelkreises in Bezug auf die Führungsgröße.
%% Cell type:code id:828217c8-bd90-42da-8b36-9e1f05727a24 tags: %% Cell type:code id:828217c8-bd90-42da-8b36-9e1f05727a24 tags:
``` octave ``` octave
p1 = roots(cell2mat(Gcl.den)) p1 = roots(cell2mat(Gcl.den))
``` ```
%% Output %% Output
p1 = p1 =
0.95718 + 0.05513i 0.95718 + 0.05513i
0.95718 - 0.05513i 0.95718 - 0.05513i
%% Cell type:code id:bacf834b-b80d-4e8f-aaeb-76d3bafceb0e tags: %% Cell type:code id:bacf834b-b80d-4e8f-aaeb-76d3bafceb0e tags:
``` octave ``` octave
r = abs(p1(1)) r = abs(p1(1))
thc = arg(p1(1)) thc = arg(p1(1))
csi = -log(r)/sqrt((log(r))^2+thc^2) csi = -log(r)/sqrt((log(r))^2+thc^2)
over = exp(-csi*pi/sqrt(1-csi^2))*100 over = exp(-csi*pi/sqrt(1-csi^2))*100
``` ```
%% Output %% Output
r = 0.95877 r = 0.95877
thc = 0.057536 thc = 0.057536
csi = 0.59057 csi = 0.59057
over = 10.035 over = 10.035
%% Cell type:markdown id:2019d9ce-cc9c-4ab3-9d2d-c8a73439aaaf tags: %% Cell type:markdown id:2019d9ce-cc9c-4ab3-9d2d-c8a73439aaaf tags:
<div style="font-family: 'times'; font-size: 13pt; text-align: justify"> <div style="font-family: 'times'; font-size: 13pt; text-align: justify">
Sprungantwort des Regelkreises Sprungantwort des Regelkreises
%% Cell type:code id:66188370-1687-4a06-868b-4a9209c78934 tags: %% Cell type:code id:66188370-1687-4a06-868b-4a9209c78934 tags:
``` octave ``` octave
step(Gcl) step(Gcl)
``` ```
%% Output %% Output
%% Cell type:markdown id:8fb01477-5e88-4f80-9a7d-86dd7bdab34a tags: %% Cell type:markdown id:8fb01477-5e88-4f80-9a7d-86dd7bdab34a tags:
<div style="font-family: 'times'; font-size: 13pt; text-align: justify"> <div style="font-family: 'times'; font-size: 13pt; text-align: justify">
Nun wird der Lageregelkreis, d.h. der äußere Regelkreis, betrachtet. Nun wird der Lageregelkreis, d.h. der äußere Regelkreis, betrachtet.
%% Cell type:code id:d72bd2df-1e4d-4bda-b8bf-633c6e517d3c tags: %% Cell type:code id:d72bd2df-1e4d-4bda-b8bf-633c6e517d3c tags:
``` octave ``` octave
K2 = 10 K2 = 10
tau2 = 2.5; tau2 = 2.5;
Num = [K2]; Num = [K2];
Den = [tau2 1]; Den = [tau2 1];
Gs2 = tf(Num,Den) Gs2 = tf(Num,Den)
G2z = c2d(Gs2,Ts,'zoh') G2z = c2d(Gs2,Ts,'zoh')
``` ```
%% Output %% Output
K2 = 10 K2 = 10
Transfer function 'Gs2' from input 'u1' to output ... Transfer function 'Gs2' from input 'u1' to output ...
10 10
y1: --------- y1: ---------
2.5 s + 1 2.5 s + 1
Continuous-time model. Continuous-time model.
Transfer function 'G2z' from input 'u1' to output ... Transfer function 'G2z' from input 'u1' to output ...
0.03992 0.03992
y1: --------- y1: ---------
z - 0.996 z - 0.996
Sampling time: 0.01 s Sampling time: 0.01 s
Discrete-time model. Discrete-time model.
%% Cell type:markdown id:0723b84d-ec76-4555-978b-5788d81051d1 tags: %% Cell type:markdown id:0723b84d-ec76-4555-978b-5788d81051d1 tags:
<div style="font-family: 'times'; font-size: 13pt; text-align: justify"> <div style="font-family: 'times'; font-size: 13pt; text-align: justify">
Zunächst wird GR2(z) als P-Regler angenommen, d.h. GR2(z) = KR2. Bestimmen Zunächst wird GR2(z) als P-Regler angenommen, d.h. GR2(z) = KR2. Bestimmen
Sie den Bereich für die Verstärkung KR2 des Reglers so, dass für die Amplitudenreserve Sie den Bereich für die Verstärkung KR2 des Reglers so, dass für die Amplitudenreserve
AR des offenen Regelkreises der Lageregelung 5 < AR < 7 gilt AR des offenen Regelkreises der Lageregelung 5 < AR < 7 gilt
%% Cell type:code id:3f4005a9-6562-4194-9007-52f6da58d02f tags: %% Cell type:code id:3f4005a9-6562-4194-9007-52f6da58d02f tags:
``` octave ``` octave
Ar1 = 5 Ar1 = 5
Ar2 = 7 Ar2 = 7
Gopen = G2z*Gcl Gopen = G2z*Gcl
Gopen = minreal(Gopen) Gopen = minreal(Gopen)
[gm,fm,omm,omf] = margin(Gopen) [gm,fm,omm,omf] = margin(Gopen)
Gop = bode(Gopen,omm) Gop = bode(Gopen,omm)
Kpmax = 1/(Ar1*Gop) Kpmax = 1/(Ar1*Gop)
Kpmin = 1/(Ar2*Gop) Kpmin = 1/(Ar2*Gop)
``` ```
%% Output %% Output
Ar1 = 5 Ar1 = 5
Ar2 = 7 Ar2 = 7
Transfer function 'Gopen' from input 'u1' to output ... Transfer function 'Gopen' from input 'u1' to output ...
0.001853 z - 0.001659 0.001853 z - 0.001659
y1: --------------------------------- y1: ---------------------------------
z^3 - 2.91 z^2 + 2.826 z - 0.9156 z^3 - 2.91 z^2 + 2.826 z - 0.9156
Sampling time: 0.01 s Sampling time: 0.01 s
Discrete-time model. Discrete-time model.
Transfer function 'Gopen' from input 'u1' to output ... Transfer function 'Gopen' from input 'u1' to output ...
0.001853 z - 0.001659 0.001853 z - 0.001659
y1: --------------------------------- y1: ---------------------------------
z^3 - 2.91 z^2 + 2.826 z - 0.9156 z^3 - 2.91 z^2 + 2.826 z - 0.9156
Sampling time: 0.01 s Sampling time: 0.01 s
Discrete-time model. Discrete-time model.
gm = 5.3814 gm = 5.3814
fm = 63.634 fm = 63.634
omm = 11.891 omm = 11.891
omf = 4.4885 omf = 4.4885
Gop = 0.18582 Gop = 0.18582
Kpmax = 1.0763 Kpmax = 1.0763
Kpmin = 0.76878 Kpmin = 0.76878
%% Cell type:code id:adb7fd7b-62ad-4a93-a775-2b6385f526f0 tags: %% Cell type:code id:adb7fd7b-62ad-4a93-a775-2b6385f526f0 tags:
``` octave ``` octave
bode(Gopen) bode(Gopen)
``` ```
%% Output %% Output
%% Cell type:markdown id:89ff41db-a0bc-4cb8-ba47-3207135f894e tags: %% Cell type:markdown id:89ff41db-a0bc-4cb8-ba47-3207135f894e tags:
<div style="font-family: 'times'; font-size: 13pt; text-align: justify"> <div style="font-family: 'times'; font-size: 13pt; text-align: justify">
Als Regler GR2 soll nun ein digitaler P-Regler zum Einsatz kommen. Als Regler GR2 soll nun ein digitaler P-Regler zum Einsatz kommen.
Entwurf nach Ziegler-Nichols Entwurf nach Ziegler-Nichols
%% Cell type:code id:1cf077e5-5a87-4145-a9a9-5b9b8a2ad0b9 tags: %% Cell type:code id:1cf077e5-5a87-4145-a9a9-5b9b8a2ad0b9 tags:
``` octave ``` octave
Kkrit = 1/(Gop) Kkrit = 1/(Gop)
Tkrit = 2*pi/omm Tkrit = 2*pi/omm
``` ```
%% Output %% Output
Kkrit = 5.3814 Kkrit = 5.3814
Tkrit = 0.52841 Tkrit = 0.52841
%% Cell type:code id:a79a3a13-bb26-4632-ade1-092c05776ea9 tags: %% Cell type:code id:a79a3a13-bb26-4632-ade1-092c05776ea9 tags:
``` octave ``` octave
Kr2 = 0.5*Kkrit Kr2 = 0.5*Kkrit
``` ```
%% Output %% Output
Kr2 = 2.6907 Kr2 = 2.6907
%% Cell type:code id:993e4009-9b43-460e-8929-f8930390a87a tags: %% Cell type:code id:993e4009-9b43-460e-8929-f8930390a87a tags:
``` octave ``` octave
Gr2 = Kr2 Gr2 = Kr2
``` ```
%% Output %% Output
Gr2 = 2.6907 Gr2 = 2.6907
%% Cell type:code id:01eed7e9-16f5-444b-a9fc-9d8f09c9e5b2 tags: %% Cell type:code id:01eed7e9-16f5-444b-a9fc-9d8f09c9e5b2 tags:
``` octave ``` octave
Gcl2 = Gr2*Gopen/(1+Gr2*Gopen) Gcl2 = Gr2*Gopen/(1+Gr2*Gopen)
Gcl2 = minreal(Gcl2) Gcl2 = minreal(Gcl2)
``` ```
%% Output %% Output
Transfer function 'Gcl2' from input 'u1' to output ... Transfer function 'Gcl2' from input 'u1' to output ...
0.004987 z^4 - 0.01898 z^3 + 0.02708 z^2 - 0.01718 z + 0.004087 0.004987 z^4 - 0.01898 z^3 + 0.02708 z^2 - 0.01718 z + 0.004087
y1: --------------------------------------------------------------------- y1: ---------------------------------------------------------------------
z^6 - 5.821 z^5 + 14.13 z^4 - 18.3 z^3 + 13.34 z^2 - 5.192 z + 0.8423 z^6 - 5.821 z^5 + 14.13 z^4 - 18.3 z^3 + 13.34 z^2 - 5.192 z + 0.8423
Sampling time: 0.01 s Sampling time: 0.01 s
Discrete-time model. Discrete-time model.
Transfer function 'Gcl2' from input 'u1' to output ... Transfer function 'Gcl2' from input 'u1' to output ...
0.004987 z - 0.004463 0.004987 z - 0.004463
y1: ------------------------------- y1: -------------------------------
z^3 - 2.91 z^2 + 2.831 z - 0.92 z^3 - 2.91 z^2 + 2.831 z - 0.92
Sampling time: 0.01 s Sampling time: 0.01 s
Discrete-time model. Discrete-time model.
%% Cell type:code id:a5a98b54-58b0-4501-9c4b-9d77b98c6cc7 tags: %% Cell type:code id:a5a98b54-58b0-4501-9c4b-9d77b98c6cc7 tags:
``` octave ``` octave
p2 = roots(cell2mat(Gcl2.den)) p2 = roots(cell2mat(Gcl2.den))
``` ```
%% Output %% Output
p2 = p2 =
0.98696 + 0.09151i 0.98696 + 0.09151i
0.98696 - 0.09151i 0.98696 - 0.09151i
0.93646 + 0.00000i 0.93646 + 0.00000i
%% Cell type:markdown id:03139077-c87a-426b-a75a-aa2b699a8fb8 tags: %% Cell type:markdown id:03139077-c87a-426b-a75a-aa2b699a8fb8 tags:
<div style="font-family: 'times'; font-size: 13pt; text-align: justify"> <div style="font-family: 'times'; font-size: 13pt; text-align: justify">
Sprungantwort des Regelkreises Sprungantwort des Regelkreises
%% Cell type:code id:6d04ba9c-850c-478e-8a66-b7e676667546 tags: %% Cell type:code id:6d04ba9c-850c-478e-8a66-b7e676667546 tags:
``` octave ``` octave
step(Gcl2) step(Gcl2)
``` ```
%% Output %% Output
%% Cell type:code id:f7eaed20-7ca0-4f8e-91e5-da7a1fb7f073 tags: %% Cell type:code id:f7eaed20-7ca0-4f8e-91e5-da7a1fb7f073 tags:
``` octave ``` octave
``` ```
......
%% Cell type:markdown id:f0c1ae5c-58ce-4849-a802-8c0f07564e74 tags: %% Cell type:markdown id:f0c1ae5c-58ce-4849-a802-8c0f07564e74 tags:
# <span style='color:OrangeRed'>V4 REGELALGORITHMEN FÜR DIE DIGITALE REGELUNG: TEIL 2</span> # <span style='color:OrangeRed'>V4 REGELALGORITHMEN FÜR DIE DIGITALE REGELUNG - TEIL 2</span>
%% Cell type:markdown id:89fa67fe-464b-4205-8bf2-b5f3e6af9cf8 tags: %% Cell type:markdown id:89fa67fe-464b-4205-8bf2-b5f3e6af9cf8 tags:
<p>Gegeben ist ein System mit der Verstärkung 2 und zwei Zeitkonstanten: 1 und 2s. Entwerfen Sie einen Deadbeat-Regler für das System. Verwenden Sie eine Abtastzeit von 5s.</p> <p>Gegeben ist ein System mit der Verstärkung 2 und zwei Zeitkonstanten: 1 und 2s. Entwerfen Sie einen Deadbeat-Regler für das System. Verwenden Sie eine Abtastzeit von 5s.</p>
%% Cell type:markdown id:3d088845-789d-4a9f-8c69-7d89099a37a8 tags: %% Cell type:markdown id:3d088845-789d-4a9f-8c69-7d89099a37a8 tags:
<p>Zunächst müssen wir die Übertragungsfunktion des Systems definieren.</p> <p>Zunächst müssen wir die Übertragungsfunktion des Systems definieren.</p>
%% Cell type:code id:3eba9469-4c8c-4e7a-ac53-9de59b0d075f tags: %% Cell type:code id:3eba9469-4c8c-4e7a-ac53-9de59b0d075f tags:
``` octave ``` octave
clear all clear all
pkg load control pkg load control
% Set the Octsim Engine to run the simulation % Set the Octsim Engine to run the simulation
addpath('../Octsim'); addpath('../Octsim');
tau1 = 1 tau1 = 1
tau2 = 2 tau2 = 2
K = 2 K = 2
num = K num = K
den = conv([tau1 1],[tau2 1]) den = conv([tau1 1],[tau2 1])
Gs = tf(num,den) Gs = tf(num,den)
``` ```
%% Output %% Output
tau1 = 1 tau1 = 1
tau2 = 2 tau2 = 2
K = 2 K = 2
num = 2 num = 2
den = den =
2 3 1 2 3 1
Transfer function 'Gs' from input 'u1' to output ... Transfer function 'Gs' from input 'u1' to output ...
2 2
y1: --------------- y1: ---------------
2 s^2 + 3 s + 1 2 s^2 + 3 s + 1
Continuous-time model. Continuous-time model.
%% Cell type:markdown id:e32155c4-417f-422d-8b9d-9838d865f26a tags: %% Cell type:markdown id:e32155c4-417f-422d-8b9d-9838d865f26a tags:
<p>Dann müssen wir das System diskretisieren</p> <p>Dann müssen wir das System diskretisieren</p>
%% Cell type:code id:036534da-c817-459b-8698-6e1584b0392c tags: %% Cell type:code id:036534da-c817-459b-8698-6e1584b0392c tags:
``` octave ``` octave
Ts = 5 Ts = 5
Gz = c2d(Gs,Ts,'zoh') Gz = c2d(Gs,Ts,'zoh')
``` ```
%% Output %% Output
Ts = 5 Ts = 5
Transfer function 'Gz' from input 'u1' to output ... Transfer function 'Gz' from input 'u1' to output ...
1.685 z + 0.1383 1.685 z + 0.1383
y1: --------------------------- y1: ---------------------------
z^2 - 0.08882 z + 0.0005531 z^2 - 0.08882 z + 0.0005531
Sampling time: 5 s Sampling time: 5 s
Discrete-time model. Discrete-time model.
%% Cell type:markdown id:6950b9f5-4756-4a1b-8ae7-0adf3b82fef7 tags: %% Cell type:markdown id:6950b9f5-4756-4a1b-8ae7-0adf3b82fef7 tags:
<p>Jetzt können wir den Controller entwerfen.</p> <p>Jetzt können wir den Controller entwerfen.</p>
%% Cell type:code id:39e06d42-b904-485b-a313-d08081c7a7d6 tags: %% Cell type:code id:39e06d42-b904-485b-a313-d08081c7a7d6 tags:
``` octave ``` octave
numGz = cell2mat(Gz.num) numGz = cell2mat(Gz.num)
denGz = cell2mat(Gz.den) denGz = cell2mat(Gz.den)
numd = denGz numd = denGz
dend = conv(numGz,[1 0 -1]) dend = conv(numGz,[1 0 -1])
Grz = tf(numd,dend,Ts) Grz = tf(numd,dend,Ts)
``` ```
%% Output %% Output
numGz = numGz =
1.68514 0.13832 1.68514 0.13832
denGz = denGz =
1.00000000 -0.08882295 0.00055308 1.00000000 -0.08882295 0.00055308
numd = numd =
1.00000000 -0.08882295 0.00055308 1.00000000 -0.08882295 0.00055308
dend = dend =
1.68514 0.13832 -1.68514 -0.13832 1.68514 0.13832 -1.68514 -0.13832
Transfer function 'Grz' from input 'u1' to output ... Transfer function 'Grz' from input 'u1' to output ...
z^2 - 0.08882 z + 0.0005531 z^2 - 0.08882 z + 0.0005531
y1: ----------------------------------------- y1: -----------------------------------------
1.685 z^3 + 0.1383 z^2 - 1.685 z - 0.1383 1.685 z^3 + 0.1383 z^2 - 1.685 z - 0.1383
Sampling time: 5 s Sampling time: 5 s
Discrete-time model. Discrete-time model.
%% Cell type:markdown id:69da6df5-60b6-4c59-9b7a-3af40162c538 tags: %% Cell type:markdown id:69da6df5-60b6-4c59-9b7a-3af40162c538 tags:
<p>Wir können die Ergebnisse in der Simulation überprüfen.</p> <p>Wir können die Ergebnisse in der Simulation überprüfen.</p>
%% Cell type:code id:a7c5a5cb-05f8-4bcd-8d02-f26e7dcfe99c tags: %% Cell type:code id:a7c5a5cb-05f8-4bcd-8d02-f26e7dcfe99c tags:
``` octave ``` octave
% Number of data flows in the schematic % Number of data flows in the schematic
nflows = 4; nflows = 4;
tini = 0; tini = 0;
tfinal = 40; tfinal = 40;
dt = 0.01; dt = 0.01;
% Instance of the simulation schematic % Instance of the simulation schematic
sc1 = Schema(tini,tfinal,dt,nflows); sc1 = Schema(tini,tfinal,dt,nflows);
% List of components % List of components
c1{1} = StepSource(1,0,1,0.1); c1{1} = StepSource(1,0,1,0.1);
c1{2} = Sum(1,2,3,1,-1); c1{2} = Sum(1,2,3,1,-1);
c1{3} = DTTransferFunction(3,4,numd,dend,Ts); c1{3} = DTTransferFunction(3,4,numd,dend,Ts);
c1{4} = TransferFunction(4,2,num,den); c1{4} = TransferFunction(4,2,num,den);
sc1.AddListComponents(c1); sc1.AddListComponents(c1);
% Run the schematic and plot % Run the schematic and plot
out1 = sc1.Run([1 2 3]); out1 = sc1.Run([1 2 3]);
plot(out1(1,:),out1(2,:),out1(1,:),out1(3,:)); plot(out1(1,:),out1(2,:),out1(1,:),out1(3,:));
ylim([-0.25 1.25]); ylim([-0.25 1.25]);
``` ```
%% Output %% Output
%% Cell type:markdown id:0e75d661-7134-41c8-8d18-b9476f0156b8 tags: %% Cell type:markdown id:0e75d661-7134-41c8-8d18-b9476f0156b8 tags:
<p>Wir können die Übertragungsfunktion des geschlossenen Regelkreises auch analytisch überprüfen.</p> <p>Wir können die Übertragungsfunktion des geschlossenen Regelkreises auch analytisch überprüfen.</p>
%% Cell type:code id:1a716cbf-5658-4b12-8e82-7cfa759aa937 tags: %% Cell type:code id:1a716cbf-5658-4b12-8e82-7cfa759aa937 tags:
``` octave ``` octave
Gl = Grz*Gz; Gl = Grz*Gz;
Gcl = Gl/(1+Gl); Gcl = Gl/(1+Gl);
Gcl = minreal(Gcl) Gcl = minreal(Gcl)
``` ```
%% Output %% Output
Transfer function 'Gcl' from input 'u1' to output ... Transfer function 'Gcl' from input 'u1' to output ...
1 1
y1: --- y1: ---
z^2 z^2
Sampling time: 5 s Sampling time: 5 s
Discrete-time model. Discrete-time model.
%% Cell type:code id:64727330-a47f-4e7c-a202-4a3283c9a552 tags: %% Cell type:code id:64727330-a47f-4e7c-a202-4a3283c9a552 tags:
``` octave ``` octave
``` ```
......
%% Cell type:markdown id:372cfa0a-fd52-4341-bb68-622e443a326c tags: %% Cell type:markdown id:372cfa0a-fd52-4341-bb68-622e443a326c tags:
# <span style='color:OrangeRed'>V4 REGELALGORITHMEN FÜR DIE DIGITALE REGELUNG: TEIL 3</span> # <span style='color:OrangeRed'>V4 REGELALGORITHMEN FÜR DIE DIGITALE REGELUNG - TEIL 3</span>
%% Cell type:markdown id:89fa67fe-464b-4205-8bf2-b5f3e6af9cf8 tags: %% Cell type:markdown id:89fa67fe-464b-4205-8bf2-b5f3e6af9cf8 tags:
<p>Gegeben ist das System gemäß des nachfolgenden Blockschaltbilds:</p> <p>Gegeben ist das System gemäß des nachfolgenden Blockschaltbilds:</p>
%% Cell type:markdown id:d33ed972-9241-408e-99b6-94f70b5efb5b tags: %% Cell type:markdown id:d33ed972-9241-408e-99b6-94f70b5efb5b tags:
<img src="figures/ClosedLoop.png" alt="drawing" width="600" height="300"/> <img src="figures/ClosedLoop.png" alt="drawing" width="600" height="300"/>
%% Cell type:markdown id:9df9ca81-58a9-4b89-acf2-8d378e2bc038 tags: %% Cell type:markdown id:9df9ca81-58a9-4b89-acf2-8d378e2bc038 tags:
G(s) ist dabei definiert als: G(s) ist dabei definiert als:
%% Cell type:code id:d51fb99c-e70c-4b3e-b0e2-b2efa97a2aaf tags: %% Cell type:code id:d51fb99c-e70c-4b3e-b0e2-b2efa97a2aaf tags:
``` octave ``` octave
clear all clear all
pkg load control pkg load control
% Set the Octsim Engine to run the simulation % Set the Octsim Engine to run the simulation
addpath('../Octsim'); addpath('../Octsim');
num = [-1 1] num = [-1 1]
den = [1 4 3] den = [1 4 3]
Gs = tf(num,den) Gs = tf(num,den)
``` ```
%% Output %% Output
num = num =
-1 1 -1 1
den = den =
1 4 3 1 4 3
Transfer function 'Gs' from input 'u1' to output ... Transfer function 'Gs' from input 'u1' to output ...
-s + 1 -s + 1
y1: ------------- y1: -------------
s^2 + 4 s + 3 s^2 + 4 s + 3
Continuous-time model. Continuous-time model.
%% Cell type:markdown id:3d088845-789d-4a9f-8c69-7d89099a37a8 tags: %% Cell type:markdown id:3d088845-789d-4a9f-8c69-7d89099a37a8 tags:
<p>Zunächst müssen wir die Regelstreke diskretisieren:</p> <p>Zunächst müssen wir die Regelstreke diskretisieren:</p>
%% Cell type:code id:3eba9469-4c8c-4e7a-ac53-9de59b0d075f tags: %% Cell type:code id:3eba9469-4c8c-4e7a-ac53-9de59b0d075f tags:
``` octave ``` octave
Ts = 0.2 Ts = 0.2
Gz = c2d(Gs,Ts,'zoh') Gz = c2d(Gs,Ts,'zoh')
[numzc,denzc] = tfdata(Gz) [numzc,denzc] = tfdata(Gz)
numz = numzc{1} numz = numzc{1}
denz = denzc{1} denz = denzc{1}
``` ```
%% Output %% Output
Ts = 0.20000 Ts = 0.20000
Transfer function 'Gz' from input 'u1' to output ... Transfer function 'Gz' from input 'u1' to output ...
-0.1195 z + 0.1468 -0.1195 z + 0.1468
y1: ---------------------- y1: ----------------------
z^2 - 1.368 z + 0.4493 z^2 - 1.368 z + 0.4493
Sampling time: 0.2 s Sampling time: 0.2 s
Discrete-time model. Discrete-time model.
numzc = numzc =
{ {
[1,1] = [1,1] =
-0.11952 0.14679 -0.11952 0.14679
} }
denzc = denzc =
{ {
[1,1] = [1,1] =
1.00000 -1.36754 0.44933 1.00000 -1.36754 0.44933
} }
numz = numz =
-0.11952 0.14679 -0.11952 0.14679
denz = denz =
1.00000 -1.36754 0.44933 1.00000 -1.36754 0.44933
%% Cell type:markdown id:e32155c4-417f-422d-8b9d-9838d865f26a tags: %% Cell type:markdown id:e32155c4-417f-422d-8b9d-9838d865f26a tags:
<p>Als Regler Gr(z) soll ein zeitdiskreter PID-Regler zum Einsatz kommen, der unter Verwendung eines Schwingversuchs ausglegt werden soll. Die enstrprechenden Einstellwerte für die Auslegung des Reglers sind in der folgenden Tabelle angegeben. Die kritische Frequenz beträgt 2.19 rad/sec. </p> <p>Als Regler Gr(z) soll ein zeitdiskreter PID-Regler zum Einsatz kommen, der unter Verwendung eines Schwingversuchs ausglegt werden soll. Die enstrprechenden Einstellwerte für die Auslegung des Reglers sind in der folgenden Tabelle angegeben. Die kritische Frequenz beträgt 2.19 rad/sec. </p>
%% Cell type:markdown id:7cc10159-d06c-4391-a242-37dacc2e9fb7 tags: %% Cell type:markdown id:7cc10159-d06c-4391-a242-37dacc2e9fb7 tags:
<img src="figures/Table.png" alt="drawing" width="600" height="300"/> <img src="figures/Table.png" alt="drawing" width="600" height="300"/>
%% Cell type:markdown id:c3e1ed60-e928-4a04-9b8d-e47dabba41fa tags: %% Cell type:markdown id:c3e1ed60-e928-4a04-9b8d-e47dabba41fa tags:
In einem ersten Schritt wenden wir die w-Transformation an: In einem ersten Schritt wenden wir die w-Transformation an:
%% Cell type:code id:036534da-c817-459b-8698-6e1584b0392c tags: %% Cell type:code id:036534da-c817-459b-8698-6e1584b0392c tags:
``` octave ``` octave
pkg load symbolic pkg load symbolic
warning('off', 'all'); warning('off', 'all');
syms z syms z
syms w syms w
Gzs = (numz(1)*z+numz(2))/(denz(1)*z^2+denz(2)*z+denz(3)) Gzs = (numz(1)*z+numz(2))/(denz(1)*z^2+denz(2)*z+denz(3))
Gzw = subs(Gzs,z,(2+Ts*w)/(2-Ts*w)) Gzw = subs(Gzs,z,(2+Ts*w)/(2-Ts*w))
``` ```
%% Output %% Output
Symbolic pkg v2.8.0: Python communication link active, SymPy v1.5.1. Symbolic pkg v2.8.0: Python communication link active, SymPy v1.5.1.
Gzs = (sym) Gzs = (sym)
431⋅z 226⋅π 431⋅z 226⋅π
- ───── + ───── - ───── + ─────
3606 4837 3606 4837
───────────────────── ─────────────────────
2 619⋅π⋅z 1090⋅π 2 619⋅π⋅z 1090⋅π
z - ─────── + ────── z - ─────── + ──────
1422 7621 1422 7621
Gzw = (sym) Gzw = (sym)
⎛w ⎞ ⎛w ⎞
431⋅⎜─ + 2⎟ 431⋅⎜─ + 2⎟
226⋅π ⎝5 ⎠ 226⋅π ⎝5 ⎠
───── - ──────────── ───── - ────────────
4837 ⎛ w⎞ 4837 ⎛ w⎞
3606⋅⎜2 - ─⎟ 3606⋅⎜2 - ─⎟
⎝ 5⎠ ⎝ 5⎠
───────────────────────────────── ─────────────────────────────────
2 2
⎛w ⎞ ⎛w ⎞ ⎛w ⎞ ⎛w ⎞
619⋅π⋅⎜─ + 2⎟ ⎜─ + 2⎟ 619⋅π⋅⎜─ + 2⎟ ⎜─ + 2⎟
1090⋅π ⎝5 ⎠ ⎝5 ⎠ 1090⋅π ⎝5 ⎠ ⎝5 ⎠
────── - ───────────── + ──────── ────── - ───────────── + ────────
7621 ⎛ w⎞ 2 7621 ⎛ w⎞ 2
1422⋅⎜2 - ─⎟ ⎛ w⎞ 1422⋅⎜2 - ─⎟ ⎛ w⎞
⎝ 5⎠ ⎜2 - ─⎟ ⎝ 5⎠ ⎜2 - ─⎟
⎝ 5⎠ ⎝ 5⎠
%% Cell type:markdown id:6950b9f5-4756-4a1b-8ae7-0adf3b82fef7 tags: %% Cell type:markdown id:6950b9f5-4756-4a1b-8ae7-0adf3b82fef7 tags:
<p>Jetzt können wir den Controller entwerfen. Wir müssen die Verstärkung der Übertragungsfunktion für die kritische Frequenz berechnen: </p> <p>Jetzt können wir den Controller entwerfen. Wir müssen die Verstärkung der Übertragungsfunktion für die kritische Frequenz berechnen: </p>
%% Cell type:code id:39e06d42-b904-485b-a313-d08081c7a7d6 tags: %% Cell type:code id:39e06d42-b904-485b-a313-d08081c7a7d6 tags:
``` octave ``` octave
omkrit = 2.19 omkrit = 2.19
Gg = subs(Gzw,w,1j*omkrit) Gg = subs(Gzw,w,1j*omkrit)
Gg = double(simplify(Gg)) Gg = double(simplify(Gg))
Gt = abs(Gg) Gt = abs(Gg)
``` ```
%% Output %% Output
omkrit = 2.1900 omkrit = 2.1900
Gg = (sym) Gg = (sym)
2 2
⎛ 219⋅ⅈ⎞ ⎛ 219⋅ⅈ⎞
53875000⋅⎜2 + ─────⎟ 53875000⋅⎜2 + ─────⎟
226⋅π ⎝ 500 ⎠ 226⋅π ⎝ 500 ⎠
───── - ───────────────────── ───── - ─────────────────────
4837 1889473683 4837 1889473683
─────────────────────────────────────────────── ───────────────────────────────────────────────
2 2 2 2
⎛ 219⋅ⅈ⎞ ⎛ 219⋅ⅈ⎞ ⎛ 219⋅ⅈ⎞ ⎛ 219⋅ⅈ⎞
77375000⋅π⋅⎜2 + ─────⎟ ⎜2 + ─────⎟ 77375000⋅π⋅⎜2 + ─────⎟ ⎜2 + ─────⎟
1090⋅π ⎝ 500 ⎠ ⎝ 500 ⎠ 1090⋅π ⎝ 500 ⎠ ⎝ 500 ⎠
────── - ─────────────────────── + ──────────── ────── - ─────────────────────── + ────────────
7621 745100271 2 7621 745100271 2
⎛ 219⋅ⅈ⎞ ⎛ 219⋅ⅈ⎞
⎜2 - ─────⎟ ⎜2 - ─────⎟
⎝ 500 ⎠ ⎝ 500 ⎠
Gg = -0.2668004 - 0.0011012i Gg = -0.2668004 - 0.0011012i
Gt = 0.26680 Gt = 0.26680
%% Cell type:markdown id:b2b0cb1a-e6a9-452f-a2d1-41303c0ce418 tags: %% Cell type:markdown id:b2b0cb1a-e6a9-452f-a2d1-41303c0ce418 tags:
Anwendung der Tabelle: Anwendung der Tabelle:
%% Cell type:code id:9859a5c9-7356-45b2-99ce-9d5e5b2c52fd tags: %% Cell type:code id:9859a5c9-7356-45b2-99ce-9d5e5b2c52fd tags:
``` octave ``` octave
Tkrit = 2*pi/omkrit Tkrit = 2*pi/omkrit
Kkrit = 1/Gt Kkrit = 1/Gt
``` ```
%% Output %% Output
Tkrit = 2.8690 Tkrit = 2.8690
Kkrit = 3.7481 Kkrit = 3.7481
%% Cell type:code id:120ed224-fa7c-43d9-b2ba-7d4b80979e0a tags: %% Cell type:code id:120ed224-fa7c-43d9-b2ba-7d4b80979e0a tags:
``` octave ``` octave
Kr = 0.6*Kkrit Kr = 0.6*Kkrit
Ti = 0.5*Tkrit Ti = 0.5*Tkrit
Td = 0.125*Tkrit Td = 0.125*Tkrit
``` ```
%% Output %% Output
Kr = 2.2489 Kr = 2.2489
Ti = 1.4345 Ti = 1.4345
Td = 0.35863 Td = 0.35863
%% Cell type:markdown id:f6db16ba-486e-44b5-9113-b0d82df3a327 tags: %% Cell type:markdown id:f6db16ba-486e-44b5-9113-b0d82df3a327 tags:
Die Koeffizienten des PID-Reglers sind: Die Koeffizienten des PID-Reglers sind:
%% Cell type:code id:44e27ae5-1d8c-4809-a79f-8ec6520ad859 tags: %% Cell type:code id:44e27ae5-1d8c-4809-a79f-8ec6520ad859 tags:
``` octave ``` octave
q0 = Kr*(1+Ts/Ti+Td/Ts) q0 = Kr*(1+Ts/Ti+Td/Ts)
q1 = -Kr*(1+2*Td/Ts) q1 = -Kr*(1+2*Td/Ts)
q2 = Kr*Td/Ts q2 = Kr*Td/Ts
numr = [q0 q1 q2] numr = [q0 q1 q2]
denr = [1 -1 0] denr = [1 -1 0]
Grz = tf(numr,denr,Ts) Grz = tf(numr,denr,Ts)
``` ```
%% Output %% Output
q0 = 6.5949 q0 = 6.5949
q1 = -10.314 q1 = -10.314
q2 = 4.0325 q2 = 4.0325
numr = numr =
6.5949 -10.3139 4.0325 6.5949 -10.3139 4.0325
denr = denr =
1 -1 0 1 -1 0
Transfer function 'Grz' from input 'u1' to output ... Transfer function 'Grz' from input 'u1' to output ...
6.595 z^2 - 10.31 z + 4.033 6.595 z^2 - 10.31 z + 4.033
y1: --------------------------- y1: ---------------------------
z^2 - z z^2 - z
Sampling time: 0.2 s Sampling time: 0.2 s
Discrete-time model. Discrete-time model.
%% Cell type:markdown id:69da6df5-60b6-4c59-9b7a-3af40162c538 tags: %% Cell type:markdown id:69da6df5-60b6-4c59-9b7a-3af40162c538 tags:
<p>Wir können die Ergebnisse in der Simulation überprüfen.</p> <p>Wir können die Ergebnisse in der Simulation überprüfen.</p>
%% Cell type:code id:a7c5a5cb-05f8-4bcd-8d02-f26e7dcfe99c tags: %% Cell type:code id:a7c5a5cb-05f8-4bcd-8d02-f26e7dcfe99c tags:
``` octave ``` octave
% Number of data flows in the schematic % Number of data flows in the schematic
nflows = 4; nflows = 4;
tini = 0; tini = 0;
tfinal = 20; tfinal = 20;
dt = 0.05; dt = 0.05;
% Instance of the simulation schematic % Instance of the simulation schematic
sc1 = Schema(tini,tfinal,dt,nflows); sc1 = Schema(tini,tfinal,dt,nflows);
% List of components % List of components
c1{1} = StepSource(1,0,1,0.1); c1{1} = StepSource(1,0,1,0.1);
c1{2} = Sum(1,2,3,1,-1); c1{2} = Sum(1,2,3,1,-1);
c1{3} = DTTransferFunction(3,4,numr,denr,Ts); c1{3} = DTTransferFunction(3,4,numr,denr,Ts);
c1{4} = TransferFunction(4,2,num,den); c1{4} = TransferFunction(4,2,num,den);
sc1.AddListComponents(c1); sc1.AddListComponents(c1);
% Run the schematic and plot % Run the schematic and plot
out1 = sc1.Run([1 2 3]); out1 = sc1.Run([1 2 3]);
plot(out1(1,:),out1(2,:),out1(1,:),out1(3,:)); plot(out1(1,:),out1(2,:),out1(1,:),out1(3,:));
``` ```
%% Output %% Output
%% Cell type:markdown id:3a14500a-6689-460e-9239-2ac03dc4b474 tags: %% Cell type:markdown id:3a14500a-6689-460e-9239-2ac03dc4b474 tags:
Wir können die Ergebnis auch mit diesem Matlab/Octave Befehlen überprüfen: Wir können die Ergebnis auch mit diesem Matlab/Octave Befehlen überprüfen:
%% Cell type:code id:4cd2fee7-4143-4a9c-9bd4-215a95b4b88e tags: %% Cell type:code id:4cd2fee7-4143-4a9c-9bd4-215a95b4b88e tags:
``` octave ``` octave
Gol = Grz*Gz Gol = Grz*Gz
Gcl = Gol/(1+Gol) Gcl = Gol/(1+Gol)
step(Gcl) step(Gcl)
``` ```
%% Output %% Output
Transfer function 'Gol' from input 'u1' to output ... Transfer function 'Gol' from input 'u1' to output ...
-0.7882 z^3 + 2.201 z^2 - 1.996 z + 0.5919 -0.7882 z^3 + 2.201 z^2 - 1.996 z + 0.5919
y1: ------------------------------------------ y1: ------------------------------------------
z^4 - 2.368 z^3 + 1.817 z^2 - 0.4493 z z^4 - 2.368 z^3 + 1.817 z^2 - 0.4493 z
Sampling time: 0.2 s Sampling time: 0.2 s
Discrete-time model. Discrete-time model.
Transfer function 'Gcl' from input 'u1' to output ... Transfer function 'Gcl' from input 'u1' to output ...
-0.7882 z^7 + 4.067 z^6 - 8.638 z^5 + 9.67 z^4 - 6.017 z^3 + 1.972 z^2 - 0.266 z -0.7882 z^7 + 4.067 z^6 - 8.638 z^5 + 9.67 z^4 - 6.017 z^3 + 1.972 z^2 - 0.266 z
y1: ------------------------------------------------------------------------------------ y1: ------------------------------------------------------------------------------------
z^8 - 5.523 z^7 + 13.31 z^6 - 18.14 z^5 + 15.1 z^4 - 7.649 z^3 + 2.174 z^2 - 0.266 z z^8 - 5.523 z^7 + 13.31 z^6 - 18.14 z^5 + 15.1 z^4 - 7.649 z^3 + 2.174 z^2 - 0.266 z
Sampling time: 0.2 s Sampling time: 0.2 s
Discrete-time model. Discrete-time model.
%% Cell type:code id:d105af20-f83d-468f-9486-51533fcad8b1 tags: %% Cell type:code id:d105af20-f83d-468f-9486-51533fcad8b1 tags:
``` octave ``` octave
``` ```
......
%% Cell type:markdown id:6cfcdd9e-6413-43fd-bb20-950c852ec0f7 tags: %% Cell type:markdown id:6cfcdd9e-6413-43fd-bb20-950c852ec0f7 tags:
# <span style='color:OrangeRed'>V5 ZUSTANDRAUMDARSTELLUNG</span> # <span style='color:OrangeRed'>V5 ZUSTANDSRAUMDARSTELLUNG - TEIL 1</span>
%% Cell type:markdown id:9653081e-df65-4ccd-9204-e11c542a469f tags: %% Cell type:markdown id:9653081e-df65-4ccd-9204-e11c542a469f tags:
<div style="font-family: 'times'; font-size: 13pt; text-align: justify"> <div style="font-family: 'times'; font-size: 13pt; text-align: justify">
Gegeben ist ein Roboterarm, dessen rotatorische Bewegung durch die folgende gewöhnliche Gegeben ist ein Roboterarm, dessen rotatorische Bewegung durch die folgende gewöhnliche
Differentialgleichung beschrieben wird: Differentialgleichung beschrieben wird:
y¨(t) + 2 y˙(t) = 4K u(t) y¨(t) + 2 y˙(t) = 4K u(t)
Es bezeichnet hierbei y(t) den Drehwinkel des Roboterarms und u(t) = M(t) Es bezeichnet hierbei y(t) den Drehwinkel des Roboterarms und u(t) = M(t)
das Drehmoment des Roboterarm-Servomotors. Für den Parameter K gilt: K = 2,4. das Drehmoment des Roboterarm-Servomotors. Für den Parameter K gilt: K = 2,4.
Ferner gilt y¨(0) = y˙(0) = y(0) = 0. Ferner gilt y¨(0) = y˙(0) = y(0) = 0.
%% Cell type:code id:e050a273-a079-40b9-ac0c-194e5e7f12e8 tags: %% Cell type:code id:e050a273-a079-40b9-ac0c-194e5e7f12e8 tags:
``` octave ``` octave
% Necessary to use control toolbox % Necessary to use control toolbox
pkg load control pkg load control
clear all clear all
``` ```
%% Cell type:markdown id:880aa4ff-2004-4875-affc-5759aba8104e tags: %% Cell type:markdown id:880aa4ff-2004-4875-affc-5759aba8104e tags:
<div style="font-family: 'times'; font-size: 13pt; text-align: justify"> <div style="font-family: 'times'; font-size: 13pt; text-align: justify">
Leiten Sie die zeitkontinuierliche Zustandsraumdarstellung für den Roboterarm her Leiten Sie die zeitkontinuierliche Zustandsraumdarstellung für den Roboterarm her
und geben Sie das Model an. und geben Sie das Model an.
%% Cell type:markdown id:a27e62db-897e-41e8-9b56-fd8c6b48f3bf tags: %% Cell type:markdown id:a27e62db-897e-41e8-9b56-fd8c6b48f3bf tags:
<div style="font-family: 'times'; font-size: 13pt; text-align: justify"> <div style="font-family: 'times'; font-size: 13pt; text-align: justify">
Das Zustandsraummodel des Roboterarms hat zwei Zustände: der Drehwinkel und die Ableitung des Drehwinkels Das Zustandsraummodel des Roboterarms hat zwei Zustände: der Drehwinkel und die Ableitung des Drehwinkels
%% Cell type:code id:ef3d3be5-73cd-48d2-a773-d177b638230a tags: %% Cell type:code id:ef3d3be5-73cd-48d2-a773-d177b638230a tags:
``` octave ``` octave
K = 2.4 K = 2.4
``` ```
%% Output %% Output
K = 2.4000 K = 2.4000
%% Cell type:markdown id:1943a7dc-b837-4623-8792-a1775026155d tags: %% Cell type:markdown id:1943a7dc-b837-4623-8792-a1775026155d tags:
<div style="font-family: 'times'; font-size: 13pt; text-align: justify"> <div style="font-family: 'times'; font-size: 13pt; text-align: justify">
Die Koeffizienten der Differentialgleichungen zweiter Ordnung sind dann so definiert: Die Koeffizienten der Differentialgleichungen zweiter Ordnung sind dann so definiert:
%% Cell type:code id:402f525f-8a64-4584-8d05-dbd5e42e5516 tags: %% Cell type:code id:402f525f-8a64-4584-8d05-dbd5e42e5516 tags:
``` octave ``` octave
a1 = 1 a1 = 1
a2 = 2 a2 = 2
a3 = 0 a3 = 0
b1 = 4*K b1 = 4*K
``` ```
%% Output %% Output
a1 = 1 a1 = 1
a2 = 2 a2 = 2
a3 = 0 a3 = 0
b1 = 9.6000 b1 = 9.6000
%% Cell type:markdown id:971a3f7a-3c0d-4a88-895f-3777326d7440 tags: %% Cell type:markdown id:971a3f7a-3c0d-4a88-895f-3777326d7440 tags:
<div style="font-family: 'times'; font-size: 13pt; text-align: justify"> <div style="font-family: 'times'; font-size: 13pt; text-align: justify">
Die entsprechenden Matrizen für den Zustandsraum sind wie folgt definiert: Die entsprechenden Matrizen für den Zustandsraum sind wie folgt definiert:
%% Cell type:code id:d8ab8054-efd1-4987-9600-24dbe480a40e tags: %% Cell type:code id:d8ab8054-efd1-4987-9600-24dbe480a40e tags:
``` octave ``` octave
A = [0 1;a3 -a2/a1] A = [0 1;a3 -a2/a1]
B = [0; b1] B = [0; b1]
C = [1 0] C = [1 0]
D = 0 D = 0
``` ```
%% Output %% Output
A = A =
0 1 0 1
0 -2 0 -2
B = B =
0.00000 0.00000
9.60000 9.60000
C = C =
1 0 1 0
D = 0 D = 0
%% Cell type:markdown id:9d90b015-72bf-4fb8-82a0-4ec0701232f6 tags: %% Cell type:markdown id:9d90b015-72bf-4fb8-82a0-4ec0701232f6 tags:
<div style="font-family: 'times'; font-size: 13pt; text-align: justify"> <div style="font-family: 'times'; font-size: 13pt; text-align: justify">
Diskretisieren Sie das Zustandsraummodel(unter Berücksichtigung Diskretisieren Sie das Zustandsraummodel(unter Berücksichtigung
eines Haltegliedes 0. Ordnung). Verwenden Sie hierbei zur Berechnung eines Haltegliedes 0. Ordnung). Verwenden Sie hierbei zur Berechnung
der Fundamentalmatrix das Cayley-Hamilton Theorem. Die Abtastzeit beträgt der Fundamentalmatrix das Cayley-Hamilton Theorem. Die Abtastzeit beträgt
Ts = 0,1 sec. Ts = 0,1 sec.
%% Cell type:markdown id:8629e5a2-ae35-418d-8a65-7e511440917e tags: %% Cell type:markdown id:8629e5a2-ae35-418d-8a65-7e511440917e tags:
<div style="font-family: 'times'; font-size: 13pt; text-align: justify"> <div style="font-family: 'times'; font-size: 13pt; text-align: justify">
Im ersten Schritt müssen wir die Eigenwerte berechnen: Im ersten Schritt müssen wir die Eigenwerte berechnen:
%% Cell type:code id:1ed03ed5-3913-4107-95c9-f48e52bb50ee tags: %% Cell type:code id:1ed03ed5-3913-4107-95c9-f48e52bb50ee tags:
``` octave ``` octave
p = eigs(A) p = eigs(A)
``` ```
%% Output %% Output
p = p =
-2 -2
0 0
%% Cell type:markdown id:0353e887-ebe2-44d0-b7fb-a191622cabff tags: %% Cell type:markdown id:0353e887-ebe2-44d0-b7fb-a191622cabff tags:
<div style="font-family: 'times'; font-size: 13pt; text-align: justify"> <div style="font-family: 'times'; font-size: 13pt; text-align: justify">
Dann wenden wir das Caley-Hamilton-Theorem an: Dann wenden wir das Caley-Hamilton-Theorem an:
%% Cell type:code id:0d90c253-316f-47ed-9f7b-561ff0ed4868 tags: %% Cell type:code id:0d90c253-316f-47ed-9f7b-561ff0ed4868 tags:
``` octave ``` octave
Ts = 0.1; Ts = 0.1;
Ac = [1 p(1);1 p(2)] Ac = [1 p(1);1 p(2)]
Bc = [expm(p(1)*Ts);expm(p(2)*Ts)] Bc = [expm(p(1)*Ts);expm(p(2)*Ts)]
alfa = inv(Ac)*Bc alfa = inv(Ac)*Bc
``` ```
%% Output %% Output
Ac = Ac =
1 -2 1 -2
1 0 1 0
Bc = Bc =
0.81873 0.81873
1.00000 1.00000
alfa = alfa =
1.000000 1.000000
0.090635 0.090635
%% Cell type:markdown id:d4fac333-e43d-49c7-aaec-6168b86bd6a6 tags: %% Cell type:markdown id:d4fac333-e43d-49c7-aaec-6168b86bd6a6 tags:
<div style="font-family: 'times'; font-size: 13pt; text-align: justify"> <div style="font-family: 'times'; font-size: 13pt; text-align: justify">
Und dann: Und dann:
%% Cell type:code id:828217c8-bd90-42da-8b36-9e1f05727a24 tags: %% Cell type:code id:828217c8-bd90-42da-8b36-9e1f05727a24 tags:
``` octave ``` octave
Fi = alfa(1)*eye(2)+alfa(2)*A Fi = alfa(1)*eye(2)+alfa(2)*A
``` ```
%% Output %% Output
Fi = Fi =
1.00000 0.09063 1.00000 0.09063
0.00000 0.81873 0.00000 0.81873
%% Cell type:markdown id:a6ed8d3e-8d76-451c-8480-7182a8723ab2 tags: %% Cell type:markdown id:a6ed8d3e-8d76-451c-8480-7182a8723ab2 tags:
<div style="font-family: 'times'; font-size: 13pt; text-align: justify"> <div style="font-family: 'times'; font-size: 13pt; text-align: justify">
Wir vergleichen Berechnungen mit Octave/Octsim: Wir vergleichen Berechnungen mit Octave/Octsim:
%% Cell type:code id:058ad783-d553-4bcc-873c-a6f521c16975 tags: %% Cell type:code id:058ad783-d553-4bcc-873c-a6f521c16975 tags:
``` octave ``` octave
Fio = expm(A*Ts) Fio = expm(A*Ts)
``` ```
%% Output %% Output
Fio = Fio =
1.00000 0.09063 1.00000 0.09063
0.00000 0.81873 0.00000 0.81873
%% Cell type:markdown id:63fb7dec-c4e2-4e53-b6f9-bea0649fd521 tags: %% Cell type:markdown id:63fb7dec-c4e2-4e53-b6f9-bea0649fd521 tags:
<div style="font-family: 'times'; font-size: 13pt; text-align: justify"> <div style="font-family: 'times'; font-size: 13pt; text-align: justify">
Die andere Matrix können wir so berechnen: Die andere Matrix können wir so berechnen:
%% Cell type:code id:0c2d94f8-536c-421a-98ae-69771c0e6ca2 tags: %% Cell type:code id:0c2d94f8-536c-421a-98ae-69771c0e6ca2 tags:
``` octave ``` octave
pkg load symbolic pkg load symbolic
syms x syms x
expr = expm(A*x); expr = expm(A*x);
Gi = eval(int(expr,x,0,Ts)*B) Gi = eval(int(expr,x,0,Ts)*B)
``` ```
%% Output %% Output
warning: passing floating-point values to sym is dangerous, see "help sym" warning: passing floating-point values to sym is dangerous, see "help sym"
warning: called from warning: called from
double_to_sym_heuristic at line 50 column 7 double_to_sym_heuristic at line 50 column 7
sym at line 379 column 13 sym at line 379 column 13
int at line 138 column 7 int at line 138 column 7
warning: passing floating-point values to sym is dangerous, see "help sym" warning: passing floating-point values to sym is dangerous, see "help sym"
warning: called from warning: called from
double_to_sym_heuristic at line 50 column 7 double_to_sym_heuristic at line 50 column 7
sym at line 379 column 13 sym at line 379 column 13
numeric_array_to_sym at line 36 column 16 numeric_array_to_sym at line 36 column 16
sym at line 359 column 7 sym at line 359 column 7
mtimes at line 63 column 5 mtimes at line 63 column 5
Gi = Gi =
0.044954 0.044954
0.870092 0.870092
%% Cell type:markdown id:8a4be558-f51c-415e-96f7-922b8e417422 tags: %% Cell type:markdown id:8a4be558-f51c-415e-96f7-922b8e417422 tags:
<div style="font-family: 'times'; font-size: 13pt; text-align: justify"> <div style="font-family: 'times'; font-size: 13pt; text-align: justify">
Zum Vergleich: Zum Vergleich:
%% Cell type:code id:69e7fd06-f71a-48ec-af34-d2e406f9067c tags: %% Cell type:code id:69e7fd06-f71a-48ec-af34-d2e406f9067c tags:
``` octave ``` octave
sys = ss(A,B,C,D) sys = ss(A,B,C,D)
c2d(sys,Ts,'zoh') c2d(sys,Ts,'zoh')
``` ```
%% Output %% Output
sys.a = sys.a =
x1 x2 x1 x2
x1 0 1 x1 0 1
x2 0 -2 x2 0 -2
sys.b = sys.b =
u1 u1
x1 0 x1 0
x2 9.6 x2 9.6
sys.c = sys.c =
x1 x2 x1 x2
y1 1 0 y1 1 0
sys.d = sys.d =
u1 u1
y1 0 y1 0
Continuous-time model. Continuous-time model.
ans.a = ans.a =
x1 x2 x1 x2
x1 1 0.09063 x1 1 0.09063
x2 0 0.8187 x2 0 0.8187
ans.b = ans.b =
u1 u1
x1 0.04495 x1 0.04495
x2 0.8701 x2 0.8701
ans.c = ans.c =
x1 x2 x1 x2
y1 1 0 y1 1 0
ans.d = ans.d =
u1 u1
y1 0 y1 0
Sampling time: 0.1 s Sampling time: 0.1 s
Discrete-time model. Discrete-time model.
%% Cell type:code id:71ef35e6-15e0-441d-9d8e-58fccbd7bc8d tags: %% Cell type:code id:71ef35e6-15e0-441d-9d8e-58fccbd7bc8d tags:
``` octave ``` octave
``` ```
......
%% Cell type:markdown id:6cfcdd9e-6413-43fd-bb20-950c852ec0f7 tags: %% Cell type:markdown id:6cfcdd9e-6413-43fd-bb20-950c852ec0f7 tags:
# <span style='color:OrangeRed'>V5 ZUSTANDRAUMDARSTELLUNG TEIL 2</span> # <span style='color:OrangeRed'>V5 ZUSTANDSRAUMDARSTELLUNG - TEIL 2</span>
%% Cell type:markdown id:9653081e-df65-4ccd-9204-e11c542a469f tags: %% Cell type:markdown id:9653081e-df65-4ccd-9204-e11c542a469f tags:
<div style="font-family: 'times'; font-size: 13pt; text-align: justify"> <div style="font-family: 'times'; font-size: 13pt; text-align: justify">
In dieser Aufgabe soll das Zustandsraummodell eines Wasserstoff-Elektrolyse-Stacks bestimmt werden. Für den Wasserstoff-Elektrolyse-Stack ist das folgende Ersatzschaltbild gegeben. Der Eingang ist u(t) = v(t) - v_rev(t). Die gemessene Ausgangsgröße ist y(t) = i_L(t). In dieser Aufgabe soll das Zustandsraummodell eines Wasserstoff-Elektrolyse-Stacks bestimmt werden. Für den Wasserstoff-Elektrolyse-Stack ist das folgende Ersatzschaltbild gegeben. Der Eingang ist u(t) = v(t) - v_rev(t). Die gemessene Ausgangsgröße ist y(t) = i_L(t).
%% Cell type:markdown id:aaadb57b-f7ac-4db7-baf6-b300fb0d826f tags: %% Cell type:markdown id:aaadb57b-f7ac-4db7-baf6-b300fb0d826f tags:
<img src="figures/circuitel.png" alt="drawing" width="600" height="300"/> <img src="figures/circuitel.png" alt="drawing" width="600" height="300"/>
%% Cell type:markdown id:a27e62db-897e-41e8-9b56-fd8c6b48f3bf tags: %% Cell type:markdown id:a27e62db-897e-41e8-9b56-fd8c6b48f3bf tags:
<div style="font-family: 'times'; font-size: 13pt; text-align: justify"> <div style="font-family: 'times'; font-size: 13pt; text-align: justify">
Das Zustandsraummodel hat zwei Zustände: die Spannung des Kondensators und der Strom der Spule. Das Zustandsraummodel hat zwei Zustände: die Spannung des Kondensators und der Strom der Spule.
%% Cell type:code id:ef3d3be5-73cd-48d2-a773-d177b638230a tags: %% Cell type:code id:ef3d3be5-73cd-48d2-a773-d177b638230a tags:
``` octave ``` octave
clear all clear all
pkg load symbolic pkg load symbolic
warning('off', 'all'); warning('off', 'all');
syms C syms C
syms R1 syms R1
syms R2 syms R2
syms L syms L
A = [-R2/L -1/L; 1/C -1/(C*R1)] A = [-R2/L -1/L; 1/C -1/(C*R1)]
B = [1/L; 0] B = [1/L; 0]
``` ```
%% Output %% Output
Symbolic pkg v2.8.0: Python communication link active, SymPy v1.5.1. Symbolic pkg v2.8.0: Python communication link active, SymPy v1.5.1.
A = (sym 2×2 matrix) A = (sym 2×2 matrix)
⎡-R₂ -1 ⎤ ⎡-R₂ -1 ⎤
⎢──── ─── ⎥ ⎢──── ─── ⎥
⎢ L L ⎥ ⎢ L L ⎥
⎢ ⎥ ⎢ ⎥
⎢ 1 -1 ⎥ ⎢ 1 -1 ⎥
⎢ ─ ────⎥ ⎢ ─ ────⎥
⎣ C C⋅R₁⎦ ⎣ C C⋅R₁⎦
B = (sym 2×1 matrix) B = (sym 2×1 matrix)
⎡1⎤ ⎡1⎤
⎢─⎥ ⎢─⎥
⎢L⎥ ⎢L⎥
⎢ ⎥ ⎢ ⎥
⎣0⎦ ⎣0⎦
%% Cell type:markdown id:1943a7dc-b837-4623-8792-a1775026155d tags: %% Cell type:markdown id:1943a7dc-b837-4623-8792-a1775026155d tags:
<div style="font-family: 'times'; font-size: 13pt; text-align: justify"> <div style="font-family: 'times'; font-size: 13pt; text-align: justify">
Die folgenden Parameter seien gegeben: Die folgenden Parameter seien gegeben:
%% Cell type:code id:402f525f-8a64-4584-8d05-dbd5e42e5516 tags: %% Cell type:code id:402f525f-8a64-4584-8d05-dbd5e42e5516 tags:
``` octave ``` octave
Lv = 0.5 Lv = 0.5
Cv = 0.1 Cv = 0.1
R1v = 1.0 R1v = 1.0
R2v = 0.5 R2v = 0.5
``` ```
%% Output %% Output
Lv = 0.50000 Lv = 0.50000
Cv = 0.10000 Cv = 0.10000
R1v = 1 R1v = 1
R2v = 0.50000 R2v = 0.50000
%% Cell type:markdown id:971a3f7a-3c0d-4a88-895f-3777326d7440 tags: %% Cell type:markdown id:971a3f7a-3c0d-4a88-895f-3777326d7440 tags:
<div style="font-family: 'times'; font-size: 13pt; text-align: justify"> <div style="font-family: 'times'; font-size: 13pt; text-align: justify">
Mit dieser Parametrisierung können die Matrizen für den Zustandsraum wie folgt berechnet werden: Mit dieser Parametrisierung können die Matrizen für den Zustandsraum wie folgt berechnet werden:
%% Cell type:code id:d8ab8054-efd1-4987-9600-24dbe480a40e tags: %% Cell type:code id:d8ab8054-efd1-4987-9600-24dbe480a40e tags:
``` octave ``` octave
As = subs(A,{L,C,R1,R2},{Lv,Cv,R1v,R2v}) As = subs(A,{L,C,R1,R2},{Lv,Cv,R1v,R2v})
Av = double(As) Av = double(As)
Bs = subs(B,{L,C,R1,R2},{Lv,Cv,R1v,R2v}) Bs = subs(B,{L,C,R1,R2},{Lv,Cv,R1v,R2v})
Bv = double(Bs) Bv = double(Bs)
``` ```
%% Output %% Output
As = (sym 2×2 matrix) As = (sym 2×2 matrix)
⎡-1 -2 ⎤ ⎡-1 -2 ⎤
⎢ ⎥ ⎢ ⎥
⎣10 -10⎦ ⎣10 -10⎦
Av = Av =
-1 -2 -1 -2
10 -10 10 -10
Bs = (sym 2×1 matrix) Bs = (sym 2×1 matrix)
⎡2⎤ ⎡2⎤
⎢ ⎥ ⎢ ⎥
⎣0⎦ ⎣0⎦
Bv = Bv =
2 2
0 0
%% Cell type:markdown id:9d90b015-72bf-4fb8-82a0-4ec0701232f6 tags: %% Cell type:markdown id:9d90b015-72bf-4fb8-82a0-4ec0701232f6 tags:
<div style="font-family: 'times'; font-size: 13pt; text-align: justify"> <div style="font-family: 'times'; font-size: 13pt; text-align: justify">
Diskretisieren Sie das Zustandsraummodel (unter Berücksichtigung eines Haltegliedes 0. Ordnung). Verwenden Sie hierbei zur Berechnung der Fundamentalmatrix das Cayley-Hamilton Theorem. Die Abtastzeit beträgt Ts = 0,1sec. Diskretisieren Sie das Zustandsraummodel (unter Berücksichtigung eines Haltegliedes 0. Ordnung). Verwenden Sie hierbei zur Berechnung der Fundamentalmatrix das Cayley-Hamilton Theorem. Die Abtastzeit beträgt Ts = 0,1sec.
%% Cell type:markdown id:8629e5a2-ae35-418d-8a65-7e511440917e tags: %% Cell type:markdown id:8629e5a2-ae35-418d-8a65-7e511440917e tags:
<div style="font-family: 'times'; font-size: 13pt; text-align: justify"> <div style="font-family: 'times'; font-size: 13pt; text-align: justify">
Im ersten Schritt müssen wir die Eigenwerte der Systemmatrix berechnen: Im ersten Schritt müssen wir die Eigenwerte der Systemmatrix berechnen:
%% Cell type:code id:1ed03ed5-3913-4107-95c9-f48e52bb50ee tags: %% Cell type:code id:1ed03ed5-3913-4107-95c9-f48e52bb50ee tags:
``` octave ``` octave
p = eigs(Av) p = eigs(Av)
``` ```
%% Output %% Output
p = p =
-6.0000 -6.0000
-5.0000 -5.0000
%% Cell type:markdown id:0353e887-ebe2-44d0-b7fb-a191622cabff tags: %% Cell type:markdown id:0353e887-ebe2-44d0-b7fb-a191622cabff tags:
<div style="font-family: 'times'; font-size: 13pt; text-align: justify"> <div style="font-family: 'times'; font-size: 13pt; text-align: justify">
Dann wenden wir das Caley-Hamilton-Theorem an: Dann wenden wir das Caley-Hamilton-Theorem an:
%% Cell type:code id:0d90c253-316f-47ed-9f7b-561ff0ed4868 tags: %% Cell type:code id:0d90c253-316f-47ed-9f7b-561ff0ed4868 tags:
``` octave ``` octave
Ts = 0.1; Ts = 0.1;
Ac = [1 p(1);1 p(2)] Ac = [1 p(1);1 p(2)]
Bc = [expm(p(1)*Ts);expm(p(2)*Ts)] Bc = [expm(p(1)*Ts);expm(p(2)*Ts)]
alfa = inv(Ac)*Bc alfa = inv(Ac)*Bc
``` ```
%% Output %% Output
Ac = Ac =
1.0000 -6.0000 1.0000 -6.0000
1.0000 -5.0000 1.0000 -5.0000
Bc = Bc =
0.54881 0.54881
0.60653 0.60653
alfa = alfa =
0.895126 0.895126
0.057719 0.057719
%% Cell type:markdown id:d4fac333-e43d-49c7-aaec-6168b86bd6a6 tags: %% Cell type:markdown id:d4fac333-e43d-49c7-aaec-6168b86bd6a6 tags:
<div style="font-family: 'times'; font-size: 13pt; text-align: justify"> <div style="font-family: 'times'; font-size: 13pt; text-align: justify">
Und dann: Und dann:
%% Cell type:code id:828217c8-bd90-42da-8b36-9e1f05727a24 tags: %% Cell type:code id:828217c8-bd90-42da-8b36-9e1f05727a24 tags:
``` octave ``` octave
Fi = alfa(1)*eye(2)+alfa(2)*Av Fi = alfa(1)*eye(2)+alfa(2)*Av
``` ```
%% Output %% Output
Fi = Fi =
0.83741 -0.11544 0.83741 -0.11544
0.57719 0.31794 0.57719 0.31794
%% Cell type:markdown id:a6ed8d3e-8d76-451c-8480-7182a8723ab2 tags: %% Cell type:markdown id:a6ed8d3e-8d76-451c-8480-7182a8723ab2 tags:
<div style="font-family: 'times'; font-size: 13pt; text-align: justify"> <div style="font-family: 'times'; font-size: 13pt; text-align: justify">
Wir vergleichen Berechnungen mit Octave/Octsim: Wir vergleichen Berechnungen mit Octave/Octsim:
%% Cell type:code id:058ad783-d553-4bcc-873c-a6f521c16975 tags: %% Cell type:code id:058ad783-d553-4bcc-873c-a6f521c16975 tags:
``` octave ``` octave
Fio = expm(Av*Ts) Fio = expm(Av*Ts)
``` ```
%% Output %% Output
Fio = Fio =
0.83741 -0.11544 0.83741 -0.11544
0.57719 0.31794 0.57719 0.31794
%% Cell type:markdown id:63fb7dec-c4e2-4e53-b6f9-bea0649fd521 tags: %% Cell type:markdown id:63fb7dec-c4e2-4e53-b6f9-bea0649fd521 tags:
<div style="font-family: 'times'; font-size: 13pt; text-align: justify"> <div style="font-family: 'times'; font-size: 13pt; text-align: justify">
Die Fundamentalmatrix können wir wie folgt berechnen: Die Fundamentalmatrix können wir wie folgt berechnen:
%% Cell type:code id:0c2d94f8-536c-421a-98ae-69771c0e6ca2 tags: %% Cell type:code id:0c2d94f8-536c-421a-98ae-69771c0e6ca2 tags:
``` octave ``` octave
syms t syms t
expr = expm(Av*t) expr = expm(Av*t)
Gi = eval(int(expr,t,0,Ts)*Bv) Gi = eval(int(expr,t,0,Ts)*Bv)
``` ```
%% Output %% Output
expr = (sym 2×2 matrix) expr = (sym 2×2 matrix)
⎡ -5⋅t -6⋅t -5⋅t -6⋅t⎤ ⎡ -5⋅t -6⋅t -5⋅t -6⋅t⎤
⎢ 5⋅ℯ - 4⋅ℯ - 2⋅ℯ + 2⋅ℯ ⎥ ⎢ 5⋅ℯ - 4⋅ℯ - 2⋅ℯ + 2⋅ℯ ⎥
⎢ ⎥ ⎢ ⎥
⎢ -5⋅t -6⋅t -5⋅t -6⋅t⎥ ⎢ -5⋅t -6⋅t -5⋅t -6⋅t⎥
⎣10⋅ℯ - 10⋅ℯ - 4⋅ℯ + 5⋅ℯ ⎦ ⎣10⋅ℯ - 10⋅ℯ - 4⋅ℯ + 5⋅ℯ ⎦
Gi = Gi =
0.185354 0.185354
0.069916 0.069916
%% Cell type:markdown id:8a4be558-f51c-415e-96f7-922b8e417422 tags: %% Cell type:markdown id:8a4be558-f51c-415e-96f7-922b8e417422 tags:
<div style="font-family: 'times'; font-size: 13pt; text-align: justify"> <div style="font-family: 'times'; font-size: 13pt; text-align: justify">
Zum Vergleich: Zum Vergleich:
%% Cell type:code id:69e7fd06-f71a-48ec-af34-d2e406f9067c tags: %% Cell type:code id:69e7fd06-f71a-48ec-af34-d2e406f9067c tags:
``` octave ``` octave
pkg load control pkg load control
C = [1 0] C = [1 0]
D = 0 D = 0
sys = ss(Av,Bv,C,D) sys = ss(Av,Bv,C,D)
c2d(sys,Ts,'zoh') c2d(sys,Ts,'zoh')
``` ```
%% Output %% Output
C = C =
1 0 1 0
D = 0 D = 0
sys.a = sys.a =
x1 x2 x1 x2
x1 -1 -2 x1 -1 -2
x2 10 -10 x2 10 -10
sys.b = sys.b =
u1 u1
x1 2 x1 2
x2 0 x2 0
sys.c = sys.c =
x1 x2 x1 x2
y1 1 0 y1 1 0
sys.d = sys.d =
u1 u1
y1 0 y1 0
Continuous-time model. Continuous-time model.
ans.a = ans.a =
x1 x2 x1 x2
x1 0.8374 -0.1154 x1 0.8374 -0.1154
x2 0.5772 0.3179 x2 0.5772 0.3179
ans.b = ans.b =
u1 u1
x1 0.1854 x1 0.1854
x2 0.06992 x2 0.06992
ans.c = ans.c =
x1 x2 x1 x2
y1 1 0 y1 1 0
ans.d = ans.d =
u1 u1
y1 0 y1 0
Sampling time: 0.1 s Sampling time: 0.1 s
Discrete-time model. Discrete-time model.
%% Cell type:markdown id:3e5f08c8-020f-4ec1-af60-64281e28388e tags: %% Cell type:markdown id:3e5f08c8-020f-4ec1-af60-64281e28388e tags:
Eine weitere Möglichkeit ist die Verwendung der inversen Laplace-Transformation: Eine weitere Möglichkeit ist die Verwendung der inversen Laplace-Transformation:
%% Cell type:code id:71ef35e6-15e0-441d-9d8e-58fccbd7bc8d tags: %% Cell type:code id:71ef35e6-15e0-441d-9d8e-58fccbd7bc8d tags:
``` octave ``` octave
syms s syms s
syms t syms t
IA = 1/(s*s-(p(1)+p(2))*s+p(1)*p(2))*[s-Av(2,2) Av(1,2); Av(2,1) s-Av(1,1)] IA = 1/(s*s-(p(1)+p(2))*s+p(1)*p(2))*[s-Av(2,2) Av(1,2); Av(2,1) s-Av(1,1)]
``` ```
%% Output %% Output
IA = (sym 2×2 matrix) IA = (sym 2×2 matrix)
⎡ s + 10 -2 ⎤ ⎡ s + 10 -2 ⎤
⎢────────────── ──────────────⎥ ⎢────────────── ──────────────⎥
⎢ 2 2 ⎥ ⎢ 2 2 ⎥
⎢s + 11⋅s + 30 s + 11⋅s + 30⎥ ⎢s + 11⋅s + 30 s + 11⋅s + 30⎥
⎢ ⎥ ⎢ ⎥
⎢ 10 s + 1 ⎥ ⎢ 10 s + 1 ⎥
⎢────────────── ──────────────⎥ ⎢────────────── ──────────────⎥
⎢ 2 2 ⎥ ⎢ 2 2 ⎥
⎣s + 11⋅s + 30 s + 11⋅s + 30⎦ ⎣s + 11⋅s + 30 s + 11⋅s + 30⎦
%% Cell type:code id:b591b379-c130-4ecb-9f0b-8fb4a0558186 tags: %% Cell type:code id:b591b379-c130-4ecb-9f0b-8fb4a0558186 tags:
``` octave ``` octave
F11 = ilaplace(IA(1,1),t) F11 = ilaplace(IA(1,1),t)
``` ```
%% Output %% Output
F11 = (sym) F11 = (sym)
⎛ t ⎞ -6⋅t ⎛ t ⎞ -6⋅t
⎝5⋅ℯ - 4⎠⋅ℯ ⋅θ(t) ⎝5⋅ℯ - 4⎠⋅ℯ ⋅θ(t)
%% Cell type:code id:85a9e63e-606e-459a-998d-d3fb9fdc9ae8 tags: %% Cell type:code id:85a9e63e-606e-459a-998d-d3fb9fdc9ae8 tags:
``` octave ``` octave
F12 = ilaplace(IA(1,2),t) F12 = ilaplace(IA(1,2),t)
``` ```
%% Output %% Output
F12 = (sym) F12 = (sym)
⎛ t⎞ -6⋅t ⎛ t⎞ -6⋅t
2⋅⎝1 - ℯ ⎠⋅ℯ ⋅θ(t) 2⋅⎝1 - ℯ ⎠⋅ℯ ⋅θ(t)
%% Cell type:code id:c052644a-ed96-4d90-8334-a550a8456dac tags: %% Cell type:code id:c052644a-ed96-4d90-8334-a550a8456dac tags:
``` octave ``` octave
F21 = ilaplace(IA(2,1),t) F21 = ilaplace(IA(2,1),t)
``` ```
%% Output %% Output
F21 = (sym) F21 = (sym)
⎛ t ⎞ -6⋅t ⎛ t ⎞ -6⋅t
10⋅⎝ℯ - 1⎠⋅ℯ ⋅θ(t) 10⋅⎝ℯ - 1⎠⋅ℯ ⋅θ(t)
%% Cell type:code id:37bc5ef8-e669-413a-a35c-46f5c95062c7 tags: %% Cell type:code id:37bc5ef8-e669-413a-a35c-46f5c95062c7 tags:
``` octave ``` octave
F22 = ilaplace(IA(2,2),t) F22 = ilaplace(IA(2,2),t)
``` ```
%% Output %% Output
F22 = (sym) F22 = (sym)
⎛ t ⎞ -6⋅t ⎛ t ⎞ -6⋅t
-⎝4⋅ℯ - 5⎠⋅ℯ ⋅θ(t) -⎝4⋅ℯ - 5⎠⋅ℯ ⋅θ(t)
%% Cell type:code id:cf9514ee-097c-4548-8124-982255128efb tags: %% Cell type:code id:cf9514ee-097c-4548-8124-982255128efb tags:
``` octave ``` octave
Fil = [double(subs(F11,t,Ts)) double(subs(F12,t,Ts)); double(subs(F21,t,Ts)) double(subs(F22,t,Ts))] Fil = [double(subs(F11,t,Ts)) double(subs(F12,t,Ts)); double(subs(F21,t,Ts)) double(subs(F22,t,Ts))]
``` ```
%% Output %% Output
Fil = Fil =
0.83741 -0.11544 0.83741 -0.11544
0.57719 0.31794 0.57719 0.31794
%% Cell type:code id:f2df9672-8ad4-4052-9dd2-bb9d18937e83 tags: %% Cell type:code id:f2df9672-8ad4-4052-9dd2-bb9d18937e83 tags:
``` octave ``` octave
``` ```
......
%% Cell type:markdown id:1f0f7673-ab1a-413f-b73c-0a248ba39ed9 tags: %% Cell type:markdown id:1f0f7673-ab1a-413f-b73c-0a248ba39ed9 tags:
# <span style='color:OrangeRed'>V6 NORMALFORMEN IN ZUSTANDRAUMDARSTELLUNG</span> # <span style='color:OrangeRed'>V6 NORMALFORMEN IN ZUSTANDSRAUMDARSTELLUNG - TEIL 1</span>
%% Cell type:markdown id:9653081e-df65-4ccd-9204-e11c542a469f tags: %% Cell type:markdown id:9653081e-df65-4ccd-9204-e11c542a469f tags:
<div style="font-family: 'times'; font-size: 13pt; text-align: justify"> <div style="font-family: 'times'; font-size: 13pt; text-align: justify">
Gegeben ist die Prinzipskizze einer Wasserturbine zur Stromerzeugung: Gegeben ist die Prinzipskizze einer Wasserturbine zur Stromerzeugung:
%% Cell type:markdown id:880aa4ff-2004-4875-affc-5759aba8104e tags: %% Cell type:markdown id:880aa4ff-2004-4875-affc-5759aba8104e tags:
<img src="figures/Turbine.png" alt="drawing" width="600" height="300"/> <img src="figures/Turbine.png" alt="drawing" width="600" height="300"/>
%% Cell type:markdown id:a27e62db-897e-41e8-9b56-fd8c6b48f3bf tags: %% Cell type:markdown id:a27e62db-897e-41e8-9b56-fd8c6b48f3bf tags:
<div style="font-family: 'times'; font-size: 13pt; text-align: justify"> <div style="font-family: 'times'; font-size: 13pt; text-align: justify">
Die Wasserturbine sei in dieser Aufgabe die zu betrachtende Regelstrecke, die als linear Die Wasserturbine sei in dieser Aufgabe die zu betrachtende Regelstrecke, die als linear
angenommen wird. Damit lässt sich das System der Wasserturbine gemäß des nachfolgenden angenommen wird. Damit lässt sich das System der Wasserturbine gemäß des nachfolgenden
Wirkungsplans darstellen: Wirkungsplans darstellen:
%% Cell type:markdown id:add7e04a-83e6-4685-b845-47137f44a388 tags: %% Cell type:markdown id:add7e04a-83e6-4685-b845-47137f44a388 tags:
<img src="figures/TurbineSchema.png" alt="drawing" width="600" height="300"/> <img src="figures/TurbineSchema.png" alt="drawing" width="600" height="300"/>
%% Cell type:code id:e050a273-a079-40b9-ac0c-194e5e7f12e8 tags: %% Cell type:code id:e050a273-a079-40b9-ac0c-194e5e7f12e8 tags:
``` octave ``` octave
% Necessary to use control toolbox % Necessary to use control toolbox
pkg load control pkg load control
clear all clear all
``` ```
%% Cell type:markdown id:1943a7dc-b837-4623-8792-a1775026155d tags: %% Cell type:markdown id:1943a7dc-b837-4623-8792-a1775026155d tags:
<div style="font-family: 'times'; font-size: 13pt; text-align: justify"> <div style="font-family: 'times'; font-size: 13pt; text-align: justify">
Geben Sie die zeitdiskrete Zustandsraumdarstellung des Systems und dessen Übertragungsfunktion an. Geben Sie die zeitdiskrete Zustandsraumdarstellung des Systems und dessen Übertragungsfunktion an.
%% Cell type:code id:ef3d3be5-73cd-48d2-a773-d177b638230a tags: %% Cell type:code id:ef3d3be5-73cd-48d2-a773-d177b638230a tags:
``` octave ``` octave
Kb = 500 Kb = 500
Kt = 104 Kt = 104
Kv = 2 Kv = 2
J = 100 J = 100
``` ```
%% Output %% Output
Kb = 500 Kb = 500
Kt = 104 Kt = 104
Kv = 2 Kv = 2
J = 100 J = 100
%% Cell type:code id:402f525f-8a64-4584-8d05-dbd5e42e5516 tags: %% Cell type:code id:402f525f-8a64-4584-8d05-dbd5e42e5516 tags:
``` octave ``` octave
A = [0 -Kv;Kt/J -Kb/J] A = [0 -Kv;Kt/J -Kb/J]
B = [1; 0] B = [1; 0]
C = [0 1] C = [0 1]
D = 0 D = 0
``` ```
%% Output %% Output
A = A =
0.00000 -2.00000 0.00000 -2.00000
1.04000 -5.00000 1.04000 -5.00000
B = B =
1 1
0 0
C = C =
0 1 0 1
D = 0 D = 0
%% Cell type:markdown id:8629e5a2-ae35-418d-8a65-7e511440917e tags: %% Cell type:markdown id:8629e5a2-ae35-418d-8a65-7e511440917e tags:
<div style="font-family: 'times'; font-size: 13pt; text-align: justify"> <div style="font-family: 'times'; font-size: 13pt; text-align: justify">
Dann berechnen wir die Eigenwerte: Dann berechnen wir die Eigenwerte:
%% Cell type:code id:1ed03ed5-3913-4107-95c9-f48e52bb50ee tags: %% Cell type:code id:1ed03ed5-3913-4107-95c9-f48e52bb50ee tags:
``` octave ``` octave
p = eigs(A) p = eigs(A)
``` ```
%% Output %% Output
p = p =
-4.54206 -4.54206
-0.45794 -0.45794
%% Cell type:markdown id:0353e887-ebe2-44d0-b7fb-a191622cabff tags: %% Cell type:markdown id:0353e887-ebe2-44d0-b7fb-a191622cabff tags:
<div style="font-family: 'times'; font-size: 13pt; text-align: justify"> <div style="font-family: 'times'; font-size: 13pt; text-align: justify">
Dann wenden wir das Caley-Hamilton-Theorem an: Dann wenden wir das Caley-Hamilton-Theorem an:
%% Cell type:code id:0d90c253-316f-47ed-9f7b-561ff0ed4868 tags: %% Cell type:code id:0d90c253-316f-47ed-9f7b-561ff0ed4868 tags:
``` octave ``` octave
Ts = 0.1; Ts = 0.1;
Ac = [1 p(1);1 p(2)] Ac = [1 p(1);1 p(2)]
Bc = [expm(p(1)*Ts);expm(p(2)*Ts)] Bc = [expm(p(1)*Ts);expm(p(2)*Ts)]
alfa = inv(Ac)*Bc alfa = inv(Ac)*Bc
``` ```
%% Output %% Output
Ac = Ac =
1.00000 -4.54206 1.00000 -4.54206
1.00000 -0.45794 1.00000 -0.45794
Bc = Bc =
0.63495 0.63495
0.95524 0.95524
alfa = alfa =
0.991151 0.991151
0.078422 0.078422
%% Cell type:markdown id:d4fac333-e43d-49c7-aaec-6168b86bd6a6 tags: %% Cell type:markdown id:d4fac333-e43d-49c7-aaec-6168b86bd6a6 tags:
<div style="font-family: 'times'; font-size: 13pt; text-align: justify"> <div style="font-family: 'times'; font-size: 13pt; text-align: justify">
und dann: und dann:
%% Cell type:code id:828217c8-bd90-42da-8b36-9e1f05727a24 tags: %% Cell type:code id:828217c8-bd90-42da-8b36-9e1f05727a24 tags:
``` octave ``` octave
Fi = alfa(1)*eye(2)+alfa(2)*A Fi = alfa(1)*eye(2)+alfa(2)*A
``` ```
%% Output %% Output
Fi = Fi =
0.991151 -0.156845 0.991151 -0.156845
0.081559 0.599039 0.081559 0.599039
%% Cell type:markdown id:a6ed8d3e-8d76-451c-8480-7182a8723ab2 tags: %% Cell type:markdown id:a6ed8d3e-8d76-451c-8480-7182a8723ab2 tags:
<div style="font-family: 'times'; font-size: 13pt; text-align: justify"> <div style="font-family: 'times'; font-size: 13pt; text-align: justify">
Wir vergleichen unsere Berechnungen mit Octave/Octsim: Wir vergleichen unsere Berechnungen mit Octave/Octsim:
%% Cell type:code id:058ad783-d553-4bcc-873c-a6f521c16975 tags: %% Cell type:code id:058ad783-d553-4bcc-873c-a6f521c16975 tags:
``` octave ``` octave
Fio = expm(A*Ts) Fio = expm(A*Ts)
``` ```
%% Output %% Output
Fio = Fio =
0.991151 -0.156845 0.991151 -0.156845
0.081559 0.599039 0.081559 0.599039
%% Cell type:markdown id:63fb7dec-c4e2-4e53-b6f9-bea0649fd521 tags: %% Cell type:markdown id:63fb7dec-c4e2-4e53-b6f9-bea0649fd521 tags:
<div style="font-family: 'times'; font-size: 13pt; text-align: justify"> <div style="font-family: 'times'; font-size: 13pt; text-align: justify">
Die andere Matrix können wir so berechnen: Die andere Matrix können wir so berechnen:
%% Cell type:code id:0c2d94f8-536c-421a-98ae-69771c0e6ca2 tags: %% Cell type:code id:0c2d94f8-536c-421a-98ae-69771c0e6ca2 tags:
``` octave ``` octave
Gi = (Fi-eye(2))*inv(A)*B Gi = (Fi-eye(2))*inv(A)*B
``` ```
%% Output %% Output
Gi = Gi =
0.0996930 0.0996930
0.0044243 0.0044243
%% Cell type:markdown id:8a4be558-f51c-415e-96f7-922b8e417422 tags: %% Cell type:markdown id:8a4be558-f51c-415e-96f7-922b8e417422 tags:
<div style="font-family: 'times'; font-size: 13pt; text-align: justify"> <div style="font-family: 'times'; font-size: 13pt; text-align: justify">
Zum Vergleich: Zum Vergleich:
%% Cell type:code id:69e7fd06-f71a-48ec-af34-d2e406f9067c tags: %% Cell type:code id:69e7fd06-f71a-48ec-af34-d2e406f9067c tags:
``` octave ``` octave
sys = ss(A,B,C,D) sys = ss(A,B,C,D)
sysd = c2d(sys,Ts,'zoh') sysd = c2d(sys,Ts,'zoh')
``` ```
%% Output %% Output
sys.a = sys.a =
x1 x2 x1 x2
x1 0 -2 x1 0 -2
x2 1.04 -5 x2 1.04 -5
sys.b = sys.b =
u1 u1
x1 1 x1 1
x2 0 x2 0
sys.c = sys.c =
x1 x2 x1 x2
y1 0 1 y1 0 1
sys.d = sys.d =
u1 u1
y1 0 y1 0
Continuous-time model. Continuous-time model.
sysd.a = sysd.a =
x1 x2 x1 x2
x1 0.9912 -0.1568 x1 0.9912 -0.1568
x2 0.08156 0.599 x2 0.08156 0.599
sysd.b = sysd.b =
u1 u1
x1 0.09969 x1 0.09969
x2 0.004424 x2 0.004424
sysd.c = sysd.c =
x1 x2 x1 x2
y1 0 1 y1 0 1
sysd.d = sysd.d =
u1 u1
y1 0 y1 0
Sampling time: 0.1 s Sampling time: 0.1 s
Discrete-time model. Discrete-time model.
%% Cell type:markdown id:4fb92a07-3450-4c37-bef4-7e3734cc8c20 tags: %% Cell type:markdown id:4fb92a07-3450-4c37-bef4-7e3734cc8c20 tags:
<div style="font-family: 'times'; font-size: 13pt; text-align: justify"> <div style="font-family: 'times'; font-size: 13pt; text-align: justify">
Jetzt können wir die Übertragungsfunktion in der z-Ebene berechnen: Jetzt können wir die Übertragungsfunktion in der z-Ebene berechnen:
%% Cell type:code id:cbf41502-116d-40b5-8fec-39faf2062a03 tags: %% Cell type:code id:cbf41502-116d-40b5-8fec-39faf2062a03 tags:
``` octave ``` octave
pkg load signal pkg load signal
[num den] = ss2tf(Fi,Gi,C,D) [num den] = ss2tf(Fi,Gi,C,D)
Gz = tf(num,den,Ts) Gz = tf(num,den,Ts)
``` ```
%% Output %% Output
num = num =
0.0000000 0.0044243 0.0037458 0.0000000 0.0044243 0.0037458
den = den =
1.00000 -1.59019 0.60653 1.00000 -1.59019 0.60653
Transfer function 'Gz' from input 'u1' to output ... Transfer function 'Gz' from input 'u1' to output ...
0.004424 z + 0.003746 0.004424 z + 0.003746
y1: --------------------- y1: ---------------------
z^2 - 1.59 z + 0.6065 z^2 - 1.59 z + 0.6065
Sampling time: 0.1 s Sampling time: 0.1 s
Discrete-time model. Discrete-time model.
%% Cell type:code id:6ebd4c8d-4218-41b7-aa86-902033541283 tags: %% Cell type:code id:6ebd4c8d-4218-41b7-aa86-902033541283 tags:
``` octave ``` octave
``` ```
......
%% Cell type:markdown id:1f0f7673-ab1a-413f-b73c-0a248ba39ed9 tags: %% Cell type:markdown id:1f0f7673-ab1a-413f-b73c-0a248ba39ed9 tags:
# <span style='color:OrangeRed'>V6 NORMALFORMEN IN ZUSTANDRAUMDARSTELLUNG TEIL 2</span> # <span style='color:OrangeRed'>V6 NORMALFORMEN IN ZUSTANDSRAUMDARSTELLUNG - TEIL 2</span>
%% Cell type:markdown id:9653081e-df65-4ccd-9204-e11c542a469f tags: %% Cell type:markdown id:9653081e-df65-4ccd-9204-e11c542a469f tags:
<div style="font-family: 'times'; font-size: 13pt; text-align: justify"> <div style="font-family: 'times'; font-size: 13pt; text-align: justify">
Es ist ein lineares System gegeben, das im Zustandsraum folgende Beschreibung hat: Es ist ein lineares System gegeben, das im Zustandsraum folgende Beschreibung hat:
%% Cell type:code id:825956d9-8873-4d83-bf39-7c8d40da2aff tags: %% Cell type:code id:825956d9-8873-4d83-bf39-7c8d40da2aff tags:
``` octave ``` octave
clear all clear all
pkg load symbolic pkg load symbolic
a = 5 a = 5
b = 1 b = 1
c = 2 c = 2
A = [c 0;1 b] A = [c 0;1 b]
B = [b; a] B = [b; a]
C = [0 1] C = [0 1]
D = 0 D = 0
``` ```
%% Output %% Output
a = 5 a = 5
b = 1 b = 1
c = 2 c = 2
A = A =
2 0 2 0
1 1 1 1
B = B =
1 1
5 5
C = C =
0 1 0 1
D = 0 D = 0
%% Cell type:markdown id:a27e62db-897e-41e8-9b56-fd8c6b48f3bf tags: %% Cell type:markdown id:a27e62db-897e-41e8-9b56-fd8c6b48f3bf tags:
<div style="font-family: 'times'; font-size: 13pt; text-align: justify"> <div style="font-family: 'times'; font-size: 13pt; text-align: justify">
Finden Sie eine Transformation, die eine diagonale Form ergibt. Finden Sie eine Transformation, die eine diagonale Form ergibt.
%% Cell type:markdown id:1943a7dc-b837-4623-8792-a1775026155d tags: %% Cell type:markdown id:1943a7dc-b837-4623-8792-a1775026155d tags:
<div style="font-family: 'times'; font-size: 13pt; text-align: justify"> <div style="font-family: 'times'; font-size: 13pt; text-align: justify">
Zunächst müssen wir die Eigenwerte des Systems finden: Zunächst müssen wir die Eigenwerte des Systems finden:
%% Cell type:code id:ef3d3be5-73cd-48d2-a773-d177b638230a tags: %% Cell type:code id:ef3d3be5-73cd-48d2-a773-d177b638230a tags:
``` octave ``` octave
p = eigs(A) p = eigs(A)
``` ```
%% Output %% Output
p = p =
2 2
1 1
%% Cell type:markdown id:a160dc2c-e6be-4329-9a7a-69f7689a7354 tags: %% Cell type:markdown id:a160dc2c-e6be-4329-9a7a-69f7689a7354 tags:
Wir müssen nun die beiden Eigenvektoren berechnen, die den beiden Eigenwerten zugeordnet sind: Wir müssen nun die beiden Eigenvektoren berechnen, die den beiden Eigenwerten zugeordnet sind:
%% Cell type:code id:1ed03ed5-3913-4107-95c9-f48e52bb50ee tags: %% Cell type:code id:1ed03ed5-3913-4107-95c9-f48e52bb50ee tags:
``` octave ``` octave
[V D]=eig(A) [V D]=eig(A)
``` ```
%% Output %% Output
V = V =
0.00000 0.70711 0.00000 0.70711
1.00000 0.70711 1.00000 0.70711
D = D =
Diagonal Matrix Diagonal Matrix
1 0 1 0
0 2 0 2
%% Cell type:markdown id:5cea5a50-7f13-4d9e-b343-de64bacb84f7 tags: %% Cell type:markdown id:5cea5a50-7f13-4d9e-b343-de64bacb84f7 tags:
Wir können das Ergebnis auch überprufen: Wir können das Ergebnis auch überprufen:
%% Cell type:code id:5ef87d39-8ab8-4ce0-adc2-d392311d8a9c tags: %% Cell type:code id:5ef87d39-8ab8-4ce0-adc2-d392311d8a9c tags:
``` octave ``` octave
At = inv(V)*A*V At = inv(V)*A*V
``` ```
%% Output %% Output
At = At =
1 0 1 0
0 2 0 2
%% Cell type:code id:e81354c4-0adf-4909-a490-32f2ee713788 tags: %% Cell type:code id:e81354c4-0adf-4909-a490-32f2ee713788 tags:
``` octave ``` octave
``` ```
......
%% Cell type:markdown id:c47fa3d9-51c0-4181-89d4-42bc55f053c1 tags: %% Cell type:markdown id:c47fa3d9-51c0-4181-89d4-42bc55f053c1 tags:
# <span style='color:OrangeRed'>V7 STEUERBARKEIT UND BEOBACHTBARKEIT</span> # <span style='color:OrangeRed'>V7 STEUERBARKEIT UND BEOBACHTBARKEIT - TEIL 1</span>
%% Cell type:markdown id:9653081e-df65-4ccd-9204-e11c542a469f tags: %% Cell type:markdown id:9653081e-df65-4ccd-9204-e11c542a469f tags:
<div style="font-family: 'times'; font-size: 13pt; text-align: justify"> <div style="font-family: 'times'; font-size: 13pt; text-align: justify">
Ziel ist hier überzuprufen Sie, ob jedes lineare, zeitdiskrete System 3. Ordnung in Regelungsnormalform/Beobachtungsnormalform Ziel ist hier überzuprufen Sie, ob jedes lineare, zeitdiskrete System 3. Ordnung in Regelungsnormalform/Beobachtungsnormalform
steuerbar bzw. beobachtbar ist.</p> steuerbar bzw. beobachtbar ist.</p>
b1) Stellen Sie für ein beliebiges lineares, zeitdiskretes System 3. Ordnung das Zustandsraummodell b1) Stellen Sie für ein beliebiges lineares, zeitdiskretes System 3. Ordnung das Zustandsraummodell
in Beobachtungsnormalform auf.</p> in Beobachtungsnormalform auf.</p>
b2) Stellen Sie die Beobachtbarkeitsmatrix für das System aus Aufgabenteil b1) auf und b2) Stellen Sie die Beobachtbarkeitsmatrix für das System aus Aufgabenteil b1) auf und
begründen Sie, ob jenes System stets beobachtbar ist.</p> begründen Sie, ob jenes System stets beobachtbar ist.</p>
b3) Verifizieren Sie, dass die Steuerbarkeitsmatrix eines beliebigen linearen, zeitdiskreten b3) Verifizieren Sie, dass die Steuerbarkeitsmatrix eines beliebigen linearen, zeitdiskreten
Systems 3. Ordnung in Regelungsnormalform der Beobachtbarkeitsmatrix aus Aufgabenteil Systems 3. Ordnung in Regelungsnormalform der Beobachtbarkeitsmatrix aus Aufgabenteil
b2) entspricht und begründen Sie damit, ob jedes lineare, zeitdiskrete b2) entspricht und begründen Sie damit, ob jedes lineare, zeitdiskrete
System 3. Ordnung in Regelungsnormalform stets steuerbar ist.</p> System 3. Ordnung in Regelungsnormalform stets steuerbar ist.</p>
%% Cell type:code id:1cf4028f-c9ee-468a-995a-2284567c6a02 tags: %% Cell type:code id:1cf4028f-c9ee-468a-995a-2284567c6a02 tags:
``` octave ``` octave
pkg load symbolic pkg load symbolic
``` ```
%% Cell type:markdown id:a27e62db-897e-41e8-9b56-fd8c6b48f3bf tags: %% Cell type:markdown id:a27e62db-897e-41e8-9b56-fd8c6b48f3bf tags:
<div style="font-family: 'times'; font-size: 13pt; text-align: justify"> <div style="font-family: 'times'; font-size: 13pt; text-align: justify">
Die Zustandsraumdarstellung in Beobachtungsnormalform für ein beliebiges lineares, Die Zustandsraumdarstellung in Beobachtungsnormalform für ein beliebiges lineares,
zeitdiskretes System 3. Ordnung lautet: zeitdiskretes System 3. Ordnung lautet:
%% Cell type:code id:e050a273-a079-40b9-ac0c-194e5e7f12e8 tags: %% Cell type:code id:e050a273-a079-40b9-ac0c-194e5e7f12e8 tags:
``` octave ``` octave
syms a1 a2 a3 syms a1 a2 a3
syms b0 b1 b2 b3 syms b0 b1 b2 b3
``` ```
%% Cell type:code id:402f525f-8a64-4584-8d05-dbd5e42e5516 tags: %% Cell type:code id:402f525f-8a64-4584-8d05-dbd5e42e5516 tags:
``` octave ``` octave
A = [0 0 -a3; 1 0 -a2; 0 1 -a1] A = [0 0 -a3; 1 0 -a2; 0 1 -a1]
B = [b3-b0*a3; b2-b0*a2; b1-b0*a1] B = [b3-b0*a3; b2-b0*a2; b1-b0*a1]
C = [0 0 1] C = [0 0 1]
D = b0 D = b0
``` ```
%% Output %% Output
A = (sym 3×3 matrix) A = (sym 3×3 matrix)
⎡0 0 -a₃⎤ ⎡0 0 -a₃⎤
⎢ ⎥ ⎢ ⎥
⎢1 0 -a₂⎥ ⎢1 0 -a₂⎥
⎢ ⎥ ⎢ ⎥
⎣0 1 -a₁⎦ ⎣0 1 -a₁⎦
B = (sym 3×1 matrix) B = (sym 3×1 matrix)
⎡-a₃⋅b₀ + b₃⎤ ⎡-a₃⋅b₀ + b₃⎤
⎢ ⎥ ⎢ ⎥
⎢-a₂⋅b₀ + b₂⎥ ⎢-a₂⋅b₀ + b₂⎥
⎢ ⎥ ⎢ ⎥
⎣-a₁⋅b₀ + b₁⎦ ⎣-a₁⋅b₀ + b₁⎦
C = C =
0 0 1 0 0 1
D = (sym) b₀ D = (sym) b₀
%% Cell type:markdown id:8629e5a2-ae35-418d-8a65-7e511440917e tags: %% Cell type:markdown id:8629e5a2-ae35-418d-8a65-7e511440917e tags:
<div style="font-family: 'times'; font-size: 13pt; text-align: justify"> <div style="font-family: 'times'; font-size: 13pt; text-align: justify">
Aufstellen der Beobachtbarkeitsmatrix: Aufstellen der Beobachtbarkeitsmatrix:
%% Cell type:code id:1ed03ed5-3913-4107-95c9-f48e52bb50ee tags: %% Cell type:code id:1ed03ed5-3913-4107-95c9-f48e52bb50ee tags:
``` octave ``` octave
So = [C; C*A; C*A*A] So = [C; C*A; C*A*A]
``` ```
%% Output %% Output
So = (sym 3×3 matrix) So = (sym 3×3 matrix)
⎡0 0 1 ⎤ ⎡0 0 1 ⎤
⎢ ⎥ ⎢ ⎥
⎢0 1 -a₁ ⎥ ⎢0 1 -a₁ ⎥
⎢ ⎥ ⎢ ⎥
⎢ 2 ⎥ ⎢ 2 ⎥
⎣1 -a₁ a₁ - a₂⎦ ⎣1 -a₁ a₁ - a₂⎦
%% Cell type:markdown id:0353e887-ebe2-44d0-b7fb-a191622cabff tags: %% Cell type:markdown id:0353e887-ebe2-44d0-b7fb-a191622cabff tags:
<div style="font-family: 'times'; font-size: 13pt; text-align: justify"> <div style="font-family: 'times'; font-size: 13pt; text-align: justify">
Um Beobachtbarkeit zu überprüfen, berechnnen wir die Determinante: Um Beobachtbarkeit zu überprüfen, berechnnen wir die Determinante:
%% Cell type:code id:0d90c253-316f-47ed-9f7b-561ff0ed4868 tags: %% Cell type:code id:0d90c253-316f-47ed-9f7b-561ff0ed4868 tags:
``` octave ``` octave
det(So) det(So)
``` ```
%% Output %% Output
ans = (sym) -1 ans = (sym) -1
%% Cell type:markdown id:d4fac333-e43d-49c7-aaec-6168b86bd6a6 tags: %% Cell type:markdown id:d4fac333-e43d-49c7-aaec-6168b86bd6a6 tags:
<div style="font-family: 'times'; font-size: 13pt; text-align: justify"> <div style="font-family: 'times'; font-size: 13pt; text-align: justify">
Die Beobacthbarkeitsmatrix hat vollen Rang, weshalb jedes lineare, zeitdiskrete System 3. Ordnung in Beobachtungsnormalform Die Beobacthbarkeitsmatrix hat vollen Rang, weshalb jedes lineare, zeitdiskrete System 3. Ordnung in Beobachtungsnormalform
beobachtbar ist. beobachtbar ist.
%% Cell type:markdown id:a6ed8d3e-8d76-451c-8480-7182a8723ab2 tags: %% Cell type:markdown id:a6ed8d3e-8d76-451c-8480-7182a8723ab2 tags:
<div style="font-family: 'times'; font-size: 13pt; text-align: justify"> <div style="font-family: 'times'; font-size: 13pt; text-align: justify">
Die Regelungsnormalform und Beobachtungsnormalform sind zueinander dual. Die Regelungsnormalform und Beobachtungsnormalform sind zueinander dual.
Das heißt es gilt: Das heißt es gilt:
%% Cell type:code id:828217c8-bd90-42da-8b36-9e1f05727a24 tags: %% Cell type:code id:828217c8-bd90-42da-8b36-9e1f05727a24 tags:
``` octave ``` octave
As = A.' As = A.'
Bs = C.' Bs = C.'
Cs = B.' Cs = B.'
Ds = D Ds = D
``` ```
%% Output %% Output
As = (sym 3×3 matrix) As = (sym 3×3 matrix)
⎡ 0 1 0 ⎤ ⎡ 0 1 0 ⎤
⎢ ⎥ ⎢ ⎥
⎢ 0 0 1 ⎥ ⎢ 0 0 1 ⎥
⎢ ⎥ ⎢ ⎥
⎣-a₃ -a₂ -a₁⎦ ⎣-a₃ -a₂ -a₁⎦
Bs = Bs =
0 0
0 0
1 1
Cs = (sym) [-a₃⋅b₀ + b₃ -a₂⋅b₀ + b₂ -a₁⋅b₀ + b₁] (1×3 matrix) Cs = (sym) [-a₃⋅b₀ + b₃ -a₂⋅b₀ + b₂ -a₁⋅b₀ + b₁] (1×3 matrix)
Ds = (sym) b₀ Ds = (sym) b₀
%% Cell type:markdown id:63fb7dec-c4e2-4e53-b6f9-bea0649fd521 tags: %% Cell type:markdown id:63fb7dec-c4e2-4e53-b6f9-bea0649fd521 tags:
<div style="font-family: 'times'; font-size: 13pt; text-align: justify"> <div style="font-family: 'times'; font-size: 13pt; text-align: justify">
Aufstellen der Steuerbarkeitsmatrix: Aufstellen der Steuerbarkeitsmatrix:
%% Cell type:code id:0c2d94f8-536c-421a-98ae-69771c0e6ca2 tags: %% Cell type:code id:0c2d94f8-536c-421a-98ae-69771c0e6ca2 tags:
``` octave ``` octave
Sc = [Bs As*Bs As*As*Bs] Sc = [Bs As*Bs As*As*Bs]
``` ```
%% Output %% Output
Sc = (sym 3×3 matrix) Sc = (sym 3×3 matrix)
⎡0 0 1 ⎤ ⎡0 0 1 ⎤
⎢ ⎥ ⎢ ⎥
⎢0 1 -a₁ ⎥ ⎢0 1 -a₁ ⎥
⎢ ⎥ ⎢ ⎥
⎢ 2 ⎥ ⎢ 2 ⎥
⎣1 -a₁ a₁ - a₂⎦ ⎣1 -a₁ a₁ - a₂⎦
%% Cell type:markdown id:8a4be558-f51c-415e-96f7-922b8e417422 tags: %% Cell type:markdown id:8a4be558-f51c-415e-96f7-922b8e417422 tags:
<div style="font-family: 'times'; font-size: 13pt; text-align: justify"> <div style="font-family: 'times'; font-size: 13pt; text-align: justify">
Wir sehen, dass Sc = So. Um Steuerbarkeit zu überprüfen, berechnnen wir die Determinante: Wir sehen, dass Sc = So. Um Steuerbarkeit zu überprüfen, berechnnen wir die Determinante:
%% Cell type:code id:69e7fd06-f71a-48ec-af34-d2e406f9067c tags: %% Cell type:code id:69e7fd06-f71a-48ec-af34-d2e406f9067c tags:
``` octave ``` octave
det(Sc) det(Sc)
``` ```
%% Output %% Output
ans = (sym) -1 ans = (sym) -1
%% Cell type:markdown id:4fb92a07-3450-4c37-bef4-7e3734cc8c20 tags: %% Cell type:markdown id:4fb92a07-3450-4c37-bef4-7e3734cc8c20 tags:
<div style="font-family: 'times'; font-size: 13pt; text-align: justify"> <div style="font-family: 'times'; font-size: 13pt; text-align: justify">
Sc hat denn vollen Rang (wie erwartet), weshalb jedes lineare, zeitdiskrete System 3. Ordnung in Regelungnormalform Sc hat denn vollen Rang (wie erwartet), weshalb jedes lineare, zeitdiskrete System 3. Ordnung in Regelungnormalform
steuerbar ist. steuerbar ist.
%% Cell type:code id:6ebd4c8d-4218-41b7-aa86-902033541283 tags: %% Cell type:code id:6ebd4c8d-4218-41b7-aa86-902033541283 tags:
``` octave ``` octave
``` ```
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment