0
|
1 |
#!/usr/bin/python
|
|
2 |
# 9.10
|
|
3 |
|
|
4 |
import os, sys
|
|
5 |
sys.path += [os.getcwdu() + os.sep + ".." + os.sep + "python"]
|
|
6 |
|
|
7 |
import scipy as sp
|
|
8 |
from zpowk import zpowk
|
|
9 |
from desired import desired
|
|
10 |
from pp_im import pp_im
|
|
11 |
|
|
12 |
# Control of IBM lotus domino server
|
|
13 |
# Transfer function
|
|
14 |
|
|
15 |
B = 0.47
|
|
16 |
A = sp.array([1, -0.43])
|
|
17 |
k = 1
|
|
18 |
zk, dzk = zpowk(k)
|
|
19 |
|
|
20 |
# Transient specifications
|
|
21 |
rise = 10
|
|
22 |
epsilon = 0.01
|
|
23 |
Ts = 1
|
|
24 |
phi = desired(Ts,rise,epsilon)
|
|
25 |
|
|
26 |
# Controller design
|
|
27 |
Delta = sp.array([1, -1]) # internal model of step used
|
|
28 |
Rc, Sc, Tc, gamm = pp_im(B, A, k, phi, Delta)
|
|
29 |
|
|
30 |
# Simulation parameters for stb_disc.cos
|
|
31 |
st = 1 # desired change
|
|
32 |
t_init = 0 # simulation start time
|
|
33 |
t_final = 40 # simulation end time
|
|
34 |
C = 0
|
|
35 |
D = 1
|
|
36 |
N_var = 0
|