Version 0.9.2 Release Notesļ
Released: 28 May 2022
This is a minor release that includes I/O system enhancements, optimal control enhancements, new functionality for stochastic systems, updated system class functionality, bug fixes and improvements to Nyquist plots and Nichols charts, and L-infinity norm for linear systems.
New featuresļ
I/O system enhancements:
Modify the
ss,rss, anddrssfunctions to returnLinearIOSystemobjects (instead ofStateSpaceobjects). This makes it easier to create LTI state space systems that can be combined with other I/O systems without having to add a conversation step. SinceLinearIOSystemobjects are alsoStateSpaceobjects, no functionality is lost. (This change is implemented through the introduction of a internalNamedIOSystemclass, to avoid import cycles.)Added a new function
create_statefbk_iosystemthat creates an I/O system for implementing a linear state feedback controller of the form u = ud - Kp(x - xd). The function returns an I/O system that takes xd, ud, and x as inputs and generates u as an output. Theintegral_actionkeyword can be used to define a set of outputs y = C x for which integral feedback is also included: u = ud - Kp(x - xd) - Ki(C x - C xd).The
lqranddlqrcommands now accept anintegral_actionkeyword that allows outputs to be specified for implementing integral action. The resulting gain matrix has the form K = [Kp, Ki]. (This is useful for combining with theintegral_actionfunctionality increate_statefbk_iosystem).
Optimal control enhancements:
Allow
t_evalkeyword ininput_output_responseto allow a different set of time points to be used for the input vector and the computed output.The final cost is now saved in optimal control result.
Stochastic systems additions:
Added two new functions supporting random signals:
white_noise, which creates a white noise vector in continuous or discrete time, andcorrelation, which calculates the correlation function (or [cross-] correlation matrix), R(tau).Added a new function
create_estimator_iosystemthat matches the style ofcreate_statefbk_iosystem(#710) and creates an I/O system implementing an estimator (including covariance update).Added the ability to specify initial conditions for
input_output_responseas a list of values, so that for estimators that keep track of covariance you can set the initial conditions as[X0, P0]. In addition, if you specify a fewer number of initial conditions than the number of states, the remaining states will be initialized to zero (with a warning if the last initial condition is not zero). This allows the initial conditions to be given as[X0, 0].Added the ability to specify inputs for
input_output_responseas a list of variables. Each element in the list will be treated as a portion of the input and broadcast (if necessary) to match the time vector. This allows input for a system with noise as[U, V]and inputs for a system with zero noise as[U, np.zero(n)](where U is an input signal andnp.zero(n)gets broadcast to match the time vector).Added new Jupyter notebooks demonstrate the use of these functions:
stochresp.ipynb,pvtol-outputfbk.ipynb,kincar-fusion.ipynb.
Updated system class functionality:
Changed the
LTIclass to usepolesandzerosfor retrieving poles and zeros, withpoleandzerogenerating aPendingDeprecationWarning(which is ignored by default in Python). (The MATLAB compatibility module still usespoleandzero.)The
TimeResponseDataandFrequencyResponseDataobjects now implement ato_pandasmethod that creates a simple pandas dataframe.The
FrequencyResponseDataclass is now used as the output for frequency response produced byfreqrespand a new functionfrequency_responsehas been defined, to be consistent with theinput_output_responsefunction. AFrequencyResponseDataobject can be assigned to a tuple to provide magnitude, phase, and frequency arrays, mirroringTimeResponseDatafunctionality.The
drss,rss,ss2tf,tf2ss,tf2io, andss2iofunctions now all accept system and signal name arguments (via_process_namedio_keywords.The
ssfunction can now accept function names as arguments, in which case it creates aNonlinearIOSystem(Iām not sure how useful this is, butssis a sort of wrapper function that calls the appropriate class constructor, so it was easy enough to implement.)
Added
linformto compute linear system L-infinity norm.
Improvements, bug fixesļ
Round to nearest integer decade for default omega vector.
Interpret str-type args to
interconnectas non-sequence.Fixes to various optimization-based control functions.
Bug fix and improvements to Nyquist plots.
Improvements to Nichols chart plotting.