Electrical Part
The voltage equations of PMDC are as follows.

where,
is the input armature voltage,
is the armature resistance,
is the armature
inductance,
is the
armature current, and
is the back electromotive force.
The armature winding is connected to the outside terminal. This block is very similar to a shunt connected DC motor. A back electromotive force (BEMF) by magnet, which is generated between the armature terminals, is proportional to the machine speed.

where,
is the voltage (BEMF)
constant,
is the
mechanical angular speed.
The electrical torque, which is developed by PMDC motor, is
proportional to the armature current
.

The torque constant
is equal to the voltage (BEMF)
constant
.
When the machine is in generator mode, the sign of torque is positive. In motor mode, the sign of torque is negative.
•Exclude Rotor
The driving torque
subtracts the viscous friction
of rotor from the electrical torque
.

where,
is the viscous friction gain and
is the viscous friction
offset.
•Include Rotor
The mechanical dynamics of the rotor is governed by the equation

where,
is the inertia of rotor,
is the viscous friction
gain,
is the viscous friction
offset, and
is the load
torque.