Breaking up a signal with irregular breaks in between into datasets

2 views (last 30 days)
Hi everyone,
I have a large collection of data obtained from measurements of a sinusoidal signal, in this case a AC voltage. The signal is generated by a setup that is switched on/off by hand. I've measured six cycles 30-second cycles with 30-second pauses in between. During the break, the signal is switched off but recording continues. However, both the signal and break contain noise and timing was done by hand, making both the sines and breaks have irregular intervals. The samplerate is constant throughout the entire measurement though. See the attached image for clarification.
However, these cycles and pauses were recorded in one measurement and now I want to split the cycles (i.e. remove the pauses) for analysis. However, the periods were timed by hand and thus vary in length. I wanted to automate this, but I have difficulties finding out how since the intervals are irregular.
I could always do everything by hand by inspecting each graph with the data cursor, but this would be very time-consuming. Is there a way to automatically process this analysis, perhaps by fitting a sinusoid over the signal, a linear curve over the break, and superimpose those curves? Or does anyone know a way to at least speed up the manual work?
P.S: I've posted the data for one cycle preceded and followed by a short break on Pastebin as an example.
P.P.S: A proposed solution: 1. Set all data in range 'minimum value of signal during break' to 'maximum value of signal during break' to NaN (or remove data points entirely) 2. Interpolate sinusoid to fill gaps 3. Resulting in sinusoids with empty in between, and empty space is easier to work with?

Answers (0)

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!