Underdamped (ζ < 1)
System oscillates with decreasing amplitude. Common in musical instruments and some vehicle suspensions.
By the end of this lecture, you should be able to:
A spring-mass system consists of a mass m connected to a spring with stiffness k, often with some damping c.
Key Variables:
Undamped System:
Natural frequency:
Period:
With Damping:
Damping ratio:
Damped frequency:
With External Force:
Amplitude at steady state:
where
import numpy as npimport matplotlib.pyplot as pltfrom matplotlib.animation import FuncAnimation
# System parametersm = 1.0 # Mass (kg)k = 10.0 # Spring constant (N/m)c = 0.5 # Damping coefficient (N⋅s/m)
# Initial conditionsx0 = 0.1 # Initial displacement (m)v0 = 0.0 # Initial velocity (m/s)
# Time parametersdt = 0.01t_max = 10time = np.arange(0, t_max, dt)
# Calculate natural frequencyomega_n = np.sqrt(k/m)print(f"Natural frequency: {omega_n:.2f} rad/s")print(f"Natural period: {2*np.pi/omega_n:.2f} s")
def spring_mass_ode(x, v, t, force=0): """Spring-mass system equations""" dx_dt = v dv_dt = (force - c*v - k*x) / m return dx_dt, dv_dt
# Solve the systemx = np.zeros(len(time))v = np.zeros(len(time))
x[0] = x0v[0] = v0
for i in range(len(time)-1): # External force (can be modified) F_external = 0 # Free vibration
dx, dv = spring_mass_ode(x[i], v[i], time[i], F_external) x[i+1] = x[i] + dx * dt v[i+1] = v[i] + dv * dt
# Create visualizationfig, (ax1, ax2) = plt.subplots(2, 1, figsize=(10, 8))
# Plot displacement vs timeax1.plot(time, x)ax1.set_ylabel('Displacement (m)')ax1.set_title('Spring-Mass System Response')ax1.grid(True)
# Plot phase portrait (velocity vs displacement)ax2.plot(x, v)ax2.set_xlabel('Displacement (m)')ax2.set_ylabel('Velocity (m/s)')ax2.set_title('Phase Portrait')ax2.grid(True)
plt.tight_layout()plt.show()
F(t) = 0.0 × cos(1.0t)
Try this: Set damping to 0 for pure oscillation, or match forcing frequency to natural frequency for resonance!
Underdamped (ζ < 1)
System oscillates with decreasing amplitude. Common in musical instruments and some vehicle suspensions.
Critically Damped (ζ = 1)
Fastest return to equilibrium without overshoot. Ideal for door closers and some control systems.
Overdamped (ζ > 1)
Slow return to equilibrium without oscillation. Used in heavy machinery mounts.
Resonance
When forcing frequency equals natural frequency, amplitude becomes very large. Must be avoided in structures.
Vehicle Suspension Analysis
A car’s suspension can be modeled as a spring-mass system. Given:
Calculate the natural frequency and damping ratio.
Natural frequency:
Natural period:
Damping ratio:
Since ζ < 1, the system is underdamped and will oscillate with decreasing amplitude.
Add this code to explore how the system responds to different forcing frequencies:
# Frequency sweepfrequencies = np.logspace(-1, 2, 100) # 0.1 to 100 rad/samplitudes = []
for omega in frequencies: r = omega / omega_n zeta = c / (2 * np.sqrt(k * m))
# Steady-state amplitude amplitude = 1 / np.sqrt((1 - r**2)**2 + (2*zeta*r)**2) amplitudes.append(amplitude)
plt.figure()plt.loglog(frequencies/omega_n, amplitudes)plt.xlabel('Frequency Ratio (ω/ωₙ)')plt.ylabel('Amplitude Ratio')plt.title('Frequency Response')plt.grid(True)plt.show()
Earthquake Simulation
Model a building as a spring-mass system subjected to earthquake motion:
Parameters:
With these fundamentals, you can now model more complex systems like:
Comments