Topic: PID in hardware


Keywords: Op-amp, differentiators, integrators, simulation, TINA-TI


For implementation of PID dual-supply op-amps are required. A positive supply op-amp can be used with the input given at the non-inverting terminal. In that case, the output is PI and PD for integrator and differentiator configuration respectively. But if the function slope is less than 1 the output tries to become negative for a differentiator. For a positive supply op-amp this gives a zero or erroneous output. Similarly, for the  integrator if the function magnitude remains high for a long time output becomes erroneous.


Op-amps in PSOC 4 do not have negative supply terminal. Since, this project needs dual supply op-amp external components LF356 are used. Following circuit gives the differentiator configuration. For integrator the resistor and capacitor placement should be interchanged.


To design the R and C values, simulation has been done in TINA-TI. A freely available tool distributed by Texas Instruments. The second figure gives the differentiator output VF1 for the input at the bottom. Here, R=20K and C=250nF. In the 3rd figure, capacitance is reduced to 50 pF. It can be observed that, proper output is not obtained. For proper output, the capacitor should be in the transient state. In other words the RC time constant should be much greater than the differentiation period. The slew time, 300K in this case, should be much less than the signal variation time. The resistor value should be high enough for low power consumption. The off-time should be much larger than the RC time constant. Otherwise, residual charges creates problem in the successive differentiations. This is not exhibited in the simulation. But it shows in the implementation. The last figure shows the integration output.

 

 

opamp_sch_dual_sup.JPG

 

 

Rest of the three figures are added in separate blogs. There is a problem in attachment. It is giving an error as file size exceeded 2MB though the file size is only 89KB.