10-08-2018 04:55 PM
I would like to know a way to measure the time period of a burst of signal, cycle off time and cycle on time, as shown in the picture.
10-08-2018 05:22 PM
Quick thoughts off the top of my head:
1. Plan to iterate through your array of data, maybe with an auto-indexed For Loop.
2. Establish criteria for how you identify:
3. Now iterate over your data and identify all the indices where these transitions occur
4. Knowing the sample rate, you can now calculate your times
-Kevin P
10-08-2018 07:12 PM - edited 10-08-2018 07:15 PM
Kudos
Subtract red plot from blue. Normalize the sum. Stuff a low pass filter (like pt by pt mean at some period 2 x or better of the prr) and threshold that with greater than. Bool to 0,1 x2, -- sign that result then invert compare each to 0 sum arraysui add the sums and divide by one of the sums and duty cycle is the output.
Simple and RG thread worthy! Next?
Sorry, but it does it...just like Kp said!
10-08-2018 07:50 PM
I am having hard time to define threshold because, i cannot define as amplitude as needed to include the values inbetween, so it is becoming on/off and then off for long time . So need to differentiate between on/off and the long off. Hope it makes sense.
10-08-2018 09:40 PM
I'm sorry, I should apologize for intentionally being unclear.
I was teasing another poster whom I respect and hoped for a better outcome than confusing you. Again, I will try to make my advice more clear to you.
Way long ago in hardware the common approach was to use a crystal detector to gong an envelope of signal power. Pulsed high frequency input in...envelope out.. just like you want...
A rectifier and a low pass filter! Or a diode with some ignorant capacitance.. take a running average of the input signal .. while the pulses are there the average amplitude will be higher than while the noise only is present.
We could find the exact threshold if we knew more about the signal to noise ratio of the input..
What is the application? Radar, Fsk, dial tone for telephony? ... what details could you provide about the intelligence in the signal?