| name | servo-control |
| description | Servo control system design — PID tuning (Ziegler-Nichols, IMC, pole placement), cascade control (inner velocity/outer position loop), feedforward, velocity and current loops, servo motor selection (torque-speed curve, back-EMF, BEMF constant), encoder feedback (resolution, velocity estimation), bandwidth, settling time, position error, friction compensation, cogging, and notch filters for resonance. |
| metadata | {"priority":7,"promptSignals":{"phrases":["servo control","servo motor","servo loop","position control","velocity loop","servo tuning"],"minScore":3}} |
Servo Control System Design — Complete Skill
Servo System Architecture
Cascade Control Structure
Three-loop cascade (typical machine tool / robotics):
- Current loop (torque loop): innermost; bandwidth 1–10 kHz; controls motor current/torque
- Velocity loop: middle; bandwidth 100–2,000 Hz; controls angular velocity
- Position loop: outermost; bandwidth 10–200 Hz; controls shaft position
Loop bandwidth hierarchy:
ω_current >> ω_velocity >> ω_position (factor of 5–10× between loops)
Position loop cannot exceed ~1/3 velocity loop bandwidth (stability constraint)
Example: current = 5,000 Hz; velocity = 1,000 Hz; position = 200 Hz
Inner loop saturation:
Current loop limits peak torque = I_peak × K_T (motor torque constant)
Velocity loop limits peak acceleration = T_peak / J_load
Position loop tracks within limits set by inner loops
Motor Model and Transfer Functions
DC/BLDC Motor Electrical Model
Armature circuit:
V_a = L_a × (dI_a/dt) + R_a × I_a + K_e × ω [V; L_a = inductance; R_a = resistance; K_e = back-EMF constant]
Torque equation:
T_motor = K_T × I_a [K_T = torque constant ≈ K_e for SI units (V·s/rad)]
Mechanical equation:
J_total × dω/dt = T_motor - T_friction - T_load [J_total = motor + load inertia referred to motor shaft]
Transfer function (electrical time constant τ_e = L_a/R_a << mechanical; neglect L_a):
ω(s)/V_a(s) = K_T / (J_total × R_a) × 1 / (s + (K_T × K_e + B×R_a)/(J_total × R_a))
≈ K_m / (τ_m × s + 1) [motor gain K_m; mechanical time constant τ_m = J_total × R_a/(K_T × K_e)]
Numerical example:
K_T = 0.5 N·m/A; K_e = 0.5 V·s/rad; R_a = 2 Ω; J_total = 0.001 kg·m²; B = 0.001 N·m·s/rad
τ_m = 0.001 × 2 / (0.5 × 0.5) = 0.008 s; K_m = 0.5/(0.5×0.5) = 2 (rad/s)/V
Current Loop Design
PI Controller in Current Loop
Plant (electrical): G_I(s) = 1/(L_a × s + R_a) [current to voltage]
PI controller: C_I(s) = K_pI × (1 + 1/(τ_I × s)) = K_pI × (τ_I × s + 1)/(τ_I × s)
Zero-pole cancellation (common tuning):
Set τ_I = L_a/R_a = τ_e [cancels motor electrical pole]
Then closed-loop: T_I(s) = ω_cI / (s + ω_cI) [ω_cI = K_pI/(L_a); first-order response]
Choose ω_cI = 2π × f_c_current (desired current bandwidth)
Practical values:
f_c_current = 1,000–5,000 Hz (switching frequency limits practical bandwidth)
K_pI = ω_cI × L_a; τ_I = L_a/R_a
Velocity Loop Design
PI Controller (Velocity)
Plant (after current loop): G_vel(s) ≈ K_T / (J_total × s) [integrator; torque → speed]
PI controller: C_vel(s) = K_pV × (1 + 1/(τ_V × s))
Open-loop transfer function:
L_vel(s) = K_pV × K_T / J_total × (τ_V × s + 1)/(τ_V × s²)
Loop gain crossover: set ω_c_vel where |L_vel(jω)| = 1
For stability, set τ_V = 4/ω_c_vel (gives phase margin ≈ 65°)
K_pV = ω_c_vel × J_total / K_T
Velocity observer (instead of discrete differentiation):
Luenberger: [ω̂_dot; d̂_dot] = A×[ω̂;d̂] + B×I_a + L×(ω_meas - ω̂)
Observer bandwidth 5–10× velocity loop bandwidth
Encoder-based velocity estimation:
Δω = Δθ / Δt [from encoder count change; noisy at low speed]
Better: M/T method — count pulses over fixed time; measure time over fixed pulses
Resolution: 1 count/T_sample; minimum detectable velocity = (1 count)/(encoder resolution × T_sample)
Position Loop Design
P or PD Controller
Plant (after velocity loop): G_pos(s) ≈ 1/s [integrator; speed → position]
P controller: C_pos(s) = K_pp
Open-loop: L_pos(s) = K_pp / s
Phase margin = 90° for P only — always stable but steady-state position error with velocity demand
Crossover: ω_c_pos = K_pp (rad/s) → position bandwidth f_BW = K_pp/(2π)
PD with velocity feedforward:
C_pos(s) = K_pp + K_dp × s [improves phase margin; reduces position lag]
Alternatively: feedforward V_ff = ω_ref (reference velocity) fed directly to velocity loop
Position error at constant velocity: e_ss = v / K_pp [m or rad; reduce by increasing K_pp]
Tracking error:
For constant acceleration a: e_acc = a / (K_pp × K_pV × K_T/J_total) [m/rad]
Servo Motor Selection
Torque-Speed Curve
DC servo motor regions:
- Continuous torque: T_cont at rated speed ω_rated; defines thermal limit (RMS torque)
- Peak torque: T_peak = 2–4 × T_cont (short duration only; current-limited)
- Speed-torque knee: T × ω = const (field weakening for PM BLDC above base speed)
Back-EMF limit:
V_bus = K_e × ω_max + I × R_a → ω_max = (V_bus - I_rated × R_a) / K_e
Verify supply voltage adequate for maximum speed at rated torque
Torque requirements:
T_accel = J_total × α_max + T_friction + T_gravity [N·m; α = angular acceleration]
J_total = J_motor + J_load/n² + J_coupling [n = gear ratio; reflected load inertia]
Inertia matching:
Optimal: J_load/n² = J_motor (equal inertia matching)
Ratio: J_load/(J_motor × n²) = 1–5 (acceptable); >10 may limit achievable bandwidth
RMS torque (thermal sizing):
T_rms = √(Σ T_i² × t_i / t_cycle) ≤ T_continuous [duty cycle calculation]
Motor Sizing Example
Axis spec: m_load = 50 kg, v_max = 1 m/s, a_max = 10 m/s², rack-pinion (r = 0.05 m), n_gearbox = 1
J_load = m × r² = 50 × 0.05² = 0.125 kg·m²
T_accel = J_load × α_max = 0.125 × (10/0.05) = 25 N·m [α = a/r = 10/0.05 = 200 rad/s²]
ω_max = v_max/r = 1/0.05 = 20 rad/s = 191 RPM
Select motor: T_peak ≥ 25 N·m; ω_rated ≥ 20 rad/s; J_motor ≈ J_load/5 = 0.025 kg·m²
Advanced Compensation
Feedforward Control
Velocity feedforward:
u_ff_vel = K_ff_v × ω_ref [feedforward gain ≈ 1.0 for model-based; reduces position lag at speed]
Acceleration feedforward:
u_ff_acc = J_total/K_T × α_ref [torque feedforward; significantly improves tracking]
Reduces position error during acceleration from e = a/K_vel² to near zero
Friction Compensation
Coulomb friction:
τ_friction = τ_c × sign(ω) [step change at velocity reversal; causes limit cycles at zero speed]
Compensation: add τ_ff_friction = τ_c × sign(ω_ref) to torque command
Stiction (stick-slip):
Static friction > kinetic; causes "stick" at velocity reversal
Dither injection: small oscillating signal at high frequency to break stiction
Integral windup at zero: clamp integrator during hold; reset on motion command
Coulomb + Viscous + Stribeck model:
τ_f(ω) = [τ_c + (τ_s - τ_c)×exp(-(ω/ω_s)²)] × sign(ω) + B×ω
[τ_s = stiction; ω_s = Stribeck velocity; B = viscous damping]
Notch Filter for Mechanical Resonance
Problem: load compliance (flexible coupling, ball screw resonance) creates resonance at ω_n_res
Without filtering: position loop bandwidth limited to < ω_n_res / 5 → slow response
Notch filter:
N(s) = (s² + 2ζ_z × ω_n × s + ω_n²) / (s² + 2ζ_p × ω_n × s + ω_n²)
At ω_n: gain = ζ_z/ζ_p; set ζ_z << ζ_p → deep notch at resonance
Phase margin must be re-evaluated after notch; check Bode plot
Cogging torque (BLDC motors):
Periodic torque ripple at N_slots × ω; compensate with feedforward table indexed by θ
Amplitude: 1–15% of rated torque; causes position ripple at high resolution
Settling Time and Position Error
First-order position closed-loop:
τ_settle = 1/ω_c_pos; settle to 2% in 4τ; 0.1% in 7τ
For ω_c_pos = 100 rad/s (16 Hz): τ_settle = 10 ms; 2% settle = 40 ms
Steady-state position error (type 1 system, P controller):
Step position: e_ss = 0 (perfect tracking)
Constant velocity: e_ss = v_cmd / K_pp [position lag proportional to speed]
With feedforward: e_ss → 0 (if gains perfectly matched)
Standards and References
| Standard | Scope |
|---|
| NEMA MG1 | Motors and generators specifications |
| IEC 61800-3 | Adjustable speed electrical power drive systems |
| ISO 230-4 | Machine tool accuracy — circular tests |
| ANSI/ASA S2.19 | Mechanical vibration — measurement of resonance |
| Ogata "Modern Control Engineering" | Control textbook reference |
| Ellis "Control System Design Guide" | Practical servo tuning reference |
Output
Provide: mechanical system (load inertia J_load [kg·m²]; friction τ_c [N·m]; maximum speed ω_max [rpm]; maximum acceleration α [rad/s²]; gear ratio n), motor selection (T_peak [N·m]; T_cont [N·m]; ω_rated [rpm]; J_motor [kg·m²]; K_T [N·m/A]; K_e [V·s/rad]; R_a [Ω]; L_a [mH]; inertia ratio J_load/n²/J_motor), torque sizing (T_accel [N·m]; T_friction; T_gravity; T_peak margin; T_rms vs. T_cont), drive selection (bus voltage V_bus [V]; peak current I_peak [A]; bus voltage check vs. K_e × ω_max), loop gains (current: K_pI; τ_I; f_BW_I [Hz] | velocity: K_pV; τ_V; f_BW_V [Hz] | position: K_pp; f_BW_pos [Hz]), settling time (2% settle time [ms]; 0.1% settle [ms]), position error at max speed (e_ss [mm or deg]; feedforward gain recommended), compensation (friction τ_c [N·m]; notch filter if resonance < 5× position BW; frequency ω_n_res [Hz]), and applicable standard (NEMA MG1; IEC 61800; ISO 230-4).