This thread has been locked.

If you have a related question, please click the "Ask a related question" button in the top right corner. The newly created question will be automatically linked to this question.

INA330/analog PID implementation question

Other Parts Discussed in Thread: INA330, OPA348

Hi,

The INA330 data sheet shows a PID example using a single op amp (figure 6), and also another example using separate P, I and D op amps (figure 7).  The idea is to arrive at the R/C values using separate op amps, then using those values to arrive at the RC values of the single-op amp design. 

How do you translate the RC values from the 3-op amp design to the single-op amp design?

Here is the same question phrased in more detail from my customer:

The datasheet for the INA330 Figure 6 shows an integrated PID controller based on the OPA348. Figure 7 shows another version of the PID with the Proportional, Integrator, and Derivative elements separated out into individual op amps. The paragraph above the figure states:

"The PID loop compensation can be optimized for loop stability and best response to thermal transients by adjusting C1, C2, C3, R2, R3, and R4... Figure 7 shows a circuit that can be used as an intermediate circuit to easily adjust components and determine system requirements."

Please provide the conversion equations to derive the C1, C2, C3, R2, R3, and R4 component values in Figure 6 PID, using the component values from empirically determined from the component values in the PID from Figure 7.

Thanks,

Rick

  • Hi Rick,

    Great question you asked. What is the answer?

    -Dennis

  • Dennis,

    I did not receive an answer.  I spoke with a couple of local TI engineers, and they did not know of such a transform. The suggestion was to translate the values empirically.

    Rick

  • Rick and all,

    A couple of the key folks involved with the INA330 are now retired so we have lost some of this knowledge.

    Let me say first that we (including those departed) are not experts on PID. We did know that the INA330 was a good signal acquisition component on which to base a thermistor-sensor PID loop. We did some experimentation with figure 7 and a simplified version in figure 8 with P and I.  (Note that figure 6 is more of a conceptual diagram.)

    I know that some of our limited knowledge of PID came from a column written by Bob Pease of National. (Maybe it’s okay to say this now that TI is in the process of acquiring National.) Anyway, Bob provided a great intuitive explanation of PID. An intuitive understanding will definitely help you get a system running. Here is a link to this column:

    http://electronicdesign.com/article/analog-and-mixed-signal/what-s-all-this-p-i-d-stuff-anyhow-6131.aspx

    I believe the best way to develop a controller is to start with a multi-amplifier solution, similar to figure 7. Tune it up as best you can. The independent control of P, I and D greatly simplifies the tuning. Then try to nearly duplicate the performance using only P and I as shown in figure 8. This helps tell you whether the full-blown PID has merit in your system. Bob’s column shows another one-amplifier solution that looks more complicated. Maybe it comes closer to the full PID.

    In response to your question, I did some quick Tina-SPICE simulations of figure 7. You may find it easier to tune a real system after doing similar simulations. Bob Pease would probably not approve—he hates SPICE. Don’t tell him I did it. :)

    I hope this helps.  Regards, Bruce.

  • Hi Rick and Bruce,

    Thank you both replying. Very helpful. I plan on following Bruce's advice and use the 3 separate op-amp circuits and tuning empirically on the bench.

    For others who may later read this discussion, here is a link that further explains the 3 op-amp circuit, (see figure E-4).

    http://higheredbcs.wiley.com/legacy/college/kuo/0471134767/app/appe.pdf

    Thanks again.

    -Dennis

     

  • All,

    A respected colleague shamed me after reading my first reply in this thread. He claimed that I knew much more about PID. Upon reflection, he was partially correct… I know at least a little bit more. Thanks for the urging, Rod… I’m going to miss you!

    Figure 1 in the INA330 data sheet shows only an integrator to compensate the control loop. I said that this figure was only intended to be a conceptual diagram. Well, an integrator alone can certainly make this loop work. An integrator can stabilize virtually any feedback loop if you make it slow enough. In figure 7, slow means that you dial down the integrator gain control. Adjusting this gain control is equivalent to adjusting the speed of the integrator. With integrator only (P and D gains set to zero) the control the loop will likely be very slow to settle. If you dial up the integrator gain (speed it up), it will overshoot and ring. Too much gain and it will oscillate.

    If there is not too much delay in your feedback loop, an integrator stabilization loop may be fast enough. In a temperature control system this means that the sensor is tightly coupled to the heater/cooler. If an integrator alone gives a suitable loop response (fast enough) then life is easy—you just eliminate the P and D blocks and you’re done.

    By adding the P and D terms you can greatly improve the settling time of most loops. The combination of P, I and D is not theoretically “perfect” or “best.” It’s just a proven and very universal way to compensate a control loop for improved speed when compared with an integrator alone. Also, there is no one correct way to adjust the loop. The best adjustment will depend on your tolerance to overshoot and the desired error band versus speed. Other, even fancier compensation schemes might improve results even more but probably not as easily as with PID.

    Figure 8 shows a controller with only P and I terms. It may be significantly faster than an integrator alone and thus be good enough. The integrator is set by the combination of the input 10M resistor and 2uF feedback capacitor. The proportional term is controlled by the ratio of the two resistors. The 100pF capacitor keeps the op amp’s loop stable and has really nothing to do with the whole control loop compensation.

    I admit that figure 6 has me a bit baffled. I’m not sure why the main input resistor R1+R3 is split the way it is shown. I think that a single resistor would do well; I’ll call it R1. C1 would be connected to the other side of R1.

    Then R1 and C2 are the integrator. C1 and R4 are the differentiator. R2 and C3 are relatively small values that keep the op amp stable and have effect far beyond the critical frequency range of the main loop.

    To tune up this network, I would start with the more easily adjusted network shown in figure 7. After achieving a suitable response (which takes considerable experimentation), measure or simulate the frequency response of the 3-op-amp loop filter combination. Simulation may be easier because the frequency range that matters will likely be very low. Then duplicate the frequency response as best you can with the single op amp filter in figure 6 (with the change I noted). The complete loop shown in figure 6 should then be able to closely resemble the results of figure 7 only by adjusting the gain somewhere in the loop.

    Some more excellent background on PID can be found on Wikipedia. Check it out at…

    http://en.wikipedia.org/wiki/PID_controller

    Hope this is helpful.   Regards, Bruce.