Main Content
Add Delay in Plant Model
You can add delays in the plant model to simulate the control algorithm processing delays in the hardware and the PWM switching delays. The algorithm processing delay in the processor is the time taken to update the PWM. PWM switching delay is usually half the switching time period.
For adding delays in the discrete time solver with a sample rate of Ts/2 (half the switching time period), the processor computation delay and PWM switching delay are factored as Z-1 (Ts/2).