Find an operating point for an input/output system.
An operating point for a nonlinear system is a state and input around which a nonlinear system operates. This point is most commonly an equilibrium point for the system, but in some cases a non-equilibrium operating point can be used.
This function attempts to find an operating point given a specification for the desired inputs, outputs, states, or state updates of the system.
In its simplest form, find_operating_point
finds an equilibrium point given either the desired input or desired output:
xeq, ueq = find_operating_point(sys, x0, u0) xeq, ueq = find_operating_point(sys, x0, u0, y0)
The first form finds an equilibrium point for a given input u0 based on an initial guess x0. The second form fixes the desired output values and uses x0 and u0 as an initial guess to find the equilibrium point. If no equilibrium point can be found, the function returns the operating point that minimizes the state update (state derivative for continuous-time systems, state difference for discrete-time systems).
More complex operating points can be found by specifying which states, inputs, or outputs should be used in computing the operating point, as well as desired values of the states, inputs, outputs, or state updates.
NonlinearIOSystem
I/O system for which the operating point is sought.
Initial guess for the value of the state near the operating point.
If y0
is not specified, sets the value of the input. If y0
is given, provides an initial guess for the value of the input. Can be omitted if the system does not have any inputs.
If specified, sets the desired values of the outputs at the operating point.
Evaluation time, for time-varying systems.
Parameter values for the system. Passed to the evaluation functions for the system as default values, overriding internal defaults.
If specified, only the inputs with the given indices will be fixed at the specified values in solving for an operating point. All other inputs will be varied. Input indices can be listed in any order.
If specified, only the outputs with the given indices will be fixed at the specified values in solving for an operating point. All other outputs will be varied. Output indices can be listed in any order.
If specified, states with the given indices will be fixed at the specified values in solving for an operating point. All other states will be varied. State indices can be listed in any order.
If specified, the value of update map must match the listed value instead of the default value for an equilibrium point.
If specified, state updates with the given indices will have their update maps fixed at the values given in dx0
. All other update values will be ignored in solving for an operating point. State indices can be listed in any order. By default, all updates will be fixed at dx0
in searching for an operating point.
Method to find the operating point. If specified, this parameter is passed to the scipy.optimize.root
function.
Additional keyword arguments to pass scipy.optimize.root
.
If True, return the value of outputs at the operating point.
If True, return the result
option from the scipy.optimize.root
function used to compute the operating point.
OperatingPoint
The solution represented as an OperatingPoint
object. The main attributes are states
and inputs
, which represent the state and input arrays at the operating point. If accessed as a tuple, returns states
, inputs
, and optionally outputs
and result
based on the return_outputs
and return_result
parameters. See OperatingPoint
for a description of other attributes.
State vector at the operating point.
Input vector at the operating point.
Output vector at the operating point.
Notes
For continuous-time systems, equilibrium points are defined as points for which the right hand side of the differential equation is zero: . For discrete-time systems, equilibrium points are defined as points for which the right hand side of the difference equation returns the current state: .
Operating points are found using the scipy.optimize.root
function, which will attempt to find states and inputs that satisfy the specified constraints. If no solution is found and return_result
is False, the returned state and input for the operating point will be None. If return_result
is True, then the return values from scipy.optimize.root
will be returned (but may not be valid). If root_method
is set to ‘lm’, then the least squares solution (in the free variables) will be returned.
RetroSearch is an open source project built by @garambo | Open a GitHub Issue
Search and Browse the WWW like it's 1997 | Search results from DuckDuckGo
HTML:
3.2
| Encoding:
UTF-8
| Version:
0.7.4