2
$\begingroup$

recently I had an exercise where I had to build and measure an analog PID controller/filter. The starting point was this circuit.

enter image description here

This is a tamed PID controller implemented with a single opamp. Resistor and capacitor values are calculated regarding the crossover frequency and a 40 degree phase margin.

First question I have: When this circuit is connected to a power supply and given an input voltage(sine wave while manually editing the frequency) the output voltage slowly but surely goes up to the supply voltage level where it stands which draws the conclusion that the analog PID controller is unstable right? Or am I interpreting something wrong here? If I am right, that means that it is BIBO unstable(Since the only thing bounding the output is the opamp not the controller)

However, after a new Resistor is added parallel to R3 and C2 which makes it a PID-Controller/filter(not sure about this formulation when it is mentioned as an analog filter) it becomes stable and these are the bode plot and step response of the circuit with a new resistor.

enter image description here

enter image description here

My next question would be, does an analog controller has delay? Looking at the step response I would conclude that there is no delay. Nevertheless the delay from the step response should be calculated and compared to the delay measured from the bode plot.

$\endgroup$
  • $\begingroup$ Is there anything going completely wrong with the step response ? As I can think: blue line is the setpoint and red line is the system's response ? How about the steady state error ? Could you add a step response with no setpoint changes ? For example, set the setpoint at $V=0.4$ and add the step response for $15$ seconds. $\endgroup$ – Teo Protoulis Jul 17 at 17:16
  • $\begingroup$ Unfortunately this is what I have now. It was checked and confirmed that it is correct. One rectangle and the red line in that time span is the step response. It is then just inverted when the polarity is changed $\endgroup$ – refa Jul 18 at 6:18
2
$\begingroup$

Forget about the fact that it is supposed to be a PID controller, and think about how your circuit works for a constant (DC) input.

Because of the capacitor C2, there is no feedback at all from the output of the op amp to its input for DC, so there is nothing controlling the output voltage and setting the DC gain of the circuit. Presumably, the output slowly drifts up to the supply voltage as some stray capacitance in the circuit charges up.

If you add a resistor R in parallel with R3 and C2, the DC gain is then -R/R1 and the output voltage will follow the input DC voltage.

| improve this answer | |
$\endgroup$
  • $\begingroup$ I edited the question since I left that out. Input was a sine wave from a wavegen $\endgroup$ – refa Jul 18 at 6:14
0
$\begingroup$

After consulting with a colleague following conclusions were made. Controller without resistor in the feedback part has this transfer function

$PID(s)=\frac{K(s-z_1)(s-z_2)}{s(s-p_1)}$

this makes it unstable(borderline stable since one pole is zero)

To move this pole along x axis in the negative direction a resistor is added which produces this transfer function

$PID(s)=\frac{K(s-z_1)(s-z_2)}{(s-p_2)(s-p_1)}$

Now the controller is stable.

Regarding delay, analog controller has no delay. Response to an input is immediate, However its digital counterpart has a delay which can be measured from it step response or bode plot

| improve this answer | |
$\endgroup$
  • $\begingroup$ Offcourse a real opamp has a finite slew rate, and signal moves at a finite rate so there will still be some delay. $\endgroup$ – joojaa Jul 19 at 8:46
  • $\begingroup$ Thanks for the heads up $\endgroup$ – refa Jul 20 at 9:43

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.