0
|
1 |
#!/usr/bin/python
|
|
2 |
# 10.7
|
|
3 |
import os, sys
|
|
4 |
sys.path += [os.getcwdu() + os.sep + ".." + os.sep + "python"]
|
|
5 |
|
|
6 |
import scipy as sp
|
|
7 |
from scipy import signal
|
|
8 |
from imc_stable1 import imc_stable1
|
|
9 |
from zpowk import zpowk
|
|
10 |
from myc2d import myc2d
|
|
11 |
|
|
12 |
num = sp.array([1])
|
|
13 |
den = sp.array([250, 35, 1])
|
|
14 |
G = signal.lti(num, den)
|
|
15 |
|
|
16 |
Ts = 3
|
|
17 |
B, A, k = myc2d(G, Ts)
|
|
18 |
|
|
19 |
alpha = 0.9
|
|
20 |
k, GiN, GiD = imc_stable1(B, A, k, alpha)
|
|
21 |
print k, GiN, GiD
|
|
22 |
|
|
23 |
zk, dzk = zpowk(k)
|
|
24 |
Bp, Ap = B, A
|
|
25 |
|
|
26 |
t0 = 0
|
|
27 |
tf = 10
|
|
28 |
st = 1
|
|
29 |
Nvar = 0
|