imc/lewin_imc1.py
author Puneeth Chaganti <punchagan@fossee.in>
Fri, 27 May 2011 14:24:59 +0530
changeset 0 0efde00f9229
permissions -rw-r--r--
Initial commit.

#!/usr/bin/python
# 10.7
import os, sys
sys.path += [os.getcwdu() + os.sep + ".." + os.sep + "python"]

import scipy as sp
from scipy import signal
from imc_stable1 import imc_stable1
from zpowk import zpowk
from myc2d import myc2d

num = sp.array([1])
den = sp.array([250, 35, 1])
G = signal.lti(num, den)

Ts = 3
B, A, k = myc2d(G, Ts)

alpha = 0.9
k, GiN, GiD = imc_stable1(B, A, k, alpha)
print k, GiN, GiD

zk, dzk = zpowk(k)
Bp, Ap = B, A

t0 = 0
tf = 10
st = 1
Nvar = 0