Fundamentals / Numerical mathematics / Numerical linear algebra

Counting vibration modes without calculating their shapes

A long chain of beads is tested on a shaker. The instrument can sweep only a narrow frequency interval, and the operator wants to know which resonance lies inside it. Turn a mass and spring model into a counting problem. Work out why a sign in an elimination step can identify a frequency that has never been computed directly.

Start with one displacement per bead

Number the moving beads from one to \(n\). A fixed support at either end has zero displacement. Each neighbouring pair is joined by an identical linear spring of stiffness \(k\), including the two end springs. Write down the force on bead \(i\) by extending each spring separately. The left spring pulls in proportion to \(u_{i-1}-u_i\), the right spring in proportion to \(u_{i+1}-u_i\). The diagonal coefficient two comes from two neighbours, including a fixed support when the bead is at an end. Removing an end spring would change the physical model and its first frequency.

\[m_i\ddot u_i+k(2u_i-u_{i-1}-u_{i+1})=0,\]
\[u_0=u_{n+1}=0.\]

Set \(u_i(t)=v_i\cos(\omega t)\) and cancel the nonzero time factor. The resulting equation is \(Kv=\lambda Mv\) with \(\lambda=\omega^2\). The stiffness matrix has a quadratic energy interpretation: multiplying by a displacement on either side gives the sum of all squared spring extensions times \(k\). This sum is positive unless all displacements vanish, because the end supports pin the chain. The diagonal mass matrix is also positive. Thus a frequency of zero in this experiment would call for an explanation.

Directly dividing each row by its own mass produces \(M^{-1}K\), which need not look symmetric. Instead set \(z=M^{1/2}v\). Multiplying by \(M^{-1/2}\) on the left gives \(Az=\lambda z\) with \(A=M^{-1/2}KM^{-1/2}\). The diagonal entries are \(a_i=2k/m_i\); the neighbouring entries are \(b_i=-k/\sqrt{m_im_{i+1}}\). Both have units of inverse time squared. Increasing one bead mass changes two neighbouring off-diagonals as well as a diagonal. Changing only the diagonal in a program would simulate a different chain.

Derive the shift count by completing squares

Pick a real test value \(s\) in squared-frequency units. In an orthonormal eigenbasis the quadratic form of \(A-sI\) is \(\sum_j(\lambda_j-s)y_j^2\). The largest dimension of a subspace on which this form is strictly negative counts eigenvalues below the test value. An invertible change of coordinates maps a negative subspace bijectively onto another negative subspace of the same dimension. The largest dimension stays fixed. This is the part of the law of inertia that our computation needs.

Now look at the same form in the original bead coordinates. Its first terms are \(d_1 z_1^2+2b_1z_1z_2+(a_2-s)z_2^2\), where \(d_1=a_1-s\). Complete the square in \(z_1\). The coefficient of the transformed first square is \(d_1\). The coefficient left for \(z_2^2\) is reduced by \(b_1^2/d_1\). Only the next coordinate is touched because the matrix is tridiagonal. Repeat the same operation until no cross term remains.

\[d_1=a_1-s,\]
\[d_{i+1}=a_{i+1}-s-\frac{b_i^2}{d_i}.\]

Each square completion is an invertible shear when its pivot is nonzero. Consequently the number of negative pivots equals the number of negative eigenvalues of the shifted matrix. This gives a practical count with linear work per shift and only one saved pivot. It also explains why the signs of the unmodified diagonal alone cannot work. Every spring couples two neighbouring trial directions; elimination carries the contribution of that coupling forward.

Find the bracket for a requested resonance

Put \(k=m_i=1\) in a three-bead chain. Its diagonal is \(2,2,2\) and both off-diagonals equal \(-1\). At \(s=1\) the second pivot is exactly zero, so choose \(s=1.2\) first to follow ordinary arithmetic. The pivots are \(0.8,-0.45,3.0222\ldots\). There is one eigenvalue below 1.2. At \(s=2.4\) they are \(-0.4,2.1,-0.87619\ldots\), giving two eigenvalues below 2.4. The second resonance in squared-frequency units lies between these two shifts. The uncertainty in angular frequency is the difference between their square roots.

For a longer chain it would be inconvenient to choose the first two trial shifts by luck. In an eigenvector choose a component of maximum absolute value. Divide its matrix row by that component. The sum of the neighbouring contributions is bounded in magnitude by the sum of the neighbouring absolute off-diagonals. Every eigenvalue therefore falls inside at least one interval centred on a diagonal entry with that row sum as radius. The minimum left endpoint and the maximum right endpoint supply an enclosing interval. A small outward extension avoids ties at the first or last bound.

To select the \(j\)-th eigenvalue in ascending order, halve the interval. If the count at its midpoint is less than \(j\), the desired eigenvalue is on the upper side. Otherwise keep the lower side. Once the interval is initialised, the reduction factor does not depend on the accuracy of an initial frequency guess. After \(r\) splits the width in exact arithmetic equals its original width divided by \(2^r\). A small eigenvalue can still have a relatively wide frequency interval after taking square roots, so apply the stopping criterion in the quantity your instrument actually reports.

Separate the numerical count from an experimental identification

Staircase of negative pivot counts versus trial squared frequency, beside a logarithmic plot of the shrinking frequency-squared bracket.Open full-size diagram
A heavy central bead moves the jumps of the count. Bisection follows one chosen jump. Its interval closes at a predictable rate even when two neighbouring resonances look close on the staircase.

For the uniform chain try \(v_i=\sin(i\theta)\). This trial shape vanishes at the left support. The right support requires

\[\theta=j\pi/(n+1).\]

Substitution into an interior row and the sum formula for neighbouring sines give

\[\lambda_j=4(k/m)\sin^2[j\pi/(2(n+1))].\]

For three unit beads the spectrum is approximately 0.58579, 2 and 3.41421. This furnishes an independent reference for all the mode counts, including the mode with an exactly representable eigenvalue. The notebook also compares with a dense symmetric solve which can be repeated using OneSimulation's linear algebra backend.

Double the mass of the middle bead and think about the second uniform mode before solving again. Its displacement vector is proportional to \((1,0,-1)\). There is a node at the heavier bead. Both \(Kv\) and \(Mv\) are unchanged for this particular vector, so its squared frequency remains two. The lowest mode has substantial displacement there and generally moves. The operator can use this contrast experimentally: a frequency that hardly shifts under a known local mass change constrains the possible mode shape even when that shape was never recorded.

The count itself describes the modelled spectrum. A measured frequency response can hide a resonance if the shaker or the sensor sits exactly on a modal node. Conversely, a broad peak may contain two lightly separated modes. To compare with an experiment one needs the forcing and measurement directions as well as the frequency count. In the symmetric ideal chain, replacing a centre sensor with two off-centre sensors can expose a mode that a centre sensor cannot see. The counting algorithm has no term for this observation geometry.

What a zero pivot means on a computer

A zero intermediate pivot need not be an eigenvalue of the entire matrix. It may be an eigenvalue of a smaller leading block. Approaching the troublesome shift from one side resolves the ambiguous endpoint convention. If instead one jumped directly to an arbitrary large replacement pivot, its coupling contribution and sometimes its sign count would be wrong. The notebook uses a small negative pivot in unit-scaled problems, as in a conventional safeguarded Sturm count. An exact eigenvalue at the shift is then counted on the lower side. It tests that convention on the known three-bead chain.

Floating-point arithmetic places another limit on what it means to halve a bracket. Eventually the rounded midpoint equals one of its endpoints. At that stage further iterations cannot separate floating-point trial values. A production interval solver also handles extreme scaling, split tridiagonal blocks and tiny off-diagonals, and can report an interval containing a cluster. The notebook is deliberately a transparent solver for moderate, nondimensional examples. Its final consistency test tolerates a few units of roundoff so that the dense reference can be rounded differently.

Tutorial on counts, brackets and experimental nodes

1. A four-second sweep is centred at an angular frequency of 1.4 per second. Does the three-bead example put the second natural frequency between 1.40 and 1.43 per second?

Work through the solution

Square both positive bounds to get 1.96 and 2.0449 in inverse seconds squared. The count changes from one to two across them because the middle eigenvalue is 2. Its frequency is the square root of two, approximately 1.41421 per second. A finite measurement time still limits how sharply an instrument can identify this peak.

2. A starting interval in squared frequency is 8 units wide. How many halvings guarantee a width below one thousandth of a unit, and what part of the cost grows with bead count?

Work through the solution

Thirteen halvings give

\[8/8192=0.0009765625.\]

Twelve leave \(0.001953125\). Each test visits every diagonal and each connecting off-diagonal once. The number of halvings follows from the desired absolute accuracy; the work of each count grows with the length of the chain.

3. Break the spring between beads 7 and 8 of a fixed-end chain without adding a support. How should the inertia procedure and the stiffness entries change?

Work through the solution

Remove the coupling and subtract that spring’s stiffness from each of the two adjacent unscaled diagonal entries before mass normalisation. The two components now have an independently free end and a fixed outer support. Count the shifted pivots separately in the two blocks and add the counts. Simply setting the off-diagonal to zero while keeping both diagonals would add artificial restoring forces at the cut.

Further reading · LAPACK Working Note 172 on Sturm counts and floating-point arithmetic for symmetric tridiagonal matrices

Change parameters · Counting vibration modes without calculating their shapes

Change one input at a time and compare the recalculated curves with the argument above. The browser evaluates this small model locally; the accompanying numerical values state its assumptions and reference checks. Reset restores the reference inputs, and the data can be downloaded as CSV.