Measuring a building's natural frequency with a MEMS accelerometer: what the high-pass filter does

A 2023 study found a 1.55 Hz first mode in a six-storey Tashkent frame with a cheap accelerometer. We simulate a building like it and show how a 1 Hz high-pass filter changes the peak.

Every building sways a little, and it prefers to sway at one frequency, its natural frequency. Measuring it is cheap now: a small MEMS accelerometer (a tiny silicon chip like the ones in phones) left on a floor for a day is enough. A 2023 conference paper did this in Tashkent, Uzbekistan, with a sensor costing about 300 US dollars, and found the first mode of a six-storey concrete frame at about 1.55 Hz. We use its numbers to show what such a record looks like, how much the choice of high-pass filter matters when the building’s frequency is only a little above the cut, and how to do the same sums yourself. For the recording and filtering, use the phone seismometer; for longer records from real instruments, the seismogram viewer; and to design the filter, the FIR/IIR filter designer.

The paper in brief

The authors strapped self-recording accelerometers to column feet and column heads on several floors of a six-storey reinforced-concrete frame (72 m by 48 m, 29.1 m high, with brick infill) and, later, of two ten-storey frames still under construction. Sensors recorded 100 samples a second in 20-bit steps with a range of about 2.5 G and ran for days on four AA batteries. Without cables, the clocks were lined up afterwards by striking all the units together.

What they report: the six-storey frame has a first mode of about 1.55 Hz in both horizontal directions; a rectangular ten-storey frame sits at 1.3 Hz along its long axis and 1.4 Hz across; a curved ten-storey frame has 1.25 Hz and 1.5 Hz in its two parts. At 1.55 Hz the sixth-floor motion was about 26 times the first-floor motion in one direction and about 15 times in the other. Background noise stayed under 2 cm/s2, and students walking about produced roughly 2 cm/s2. The paper filtered velocity records with a 1 Hz high-pass and a 20 Hz low-pass filter. Its results are in figures, so we have no table to compare with; we use only the numbers in its text.

Checked with the tools

Step 1: do the instrument numbers hang together? The paper gives a resolution of 0.005 cm/s2 for a 20-bit sensor with a range of about 2.5 G on each side. Splitting 5 G into 2^20 steps gives 4.77 millionths of a G, which is 0.0047 cm/s2, so the resolution quoted is the 20-bit step. The paper’s remark that one millionth of a G is about 0.001 cm/s2 is also right (0.00098 cm/s2). The pendulum used to explain the idea, 1 m long, swings with period 2π√(1/9.8) = 2.007 s, the “about 2 s” in the text. The first mode period of the six-storey frame is 1 / 1.55 = 0.645 s.

Step 2: what damping do the magnifications imply? For a lightly damped building shaken at resonance, the roof moves Q = 1 / (2ζ) times the ground, where ζ is the damping ratio. A magnification of 26 gives ζ = 1.9 per cent and 15 gives ζ = 3.3 per cent. This is our inference, not a number the paper states, and it assumes one dominant mode and a ground-level record that is a fair stand-in for the shaking.

Step 3: the filter. The Phone seismometer removes slow drift and gravity with a zero-phase Butterworth high-pass filter: it runs the filter forwards and backwards, so the gain is squared and no time shift is left. A 1 Hz corner is the paper’s choice, and it is only a little below the building’s frequency, so it cuts into the signal. Figure 1 shows the gain; the table gives it at the paper’s frequencies.

Gain of a zero-phase high-pass filter near 1.5 HzGain of a zero-phase high-pass filter near 1.5 Hz00.250.50.75101234Frequency (Hz)Amplitude gain (1 = unchanged)1.251.55 Hz1 Hz, order 21 Hz, order 40.5 Hz, order 2fibub.com
Figure 1. Gain of zero-phase Butterworth high-pass filters (what the Phone seismometer tool applies) at the 100 Hz rate used in the paper, worked out with the tool's filter maths. A 1 Hz corner leaves a building mode at 1.25 to 1.55 Hz partly cut; a 0.5 Hz corner barely touches it.
Frequency of a building mode 1 Hz corner, order 2 1 Hz corner, order 4 0.5 Hz corner, order 2
1.25 Hz (curved building) 0.71 0.857 0.975
1.3 Hz 0.741 0.891 0.979
1.4 Hz 0.794 0.937 0.984
1.55 Hz (six-storey frame) 0.853 0.971 0.989

A 1 Hz second-order filter therefore keeps only 71 per cent of an amplitude at 1.25 Hz, and 85 per cent at 1.55 Hz. A fourth-order filter with the same corner is much flatter above the corner. This matters if you compare the amplitudes of two buildings with different modes, but it does not move the peak.

Step 4: a simulated building. We simulated a building with one mode at 1.55 Hz and ζ = 1.9 per cent, shaken by random ground motion for 400 s at 100 samples a second, scaled so that the roof moves about 1.0 cm/s2 rms (a little under the paper’s “below 2 cm/s2” background). We opened the record in the Phone seismometer’s maths with four filter settings. The peak of the spectrum and the peak acceleration are:

Filter setting Dominant frequency Peak acceleration Spectrum peak
0.5 Hz high-pass, order 2 (page default) 1.57 Hz 3.39 cm/s2 0.37 cm/s2
1 Hz high, 20 Hz low, order 2 1.57 Hz 3.00 cm/s2 0.33 cm/s2
1 Hz high, 20 Hz low, order 4 1.57 Hz 3.34 cm/s2 0.37 cm/s2
2 Hz high-pass, order 4 2.06 Hz 0.64 cm/s2 0.02 cm/s2

All the sensible settings find the mode, about 1.57 Hz in this random record (the 0.02 Hz offset is just noise in one 400 s sample; the building’s true value is 1.55 Hz). The 1 Hz second-order filter lowers the peak by about 11 per cent. But a corner at 2 Hz, above the building’s frequency, destroys the mode: the “dominant frequency” jumps to 2.06 Hz, which is only the slope of the filter, and the spectrum peak falls to a twentieth. Always check that your corner is well below the frequency you want.

Simulated roof record: spectrum with two filter settingsSimulated roof record: spectrum with two filter settings00.10.21234Frequency (Hz)Amplitude (cm/s2)1.55 Hz0.5 Hz high-pass, order 21 Hz high, 20 Hz low, order 2fibub.com
Figure 2. Amplitude spectrum of a simulated 400 s roof record (a single-mode building with its first mode at 1.55 Hz, damping 1.9 per cent, random ground shaking: our assumptions, not the paper's data) after two filter settings, made with the Phone seismometer tool's maths.
Quantity Paper says Our tool gives
First mode, six-storey frame about 1.55 Hz period 0.645 s; found at 1.57 Hz in a simulated record
Resolution of the 20-bit sensor 0.005 cm/s2 0.0047 cm/s2 from 5 G in 2^20 steps
Roof-to-base magnification 26 and 15 damping 1.9 and 3.3 per cent (our inference)
1 Hz high-pass applied to velocity gain 0.71 to 0.85 (order 2) between 1.25 and 1.55 Hz

How we made the graphs

The script scripts/blog-figures/phone-seismometer-building-natural-frequency-mems-highpass-filter-attenuation.mjs calls uniform and analyse from src/lib/sci/phoneseis.ts (the maths of the phone seismometer) and butter and sosGain from src/lib/sci/dsp.ts (its filters). The sampling rate, the 1.55 Hz and 1.25 Hz modes, the magnification, the 1 Hz and 20 Hz filter corners and the 400 s record length come from the paper’s text. The one-mode building, the damping, the random ground shaking, its seed and the roof level of about 1 cm/s2 are our assumptions. We apply the filters to acceleration, not to velocity as the paper did, because the tool works on acceleration. No figure or table from the paper is used.

How we test the maths

tests/sci.mjs runs tests/sci-tools/phone-seismometer.mjs on every change. It matches resampled values to NumPy’s interp, the cleaned samples to SciPy’s sosfiltfilt within 1e-10, and PGA and spectrum peak bins to NumPy’s rfft. For this article we added a check that a zero-phase second-order filter with a 1 Hz corner at 100 Hz has gain 0.710 at 1.25 Hz and 0.853 at 1.55 Hz, which matches the textbook Butterworth formula 1 / (1 + (fc / f)^(2N)) to about 0.001, and a check of the paper’s resolution arithmetic.

Check it yourself

On the phone seismometer page:

  1. Press Use the demo recording (a made-up 30 s record), then set Remove below (Hz) to 0.5 and Filter order to 2.
  2. Read the dominant frequency of the z component: 3.17 Hz (the demo’s door knock), with a PGA of about 0.314 m/s2 on z.
  3. Now set Remove below (Hz) to 4. The 3.17 Hz knock falls below the corner and the dominant frequency of z jumps to about 11.98 Hz (the lorry’s hum), with a PGA of about 0.107 m/s2. This is the same trap as our 2 Hz example.
  4. For your own building, lay a phone flat on an upper floor, press Start recording, wait a few minutes, press Stop, and read the dominant frequency of the horizontal components. Phones sample unevenly and at lower quality than the paper’s sensor, so compare floors or buildings rather than trusting absolute amplitudes.

What researchers can use it for

  • Quick checks of a building’s frequency: compare an upper floor with the ground floor with the same app, and look for the ratio at the peak.
  • Choosing a filter corner: plot the gain at your target frequency before filtering, as in Figure 1, so the filter does not remove the signal you want.
  • Teaching resonance: the damping from a magnification number (Q = 1 / 2ζ) is a one-line exercise that ties theory to a real measurement.
  • Sanity-checking sensor specifications: the 20-bit step for a given range is a one-line sum that catches typing errors in a data sheet.

The fine print

  • Our building is a single damped oscillator. Real frames have several modes, twisting, and soil-structure effects, which the paper discusses in its figures but not in numbers.
  • The damping values are inferred from magnifications and assume a clean resonance; they are not measurements from the paper.
  • Phones are not engineering sensors: their clocks are uneven and their noise is higher. The tool resamples evenly, but treat results as a rough guide.
  • The paper filtered velocity; we filter acceleration. The effect of a high-pass filter on a peak is similar, not identical.

Sources

  • Minowa C, Kaniev D and Rustamov A (2023), Vibration measurement of KIUT building by MEMS accelerometer, E3S Web of Conferences 401: 05031, doi:10.1051/e3sconf/202340105031. Licence CC BY 4.0, checked on the paper's own licence note and in Crossref (no correction or retraction listed), 2026-11-24. Values used here, all from the text: 100 Hz sampling, 20-bit data, a range of about 2.5 G, a resolution of 0.005 cm/s2, a first natural frequency of about 1.55 Hz for the six-storey frame, 1.3 and 1.4 Hz for a rectangular ten-storey frame, 1.25 and 1.5 Hz for a curved one, roof-to-base magnification of about 26 and 15 at 1.55 Hz, a 1 Hz high-pass and 20 Hz low-pass filter, records of about 400 s and a pendulum period of 2 s.
  • Single-degree-of-freedom oscillator: standard structural dynamics (resonance magnification Q = 1 / (2 x damping ratio) for light damping). Butterworth filter response: standard signal processing, written into fibub's Phone seismometer tool and checked there against SciPy.
  • The building model, its damping (read from the magnification, so our inference), the random ground shaking and the recording length are our assumptions. No figure or data table from the paper is used; the paper prints no tables.

If you are an author or publisher and want a credit or a passage changed or removed, tell us and we will act quickly.

Tools in this article

Read next