MATLAB Answers

Simscape Multibody PID Controller Tuning fails after different attempts.

11 views (last 30 days)
Florian Hofstetter
Florian Hofstetter on 6 Nov 2020
Commented: Juan Sagarduy on 8 Nov 2020
I created a Ball on Plate system using Simskape Multibody.
It was imported as a CAD model. Now I want to control the position of the ball on the plate. For this I want to use a PID controller. I have already built the control loop. Since I don't have a mathematical model of the system I want to use the autotune function of the PID controller. But this fails.
I have tried this in two ways:
The autotune function of the PID block gives me the following error message:
Here I read in another article ( that the linearization of the controlled system can also take place at another position than the zero point. But also this approach failed.
My second approach was to parameterize the PID controller using this guide:
Again, no useful parameters come out.
Now I wonder if I have a basic problem with the PID controller blocks or Simulink or Simscape Multibody. Am I doing something wrong?
Simulink model is attached. "bop_komplett.slx"


Sign in to comment.

Answers (1)

Juan Sagarduy
Juan Sagarduy on 6 Nov 2020
Hello Florian
Looking at the snapshot, it looked strange that you have a closed loop control but the motor joints are in kinematic mode (fed with angle q).
I would try the autotuner, but set the joints in dynamic mode (actuation torque from the controller). This is the conventional approach.
If that does not work, then there can be a challenge in linearizing the plant.
Good luck / Juan


Florian Hofstetter
Florian Hofstetter on 6 Nov 2020
Hello Juan,
thank you for your quick response.
The motor connections are intentionally in angle mode. They are intended to simulate servo motors that will later be controlled by an external program.
In fact, you have already answered another question related to this project.
A Ball on Plate System can be operated with a PID controller as many other examples have shown.
How can I solve the "challenges"?
What would be a different method or approach?
I would like to avoid to build a mathematical model, because it seems to be too complex. After all, Simskape Multibody is made exactly for this.
Best regards
Florian Hofstetter
Juan Sagarduy
Juan Sagarduy on 8 Nov 2020
Hi Florian
If the kinematic mode is to be used and plant can’t be linearized, then the alternative is to use Design Optimization for tuning.
Your PID parameters are iteratively refined until the response (ball position) is within the accepted range.
Regards Juan

Sign in to comment.

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!