### The Principle of PWM Control of Motor Speed

Author : Mark Markus | Published On : 28 Mar 2024

The commonly used principle of brushless DC motors is electromagnetism: an energized wire produces a magnetic field.

That is, the electromagnetic induction rotating magnetic field drives the rotor to rotate.

The motor is composed of a stator and a rotor. One produces a rotating magnetic field, the other is a magnetic pole, and the rotor (bearing) of the motor rotates.

This realizes the conversion of electrical energy -> magnetic energy -> mechanical energy.

The following picture can be understood more intuitively:

• PWM principle

We know that controlling the motor speed through PWM is actually achieved by controlling the size of the power supply current.

The force exerted by a current-carrying wire in a magnetic field is called Ampere's force, and the formula of Ampere's force is: F=BIL.

Among them, F is the force, I is the current, and L is the length of the wire. When other conditions remain unchanged, controlling the current passing through it is to control the size of the ampere force.

The resistance R of the motor is basically unchanged, then the current I = U/R, F= BLU/R.

When R B L remains unchanged, controlling the magnitude of the ampere force is essentially to modify the supply voltage.

We also know that the essence of controlling the motor speed is to provide different power supply voltages to the motor. The greater the voltage, the faster the motor speed.

The essence of PWM is pulse width modulation, which converts DC voltage into analog signals with different voltage values by outputting different duty cycles.

• Control motor speed

The duty cycle can adjust the motor speed. We know that the duty cycle is the ratio of the high level in a cycle. The greater the ratio of the high level, the greater the duty cycle. For DC motors Generally speaking, the motor can rotate when the output pin of the motor is at a high level. When the output pin is at a high level, the motor will rotate, but the speed is increased bit by bit. When the high level suddenly turns to a low level, the motor will rotate due to the inductance. It has the function of preventing sudden changes in current and will not stop, but will maintain the original speed. In this way, the speed of the motor is the average voltage value output during the cycle, so in essence, our speed regulation is to keep the motor in a state, like Stop but not stop, like a state of full speed rotation but not full speed rotation, then the average speed in a cycle is the speed adjusted by our duty cycle.

• Summarize

In motor control, the greater the voltage, the faster the motor speed. By outputting different analog voltages through PWM, the motor can reach different output speeds.

Of course, in motor control, different motors have their own adapted frequencies. If the frequency is too low, the movement will be unstable. If the frequency is just within the hearing range of the human ear, sometimes a whistling sound will be heard. A motor with too high frequency may not be able to respond. The normal motor frequency is between 6-16kHz.

The output voltage is different, and the motor speed is different. Then we can know that motor speed regulation can be achieved by sliding a rheostat or changing a power supply with a different voltage, but in practical applications PWM is obviously more convenient.