LTspice .wave directive syntax

Thread Starter

Ozgur1975

Joined Oct 18, 2021
6
Hi,

The syntax to output individual node voltages with respect to ground as a .wav file is:
.wave <filename.wav> <Nbits> <SampleRate> V(out) [V(out2) ...]

With this syntax I can only output individual node voltages with respect to ground. I would like to know how I can output the voltage "between two nodes". For example the voltage between node a and node b.

Thanks in advance for your help.
 

Papabravo

Joined Feb 24, 2006
22,075
Hi,

The syntax to output individual node voltages with respect to ground as a .wav file is:
.wave <filename.wav> <Nbits> <SampleRate> V(out) [V(out2) ...]

With this syntax I can only output individual node voltages with respect to ground. I would like to know how I can output the voltage "between two nodes". For example the voltage between node a and node b.

Thanks in advance for your help.
Create a behavioral voltage or current source that represents the voltage difference between the two nodes. Like this:

1635549876186.png
 

Thread Starter

Ozgur1975

Joined Oct 18, 2021
6
Excellent!
Thank you so much for your help.
I would also like to know if we can achieve this without extra circutry. I mean obtaining the same effect with an appropriate syntax.
 
Last edited:

Papabravo

Joined Feb 24, 2006
22,075
Excellent!
Thank you so much for your help.
I would also like to know if we can achieve this without extra circutry. I mean obtaining the same effect with an appropriate syntax.
As far as I know the .wave command does not allow expressions, only node names. I think there may be reasons why this is the case relating to saving node data as it is calculated but not being able to compute random waveform expressions in the middle of matrix operations. this is just rank speculation so take it with a grain of salt.
 

Thread Starter

Ozgur1975

Joined Oct 18, 2021
6
What I did was to use a voltage differential amplifier or voltage subtractor opamp circuit and connect the nodes to the inputs of the circuit and use the output voltage. Your solution eliminates the need for this.
 
Top