How to correct 180-degree phase shift caused by negative feedback loop

I'm in the process of designing a cascaded PI controller by following a tutorial published by MathWork in 2022. By comparing the close-loop response and the open-loop response of the inner loop, i'm noticing a 180-degree phase shift. The tutorial states before working on the outer loop, this phase shift must be corrected. Can someone please explain how i can do that ? Thanks in advance.

10 Comments

Hi @Austin,
To address your query regarding, “The tutorial states before working on the outer loop, this phase shift must be corrected. Can someone please explain how i can do that ?”
After thoroughly reading the article provided by you, I did realize that , it is necessary to address the 180-degree phase shift observed between the close-loop response and the open-loop response of the inner loop before proceeding with tuning the outer loop because this phase shift correction is essential to ensure stability and optimal performance of the control system. Now, to correct the 180-degree phase shift in the inner loop of your cascaded PI controller, you can follow these steps based on your shared article. First, make sure that the Manual Switch block connects the PWM Generator block input to the Constant block named "Duty Cycle."Compute a simulation snapshot at a steady-state time point (e.g., 0.007 seconds) to capture system dynamics accurately and initialize the model.Assign "Input Perturbation" to the output signal of the Constant block named "Duty Cycle" and "Output Measurement" to the output of the Rate Transition block named "Current ADC."Select a PRBS (Pseudo-Random Binary Sequence) input signal with specific parameters to balance estimation speed and accuracy.Perform FRE by injecting the PRBS signal into the system, measure responses, and estimate the plant transfer function at discrete frequency points.Tune the controller gains using the nonparametric model:Utilize tools like PID Tuner to adjust controller gains based on the estimated plant model, ensuring stability and desired performance criteria.Validate the tuned inner loop in both time and frequency domains to confirm regulation of inductor current. Use open-loop Bode plots to assess stability margins and adjust as needed. Hopefully, following these steps, you can effectively correct the 180-degree phase shift in your inner loop and proceed with tuning the outer loop of your cascaded PI controller for optimal control of your buck converter. Remember to verify performance at each stage before moving forward to ensure a robust control design implementation.
Good luck!
Hello Umar,
Thank you for your response. By following the steps provided in the tutorial, i was able to design a PI controller that works for the inner loop. However, by comparing the open loop response and the close loop reponse of the controlled plant. I'm noticing a 180-degree phase shift between the two on the phase plot.The question i would like to ask is how i can compensate for this phase shift. I've posted the screenshot of the Bode plots as attachments in the original question. Thank you.
Hi @Austin,
I don’t have Simulink installed on my system. However, I am familiar with some of the blocks in the system when using it years ago and things have changed. However, after analyzing your plots and to help you resolve your problem, I have few suggestions listed below for you to try. Let me know if these suggestions help resolve your problem.
*Ensure the Manual Switch block connects the PWM Generator block input to the Constant block named "Duty Cycle."
*Compute a simulation snapshot at a steady-state time point (e.g., 0.007 seconds) to capture system dynamics accurately and initialize the model.
*Assign "Input Perturbation" to the output signal of the Constant block named "Duty Cycle" and "Output Measurement" to the output of the Rate Transition block named "Current ADC."
*Perform Frequency Response Estimation (FRE) by injecting the PRBS signal into the system, measure responses, and estimate the plant transfer function at discrete frequency points.
*Tune the controller gains using the estimated plant model.
*Utilize tools like PID Tuner to adjust controller gains based on the estimated plant model, ensuring stability and desired performance criteria.
*Validate the tuned inner loop in both time and frequency domains to confirm regulation of inductor current.
For future reference regarding phase shift issues, please always validate system responses at each stage of controller design, ensuring stability and performance criteria are met before moving forward with tuning or implementation.
Hi Austin,
The solution to your query is the result of a script in MATLAB after you export the estimated object to the MATLAB workspace.
Hope this helps.
Cheers,
Antonino
Hello Umar,
Thank you for your response. One thing i forgot to mention is the plant im dealing with is a PSFB instead a buck converter. The design approach i took is identical to your reply and the tutorial. The resulting bode plot still indicates a 180 degree shift between the open loop and the close loop. Do you have any idea on how to fix that? Thank you.
Austin
Hi @Austin,
One of our Staff @Antonino Riccobono took a shot at answering your question and pointed out the problem. Please let us know if this helps resolve your problem.
Thank you for the reply. Based on the code you provided, it seems like a plotting issue i'm facing. Could you please comfirm it? Thank you.
Austin
Dear Austin,
You are right, it's just plotting the loop gain with the corrected phase in order to validate your control design. More specifically, you need to check that you've got the desired phase margin at the bandwidth frequency you made the control gain tuning for.
The 180 deg phase shift originates from the negative feedback when you estimate the loop gain with the Loop Transfer analysis point placed after the Discrete PID Controller block. You need to compensate for it - further motivation for this compensation may come if you execute the function margin (have a look at the documentation) as follow
>> loopGain_phaseCompensated = - loopGain;
>> margin(loopGain_phaseCompensated)
If you need to learn more about Power Electronics Control Design, please refer to the training course I authored at https://www.mathworks.com/learn/training/power-electronics-control-design-with-simulink-and-simscape.html
Hope this helps.
Sincerely,
Antonino
Thank you for the help. I can close this post now.
Austin
Hi @Austin,
Please don’t forget to click answer button and if you choose to vote for us, that will be highly appreciated. Again, good luck 👍 with your project.

Sign in to comment.

 Accepted Answer

Dear Austin,
You are right, it's just plotting the loop gain with the corrected phase in order to validate your control design. More specifically, you need to check that you've got the desired phase margin at the bandwidth frequency you made the control gain tuning for.
The 180 deg phase shift originates from the negative feedback when you estimate the loop gain with the Loop Transfer analysis point placed after the Discrete PID Controller block. You need to compensate for it - further motivation for this compensation may come if you execute the function margin (have a look at the documentation) as follow
>> loopGain_phaseCompensated = - loopGain;
>> margin(loopGain_phaseCompensated)
If you need to learn more about Power Electronics Control Design, please refer to the training course I authored at https://www.mathworks.com/learn/training/power-electronics-control-design-with-simulink-and-simscape.html
Hope this helps.
Sincerely,
Antonino

More Answers (0)

Communities

More Answers in the  Power Electronics Control

Asked:

on 6 Aug 2024

Answered:

on 7 Aug 2024

Community Treasure Hunt

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

Start Hunting!