This example shows how to use Simulink® Design Optimization™ to optimize the position controller parameters of a Stewart platform. The Stewart platform is modeled using SimMechanics™ blocks.
The model includes a vertical PID position controller and the gains are tuned to limit the maximum forces and track position with minimum overshoot and 0.3 second rise time.
stewart_demo model using the command below and run the simulation. The simulation produces an unoptimized vertical position (Z direction) of the Stewart platform and the initial data for optimization.
Double-click the Scope block to view the unoptimized position, the step input and the controller's force actuation signal.
Plant block to view the details of the Stewart Platform. Note that this model uses the SimMechanics blockset.
Desired Response or the
Max Forces blocks to view the constraints on the Stewart platform. The Max Forces block defines the constraints on the actuation signal of the controller.
You can launch Response Optimization Tool using the Analysis menu in Simulink, or the
sdotool command in MATLAB. You can launch a pre-configured optimization task in Response Optimization Tool by first opening the model and by double-clicking on the orange block at the bottom of the model. From the Response Optimization Tool, press the Plot Model Response button to simulate the model and show how well the initial design satisfies the design requirements.
There are two plots representing the
Z Position and
Leg Forces of the platform.
We start the optimization by pressing the Optimize button from the Response Optimization Tool. The plots are updated to indicate that the design requirements are now satisfied.
The plots are now updated with the optimized position of the Stewart platform and the force actuation signal.
% Close the model bdclose('stewart_demo')