# Build PID Controller

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:

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.

• 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. Commented Oct 20, 2020 at 14:57
• isn't that a integral circuit? Commented Oct 20, 2020 at 15:03
• 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. Commented Oct 20, 2020 at 15:06
• @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. Commented Oct 20, 2020 at 15:13
• 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. Commented Oct 20, 2020 at 15:14