# Maximum switching speed of a motor

If I have a MOSFET (or a number of paralleled MOSFETs) driving a motor, what determines the maximum bandwidth (PWM frequency) at which I can excite a motor phase?

Is this only a function of the total gate capacitance of the MOSFETs and the current rating of the MOSFET driver, or are there other factors that will be at play here?

There are several factors that you must trade off to decide on a switching speed.

1. Motor vibrating. You want to switch fast enough so that the mechanical inertia of the motor low pass filters the individual switching pulses so that the motion and torque are the average, not the individual pulses.

2. Coils whining. Each bit of wire in the motor windings experience mechanical force. It is rare that the windings are potted, so they can usually move at least a little bit. If you hit the right frequency they can vibrate and make a annoying audible whine. It's also not good for the wires and things they are rubbing against.

3. Switching losses. Nothing switches off-on or on-off instantly. The switch transistor will take a fixed amount of time transitioning from one state to the other. During that time it is partially on and is dissipating much more power then when fully on or fully off. Since the switch transition takes a fixed time, it is a larger fraction of the total time as the switching frequency is increased.

4. Output capacitive transients. Motors are physically big and have some finite capacitance accross their leads. In some cases deliberate snubbers may be added. Each time the switch changes state a finite charge is transfered to or from this capacitance. The more often this happens, the higher the effective current drawn by the capacitance.

5. Gate drive current. As you mentioned, FETs can have substantial effective gate capacitance. This gets charged and discharged once per switching cycle, and therefore represents a average current. This current is directly proportional to switching frequency.

6. Diode switching losses. The inductive kickback catch diode does not instantly stop conducting when it is reverse biased. It leaks substantially for a little while until it goes high impedance. This is called the reverse recovery time. This backwards flow of current thru the diode can be substantial, although generally short. It represents a fixed amount of charge wasted once per switching cycle, so is effectively a current proportional to switching frequency. At low voltages (10s of Volts, up to maybe 100V) Schottky diodes are available. These have nearly instant reverse times for most purposes. However, if the motor is being driven by higher voltage or there are other reasons a Schottky can't be used, then this is a serious issue that needs to be taken into account.
Only you can look at your motor, how much you're willing to spend on the drive electronics, how efficient it needs to be, where this will be used, and a number of other factors to weigh the issues above.

A lot of motors get run around 30 kHz, just above the human audible limit. That may piss off all the dogs and bats in the neighborhood, but you'll just hear a smoothly running motor.