¿ªÔÆÌåÓý

Re: Exporting group delay data


 

--- In LTspice@..., "Frank Wiedmann" <frank_wiedmann@...>
wrote:

--- In LTspice@..., "vincenzovaroli" <varoli@> wrote:

I need to export group delay data from several circuit
simulation for comparison purposes.
From plot window i can only export trace data in polar or
cartesian format, even if I plot only group delay.
I exported the trace data in cartesian format and then I got
the group delay data with excel, but this procedure is not simple.
Is there a better solution or can Mike add a suitable export
option?
Regards
Varoli
I would suggest the following approach:
Plot
-d(im(log(V(out))))/2/pi
and export the result as Cartesian data. The real part will be the
group delay, the imaginary part will be zero. LTspice is really
good at doing complex math, so you can take the imaginary part of
the logarithm in order to get the phase.

Best regards,

Frank

Hello Frank,

Thanks for this formula. It works great and I wonder why I haven't
recognized it so far.

It's helpful to add this plot function to the plot-defs file.
Plot Settings -> Edit Plot Defs File
Enter:
.func Tg(x) -d(im(log(x)))/2/pi*1s*1Hz

Usage: "Add trace": Tg(V(out))
LeftMouseClick on the left y-axis and choose Cartesian representation.
You should hide the right (imaginary) y-axis scale.


You can now use "File->Export" Tg(V(out)) to export the data.
Choose the "Cartesian(re,im)" format in this dialog window.

I have made an example application

Files > Lib > Group Delay Export

Best regards,
Helmut


Group Delay

Tg = -dphi/dw = -dphi/df/2/pi

Tg = -d(im(log(H(w)))/dw = -d(im(log(H(w)))/df/2/pi

Plot definition for LTspice with .AC analysis:

.func Tg(x) -d(im(log(x)))/2/pi*1s*1Hz

Usage: "Add trace": Tg(V(out))
Use plot type "Cartesian" and hide the
right (imaginary) y-axis scale.

Join [email protected] to automatically receive all group messages.