# DC Motor

## Basic Modeling of a DC motor

A DC brushed motor may be modeled as a mechanical second-order system and an electrical first-order system. The equation for the rotational acceleration of the motor with the motor torque, a viscous friction, and a static friction, may be defined as:

${\displaystyle {\ddot {\theta }}={\frac {1}{J}}(\tau _{m}-B_{v}{\dot {\theta }}-F_{s}sign({\dot {\theta }}))}$

Where the motor torque is defined by the current and motor constant as:

${\displaystyle \tau _{m}=K_{a}i_{a}}$

The derivative of the current in the motor is a function of the input voltage, the motor back-electromotive force, and the resistance of the motor coils as:

${\displaystyle {\dot {i}}_{a}={\frac {1}{L}}(u_{a}-e_{a}-R_{a}i_{a})}$

Where the back-emf is defined by the angular velocity and the motor constant as:

${\displaystyle e_{a}=K_{a}{\dot {\theta }}}$

## Identification of DC motor Parameters

As Motors do not always come with datasheets with exact parameters, the specific details of a motor often need to be measured.

### Motor Coil Resistance

Voltage divider used to measure motor coil resistance.

The motor coil resistance can most easily be measured through use of a multimeter. Alternatively, if testing the resistance with a microcontroller, a known resistor can be used to create a voltage divider, the voltage drop over which may be used to determine the coil resistance. This measurement, if the current is not kept low through a high resistance, or a low input voltage, will require the motor to be manually stalled in order for the back-emf to not skew the measurement.

${\displaystyle R_{a}={\frac {R_{1}V_{in}}{V1}}-R_{1}}$