Simulink Control Design™ - MathWorks

(Tuis.) #1

Modeling Computational Delay and Sampling Effects


This example shows how to model computational delay and sampling effect using
Simulink Control Design.

Introduction

Computational delays and sampling effects can critically effect the performance of a
control system. Typically, the closed-loop responses of a system become oscillatory and
unstable if these factors are not taken into account. Therefore, when modeling a control
system, you should include computational delays and sampling effects to accurately
design and simulate a closed-loop system.

There are two approaches for designing compensators with the effects of computational
delay and sampling. The first approach is to design a controller in the discrete domain to
capture the effects of sampling by discretizing the plant. The second approach is to
design a controller in the continuous domain. This approach is sometimes more
convenient, but in this case you need to account for the effects of computational delay
and sampling. In this example, you apply both approaches to redesign a control system
using Simulink Control Design.

Simulating Using Discrete and Continuous Controllers

In the following example model, the initial compensator has the following gains from the
compensator in the example "Single Loop Feedback/Prefilter Design":

P = 0.0018222

I = 0.0052662

The first model has a discrete implementation of the control system.

mdl = 'scdspeed_compdelay';
open_system(mdl);

9 Classical Control Design

Free download pdf