Simulink Design Optimization
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.
Open the 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.
Double-click the Plant block to view the details of the Stewart Platform. Note that this model uses the SimMechanics blockset.
Double-click the 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 a pre-configured optimization task in SDOTOOL by first opening the model and by double-clicking on the orange block at the bottom of the model. From the SDOTOOL, press the Plot Current 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 SDOTOOL. 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')