Steady-state error & PID control: practice problems with step-by-step solutions

Free Steady-state error & PID control practice problems with diagrams, hints and full worked solutions. New values every time, at three levels: system type and error constants, steady-state errors and gain, P, PI and PD design.

Free practice problemEasy
R(s)+10(s + 3)s(s + 1)(s + 4)C(s)−

A unity-feedback loop has the open-loop transfer function G(s) = 10(s + 3)/(s(s + 1)(s + 4)). Find the velocity error constant Kv.

G(s) = 10(s + 3)/(s(s + 1)(s + 4))
Next problem →

What you practise

  1. Easysystem type and error constants
  2. Mediumsteady-state errors and gain
  3. HardP, PI and PD design

How to solve Steady-state error & PID control problems

  1. Count the poles of the open loop C(s)·G(s) at s = 0: that is the system type.
  2. Work out the error constant that matches the input: Kp for a step, Kv for a ramp, Ka for a parabola.
  3. Apply ess = A/(1 + Kp), A/Kv or A/Ka, or solve it for the gain you need.
  4. For a damping or speed specification, write the closed-loop characteristic polynomial and match it with s² + 2ζω_n·s + ω_n².

Common mistakes

  • Using A/Kp instead of A/(1 + Kp) for a step.
  • Forgetting the plant gain when matching coefficients: the loop gain is K times the plant gain.
  • Ignoring the controller’s integrator when counting the system type.
  • Expecting a proportional gain alone to remove a step error in a type-0 loop.

Key formulas

System type
number of poles of G(s) at s = 0
Error constants
Kp = lim G(s), Kv = lim s·G(s), Ka = lim s²·G(s) (s → 0)
Step A
ess = A/(1 + Kp)
Ramp A·t
ess = A/Kv
Parabola A·t²/2
ess = A/Ka
PID controller
C(s) = Kp + Ki/s + Kd·s
Second-order target
s² + 2ζωns + ωn²
Overshoot and timing
%OS = 100·e−ζπ/√(1−ζ²), tp = π/ωd, ts ≈ 4/(ζωn)

Learn Steady-state error & PID control from scratch

Before this: Block diagrams, Step response

1Following a command

A feedback loop compares the command r with the output y and acts on the error e = r − y. Ideally the output ends up exactly at the command.

Often it does not. After the transient has died out, a gap can remain: the steady-state error ess.

tyress​

How large ess is depends on the type of input (a step, a ramp or a parabola) and on how many integrators the loop contains.

Self-check A unity-feedback loop receives r = 1 and its output settles at y = 0.95. What is the steady-state error?
  1. 0.05
  2. 0.95
  3. 1.95
  4. −0.05

Answer: 0.05. ess = r − y = 1 − 0.95 = 0.05. The output itself is 0.95, and the sign is positive because the output stays below the command.

2System type and error constants

The system type is the number of poles of the open loop G(s) at s = 0, that is the number of integrators. G(s) = 10/(s(s + 5)) has one, so it is type 1.

Three error constants summarise G(s) at very low frequency (s → 0):

Kp = lim G(s), Kv = lim s·G(s), Ka = lim s²·G(s)

With the final value theorem they give the error for each input:

step A: A/(1 + Kp) ramp A·t: A/Kv parabola A·t²/2: A/Ka
  • Type 0: finite step error, infinite ramp error.
  • Type 1: zero step error, finite ramp error.
  • Type 2: zero step and ramp error, finite parabola error.
Self-check What is the velocity error constant Kv of G(s) = 10/(s(s + 5))?
  1. 0.5
  2. 10
  3. 2
  4. ∞

Answer: 2. s·G(s) = 10/(s + 5), which is 10/5 = 2 at s = 0. The value 0.5 is the ramp error 1/Kv, not the constant.

3The method step by step

  1. Write the open loop: the controller times the plant, C(s)·G(s).
  2. Count its poles at s = 0 to get the system type.
  3. Pick the error constant that matches the input: Kp for a step, Kv for a ramp, Ka for a parabola.
  4. Evaluate the limit: cancel the factors s, then put s = 0 in what remains.
  5. Apply the error formula, or solve it for the gain that gives a required error.

For a damping or speed specification, write the closed-loop characteristic polynomial and match it with s² + 2ζωns + ωn².

4A worked example

Follow every step. Try to predict the next one before you open it.

Worked example

A unity-feedback loop has G(s) = K/(s(s + 4)). It must follow the ramp r(t) = 2t with a steady-state error of 0.1. Find K and the damping ratio that results.

1

Find the system type

r+eK1/(s(s + 4))y−

G(s) has one pole at s = 0, so the loop is type 1: a ramp gives a finite error.

2

Velocity constant

Kv = lim s·G(s) = K/4
3

Required Kv

The ramp slope is A = 2, so ess = 2/Kv = 0.1.

Kv = 2/0.1 = 20
4

Gain

K = 4·Kv = 80
5

Check the damping

The characteristic polynomial is s² + 4s + 80, so ωn = √80 = 8.94 rad/s and ζ = 4/(2·8.94) = 0.22.

The error is met, but the step response overshoots by about 49 %. That trade-off is why controllers are more than a single gain.

Answer

K = 80, which gives ζ = 0.22.

5P, PI and PID controllers

The PID controller combines three actions on the error:

C(s) = Kp + Ki/s + Kd·s
  • Proportional (Kp): a faster loop and a smaller error for a type-0 plant, but the step error never reaches zero.
  • Integral (Ki/s): adds a pole at s = 0, so the type rises by one and a step is followed without error.
  • Derivative (Kd·s): adds damping and reduces overshoot.

To choose gains, match coefficients. A PI controller on G(s) = 2/(s + 3) gives the characteristic polynomial s² + (3 + 2Kp)s + 2Ki. For ωn = 5 rad/s and ζ = 0.8 the target is s² + 8s + 25:

3 + 2Kp = 8 → Kp = 2.5, 2Ki = 25 → Ki = 12.5
Self-check An integrator is added to the controller of a type-0 loop. What happens to the steady-state error for a unit step?
  1. It becomes infinite
  2. It becomes larger
  3. It becomes smaller but not zero
  4. It becomes zero

Answer: It becomes zero. The integrator makes the loop type 1, so Kp is infinite and A/(1 + Kp) = 0. A larger proportional gain alone would only make the error smaller.

6Common mistakes

  • Using A/Kp instead of A/(1 + Kp) for a step.
  • Forgetting the plant gain when matching coefficients: the loop gain is the controller gain times the plant gain.
  • Counting only the plant’s integrators and missing the one in a PI controller.
  • Leaving out the zeros when evaluating Kv: a factor (s + 3) is worth 3 at s = 0.
Self-check A step of size 5 is applied to a type-0 loop with Kp = 9. What is the steady-state error?
  1. 0.1
  2. 0.556
  3. 0.5
  4. 4.5

Answer: 0.5. ess = 5/(1 + 9) = 0.5. Dividing by Kp alone gives 0.556, leaving out the step size gives 0.1, and 4.5 is the final output.

7How exam questions look

  • Easy: system type and error constants. You find the type, Kp, Kv or Ka of a transfer function, a step error, or the final output of a loop with P control.
  • Medium: steady-state errors and gain. You find the error for a ramp, a parabola or a step plus a ramp, or the gain that gives a required error.
  • Hard: P, PI and PD design. You choose K for a damping ratio, find the overshoot, peak time or settling time for a given K, choose PI or PD gains by matching coefficients, or find the ramp error with a PI controller.

Learn it step by step in the appLearn it step by step in the app

Worked examples

Example 1Easy
R(s)+2(s + 2)s²(s + 2)C(s)−

A unity-feedback loop has the open-loop transfer function G(s) = 2(s + 2)/(s²(s + 2)). Find the acceleration error constant Ka.

G(s) = 2(s + 2)/(s²(s + 2))

Find Ka

Show hints
  1. K_a = lim s²·G(s) as s → 0.
  2. The s² cancels the double pole at the origin.
  3. Ka = 2·2/2.
Show the answer and the step-by-step solution

Steady-state error: in a unity-feedback loop with open-loop transfer function G(s) the error is E(s) = R(s)/(1 + G(s)), and by the final value theorem ess = lims→0 s·E(s). The system type is the number of poles of G(s) at s = 0. The error constants are Kp = lim G(s), Kv = lim s·G(s) and Ka = lim s²·G(s), all for s → 0. A step of size A gives ess = A/(1 + Kp), a ramp A·t gives A/Kv and a parabola A·t²/2 gives A/Ka. A type-0 loop follows a step with a finite error, a type-1 loop follows it exactly and a ramp with a finite error.

Acceleration constant

s²·G(s) = 2(s + 2)/(s + 2)
Ka = 2·2/2 = 2

Answer

Ka = 2
Example 2Medium
R(s)+K(s + 2)(s + 5)C(s)−

A unity-feedback loop has G(s) = K/((s + 2)(s + 5)). Find the gain K that gives a steady-state error of 2 % for a step input.

G(s) = K/((s + 2)(s + 5))ess = 2 %

Find K

Show hints
  1. For a unit step e_ss = 1/(1 + K_p).
  2. Kp = G(0) = K/10.
  3. 1/(1 + K/10) = 0.02.
Show the answer and the step-by-step solution

Steady-state error: in a unity-feedback loop with open-loop transfer function G(s) the error is E(s) = R(s)/(1 + G(s)), and by the final value theorem ess = lims→0 s·E(s). The system type is the number of poles of G(s) at s = 0. The error constants are Kp = lim G(s), Kv = lim s·G(s) and Ka = lim s²·G(s), all for s → 0. A step of size A gives ess = A/(1 + Kp), a ramp A·t gives A/Kv and a parabola A·t²/2 gives A/Ka. A type-0 loop follows a step with a finite error, a type-1 loop follows it exactly and a ramp with a finite error.

Required error constant

1/(1 + Kp) = 0.02 → Kp = 49

Gain

K/10 = 49 → K = 490

Answer

K = 490

Check the closed-loop stability as well: for this second-order loop any K > 0 is stable.

Example 3Hard
R(s)+K = 85s(s + 2)C(s)−

A proportional controller K = 8 drives the plant G(s) = 5/(s(s + 2)) in a unity-feedback loop. Find the 2 % settling time ts of the step response, using ts ≈ 4/(ζωₙ).

G(s) = 5/(s(s + 2))K = 8

Find ts (s)

Show hints
  1. The characteristic polynomial is s² + 2s + 40.
  2. ζωₙ is half the coefficient of s: 2/2 = 1.
  3. ts ≈ 4/(ζωₙ).
Show the answer and the step-by-step solution

P, PI and PID control: the controller C(s) = Kp + Ki/s + Kd·s acts on the error. A proportional gain makes the loop faster and reduces the error of a type-0 plant, but never removes it. The integral term adds a pole at s = 0: the system type rises by one, and a step is followed without error. The derivative term adds damping. To choose gains, write the closed-loop characteristic polynomial and compare it with s² + 2ζωns + ωn². Then %OS = 100·e−ζπ/√(1−ζ²), tp = π/ωd with ωd = ωn√(1 − ζ²), and ts ≈ 4/(ζωn).

Characteristic polynomial

s(s + 2) + 8·5 = s² + 2s + 40

ωₙ and ζ

ωₙ = √40 = 6.325 rad/s
ζ = 2/(2·6.325) = 0.1581

Settling time

ζωₙ = 2/2 = 1
ts ≈ 4/1 = 4 s

Answer

ts = 4 s

The settling time does not depend on K here: raising K only makes the response oscillate faster.

Questions and answers

What is Steady-state error & PID control?

A feedback loop compares the command r with the output y and acts on the error e = r − y. Ideally the output ends up exactly at the command.

Often it does not. After the transient has died out, a gap can remain: the steady-state error ess.

How do I solve Steady-state error & PID control problems step by step?
  1. Count the poles of the open loop C(s)·G(s) at s = 0: that is the system type.
  2. Work out the error constant that matches the input: Kp for a step, Kv for a ramp, Ka for a parabola.
  3. Apply ess = A/(1 + Kp), A/Kv or A/Ka, or solve it for the gain you need.
  4. For a damping or speed specification, write the closed-loop characteristic polynomial and match it with s² + 2ζω_n·s + ω_n².
What are common mistakes in Steady-state error & PID control?
  • Using A/Kp instead of A/(1 + Kp) for a step.
  • Forgetting the plant gain when matching coefficients: the loop gain is K times the plant gain.
  • Ignoring the controller’s integrator when counting the system type.
  • Expecting a proportional gain alone to remove a step error in a type-0 loop.
What do the Steady-state error & PID control exercises cover?
  • Easy: system type and error constants
  • Medium: steady-state errors and gain
  • Hard: P, PI and PD design

Every problem has new values, so you learn the method instead of an answer. Stuck? Open a small hint first, and the full explanation only when you need it.

How practising works

  • Every problem has new values, so you learn the method instead of an answer.
  • Stuck? Open a small hint first, and the full explanation only when you need it.
  • Your progress, mistakes and saved problems are kept, so you can review before the exam.

Topics before and after this one

Learn first

Courses with this topic

More topics in Electrical

Printable worksheet