0
$\begingroup$

I have a signal that looks more or less like square wave signal with different phases (Like in the picture below). enter image description here However, the signal fluctuates a lot, we can see in the image below: enter image description here

At first, I want to detect the beginning and ending of the signal. Second, I want to detect the start and the end of the ups and downs.

Is there a simple way to do it? I am new to signal processing domain

I am using pyspark since I have a lot of data, but any help on how to start is welcomed.

Thank you

$\endgroup$
4
  • $\begingroup$ why not take an average of a suitable period? Say the x-axis in your image represents seconds, take an average over 400 seconds. On the flat regions, the average will be solid. On the transition regions, it will be somewhere in the middle. In any case, you need to better define your question. What exactly are you looking for? rise and fall edges? Is this a periodical signal? If so, what is the period? If not, where does it start and where does it end? Is the flactuation a falling\rising edge or do we ignore it? Answering these questions may already promote you to your solution. $\endgroup$
    – havakok
    Apr 15, 2019 at 11:27
  • $\begingroup$ Hi Yasmine, and welcome to DSP.SE. Regarding your second question, probably using a threshold of, e.g., 1000 may be a good first approach. $\endgroup$
    – applesoup
    Apr 15, 2019 at 11:28
  • 1
    $\begingroup$ problems like yours are usually solved by a set of heuristics specific to your situation. those heuristics come from trial and error $\endgroup$
    – user28715
    Apr 15, 2019 at 14:10
  • $\begingroup$ Thank you all for your answers, I was able to detect the beginning and the ending of the signal. And that's by checking the non null derivative and the amplitude. $\endgroup$
    – Yasmine
    Apr 17, 2019 at 13:13

0

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Browse other questions tagged or ask your own question.