Specifications
Schedule Controllers at Multiple Operating Points
5-19
Ts = 0.2;
p = 20;
m = 1;
MPC1 = mpc(sys1,Ts,p,m); % Controller for M1 detached from M2
MPC2 = mpc(sys2,Ts,p,m); % Controller for M1 connected to M2
The applied force also have the same constraints in each case. The lower bound for the
applied force is zero because it cannot reverse direction. The maximum rate of change for
the applied force is 1000 per second (increasing or decreasing).
MPC1.MV = struct('Min',0,'RateMin',-1e3,'RateMax',1e3);
MPC2.MV = struct('Min',0,'RateMin',-1e3,'RateMax',1e3);
Simulating Controller Performance
The following is the Simulink block diagram for this example.
The upper portion simulates the movement of the two masses, plots the signals as a
function of time and animates the plant.