ENع
→System type
الدرس 20 · Steady-state error and stability

System type and error constants

لم يُترجم بعد؛ يُعرض باللغة الإنجليزية

14 دقيقة10 خطوات5 أسئلةIntermediate
عن هذا الدرس

Count the poles of G(s) at s = 0 and you know, without simulating anything, whether a unity-feedback loop can follow a step, a ramp or a parabola. One loop is played three ways: with no integrator, with one and with two. The error either settles, goes to zero or grows without limit, exactly as the position, velocity and acceleration constants predict.

ستتعلّم

حدّد ما تشعر بأنك أتقنته. هذا التقييم الذاتي لا يؤثر في درجة الدرس.

شكل 20 · تفاعلي
01 / 10

One loop, three inputs

A unity-feedback loop: the error e = r − y drives G(s), and the output y is fed straight back. The lesson on steady-state error and the final value theorem gave e(∞) = lim s·R(s)/(1 + G(s)). Here we read it off G(s) instead.

E(s) = R(s) − Y(s)
Y(s) = G(s)·E(s)

         R(s)
E(s) = --------
       1 + G(s)

e(∞) = lim  s·E(s)     (final value theorem;
       s→0              only for a stable loop)
جارٍ تحميل الرسم…
أو ← →
اقرأ الدرس خطوة بخطوة
  1. One loop, three inputs

    A unity-feedback loop: the error e = r − y drives G(s), and the output y is fed straight back. The lesson on steady-state error and the final value theorem gave e(∞) = lim s·R(s)/(1 + G(s)). Here we read it off G(s) instead.

    E(s) = R(s) − Y(s)
    Y(s) = G(s)·E(s)
    
             R(s)
    E(s) = --------
           1 + G(s)
    
    e(∞) = lim  s·E(s)     (final value theorem;
           s→0              only for a stable loop)
  2. Count the integrators

    The system type is the number of poles of G(s) at s = 0, each one a pure integrator 1/s. Our first G(s) = 10/((s+1)(s+5)) has poles at −1 and −5 and none at zero. It is type 0.

    G(s) = 10 / ((s+1)(s+5))
         = slot 1 · slot 2 · plant
         = 1/(s+1) ·   1    · 10/(s+5)
    
    poles   s = −1, s = −5
    at s = 0: none   →   type 0
    
    Type = how many factors 1/s G(s) has.
  3. Type 0 on a step

    A unit step asks for y = 1. The error starts at 1 and settles at 1/(1 + Kp), where the position constant Kp = G(0) = 10/5 = 2. So e(∞) = 1/3: close, but never zero.

    Kp = lim G(s) = G(0) = 10/(1·5) = 2
         s→0
    
    e(∞) = 1/(1 + Kp) = 1/3 = 0.333
    simulated at t = 8 s:  e = 0.333
    
    A type 0 loop needs some error to hold
    the output up: y = Kp·e = 2 × 1/3 = 2/3.
  4. Type 0 on a ramp

    Now a ramp, r = t: a target moving at a steady speed. Type 0 falls further behind every second. Its error grows by about a third of a unit per second, without limit: about 2.93 at 8 s.

    r = t      R(s) = 1/s²
    
    e(∞) = 1/Kv,  Kv = lim s·G(s) = 0
                       s→0
         = ∞
    
    late in the run: e ≈ t/3 + 0.27
    simulated at t = 8 s:  e = 2.93
  5. Move the pole to zero

    Slide the pole at −1 to 0: 1/(s+1) becomes 1/s, an integrator. Its output keeps changing while its input is not zero, so the loop can only come to rest with zero error. G(s) = 10/(s(s+5)) is type 1.

    slot 1:  1/(s+1)  →  1/s
    
    G(s) = 10 / (s(s+5))      type 1
    
    An integrator's output is the running
    sum of its input. It stops changing only
    when its input, here the error, is zero.
  6. Type 1 on a step

    The same unit step. Now the error goes all the way to zero. G(0) is infinite, so Kp = ∞ and 1/(1 + Kp) = 0. The integrator holds the output at 1 with no error left over.

    Kp = lim 10/(s(s+5)) = ∞
         s→0
    
    e(∞) = 1/(1 + ∞) = 0
    simulated at t = 8 s:  e = 0.000
  7. Type 1 on a ramp

    The ramp again. Type 1 keeps up with the speed but trails by a fixed gap, 1/Kv. The velocity constant Kv = lim s·G(s) = 10/5 = 2, so e(∞) = 0.5.

    Kv = lim s·G(s) = lim 10/(s+5) = 2
         s→0          s→0
    e(∞) = 1/Kv = 0.500
    simulated at t = 8 s:  e = 0.500
    
    # type 1 loop, ramp input, stepped in time
    # G = 10/(s(s+5)):  y'' + 5y' = 10e
    dt, t, y, v = 0.001, 0.0, 0.0, 0.0
    while t < 20:
        e = t - y               # r = t
        v += (10 * e - 5 * v) * dt
        y += v * dt
        t += dt
    print(round(t - y, 2))      # 0.5
  8. Type 1 on a parabola

    A parabola, r = t²/2: a target that keeps speeding up. One integrator is not enough. The error grows by about half a unit per second, without limit: about 3.85 at 8 s.

    r = t²/2      R(s) = 1/s³
    
    e(∞) = 1/Ka,  Ka = lim s²·G(s) = 0
                       s→0
         = ∞
    
    late in the run: e ≈ t/2 − 0.15
    simulated at t = 8 s:  e = 3.85
  9. Type 2 on a parabola

    Add a second integrator, with a zero at −1 to keep the loop stable: G(s) = 10(s+1)/(s²(s+5)), type 2. The parabola error now settles at 1/Ka, with Ka = lim s²G(s) = 2: e(∞) = 0.5.

    slot 2:  1  →  (s+1)/s
    G(s) = 10(s+1) / (s²(s+5))     type 2
    
    Ka = lim s²·G(s) = 10·1/5 = 2
         s→0
    e(∞) = 1/Ka = 0.500
    simulated at t = 8 s:  e = 0.500
    
    without the zero: 1 + G → s³ + 5s² + 10
    (no s term): the loop is not stable.
  10. The whole pattern

    Each integrator in G(s) wipes out the error for one more input. Type 0 leaves 1/(1 + Kp) on a step, type 1 leaves 1/Kv on a ramp, type 2 leaves 1/Ka on a parabola. Lower inputs: zero. Higher: unbounded.

                step       ramp     parabola
    type 0   1/(1+Kp)       ∞          ∞
    type 1       0        1/Kv         ∞
    type 2       0          0        1/Ka
    
    Kp = lim G   Kv = lim sG   Ka = lim s²G
    
    # error constants: s^n·G(s) as s -> 0
    def G(s, n):
        if n == 0: return 10 / ((s + 1) * (s + 5))
        if n == 1: return 10 / (s * (s + 5))
        return 10 * (s + 1) / (s * s * (s + 5))
    s = 1e-9
    Kp, Kv, Ka = G(s, 0), s * G(s, 1), s * s * G(s, 2)
    print(round(1 / (1 + Kp), 3), round(1 / Kv, 3), round(1 / Ka, 3))  # 0.333 0.5 0.5

اختبار يتاح بعد الخطوة الأخيرة.