Skip to content

Commit 310798e

Browse files
committed
update documentation for basic functionality
1 parent ae43212 commit 310798e

1 file changed

Lines changed: 24 additions & 9 deletions

File tree

control/modelsimp.py

Lines changed: 24 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -83,12 +83,15 @@ def model_reduction(
8383
"""Model reduction by input, output, or state elimination.
8484
8585
This function produces a reduced-order model of a system by eliminating
86-
specified inputs,outputs, or states from the original system. The
86+
specified inputs, outputs, and/or states from the original system. The
8787
specific states, inputs, or outputs that are eliminated can be
88-
specified by listing either the states, inputs, or outputs to be
89-
eliminated or those to be kept. In addition, unused states (those that
90-
do not affect the inputs or outputs of the reduced system) can also be
91-
eliminated.
88+
specified by either listing the states, inputs, or outputs to be
89+
eliminated or those to be kept.
90+
91+
Two methods of state reduction are possible: 'truncate' removes the
92+
states marked for elimination, while 'matchdc' replaces the the
93+
eliminated states with their equilibrium values (thereby keeping the
94+
input/output gain unchanged at zero frequency ["DC"]).
9295
9396
Parameters
9497
----------
@@ -100,9 +103,6 @@ def model_reduction(
100103
keep_inputs, keep_outputs, keep_states : array, optional
101104
Vector of inputs, outputs, or states to keep. Can be specified
102105
either as an offset into the appropriate vector or as a signal name.
103-
remove_hidden_states : str, optional
104-
If `unobs` (default), then eliminate any states that are unobservable
105-
via the reduced-order system outputs.
106106
method : string
107107
Method of removing states in `elim`: either 'truncate' or
108108
'matchdc' (default).
@@ -117,7 +117,9 @@ def model_reduction(
117117
Raises
118118
------
119119
ValueError
120-
If `method` is not either ``'matchdc'`` or ``'truncate'``.
120+
If `method` is not either 'matchdc' or 'truncate'.
121+
NotImplementedError
122+
If the 'matchdc' method is used for a discrete time system.
121123
122124
Warns
123125
-----
@@ -131,6 +133,19 @@ def model_reduction(
131133
>>> Gr.nstates
132134
2
133135
136+
See Also
137+
--------
138+
balanced_reduction : Eliminate states using Hankel singular values.
139+
minimal_realization : Eliminate unreachable or unobseravble states.
140+
141+
Notes
142+
-----
143+
The model_reduction function issues a warning if the system has
144+
unstable eigenvalues, since in those situations the stability reduced
145+
order model may be different that the stability of the full model. No
146+
other checking is done, so users to be careful not to render a system
147+
unobservable or unreachable.
148+
134149
"""
135150
if not isinstance(sys, StateSpace):
136151
raise TypeError("system must be a a StateSpace system")

0 commit comments

Comments
 (0)