S920 of 55
0 XP
  1. Hook
  2. Play
  3. Predict
  4. Name it
  5. Check
  6. Explain

S9 · Lesson 20 · Cascade control

Loops inside loops: why an inner loop helps, bandwidth separation and the outer loop's phase margin, tuning from the inside out, and the current, speed and position loops of a motor drive

Almost every motor drive runs three loops, one inside another: a current loop that makes the motor's torque follow a command, a speed loop that commands the current, and a position loop that commands the speed. Process plants do the same with a flow loop under a temperature or level loop. A single loop from voltage to position could in principle do the job, so why nest them? Because each inner loop deals with its own disturbances and nonlinearities before the outer loop ever sees them, and gives the outer loop a simpler plant to control.

  • The curve is the outer loop's phase margin when it crosses over at ωo around an integrating plant, with the inner closed loop acting as a lag of bandwidth ωi: 90°−tan−1⁡(ωo/ωi).
  • With the inner loop five times faster the outer loop keeps 78.7° of margin; at equal bandwidths only 45°.
  • That's the reason for the usual rule: make each inner loop 4 to 10 times faster than the loop around it.

Predict

A servo drive's current loop has a 1 kHz bandwidth. About how fast can its speed loop sensibly be made?

Name it

The structure

An outer controller Co acts on the main variable's error and produces the setpoint of an inner loop, whose controller Ci drives the actuator and measures an intermediate variable closer to it. The inner loop is designed first; the outer loop then treats the closed inner loop Ti as part of its plant.

What the inner loop buys

  • Disturbance rejection. A disturbance entering inside the inner loop (a supply-voltage change in a motor's current loop, a pressure upset in a valve's flow loop) is attenuated by Si before it reaches the outer variable, and by So after: at frequencies below the inner crossover, |Si|≈ω/ωi.
  • Linearization. Friction in a valve, or a motor's back-EMF in the current loop, is hidden by the inner loop's gain, so the outer loop sees Ti≈1 instead of the raw actuator.
  • Limits. Clamping the inner setpoint limits the intermediate variable: a current limit protects a motor however hard the speed loop demands.

Bandwidth separation

If the inner loop behaves like Ti=1/(s/ωi+1) and the outer plant is an integrator, the outer loop Lo=K/(s(s/ωi+1)) crossing over at ωo has phase margin

PM=90°−tan−1⁡ωoωi

A ratio ωi/ωo of 4 to 10 costs the outer loop only 6 to 14° and lets it be designed as if the inner loop were perfect.

The motor drive

With torque constant Kt and inertia J, the speed responds to current as Kt/(Js), so a proportional speed gain Kω (amperes per rad/s) crosses over at ωs≈KωKt/J. A position loop with gain Kp (rad/s of speed command per rad of error) crosses over at about Kp, and while following a ramp at speed v it lags by v/Kp, which velocity feedforward (lesson 19) removes.

Worked example

A servo motor has Kt = 0.05 N·m/A and J = 10⁻⁴ kg·m², under a current loop with 1 kHz bandwidth. Set a proportional speed gain for a 100 Hz crossover, and find the speed loop's phase margin.

Show the solution
  1. Speed plant. KtJs=500s
  2. Gain for a 100 Hz crossover. ωc=2π×100=628rad/sKω=628/500=1.26A per rad/s It's 1.263 exactly, once the current loop's small lag is included.
  3. Phase margin. PM=90°−tan−1⁡(100/1000)=84.3° The current loop is fast enough to be almost invisible to the speed loop.

Answer Kω = 1.26 A per rad/s (1.263 with the current loop's lag), with an 84.3° phase margin.

Worked example

A temperature loop crosses over at 0.01 rad/s around a heat exchanger, and the steam valve gets its own flow loop crossing at 1 rad/s. How much does the flow loop attenuate a steam-pressure upset, compared with the temperature loop alone?

Show the solution
  1. The flow loop's sensitivity. Below the outer crossover, |Si|=ωω2+ωi2
  2. At 0.01 rad/s. |Si|≈0.01 That's 40 dB of extra attenuation, on top of whatever the temperature loop provides.
  3. What that means. The upset is corrected in a few seconds at the valve, long before the slow exchanger shows it; without the flow loop the temperature loop would only react after the exchanger's lag let the upset through.

Answer the flow loop adds about 40 dB of attenuation at 0.01 rad/s, on top of the temperature loop's.

Worked example

A position loop with gain Kp = 2π × 10 s⁻¹ commands that speed loop. How far behind does it fall when the target moves at 100 rad/s?

Show the solution
  1. Loop type. A proportional position loop around the (nearly ideal) speed loop is type 1, with velocity constant Kp=62.8s−1
  2. Following error. e=v/Kp=100/62.8=1.59rad a quarter of a turn.
  3. Remove it with feedforward. Feeding the target's speed forward to the speed loop's setpoint removes almost all of it, leaving the position loop to correct only what the speed loop misses.

Answer it falls 1.59 rad behind, a quarter of a turn.

Check

A motor with Kt = 0.05 N·m/A and J = 1 × 10⁻⁵ kg·m² has a fast current loop; its speed loop should cross over at 300 Hz.

(a)

What proportional speed gain, in amperes per rad/s, does that need, ignoring the current loop's lag?

Write units the way you normally would: 1.5 A/(rad/s), 1500 mA/(rad/s) and 0.0015 kA/(rad/s) are the same answer.

Check

An outer loop around an integrating plant crosses over 4 times below the bandwidth of the first-order inner loop it commands.

(a)

What phase margin does it have?

(b)

How much margin does the inner loop's lag cost?

Check

An outer loop must cross over at 10 rad/s around an integrating plant with at least 70° of phase margin.

(a)

How fast must the inner loop be?

Write units the way you normally would: 1.5 rad/s and 1500 mrad/s are the same answer.

Check

An inner loop crosses over 10 times faster than the outer loop's 0.1 rad/s crossover.

(a)

How much does the inner loop attenuate a disturbance entering it, at the outer crossover?

Check

A proportional position loop crosses over at 10 Hz around a fast speed loop, following a target moving at 10 rad/s.

(a)

What is the following error?

Write units the way you normally would: 1.5 rad and 1500 mrad are the same answer.

Check

A speed loop's current command is clamped at 10 A; the motor has Kt = 0.03 N·m/A and J = 0.0001 kg·m², and is commanded from rest to 500 rad/s.

(a)

What is the largest acceleration?

Write units the way you normally would: 1.5 rad/s^2 and 1500 mrad/s^2 are the same answer.

(b)

How long does the speed take to get there at least?

Check

Why are cascade loops tuned from the inside out?

Check

An outer loop crosses over at o around an integrating plant; the inner loop is r times faster; separately, a motor has Kt = K and inertia J.

Step 1

What phase margin does the outer loop have, in degrees?

Type it the way you would write it, like 3sin(2πft) or 3*sin(2*pi*f*t). Angles can be in radians or carry a degree sign, like 45°.

Check

Write speed_overshoot(K, Kt, J, wi, T, dt): simulate a unit speed step for a motor (ω˙=Kti/J) whose current follows its command through a first-order loop (i˙=ωi(iref−i)), with proportional speed control iref=K(1−ω); forward Euler, return the overshoot as a fraction.

Python 3.14 with numpy and matplotlib, running in your browser. Tab indents; press Esc and then Tab to move on.

Explain why

What does a cascade structure gain over a single loop from the actuator straight to the main variable?

Practice

Keep practicing

9 kinds of problem on this topic, dealt one at a time with new numbers every time, for as long as you like.