ENع
→Second-order ODEs
الدرس 29 · Maths for circuits and signals

Second-order differential equations and damping

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

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

A charged capacitor, a resistor and an inductor in one loop give an equation with a second derivative in it. Follow one circuit from Kirchhoff's voltage law to v″ + 2α·v′ + ω₀²·v = 0, solve it with the guess v = e^(st), and watch the two roots of the characteristic equation decide whether the voltage rings, falls fast or creeps.

ستتعلّم

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

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

A charged capacitor lets go

A 1 µF capacitor is charged to 10 V. At time t = 0 the switch closes, and charge flows round the loop through a 56 Ω resistor and a 10 mH inductor. We want v(t), the capacitor voltage, from then on.

>>> L, R, C, V0 = 0.01, 56, 1e-6, 10
>>> round(C * V0, 9)           # charge on the capacitor, coulombs
1e-05
>>> round(0.5 * C * V0**2, 9)  # energy it stores, joules
5e-05
جارٍ تحميل الرسم…
أو ← →
اقرأ الدرس خطوة بخطوة
  1. A charged capacitor lets go

    A 1 µF capacitor is charged to 10 V. At time t = 0 the switch closes, and charge flows round the loop through a 56 Ω resistor and a 10 mH inductor. We want v(t), the capacitor voltage, from then on.

    >>> L, R, C, V0 = 0.01, 56, 1e-6, 10
    >>> round(C * V0, 9)           # charge on the capacitor, coulombs
    1e-05
    >>> round(0.5 * C * V0**2, 9)  # energy it stores, joules
    5e-05
  2. Add up the loop voltages

    Kirchhoff's voltage law: voltages round a loop add to zero. The inductor's voltage is L·i′, where i′ means how fast the current i changes. The resistor's is R·i and the capacitor's is v. So L·i′ + R·i + v = 0.

    >>> L, R, v, i = 0.01, 56, 10, 0   # the state at t = 0
    >>> -(R * i + v) / L               # i′ from the law, amps per second
    -1000.0
  3. One equation, second order

    Since i = C·v′, we get i′ = C·v″, where v″ (the second derivative) is how fast v′ changes. Divide by LC: v″ + 2α·v′ + ω₀²·v = 0, with α = R/2L = 2800 and ω₀ = 1/√(LC) = 10 000 per second.

    >>> L, R, C = 0.01, 56, 1e-6
    >>> R / (2 * L)          # alpha, per second
    2800.0
    >>> 1 / (L * C) ** 0.5   # omega0, radians per second
    10000.0
  4. Guess v = e^(st)

    Try v = e^(st). Each derivative just multiplies it by s: v′ = s·v and v″ = s²·v. Every term now shares e^(st), which is never zero, so divide it out. What is left is the characteristic equation: s² + 2α·s + ω₀² = 0.

    >>> import math
    >>> s, t, h = -5000, 2e-4, 1e-9
    >>> v = math.exp(s * t)                       # e^(st) is never 0
    >>> v
    0.36787944117144233
    >>> round((math.exp(s * (t + h)) - v) / h / v)  # slope ÷ value = s
    -5000
  5. Two roots, here complex

    The quadratic formula gives s = −α ± √(α² − ω₀²). Here α² is less than ω₀², so the square root is of a negative number: s = −2800 ± j9600 per second, where j = √−1. Each root is a point on the s-plane.

    >>> import cmath
    >>> a, w0 = 2800, 10000
    >>> cmath.sqrt(a*a - w0*w0)
    9600j
    >>> s = -a + 9600j
    >>> s*s + 2*a*s + w0*w0      # put the root back in
    0j
  6. Complex roots ring

    Complex roots give v = e^(−αt)·(10·cos 9600t + 2.92·sin 9600t). The real part, −α, shrinks each swing. The imaginary part, 9600, sets how fast it rings. Energy sloshes between capacitor and inductor, and the resistor turns a little into heat each swing.

    >>> import math
    >>> a, wd = 2800, 9600
    >>> v = lambda t: math.exp(-a*t) * (10*math.cos(wd*t) + 10*a/wd*math.sin(wd*t))
    >>> v(0)
    10.0
    >>> round(v(math.pi / wd), 2)    # first dip, t = 0.33 ms
    -4.0
  7. The damping ratio ζ

    Compare α with ω₀. The damping ratio ζ = α/ω₀ is 0.28 here. Below 1 the roots are complex and the circuit rings: underdamped. At exactly 1 the two roots meet. Above 1 they are two real numbers: overdamped.

    >>> L, C = 0.01, 1e-6
    >>> for R in (56, 200, 250):
    ...     print(R, R / 2 * (C / L) ** 0.5)   # zeta = alpha / omega0
    ...
    56 0.28
    200 1.0
    250 1.25
  8. Critical damping: ζ = 1

    Raise R to 200 Ω: now α = ω₀, so ζ = 1. The roots slide round a circle and meet at −10 000, a double root. Then v = 10·(1 + 10 000t)·e^(−10 000t): the fastest return to zero without dipping below it.

    >>> import math
    >>> v = lambda t: 10 * (1 + 10000*t) * math.exp(-10000*t)
    >>> round(v(2e-4), 3), round(v(5e-4), 3)   # at 0.2 ms and 0.5 ms
    (4.06, 0.404)
  9. Overdamped: ζ above 1

    At 250 Ω, ζ = 1.25. The roots split along the real line to −5000 and −20 000. Then v = 13.3·e^(−5000t) − 3.3·e^(−20 000t). It never rings, but the slow −5000 part makes it creep: at 0.5 ms it is still 1.1 V.

    >>> import math
    >>> v = lambda t: 40/3*math.exp(-5000*t) - 10/3*math.exp(-20000*t)
    >>> v(0)
    10.0
    >>> round(v(5e-4), 3)    # at 0.5 ms
    1.094
  10. The roots in Python

    Python's cmath module takes square roots of negative numbers and writes j for √−1. With R back at 56 Ω, the card prints (-2800+9600j) (-2800-9600j): the same two roots, in radians per second.

    >>> import cmath
    >>> L, R, C = 0.01, 56, 1e-6
    >>> a = R / (2 * L)
    >>> w0 = 1 / (L * C) ** 0.5
    >>> d = cmath.sqrt(a*a - w0*w0)
    >>> print(-a + d, -a - d)
    (-2800+9600j) (-2800-9600j)

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