C. Digital simulation
As the controller will be digital, we decided to simulate the control system in discrete time. The integrator have been implemented as below.
U: input / Y : output
We can also draw the block scheme with the following equation :
Figure 0.9 : Discrete integrator
REMARK FOR SIMULINK SIMULATION
In a simulation where discrete and continuous blocks are used at the same time, in order to come back from discrete to continuous, we should add a zero to the discrete signal with sampling time “INF” as below. Then, the output signal is treated as continuous by Simulink.
Figure 0.10 : Simulink discrete‐to‐continous