PID tuning: is the devil as scary as he is painted? Part 5. Closed-Loop PID Autotuner

The concluding article in the series on Automated PID Tuning in Simulink, in which we look at the Closed-Loop PID Autotuner.

This block is similar to the previously discussed Frequency Response Based PID Tuner tool: it is also based on the harmonic analysis method. The block is located in the Simulink Control Design section of the Simulink library.

It should be said right away that the system is similar to that given in the previous article, so all simulation results can be viewed there.

System model

The system under consideration is shown below.

The contents of all subsystems, except for the governor subsystem, have been covered in previous articles: Driver, Electric actuator, Load.

To use the block Closed-Loop PID Autotuner, you need to enable it in series with the PID Controller block, as shown below.

Input port 1 receives an error signal from the discriminator, port 2 receives a feedback signal; in this case, the angular velocity of the control object. The Tune enable subsystem generates a signal for the start and end of the experiment on tuning the controller parameters.

Added Display blocks to the model to register the experiment execution in percent
(% conv) and selected controller parameters (pid gains).

We will present the same requirements to this system as to the system from the previous article.

Configuring the controller

The parameter window of the Closed-Loop PID Autotune block allows you to select the type of regulator used in the system, its shape, set the goal of the experiment, as well as its parameters.

The Target bandwidth is calculated in the same way as in the previous article. In our case, it is equal to 4.83 rad / s.

If the regulator used in the system is of a digital type, then its quantization period is indicated in the autotuning block; when using a continuous controller, the model calculation step is set during the experiment (Experiment sample time). The recommended value of the simulation step is $ 0.02 /  omega_ {b} $… In our case, this value is 0.0041.

The Experiment tab sets the parameters of the experiment. The system in question is stable, therefore, the Plant Type is indicated as Stable. The Plant Sign indicates the property of matching the sign of the output and input coordinates. In this case, we leave this parameter unchanged. Next, the amplitude of the test harmonic signal (Sine Amplitudes) is indicated in accordance with the recommendations given in the previous paragraph. Set the amplitude to 1.

The start time of the experiment is selected on the basis of the transition of the system to the steady state without a controller. The experiment completion time is recommended to be calculated by the formula $ 200 /  omega_ {b} $… For our system, the start time of the experiment will be $ t_ {start} = 0.1 $ s, and the completion time $ t_ {end} = 42 $ from. Both values ​​are specified in the Step time fields of the corresponding Step blocks in the Tune enable subsystem.

It should be noted that the simulation end time (Stop Time) must be specified longer than the experiment end time, otherwise the process of adjusting the controller parameters will not end.

After calculating the model, the selected parameters will be displayed in the Display block.

These values ​​will have to be written into the corresponding fields of the PID Controller block manually.

For the normal functioning of the system, we transfer the Manual Switch toggle switch in the Tune Enable subsystem to the zero signal input. Thus, the autotuning block will not turn on when simulating the system.

You can see that the parameters calculated using the Closed-Loop PID Autotune block practically coincide with the parameters obtained using the Frequency Response Based PID Tuner tool.

Similar Posts

Leave a Reply

Your email address will not be published. Required fields are marked *