Simulink Control Design™ - MathWorks

(Tuis.) #1
s = tf('s');
nf = pi/Tm; % Nyquist frequency

Req2 = TuningGoal.Gain('iLoad','Vchip',1.5e-3 * s/nf);
Req2.Focus = [nf/1e4, nf];
Req2.Name = 'Load disturbance';

High-performance demands may lead to high control effort and saturation. For the ramp
profile vcmd specified in the Simulink model (from 0 to 1 in about 250 sampling periods),
we want to avoid hitting the saturation constraint. Use a rate-limiting filter to
model the ramp command, and require that the gain from the rate-limiter input to be
less than.

RateLimiter = 1/(250*Tm*s); % models ramp command in Simulink

% |RateLimiter * (Vcmd->Vin)| < Vmax
Req3 = TuningGoal.Gain('Vcmd','Vin',Vmax/RateLimiter);
Req3.Focus = [nf/1000, nf];
Req3.Name = 'Saturation';

To ensure adequate robustness, require at least 7 dB gain margin and 45 degrees phase
margin at the plant input.

Req4 = TuningGoal.Margins('Vin',7,45);
Req4.Name = 'Margins';

Finally, the feedback compensator has a tendency to cancel the plant resonance by
notching it out. Such plant inversion may lead to poor results when the resonant
frequency is not exactly known or subject to variations. To prevent this, impose a
minimum closed-loop damping of 0.5 to actively damp of the plant's resonant mode.

Req5 = TuningGoal.Poles(0,0.5,3*nf);
Req5.Name = 'Damping';

Tuning

Next use systune to tune the controller parameters subject to the requirements defined
above. First use the slTuner interface to configure the Simulink model for tuning. In
particular, specify that there are two tunable blocks and that the model should be
linearized and tuned at the sample time Tm.

TunedBlocks = {'compensator','FIR'};
ST0 = slTuner('rct_powerstage',TunedBlocks);
ST0.Ts = Tm;

13 Control System Tuning Examples

Free download pdf