TRAN_Measure_Frequency
TRAN_Measure_Frequency
by ttt_megan » Thu Jun 07, 2012 10: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
measurement.
"
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
measurement.
"
Re: TRAN_Measure_Frequency
by yagon » Thu Jun 07, 2012 10: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.
.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.
2 posts
• Page 1 of 1
Who is online
Users browsing this forum: No registered users and 1 guest
- Board index
- The team • Delete all board cookies • Delete style cookies • All times are UTC - 8 hours [ DST ]