Skip to article frontmatterSkip to article content
Site not loading correctly?

This may be due to an incorrect BASE_URL configuration. See the MyST Documentation for reference.

3. Duhamel’s Integral, Impulse Response, Base Excitation & Vibration Absorbers

ISAE-SUPAERO

Solved reference notebook. See 03_Duhamel_Impulse_BaseExcitation_Exercises.ipynb for the blanked-out version.

import numpy as np
import matplotlib.pyplot as plt
import control
from scipy.integrate import solve_ivp

plt.rcParams["figure.figsize"] = (7, 4.2)
plt.rcParams["axes.grid"] = True

3.1 Systems analysis and Duhamel’s principle

Consider a linear system ax¨+bx˙+cx=f(t)a\ddot x+b\dot x+cx=f(t) (constant coefficients, initially at rest). Its Laplace transform gives X(s)=H(s)F(s)X(s)=H(s)F(s) with transfer function H(s)=1/(as2+bs+c)H(s)=1/(as^2+bs+c). The impulse response function is h(t)=L−1{H(s)}h(t)=\mathcal{L}^{-1}\{H(s)\}, and by the convolution theorem

x(t)=∫0th(τ) f(t−τ) dτ(Duhamel’s principle)x(t) = \int_0^t h(\tau)\,f(t-\tau)\,d\tau \qquad \text{(Duhamel's principle)}

For an underdamped SDOF system, the impulse response is derived from the initial-velocity response to a unit impulse (Fδt=1⇒x˙0=1/mF\delta t = 1 \Rightarrow \dot x_0 = 1/m):

h(t)=e−ζωntmωdsin⁡(ωdt)h(t) = \frac{e^{-\zeta\omega_n t}}{m\omega_d}\sin(\omega_d t)

and the convolution (Duhamel) integral for an arbitrary force F(t)F(t) is

x(t)=1mωd∫0tF(τ) e−ζωn(t−τ)sin⁡[ωd(t−τ)] dτx(t) = \frac{1}{m\omega_d}\int_0^t F(\tau)\,e^{-\zeta\omega_n(t-\tau)}\sin[\omega_d(t-\tau)]\,d\tau

h(t)h(t) characterizes the system; f(t)f(t) is the input; x(t)x(t) is the output.

def impulse_response(t, m, zeta, wn):
    wd = wn * np.sqrt(1 - zeta**2)
    return np.exp(-zeta * wn * t) / (m * wd) * np.sin(wd * t)


m, wn, zeta = 1.0, 1.0, 0.01
t = np.linspace(0, 40, 2000)
fig, ax = plt.subplots()
ax.plot(t, impulse_response(t, m, zeta, wn))
ax.set_xlabel("Time [s]")
ax.set_ylabel("h(t)")
ax.set_title(rf"Impulse response, $\omega_n=1$, $\zeta={zeta}$")
plt.show()
<Figure size 700x420 with 1 Axes>

3.2 Exercise “Ex2B” — simulating the response to an arbitrary input

Simulate the response of the LTI system from Chapter 2 (sys, with ζ=0.1\zeta=0.1) to a sine-wave input f(t)=sin⁡(t)f(t)=\sin(t) over 80 s — the Python equivalent of MATLAB’s lsim(sys, f, t).

m, k = 1.0, 1.0
zeta = 0.1
c = 2 * zeta * np.sqrt(k * m)
sys = control.tf([1], [m, c, k])

t = np.linspace(0, 80, 4000)
f = np.sin(1.0 * t)

t_out, x_out = control.forced_response(sys, T=t, U=f)

fig, ax = plt.subplots()
ax.plot(t_out, x_out)
ax.set_xlabel("Time [s]")
ax.set_ylabel("x(t)")
ax.set_title("lsim-equivalent: response of the SDOF LTI system to a sine input")
plt.show()
<Figure size 700x420 with 1 Axes>

Because the system is LTI and the input is a pure sine, the (steady-state) output is also a sine at the same frequency — only the amplitude and phase are changed, exactly as predicted by the FRF of Chapter 2 evaluated at ω=1 rad/s\omega=1\,\text{rad/s}.

Cross-check: forced_response vs. a direct numerical Duhamel convolution

Let’s verify that control.forced_response (which integrates the state-space realization internally) agrees with literally evaluating the Duhamel convolution integral x=f∗hx=f*h numerically.

dt = t[1] - t[0]
h = impulse_response(t, m, zeta, wn=np.sqrt(k / m))
x_duhamel = np.convolve(f, h)[: len(t)] * dt

fig, ax = plt.subplots()
ax.plot(t_out, x_out, label="control.forced_response")
ax.plot(t, x_duhamel, "--", label="Duhamel convolution (numpy.convolve)")
ax.set_xlabel("Time [s]")
ax.set_ylabel("x(t)")
ax.legend()
ax.set_title("Duhamel's principle verified numerically")
plt.show()

print("Max abs difference (steady part, t>10s):",
      np.max(np.abs(x_out[t > 10] - x_duhamel[t > 10])))
<Figure size 700x420 with 1 Axes>
Max abs difference (steady part, t>10s): 0.00016998614710317383

3.3 Base excitation

Base excitation

A structure of mass mm is connected to a moving base through stiffness kk and viscous damping cc. This models, e.g., a car suspension excited by the road, or a building base excited by ground motion. The equation of motion is

mx¨+c(x˙−y˙)+k(x−y)=0m\ddot{x} + c(\dot x-\dot y) + k(x-y) = 0

Often, machines are harmonically excited through their elastic mounting — see e.g. satellite or building modal-analysis demonstrations on YouTube.

(a) Displacement transmissibility. Assume y=Yejωty=Ye^{j\omega t}, x=Xejωtx=Xe^{j\omega t}. Substituting into the EoM and solving for X/YX/Y (with r=ω/ωnr=\omega/\omega_n):

XY=1+2jζr(1−r2)+2jζr⇒∣XY∣=1+(2ζr)2(1−r2)2+(2ζr)2\frac{X}{Y} = \frac{1+2j\zeta r}{(1-r^2)+2j\zeta r} \qquad\Rightarrow\qquad \left|\frac{X}{Y}\right| = \sqrt{\frac{1+(2\zeta r)^2}{(1-r^2)^2+(2\zeta r)^2}}

(b) Force transmissibility. The force transmitted to the structure is FT=k(x−y)+c(x˙−y˙)=−mx¨F_T=k(x-y)+c(\dot x-\dot y) = -m\ddot x. Working through the same complex algebra,

FTkY=r2 1+2jζr(1−r2)+2jζr⇒∣FTkY∣=r2∣XY∣\frac{F_T}{kY} = r^2\,\frac{1+2j\zeta r}{(1-r^2)+2j\zeta r} \qquad\Rightarrow\qquad \left|\frac{F_T}{kY}\right| = r^2\left|\frac{X}{Y}\right|
r = np.linspace(0.01, 4, 800)
fig, axes = plt.subplots(1, 2, figsize=(11, 4.2))
for zeta in [0.05, 0.1, 0.25, 0.5, 0.7, 1.0]:
    TR = np.sqrt((1 + (2 * zeta * r) ** 2) / ((1 - r**2) ** 2 + (2 * zeta * r) ** 2))
    axes[0].plot(r, TR, label=rf"$\zeta={zeta}$")
    axes[1].plot(r, r**2 * TR, label=rf"$\zeta={zeta}$")

for ax, title in zip(axes, ["Displacement transmissibility |X/Y|",
                             "Force transmissibility |F_T/(kY)|"]):
    ax.axvline(np.sqrt(2), color="k", ls=":", lw=1)
    ax.set_xlabel(r"Frequency ratio $r=\omega/\omega_n$")
    ax.set_title(title)
    ax.legend(fontsize=8)
axes[0].axhline(1, color="k", lw=0.6)
plt.tight_layout()
plt.show()
<Figure size 1100x420 with 2 Axes>

The dotted vertical line marks r=2r=\sqrt{2}: for r<2r<\sqrt{2}, isolation is worse than doing nothing (TR>1TR>1); beyond r=2r=\sqrt{2}, higher damping actually starts to hurt isolation performance (the classic vibration-isolation design trade-off).

3.4 Vibration suppression: the Dynamic Vibration Absorber (DVA)

A Dynamic Vibration Absorber is a secondary mass-spring(-damper) system attached to a primary structure to reduce its dynamic response. It was first applied by Frahm (1909) to reduce ship rolling/hull vibrations; Ormondroyd & Den Hartog (1928) gave the theory, and Den Hartog’s Mechanical Vibrations (1940) remains the classic reference for optimal tuning.

The idea: tune the absorber’s natural frequency ωa=ka/ma\omega_a=\sqrt{k_a/m_a} to the troublesome primary resonance ωp=kp/mp\omega_p=\sqrt{k_p/m_p}. Let’s demonstrate the effect on a simple undamped 2-mass system, primary mass mp=1m_p=1, kp=1k_p=1 (so ωp=1\omega_p=1,rad/s), harmonically forced at the primary mass.

def two_mass_frf(w, mp, kp, ma, ka, cp=0.0, ca=0.0):
    """Complex FRF X_primary/F for a primary mass with an attached absorber."""
    Zp = -mp * w**2 + 1j * cp * w + kp
    Za = -ma * w**2 + 1j * ca * w + ka
    # 2x2 dynamic stiffness matrix (coupling term -ka - j*ca*w)
    K11, K12 = Zp + ka + 1j * ca * w, -(ka + 1j * ca * w)
    K21, K22 = -(ka + 1j * ca * w), Za
    det = K11 * K22 - K12 * K21
    Xp = K22 / det  # response to unit force on primary mass
    return Xp


mp, kp = 1.0, 1.0
w = np.linspace(0.2, 2.0, 2000)

fig, ax = plt.subplots()
Xp_noabsorber = 1.0 / (-mp * w**2 + kp)
ax.semilogy(w, np.abs(Xp_noabsorber), label="No absorber")

for mass_ratio in [0.05, 0.1, 0.2]:
    ma = mass_ratio * mp
    ka = ma * (1.0) ** 2  # tuned: omega_a = omega_p = 1
    Xp = two_mass_frf(w, mp, kp, ma, ka, cp=0.0, ca=0.02 * ka)
    ax.semilogy(w, np.abs(Xp), label=rf"Tuned absorber, $m_a/m_p={mass_ratio}$")

ax.set_xlabel(r"Forcing frequency $\omega$ [rad/s]")
ax.set_ylabel(r"$|X_{\text{primary}}/F|$")
ax.set_title("Effect of a tuned dynamic vibration absorber")
ax.legend(fontsize=8)
plt.show()
<Figure size 700x420 with 1 Axes>

A perfectly tuned absorber creates an anti-resonance (a notch) exactly at ωp\omega_p, splitting the single primary resonance into two new peaks straddling it — the essence of DVA design (with real damping, Den Hartog showed there is an optimal ζa\zeta_a that minimizes the worst-case peak across both new resonances).