Closed-Loop PID Autotuner Block
The Closed-Loop PID Autotuner block allows you to tune one PID controller at a time. It
injects sinusoidal perturbation signals at the plant input and measures the plant output
during a closed-loop experiment. When the experiment stops, the block computes PID
gains based on the plant frequency responses estimated at a small number of points near
the desired bandwidth. For this FOC PMSM model, the Closed-Loop PID Autotuner block
can be used for each of the three PI controllers.
This workflow applies when you have initial controllers that you want to retune using the
Closed-Loop PID Autotuner block. The benefits of this approach are:
(^1) If there is an unexpected disturbance during the experiment, it will be rejected by the
existing controller to ensure safe operation.
(^2) The existing controller will keep the plant running near its nominal operating point
by suppressing the perturbation signals.
When using the Closed-Loop PID Autotuner block for both simulations and real-time
applications:
- The plant must be either asymptotically stable (all the poles are strictly stable) or
integrating. The autotuner block does not work with an unstable plant. - The feedback loop with the existing controller must be stable.
- To estimate plant frequency responses more accurately in real time, minimize the
occurrence of any disturbance in the FOC PMSM model during the experiment. The
autotuner block expects the plant output to be the response to the injected
perturbation signals only. - Because the feedback loop is closed during the experiment, the existing controller
suppresses the injected perturbation signals as well. The advantage of using closed-
loop experiment is that the controller keeps the plant running near the nominal
operating point and maintains safe operation. The disadvantage is that it reduces the
accuracy of frequency response estimation if your target bandwidth is far away from
the current bandwidth.
Connect Autotuner with Plant and Controller
Insert the Closed-Loop PID Autotuner block between the PID block and the plant for all
three PI controllers, as shown in the FOC PMSM model. The start/stop signal starts
and stops the closed-loop experiment. When no experiment is running, the Closed-Loop
PID Autotuner block behaves like a unity gain block, where the signal directly passes to
.
8 PID Autotuning