In a previous post, we highlighted how the system identification capability of the PID Tuner app can help identifying an experimental plant. Today we see another very useful application: Identifying a linear plant from a model that does not linearize.
Not all models linearize easily
Most users who tried linearizing complex Simulink models know that it is often not an easy task. For a Simulink model to be realistic, it must have discontinuities like saturations, quantizations, ON/OFF controllers, etc. All those elements are known to linearize to zero, and consequently make it impossible to apply classical control design techniques.
When linearization fails, system identification can help.
To highlight this functionality, I picked a demo model which I thought would be challenging for the PID Tuner: sf_electrophydraulics: a PWM Driven Hydraulic Servomechanism.
This model already contains a PI controller doing a decent job, so I was curious to see if the PID Tuner would be able to do better.
As expected, I opened the dialog of the PID block, clicked the "Tune" button, and the PID Tuner app opened with a badge saying: Plant cannot be linearized.
Identifying a plant from a simulation
In the PID tuner, I clicked on the link to identify a plant
and I choose to obtain my data by simulating the model
Under the hood, the app will open the loop and replace the PID block by a source signal to excite the system. Since I know that the output of the controller is a duty cycle percentage, I specified that this input should be a step from 0% to 90%.
I clicked the Simulate button, and obtained the following data. As I would expect based on my knowledge of the system, a 90% duty cycle results in a motion of ~18mm.
I clicked the Apply and Close buttons to go back to the Plant Identification tab. Here I can try different structures for the plant model, and use the adjustors to manually tweak the plant model:
Designing the Controller
I saved the plant and went back to the PID Tuner tab. I cranked up the Response Time and Transient Behavior sliders to get something aggressive, and I clicked the Update Block button to apply the gain values to the block.
When I simulate the model with this tuned controller, I can only realize that the controller designed using the PID Tuner app is tracking the set point as good as the original controller.
Now it's your turn
I have to admit, I am really impressed by how easy it was to obtain a plant model and a controller for this model. Given all the complex discontinuities in this model, I was certain it would require more work to design a controller for it.
Give this new functionality a try, and let us know what you think by leaving a comment here.
コメントを残すには、ここ をクリックして MathWorks アカウントにサインインするか新しい MathWorks アカウントを作成します。