Electronic – Implementing a polynomial voltage-controlled current source in LTSpice

current-sourceltspice

I want to implement a voltage-controlled current source in LTSpice. The output current should be

$$I=a_{0}+a_{1}V+a_{2}V^{2}$$

I know I have to use the POLY element, but I can't figure out how to use it.

I am using LTSpice in macOS. Any help please?

Thanks in advanced!

Best Answer

The POLY source is old as SPICE itself (40+ years). The better choice is to use a behavioural source (voltage or current), not only because it makes things easier in terms of implementing a mathematical expression, but also because LTspice will replace it, behind the scene, with a behavioural source, anyway. This is how the expression would look like:

V = a0 + a1*V(x) + a2*V(x)**2

where I presumed to be V(x) instead of V. It's not necessary to use voltages, currents and other time-dependent quantities are allowed, with some conditions. Read more in the help, under LTspice > Circuit Elements > B. Arbitrary Behavioral Voltage or Current Sources.

Note the exponentiation, **, not ^ (which means XOR, unless it's a Laplace expression). If you're using a current source, then it would be I = ....