pid/miller.py
changeset 0 0efde00f9229
equal deleted inserted replaced
-1:000000000000 0:0efde00f9229
       
     1 #!/usr/bin/env python
       
     2 # 11.15
       
     3 # GMVC PID tuning of example given by Miller et al.
       
     4 
       
     5 import os, sys
       
     6 sys.path += [os.getcwdu() + os.sep + ".." + os.sep + "python"]
       
     7 
       
     8 import pylab as pl
       
     9 from ch_pol import ch_pol
       
    10 from gmvc_pid import gmvc_pid 
       
    11 
       
    12 # Model
       
    13 A = pl.array([1, -1.95, 0.935])
       
    14 B = -0.015 
       
    15 k = 1
       
    16 Ts = 1
       
    17 
       
    18 # Transient specifications
       
    19 N = 15
       
    20 epsilon = 0.1
       
    21 T = ch_pol(N, epsilon)[:1]
       
    22 
       
    23 # Controller Design
       
    24 Kc, tau_i, tau_d, L = gmvc_pid(A, B, k, T, Ts)
       
    25 
       
    26 # L1 = filtval(L,1);
       
    27 # zk = zpowk(k);