🤖 Week 7, Day 2: DC Motors and Servo Motors

Theme: Actuators & Drive Systems
Topic: DC Motors and Servo Motors
Learning Goal: Understand DC motor physics, servo control loops, and how feedback systems enable precise positioning.


Introduction

DC motors and servo motors power the majority of robotic joints — from 3D printer extruders to humanoid hip actuators. Today we’ll explore the physics that makes them work, the control systems that make them precise, and the practical considerations that make them reliable.


DC Motor Fundamentals

The Physics: Lorentz Force

A DC motor converts electrical energy to mechanical rotation through the Lorentz force:

F = I × L × B

Where:

The torque produced is:

τ = K_t × I

Where K_t is the torque constant (Nm/A), a motor-specific parameter determined by magnet strength and coil geometry.

The Back-EMF Effect

As the motor spins, it acts as a generator, producing a voltage that opposes the applied voltage:

V_back = K_e × ω

Where:

Key insight: K_t ≈ K_e (same physical constant, different units). This is why high-torque motors (large K_t) also have high back-EMF — they require higher voltage to reach high speeds.

The Complete DC Motor Equation

V_applied = R × I + L × (dI/dt) + K_e × ω

Where:

Mechanical Dynamics

τ = J × (dω/dt) + b × ω + τ_load

Where:

The mechanical time constant: τ_m = J/b (typically 10-100 ms)


Motor Characteristics

Speed-Torque Curve

The fundamental operating characteristic of a DC motor:

ω = (V_applied / K_e) - (R / K_t × K_e) × τ

At stall (ω = 0): Maximum torque, maximum current

τ_stall = K_t × V / R
I_stall = V / R

At no-load (τ = 0): Maximum speed

ω_no_load = V / K_e

Efficiency

η = (Mechanical Power Out) / (Electrical Power In)
  = (τ × ω) / (V × I)

Maximum efficiency typically occurs at ~80-90% of no-load speed and ~10-20% of stall torque.


From DC Motor to Servo Motor

A servo motor is not a different motor type — it’s a DC motor (usually brushless) with three critical additions:

1. Gearbox 🔧

Purpose: Trade speed for torque

τ_output = τ_motor × N × η_gearbox
ω_output = ω_motor / N

Where:

Types:

2. Position Encoder 📏

Purpose: Measure actual joint position for closed-loop control

Types:

Key specification: Encoder resolution directly determines minimum detectable movement:

θ_min = 360° / CPR  (for incremental)
θ_min = 360° / 2^bits  (for absolute)

3. Motor Controller 🎛️

Purpose: Close the loop between commanded and actual position

The servo control loop runs at 1-10 kHz and implements:


The Servo Control Loop

Three Nested Loops

Modern servo drives implement three nested control loops:

Position Loop (outer, 1-2 kHz)
    ↓ outputs velocity command
Velocity Loop (middle, 5-10 kHz)
    ↓ outputs current/torque command
Current Loop (inner, 10-20 kHz)
    ↓ outputs PWM to motor

Position Loop (P or PID)

e = θ_commanded - θ_actual
τ_command = K_p × e + K_i × ∫e dt + K_d × (de/dt)

Tuning considerations:

Velocity Loop (PI)

e_v = ω_commanded - ω_actual
I_command = K_pv × e_v + K_iv × ∫e_v dt

The velocity loop is critical for smooth motion — the position loop commands desired velocity, and the velocity loop ensures the motor tracks it.

Current Loop (PI)

e_i = I_commanded - I_actual
V_motor = K_pi × e_i + K_ii × ∫e_i dt

The current loop protects the motor from overcurrent and implements torque control (since τ ∝ I).


Control Performance Metrics

1. Step Response

When commanding a sudden position change, measure:

2. Frequency Response

3. Tracking Error

For trajectory following, the servo should maintain:

|θ_commanded(t) - θ_actual(t)| < ε_max

Where ε_max depends on application (0.1mm for CNC, 1mm for pick-and-place).


Practical Considerations

Thermal Management

Motor windings heat up according to:

P_heat = I² × R
T_winding = T_ambient + P_heat × R_th

Where R_th is thermal resistance (°C/W). Exceeding the maximum winding temperature (typically 120-155°C) permanently damages insulation.

Solutions:

Gearbox Backlash

Backlash (lost motion when reversing direction) causes:

Mitigation:

Cogging Torque

Permanent magnet motors exhibit cogging — periodic torque ripple at low speeds caused by attraction between rotor magnets and stator teeth:

τ_cogging = Σ A_n × sin(n × N_pp × θ)

Where N_pp is the number of pole pairs.

Impact: Causes velocity ripple, audible noise, and positioning errors at low speeds.

Mitigation:


Motor Selection Example

Application: 6-DOF robot arm, elbow joint

Selection process:

  1. Torque: With 2× safety margin, need τ_motor × N × η > 49 Nm

    • Choose motor: τ_stall = 0.8 Nm, K_t = 0.16 Nm/A
    • Gear ratio: N = 100:1, η = 0.8
    • Output torque: 0.8 × 100 × 0.8 = 64 Nm ✓
  2. Speed: ω_motor = ω_output × N = π × 100 = 314 rad/s ≈ 3000 RPM

    • Motor V = 24V, K_e = 0.016 V·s/rad
    • Required V: V = I×R + K_e×ω = 2×1.5 + 0.016×314 = 3 + 5 = 8V
    • 24V supply provides margin ✓
  3. Precision: θ_min = 360° / (100 × 1000 CPR) = 0.0036°

    • Well within ±0.1° requirement ✓

Summary

Key PointTakeaway
DC motor physicsτ = K_t × I; back-EMF limits speed at given voltage
Servo = DC motor + gearbox + encoder + controllerThe combination enables precise closed-loop positioning
Three nested loopsPosition → Velocity → Current, each with specific bandwidth
Thermal and mechanical limitsI²R heating, backlash, cogging — practical constraints on performance
Selection processTorque, speed, precision — verify all three with safety margins

Further Reading


Tomorrow (Day 3): Stepper Motors and Brushless DC Motors — open-loop precision and high-efficiency drives.