11-22-2013 01:34 PM
Can a basic ideal OPAMP be modeled in LabView using the arithmetic operators and a feedback node? I have tried this using a unity gain configuration, but the resulting output just oscillates from -inf to +inf continually. Is this inherent because the feedback "wire" contains the feedback node (Z pow -1) operator, making the simulation unstable?
The reason for doing this? ........... I have a 3rd order function y=f(x) and I wanted to place it in the feedback path to generate a block which will continually and smoothly invert the function (i.e. supply x to the block and return y).
I have tried doing this by plotting the function and using the cursors, but the results are not smooth and continuous because of interpolation etc. of the graph. (I am working with Voltages in 0.0001V, and Temperatures in the 0.001 deg C !
Any help or suggestions greatly appreciated.
pjleeflyer
11-22-2013 01:40 PM
Correction: (Supply y to the block and return x) !
11-22-2013 02:04 PM
An ideal op amp is just a subtraction (differential input) and multiply by infinity.
There are probably better ways to perform your function inversion. Please tell us what the function is and what format the data is in.
Lynn
11-22-2013 02:18 PM
This is exactly what I have modeled in LabView, except the multiply is by 1E6 to be realistic. (The code output just oscillates anyway)?
The function is y=9E-7*pow(x,3) - 3E-5*pow(x,2) - 0.0143*x + 1.111 (Obtained by curve fitting in Excel).
So now I need to invert this and solve continuously and smoothly for x ?
11-22-2013 02:57 PM
DATA: Is actually temperature (x) and voltage (y)
Temperature is set by the user of the LabView GUI and converted by the formula to set a DAC voltage.
When the external system temperature is stabilized, a return voltage is read back to the GUI via an ADC. It is this voltage that must be processed via the reverse transfer function to measure the actual system temperature.
11-22-2013 03:24 PM
You have a third order polynomial in x.
a3*x^3 + a2*x^2 + a1*x + a0 = y, where a3 = 9E-7, a2 = -3E+5, a1 = -0.0142, and a0 = 1.111.
For f(x0) = y0 this becomes a3*x0^3 + a2*x0^2 + a1*x0 + a0 - y0 = 0. The zeros of this polynomial should be the temperature for a specific y0. Look at the polynomial palette in the Mathematics palette for the Polynomial Roots.vi. Of course some of the roots may be complex so you will need to evaluate which root is the relevant one for your physical system.
Lynn
11-22-2013 04:35 PM
I'm guessing this is not included with the base package since I cannot find this vi? 🙂
11-22-2013 05:07 PM
It comes with Full Development System or higher.
I think that cubic equations can be solved analytically. Look up the solution and implement it in basic Numeric palette functions.
Lynn
11-22-2013 05:32 PM
OK. Thanks for your help.
I think the "Ideal" OPAMP oscillates because there is no equivalent time domain dominant pole to kill the loop gain. The unity feedback configuration is the most unstable situation you can place the opamp in. (Highest loop gain to lose). LabView is not the tool for circuit simulation!