pid tuning with actuator constraints -凯发k8网页登录
this example shows how to use simulink® design optimization™ to tune the gains of the pid controller (kp, ki, and kd) and optimize the step response of the plant. to view the results, use the following steps.
open the pidtune_demo
model using the command below and run the simulation. the simulation produces an unoptimized step response and the initial data for optimization.
open_system('pidtune_demo')
double-click the scope
block to view the unoptimized step response.
double-click the output constraint
block to view constraints on the plant response, including rise time, settling time and maximum overshoot.
double-click the actuator constraint
block to view constraints on the actuator signal of the controller.
you can launch the response optimizer using the apps menu in the simulink toolstrip, or the sdotool
command in matlab®. you can launch a pre-configured optimization task in the response optimizer by first opening the model and by double-clicking on the orange block at the bottom of the model. from the response optimizer, press the plot model response button to simulate the model and show how well the initial design satisfies the design requirements.
we start the optimization by pressing the optimize button from the response optimizer. the plots are updated to indicate that the design requirements are now satisfied.
close the model.
bdclose('pidtune_demo')