Earthquake Feedforward Control of Structural Vibration¶
Background¶
An active structural-control actuator can apply force to reduce motion during an earthquake. The achievable reduction depends on the structural dynamics, the force limit, and what is known about the future excitation. This example isolates that trade-off with one damped structural mode and a prescribed synthetic ground-acceleration record.
The optimized command is ideal open-loop feedforward computed with the entire record known in advance. It is not a causal feedback controller and should not be interpreted as an implementable earthquake-warning strategy.
Excitation and SDOF model¶
The 20-second ground acceleration is
where \(g=9.80665\ \mathrm{m/s^2}\). Let \(x\) be relative/modal displacement and \(v=\dot x\) its velocity. The actual actuator force is represented by a normalized control \(u\):
For modal mass \(m_s\), natural frequency \(\omega_n\), and damping ratio \(\zeta\), the base-excited single-degree-of-freedom dynamics are
The parameter values are
Objective, endpoints, and constraints¶
The structure starts and ends at rest:
The normalized objective balances displacement, velocity, and control effort:
The path bounds are
The passive comparison is not part of the constrained optimization and can exceed the \(80\) mm active-trajectory displacement limit.
Variables and units¶
| Symbol | Meaning | Unit |
|---|---|---|
| \(t\) | Time | s |
| \(x\) | Relative or modal structural displacement | m |
| \(v\) | Relative or modal velocity | m/s |
| \(a_g\) | Prescribed ground acceleration | m/s² |
| \(u\) | Normalized actuator command | dimensionless |
| \(F\) | Ideal actuator force | N |
| \(m_s\) | Modal mass | kg |
| \(\omega_n\) | Undamped natural angular frequency | rad/s |
| \(\zeta\) | Modal damping ratio | dimensionless |
| \(J\) | Integral of normalized penalties | s |
Modeling choices and limits¶
Relative/modal displacement is the correct coordinate for the base-excited SDOF equation; it should not be read as an absolute floor displacement or a multi-storey drift profile. A \(160\times4\) Lobatto mesh resolves both frequency components of the prescribed excitation.
The actuator is ideal: force follows \(u(t)\) instantaneously, with no force-rate limit, delay, saturation dynamics, stroke, power, energy, or attachment model. The controller has noncausal knowledge of the complete earthquake record. There is no state estimator, feedback law, robustness analysis, soil-structure interaction, higher mode, yielding, or uncertain parameter. These omissions make the example useful for an optimistic feedforward performance bound, not for controller deployment.
Run the example¶
Save the figure without opening a window:
Independent numerical validation¶
The collocation solution is reconstructed at 4,001 times. The force samples are linearly interpolated and the physical SDOF equations are independently integrated with a high-accuracy DOP853 solver. The same solver computes a passive response with \(u(t)=0\). The script compares the reintegrated state with the collocation state, checks the terminal rest condition and all dense bounds, and integrates squared physical force.
| Quantity | Verified value |
|---|---|
| Objective \(J\) | \(0.02300351\) |
| Passive peak relative/modal displacement | \(395.2115\ \mathrm{mm}\) |
| Controlled peak relative/modal displacement | \(1.1492\ \mathrm{mm}\) |
| Peak ideal actuator force | \(885.675\ \mathrm{kN}\) |
| Integral squared actuator force | \(1.127056\times10^{12}\ \mathrm{N^2\,s}\) |
| Maximum forward displacement error | \(4.844\times10^{-5}\ \mathrm m\) |
| Maximum forward velocity error | \(6.712\times10^{-4}\ \mathrm{m/s}\) |
| Maximum dense path-bound violation | \(0\) at printed precision |
The dramatic reduction from \(395.2115\) mm to \(1.1492\) mm is possible partly because the optimizer sees the entire future excitation and commands an ideal actuator. It is a numerical result for this deterministic teaching model, not an expected reduction for a causal real-world controller.

Source code¶
See the complete runnable example:
examples/structural_vibration_control.py.