Solution to unknown function 'v' for a voltage source in LTspice?
This sort of error happens to almost all the beginners that don't bother to read the help file that comes with the program. Try opening it up with F1 and go to: LTspice &gt; Circuit Elements &gt; B. ..., then read what's in there. Then replace the voltage source with a behavioural voltage source with an appropriate expression -- because that if() that you're showing in your picture is ill formed.