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

add notebook V02.2.ipynb

parent f1d5e15b
Branches
No related tags found
No related merge requests found
%% Cell type:markdown id:59c50ced-b94e-4c1d-aa16-8f65866afa45 tags:
# <span style='color:OrangeRed'>V2 Z-TRANSFORMATION Teil 2</span>
%% Cell type:code id:4e30e058-443f-49de-a6e7-c30cc52f8e8d tags:
``` octave
% Necessary to use control toolbox
pkg load control
pkg load symbolic
clear all
```
%% Cell type:markdown id:a51cd9c5-1e6a-4aab-9444-a1b43fdb600d tags:
Gegeben sei das folgende System:
%% Cell type:code id:d6746c08-e7f2-4981-a180-356ee45880d6 tags:
``` octave
syms s
G = (7*s^2+2)/s^2
```
%% Output
Symbolic pkg v2.8.0: Python communication link active, SymPy v1.5.1.
G = (sym)
2
7⋅s + 2
────────
2
s
%% 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.
%% Cell type:code id:af9db619-01ea-4d4c-90a3-f00111b7c1dc tags:
``` octave
Ts = 1
```
%% Output
Ts = 1
%% Cell type:markdown id:b44b6573-db3c-4af8-9b2b-abb2e60b47ba tags:
Wir müssen zuerst die Impulsatwort des Systems G(s)/s berechnen:
%% Cell type:code id:24be4f5f-9a68-4961-8342-a34c916739a3 tags:
``` octave
Gs = G/s
gk = ilaplace(Gs)
```
%% Output
Gs = (sym)
2
7⋅s + 2
────────
3
s
gk = (sym)
2
t + 7
%% Cell type:markdown id:ba598b0d-29f4-4f1b-848d-8599d13a37e4 tags:
Die ersten 4 Abtastwerte dieser Funktion sind:
%% Cell type:code id:4adb2d94-f7f8-4d81-8f56-59fe177ed5c9 tags:
``` octave
t = 0
gks0 = subs(gk)
```
%% Output
t = 0
gks0 = (sym) 7
%% Cell type:code id:6604c416-b4e3-4399-ac50-f40460f64559 tags:
``` octave
t = 1
gks1 = subs(gk)
```
%% Output
t = 1
gks1 = (sym) 8
%% Cell type:code id:802539df-4b11-425f-89f5-a1f81d34ba15 tags:
``` octave
t = 2
gks2 = subs(gk)
```
%% Output
t = 2
gks2 = (sym) 11
%% Cell type:code id:3d2038eb-d51e-48ab-be3c-ae923e0104aa tags:
``` octave
t = 3
gks3 = subs(gk)
```
%% Output
t = 3
gks3 = (sym) 16
%% 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:
%% Cell type:code id:a6b84605-74bc-43e4-a6bd-8ac18679f0c4 tags:
``` octave
gk0 = gks0
gk1 = gks1-gks0
gk2 = gks2-gks1
gk3 = gks3-gks2
```
%% Output
gk0 = (sym) 7
gk1 = (sym) 1
gk2 = (sym) 3
gk3 = (sym) 5
%% 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:
%% Cell type:code id:efe763dc-0216-4b77-b962-3cd0122a37ef tags:
``` octave
Gh = (1-exp(-s*Ts))/s
```
%% Output
Gh = (sym)
-s
1 - ℯ
───────
s
%% Cell type:code id:fd678060-ad64-466b-9100-16e4c6c72161 tags:
``` octave
G2 = G*Gh
```
%% Output
G2 = (sym)
⎛ -s⎞ ⎛ 2 ⎞
⎝1 - ℯ ⎠⋅⎝7⋅s + 2⎠
────────────────────
3
s
%% Cell type:code id:6147d6a0-1cab-4eb3-b508-f5dd355a06f9 tags:
``` octave
gkt = ilaplace(G2)
```
%% Output
gkt = (sym)
2 ⎛ 2 ⎞
t - ⎝t - 2⋅t + 8⎠⋅θ(t - 1) + 7
%% Cell type:code id:43ec85a8-43c8-4dc0-a489-8d7b257abe34 tags:
``` octave
t = 0
subs(gkt)
```
%% Output
t = 0
ans = (sym) 7
%% Cell type:code id:7a2553b6-24ce-4e10-8706-866c8203b02b tags:
``` octave
t = 1
subs(gkt)
```
%% Output
t = 1
ans = (sym) 8 - 7⋅θ(0)
%% Cell type:code id:56d47b5b-3083-464d-8530-a0b3f4aa9a69 tags:
``` octave
t = 2
subs(gkt)
```
%% Output
t = 2
ans = (sym) 3
%% Cell type:code id:aec1ea71-51e0-444b-b45d-0de2e0143581 tags:
``` octave
t = 3
subs(gkt)
```
%% Output
t = 3
ans = (sym) 5
%% Cell type:code id:f56036d9-6ac0-4f7f-afde-86f4222b2c3d tags:
``` octave
```
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment