0
\$\begingroup\$

I am trying to implement a circuit which contains some complex number of form:

$$ x + jy $$

So my question is how to represent complex value while writing netlist in LTSPICE.

\$\endgroup\$
1
  • \$\begingroup\$ Impedance is a complex number typified by an inductor or capacitor in series with R. \$\endgroup\$
    – Andy aka
    Oct 25, 2016 at 15:37

2 Answers 2

1
\$\begingroup\$

The complex part will either be a capacitor or an inductor. Just figure out the value for such component starting out with how much reactance you want. And that component will have to be in series with a resistor which is the real part.

Now if you happen to have a negative real part, you need to simulate a negative resistance, which can be done in LTSpice. Click here to see how you could do it if you had a negative real part

\$\endgroup\$
1
\$\begingroup\$

If you need calculations as result of formulas, then using active elements will not be a solution. If so, then you're partly out of luck because LTspice doesn't support complex numbers, except in .AC analysis in the waveform arithmetic. Partly, because the only way of doing it is to manually decompose your results into real and imaginary parts (e.g. Euler's formula: exp(i*x) = cos(x) + i*sin(x)). It gets complicated, yes, but you can even do FFT in time domain, provided your input is real-valued, only (I did it, but only as a test, because of the immense impact it has for higher N, as you can imagine). The trick is to avoid any calculations that can result in a direct a+i*b result, because the b will be lost. Only careful separation of terms will give you correct results. I even managed to calculate elliptic filter's roots this way, and not by following the simplified way, but by using real sn()&co (which were approximated with theta functions). Which means there's hope, but only so much.

\$\endgroup\$

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.