SimuveliqLearnEspañolOpen the simulators
Learn › Engineering

Control: root locus, Bode and design

With the model in hand, designing means choosing the controller so that the closed loop is stable, fast, with little overshoot and little error. This topic presents the two classic graphical tools, the root locus and the Bode diagram, and with them the specifications, the PID and lead and lag compensators.

Root locus

The root locus draws where the closed-loop poles move as a gain goes from 0 to ∞. The characteristic equation is written , with the open-loop , and a point is on the locus if it meets the angle and magnitude conditions:

RuleWhat it says
Start and endThere are branches (one per open-loop pole): they leave the poles () and of them end at the zeros (); the rest go to infinity.
Real axisA point on the real axis is on the locus if there is an odd number of real poles and zeros to its right.
AsymptotesThe branches that go to infinity follow lines from at angles .
BreakawayWhere two real-axis branches meet and leave the axis: real roots of with .
Departure angleFrom a complex pole: .
jω crossingThe and of the stability limit, from Routh (row of zeros and auxiliary polynomial).

An added zero pulls the branches to the left (stabilizes); an added pole pushes them to the right. That is the idea behind compensators.

Frequency response and margins

With a sinusoidal input , a stable system responds in steady state with another sinusoid of the same frequency, multiplied by and shifted by . The Bode diagram draws both against on a logarithmic scale, the magnitude in decibels (). Each pole subtracts 20 dB/decade from its frequency on and up to 90° of phase; each zero adds them; an integrator gives −20 dB/decade and −90° from the start.

On the open-loop function two margins are measured, how far the closed loop is from oscillating ():

0.1110400-40-90°-180°-270°PM = 25.4°GM = 9.54 dBωcg = 1.227ωcf = 2.236|L| [dB]∠Lω [rad/s]
Bode of : phase margin at the gain crossover and gain margin at the phase crossover.

A phase margin of 45–60° gives a well-damped response; for a system dominated by two poles, (with PM in degrees, up to about 60°). The gain margin says how many times the gain can be multiplied before reaching the limit. The Nyquist diagram draws in the complex plane and gives the same criterion by counting the turns around −1.

Specifications in the s-plane

A maximum overshoot sets the minimum damping, and a settling time, the minimum real part of the dominant poles:

The poles that comply are inside a cone of half-angle around the negative real semiaxis and to the left of . If the root locus goes through , it is enough to choose ; if not, angle is missing and a compensator that supplies it must be added (angle condition).

PID controller

ActionWhat it doesWatch out
Proportional Responds to the present error; more , faster and less error.More overshoot and, eventually, instability.
Integral Accumulates past error: raises the type and removes the step error.Adds negative phase: more oscillation; it saturates (wind-up).
Derivative Anticipates with the error's slope: damps and adds phase.Amplifies noise; in practice it is filtered.

Without a model, or as a starting point, tuning rules are used. The Ziegler–Nichols sustained-oscillation rules raise a proportional gain up to the stability limit: the ultimate gain and the period of that oscillation give:

Controller
P∞0
PI0
PID

Ziegler–Nichols aims at a ¼ decay per cycle and usually leaves large overshoots; Tyreus–Luyben is more conservative. In every case, the fine tuning is done by looking at the response.

Lead and lag compensators

A lead compensator has a zero before its pole and adds phase around the gain crossover: it raises the phase margin (less overshoot) and makes the loop faster. A lag one has the pole before the zero, very close to the origin: it raises the low-frequency gain (less steady-state error) while barely touching the phase at the crossover.

ω [rad/s]added phase0.111010°20°30°φm = 32.61° at ωm = 1.7291/T1/(αT)
Phase added by the lead of example 3 (α = 0.2996, T = 1.057): the maximum is halfway, on a log scale, between the zero and the pole.

Bode design: (1) missing phase, to of reserve, because the crossover will move to the right, where the phase is lower; (2) from ; (3) the new crossover is placed where , because there the compensator adds dB, and goes there; (4) ; (5) check the margin and repeat if it is not reached.

Common mistakes

  • Forgetting the real-axis part of the root locus, or counting to the left instead of to the right.
  • Measuring the margins on instead of the open-loop function .
  • Believing that more gain always helps: it reduces the error, but also the phase margin.
  • Taking the Ziegler–Nichols tuning as the final design: it is an aggressive starting point.
  • Designing a lead with no phase reserve: the final margin ends up below the one asked for.

Worked examples

Example 1Root locus step by step

Sketch the root locus of for .
ReIm-6-5-4-3-2-112-2j2jbreakaway −0.4725K = 30, ω = 2.236K = 10σa = −2

Solution

  1. Open-loop poles: 0, −1 and −5 (); no zeros (): the three branches go to infinity.
  2. Real axis: with an odd number of poles to the right are (one) and (three).
  3. Asymptotes: at angles 60°, 180° and 300°.
  4. Breakaway: , → (the other root, −3.53, is not on the locus). There .
  5. jω crossing (Routh, example 3 of the previous topic): , rad/s. The two branches leaving the breakaway go up, cross the axis at and follow the ±60° asymptotes; the third goes from −5 toward −∞.
Asymptotes from −2 at 60°, 180° and 300°; breakaway at −0.4725 (K = 1.128); jω crossing at ±2.236j with K = 30.

Solve it in Simuveliq

  1. «Load diagram» → Closed loop with K (Routh). In Root locus and frequency response, Root locus tab, the numbered steps give the poles, the real axis (−∞, −5] ∪ [−1, 0], the asymptotes (σa = −2), the breakaway s = −0.4725 (K = 1.128) and the crossing K = 30, ω = ±2.236.
  2. The ● dots are the poles with the current Value of K (10): −5.418 and −0.2911 ± 1.327j. Change K and watch them travel along the branches.

Example 2Gain to meet specifications

For with unity feedback the specs are and s (2%). Which meets them?
ReIm-6-4−2sd = −2 + 2.729j (K = 11.45)K = 20: −2 + 4jmeets the specsζ = 0.591σ = 2

Solution

  1. and , so rad/s and .
  2. The locus of : the poles 0 and −4 meet at −2 () and go up the vertical . That whole vertical meets ; the overshoot also requires being inside the cone.
  3. is on the locus (the angle condition holds: ∠G = −180°). Magnitude: .
  4. With the initial the poles are at (, 20.8%): they meet the time but not the overshoot. Any meets both; with the poles are real and slower.
puts the poles at (, , s).

Solve it in Simuveliq

  1. «Load diagram» → Output disturbance. In Controller design, Specs and root locus comes with Mp = 10% and ts = 2 s: it gives ζ = 0.5912, σ = 2, ωn = 3.383 and the Desired poles sd = −2 ± 2.729j.
  2. It says the current pole −2 ± 4j meets the settling time but not the overshoot, that sd is already on the locus and that K = 11.446 is enough; «use this K» puts it in the diagram.

Example 3Lead compensator by Bode

With , the phase margin is small. Design a lead for a 50° margin.

Solution

  1. Uncompensated: at rad/s, where the phase is −154.6°: . The phase crossover is rad/s with : dB (the Routh limit, 30/10 = 3).
  2. Missing phase with 8° of reserve: → .
  3. New crossover where dB: rad/s. : .
  4. Check: the margin comes out 43.58° at 1.729 rad/s, less than the 50° asked for, because moving the crossover to the right made the phase of drop more than the 8° reserved (it has three poles). Even so, the overshoot drops from 48.6% to 25.3% and from 12.7 s to 4.72 s. To reach 50° the design is repeated with more reserve or with two leads.
(): PM from 25.39° to 43.58°, from 48.6% to 25.3%.

Solve it in Simuveliq

  1. «Load diagram» → Closed loop with K (Routh) and, in Controller design, Lead / lag (Bode), with Desired phase margin = 50° (the button opens it there).
  2. It gives PM = 25.39° at ωc = 1.227 rad/s and GM = 9.542 dB, φm = 32.61°, α = 0.2996, ωm = 1.729 rad/s and T = 1.057, the compensated PM = 43.58°, both Bode plots overlaid and the step response table (48.6% → 25.3%).

Example 4Tuning a PID by Ziegler–Nichols

A welding process has and a sensor . Tune a PID by the sustained-oscillation method.

Solution

  1. With a proportional control : → .
  2. Routh: : 1, 17, ; : 5, 13; : , ; : . It vanishes at .
  3. Auxiliary polynomial: → rad/s and s.
  4. Ziegler–Nichols PID: , s, s; that is, and .
  5. When simulated, the overshoot is 116%: the rule is aggressive and here, with the slow sensor in the feedback, too much so. It is a starting point: Tyreus–Luyben brings it down to 60% and the final tuning is done by lowering and while watching the response.
, s → , , (116% overshoot: it must be softened).

Solve it in Simuveliq

  1. «Load diagram» → Welding process: K, 3rd-order plant and sensor (typical exam) and, in Controller design, PID tuning (the button opens it there).
  2. The method text gives Ku = 37.44, ωu = 1.612 rad/s and Pu = 3.897 s; the rules table, Ziegler–Nichols PID 22.46 · 1.948 · 0.4871 (Ki 11.53, Kd 10.94) with its 116% Mp, and the other rules with their overshoot. «use» loads each one into the manual PID to adjust it.

Related topics