|
From: <mur...@us...> - 2012-11-03 23:01:33
|
Revision: 228
http://sourceforge.net/p/python-control/code/228
Author: murrayrm
Date: 2012-11-03 23:01:31 +0000 (Sat, 03 Nov 2012)
Log Message:
-----------
missed a file...
Added Paths:
-----------
tags/control-0.6c/doc/creation.rst
trunk/doc/creation.rst
Added: tags/control-0.6c/doc/creation.rst
===================================================================
--- tags/control-0.6c/doc/creation.rst (rev 0)
+++ tags/control-0.6c/doc/creation.rst 2012-11-03 23:01:31 UTC (rev 228)
@@ -0,0 +1,33 @@
+Creating System Models
+**********************
+
+Python-control provides a number of methods for creating LTI control
+systems.
+
+.. module:: control
+========================== ============================================
+:func:`ss` create state-space (SS) models
+:func:`tf` create transfer function (TF) models
+========================== ============================================
+
+System creation
+================
+.. autofunction:: control.StateSpace
+.. autofunction:: control.ss
+.. autofunction:: control.TransferFunction
+.. autofunction:: control.tf
+
+Utility functions and converstions
+==================================
+.. autofunction:: control.drss
+.. autofunction:: control.isctime
+.. autofunction:: control.isdtime
+.. autofunction:: control.issys
+.. autofunction:: control.pade
+.. autofunction:: control.sample_system
+.. autofunction:: control.ss2tf
+.. autofunction:: control.ssdata
+.. autofunction:: control.tf2ss
+.. autofunction:: control.tfdata
+.. autofunction:: control.timebase
+.. autofunction:: control.timebaseEqual
Added: trunk/doc/creation.rst
===================================================================
--- trunk/doc/creation.rst (rev 0)
+++ trunk/doc/creation.rst 2012-11-03 23:01:31 UTC (rev 228)
@@ -0,0 +1,33 @@
+Creating System Models
+**********************
+
+Python-control provides a number of methods for creating LTI control
+systems.
+
+.. module:: control
+========================== ============================================
+:func:`ss` create state-space (SS) models
+:func:`tf` create transfer function (TF) models
+========================== ============================================
+
+System creation
+================
+.. autofunction:: control.StateSpace
+.. autofunction:: control.ss
+.. autofunction:: control.TransferFunction
+.. autofunction:: control.tf
+
+Utility functions and converstions
+==================================
+.. autofunction:: control.drss
+.. autofunction:: control.isctime
+.. autofunction:: control.isdtime
+.. autofunction:: control.issys
+.. autofunction:: control.pade
+.. autofunction:: control.sample_system
+.. autofunction:: control.ss2tf
+.. autofunction:: control.ssdata
+.. autofunction:: control.tf2ss
+.. autofunction:: control.tfdata
+.. autofunction:: control.timebase
+.. autofunction:: control.timebaseEqual
|
|
From: <mur...@us...> - 2012-11-11 02:49:36
|
Revision: 241
http://sourceforge.net/p/python-control/code/241
Author: murrayrm
Date: 2012-11-11 02:49:33 +0000 (Sun, 11 Nov 2012)
Log Message:
-----------
Fixed bugs in various calculations and orders of indices.
Modified Paths:
--------------
branches/rmm-trajgen/examples/doubleint.py
branches/rmm-trajgen/trajgen/flatsys.py
branches/rmm-trajgen/trajgen/poly.py
trunk/src/lti.py
Modified: branches/rmm-trajgen/examples/doubleint.py
===================================================================
--- branches/rmm-trajgen/examples/doubleint.py 2012-11-11 01:28:03 UTC (rev 240)
+++ branches/rmm-trajgen/examples/doubleint.py 2012-11-11 02:49:33 UTC (rev 241)
@@ -17,5 +17,6 @@
# Find a trajectory
xd, ud = tg.linear_point_to_point(sys1, x0, xf, 1)
+print(xd)
# Plot the trajectory
Modified: branches/rmm-trajgen/trajgen/flatsys.py
===================================================================
--- branches/rmm-trajgen/trajgen/flatsys.py 2012-11-11 01:28:03 UTC (rev 240)
+++ branches/rmm-trajgen/trajgen/flatsys.py 2012-11-11 02:49:33 UTC (rev 241)
@@ -80,7 +80,7 @@
# least squares solution for now.
#
#! TODO: need to allow cost and constraints...
- alpha = np.linalg.pinv(M) * np.vstack((zflag_T0, zflag_Tf))
+ alpha = np.dot(np.linalg.pinv(M), np.vstack((zflag_T0, zflag_Tf)))
#
# Transform the trajectory from flat outputs to states and inputs
Modified: branches/rmm-trajgen/trajgen/poly.py
===================================================================
--- branches/rmm-trajgen/trajgen/poly.py 2012-11-11 01:28:03 UTC (rev 240)
+++ branches/rmm-trajgen/trajgen/poly.py 2012-11-11 02:49:33 UTC (rev 241)
@@ -14,4 +14,4 @@
# Compute the kth derivative of the ith basis function at time t
def eval_deriv(self, i, k, t):
if (i < k): return 0; # higher derivative than power
- return sp.misc.factorial(k) * np.power(t, i-k)
+ return sp.misc.factorial(i)/sp.misc.factorial(i-k) * np.power(t, i-k)
Modified: trunk/src/lti.py
===================================================================
--- trunk/src/lti.py 2012-11-11 01:28:03 UTC (rev 240)
+++ trunk/src/lti.py 2012-11-11 02:49:33 UTC (rev 241)
@@ -64,6 +64,16 @@
self.outputs = outputs
self.dt = dt
+# Test to see if a system is SISO
+def issiso(sys, strict=False):
+ if isinstance(sys, (int, float, complex)) and not strict:
+ return True
+ elif not isinstance(sys, Lti):
+ raise ValueError("Object is not an Lti system")
+
+ # Done with the tricky stuff...
+ return sys.inputs == 1 and sys.outputs == 1
+
# Return the timebase (with conversion if unspecified)
def timebase(sys, strict=True):
"""Return the timebase for an Lti system
|