It looks like your signal is sine-like, but not a single frequency. If this is typical, then you could begin by making assumptions about the range of frequencies it will contain, do an FFT, and then pick the channel that has the most energy in that band by summing the magnitudes of the frequency bins in that range. You might also want to set a threshold for ...
Why not just take the FFT and see which one has the highest peak?
The code below generates example data:
and then takes the FFT of it:
X sum: 0.9999999999999987 Y sum:0.9999999999999994 Z sum:0.9999999999999989
X max: 0.17213933316891214 Y max:0.2080419608439683 Z max:0.7112824350827284
Depending on your data, that might be enough to pick the ...
Is it sufficient to identify the «most sinuoidal» of those 3, or would you also want linear projections of those (consistent with a IMU sensor tilted vs the plane of motion)?
A simple solution might be to do a windowed fft and pick the direction where the «crest factor» of the fft magnitude was largest (best explained by a single sinoid).
It appears ...