I’m looking for help to find a robust technique to remove a once per revolution variation in some vehicle test data. The data is collected by driving a vehicle around a circular path at increasing speed whilst measuring, amongst other things, roll angle and lateral acceleration. Due to the slight tilt in the track surface, the roll data contains a once per revolution variation due to gravity, as per the following image:

enter image description here

From the other measurements made it is easy enough to replot this against ‘circles’ and more easily see the periodicity in the data:

enter image description here

Despite the apparently obvious variation at 1 cycle/circle, I am having great difficulty finding a method of removing it that isn’t super sensitive to small changes in the data or method.

Firstly, I generated replacement circle data so that it was equispaced and then mapped the roll angle data to it. I then used our proprietary analysis software to calculate an FFT and construct a cosine wave with the amplitude and phase at 1 cycle/circle. This cosine wave was then subtracted from the data. Remarkably, it worked very well – but only once. I found it not at all repeatable on other files and extremely sensitive to anything that changed the data even slightly. I tried various numbers of data points in the generated and mapped data sets to see how well the FFT performed. These ranged from using the same number of points as the original data (over 10k) to just a handful per circle. Every FFT was sufficiently different to prevent it being usable.

I’ve also tried a discrete Fourier transform method (in Excel), which has been successful in the past for other applications. This uses the following process, where $x$ is the circle data and $y$ is the roll data:

  • Calculate $y \cdot cos(2πx)$
  • Calculate $y \cdot sin(2πx)$
  • Sum the values in step 1
  • Sum the values in step 2
  • Calculate $A$ by multiplying the sum from step 3 by 2/N, where N is the number of data points in each channel
  • Calculate $B$ by multiplying the sum from step 4 by 2/N
  • Calculate the amplitude using $√(A^2+B^2)$
  • Calculate the phase using $atan2(-B,A)$ [note that in Excel atan2 uses (adjacent, opposite)]
  • Construct a cosine wave using the amplitude and phase and subtract it from the data

The results from this method also seem variable, for example in the following image where the phase is about right but the amplitude is a bit less than half that necessary to remove the variation.

enter image description here

I’ve also tried removing the linear trend from the data first before mapping and calculating the transform but again the results are not robust. I’ve also applied a third order fit to the data and removed that before following the rest of the process. Sometimes the discrete transform produces a result that is so far from the variation seen by the eye that I’m beginning to wonder if there’s something not right in the way I’m applying the method. Here, for example, is the same data from all the previous images but with the third order fit removed and the DFT method used. The constructed cosine wave has approximately the right amplitude but this time the phase is almost 180 degrees out.

enter image description here

I’d be grateful for any guidance on either improving the reliability of the methods I’ve tried or ideas for alternative procedures.


  • $\begingroup$ Have you tried simply using a high-pass with low cut-off to your signal? $\endgroup$
    – Jdip
    Sep 22, 2022 at 14:18
  • $\begingroup$ Can you use a band-reject (or notch) filter on your dataset with a cutoff frequency at the rotation rate? $\endgroup$
    – FooAnon
    Sep 22, 2022 at 18:32
  • $\begingroup$ Thanks for the comments. I tried using filters but they don't seem precise enough. That is to say, I can't precisely remove the variation without causing other undesirable effects. I am also concerned that the lack of frequency resolution in the first technique using an FFT means that the phase may be sufficiently inaccurate as to make it ineffective. Perhaps a best fit algorithm might be more successful... $\endgroup$ Sep 23, 2022 at 1:29
  • $\begingroup$ I would presume that at least part of the problem with the robustness is that the data is not entirely periodic. The underlying trend is broadly linear and so there must be content in there that is also at 1 cycle/circle and so affecting the transform results. I therefore assume that if the transform is to work then some significant conditioning of the data is required beforehand. $\endgroup$ Sep 23, 2022 at 8:04
  • $\begingroup$ So you have a variable speed hardware system that you are trying to extract some information from? Personally, I would consider it a hard problem since hardware systems sometimes have subharmonics and amplitudes that vary; which are a pain. Can you establish a feedback path operating on the "roll" sensor? This would keep the roll stable (up to controllable limits). The problems you have and error residues should give you insight. Why not put up a link to raw data, then others can do things to it? Like a 3d cylinder plot? And what data/output do you really want? $\endgroup$
    – rrogers
    Sep 27, 2022 at 20:57


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.