Integrator

Parent Previous Next

Full Library / Algorithmic / Analog / control-analog function / Integrator
Block Name: Integrator


An integrator in the continuous time (CT) domain. This actor has one input port and one output port. Conceptually, the input is the derivative of the output w.r.t. time. So an ordinary differential equation dx/dt = f(x, t) can be built by:

                 +---------------+
          dx/dt  |               |   x
      +--------->|   Integrator  |---------+----->
      |          |               |         |
      |          +---------------+         |
      |                                    |
      |             |---------|            |
      +-------------| f(x, t) |<-----------+
                    |---------|
 

An integrator is a dynamic actor that can emit a token (the state) without knowing the input. An integrator is a step size control actor that can control the accuracy of the ODE solution by adjusting step sizes. An integrator has memory, which is its state.

An integrator has one parameter: the initialState. At the initialization stage of the simulation, the state of the integrator is set to the initial state. Changes of the initialState parameter are ignored after the execution starts, unless the initialize() method is called again. The default value of the parameter is 0.0 of type DoubleToken.

To help solving the ODE, a set of variables are used:
state: This is the value of the state variable at a time point, which has beed confirmed by all the step size control actors. tentative state: This is the value of the state variable which has not been confirmed. It is a starting point for other actors to estimate the accuracy of this integration step. history: The previous states and their derivatives. History may be used by multistep methods.

For different ODE solving methods, the functionality of an integrator may be different. The delegation and strategy design patterns are used in this class, ODESolver class, and the concrete ODE solver classes. Some solver-dependent methods of integrators are delegated to the ODE solvers.

An integrator can possibly have several auxiliary variables for the the ODE solvers to use. The number of the auxiliary variables is checked before each iteration. The ODE solver class provides the number of variables needed for that particular solver. The auxiliary variables can be set and get by setAuxVariables() and getAuxVariables() methods.

This is a wrapper for the CTBaseIntegrator class.





Created with the Personal Edition of HelpNDoc: Easily create iPhone documentation