I have a signal that looks more or less like square wave signal with different phases (Like in the picture below). However, the signal fluctuates a lot, we can see in the image below:
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