Forums

risetime in LT Spice

Started by John Larkin August 9, 2014

Got a suggestion for making 10/90 risetime measurements in LT Spice?

I need to do that a lot, as I tweak other things. I can do it manually on the
waveform plot, but that's a nuisance. I have two waveforms of interest, one
electrical, the other a simulated optical waveform.

I could fake some sort of window comparators, which would at least be a little
easier to measure on the plot. Or maybe make some linear ramps that run from 10%
to 90% of the waveforms that I care about 

I want two big red 7-segment LED displays that show the rise times.


-- 

John Larkin                  Highland Technology Inc
www.highlandtechnology.com   jlarkin at highlandtechnology dot com   

Precision electronic instrumentation
On Sat, 09 Aug 2014 12:03:33 -0700, John Larkin
<jjlarkin@highNOTlandTHIStechnologyPART.com> wrote:

> > >Got a suggestion for making 10/90 risetime measurements in LT Spice? > >I need to do that a lot, as I tweak other things. I can do it manually on the >waveform plot, but that's a nuisance. I have two waveforms of interest, one >electrical, the other a simulated optical waveform. > >I could fake some sort of window comparators, which would at least be a little >easier to measure on the plot. Or maybe make some linear ramps that run from 10% >to 90% of the waveforms that I care about > >I want two big red 7-segment LED displays that show the rise times.
Numerically that's done with a .MEAS statement, see LTspiceTutorials.zip on the Simulation Tools & Macros Page of my website. ...Jim Thompson -- | James E.Thompson | mens | | Analog Innovations | et | | Analog/Mixed-Signal ASIC's and Discrete Systems | manus | | San Tan Valley, AZ 85142 Skype: skypeanalog | | | Voice:(480)460-2350 Fax: Available upon request | Brass Rat | | E-mail Icon at http://www.analog-innovations.com | 1962 | I love to cook with wine. Sometimes I even put it in the food.
On Sat, 09 Aug 2014 12:46:24 -0700, Jim Thompson
<To-Email-Use-The-Envelope-Icon@On-My-Web-Site.com> wrote:

>On Sat, 09 Aug 2014 12:03:33 -0700, John Larkin ><jjlarkin@highNOTlandTHIStechnologyPART.com> wrote: > >> >> >>Got a suggestion for making 10/90 risetime measurements in LT Spice? >> >>I need to do that a lot, as I tweak other things. I can do it manually on the >>waveform plot, but that's a nuisance. I have two waveforms of interest, one >>electrical, the other a simulated optical waveform. >> >>I could fake some sort of window comparators, which would at least be a little >>easier to measure on the plot. Or maybe make some linear ramps that run from 10% >>to 90% of the waveforms that I care about >> >>I want two big red 7-segment LED displays that show the rise times. > >Numerically that's done with a .MEAS statement, see >LTspiceTutorials.zip on the Simulation Tools & Macros Page of my >website. > > ...Jim Thompson
How would you construct a .MEAS statement to measure a rise time? It's not a simple calculation. Again, I can run a linear ramp to convert rise time to a single voltage. Might do that. -- John Larkin Highland Technology Inc www.highlandtechnology.com jlarkin at highlandtechnology dot com Precision electronic instrumentation
On Sat, 09 Aug 2014 12:51:23 -0700, John Larkin
<jjlarkin@highNOTlandTHIStechnologyPART.com> wrote:

>On Sat, 09 Aug 2014 12:46:24 -0700, Jim Thompson ><To-Email-Use-The-Envelope-Icon@On-My-Web-Site.com> wrote: > >>On Sat, 09 Aug 2014 12:03:33 -0700, John Larkin >><jjlarkin@highNOTlandTHIStechnologyPART.com> wrote: >> >>> >>> >>>Got a suggestion for making 10/90 risetime measurements in LT Spice? >>> >>>I need to do that a lot, as I tweak other things. I can do it manually on the >>>waveform plot, but that's a nuisance. I have two waveforms of interest, one >>>electrical, the other a simulated optical waveform. >>> >>>I could fake some sort of window comparators, which would at least be a little >>>easier to measure on the plot. Or maybe make some linear ramps that run from 10% >>>to 90% of the waveforms that I care about >>> >>>I want two big red 7-segment LED displays that show the rise times. >> >>Numerically that's done with a .MEAS statement, see >>LTspiceTutorials.zip on the Simulation Tools & Macros Page of my >>website. >> >> ...Jim Thompson > >How would you construct a .MEAS statement to measure a rise time? It's not a >simple calculation. > >Again, I can run a linear ramp to convert rise time to a single voltage. Might >do that.
In PSpice (Probe post-processor) I just click on a macro "measure risetime in this specified x-range"... and the answer pops up. If you want a circuit to measure risetime... you _know_ how to do that
>:-}
...Jim Thompson -- | James E.Thompson | mens | | Analog Innovations | et | | Analog/Mixed-Signal ASIC's and Discrete Systems | manus | | San Tan Valley, AZ 85142 Skype: skypeanalog | | | Voice:(480)460-2350 Fax: Available upon request | Brass Rat | | E-mail Icon at http://www.analog-innovations.com | 1962 | I love to cook with wine. Sometimes I even put it in the food.
On Sat, 09 Aug 2014 13:03:09 -0700, Jim Thompson
<To-Email-Use-The-Envelope-Icon@On-My-Web-Site.com> wrote:

>On Sat, 09 Aug 2014 12:51:23 -0700, John Larkin ><jjlarkin@highNOTlandTHIStechnologyPART.com> wrote: > >>On Sat, 09 Aug 2014 12:46:24 -0700, Jim Thompson >><To-Email-Use-The-Envelope-Icon@On-My-Web-Site.com> wrote: >> >>>On Sat, 09 Aug 2014 12:03:33 -0700, John Larkin >>><jjlarkin@highNOTlandTHIStechnologyPART.com> wrote: >>> >>>> >>>> >>>>Got a suggestion for making 10/90 risetime measurements in LT Spice? >>>> >>>>I need to do that a lot, as I tweak other things. I can do it manually on the >>>>waveform plot, but that's a nuisance. I have two waveforms of interest, one >>>>electrical, the other a simulated optical waveform. >>>> >>>>I could fake some sort of window comparators, which would at least be a little >>>>easier to measure on the plot. Or maybe make some linear ramps that run from 10% >>>>to 90% of the waveforms that I care about >>>> >>>>I want two big red 7-segment LED displays that show the rise times. >>> >>>Numerically that's done with a .MEAS statement, see >>>LTspiceTutorials.zip on the Simulation Tools & Macros Page of my >>>website. >>> >>> ...Jim Thompson >> >>How would you construct a .MEAS statement to measure a rise time? It's not a >>simple calculation. >> >>Again, I can run a linear ramp to convert rise time to a single voltage. Might >>do that. > >In PSpice (Probe post-processor) I just click on a macro "measure >risetime in this specified x-range"... and the answer pops up. > >If you want a circuit to measure risetime... you _know_ how to do that >>:-} > > ...Jim Thompson
It's a cinch that you're not going to tell us. -- John Larkin Highland Technology Inc www.highlandtechnology.com jlarkin at highlandtechnology dot com Precision electronic instrumentation
On Sat, 09 Aug 2014 14:55:46 -0700, John Larkin
<jjlarkin@highNOTlandTHIStechnologyPART.com> wrote:

>On Sat, 09 Aug 2014 13:03:09 -0700, Jim Thompson ><To-Email-Use-The-Envelope-Icon@On-My-Web-Site.com> wrote: > >>On Sat, 09 Aug 2014 12:51:23 -0700, John Larkin >><jjlarkin@highNOTlandTHIStechnologyPART.com> wrote: >> >>>On Sat, 09 Aug 2014 12:46:24 -0700, Jim Thompson >>><To-Email-Use-The-Envelope-Icon@On-My-Web-Site.com> wrote: >>> >>>>On Sat, 09 Aug 2014 12:03:33 -0700, John Larkin >>>><jjlarkin@highNOTlandTHIStechnologyPART.com> wrote: >>>> >>>>> >>>>> >>>>>Got a suggestion for making 10/90 risetime measurements in LT Spice? >>>>> >>>>>I need to do that a lot, as I tweak other things. I can do it manually on the >>>>>waveform plot, but that's a nuisance. I have two waveforms of interest, one >>>>>electrical, the other a simulated optical waveform. >>>>> >>>>>I could fake some sort of window comparators, which would at least be a little >>>>>easier to measure on the plot. Or maybe make some linear ramps that run from 10% >>>>>to 90% of the waveforms that I care about >>>>> >>>>>I want two big red 7-segment LED displays that show the rise times. >>>> >>>>Numerically that's done with a .MEAS statement, see >>>>LTspiceTutorials.zip on the Simulation Tools & Macros Page of my >>>>website. >>>> >>>> ...Jim Thompson >>> >>>How would you construct a .MEAS statement to measure a rise time? It's not a >>>simple calculation. >>> >>>Again, I can run a linear ramp to convert rise time to a single voltage. Might >>>do that. >> >>In PSpice (Probe post-processor) I just click on a macro "measure >>risetime in this specified x-range"... and the answer pops up. >> >>If you want a circuit to measure risetime... you _know_ how to do that >>>:-} >> >> ...Jim Thompson > > >It's a cinch that you're not going to tell us.
I should tell _you_ how to measure risetime? ...Jim Thompson -- | James E.Thompson | mens | | Analog Innovations | et | | Analog/Mixed-Signal ASIC's and Discrete Systems | manus | | San Tan Valley, AZ 85142 Skype: skypeanalog | | | Voice:(480)460-2350 Fax: Available upon request | Brass Rat | | E-mail Icon at http://www.analog-innovations.com | 1962 | I love to cook with wine. Sometimes I even put it in the food.
On Sat, 09 Aug 2014 15:17:37 -0700, Jim Thompson
<To-Email-Use-The-Envelope-Icon@On-My-Web-Site.com> wrote:

>On Sat, 09 Aug 2014 14:55:46 -0700, John Larkin ><jjlarkin@highNOTlandTHIStechnologyPART.com> wrote: > >>On Sat, 09 Aug 2014 13:03:09 -0700, Jim Thompson >><To-Email-Use-The-Envelope-Icon@On-My-Web-Site.com> wrote: >> >>>On Sat, 09 Aug 2014 12:51:23 -0700, John Larkin >>><jjlarkin@highNOTlandTHIStechnologyPART.com> wrote: >>> >>>>On Sat, 09 Aug 2014 12:46:24 -0700, Jim Thompson >>>><To-Email-Use-The-Envelope-Icon@On-My-Web-Site.com> wrote: >>>> >>>>>On Sat, 09 Aug 2014 12:03:33 -0700, John Larkin >>>>><jjlarkin@highNOTlandTHIStechnologyPART.com> wrote: >>>>> >>>>>> >>>>>> >>>>>>Got a suggestion for making 10/90 risetime measurements in LT Spice? >>>>>> >>>>>>I need to do that a lot, as I tweak other things. I can do it manually on the >>>>>>waveform plot, but that's a nuisance. I have two waveforms of interest, one >>>>>>electrical, the other a simulated optical waveform. >>>>>> >>>>>>I could fake some sort of window comparators, which would at least be a little >>>>>>easier to measure on the plot. Or maybe make some linear ramps that run from 10% >>>>>>to 90% of the waveforms that I care about >>>>>> >>>>>>I want two big red 7-segment LED displays that show the rise times. >>>>> >>>>>Numerically that's done with a .MEAS statement, see >>>>>LTspiceTutorials.zip on the Simulation Tools & Macros Page of my >>>>>website. >>>>> >>>>> ...Jim Thompson >>>> >>>>How would you construct a .MEAS statement to measure a rise time? It's not a >>>>simple calculation. >>>> >>>>Again, I can run a linear ramp to convert rise time to a single voltage. Might >>>>do that. >>> >>>In PSpice (Probe post-processor) I just click on a macro "measure >>>risetime in this specified x-range"... and the answer pops up. >>> >>>If you want a circuit to measure risetime... you _know_ how to do that >>>>:-} >>> >>> ...Jim Thompson >> >> >>It's a cinch that you're not going to tell us. > >I should tell _you_ how to measure risetime? > > ...Jim Thompson
The point is to write an expression in LT Spice that computes a rise time. I don't know how to do that. I just did it with a circuit, a current source charging a cap through two series switches, with switch thresholds 0.1 and 0.9 volts, basically a window-comparator+current-source charging a cap. Like any window comparator, it fires again on the falling edge, which is OK in this case. My rise times show up as voltages, 1 volt per ns, I can park the cursor on. -- John Larkin Highland Technology Inc www.highlandtechnology.com jlarkin at highlandtechnology dot com Precision electronic instrumentation
On Sat, 09 Aug 2014 15:46:49 -0700, John Larkin
<jjlarkin@highNOTlandTHIStechnologyPART.com> wrote:

>On Sat, 09 Aug 2014 15:17:37 -0700, Jim Thompson ><To-Email-Use-The-Envelope-Icon@On-My-Web-Site.com> wrote: > >>On Sat, 09 Aug 2014 14:55:46 -0700, John Larkin >><jjlarkin@highNOTlandTHIStechnologyPART.com> wrote: >> >>>On Sat, 09 Aug 2014 13:03:09 -0700, Jim Thompson >>><To-Email-Use-The-Envelope-Icon@On-My-Web-Site.com> wrote: >>> >>>>On Sat, 09 Aug 2014 12:51:23 -0700, John Larkin >>>><jjlarkin@highNOTlandTHIStechnologyPART.com> wrote: >>>> >>>>>On Sat, 09 Aug 2014 12:46:24 -0700, Jim Thompson >>>>><To-Email-Use-The-Envelope-Icon@On-My-Web-Site.com> wrote: >>>>> >>>>>>On Sat, 09 Aug 2014 12:03:33 -0700, John Larkin >>>>>><jjlarkin@highNOTlandTHIStechnologyPART.com> wrote: >>>>>> >>>>>>> >>>>>>> >>>>>>>Got a suggestion for making 10/90 risetime measurements in LT Spice? >>>>>>> >>>>>>>I need to do that a lot, as I tweak other things. I can do it manually on the >>>>>>>waveform plot, but that's a nuisance. I have two waveforms of interest, one >>>>>>>electrical, the other a simulated optical waveform. >>>>>>> >>>>>>>I could fake some sort of window comparators, which would at least be a little >>>>>>>easier to measure on the plot. Or maybe make some linear ramps that run from 10% >>>>>>>to 90% of the waveforms that I care about >>>>>>> >>>>>>>I want two big red 7-segment LED displays that show the rise times. >>>>>> >>>>>>Numerically that's done with a .MEAS statement, see >>>>>>LTspiceTutorials.zip on the Simulation Tools & Macros Page of my >>>>>>website. >>>>>> >>>>>> ...Jim Thompson >>>>> >>>>>How would you construct a .MEAS statement to measure a rise time? It's not a >>>>>simple calculation. >>>>> >>>>>Again, I can run a linear ramp to convert rise time to a single voltage. Might >>>>>do that. >>>> >>>>In PSpice (Probe post-processor) I just click on a macro "measure >>>>risetime in this specified x-range"... and the answer pops up. >>>> >>>>If you want a circuit to measure risetime... you _know_ how to do that >>>>>:-} >>>> >>>> ...Jim Thompson >>> >>> >>>It's a cinch that you're not going to tell us. >> >>I should tell _you_ how to measure risetime? >> >> ...Jim Thompson > >The point is to write an expression in LT Spice that computes a rise time. I >don't know how to do that.
I think I can extract the script that PSpice uses... that would certainly give you a starting place. What does the LTspice .MEAS command actually do?
> >I just did it with a circuit, a current source charging a cap through two series >switches, with switch thresholds 0.1 and 0.9 volts, basically a >window-comparator+current-source charging a cap. Like any window comparator, it >fires again on the falling edge, which is OK in this case. My rise times show up >as voltages, 1 volt per ns, I can park the cursor on.
Sure. Make an ideal peak detect and hold and you don't have to be finicky with the cursor. ...Jim Thompson -- | James E.Thompson | mens | | Analog Innovations | et | | Analog/Mixed-Signal ASIC's and Discrete Systems | manus | | San Tan Valley, AZ 85142 Skype: skypeanalog | | | Voice:(480)460-2350 Fax: Available upon request | Brass Rat | | E-mail Icon at http://www.analog-innovations.com | 1962 | I love to cook with wine. Sometimes I even put it in the food.
On Sat, 09 Aug 2014 12:51:23 -0700, John Larkin
<jjlarkin@highNOTlandTHIStechnologyPART.com> wrote:

>On Sat, 09 Aug 2014 12:46:24 -0700, Jim Thompson ><To-Email-Use-The-Envelope-Icon@On-My-Web-Site.com> wrote: > >>On Sat, 09 Aug 2014 12:03:33 -0700, John Larkin >><jjlarkin@highNOTlandTHIStechnologyPART.com> wrote: >> >>> >>> >>>Got a suggestion for making 10/90 risetime measurements in LT Spice? >>> >>>I need to do that a lot, as I tweak other things. I can do it manually on the >>>waveform plot, but that's a nuisance. I have two waveforms of interest, one >>>electrical, the other a simulated optical waveform. >>> >>>I could fake some sort of window comparators, which would at least be a little >>>easier to measure on the plot. Or maybe make some linear ramps that run from 10% >>>to 90% of the waveforms that I care about >>> >>>I want two big red 7-segment LED displays that show the rise times. >> >>Numerically that's done with a .MEAS statement, see >>LTspiceTutorials.zip on the Simulation Tools & Macros Page of my >>website. >> >> ...Jim Thompson > >How would you construct a .MEAS statement to measure a rise time? It's not a >simple calculation. > >Again, I can run a linear ramp to convert rise time to a single voltage. Might >do that.
What kind of rise-times are you talking, and what kind of accuracy are you looking for? Even behavioral elements can be troublesome if you're pushing toward minimum time-step. ...Jim Thompson -- | James E.Thompson | mens | | Analog Innovations | et | | Analog/Mixed-Signal ASIC's and Discrete Systems | manus | | San Tan Valley, AZ 85142 Skype: skypeanalog | | | Voice:(480)460-2350 Fax: Available upon request | Brass Rat | | E-mail Icon at http://www.analog-innovations.com | 1962 | I love to cook with wine. Sometimes I even put it in the food.
On Sat, 09 Aug 2014 18:12:00 -0700, Jim Thompson
<To-Email-Use-The-Envelope-Icon@On-My-Web-Site.com> wrote:

>On Sat, 09 Aug 2014 12:51:23 -0700, John Larkin ><jjlarkin@highNOTlandTHIStechnologyPART.com> wrote: > >>On Sat, 09 Aug 2014 12:46:24 -0700, Jim Thompson >><To-Email-Use-The-Envelope-Icon@On-My-Web-Site.com> wrote: >> >>>On Sat, 09 Aug 2014 12:03:33 -0700, John Larkin >>><jjlarkin@highNOTlandTHIStechnologyPART.com> wrote: >>> >>>> >>>> >>>>Got a suggestion for making 10/90 risetime measurements in LT Spice? >>>> >>>>I need to do that a lot, as I tweak other things. I can do it manually on the >>>>waveform plot, but that's a nuisance. I have two waveforms of interest, one >>>>electrical, the other a simulated optical waveform. >>>> >>>>I could fake some sort of window comparators, which would at least be a little >>>>easier to measure on the plot. Or maybe make some linear ramps that run from 10% >>>>to 90% of the waveforms that I care about >>>> >>>>I want two big red 7-segment LED displays that show the rise times. >>> >>>Numerically that's done with a .MEAS statement, see >>>LTspiceTutorials.zip on the Simulation Tools & Macros Page of my >>>website. >>> >>> ...Jim Thompson >> >>How would you construct a .MEAS statement to measure a rise time? It's not a >>simple calculation. >> >>Again, I can run a linear ramp to convert rise time to a single voltage. Might >>do that. > >What kind of rise-times are you talking, and what kind of accuracy are >you looking for? Even behavioral elements can be troublesome if >you're pushing toward minimum time-step. > > ...Jim Thompson
2 ns, but that's meaningless. It could be 2 ps or 2 weeks. 1% accuracy is fine, since I'm just tuning for best risetime. -- John Larkin Highland Technology Inc www.highlandtechnology.com jlarkin at highlandtechnology dot com Precision electronic instrumentation