Dynamical System¶
- class pathsim.blocks.dynsys.DynamicalSystem(func_dyn=<function DynamicalSystem.<lambda>>, func_alg=<function DynamicalSystem.<lambda>>, initial_value=0.0, jac_dyn=None)[source]¶
Bases:
BlockThis block implements a nonlinear dynamical system / nonlinear state space model.
Its basically the same as the ODE block with the addition of an output equation that takes the state, input and time as arguments:
\[\begin{split}\begin{eqnarray} \dot{x}(t) =& \mathrm{func}_\mathrm{dyn}(x(t), u(t), t) \\ y(t) =& \mathrm{func}_\mathrm{alg}(x(t), u(t), t) \end{eqnarray}\end{split}\]- Parameters:
func_dyn (callable) – right hand side function of ode-part of the system
func_alg (callable) – output function of the system
initial_value (array[float]) – initial state / initial condition
jac_dyn (callable | None) – optional jacobian of func_dyn to improve convergence for implicit ode solvers
- op_dyn¶
internal dynamic operator for func_dyn
- Type:
- op_alg¶
internal dynamic operator for func_alg
- Type:
- update(t)[source]¶
update system equation for fixed point loop, by evaluating the output function of the system
- Parameters:
t (float) – evaluation time