PID Control of a Vienna Rectifier-Based Power Factor Corrector
Learn how to automatically tune the DC-link voltage, DQ-axis current, and voltage neutral controllers for a Vienna-rectifier-based power factor corrector modeled in Simscape Electrical™. Use the Closed-Loop PID Autotuner block to tune controller gains to provide fast and stable tracking of the DC-link output voltage to variations in load. The block injects an excitation signal during closed-loop plant operation to estimate plant frequency response. Use the obtained frequency response to automatically compute PID gains. See how to use the Closed-Loop PID Autotuner block on the inner DQ-axis current loops, the outer DC-link voltage loop, and the voltage neutral loop. Use the computed PID gains to update parameters of the PID controller in the model. Finally, see how to verify controller performance by running closed-loop simulation.
In this video, you will see how you can automatically fine-tune controller loop gains for your DC- link voltage, neutral point voltage, and current controllers for a Vienna-rectifier-based power factor corrector.
In the closed-loop simulation model here, we have the plant model, containing the Vienna rectifier and a switched-mode power supply to convert a three-phase 120V AC supply to a regulated 400V DC supply for the loads.
The feedback compensators subsystem for this switched model power supply contains 4 control loops: 2 for tracking the reference DQ -axis currents, 1 for tracking the DC-link output voltage, and 1 neutral point voltage control loop to maintain the DC-link capacitor voltages.
In traditional tuning of these control loops, you would have to tune one loop at a time manually, which tends to be a difficult and time-consuming process.
The Closed-Loop PID Autotuner block in Simulink Control Design will help us simplify and speed up this process by tuning all the 4 PID controllers in a single desktop simulation running in a closed loop. Essentially, it runs autotuning experiments for the DQ axis -current, output voltage, and neutral point voltage loops by injecting perturbations; recording the output; estimating the plant frequency response, and tuning the PI controller parameters.
The initial PID controller gains stored in the data store memory blocks do not provide a good tracking performance. Let’s check the performance of the dc-link voltage and neutral point voltage controllers with different loads. With a balanced load across the buses, we see a slow rise time. When individual loads are introduced later, the neutral point voltage controller does not perform as expected causing an imbalance of the DC-link capacitor voltages, causing link voltage to diverge from the reference.
To improve these responses by tuning the controller loops, let’s set up the controller loops with the closed-loop PID Autotuner blocks. Let’s start with the D-axis current control loop. We will place the block in between the controller output and the input to the plant and this allows the block to inject sinusoidal perturbation signals at the plant input and measure the resulting plant output during the closed-loop experiment. When the experiment stops, the block computes the PID gains based on the plant frequency response estimated at a small number of frequency points near the desired bandwidth. We can then update these gains in the respective PID Controller blocks.
In the block dialog of the closed-loop PID Autotuner block, under ‘Tuning’ we will set a target bandwidth of around 3000rad/s with a target phase margin of 60 degrees. Under the ‘experiment’ section, for the current loop, the plant type is stable with a positive sign. We will set the sine amplitudes of the perturbations to 0.6. There is no exact formula behind setting this value, only that it must be small enough not to change the operating point but sufficiently excite the system dynamics. Let’s choose around 10% of what the nominal controller output is at a steady state. Now, this block is all set.
Similarly, we will add the closed-loop PID autotuner blocks for the other loops and set the tuning requirementsn. For the Q-axis controller the Closed-Loop PID Autotuner block has been set up for a bandwidth and phase margin of 3000rad/s and 60 degrees respectively and the sine amplitude to 0.19. The DC-link voltage loop will run almost 10 times slower than the current loops so the bandwidth has been set to 400 rad/s. The phase margin is set to 60 degrees and the sinusoidal perturbation amplitude to 1. Finally, the neutral point voltage controller has the bandwidth, phase margin, and amplitude of perturbations set to 20000,60 and 0.01 respectively.
With these blocks placed in each of the four controller loops, the experiment start/stop times for these loops are set using these step blocks. We will run experiments after the system has reached a steady-state first for the inner current loops, followed by the outer DC-link voltage loop and then the neutral point voltage loop.
From prior simulations, the system reaches a steady-state at around 0.6seconds. So, we will run the experiments sequentially after this point in time, first for the inner D axis current controller from 0.65 to 0.75 seconds using the step commands here. A conservative estimate for setting the experiment time duration would be 200 over the set bandwidth. Then we will follow it by tuning the Q-axis current controller after letting the transients to settle and running the experiment from 0.8 and 0.9 seconds. Similarly, we will follow this for the DC-link voltage controller from 0.95 to 1.45 seconds, and the neutral point voltage controller from 1.7 to 1.72 seconds.
With this set up, we can just run the simulation. The experiments will run and the closed-loop PID Autotuner blocks will tune and update the gains which we see here in these display blocks. Let’s now run the simulation again with these new gains and see how it performs with the load changes.
Here, we see how the performance of the controller with the initial gains in red and the new gains in green. The response time has improved considerably here when the balanced load is introduced. And in the latter part of the simulation with the individual loads are introduced the neutral point voltage controller does a good job of keeping the voltage neutral point stable compared to the older controller gains.
So, in this video, we saw how to use the Closed-Loop PID Autotuner blocks to tune the controller loops gains of a Vienna rectifier based power corrector in a single desktop simulation. You can also generate C/C++ or PLC code from this block and deploy it to hardware that would allow you to autotune gains in real-time, against hardware
You can also select a web site from the following list:
How to Get Best Site Performance
Select the China site (in Chinese or English) for best site performance. Other MathWorks country sites are not optimized for visits from your location.