lqg/lqg_julien1.py
author Puneeth Chaganti <punchagan@fossee.in>
Fri, 27 May 2011 14:24:59 +0530
changeset 0 0efde00f9229
permissions -rw-r--r--
Initial commit.
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
0
0efde00f9229 Initial commit.
Puneeth Chaganti <punchagan@fossee.in>
parents:
diff changeset
     1
#!/usr/bin/python
0efde00f9229 Initial commit.
Puneeth Chaganti <punchagan@fossee.in>
parents:
diff changeset
     2
0efde00f9229 Initial commit.
Puneeth Chaganti <punchagan@fossee.in>
parents:
diff changeset
     3
import scipy as sp
0efde00f9229 Initial commit.
Puneeth Chaganti <punchagan@fossee.in>
parents:
diff changeset
     4
from lqg import lqg
0efde00f9229 Initial commit.
Puneeth Chaganti <punchagan@fossee.in>
parents:
diff changeset
     5
from cl import cl
0efde00f9229 Initial commit.
Puneeth Chaganti <punchagan@fossee.in>
parents:
diff changeset
     6
0efde00f9229 Initial commit.
Puneeth Chaganti <punchagan@fossee.in>
parents:
diff changeset
     7
A, dA = sp.convolve([1, -0.7], [1, 0.9]), 2
0efde00f9229 Initial commit.
Puneeth Chaganti <punchagan@fossee.in>
parents:
diff changeset
     8
B, dB = sp.convolve([0.079, 0.221], [1, 0.9]), 2
0efde00f9229 Initial commit.
Puneeth Chaganti <punchagan@fossee.in>
parents:
diff changeset
     9
C, dC = sp.array([1, -0.7]), 1
0efde00f9229 Initial commit.
Puneeth Chaganti <punchagan@fossee.in>
parents:
diff changeset
    10
k = 2
0efde00f9229 Initial commit.
Puneeth Chaganti <punchagan@fossee.in>
parents:
diff changeset
    11
int1 = 1
0efde00f9229 Initial commit.
Puneeth Chaganti <punchagan@fossee.in>
parents:
diff changeset
    12
F, dF = sp.array([1, -1]), 1
0efde00f9229 Initial commit.
Puneeth Chaganti <punchagan@fossee.in>
parents:
diff changeset
    13
V, dV = 1, 0
0efde00f9229 Initial commit.
Puneeth Chaganti <punchagan@fossee.in>
parents:
diff changeset
    14
W, dW = 1, 0
0efde00f9229 Initial commit.
Puneeth Chaganti <punchagan@fossee.in>
parents:
diff changeset
    15
rho = 0.1
0efde00f9229 Initial commit.
Puneeth Chaganti <punchagan@fossee.in>
parents:
diff changeset
    16
0efde00f9229 Initial commit.
Puneeth Chaganti <punchagan@fossee.in>
parents:
diff changeset
    17
R1, dR1, Sc, dSc = lqg (A, dA, B, dB, C, dC, k, rho, V, dV, W, dW, F, dF)
0efde00f9229 Initial commit.
Puneeth Chaganti <punchagan@fossee.in>
parents:
diff changeset
    18
#print R1, dR1, Sc, dSc
0efde00f9229 Initial commit.
Puneeth Chaganti <punchagan@fossee.in>
parents:
diff changeset
    19
0efde00f9229 Initial commit.
Puneeth Chaganti <punchagan@fossee.in>
parents:
diff changeset
    20
Nu, dNu, Du, dDu, Ny, dNy, Dy, dDy, yvar, uvar = \
0efde00f9229 Initial commit.
Puneeth Chaganti <punchagan@fossee.in>
parents:
diff changeset
    21
     cl(A, dA, B, dB, C, dC, k, Sc, dSc, R1, dR1, int1)
0efde00f9229 Initial commit.
Puneeth Chaganti <punchagan@fossee.in>
parents:
diff changeset
    22
print Nu, dNu, Du, dDu, Ny, dNy, Dy, dDy, yvar, uvar