Learning center

Separate two known frequencies

Compute and interpret a one-sided amplitude spectrum from a reproducible synthetic signal.

The scientific question

Can a frequency-domain view recover the two components used to create a waveform?

This example begins with a signal whose components are known. It gives a simple check of frequency placement and amplitude normalization before a more complicated recording is considered.

24-second educational animation with synthetic data. No audio; captions and transcript available. Download MP4Video and transcript

Mathematical example

x(t) = 0.7 sin(2π · 5t) + 0.3 sin(2π · 12t)

Data and analysis settings

SettingDefinition
Sampling frequency100 Hz; sample spacing 0.01 s.
Record200 samples, from 0 to 1.99 s; DFT record duration N/fs = 2 s.
Transform200-point discrete Fourier transform, without zero padding.
WindowRectangular: no additional weighting is applied.
Frequency spacingfs/N = 0.5 Hz.
Amplitude scaling2|X[k]|/N for positive interior bins; |X[k]|/N for DC and the Nyquist bin.

1. Inspect the data

Read time_s and signal_au. The companion columns identify the two components used to create each sample. Plot the entire record before applying a transform.

2. Calculate the spectrum

Compute the DFT of signal_au. Retain the nonnegative-frequency bins and apply the stated one-sided amplitude scaling.

3. Check the result

The peak at 5 Hz should be 0.7 and the peak at 12 Hz should be 0.3, apart from floating-point rounding. Both tones complete an integer number of cycles in the two-second record.

4. Change the question

A non-integer number of cycles, an added window, noise, or a different record duration changes the appearance of the spectrum. Record those choices before comparing amplitudes.

Expected result

CheckExpected result
5 Hz componentAmplitude 0.7; bin k = 10.
12 Hz componentAmplitude 0.3; bin k = 24.
UnitsArbitrary amplitude units; this is an amplitude spectrum, not a power spectral density.

Scope of this example

The example has no noise or missing samples. It checks a small mathematical case and is not evidence of performance on a physiological or engineering dataset.

Further method reading

Read the video transcript

0:00 Inspect a two-second waveform, sampled at 100 samples per second. It is the sum of a 5 Hz component with amplitude 0.7 and a 12 Hz component with amplitude 0.3.

0:08 The discrete Fourier transform separates the frequency components. The one-sided amplitude spectrum uses the same 200 samples, with interior coefficients scaled by 2/N.

0:16 Two peaks appear at 5 Hz and 12 Hz. Their amplitudes match the known inputs because both components complete an integer number of cycles in the record.

Read and keep this CSV

This is a synthetic teaching dataset. The file contains 200 data rows plus one header row. Its first and last saved timestamps are 0.0 s and 1.99 s. Column order is shown below.

Exact CSV columnMeaning and units
time_sTime in seconds.
signal_auSum of the two known components; arbitrary amplitude units.
component_5hz_auKnown 5 Hz component; arbitrary amplitude units.
component_12hz_auKnown 12 Hz component; arbitrary amplitude units.
Show the CSV file identity

two-tone-signal.csv · 12892 bytes

SHA-256: 6fe7f829d0346586dd64dd62810d8ccadcd259d692de6e676dd722a5e4333ee5

These identifiers describe the retained CSV bytes; they do not establish scientific validity or an application import contract.

Continue with a scoped workflow guide

Read the measured-vibration spectrum guide

The CWRU guide is a separate measured-data workflow with its own units, settings and export evidence. This synthetic CSV does not establish that workflow’s input compatibility.

Worked examples describe particular inputs, methods and recorded results. Check current availability and input requirements before planning an evaluation.

← Back to the learning center