What is an efficient way to do PID tuning in a model with long computing time?
Show older comments
I'm modeling PID control of a variable frequency drive (VFD) on a centrifugal pump system in Simulink/Simscape. As I want the system to properly be controlled, I need to tune the PID parameters. More specifically, I solely focus on PI parameters. An inital open-loop simulation of solely the VFD with a step function shows the behaviour of the system. See picture below.

However, when applying the VFD to the hydraulic model, the computing time drastically increases. To be explicit, computing one second of simulation time takes about 500 seconds real time. Therefore, tuning the closed-loop PI parameters takes an immense amount of time.
I am not alllowed to use the automated PID tuner, and am therefore limited to manual tuning. What would be a good way to handle the PI tuning here?
14 Comments
Mathieu NOE
on 13 Jun 2023
why not using the step response to build a model where you can do fast PID iterations (in a matlab script) ?
we simply need that one step response data
DB
on 13 Jun 2023
Mathieu NOE
on 13 Jun 2023
what i meant is to do a step response of the full system (apply a step perturbation on the VFD ) in your simulink model, and once we have collected the response of the full system, we can do PID fine tuning in a matlab script (based on this model - can be FIR or IIR digital filter for example) without the hastle of running the big simulink stuff in a loop
DB
on 13 Jun 2023
Mathieu NOE
on 13 Jun 2023
we just need the two time data :
- your input signal - probably a steady stand point followed by a moderate step perturbation
- * the output of the system to this perturbation
if you can share this data I can show you the rest
Mathieu NOE
on 13 Jun 2023
of course if your system is more or less non linear , you may have to repeat this for different set points and find a robust PID for the entire operating conditions
Mathieu NOE
on 14 Jun 2023
can you save both input and output data in a mat file and share it ?
Mathieu NOE
on 15 Jun 2023
FYI, we need the open loop step response, not the one you have shown above which is already in closed loop
also you may have to run the motor at a lower set point if you want set point + step input to not exceed 100%
DB
on 15 Jun 2023
Mathieu NOE
on 15 Jun 2023
ok bu then I don't understandyour previous statement :
Running the motor at 100% speed is 1488 rpm at 50 Hz, thus I first used step resonse with a gain of Kp=50 which gave the following response:

so this response is in closed loop or open loop ? according to your own words it's closed loop
DB
on 15 Jun 2023
Mathieu NOE
on 15 Jun 2023
I am confused
I didn't noticed that your second image

is simply a zoom on the tiny overshoot at the end of the step response of the motor plot

so at the end I am completely lost in what data we see and are talking about (VFD alone / VFD + pump ? open loop , closed loop ? )
DB
on 16 Jun 2023
Accepted Answer
More Answers (1)
Mohamad Nazir
on 13 Jun 2023
1 vote
You can identify a second order transfer function model of your VFD from the open-loop step response (using overshoot, response time, etc.) then open a new model and insert that transfer function with PI(D) and tune its parameters quickly. That might provide you with a good initial guess which you ultimately have to manually tune on your model (with the hydraulic system).
Communities
More Answers in the Power Electronics Control
Categories
Find more on PID Controller Tuning in Help Center and File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!