Simulink Model of Mass-Spring-Damper System
is the force applied to the mass and
is the horizontal position of the mass.

needed to change the position
. Tuning this PID controller is easy when the physical parameters
are known exactly. However this is rarely the case in practice, due to a number of factors including imprecise measurements, manufacturing tolerances, changes in operating conditions, and wear and tear. This example shows how to take such uncertainty into account during tuning to maintain high performance within the range of expected values for
.Uncertainty Modeling
:ureal) object to model the range of values that each parameter may take. Here the uncertainty is specified as a percentage deviation from the nominal value.Nominal Tuning
- Position
should track a step change with a 1 second response time - Filter coefficient
in PID controller should not exceed 100.
slTuner interface for tuning the "Controller" block in the Simulink model, and use systune to tune the PID gains and best meet the two requirements.getIOTransfer to view the closed-loop step response.
?Robustness Analysis
slTuner to create an uncertain closed-loop model of the mass-spring-damper system. Block substitution lets you specify the linearization of a particular block in a Simulink model. Here we use this to replace the crisp values of
by the uncertain values um,uc,uk defined above.UST0 and simulate the "uncertain" closed-loop response.
step plot shows the closed-loop response with the nominally tuned PID for 20 randomly selected values of
in the specified uncertainty range. Observe the significant performance degradation for some parameter combinations, with poorly damped oscillations and a long settling time.Robust Tuning
UST0 rather than the nominal closed-loop model ST0. Due to the presence of ureal components in the model, systune automatically tries to maximize performance over the entireuncertainty range. This amounts to minimizing the worst-case value of the "soft" tuning goals Req1 and Req2.
to
as a function of frequency. Note the attenuated resonance near 1 rad/s.

Req1,Req2) as a function of the uncertain parameters
for the nominal damping
. Use the "varying parameter" feature of slTuner to create an array of closed-loop models over a grid of
values covering their uncertainty ranges.







