Skip to content
Snippets Groups Projects

Compare revisions

Changes are shown as if the source revision was being merged into the target revision. Learn more about comparing revisions.

Source

Select target project
No results found
Select Git revision
  • develop
  • master
2 results

Target

Select target project
  • Adam.Schrey/lecture-tutorials
1 result
Select Git revision
  • develop
  • master
2 results
Show changes
Showing
with 7463 additions and 0 deletions
This diff is collapsed.
%% Cell type:markdown id:04105e65-6705-4c92-a009-48c54bd38ad4 tags:
# <span style='color:OrangeRed'>V3 STABILTÄT DISKRETER SYSTEME - TEIL 1</span>
%% Cell type:markdown id:ffe7d73f-7986-44b6-a9fd-a678b9aaa182 tags:
<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.
%% Cell type:code id:3a336fb9-2f73-44ce-ab67-91b96ccfc1c1 tags:
``` octave
% Necessary to use control toolbox
pkg load control
clear all
```
%% Cell type:markdown id:53866cc1-a0ea-4d77-8d9c-c8345704d874 tags:
<div style="font-family: 'times'; font-size: 13pt; text-align: justify">
Es ist das folgende System in Form einer Übertragungsfunktion gegeben:
%% Cell type:code id:a0b9d775-f176-483e-aaca-43da284aa2e4 tags:
``` octave
a1 = 1
a2 = 2
b1 = 0.1
b2 = 0.2
num = [a1 a2]
den = [1 b1 b2]
G = tf(num,den, 1)
```
%% Output
a1 = 1
a2 = 2
b1 = 0.10000
b2 = 0.20000
num =
1 2
den =
1.00000 0.10000 0.20000
Transfer function 'G' from input 'u1' to output ...
z + 2
y1: -----------------
z^2 + 0.1 z + 0.2
Sampling time: 1 s
Discrete-time model.
%% Cell type:markdown id:1cb98bc6-138b-45bc-9178-74f8493d4171 tags:
<div style="font-family: 'times'; font-size: 13pt; text-align: justify">
Berechnet man die Nullstellen des Nenners, erhält man die Pole des Systems:
%% Cell type:code id:03459a21-1072-416b-a04b-5de7b9a30813 tags:
``` octave
p = roots(den)
q = abs(p)
```
%% Output
p =
-0.05000 + 0.44441i
-0.05000 - 0.44441i
q =
0.44721
0.44721
%% Cell type:markdown id:071800da-0e16-4189-bb65-5746c0415165 tags:
<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.
%% Cell type:markdown id:c9e8bd3b-e932-4710-9a6a-220f67d882e9 tags:
<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.
%% Cell type:code id:5adb101b-4286-428a-a4bd-eeb57e860e9c tags:
``` octave
F1 = 1+b1+b2
Fm1 = 1-b1+b2
```
%% Output
F1 = 1.3000
Fm1 = 1.1000
%% Cell type:markdown id:eae75561-2795-400d-802d-f649281ff316 tags:
<div style="font-family: 'times'; font-size: 13pt; text-align: justify">
F1 und Fm1 müssen beide positiv sein. Dies ist erfüllt.
%% Cell type:markdown id:fb81055e-1e14-4401-afb2-f90884c549be tags:
<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.
%% Cell type:code id:acf57137-23eb-4be3-87ef-eb9d08076f07 tags:
``` octave
pkg load symbolic
syms z
syms w
F1 = (a1*z+a2)/(z^2 + b1*z +b2)
F2 = subs(F1,z,(1+w)/(1-w))
simplify(F2)
```
%% Output
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: called from
double_to_sym_heuristic at line 50 column 7
sym at line 379 column 13
mtimes at line 63 column 5
warning: passing floating-point values to sym is dangerous, see "help sym"
warning: called from
double_to_sym_heuristic at line 50 column 7
sym at line 379 column 13
plus at line 61 column 5
F1 = (sym)
z + 2
───────────
2 z 1
z + ── + ─
10 5
F2 = (sym)
w + 1
2 + ─────
1 - w
─────────────────────────
2
1 w + 1 (w + 1)
─ + ────────── + ────────
5 10⋅(1 - w) 2
(1 - w)
ans = (sym)
⎛ 2 ⎞
10⋅⎝w - 4⋅w + 3⎠
─────────────────
2
11⋅w + 16⋅w + 13
%% Cell type:markdown id:56641183-2cb4-48c2-b61d-7f612a56d0a7 tags:
<div style="font-family: 'times'; font-size: 13pt; text-align: justify">
Alle Zeichen im Nenner müssen positiv sein.
%% Cell type:markdown id:ab36a55a-6239-4214-9d36-85f4d111c61e tags:
<div style="font-family: 'times'; font-size: 13pt; text-align: justify">
Zum Schluss überprüfen wir die Ergebnisse mit der Simulation einer Sprungantwort.
%% Cell type:code id:578daff8-f4fd-4001-bb09-aea89d809eec tags:
``` octave
addpath("../Octsim");
tini = 0 # Start time
tfinal = 20 # End time
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)
Ts = 1 # Sampling time for discrete time
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)
% Instance of the simulation schematic
sc1 = Schema(tini,tfinal,dt,nflows);
sc1.AddListComponents(c1);
% Run the schematic and plot
out1 = sc1.Run([1 2]);
plot(out1(1,:),out1(2,:),out1(1,:),out1(3,:));
ylim([-2, 4]);
```
%% Output
tini = 0
tfinal = 20
dt = 0.10000
nflows = 2
Ts = 1
%% Cell type:code id:9e1a668f-07ac-442a-bb62-950dacd49832 tags:
``` octave
```
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
sys2-jupyter-notebooks/exam_examples/figures/ClosedLoop.png

38 KiB

<svg xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" width="742px" height="203px" version="1.1"><defs/><g transform="translate(0.5,0.5)"><rect x="340" y="1" width="120" height="120" fill="#ffffff" stroke="#000000" pointer-events="none"/><g transform="translate(366.5,54.5)"><switch><foreignObject style="overflow:visible;" pointer-events="all" width="66" height="12" requiredFeatures="http://www.w3.org/TR/SVG11/feature#Extensibility"><div xmlns="http://www.w3.org/1999/xhtml" style="display: inline-block; font-size: 12px; font-family: Helvetica; color: rgb(0, 0, 0); line-height: 1.2; vertical-align: top; width: 67px; white-space: nowrap; word-wrap: normal; text-align: center;"><div xmlns="http://www.w3.org/1999/xhtml" style="display:inline-block;text-align:inherit;text-decoration:inherit;">DC Machine</div></div></foreignObject><text x="33" y="12" fill="#000000" text-anchor="middle" font-size="12px" font-family="Helvetica">DC Machine</text></switch></g><path d="M 210 42 L 330.63 42" fill="none" stroke="#000000" stroke-miterlimit="10" pointer-events="none"/><path d="M 335.88 42 L 328.88 45.5 L 330.63 42 L 328.88 38.5 Z" fill="#000000" stroke="#000000" stroke-miterlimit="10" pointer-events="none"/><path d="M 460 41 L 580.63 41" fill="none" stroke="#000000" stroke-miterlimit="10" pointer-events="none"/><path d="M 585.88 41 L 578.88 44.5 L 580.63 41 L 578.88 37.5 Z" fill="#000000" stroke="#000000" stroke-miterlimit="10" pointer-events="none"/><path d="M 460 81 L 580.63 81" fill="none" stroke="#000000" stroke-miterlimit="10" pointer-events="none"/><path d="M 585.88 81 L 578.88 84.5 L 580.63 81 L 578.88 77.5 Z" fill="#000000" stroke="#000000" stroke-miterlimit="10" pointer-events="none"/><g transform="translate(484.5,27.5)"><switch><foreignObject style="overflow:visible;" pointer-events="all" width="37" height="12" requiredFeatures="http://www.w3.org/TR/SVG11/feature#Extensibility"><div xmlns="http://www.w3.org/1999/xhtml" style="display: inline-block; font-size: 12px; font-family: Helvetica; color: rgb(0, 0, 0); line-height: 1.2; vertical-align: top; white-space: nowrap;"><div xmlns="http://www.w3.org/1999/xhtml" style="display:inline-block;text-align:inherit;text-decoration:inherit;">current</div></div></foreignObject><text x="19" y="12" fill="#000000" text-anchor="middle" font-size="12px" font-family="Helvetica">current</text></switch></g><g transform="translate(484.5,61.5)"><switch><foreignObject style="overflow:visible;" pointer-events="all" width="33" height="12" requiredFeatures="http://www.w3.org/TR/SVG11/feature#Extensibility"><div xmlns="http://www.w3.org/1999/xhtml" style="display: inline-block; font-size: 12px; font-family: Helvetica; color: rgb(0, 0, 0); line-height: 1.2; vertical-align: top; white-space: nowrap;"><div xmlns="http://www.w3.org/1999/xhtml" style="display:inline-block;text-align:inherit;text-decoration:inherit;">speed</div></div></foreignObject><text x="17" y="12" fill="#000000" text-anchor="middle" font-size="12px" font-family="Helvetica">speed</text></switch></g><path d="M 590 22 L 610 40.5 L 590 59 Z" fill="#ffffff" stroke="#000000" stroke-miterlimit="10" pointer-events="none"/><g transform="translate(596.5,34.5)"><switch><foreignObject style="overflow:visible;" pointer-events="all" width="6" height="12" requiredFeatures="http://www.w3.org/TR/SVG11/feature#Extensibility"><div xmlns="http://www.w3.org/1999/xhtml" style="display: inline-block; font-size: 12px; font-family: Helvetica; color: rgb(0, 0, 0); line-height: 1.2; vertical-align: top; width: 7px; white-space: nowrap; word-wrap: normal; text-align: center;"><div xmlns="http://www.w3.org/1999/xhtml" style="display:inline-block;text-align:inherit;text-decoration:inherit;">k</div></div></foreignObject><text x="3" y="12" fill="#000000" text-anchor="middle" font-size="12px" font-family="Helvetica">k</text></switch></g><path d="M 590 62 L 610 80.5 L 590 99 Z" fill="#ffffff" stroke="#000000" stroke-miterlimit="10" pointer-events="none"/><g transform="translate(596.5,74.5)"><switch><foreignObject style="overflow:visible;" pointer-events="all" width="6" height="12" requiredFeatures="http://www.w3.org/TR/SVG11/feature#Extensibility"><div xmlns="http://www.w3.org/1999/xhtml" style="display: inline-block; font-size: 12px; font-family: Helvetica; color: rgb(0, 0, 0); line-height: 1.2; vertical-align: top; width: 7px; white-space: nowrap; word-wrap: normal; text-align: center;"><div xmlns="http://www.w3.org/1999/xhtml" style="display:inline-block;text-align:inherit;text-decoration:inherit;">k</div></div></foreignObject><text x="3" y="12" fill="#000000" text-anchor="middle" font-size="12px" font-family="Helvetica">k</text></switch></g><rect x="170" y="11" width="40" height="60" fill="#ffffff" stroke="#000000" pointer-events="none"/><g transform="translate(186.5,20.5)"><switch><foreignObject style="overflow:visible;" pointer-events="all" width="7" height="40" requiredFeatures="http://www.w3.org/TR/SVG11/feature#Extensibility"><div xmlns="http://www.w3.org/1999/xhtml" style="display: inline-block; font-size: 12px; font-family: Helvetica; color: rgb(0, 0, 0); line-height: 1.2; vertical-align: top; width: 8px; white-space: nowrap; word-wrap: normal; text-align: center;"><div xmlns="http://www.w3.org/1999/xhtml" style="display:inline-block;text-align:inherit;text-decoration:inherit;">+<div>-</div><div>-</div></div></div></foreignObject><text x="4" y="26" fill="#000000" text-anchor="middle" font-size="12px" font-family="Helvetica">[Not supported by viewer]</text></switch></g><rect x="0" y="0" width="50" height="50" fill="#ffffff" stroke="#000000" pointer-events="none"/><g transform="translate(12.5,18.5)"><switch><foreignObject style="overflow:visible;" pointer-events="all" width="25" height="12" requiredFeatures="http://www.w3.org/TR/SVG11/feature#Extensibility"><div xmlns="http://www.w3.org/1999/xhtml" style="display: inline-block; font-size: 12px; font-family: Helvetica; color: rgb(0, 0, 0); line-height: 1.2; vertical-align: top; width: 26px; white-space: nowrap; word-wrap: normal; text-align: center;"><div xmlns="http://www.w3.org/1999/xhtml" style="display:inline-block;text-align:inherit;text-decoration:inherit;">Step</div></div></foreignObject><text x="13" y="12" fill="#000000" text-anchor="middle" font-size="12px" font-family="Helvetica">Step</text></switch></g><path d="M 99.93 22.44 L 163.63 22.04" fill="none" stroke="#000000" stroke-miterlimit="10" pointer-events="none"/><path d="M 168.88 22.01 L 161.9 25.55 L 163.63 22.04 L 161.86 18.55 Z" fill="#000000" stroke="#000000" stroke-miterlimit="10" pointer-events="none"/><path d="M 610 81 L 700 81" fill="none" stroke="#000000" stroke-miterlimit="10" pointer-events="none"/><path d="M 700 81 L 700 161" fill="none" stroke="#000000" stroke-miterlimit="10" pointer-events="none"/><path d="M 700 161 L 140 161" fill="none" stroke="#000000" stroke-miterlimit="10" pointer-events="none"/><path d="M 140 61 L 140 161" fill="none" stroke="#000000" stroke-miterlimit="10" pointer-events="none"/><path d="M 140 56 L 140 56 L 163.63 56" fill="none" stroke="#000000" stroke-miterlimit="10" pointer-events="none"/><path d="M 168.88 56 L 161.88 59.5 L 163.63 56 L 161.88 52.5 Z" fill="#000000" stroke="#000000" stroke-miterlimit="10" pointer-events="none"/><path d="M 140 40 L 110 40 Q 100 40 110 40 L 130 40 Q 140 40 150 40 L 163.63 40" fill="none" stroke="#000000" stroke-miterlimit="10" pointer-events="none"/><path d="M 168.88 40 L 161.88 43.5 L 163.63 40 L 161.88 36.5 Z" fill="#000000" stroke="#000000" stroke-miterlimit="10" pointer-events="none"/><path d="M 110 41 L 110 201" fill="none" stroke="#000000" stroke-miterlimit="10" pointer-events="none"/><path d="M 740 201 L 110 201" fill="none" stroke="#000000" stroke-miterlimit="10" pointer-events="none"/><path d="M 740 41 L 740 201" fill="none" stroke="#000000" stroke-miterlimit="10" pointer-events="none"/><path d="M 610 40 L 740 40" fill="none" stroke="#000000" stroke-miterlimit="10" pointer-events="none"/><path d="M 80 4 L 100 22.5 L 80 41 Z" fill="#ffffff" stroke="#000000" stroke-miterlimit="10" pointer-events="none"/><g transform="translate(85.5,16.5)"><switch><foreignObject style="overflow:visible;" pointer-events="all" width="8" height="12" requiredFeatures="http://www.w3.org/TR/SVG11/feature#Extensibility"><div xmlns="http://www.w3.org/1999/xhtml" style="display: inline-block; font-size: 12px; font-family: Helvetica; color: rgb(0, 0, 0); line-height: 1.2; vertical-align: top; width: 9px; white-space: nowrap; word-wrap: normal; text-align: center;"><div xmlns="http://www.w3.org/1999/xhtml" style="display:inline-block;text-align:inherit;text-decoration:inherit;">V</div></div></foreignObject><text x="4" y="12" fill="#000000" text-anchor="middle" font-size="12px" font-family="Helvetica">V</text></switch></g><path d="M 50 25 L 73.63 25" fill="none" stroke="#000000" stroke-miterlimit="10" pointer-events="none"/><path d="M 78.88 25 L 71.88 28.5 L 73.63 25 L 71.88 21.5 Z" fill="#000000" stroke="#000000" stroke-miterlimit="10" pointer-events="none"/><g transform="translate(235.5,19.5)"><switch><foreignObject style="overflow:visible;" pointer-events="all" width="39" height="12" requiredFeatures="http://www.w3.org/TR/SVG11/feature#Extensibility"><div xmlns="http://www.w3.org/1999/xhtml" style="display: inline-block; font-size: 12px; font-family: Helvetica; color: rgb(0, 0, 0); line-height: 1.2; vertical-align: top; white-space: nowrap;"><div xmlns="http://www.w3.org/1999/xhtml" style="display:inline-block;text-align:inherit;text-decoration:inherit;">voltage</div></div></foreignObject><text x="20" y="12" fill="#000000" text-anchor="middle" font-size="12px" font-family="Helvetica">voltage</text></switch></g><path d="M 259 99 L 333.63 99" fill="none" stroke="#000000" stroke-miterlimit="10" pointer-events="none"/><path d="M 338.88 99 L 331.88 102.5 L 333.63 99 L 331.88 95.5 Z" fill="#000000" stroke="#000000" stroke-miterlimit="10" pointer-events="none"/><rect x="209" y="74" width="50" height="50" fill="#ffffff" stroke="#000000" pointer-events="none"/><g transform="translate(221.5,92.5)"><switch><foreignObject style="overflow:visible;" pointer-events="all" width="25" height="12" requiredFeatures="http://www.w3.org/TR/SVG11/feature#Extensibility"><div xmlns="http://www.w3.org/1999/xhtml" style="display: inline-block; font-size: 12px; font-family: Helvetica; color: rgb(0, 0, 0); line-height: 1.2; vertical-align: top; width: 26px; white-space: nowrap; word-wrap: normal; text-align: center;"><div xmlns="http://www.w3.org/1999/xhtml" style="display:inline-block;text-align:inherit;text-decoration:inherit;">Step</div></div></foreignObject><text x="13" y="12" fill="#000000" text-anchor="middle" font-size="12px" font-family="Helvetica">Step</text></switch></g><g transform="translate(260.5,71.5)"><switch><foreignObject style="overflow:visible;" pointer-events="all" width="50" height="26" requiredFeatures="http://www.w3.org/TR/SVG11/feature#Extensibility"><div xmlns="http://www.w3.org/1999/xhtml" style="display: inline-block; font-size: 12px; font-family: Helvetica; color: rgb(0, 0, 0); line-height: 1.2; vertical-align: top; white-space: nowrap;"><div xmlns="http://www.w3.org/1999/xhtml" style="display:inline-block;text-align:inherit;text-decoration:inherit;">Resistant<div>torque</div></div></div></foreignObject><text x="25" y="19" fill="#000000" text-anchor="middle" font-size="12px" font-family="Helvetica">[Not supported by viewer]</text></switch></g></g></svg>
\ No newline at end of file