Skip to content

Commit 4f14409

Browse files
committed
* Adding a few unit tests (will probably get redone in v0.4a)
* Updated list of changes * Incremented version number to 0.3d This is intended to be final set of changes before moving over to v0.4a
1 parent 6e54448 commit 4f14409

4 files changed

Lines changed: 58 additions & 1 deletion

File tree

ChangeLog

Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,16 @@
1+
2011-02-12 Richard Murray <murray@sumatra.local>
2+
3+
* setup.py: Updated version number to 0.3d, in preparation for release
4+
5+
* src/statefbk.py (lqr): Updated sb02md calling signature to match
6+
latest slycot version (Lauren Padilla)
7+
8+
* src/freqplot.py (nichols_grid): new function from Allan McInnes
9+
<allan.mcinnes@canterbury.ac.nz> to generate a Nichols chart for a
10+
given plot (equivalent to ngrid in MATLAB).
11+
12+
* src/matlab.py (ngrid): MATLAB compatible ngrid() command
13+
114
2010-11-05 Richard Murray <murray@sumatra.local>
215

316
* external/yottalab.py: New file containing Roberto Bucher's control

examples/bdalg-matlab.py

Lines changed: 17 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,17 @@
1+
# bdalg-matlab.py - demonstrate some MATLAB commands for block diagram altebra
2+
# RMM, 29 May 09
3+
4+
from control.matlab import * # MATLAB-like functions
5+
6+
# System matrices
7+
A1 = [[0, 1.], [-4, -1]]
8+
B1 = [[0], [1.]]
9+
C1 = [[1., 0]]
10+
sys1ss = ss(A1, B1, C1, 0)
11+
sys1tf = ss2tf(sys1ss)
12+
13+
sys2tf = tf([1, 0.5], [1, 5]);
14+
sys2ss = tf2ss(sys2tf);
15+
16+
# Series composition
17+
series1 = sys1ss + sys2ss;

examples/test-statefbk.py

Lines changed: 27 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,27 @@
1+
# test-statefbk.py - Unit tests for state feedback code
2+
# RMM, 6 Sep 2010
3+
4+
import numpy as np # Numerical library
5+
from scipy import * # Load the scipy functions
6+
from control.matlab import * # Load the controls systems library
7+
8+
# Parameters defining the system
9+
m = 250.0 # system mass
10+
k = 40.0 # spring constant
11+
b = 60.0 # damping constant
12+
13+
# System matrices
14+
A = matrix([[1, -1, 1.], [1, -k/m, -b/m], [1, 1, 1]])
15+
B = matrix([[0], [1/m], [1]])
16+
C = matrix([[1., 0, 1.]])
17+
sys = ss(A, B, C, 0);
18+
19+
# Controllability
20+
Wc = ctrb(A, B)
21+
print "Wc = ", Wc
22+
23+
# Observability
24+
Wo = obsv(A, C)
25+
print "Wo = ", Wo
26+
27+

setup.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@
33
from distutils.core import setup
44

55
setup(name='control',
6-
version='0.3c',
6+
version='0.3d',
77
description='Python Control Systems Library',
88
author='Richard Murray',
99
author_email='murray@cds.caltech.edu',

0 commit comments

Comments
 (0)