You seem to be confused about what you want. If you want to decrease the motor speed, but you still want maximum torque, then you must apply full rated electrical power to the motor, and put a mechanical brake on the motor until it slows to the speed you desire. Or, you must somehow make your motor less efficient. I don't think that's what you want.

Think of it this way: electrical power is the product of current \$I\$ and voltage \$E\$:

$$ P = I E $$

Mechanical power is the product of torque (\$\tau\$, in newton-meters) in and angular velocity (\$\omega\$, in radians per second):

$$ P = \tau \omega $$

A motor is an electrical to mechanical power converter. The mechanical power always equals the electrical power after losses.

Furthermore, current is proportional to torque, because the more current you apply, the stronger the magnetic field inside the motor, and the attraction between the motor's poles becomes greater.

If the mechanical and electrical powers are correlated, as are the current and torque, then voltage and speed must be, also. And they are, because the faster the rotor spins through the stator field, the greater back-emf it will generate. This is Faraday's law of induction.

So, if you want to decrease speed, decrease voltage. If you want to decrease torque, decrease current. If you increase torque (say by putting a brake on the motor), you are increasing motor torque. But if you don't change the supply of electrical power, then the mechanical power also won't change. If torque increased, the only way to keep mechanical power constant is to decrease speed, so the motor slows down.

There is one kink here: as torque goes up, current goes up. The resistive losses in the motor also go up, because the windings have some resistance, and those resistive losses are proportional to the square of the current:

$$ P = R I^2 $$

So, as current goes up, the resistive losses increase, making the motor a less efficient converter of electrical energy to mechanical energy, because some of that electrical energy is now creating heat. If you stall the motor, then the motor reaches 0% efficiency: speed is zero, so mechanical power must be zero, but the motor is drawing a ton of current, and there is a voltage drop over the winding resistance, so electrical power is very high.

Interesting fact: if you can make a motor with no winding resistance (or other losses), and you connect it to a perfect voltage source, then the speed regulation (how much speed changes with torque) is perfect. That is, the motor won't slow down if you try to stop it: it will just draw exactly enough more current from your battery to keep spinning at the same speed, no matter what.

PWM is all irrelevant to this. PWM motor control is just a way to efficiently apply less than the full battery voltage to the motor. It works because a PWM driven motor is equivalent to a buck converter. Changing your PWM duty cycle is equivalent to changing your supply voltage:

The maximum torque you could have (which you will get when the motor is stalled) is limited by the current your power supply can supply and the losses in the motor, just as it is without PWM. Your PWM driver might add a bit of resistance to the circuit, reducing the current and torque a bit, but usually this isn't significant compared to the resistance of the motor windings.

## Best Answer

The "noise" you are measuring appears to be related to the rotor velocity as you indicate this was measured while decelerating & 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 rejectionBelow 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.

Taking a ramp of data & 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 & unwanted components. The below were done with a Ts of 100us, quite slow

Tracking bandstop filterIf the present speed is known & 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