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.

For seven chapters we have studied one oscillator: a mass on a spring with a dashpot, ringing at a single period. A real building has many floors, each free to move sideways, so it has many degrees of freedom and many periods. It might seem that we have to start over, but we do not, because of a central result of structural dynamics.

A linear multi-degree-of-freedom (MDOF) structure with classical damping is not one complicated system but a set of independent SDOF oscillators in disguise. Each one is exactly the oscillator we already know how to solve, with its own period, its own damping and its own share of the load. The method that reveals them is modal analysis. By the end of this chapter you will take a three-story building, find its hidden oscillators, drive each one with the Chapter-3 engine, add the answers back up, and watch them reproduce a full direct integration of the coupled building to machine precision.

1A shear building and its matrices

Picture a three-story frame whose floors are rigid and heavy and whose columns are light and flexible, the classic shear building. The mass piles up at the floor levels, and the only motion that matters is the sideways displacement of each floor. With one horizontal degree of freedom per floor, the building has three DOFs, the floor displacements u1,u2,u3u_1, u_2, u_3 relative to the ground, numbered from the bottom floor up.

A three-story shear building (left) and its idealization (right) as lumped floor masses m_i joined by story springs k_i, with the floor displacements u_1, u_2, u_3 as the degrees of freedom.

Figure 1:A three-story shear building (left) and its idealization (right) as lumped floor masses mim_i joined by story springs kik_i, with the floor displacements u1,u2,u3u_1, u_2, u_3 as the degrees of freedom.

Two matrices encode the structure, playing the roles that the single numbers mm and kk played for the SDOF. The mass matrix is diagonal (each floor’s inertia sits on its own DOF, with no coupling), so it is just the lumped floor masses on the diagonal:

M=[m1000m2000m3].\mathbf{M} = \begin{bmatrix} m_1 & 0 & 0 \\ 0 & m_2 & 0 \\ 0 & 0 & m_3 \end{bmatrix}.

The stiffness matrix is where the floors talk to each other. Story ii has a shear stiffness kik_i (the combined lateral stiffness of its columns), and it resists the story drift, the difference between the displacements of the floors above and below it. Assembling the story springs into a chain gives the familiar tridiagonal form:

K=[k1+k2−k20−k2k2+k3−k30−k3k3].\mathbf{K} = \begin{bmatrix} k_1 + k_2 & -k_2 & 0 \\ -k_2 & k_2 + k_3 & -k_3 \\ 0 & -k_3 & k_3 \end{bmatrix}.

Each diagonal entry collects the stiffness of the springs meeting at that floor; each off-diagonal is minus the spring shared between two floors. We build both matrices in code for a slightly top-light building, whose roof carries less mass, with stiffer lower stories, as is common in real buildings.

M (t) =
 [[3. 0. 0.]
 [0. 3. 0.]
 [0. 0. 2.]]

K (kN/m) =
 [[ 4200. -1800.     0.]
 [-1800.  3000. -1200.]
 [    0. -1200.  1200.]]

The equation of motion is the SDOF equation of motion from Chapter 1 with the scalars promoted to matrices and the response promoted to a vector u=[u1,u2,u3]T\mathbf{u} = [u_1, u_2, u_3]^\mathsf{T}:

M u¨+C u˙+K u=p(t).\mathbf{M}\,\ddot{\mathbf{u}} + \mathbf{C}\,\dot{\mathbf{u}} + \mathbf{K}\,\mathbf{u} = \mathbf{p}(t).

Read it exactly as before, inertia plus damping plus stiffness equals load, only now M\mathbf{M}, C\mathbf{C}, K\mathbf{K} are 3×33\times 3 and the three equations are coupled: the off-diagonal −k2-k_2, −k3-k_3 terms mean floor 1’s motion pushes on floor 2, and so on. That coupling is what makes a building feel complicated, and modal analysis will untangle it.

2Modes and frequencies

Set the damping and load aside (C=0\mathbf{C}=\mathbf{0}, p=0\mathbf{p}=\mathbf{0}) and ask the question that worked so well for the single oscillator in Chapter 2: can the building vibrate in a fixed shape that simply scales up and down in time? Figure 2 shows such a motion: the building is released from rest in its first mode, which we compute later in this section, and vibrates freely. Every floor moves in sync with the others: all floors reach their extremes together and pass through zero together (their circles on the time axis nest into one), and the ratios between the floor displacements stay fixed at 0.35, 0.73 and 1.00 throughout the motion, so every floor is always at the same fraction of its released displacement, as the readout at the top of the figure reports. The selector releases the building in its second or third mode instead: some floors then move in exact anti-phase with the roof, but the shape still only scales, now with a shorter period. Released with all floors displaced equally, a shape that is not a mode, the floors fall out of step and the deflected shape changes from instant to instant, because that shape mixes all three modes and each of them keeps its own period.

Figure 2:Free vibration of the chapter’s building released from rest in one of its modes or in a shape that is not a mode: the building with its displacements magnified (left) and the floor displacements as fractions of the released roof displacement, with open circles at each floor’s zero crossings (right).

To find such motions, we try exactly that synchronous form,

u(t)=ϕ sin⁡(ωt),\mathbf{u}(t) = \boldsymbol{\phi}\,\sin(\omega t),

a single time-independent shape vector ϕ\boldsymbol{\phi} whose amplitude breathes in and out at one frequency ω\omega. This is the MDOF echo of the sine-plus-cosine trial that fixed ωn\omega_n in Chapter 2; here ϕ\boldsymbol{\phi} also carries the spatial pattern. Differentiating twice brings down a factor −ω2-\omega^2, so u¨=−ω2ϕ sin⁡(ωt)\ddot{\mathbf{u}} = -\omega^2\boldsymbol{\phi}\,\sin(\omega t). Substitute both into the undamped, unforced equation Mu¨+Ku=0\mathbf{M}\ddot{\mathbf{u}} +\mathbf{K}\mathbf{u}=\mathbf{0}:

(−ω2M ϕ+K ϕ)sin⁡(ωt)=0.\bigl(-\omega^2\mathbf{M}\,\boldsymbol{\phi} + \mathbf{K}\,\boldsymbol{\phi}\bigr)\sin(\omega t) = \mathbf{0}.

The scalar sin⁡(ωt)\sin(\omega t) is nonzero at almost every instant, so the bracket itself must vanish, exactly as the bracket (−ω2+k/m)(-\omega^2+k/m) had to vanish for the SDOF. That leaves a purely algebraic condition on the shape and the frequency, the generalized eigenvalue problem

K ϕr=ωr2 M ϕr,(K−ωr2 M)ϕr=0,r=1,…,n.\mathbf{K}\,\boldsymbol{\phi}_r = \omega_r^2\,\mathbf{M}\,\boldsymbol{\phi}_r, \qquad \bigl(\mathbf{K} - \omega_r^2\,\mathbf{M}\bigr)\boldsymbol{\phi}_r = \mathbf{0}, \qquad r = 1,\dots,n.

Each solution is a pair: a mode shape ϕr\boldsymbol{\phi}_r (the fixed deflected shape the building holds while it sways) and a natural frequency ωr\omega_r (how fast it sways in that shape). A nonzero ϕr\boldsymbol{\phi}_r exists only when K−ωr2M\mathbf{K}-\omega_r^2\mathbf{M} is singular, i.e. when det⁡(K−ω2M)=0\det(\mathbf{K}-\omega^2\mathbf{M})=0, and that determinant is a polynomial of degree nn in ω2\omega^2, so an nn-DOF building has exactly nn such pairs (here, three). Notice ϕr\boldsymbol{\phi}_r is fixed only up to a scale: if it solves (6), so does any multiple of it, because the equation is homogeneous. We pin that freedom down with a normalization in a moment. scipy.linalg.eigh solves (6) directly, returning the eigenvalues ωr2\omega_r^2 and the mode-shape columns at once.

mode 1:  Tn = 0.494 s   fn = 2.02 Hz   wn = 12.72 rad/s   M_r =  3.98 t   phi = [+0.35, +0.73, +1.00]
mode 2:  Tn = 0.205 s   fn = 4.87 Hz   wn = 30.60 rad/s   M_r =  4.52 t   phi = [-0.73, -0.56, +1.00]
mode 3:  Tn = 0.144 s   fn = 6.94 Hz   wn = 43.61 rad/s   M_r = 36.31 t   phi = [+2.59, -2.17, +1.00]

The building has three periods, from a slow first mode at T1≈0.49T_1 \approx 0.49 s down to a fast third mode near 0.14 s. The first mode is the soft, dominant one (the whole building leaning the same way), and as we go up in mode number the shapes get more wiggly and the periods get shorter, just as a guitar string’s overtones do.

We now spend the leftover scale freedom noted above, following a convention common in earthquake engineering: scale each mode so its roof (top-floor) component is 1, the line Phi = Phi / Phi[-1, :]. The deflected shapes are then read directly against a unit roof displacement, and the first mode, ϕ1=[0.35, 0.73, 1.00]T\boldsymbol{\phi}_1 = [0.35,\ 0.73,\ 1.00]^\mathsf{T}, gives the ratios drawn in Figure 2. With the scale pinned this way each mode has its own modal mass Mr=ϕrTMϕrM_r=\boldsymbol{\phi}_r^\mathsf{T}\mathbf{M}\boldsymbol{\phi}_r, the generalized mass that mode presents, a number we will lean on shortly. Whatever the normalization, the modes share a deeper property: they are orthogonal through both matrices (different modes do not share inertia or stiffness).

That orthogonality is not luck; it falls straight out of (6) together with the symmetry of M\mathbf{M} and K\mathbf{K}. Take two different modes r≠sr\neq s, write the eigenproblem for each, and pre-multiply by the other mode shape:

ϕsTK ϕr=ωr2 ϕsTM ϕr,ϕrTK ϕs=ωs2 ϕrTM ϕs.\boldsymbol{\phi}_s^\mathsf{T}\mathbf{K}\,\boldsymbol{\phi}_r = \omega_r^2\,\boldsymbol{\phi}_s^\mathsf{T}\mathbf{M}\,\boldsymbol{\phi}_r, \qquad \boldsymbol{\phi}_r^\mathsf{T}\mathbf{K}\,\boldsymbol{\phi}_s = \omega_s^2\,\boldsymbol{\phi}_r^\mathsf{T}\mathbf{M}\,\boldsymbol{\phi}_s.

Because M\mathbf{M} and K\mathbf{K} are symmetric, the two left-hand sides are equal (each is just a number, and transposing it leaves it unchanged: ϕsTKϕr=(ϕsTKϕr)T=ϕrTKϕs\boldsymbol{\phi}_s^\mathsf{T}\mathbf{K}\boldsymbol{\phi}_r =(\boldsymbol{\phi}_s^\mathsf{T}\mathbf{K}\boldsymbol{\phi}_r)^\mathsf{T} =\boldsymbol{\phi}_r^\mathsf{T}\mathbf{K}\boldsymbol{\phi}_s, and likewise for M\mathbf{M}). Subtracting the two equations therefore kills the left side and leaves (ωr2−ωs2) ϕsTMϕr=0\bigl(\omega_r^2-\omega_s^2\bigr)\,\boldsymbol{\phi}_s^\mathsf{T}\mathbf{M} \boldsymbol{\phi}_r = 0. For distinct frequencies the prefactor is nonzero, so the only escape is

ϕsTM ϕr=0,ϕsTK ϕr=0(r≠s).\boldsymbol{\phi}_s^\mathsf{T}\mathbf{M}\,\boldsymbol{\phi}_r = 0, \qquad \boldsymbol{\phi}_s^\mathsf{T}\mathbf{K}\,\boldsymbol{\phi}_r = 0 \quad (r\neq s).

The modes are therefore M-orthogonal and K-orthogonal, and with the modes stacked into the columns of Φ=[ϕ1 ⋯ ϕn]\boldsymbol{\Phi}=[\boldsymbol{\phi}_1\,\cdots\,\boldsymbol{\phi}_n], orthogonality makes both triple products diagonal: ΦTMΦ=diag(Mr)\boldsymbol{\Phi}^\mathsf{T}\mathbf{M}\boldsymbol{\Phi}=\mathrm{diag}(M_r), the modal masses, and ΦTKΦ=diag(ωr2Mr)\boldsymbol{\Phi}^\mathsf{T}\mathbf{K}\boldsymbol{\Phi}= \mathrm{diag}(\omega_r^2 M_r) (using ϕrTKϕr=ωr2 ϕrTMϕr=ωr2Mr\boldsymbol{\phi}_r^\mathsf{T}\mathbf{K} \boldsymbol{\phi}_r=\omega_r^2\,\boldsymbol{\phi}_r^\mathsf{T}\mathbf{M} \boldsymbol{\phi}_r=\omega_r^2 M_r). The zeros off the diagonal are the orthogonality; the diagonal entries are the modal mass and modal stiffness. We can check both in one line each.

Phi^T M Phi =
 [[ 3.9767 -0.     -0.    ]
 [-0.      4.5249 -0.    ]
 [-0.     -0.     36.3132]]

Phi^T K Phi =
 [[  643.      0.      0. ]
 [    0.   4237.6    -0. ]
 [    0.      0.  69060.1]]

Both products come out diagonal, zero off the diagonal (the orthogonality), with the modal masses MrM_r on one and ωr2Mr\omega_r^2 M_r on the other. This orthogonality is the whole engine of modal analysis: it is what lets us collapse the coupled 3×33\times 3 system into three separate scalar equations.

Before trusting the shapes, let us see them. We plot each mode shape against floor height, anchoring the ground at zero, so the building’s deflected silhouette is read off the page.

<Figure size 1092x468 with 3 Axes>
<Figure size 1092x468 with 3 Axes>

Figure 3:The three natural mode shapes of the building, plotted against floor height with the ground pinned at zero, normalized to unit roof displacement and drawn on separate horizontal scales.

The fundamental mode in Figure 3 is what you picture when you imagine a building swaying: every floor moves the same direction, the roof furthest. Mode 2 crosses zero once and mode 3 twice: the higher modes are the finer, faster corrections. For an earthquake, the first mode usually does most of the work, a fact we will make quantitative in a moment.

3Each mode is an SDOF

Here is the idea the whole chapter turns on, previewed in Figure 4 before we derive it. At the instant of its peak roof displacement under the synthetic earthquake record that we apply later in the chapter, the building’s deformed shape is the sum of three modal shapes. The first mode supplies -22.4 mm of the -23.0 mm at the roof, the second -0.58 mm and the third +0.03 mm. Each modal shape moves in time as the response of its own SDOF oscillator, which has the mode’s period and feels the ground motion scaled by a factor Γr\Gamma_r that we derive below.

The deformed shape at the instant of peak roof displacement as the sum of three modal shapes, each the response of an SDOF oscillator with its own period T_r and participation factor \Gamma_r, with modes 2 and 3 drawn 5 and 50 times larger.

Figure 4:The deformed shape at the instant of peak roof displacement as the sum of three modal shapes, each the response of an SDOF oscillator with its own period TrT_r and participation factor Γr\Gamma_r, with modes 2 and 3 drawn 5 and 50 times larger.

The mode shapes form a basis: any motion of the building, however complicated, can be written as a weighted sum of the fixed mode shapes, with time-varying weights qr(t)q_r(t) called modal coordinates:

u(t)=∑r=1nϕr qr(t)=Φ q(t).\mathbf{u}(t) = \sum_{r=1}^{n} \boldsymbol{\phi}_r\,q_r(t) = \boldsymbol{\Phi}\,\mathbf{q}(t).

Substitute this into the MDOF equation (3); since Φ\boldsymbol{\Phi} is a constant matrix, u˙=Φq˙\dot{\mathbf{u}}=\boldsymbol{\Phi} \dot{\mathbf{q}} and u¨=Φq¨\ddot{\mathbf{u}}=\boldsymbol{\Phi}\ddot{\mathbf{q}}, so

MΦ q¨+CΦ q˙+KΦ q=p(t).\mathbf{M}\boldsymbol{\Phi}\,\ddot{\mathbf{q}} + \mathbf{C}\boldsymbol{\Phi}\,\dot{\mathbf{q}} + \mathbf{K}\boldsymbol{\Phi}\,\mathbf{q} = \mathbf{p}(t).

This is still fully coupled, so we premultiply every term by ΦT\boldsymbol{\Phi}^\mathsf{T} and watch orthogonality do its work:

(ΦTMΦ)⏟diag(Mr)q¨+(ΦTCΦ)⏟diag(2ζrωrMr)q˙+(ΦTKΦ)⏟diag(ωr2Mr)q=ΦTp(t).\underbrace{\bigl(\boldsymbol{\Phi}^\mathsf{T}\mathbf{M}\boldsymbol{\Phi}\bigr)}_{\mathrm{diag}(M_r)} \ddot{\mathbf{q}} + \underbrace{\bigl(\boldsymbol{\Phi}^\mathsf{T}\mathbf{C}\boldsymbol{\Phi}\bigr)}_{\mathrm{diag}(2\zeta_r\omega_r M_r)} \dot{\mathbf{q}} + \underbrace{\bigl(\boldsymbol{\Phi}^\mathsf{T}\mathbf{K}\boldsymbol{\Phi}\bigr)}_{\mathrm{diag}(\omega_r^2 M_r)} \mathbf{q} = \boldsymbol{\Phi}^\mathsf{T}\mathbf{p}(t).

The two structural triple products are precisely the orthogonality results (8) we just proved: ΦTMΦ=diag(Mr)\boldsymbol{\Phi}^\mathsf{T}\mathbf{M} \boldsymbol{\Phi}=\mathrm{diag}(M_r) and ΦTKΦ=diag(ωr2Mr)\boldsymbol{\Phi}^\mathsf{T}\mathbf{K} \boldsymbol{\Phi}=\mathrm{diag}(\omega_r^2 M_r). For the damping term we assume the damping matrix is built so that ΦTCΦ\boldsymbol{\Phi}^\mathsf{T}\mathbf{C} \boldsymbol{\Phi} is diagonal too. This is classical (modal) damping (Caughey, 1960), the natural MDOF generalization of a single ζ\zeta, and we write its rr-th diagonal entry as 2ζrωrMr2\zeta_r\omega_r M_r so each mode carries its own damping ratio ζr\zeta_r (we construct exactly such a C\mathbf{C} later). With all three matrices diagonal, (11) no longer mixes the modal coordinates at all: row rr reads Mrq¨r+2ζrωrMr q˙r+ωr2Mr qr=ϕrTpM_r\ddot q_r + 2\zeta_r\omega_r M_r\,\dot q_r + \omega_r^2 M_r\,q_r = \boldsymbol{\phi}_r^\mathsf{T}\mathbf{p}. Dividing each row through by its modal mass MrM_r leaves nn independent scalar equations, one per mode:

q¨r+2ζrωr q˙r+ωr2 qr=ϕrTp(t)Mr,r=1,…,n,\ddot q_r + 2\zeta_r\omega_r\,\dot q_r + \omega_r^2\,q_r = \frac{\boldsymbol{\phi}_r^\mathsf{T}\mathbf{p}(t)}{M_r}, \qquad r = 1,\dots,n,

where ϕrTp(t)\boldsymbol{\phi}_r^\mathsf{T}\mathbf{p}(t) is the rr-th entry of the modal force vector ΦTp\boldsymbol{\Phi}^\mathsf{T}\mathbf{p} and MrM_r the modal mass. This is already the punchline: each qrq_r obeys a unit-mass SDOF equation of frequency ωr\omega_r and damping ζr\zeta_r, the very oscillator of Chapters 1 to 3, driven by the modal force per unit modal mass.

For an earthquake the right-hand side takes a particularly clean form. As in Chapter 6, base shaking enters every floor as an inertial effective force. With all floors dragged by the same ground acceleration, the load vector is p(t)=−M1 u¨g(t)\mathbf{p}(t) = -\mathbf{M}\boldsymbol{1}\, \ddot u_g(t), where 1=[1,…,1]T\boldsymbol{1}=[1,\dots,1]^\mathsf{T} is the influence vector, which marks the DOFs that the ground motion drives (here, all of them). The rr-th modal force is then ϕrTp(t)=−(ϕrTM1) u¨g(t)\boldsymbol{\phi}_r^\mathsf{T}\mathbf{p}(t) = -\bigl(\boldsymbol{\phi}_r^\mathsf{T}\mathbf{M}\boldsymbol{1}\bigr)\, \ddot u_g(t), and dividing through by the modal mass Mr=ϕrTMϕrM_r=\boldsymbol{\phi}_r^\mathsf{T}\mathbf{M}\boldsymbol{\phi}_r puts (12) in its standard earthquake form

q¨r+2ζrωr q˙r+ωr2 qr=− Γr u¨g(t),Γr=ϕrTM 1ϕrTM ϕr.\ddot q_r + 2\zeta_r\omega_r\,\dot q_r + \omega_r^2\,q_r = -\,\Gamma_r\,\ddot u_g(t), \qquad \Gamma_r = \frac{\boldsymbol{\phi}_r^\mathsf{T}\mathbf{M}\,\boldsymbol{1}} {\boldsymbol{\phi}_r^\mathsf{T}\mathbf{M}\,\boldsymbol{\phi}_r}.

Equation (13) is, letter for letter, the normalized SDOF earthquake equation from Chapter 6: a unit-mass oscillator of frequency ωr\omega_r and damping ζr\zeta_r, driven by the ground motion scaled by a single number. That number, the participation factor Γr\Gamma_r, measures how strongly the ground motion excites mode rr. It is large for modes whose shape resembles the rigid sideways push the earthquake delivers, and small (even zero) for modes nearly orthogonal to it. The denominator ϕrTMϕr\boldsymbol{\phi}_r^\mathsf{T}\mathbf{M}\boldsymbol{\phi}_r is the modal mass MrM_r printed above, which is not 1 for our roof-normalized modes, so Γr\Gamma_r keeps its full ratio form. Unlike the response, Γr\Gamma_r depends on how the mode is scaled: multiplying ϕr\boldsymbol{\phi}_r by a factor α\alpha multiplies the numerator by α\alpha and MrM_r by α2\alpha^2, so Γr\Gamma_r and qrq_r are divided by α\alpha while the physical response ϕrqr\boldsymbol{\phi}_r q_r is unchanged.

mode 1:  L_r =  +5.25   M_r =  3.98 t   Gamma = +1.321
mode 2:  L_r =  -1.86   M_r =  4.52 t   Gamma = -0.411
mode 3:  L_r =  +3.27   M_r = 36.31 t   Gamma = +0.090

How much of the building does each mode actually represent? The effective modal mass Mr⋆=Γr2 Mr=(ϕrTM1)2/(ϕrTMϕr)M_r^\star = \Gamma_r^2\,M_r = (\boldsymbol{\phi}_r^\mathsf{T}\mathbf{M}\boldsymbol{1})^2 / (\boldsymbol{\phi}_r^\mathsf{T}\mathbf{M}\boldsymbol{\phi}_r) answers that: it is the portion of the total mass that mode rr mobilizes in an earthquake, and (unlike Γr\Gamma_r on its own) it is the same number whatever scaling we picked for the modes. Its sum across all modes is exactly the total building mass, by the orthogonality bookkeeping again. Expanding the influence vector in the mode basis, 1=∑rΓrϕr\boldsymbol{1}=\sum_r\Gamma_r\boldsymbol{\phi}_r, and sandwiching M\mathbf{M} gives 1TM1=∑rΓr2Mr=∑rMr⋆\boldsymbol{1}^\mathsf{T}\mathbf{M}\boldsymbol{1}=\sum_r\Gamma_r^2 M_r =\sum_r M_r^\star, whose left side is the total mass ∑imi\sum_i m_i. This is the number that tells us, in advance, how few modes we can get away with.

mode 1:  effective mass = 6.940 t   = 86.7 % of total
mode 2:  effective mass = 0.765 t   =  9.6 % of total
mode 3:  effective mass = 0.295 t   =  3.7 % of total

sum of effective masses = 8.000 t (total building mass = 8.000 t)

The first mode alone carries about 87 % of the building’s mass; the first two together exceed 96 %. Already we can guess that two modes, perhaps even one, will reproduce the roof motion, and the next section tests that guess by solving the modal equations. First, Example 1 works through the same quantities by hand for a smaller building, where the eigenvalue problem reduces to a quadratic.

The next cell repeats Example 1 with eigh and prints every number quoted in it.

mode 1:  wn = 13.82 rad/s   Tn = 0.455 s   phi = [+0.618, +1.000]   M_r = 2.764 t
        Gamma = +1.171   effective mass = 3.79 t (94.7 % of the total)
mode 2:  wn = 36.18 rad/s   Tn = 0.174 s   phi = [-1.618, +1.000]   M_r = 7.236 t
        Gamma = -0.171   effective mass = 0.21 t (5.3 % of the total)

4Solving the modal oscillators and recombining

Every modal equation (13) is an SDOF with unit mass mr=1m_r = 1, stiffness kr=ωr2k_r = \omega_r^2, damping cr=2ζrωrc_r = 2\zeta_r\omega_r, and applied force pr(t)=−Γr u¨g(t)p_r(t) = -\Gamma_r\,\ddot u_g(t). So we hand each one to the very same solver we have used since Chapter 3 (sd.sdof_response), loop over the three modes, and collect the modal coordinates qr(t)q_r(t). We drive the building with the synthetic record sd.demo_record().

roof peak displacement (modal sum) = 23.0 mm

To prove the modal sum is right, we need something to compare it against: a direct integration of the full coupled building, treating (3) as one 3×33\times 3 system without ever mentioning modes. We write a compact matrix Newmark: it is the scalar average-acceleration scheme from Chapter 3 with every coefficient promoted to a matrix and the division by the effective stiffness replaced by its matrix inverse, computed once.

The direct solver needs an actual damping matrix C\mathbf{C}. We build the one that is consistent with our modal assumption of ζ=5%\zeta = 5\% in every mode, classical (modal) damping, by assembling it from the modes themselves: C=M Φ diag(2ζrωr/Mr) ΦTM\mathbf{C} = \mathbf{M}\,\boldsymbol{\Phi}\, \mathrm{diag}(2\zeta_r\omega_r/M_r)\,\boldsymbol{\Phi}^\mathsf{T}\mathbf{M}. Sandwiching it between the modes and using ΦTMΦ=diag(Mr)\boldsymbol{\Phi}^\mathsf{T}\mathbf{M}\boldsymbol{\Phi}=\mathrm{diag}(M_r) twice collapses it to ΦTCΦ=diag(2ζrωrMr)\boldsymbol{\Phi}^\mathsf{T}\mathbf{C}\boldsymbol{\Phi}= \mathrm{diag}(2\zeta_r\omega_r M_r), exactly the diagonal damping the decoupling (11) assumed (the 1/Mr1/M_r built into C\mathbf{C} cancels one of the two factors of MrM_r from the sandwiching diag(Mr)\mathrm{diag}(M_r)). So the modal decoupling is exact and the two methods must agree.

roof peak displacement (direct)   = 23.0 mm
max relative difference (modal vs direct) = 1.81e-14

The two solutions agree to about 10-14, machine precision. That is not a coincidence or a good approximation: for a linear system with classical damping, Newmark applied to the modal equations and Newmark applied to the coupled system are algebraically identical. Solving three small SDOFs and adding them up is genuinely the same calculation as integrating the coupled building step by step, as Figure 5 shows.

<Figure size 1014x416 with 1 Axes>
<Figure size 1014x416 with 1 Axes>

Figure 5:Roof displacement under the ground motion from a direct Newmark integration of the coupled 3×33\times 3 system (solid gray) and from the three modal SDOFs, solved with the Chapter-3 engine and recombined through u=Φq\mathbf{u}=\boldsymbol{\Phi}\mathbf{q} (dashed).

We have just done the full calculation with all three modes. But the effective masses warned us that the first mode carries 87 % of the action. Modal truncation is the practical art of keeping only the lowest few modes and throwing the rest away, the reason modal analysis scales to building models with thousands of DOFs, where computing every mode would be wasteful and the lowest handful suffice.

First, look at what each mode contributes to the roof separately. The roof component of mode rr is ϕ3r qr(t)\phi_{3r}\,q_r(t), the modal coordinate scaled by how much that mode shows up at the roof.

<Figure size 1014x416 with 1 Axes>
<Figure size 1014x416 with 1 Axes>

Figure 6:The individual modal contributions to the roof displacement, ϕ3r qr(t)\phi_{3r}\,q_r(t): mode 1 in blue, mode 2 in orange, mode 3 in green.

The hierarchy in Figure 6 is stark: mode 1’s roof contribution peaks near 23 mm, mode 2 adds under 3 mm, and mode 3 is a fraction of a millimeter. Now rebuild the roof history with one mode, then two, then all three, and overlay them on the exact answer.

<Figure size 1014x468 with 1 Axes>
<Figure size 1014x468 with 1 Axes>

Figure 7:The roof displacement reconstructed from a growing number of modes: one mode (blue), two (orange), and all three (green), overlaid on the direct integration (gray).

1 mode :  roof peak 23.1 mm (off by 0.7%)   largest miss 2.28 mm
2 modes:  roof peak 23.0 mm (off by 0.2%)   largest miss 0.17 mm
3 modes:  roof peak 23.0 mm (off by 0.0%)   largest miss 0.00 mm

The one-mode curve in Figure 7 gets the roof peak within 0.7 %, although at other instants it misses the roof displacement by up to 2.3 mm, and the two-mode curve is visually exact. The third mode, with under 4 % of the mass, never moves the roof by more than 0.2 mm. This is why a design office can analyze a forty-story tower with a handful of modes: the lowest modes hold most of the mass, and the rest add little to the displacements, although they matter more for story shears and floor accelerations. Seismic codes formalize this with a rule of thumb: include enough modes for their effective masses to add up to at least 90 % of the total mass, which here means two modes, as the picture confirms.

6The whole building in OpenSees

We built the modal machinery by hand to understand it. In day-to-day practice you would instead hand the whole building to a finite-element program and let it integrate the coupled system directly, and we now do exactly that in OpenSeesPy and check it against everything above. The model is the shear-building chain from the eigen cross-check; the only two new ingredients are patterns we have already met:

roof peak displacement (OpenSees)  = 23.0 mm
max difference vs NumPy direct integration = 8.57e-10

The OpenSees building reproduces our NumPy integration to about 10-9, so three independent routes (the modal sum, the direct matrix Newmark, and a production finite-element program) now agree on the same history. The book’s osdof module packages these lines as osdof.opensees_mdof_ground, ready for your own scripts. A designer reads two peak profiles off such a run rather than the whole history: the peak displacement of each floor, and the peak story drift, the largest difference between the displacements of adjacent floors. The story drift times the story stiffness is the story shear that the columns carry, so the drift profile is the one that sets their demands. The next cell extracts both profiles and confirms that the two engines agree floor by floor.

<Figure size 1092x468 with 2 Axes>
<Figure size 1092x468 with 2 Axes>

Figure 8:Peak floor displacements (left) and peak story drifts (right) from the OpenSees response history (bars), with the NumPy direct integration overlaid (dots).

peak floor displacement (mm): [ 8.4 17.1 23. ]
peak story drift (mm):        [8.4 9.  7.3]
peak story shear (kN):        [20.2 16.3  8.7]

The floor displacements grow with height, the roof moving most, as the dominant first mode dictates, but the story drifts do not: the second story drifts most, 9.0 mm, and the top story least, 7.3 mm. The story shears grow downward, from 8.7 kN in the top story to 20.2 kN in the first, because each story carries the inertia forces of all the floors above it.

7The loop, closed

Step back and see what just happened in this chapter. We took a building with three coupled degrees of freedom, found its three hidden oscillators by solving one eigenvalue problem, drove each oscillator with the same SDOF engine we built in Chapter 3, and added the answers up to recover the full response, exactly. Then we kept only the first oscillator and still had the roof peak within 0.7 %, and finally let a production finite-element program confirm the whole calculation.

That is the conceptual core of the book, distilled into one chapter. The single oscillator of Chapter 1 was never a toy or a special case: it is the irreducible unit out of which every linear structure is assembled, and modal analysis is the act of taking a structure apart into those units. Everything you learned about one oscillator (its period, its damping, its response spectrum, its resonance) applies to each mode of a linear structure of any size.

That equivalence also has a practical payoff for design. Because each mode is just an SDOF, the response spectrum of Chapter 6 gives a peak demand straight from each modal period, with no response history needed. Codes then reduce the resulting design forces with the ductility-based RR-factor of Chapter 7, as they do for one oscillator. Turning those two ideas into the procedures a code actually mandates (modal response-spectrum analysis and the equivalent lateral force method) is the subject of Chapter 9, where the same steps turn the modes of a five-story building into its design forces.

8Summary