How to filter noise of different frequency based on motor power
The "noise" you are measuring appears to be related to the rotor velocity as you indicate this was measured while decelerating &amp; equally it can be see there is a decrease in frequency.

What is unknown is whether that frequency is matched to the rotor velocity or some higher harmonic. Knowing the frequency correlation between the rotor and the "noise" would facilite in narrowing down the source.

If there is a desire to filter this unwanted component the one complication is a desire to filter from 0Hz to n rotor frequency. This rules out a low pass filter.

Two options

AC rejection

Below is an equation to remove the AC component.  It determines the AC component and then subtracts it from the original signal.

\$ reject = x - [ x - \frac{1}{N} \sum_{n=0}^{\infty} x ] \$

The equivalent difference equation for the DC rejection filter is:

\$ y_n = 0.999*(  ( x_n - x_{n-1})+y_{n-1}) \$

As with most filters it is a tradeoff between settling time and rejection capability. The 0.999 factor is the key here. This trades off settling time of rejection. 


Acquire your data. x
Pass through filter. \$ y_n = 0.999*(  ( x_n - x_{n-1})+y_{n-1}) \$
generate the AC rejected version \$reject = x_n - y_n\$


Taking a ramp of data &amp; superimposing on top of it an increasing in frequency AC component of significant amplitude + some random noise. The tradeoff can be seen below.

NOTE if a complete rejection is required but the settling time is unwanted... there are additional digital tricks to help the filter deal with large delta's 

NOTE2: the effectiveness of the 0.9... factor is dependent on the sampling frequency with regards to the signal of interest &amp; unwanted components. The below were done with a Ts of 100us, quite slow







Tracking bandstop filter

If the present speed is known &amp; the harmonic number of the component is equally know, an adaptive bandstop filter can be realised. 

I shall hold off on this suggestion as it is a bit more involved an requires additional infomation