QSpice returns a Fatal Expression error - help to problem solve appreciated

Objective: I'm learning to use Qspice to test amp design demo by JohnAudioTech.
Approach: using the demo amplifier demo in QSpice to learn expressions to use
Problems: I've a missing expression that I cant figure out;
If I insert to IN sine 0 100m 1K as the per the demo more errors occur.
I've posted a screenshots of errors. Help to guide me to problem solve would be much appreciated.
Thanks
Terry
 

Attachments

  • error.01.PNG
    error.01.PNG
    39 KB · Views: 66
  • error.02.PNG
    error.02.PNG
    28.8 KB · Views: 66
V1, V2 and V3 are apparently behavioural voltage sources rather than ordinary independent voltage sources (B or BV rather than V). Is that intended?
Thank you. Here's my weakness - I don't know is the honest answer, I'm copying what I see in the QSpice demo Audio-amp by matching the V1, V2 and V3 symbols (behavioral voltage). The amp demo runs using these expressions... (see attachment) very puzzling than mine doesn't! I don't see independent voltage symbol in the menu.

I'll experiment with "dependent voltage source".
 

Attachments

  • demo-01.PNG
    demo-01.PNG
    6.3 KB · Views: 27
Can you enter something like V = 0.1*sin(2*3.14159265358979323846264*1000*t) in the behavioural source or does that also not work?
Did input as suggested. The error is reported back is "missing expression in B-source V3
Update: I see there is a problem with the way I'm inputting expressions - haven't yet figured what that exactly is.
 
Last edited:
Administrator
Joined 2007
Paid Member
Maybe I'm not understanding what you asre trying to do here but for the voltage sources I would just click 'V' and drop the symbols onto the diagram, right click where it says 'VAR' on the symbol which opens the flyout menu and select 'Attributes' and just type the voltage you want.

For the AC input do the same but now type (for say 1volt peak @1kHz)

Code:
sine 0 1 1k 0 0 0

Does this help you, the ACA in QSpice that I did a while back.
 

Attachments

  • ACA MOSFET Version.qsch
    17.8 KB · Views: 42
Often if you use parameter replcement you need to specify the parameter between some sort of brackets.
Like in LTspice you would specify .param X = 15 , and then in the voltage source you use {X}.
Try that.
Thanks, Jan
I've got Voltage configured by using V not X attribute as per demo and at IN configured V= 0.5rms
When I run this my error is now:
.four 1k v(out):
Warning: Unknown voltage: v(out)
When I inspect the circuit all seems right as far as Q1 and Q2 - after this it indicates V(GND=0V) and the output with a black screen. I'm one step closer to getting this done, thanks.
 

Attachments

  • error.03.PNG
    error.03.PNG
    11.8 KB · Views: 23
Maybe I'm not understanding what you asre trying to do here but for the voltage sources I would just click 'V' and drop the symbols onto the diagram, right click where it says 'VAR' on the symbol which opens the flyout menu and select 'Attributes' and just type the voltage you want.
Thanks, I needed to delete the .param value and just leave the V value in the symbol attribute box.
I'll try your other suggestion too, thanks.
 
  • Like
Reactions: 1 user
You need to label the .four command to match the labelling of the net of interest. So your command should read .four 1K v(out) and not (Vout). You could also change the net name to match. As long as both are the same it will work.
THanks, Mooly. I checked, the command is as it should be.
I'll play with this again tomorrow. Might give LT another go too. Thank again.For good measure I'll post an image of progress to date.
 

Attachments

  • error.04.PNG
    error.04.PNG
    26.2 KB · Views: 24
It should work then. You have to run the sim and get the output displayed, then right click the output graph and select FFT.
Thank you, Mooly. I executed the steps you demonstrated with both your file and mine. In both cases the error reads "Trouble parsing V(vout) - syntax error". I'm guessing a bug in the version I'm running or some other compatibility issue. Many thanks for your help, the images you posted were very easy to follow.
Update: Up dated to newest version: error now reports - Warning: Unexpected number, "1K", in device B†V3. I had used attribute
"sine 0 .1 1K" which I believe is valid.
I'll investigate where to report bugs to.
 
Last edited: