It is currently Wed Aug 05, 2015 4:28 am



Postby ttt_megan » Thu Jun 07, 2012 9:05 pm

"I am confused about how to use the ""TRAN_Measure_Frequency"" component.

I have an oscillator that I am simulating over 20 or so cycles. I would
like to calculate the average frequency over these 20 cycles. This should
be equal to 1/(T21 - T1) where T1 is the time of the first crossing and
T21 is the time of the 21st crossing.

Can TRAN_Measure_Frequency do this for me? It has a parameter ""Rise""
which is explained ""Indicates which occurrence of the rise crossing of the
signal is to be used for the measurement."" But this doesn't make any
sense to me, since you need TWO rising crossings to make a frequency

Re: TRAN_Measure_Frequency

Postby yagon » Thu Jun 07, 2012 9:06 pm

Yes, you can use “TRAN_Measure_Frequency” element to calculate the average frequency over 20 cycles. You can either add the following commands to the T-Spice netlist or adjust the parameters of “TRAN_Measure_Frequency” element to calculate average frequency.

.MEASURE TRAN TRAN_Measure_Frequency_1_Period TRIG V(N_1) VAL='100m' TD='0' cross='1' rise='1' TARG V(N_1) VAL='100m' TD='0' cross='21' rise='21'
.MEASURE TRAN TRAN_Measure_Frequency_1<Hz> PARAM='1.0/TRAN_Measure_Frequency_1_Period*1' ON

Here N_1 is the node name, VAL is the value of the signal at which the trigger or target counter for cross or rise is incremented and the value for the cross or rise indicates which occurrence of trigger or target counter is to be used for measurement. You can also modify the value of SPICE.OUTPUT property for “TRAN_Measure_Frequency” symbol to automatically add the above commands to the T-Spice netist.

Return to Schematic capture with S-Edit, Simulation with T-Spice & Waveform viewing/editing with W-Edit

Who is online

Users browsing this forum: No registered users and 1 guest


Who is online

In total there is 1 user online :: 0 registered, 0 hidden and 1 guest (based on users active over the past 5 minutes)
Most users ever online was 35 on Thu Jan 09, 2014 2:15 am

Users browsing this forum: No registered users and 1 guest

Login Form