Skip to content
DeepForgeby svx
All problems
MediumCalculusca-182

Steady-State Error

Problem

For a unity-feedback loop with the type-0 plant G(s) = k / (s + a), the position error constant is Kp = k / a and the unit-step steady-state error is e_ss = 1 / (1 + Kp).

Given k >= 0 and a > 0, return e_ss.

Hint

The final value theorem evaluates the error transfer function 1/(1 + G(s)) at s = 0.

Test cases

case 1
in: [4,2]
expected: 0.3333333333333333
case 2
in: [0,1]
expected: 1
case 3
in: [1,1]
expected: 0.5
case 4
in: [10,5]
expected: 0.3333333333333333
Starter codePython
def steady_state_step_error(k, a):
    # Your code here
    pass

4 test cases · run your code against them in the editor