LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Can an OPAMP be modeled in LabView?

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

0 Kudos
Message 1 of 9
(5,863 Views)

Correction: (Supply y to the block and return x) !

0 Kudos
Message 2 of 9
(5,858 Views)

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

0 Kudos
Message 3 of 9
(5,840 Views)

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 ?

0 Kudos
Message 4 of 9
(5,827 Views)

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.

0 Kudos
Message 5 of 9
(5,818 Views)

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

0 Kudos
Message 6 of 9
(5,812 Views)

I'm guessing this is not included with the base package since I cannot find this vi?  🙂

0 Kudos
Message 7 of 9
(5,796 Views)

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

0 Kudos
Message 8 of 9
(5,791 Views)

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!

0 Kudos
Message 9 of 9
(5,785 Views)