LTSpice - Plotting user-defined functions against frequency in AC analysis

Thread Starter

narek

Joined Dec 4, 2019
1
I'd like to know if it's possible to use variables defined using .PARAM to plot custom expressions in the frequency domain. For example, if I add a trace to a plot and enter an expression, like 2*w, where w is the frequency (x-axis) LTSpice will plot it. But if I enter A*w (or {A}*w), then LTSpice spits out an undefined symbol error for the variable A. Any help would be appreciated.
 

ci139

Joined Jul 11, 2016
1,898
define your A as a voltage source's .BV (say it's "B1" and has anode label "vA")voltage use the V(vA)*frequency
like . . .
. . . Ups! - It does not allow to change X axis
F-Plot - Test.png F-Plot - Test - 2.png
 
Last edited:

eetech00

Joined Jun 8, 2013
3,934
I'd like to know if it's possible to use variables defined using .PARAM to plot custom expressions in the frequency domain. For example, if I add a trace to a plot and enter an expression, like 2*w, where w is the frequency (x-axis) LTSpice will plot it. But if I enter A*w (or {A}*w), then LTSpice spits out an undefined symbol error for the variable A. Any help would be appreciated.
Hello

PARAMS are resolved before the simulation run and remain static during the simulation run, therefore, they cannot change dynamically during a simulation run. However, you can use user defined functions to compute values during a simulation run.

eT
 
Top