Field Study — Control Systems

PID Controller Tuning for DC Motor Speed Control Using PSO and ACO

Two swarm-intelligence algorithms — particle swarm and ant colony — pitted against classical Routh–Hurwitz tuning to control the speed of a separately excited DC motor.

PID Tuning Particle Swarm Optimization Ant Colony Optimization MATLAB & Simulink
PLANT: DC MOTOR TOOL: MATLAB/SIMULINK DISTURBANCE: T=10S
01 — The Problem

A fixed-gain controller isn't good enough

The DC motor's speed loop was first closed with a PID controller whose gains were chosen using the conventional Routh–Hurwitz criterion — picking values that merely satisfy a stability inequality, not ones tuned to minimize error, overshoot, or settling time.

Kp = 2Proportional
Ki = 15Integral
Kd = 0.01Derivative
0.2680 p.u.Overshoot
0.5690 sSettling
**Gains satisfy a stability bound, not a performance target.
**Large overshoot when a load-torque disturbance hits at t = 10s.
**Slow to settle back to the reference speed afterward.

So the tuning problem was reframed as an optimization task — minimize overshoot and settling time directly — and handed to two swarm-intelligence algorithms.

02 — Method

Borrowing from birds and ants

Each algorithm searches the same three-dimensional space of gains — Kp, Ki, and Kd — but explores it the way its namesake swarm does.

Job: PSOStatus: Run

Particle Swarm

Modeled on bird flocking and fish schooling. Each candidate gain-set is a "particle" that remembers its own best result (pbest) and is pulled toward the swarm's best (gbest) at every step.

  • Population size 10
  • Dimensions 3 (Kp, Ki, Kd)
  • Max iterations 300
  • Inertia weight 0.9 → 0.4
  • Acceleration C1 0.7, C2 0.5
Job: ACOStatus: Run

Ant Colony

Modeled on ant foraging. Each "ant" walks a candidate solution and deposits pheromone in proportion to how good it is — over time the colony's trail converges on the shortest path to the optimum.

  • Ant population 20
  • Evaporation constant 0.4
  • Initial pheromone 0.0
  • Visibility factor 1.0
  • Visibility enhancement 1.0
03 — Results

Three tuning methods, one plant

Each method was run against the same DC motor model in Simulink, with an identical load-torque disturbance at t = 10s.

Controller gains and step response, by tuning method
MethodKpKiKdOvershootSettling time
Conventional (Routh–Hurwitz)2.0015.000.010.2680 p.u.0.5690 s
PSO-tuned15.0631.580.680.000 p.u.0.0460 s
ACO-tuned4.859.300.530.000 p.u.1.4545 s

Both swarm methods eliminate overshoot entirely; the gap between them shows up in how quickly the speed settles back to reference.

04 — Comparison

PSO reaches the optimum faster

Table 6.1 — PSO vs. ACO, computational characteristics
MetricPSOACO
Iterations to reach objective57120
Objective function value at 250 iterations0.0703610.708562
Overshoot0.000 p.u.0.000 p.u.
Settling time0.0460 s1.4545 s

Both algorithms converge to a near-zero overshoot, but PSO gets there in roughly half the iterations and settles about thirty times faster than the ant colony method — at comparable computational cost.

05 — Conclusion

Verdict: particle swarm optimization

Both PSO and ACO reach near-optimal gains with far less trial-and-error than the conventional method, and both hold up cleanly through the load-torque disturbance. But for this plant, particle swarm optimization converges faster, needs fewer iterations, and yields the tighter dynamic response — the better tool for the job.

PID Tuning Particle Swarm Optimization Ant Colony Optimization MATLAB & Simulink
End Of Report — Best-Performing Method
Particle Swarm Optimization
0.0460 s settling · 0.000 p.u. overshoot
01 / 06