ENع
→Test inputs
الدرس 13 · Time response

Test inputs: step, ramp and impulse

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

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

Engineers judge a system by poking it with a few standard signals and watching what it does. Put one thermometer, a first-order system with a 15-second time constant, through the three classic tests: plunge it into hot water (a step), heat its water steadily (a ramp) and dip it in boiling water for one second (close to an impulse). Every curve is the exact solution, computed as the figure plays. It uses the Laplace transform and transfer functions without re-teaching them: see the Circuits lessons Circuit analysis with the Laplace transform, Step response of RLC circuits and Characteristic roots and damping, and The transfer function of a system.

ستتعلّم

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

شكل 13 · تفاعلي
01 / 09

Why test inputs?

Real inputs are messy, so engineers poke a system with a few simple, agreed signals and compare the answers. The three most used are the step, the ramp and the impulse. Our test subject is a thermometer.

test input   a simple, standard signal u(t)
response     what the system does, y(t)

step      a sudden jump that stays
ramp      a steady climb
impulse   a very short, strong kick

Same tests for every system, so the
answers can be compared.

Builds on: Circuit analysis with the
Laplace transform; Step response of RLC
circuits; Characteristic roots and
damping; The transfer function of a
system.
جارٍ تحميل الرسم…
أو ← →
اقرأ الدرس خطوة بخطوة
  1. Why test inputs?

    Real inputs are messy, so engineers poke a system with a few simple, agreed signals and compare the answers. The three most used are the step, the ramp and the impulse. Our test subject is a thermometer.

    test input   a simple, standard signal u(t)
    response     what the system does, y(t)
    
    step      a sudden jump that stays
    ramp      a steady climb
    impulse   a very short, strong kick
    
    Same tests for every system, so the
    answers can be compared.
    
    Builds on: Circuit analysis with the
    Laplace transform; Step response of RLC
    circuits; Characteristic roots and
    damping; The transfer function of a
    system.
  2. The thermometer is first order

    Input u: the water temperature. Output y: the reading. The gap drives it, 15·dy/dt = u − y, with time constant T = 15 s. In Laplace form (signals as functions of s), output over input is the transfer function G(s) = 1/(15s + 1).

    # T·dy/dt = u − y, stepped forward 1 ms at a time
    T, dt = 15, 0.001
    u, y = 60.0, 20.0
    for n in range(15000):       # 15 s
        y = y + dt * (u - y) / T
    print(round(y, 1))       # 45.3
    
    # Laplace transform: rewrites a signal of time t
    # as a function of s. Taught in the Circuits
    # lesson 'Circuit analysis with the Laplace
    # transform'. Transfer function G(s) = Y(s)/U(s):
    # see 'The transfer function of a system'.
  3. The step: a sudden jump

    At t = 0 we plunge the thermometer from 20 °C water into 60 °C water and leave it there. The input jumps by 40 °C and stays: a step. Measured from 20 °C, its Laplace transform is 40/s.

    u(t) = 20 °C            for t < 0
    u(t) = 60 °C            for t ≥ 0
    
    measured from 20 °C:  40 · 1(t)
    Laplace:               U(s) = 40/s
    
    A step is the test for a sudden change:
    a new setpoint, a switch thrown.
  4. The step response

    The reading rises fast, then slows as the gap closes, and never overshoots. After one time constant, 15 s, it shows 45.3 °C: 63.2% of the way. After one minute, four time constants, 59.3 °C: 98.2%.

    # exact step response of 1/(15s + 1)
    import math
    T = 15
    for t in (15, 60):
        y = 20 + 40 * (1 - math.exp(-t / T))
        print(round(y, 1))
    # 45.3
    # 59.3
  5. The ramp: a steady climb

    Now the water is heated steadily, 0.5 °C every second: u = 20 + 0.5t. The input keeps changing at a constant rate: a ramp. Measured from 20 °C, its Laplace transform is 0.5/s².

    u(t) = 20 + 0.5·t  °C   for t ≥ 0
    
    measured from 20 °C:  0.5 · t
    Laplace:               U(s) = 0.5/s²
    
    A ramp is the test for tracking: a target
    that keeps moving, like an antenna
    following a satellite.
  6. Chasing a ramp

    Once settled, the reading climbs at the same speed but lags behind, showing what the water was 15 s earlier: 0.5 × 15 = 7.5 °C less. At 90 s the water is 65.0 °C and the reading 57.5 °C.

    # exact ramp response of 1/(15s + 1)
    import math
    T, rate, t = 15, 0.5, 90
    y = 20 + rate * (t - T + T * math.exp(-t / T))
    print(round(y, 1))      # 57.5
    
    # lag once settled: rate * T = 7.5 °C
  7. The impulse: a short kick

    An impulse is a kick so short that only its area counts. We dip the thermometer in 100 °C water for 1 s: 80 °C above, times 1 s, is an area of 80 °C·s. Its Laplace transform is just 80.

    u(t) = 100 °C   for 0 ≤ t < 1 s
    u(t) = 20 °C    after
    
    area = (100 − 20) °C × 1 s = 80 °C·s
    ideal impulse:  80 · δ(t)
    Laplace:        U(s) = 80
    
    1 s is much shorter than T = 15 s,
    so the dip acts almost like an impulse.
  8. The impulse response

    The reading jumps up, then drifts back to 20 °C along e^(−t/15). An ideal impulse of area 80 lifts it by 80/15 = 5.3 °C at once; our real one-second dip peaks at 25.2 °C, almost the same.

    # real 1 s dip versus the ideal impulse
    import math
    T = 15
    peak = 20 + 80 * (1 - math.exp(-1 / T))
    print(round(peak, 1))       # 25.2
    print(round(20 + 80 / T, 1))  # 25.3
  9. Three answers, one system

    The answers are linked. The impulse response is the slope of the step response, and the ramp response is the step response added up over time. That is why the next lessons study the step response closely.

    for 1/(Ts + 1), per unit of input:
    
    impulse   (1/T)·e^(−t/T)
    step      1 − e^(−t/T)
    ramp      t − T + T·e^(−t/T)
    
    Each is the slope (derivative) of the
    one below it. True for any linear,
    time-invariant (LTI) system: double the
    input, double the output; add inputs,
    add outputs; and the same test gives
    the same answer whenever you run it.

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