I'm working on an analogue PI controller as a hobby project and I would like to have some advice on practical implementation and some feedback on the critical points of the circuit. I have 4 questions asked below.
The objective is to design a controller that takes an input voltage (ideally through a potentiometer) as a set_point and should be able to follow the input signal (steps, square waves, triangular and sine waves) within reason, i.e.:
- A rise time in the step of some 30ms is more than acceptable.
- Signals should be in the 0-10 Hz range (0 being the step)
- Overshoot would be interesting to see just for fun, but preferably it should be avoided.
- Delay is not really an issue
- Supply voltage should be in the 10V range for the op-amp
The output voltage can then be buffered and used in another part of the circuit.
As a first step, I decided to use an integrator op amp circuit as follows (click here to download the ltspice file)
This circuit seems to satisfy most of my requirements:
- No overshoot
- Rise time of about 30ms (pole at 1/(R6C1))
- Unity gain at low frequencies
- Follows mentioned signals reasonably well
Using Matlab I simulated the transfer function and double checked the frequency response, poles and closed loop behaviour. Everything looks fine.
However, I'm a bit worried when it comes to implementing the circuit, my questions are the following:
- Is the op-amp LT1007 a good choice or is there a better one? What should I look for in a "PID op amp"? I have no experience with other than the LM741 which works horribly in LTspice in my experience, that's why I chose this one for the simulation.
- The integrator at low frequencies is basically an inverting amplifier, with gain given by the classical formula. Is it really performing integration of the error? My answer is yes, it still performs integration (the LTspice traces seem to support this) however, for theoretical purposes (read: in class) at low frequency it can be approximated as a simple inverting amplifier.
- Is the differential amplifier block good enough for this application or should I be using a different configuration? (For instance, instrumental differential amplifier)
- Things seems to go HORRIBLY wrong (output saturate even with very small signals and low closed loop gains) as soon as I add a derivative and/or a proportional block and a summating block. Why is this happening? Matlab seems to disagree in this case, still showing a stable closed loop but with complex roots and therefore overshoot with oscillations, I wonder if this has to do with the op-amp in the sum block, see the example below of such implementation (click here for the ltspice file)
By the way, the final amplifier with a 2x gain is just for inverting the sign of the PID output.
EDIT: In my short lab experience, derivative block with LM741 seems to be a pain in the *** due to noise from other circuits, so I'm not really thinking of using it, aside from the fact that it is theoretically not needed. But I still wonder what went wrong in the spice simulation and would like to know.