Solve forced nonlinear oscillators using harmonic balance quickly. Estimate amplitude, phase, and resonance shifts accurately. Tune parameters, compare cases, and export computed results easily.
This solver applies single-harmonic balance to the forced Duffing model
m x'' + c x' + k x + α x³ = F cos(ωt).
With the trial response x(t)=A cos(ωt−φ), the amplitude must satisfy:
[ (k + (3/4)αA² − mω²)² + (cω)² ] A² = F².
The phase is computed from:
φ = atan2(cω, k + (3/4)αA² − mω²).
Note: This is a first-harmonic approximation; strongly nonlinear motion can require multi-harmonic balance or time-domain integration.
| m (kg) | c (N·s/m) | k (N/m) | α (N/m³) | F (N) | ω (rad/s) | Typical A (m) | Typical φ (deg) |
|---|---|---|---|---|---|---|---|
| 1.0 | 0.2 | 10 | 50 | 1.5 | 2.5 | 0.10–0.30 | 10–60 |
| 1.0 | 0.5 | 10 | 50 | 1.5 | 2.5 | 0.05–0.20 | 20–80 |
| 1.0 | 0.2 | 10 | -30 | 1.5 | 2.5 | 0.08–0.35 | 10–70 |
These ranges are illustrative; your computed values depend on ω, α, and damping.
Many oscillators settle into periodic steady motion under sinusoidal forcing. Harmonic balance targets that regime directly, avoiding long time simulations. It is common in vibration isolation, rotating machinery, MEMS resonators, and nonlinear energy harvesters where response at the drive frequency is the key design quantity.
The calculator uses a forced Duffing form:
m x'' + c x' + k x + α x³ = F cos(ωt). Mass m sets inertia, damping c models losses,
stiffness k controls the linear restoring force, and cubic stiffness α captures nonlinearity.
Positive α yields hardening; negative α yields softening.
Assuming x(t)=A cos(ωt−φ), harmonic balance gives:
[ (k + (3/4)αA² − mω²)² + (cω)² ] A² = F².
Solving this nonlinear algebraic equation returns the steady amplitude A. The term
k + (3/4)αA² acts like an amplitude-dependent stiffness, so resonance shifts as A changes.
Phase φ describes lag between displacement and forcing. With light damping, φ moves from near 0° at low ω toward
180° at high ω, often passing near 90° around resonance. This calculator evaluates
φ = atan2(cω, k + (3/4)αA² − mω²) for stable angle selection.
Hardening systems (α > 0) tend to push peak response to higher ω; softening systems (α < 0) pull it lower. In practice, engineers map amplitude versus ω using frequency sweeps, then identify safe operating bands and avoid jump phenomena near bistable regions. In lightly damped cases, more than one amplitude may satisfy the equation at the same ω. That multivalued behavior can cause jump-up and jump-down transitions during sweeps. Using smaller ω steps and reusing the previous A as A₀ helps track a consistent branch.
Newton iterations can converge in roughly 5–20 steps when the initial guess is close. Bisection is slower but reliable because it maintains a bracketed sign change in the residual. Tight tolerances like 1e−10 improve repeatability when exporting results for reporting or regression checks.
Use A to verify clearances, displacement limits, and fatigue margins. Use φ to interpret whether energy flows mainly into damping or stiffness. For robust workflows, evaluate several ω values, compare parameter sets, and export CSV/PDF to document operating points and build frequency-response curves.
It estimates the steady periodic amplitude and phase for a sinusoidally forced Duffing oscillator using single-harmonic balance, then reports A, φ, an effective stiffness term, and derived indicators.
It is best when motion is close to sinusoidal and higher harmonics stay small, which is typical for moderate nonlinearity, moderate damping, and forcing not deep into strongly nonlinear regimes.
Positive α indicates hardening behavior, usually shifting resonance toward higher frequencies as amplitude grows. Negative α indicates softening behavior, often shifting resonance toward lower frequencies as amplitude grows.
Newton can jump away from the root with a poor start or near-flat slopes. Bisection stays inside a bracketing interval and steadily reduces uncertainty, so it is more reliable for tough parameter sets.
Start with the linear estimate A≈F/√((k−mω²)²+(cω)²). If multiple solutions may exist, try several A₀ values to explore different solution branches.
φ measures lag between forcing and displacement. Small φ suggests stiffness-dominated response, while φ near 90° indicates strong damping influence. Tracking φ across ω helps interpret resonance and stability changes.
Yes. Run the solver over a sweep of ω values and record A and φ. Export each case to CSV, then combine the results into a single dataset for plotting and comparison.
Important Note: All the Calculators listed in this site are for educational purpose only and we do not guarentee the accuracy of results. Please do consult with other sources as well.