This tool simulates an inverted pendulum: a mass on top of a light rigid column, pivoted at the ground and held upright by a rotational spring at its base, like a tall building swaying in the wind. A rotational damper resists the motion, and an optional horizontal force pushes on the mass. For small angles its motion follows the ODE below, where θ is the column's angle from vertical (in radians) at time t, θ′ is the angular velocity, θ″ is the angular acceleration, m is the mass, L the height, c the damping, κ the base stiffness, g = 9.81, and F(t) is an external force you choose from a family of common functions.
Set the parameters and the forcing, then watch the motion, the angle–angular-velocity phase portrait, and the time series move together. Gravity appears in the equation as −mgL, which weakens the base spring. If κ < mgL, the column cannot stand upright and tips over (see Physics & Mathematics).
The phase portrait is shown only when the equation is autonomous, that is, when the external force does not change with (no forcing, or a constant force).
With the current , the direction field changes from moment to moment, so a single – portrait does not describe the motion. Follow it in the time series instead.
Take as the column's angle from vertical, positive when it leans to the right, and add up the torques about the pivot at its base. The mass sits at height , so its moment of inertia about the pivot is . Gravity pulls the tilted mass further over with torque . The base spring pushes back with , and the damper resists with . The horizontal force on the mass acts with lever arm :
Writing and , the equation of motion is
is the effective stiffness. Gravity lowers it from to , so a heavier or taller structure is effectively softer. Structural engineers call this the P-delta effect. When the column sways about the upright position. When gravity wins and the column tips over.
The exact torques contain and , which make the equation nonlinear. Their Taylor series are
When is small, the higher powers are tiny, so and . Keeping only these first terms makes the equation linear with constant coefficients. Everything in the sections below depends on that: the characteristic equation, superposition, undetermined coefficients, variation of parameters and Laplace transforms all require a linear equation. The relative errors of the two approximations grow roughly like and :
| (rad) | (degrees) | error of | error of | |
|---|---|---|---|---|
| 0.05 | 2.9° | 0.0500 | 0.04% | 0.13% |
| 0.10 | 5.7° | 0.0998 | 0.17% | 0.50% |
| 0.20 | 11.5° | 0.1987 | 0.67% | 2.0% |
| 0.35 | 20.1° | 0.3429 | 2.1% | 6.5% |
| 0.50 | 28.6° | 0.4794 | 4.3% | 14% |
| 1.00 | 57.3° | 0.8415 | 19% | 85% |
Real buildings sway far less than this. Design guidelines typically limit wind sway to a drift of about to of the height, which is a few thousandths of a radian, so the small-angle model describes them very well. It breaks down when the angle grows large, for example near resonance or when the column tips over. The Signatures panel warns you whenever exceeds 0.35 rad (about 20°) during a run.
With forcing, every solution is a homogeneous solution plus one particular solution:
The homogeneous part solves and carries the two constants and , which the initial conditions set. Its two building blocks and are listed in the four-cases table in the next section. The particular part is any one solution of the full equation and has no free constants. The next two sections find each part in turn.
When and , both characteristic roots have negative real part, so decays to zero and approaches . For periodic forcing, is therefore called the steady state. In the time series, the "show " and "show " options overlay each part on the angle plot, and at every moment the two add up to . When , never decays, so the natural sway stays mixed in with the forced one. When , grows and there is no steady state.
Without forcing the equation is . Because it is linear with constant coefficients, look for solutions of the form . Substituting gives , and since is never zero, must solve the characteristic equation
The quadratic formula gives its roots. Their two terms are worth naming, because they reappear in every case below:
When , the square root is imaginary, , which is where the form comes from.
When , dividing by puts the characteristic equation in standard form, which defines the natural frequency and the damping ratio :
Because the leading coefficient is now 1, the product and the sum of the roots give both of them back:
For complex roots , this means , the distance of the roots from the origin in the complex plane, and . For real roots, is the arithmetic mean of and divided by their geometric mean, so , with equality only when the two roots coincide.
When , the sign of the discriminant , or equivalently whether is less than, equal to, or greater than 1, decides the case. The two roots are the values listed as eigenvalues in the Signatures panel, and the case name there matches the table below. Each parameter preset puts the system in one of these cases.
| Case | Condition | Roots | Motion | |
|---|---|---|---|---|
| Undamped | Sways forever with constant amplitude and period . | |||
| Underdamped | Sways inside the decaying envelope , with quasi-period , longer than the undamped period. | |||
| Critically damped | (repeated) | No swaying, and it passes upright at most once. This is the fastest return to rest without swaying for a given and . | ||
| Overdamped | , both negative | No swaying, and it passes upright at most once. The return gets slower as grows, because moves toward 0. |
Here is the repeated root, and , with the root closer to zero.
When , gravity's tipping torque beats the base spring and is negative. Then , so the discriminant is positive for every , and the roots are real with opposite signs, :
Unless exactly, the term grows and the column tips over, until the angle is too large for the small-angle model. In the phase portrait the equilibrium is a saddle. The natural frequency and damping ratio are only defined for , so the Signatures panel shows them as —. When exactly, the roots are and , so : the column neither returns nor falls, but settles at a new constant angle.
There are two standard methods for finding . In both, the right-hand side is the torque .
This method applies when is a polynomial, an exponential, a sine or cosine, or sums and products of these. Take the trial form listed for your forcing in the forcing-family table below, substitute it into , and solve for its coefficients. If the trial form already solves the homogeneous equation, multiply it by . For example, with and the trial form is itself a homogeneous solution, so becomes . That is pure resonance, and it is the case the page flags.
This method works for any continuous . The formula needs a leading coefficient of 1, so divide the equation by first, which makes the right-hand side . With and from the homogeneous solution,
Integrate and to get and . The Wronskian is never zero, and for each case it is
| Case | |||
|---|---|---|---|
| Undamped | |||
| Underdamped | |||
| Critically damped | |||
| Overdamped or unstable |
Variation of parameters handles forcings that have no trial form, such as the square and sawtooth waves, at the cost of two integrals. When a trial form exists, undetermined coefficients is usually faster.
A step or a pulse is constant on each time interval, so on each interval while the force is on and 0 while it is off. That is the steady lean of a building in a steady wind. At each switch, and carry over continuously, and and are found again from those values. An impulse delivers linear momentum to the mass, which is angular momentum about the base, so stays continuous but jumps:
After the push the motion is free, starting from that new angular velocity.
Let and , with and . Transforming the equation turns it into algebra in :
The first term comes from the initial conditions alone. Its inverse transform is the free motion that starts from and , which is a homogeneous solution. The second term comes from the forcing alone, with the column starting upright and at rest. Both terms share the denominator , the characteristic polynomial with in place of , so its zeros, the poles of , are exactly the characteristic roots. For the first term, partial fractions and the inverse transform give each case directly, with the constants already fixed by the initial conditions:
| Case | Condition and roots | Denominator | Partial fractions | Free motion |
|---|---|---|---|---|
| Undamped | ||||
| Underdamped | ||||
| Critically damped | ||||
| Overdamped | ||||
| Unstable |
Completing the square in the underdamped denominator is what produces the shift , and the first shifting theorem turns that shift into the envelope . A repeated pole gives , whose inverse transform is , which is where the extra factor of in the critically damped case comes from. In the unstable case the positive pole is what makes the motion grow.
The forcing term works the same way once from the forcing-family table is multiplied in. Its denominator then also contains the poles of , and those poles produce . When a pole of lands on a characteristic root, that pole becomes repeated. This is the Laplace view of the multiply-by- rule for resonance.
Laplace transforms are especially convenient for switched forcing, like a gust that starts at . The second shifting theorem,
turns a delay into the factor . That is why the step, pulse and impulse in the forcing-family table have such simple transforms, and why the response to a force switched on at is the response to the same force switched on at 0, shifted to start at . For the impulse from rest, , the impulse response of the column.
Trial forms use undetermined coefficients and . If a trial form already solves the homogeneous equation, multiply it by . The square and sawtooth waves have no finite trial form, so use their Fourier series term by term, variation of parameters, or the Laplace transform. The torque on the column is , so its transform is .
| Name | Parameters | Trial form of |
|---|
For sinusoidal forcing, or , with and , the homogeneous part dies out and the column sways at the forcing frequency with steady-state amplitude and phase lag :
is largest where the expression under the square root is smallest. Setting its derivative with respect to equal to zero gives
This is the practical resonance frequency. It exists only when , that is . For heavier damping, decreases steadily from and there is no practical resonance. With no damping, and is unbounded there, which is pure resonance. For a building, this is why wind or ground shaking near the natural sway frequency is dangerous, and why tall buildings add damping. When there is no steady state at all.