Skip to content

Commit e614fa7

Browse files
author
Kevin Chen
committed
Added warnings about state space / transfer function conversion still being buggy.
Kevin K. Chen <kkchen@princeton.edu>
1 parent 2122225 commit e614fa7

3 files changed

Lines changed: 9 additions & 6 deletions

File tree

src/TestConvert.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -27,9 +27,9 @@ def setUp(self):
2727
# Number of times to run each of the randomized tests.
2828
self.numTests = 10
2929
# Maximum number of states to test + 1
30-
self.maxStates = 2
30+
self.maxStates = 3
3131
# Maximum number of inputs and outputs to test + 1
32-
self.maxIO = 2
32+
self.maxIO = 3
3333
# Set to True to print systems to the output.
3434
self.debug = True
3535

src/statesp.py

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -449,9 +449,9 @@ def _convertToStateSpace(sys, **kw):
449449
index = [len(den) - 1 for i in range(sys.outputs)]
450450
# Repeat the common denominator along the rows.
451451
den = array([den for i in range(sys.outputs)])
452-
#print index
453-
#print den
454-
#print num
452+
# TODO: transfer function to state space conversion is still buggy!
453+
print "Warning: transfer function to state space conversion by td04ad \
454+
is still buggy!"
455455
ssout = td04ad(sys.inputs, sys.outputs, index, den, num)
456456

457457
states = ssout[0]

src/xferfcn.py

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -697,7 +697,10 @@ def _convertToTransferFunction(sys, **kw):
697697
raise TypeError("If sys is a StateSpace, _convertToTransferFunction \
698698
cannot take keywords.")
699699

700-
# Use Slycot to make the transformation.
700+
# Use Slycot to make the transformation. TODO: this is still somewhat
701+
# buggy!
702+
print "Warning: state space to transfer function conversion by tb04ad \
703+
is still buggy!"
701704
tfout = tb04ad(sys.states, sys.inputs, sys.outputs, sys.A, sys.B, sys.C,
702705
sys.D, sys.outputs, sys.outputs, sys.inputs)
703706

0 commit comments

Comments
 (0)