Power Spectrum Analyzer Calculator

Transform sample lists into meaningful frequency insights. Choose windows, inspect peaks, and compare normalized outputs. Built for study, testing, reporting, and confident signal interpretation.

Calculator Inputs

Enter numeric samples separated by commas, spaces, semicolons, or line breaks.

Example Data Table

This example signal combines multiple sinusoidal components sampled at 64 Hz. Use it to test the analyzer quickly.

Sample Index Time (s) Amplitude
0 0 0.2
1 0.015625 1.221882
2 0.03125 1.44051
3 0.046875 0.931869
4 0.0625 0.465301
5 0.078125 0.515897
6 0.09375 0.695891
7 0.109375 0.303061
8 0.125 -0.707107
9 0.140625 -1.550286
10 0.15625 -1.481586
11 0.171875 -0.654514

Formula Used

The calculator applies windowing, optional mean removal, and a discrete Fourier transform over the signal. It then reports a single-sided spectrum.

1) Mean removal: x_d[n] = x[n] - mean(x[n]) 2) Windowed sequence: x_w[n] = x_d[n] × w[n] 3) Discrete Fourier transform: X[k] = Σ x_w[n] × e^(-j2πkn/N) 4) Frequency bin: f[k] = k × Fs / N 5) Single-sided power: Power[k] = |X[k]|² / N² Non-DC and non-Nyquist bins are doubled. 6) Power spectral density: PSD[k] = |X[k]|² / (Fs × Σw[n]²) Non-DC and non-Nyquist bins are doubled. 7) Spectral centroid: Centroid = Σ(f[k] × Power[k]) / ΣPower[k] 8) RMS bandwidth: Bandwidth = √(Σ((f[k] - Centroid)² × Power[k]) / ΣPower[k])

These formulas help reveal dominant frequencies, leakage behavior, spread, and power distribution across the sampled signal.

How to Use This Calculator

  1. Enter your sample sequence into the signal box.
  2. Set the sampling rate in hertz.
  3. Choose a window function for leakage control.
  4. Pick the output scale you want to inspect.
  5. Optionally remove the mean to suppress DC bias.
  6. Choose a peak search range and padding level.
  7. Click Analyze Spectrum to view results above the form.
  8. Use the CSV and PDF buttons to export the computed spectrum.

Frequently Asked Questions

1) What does a power spectrum analyzer show?

It shows how signal energy is distributed across frequency bins. Peaks highlight dominant periodic components, while flatter regions suggest weaker or broadband content.

2) Why should I remove the mean first?

Removing the mean reduces a large DC component at zero hertz. That often makes smaller oscillatory peaks easier to identify and compare.

3) Which window should I choose?

Rectangular preserves raw values but leaks more. Hann and Hamming are strong general choices. Blackman gives stronger leakage control but broader peaks.

4) What does zero padding change?

Zero padding increases displayed frequency-bin density. It improves peak localization on the graph but does not add new information to the original signal.

5) What is the difference between power and PSD?

Power reports energy per bin after scaling. PSD normalizes by bandwidth and sampling rate, making comparisons across different sample lengths more meaningful.

6) Why are some peaks wider than expected?

Finite sampling and windowing spread energy around the true frequency. This spreading is called spectral leakage and widens nearby peaks.

7) What does spectral centroid mean?

Spectral centroid is the power-weighted average frequency. It summarizes where most spectral energy is centered across the analyzed range.

8) What is the Nyquist frequency here?

Nyquist frequency equals half the sampling rate. Frequencies above it cannot be uniquely represented and may fold back through aliasing.

Related Calculators

bifurcation diagram calculatorjulia set generatorphase space plotterlogistic map calculatorchaos phase portraitmandelbrot set plotterroute to chaoscoupled map lattice

Important Note: All the Calculators listed in this site are for educational purpose only and we do not guarentee the accuracy of results. Please do consult with other sources as well.