What is an efficient way to do PID tuning in a model with long computing time?

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

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
Not sure what you mean. I did openloop with step block to check if it responds correctly. However, I want to apply the control to the hydraulic system, as the VFD changes the frequency of the induction motor so the pump adjusts in speed based on some error = setpoint - process measurement.
I cannot simply simulate the complex hydraulic part in a MATLAB script
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
@Mathieu NOE thank you this sounds like a good option. I, however, do not know explicitly how to do this. Say I want to do the tuning in MATLAB environment, what parameters do I need to export to the workspace? Or do you have an example?
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
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
My system is nonlinear indeed, and it also makes use of positive feedback, therefore:
The model is in discrete time with sampling time 1e-5.
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:
can you save both input and output data in a mat file and share it ?
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%
Hi @Mathieu NOE thank you for the responses. The above plot is in open-loop, and the steady state value is 1488 as that is the nominal rotor speed. I have gotten results by using a tangent line according to Ziegler-Nichols.
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
This was open-loop. I did not use a feedback loop, but instead a step function as frequency input to the motor.
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 ? )
The open loop is solely VFD, and I applied the parameters found by ziegler-nichols to the closed-loop VFD+pump model and it gives desired results.

Sign in to comment.

 Accepted Answer

You may use Ziegler-Nicholas step response or else frequency response method for tuning PID controllers.

1 Comment

The Ziegler-Nichols method of applying a tangent line work perfectly by exporting my plot MATLAB, and creating a tangent line based off the dy/dx at the inflection point. Using the steps I immediately got good Kp and Ti parameters. I used "GUI Based Control System Analysis Using PID Controller for Education" by Suleiman, 2016 as a reference.
Thank you for the tip!

Sign in to comment.

More Answers (1)

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

Asked:

DB
on 13 Jun 2023

Commented:

DB
on 16 Jun 2023

Community Treasure Hunt

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

Start Hunting!