Function reference¶
The Python Control Systems Library control
provides common functions
for analyzing and designing feedback control systems.
System creation¶
|
Create a state space system. |
|
Create a transfer function system. |
|
Construct a frequency response data model |
|
Create a stable continuous random state space object. |
|
Create a stable discrete random state space object. |
System interconnections¶
|
Group models by appending their inputs and outputs |
|
Index-based interconnection of an LTI system. |
|
Feedback interconnection between two I/O systems. |
|
Return the negative of a system. |
|
Return the parallel connection sys1 + sys2 (+ . |
|
Return the series connection (sysn * . |
See also the Input/output systems module, which can be used to create and interconnect nonlinear input/output systems.
Frequency domain plotting¶
|
Bode plot for a system |
|
Nyquist plot for a system |
|
Plot the “Gang of 4” transfer functions for a system |
|
Nichols plot for a system |
|
Nichols chart grid |
Note: For plotting commands that create multiple axes on the same plot, the individual axes can be retrieved using the axes label (retrieved using the get_label method for the matplotliib axes object). The following labels are currently defined:
Bode plots: control-bode-magnitude, control-bode-phase
Gang of 4 plots: control-gangof4-s, control-gangof4-cs, control-gangof4-ps, control-gangof4-t
Time domain simulation¶
|
Simulate the output of a linear system. |
|
Impulse response of a linear system |
|
Initial condition response of a linear system |
|
Compute the output response of a system to a given input. |
|
Step response of a linear system |
|
Phase plot for 2D dynamical systems |
Block diagram algebra¶
|
Return the series connection (sysn * . |
|
Return the parallel connection sys1 + sys2 (+ . |
|
Feedback interconnection between two I/O systems. |
|
Return the negative of a system. |
Control system analysis¶
|
Return the zero-frequency (or DC) gain of the given system |
|
Evaluate the transfer function of an LTI system for a single complex number x. |
|
Frequency response of an LTI system at multiple angular frequencies. |
|
Calculate gain and phase margins and associated crossover frequencies |
|
Calculate stability margins and associated crossover frequencies. |
Compute frequencies and gains at intersections with real axis in Nyquist plot. |
|
|
Compute system poles. |
|
Compute system zeros. |
|
Plot a pole/zero map for a linear system. |
|
Root locus plot |
|
Sisotool style collection of plots inspired by MATLAB’s sisotool. |
Matrix computations¶
|
(X, L, G) = care(A, B, Q, R=None) solves the continuous-time algebraic Riccati equation |
|
(X, L, G) = dare(A, B, Q, R) solves the discrete-time algebraic Riccati equation |
|
X = lyap(A, Q) solves the continuous-time Lyapunov equation |
|
dlyap(A,Q) solves the discrete-time Lyapunov equation |
|
Controllabilty matrix |
|
Observability matrix |
|
Gramian (controllability or observability) |
Control system synthesis¶
|
Pole placement using Ackermann method |
|
H_2 control synthesis for plant P. |
|
H_{inf} control synthesis for plant P. |
|
Linear quadratic regulator design |
|
Linear quadratic estimator design (Kalman filter) for continuous-time systems. |
|
Mixed-sensitivity H-infinity synthesis. |
|
Place closed loop eigenvalues |
Model simplification tools¶
|
Eliminates uncontrollable or unobservable states in state-space models or cancelling pole-zero pairs in transfer functions. |
|
Balanced reduced order model of sys of a given order. |
|
Calculate the Hankel singular values. |
|
Model reduction of sys by eliminating the states in ELIM using a given method. |
|
Calculate an ERA model of order r based on the impulse-response data YY. |
|
Calculate the first m Markov parameters [D CB CAB …] from input U, output Y. |
Nonlinear system support¶
|
Find the equilibrium point for an input/output system. |
|
Linearize an input/output system at a given state and input. |
|
Compute the output response of a system to a given input. |
|
Create an I/O system from a state space linear system. |
|
Convert a transfer function into an I/O system |
|
Compute trajectory between an initial and final conditions. |
Utility functions and conversions¶
|
Augment plant for mixed sensitivity problem. |
|
Convert a system into canonical form |
|
Compute natural frequency, damping ratio, and poles of a system |
|
Convert a gain in decibels (dB) to a magnitude |
|
Check to see if a system is a continuous-time system |
|
Check to see if a system is a discrete time system |
|
Check to see if a system is single input, single output |
|
Return True if an object is a system, otherwise False |
|
Convert a magnitude to decibels (dB) |
|
Convert a system into observable canonical form |
|
Create a linear system that approximates a delay. |
|
Convert a system into reachable canonical form |
Reset configuration values to their default (initial) values. |
|
|
Convert a continuous time system to discrete time |
|
Transform a state space system to a transfer function. |
|
Return state space data objects for a system |
|
Transform a transfer function to a state space system. |
|
Return transfer function data objects for a system |
|
Return the timebase for an LTI system |
|
Check to see if two systems have the same timebase |
|
Unwrap a phase angle to give a continuous curve |
Use Feedback Systems (FBS) compatible settings. |
|
Use MATLAB compatible configuration settings. |
|
|
Turn on/off use of Numpy matrix class for state space operations. |