Version 0.10.2 Release Notes (current)
Released: date of release
This release includes numerous bug fixes and improvements, with major
changes such as a substantial reorganization of the documentation into
a User Guide and Reference Manual, more consistent and complete
docstrings, and support for referencing signals and subsystems by name
as well as by index. Phase plane plots now use matplotlib’s
streamplot for better visuals. New functions include combine_tf
and split_tf for MIMO/SISO conversion and disk_margins for
stability analysis. Additional improvements include consistent keyword
usage, expanded LTI system methods for plotting and responses, better
error messages, and legacy aliases to maintain backward compatibility.
This version of python-control requires Python 3.10 or higher, NumPy
1.23 or higher (2.x recommended), and SciPy 1.8 or higher.
New classes, functions, and methods
The following new classes, functions, and methods have been added in this release:
find_operating_point: this function replaces (with a legacy alias) thefind_eqptfunction and now returns anOperatingPointobject containing the information about the operating point.combine_tfandsplit_tf: these two new functions allow you to create an MIMO transfer function from SISO transfer functions and vice versa.create_statefbk_iosystemnow allows the creation of state feedback controllers using a “reference gain” pattern (
) in addition to the default “trajectory generation” pattern
(
).disk_margins: compute disk-based stability margins for SISO and MIMO systems.model_reduction: allow specific states, inputs, or outputs to be either eliminated or retained.place_acker: renamed version ofacker(which is still accessible via an alias).
Bug fixes
The following bugs have been fixed in this release:
phase_plane_plot: fixed a bug in which the return value was returning a sublist of lines rather than just a list of lines incplt.lines.Processing of the timebase parameter (
dt) for I/O systems is now handled uniformly across all I/O system factory functions. This affected thezpkfunction, which was defaulting to a discrete time system to have timebase None instead of 0.Multiplying (*), adding (+), or subtracting (-) a constant from any (MIMO) LTI object now acts element-wise (same as ndarray’s). This fixes a bug where multiplying a MIMO LTI system by a constant was multiplying by a matrix filled with the constant rather than a diagonal matrix (scaled identity).
Fixed a bug where specifying an FRD system with fewer than 4 frequency points was generating an error because the default settings try to set up a smooth (interpolating) response and the default degree of the fit was 3.
Fixed some bugs where computing poles and zeros of transfer functions could generate spurious error messages about unsafe casting of complex numbers to real numbers.
TimeResponseData.to_pandas: multi-trace data (e.g., the output from a MIMO step response) was not being processed correctly. A new column ‘trace’ is now generated for multi-trace responses.Fixed a bug where where some arguments to
nyquist_plotwere not being processed correctly and generated errors about unrecognized keywords.bode_plot: Fixed missing plot title whendisplay_marginkeyword was used.singular_values_plot: color cycling was not working correctly when a list of systems or responses was provided.nyquist_plot: Thelinesparameter of theControlPlotobject now matches the documentation. A 2D array is returned with the first index corresponding to the response (system) index and the second index corresponding to the segment type (primary, mirror x unscaled, scaled).Fix some internal bugs that cropped up when using NumPy 2.3.1 but were latent prior to that.
Improvements
The following additional improvements and changes in functionality were implemented in this release:
User documentation is now divided into a User Guide that provides a description of the main functionality of the python-control package, along with a Reference Manual describing classes, functions, and parameters in more detail.
Signal responses and I/O subsystem specifications can now use signal names in addition to indices to get the desired inputs, outputs, and states (e.g.,
response.outputs['y0', 'y1']). This is implemented via a newNamedSignalobject, which generalizesnumpy.ndarray.find_operating_point(legacyfind_eqpt): accepts new parametersroot_methodandroot_kwargsto set the root finding algorithm that is used.root_locus_mapnow correctly handles the degenerate case of being passed a single gain.The
PoleZeroDataobject now takes asort_lociparameter when it is created, with a default value of True. This is useful if you create aPoleZeroDataobject by hand (e.g., for producing stability diagrams).Factory functions for I/O system creation are now consistent in terms of copying signal/system names, overriding system/signal names, and converting between classes.
The
tffactory function to allow a 2D list of SISO transfer functions to be given as a means of creating a MIMO transfer function (use the newcombine_tffunction).The
nlsysfactory function can now create aNonlinearIOSystemrepresentation of aStateSpacesystem (passed as the first argument tonlsys).LTI systems now have member functions for computing the various time responses and generating frequency domain plots. See
LTI.to_ss,LTI.to_tf,LTI.bode_plot,LTI.nyquist_plot,LTI.nichols_plotandLTI.forced_response,LTI.impulse_response,LTI.initial_response,LTI.step_response.String representations of I/O systems (accessed via
repr,print, andstr) have been updated to create a more consistent form and provide more useful information. See Displaying LTI System Information for more information.Binary operations between MIMO and SISO functions are now supported, with the SISO system being converted to a MIMO system as if it were a scalar.
nyquist_response: generates an error if you force the system to evaluate the dynamics at a pole.phase_crossover_frequencies: turned off spurious warning messages.ss2tf: added newmethod=scipycapability, allowingss2tfto work on MIMO systems even if Slycot is not present.flatsys.solve_flat_optimal(legacyflatsys.solve_flat_ocp): allows scalar time vector.Improved checking of matrix shapes and better error messages in state space factory functions and other operations where matrices are passed as arguments.
FrequencyResponseData: usecomplexto access the (squeeze processed) complex frequency response (instead of the legacyresponseproperty) and~FrequencyResponseData.frdatato access the 3D frequency response data array (instead of the legacyfrespattribute).Time response and optimization function keywords have been regularized to allow consistent use of keywords across related functions:
Parameters specifying the inputs, outputs, and states are referred to as
inputs,outputs, andstatesconsistently throughout the functions.Variables associated with inputs, outputs, states and time use those words plus an appropriate modifier:
initial_state,final_output,input_indices, etc.Aliases are used both to maintain backward compatibility and to allow shorthand descriptions: e.g.,
U,Y,X0. Short form aliases are documented in docstrings by listing the parameter aslong_form (or sf) : type.Existing legacy keywords are allowed and generate a
PendingDeprecationWarning. Specifying a parameter value in two different ways (e.g., via long form and an alias) generates aTypeError.
phase_plane_plot: makes use of the matplotlibstreamplotfunction to provide better default phase plane diagrams.root_locus_plot: added by the ability to recompute the root locus when zooming in on portions of the root locus diagram.nyquist_plot: updated the rescaling algorithm to use a more gradual change in the magnitude of the Nyquist curve. Theblend_fractionparameter can be used to start the rescaling prior to reachingmax_curve_magnitude, giving less confusing plots. Some default parameter values have been adjusted to improve Nyquist plots.
Deprecations
The following functions have been newly deprecated in this release and generate a warning message when used:
FrequencyResponseData.response: useFrequencyResponseData.complexto return the complex value of the frequency response.FrequencyResponseData.fresp: useFrequencyResponseData.frdatato access the raw 3D frequency response data array.
The listed items are slated to be removed in future releases (usually the next major or minor version update).