How to model PID with "derivative on process value"

13 views (last 30 days)
Hello,
First started using Matlab in college around 1991, LOL. Nothing like aging yourself...
Casual user really, have not kept up on Simulink at all.
Question is regarding Simulink's PID Ideal model. If I have tested things out correctly so far, it appears it (according to the equation) calculates the derivative based on the error. Fair enough.
Is there a way to have it calculate the derivative based on PV, or measurement instead? Sure, I could make my own custom PID model, but I was hoping to use Matlab's standard PID model which already includes windup, saturation, etc.
Thanks for the response!
  2 Comments
Sam Chak
Sam Chak on 30 Apr 2024
Are you referring to placing the PID Controller block in the feedback path? For 2nd-order systems, if the Derivative filter coefficient is appropriately selected, then the PD Controller should function as a state-feedback controller, resulting in an Hurwitz system. In the provided example, the closed-loop system demonstrates a critically-damped response, as if a feedback gain matrix were employed for the Double Integrator process plant.
Kurt
Kurt on 30 Apr 2024
Hello Sam, and thanks for the quick response. I am thinking perhaps your idea could be used, but it may not be directly realizable by my hardware (description attached). I am referring to the choice in calculating the derivative term in an effort to avoid derivative kick:
https://controlguru.com/pid-control-and-derivative-on-measurement/
The proportional and integral terms continue to be based on the error = SP-PV, which is standard ISA form. But there is the option of calculating the derivative term based on -PV alone, to avoid setpoint step changes creating derivative kick.

Sign in to comment.

Accepted Answer

Sam Chak
Sam Chak on 30 Apr 2024
If you wish to utilize the Simulink PID Controller block while avoiding derivative kick, you can consider the following PID configuration. It should yield the same PID equation (Reverse mode) as depicted in the image. I recommend giving it a try.
  2 Comments
Kurt
Kurt on 30 Apr 2024
Moved: Sam Chak on 30 Apr 2024
So, I implement a P controller, and place a PD controller in the feedback loop?
Where does my Ti term go?
How do the saturation and anti-windup features work in this implementation? By design, I WILL be hitting limits, so am very interested in seeing those behaviors.
Obviously you are magnitudes above my knowledge; this looks odd to one only familiar with the typical "series controller-plant" and "-1 feedback around" user.
I am definitely willing to give it a try, just not seeing where my controller settings actually go.
Sam Chak
Sam Chak on 30 Apr 2024
The PD control scheme I mentioned is designed to mitigate the problem of derivative kick resulting from sudden Setpoint (SP) changes. If you need to incorporate integral action, you can place a PID controller in the Feedback path and a PI controller after the Step block (SP signal). This suggested control configuration aligns with the approach outlined in an article by APMonitor.

Sign in to comment.

More Answers (0)

Products


Release

R2024a

Community Treasure Hunt

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

Start Hunting!