6.2 Numerical Methods 169
A computer simulation must embody several components. In first place, the
structure of the dynamic model to be simulated must be known, as also the set of
model parameters and initial conditions. In second place, the set of input signals
must also be embodied, and a set of output signals must be explicitly defined in
order to follow the system evolution. Finally, a simulation run time control system
must be included in order to select the numerical integration method used and the
value of its associated parameters, integration step, error tolerances, etc. We will
particularize the computer simulation task by employing simulation software as
SIMULINK or SIMSCAPE, using both block diagrams and physical elements
interconnected to synthesize the model equations (fig. 6.1).
6.2 Numerical Methods
The solution of ordinary differential equations (ODEs) on a digital computer
involves numerical integration. These techniques can be grouped into two broad
classes, termed explicit and implicit integration methods.
Common to all these methods, the resolution of the ordinary differential
equations which describe the system dynamics of (6.1) by integration between
points
and
as
,
(6.2)
,
(6.3)
where
indicates the actual simulation time, while the index denotes the
number of integration steps used to approximate this integral.
Based on the approximation of
,
in the interval of integration and the
number of integration steps selected, arise the different integration methods.
6.2.1 Explicit Numerical Methods
These numerical methods characterized by the state variable
in (6.3) is a
function of the variable values at step and earlier. These methods are
straightforward and easy to program, but present as a major disadvantage that a
small step size must be used so that the solution converge.
Among these methods, the best known is the method of explicit Euler, given by
the recursive equation
,
,
(6.4)