2
\$\begingroup\$

I'm in my 3rd year of my electrical eng. degree. I have a project right now, where I must create a PID controller for implementation. They gave me the exact values for constants Kp, Ki, Kd and the maximum acceptable frequency.

My integrator circuit is based on the Miller integrator, but with a resistance in parallel with the capacitor, so I can have constant gain with low frequency signals.

My question is: How do I choose or calculate the values of the resistances and the capacitor, based on the max frequency they give me and the integration constant Ki?

My integrator looks like this picture:

schematic

Image source: Electronics Tutorials - AC Op-amp Integrator with DC Gain Control

I uploaded a photo of the PID i am trying to use. Feel free to point any erros. It uses a proporcional, integral and differentiator components and then a inverting summing op amp.

enter image description here

\$\endgroup\$
13
  • 1
    \$\begingroup\$ What you're showing is not a PID, but a 1st order lowpass. To be a PI, RC must be series, and to be PID, another cap is needed at the input. The gain is given by the ratio of Rs. \$\endgroup\$ Oct 20 '20 at 14:57
  • 1
    \$\begingroup\$ isn't that a integral circuit? \$\endgroup\$ Oct 20 '20 at 15:03
  • \$\begingroup\$ A lowpass has an integral part. If you calculate the transfer function you'll end up with a 1/(1+s) form, which is a lowpass. The slope that you're seeing is the integral part, and the corner is given by the pole. And what I meant was for a one opamp PID, but it looks like you want to build it with more than one opamp. You should specify this in your question, but that would mean you're no longer looking for a PID, but for a PID that must be built according to your rules. \$\endgroup\$ Oct 20 '20 at 15:06
  • 2
    \$\begingroup\$ @aconcernedcitizen: In actual motion control usage, such a lowpass circuit with a high DC gain is often used as and referred to as an integrator, or a leaky integrator if you want to get specific. So depending on who you ask that's an integrator -- or not. \$\endgroup\$
    – TimWescott
    Oct 20 '20 at 15:13
  • 2
    \$\begingroup\$ In order to build a PID circuit with that leaky integrator block, you need more circuitry. That, in turn, affects everything. Edit your question to show the whole circuit you intend to use. \$\endgroup\$
    – TimWescott
    Oct 20 '20 at 15:14
0
\$\begingroup\$

The difficulty in your approach is the lack of link between the PID coefficients and the poles/zeroes positions. In the APEC seminar I gave in 2012, I have re-derived the poles and zeroes calculation based on the existing PID coefficients. Once you know where the poles and zeroes are located, you can determine the components value in your circuit. The relationship linking the coefficients to the poles and zeroes is given below:

enter image description here

These are raw expressions and could probably somehow be simplified I believe. Once you have these formulas on hand, you can build a discrete filtered form PID using op-amps as you did but I have used a slightly different implementation:

enter image description here

In this filter, an additional pole is added to form the equivalent of a type 3 compensator which ensures the gain drops at high frequencies with a -2 slope. Below are the parameters calculated by the program:

enter image description here

As you can see below, responses between the two approaches are identical:

enter image description here

I honestly don't know how to stabilize a power converter directly using raw PID coefficients but I sure know how to do it via poles and zeroes placement. You can find more derivations on the subject in the book I published on loop control in 2012.

\$\endgroup\$

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.