Power Spectral Density (PSD) is a key tool for analyzing vibration data, particularly in structural health monitoring, earthquake engineering, and mechanical systems. This blog explores what PSD is, why it matters, and how to compute it from acceleration time series data using practical Python examples.
What is Power Spectral Density (PSD)?
PSD represents how the power of a signal is distributed across different frequencies. When analyzing acceleration signals, PSD helps identify dominant frequencies, structural resonances, and noise characteristics.
Mathematically, PSD can be estimated using the Discrete Fourier Transform (DFT):
where are the frequency bins, is the number of samples, and is the sampling frequency.
Steps to Compute PSD from Acceleration Time Series
To compute the PSD of an acceleration time series, follow these steps:
1. Obtain the Acceleration Time Series
- Collect data from an accelerometer at a known sampling frequency .
- Ensure the data is recorded over a sufficiently long duration to capture relevant frequencies.
2. Preprocess the Data
- Demean the Signal: Remove the mean to eliminate DC bias.
- Detrending: Remove any linear trends that may affect spectral estimation.
- Apply a Window Function: Use a window function (e.g., Hann, Hamming) to reduce spectral leakage.
3. Compute the Fourier Transform
- Use the Fast Fourier Transform (FFT) to convert the time-domain signal to the frequency domain.
- The result is the frequency-domain representation of the signal.
4. Estimate the PSD
- Compute the squared magnitude of the FFT and normalize it by the signal length and sampling frequency.
- Alternatively, use Welch’s method for improved spectral estimation by dividing the signal into multiple overlapping segments, applying a window function to each segment to minimize spectral leakage, computing individual periodograms, and averaging them to obtain a more stable and less noisy estimate of the PSD.
5. Plot and Analyze the PSD
- Convert PSD values to decibels (dB) if needed.
- Identify dominant frequencies that provide insights into system behavior.
Methods for Estimating PSD
Different techniques can be used to estimate PSD:
1. Periodogram
- Direct estimation using the FFT.
- High variance, making it less reliable.
2. Welch’s Method (Recommended)
- Splits the signal into overlapping segments.
- Applies a window function to reduce spectral leakage.
- Averages periodograms for better accuracy.
3. Multitaper Method
- Uses multiple window functions.
- Further reduces spectral leakage and variance.
Computing PSD in Python
Let’s compute PSD using Welch’s method in Python:
import numpy as np
import matplotlib.pyplot as plt
from scipy.signal import welch
# Generate synthetic acceleration data
fs = 100 # Sampling frequency (Hz)
T = 10 # Duration (seconds)
t = np.linspace(0, T, T * fs, endpoint=False)
acceleration = np.sin(2 * np.pi * 5 * t) + 0.5 * np.random.randn(len(t)) # 5 Hz signal + noise
# Compute PSD
frequencies, psd_values = welch(acceleration, fs=fs, nperseg=1024, scaling='density')
# Plot PSD
plt.figure(figsize=(8, 4))
plt.semilogy(frequencies, psd_values)
plt.xlabel('Frequency (Hz)')
plt.ylabel('PSD ($m^2/s^3$/Hz)')
plt.title('Power Spectral Density of Acceleration')
plt.grid()
plt.show()
Why PSD Matters
1. Structural Health Monitoring
- Identifies natural frequencies of buildings and bridges.
- Detects structural damage over time.
2. Earthquake Engineering
- Analyzes ground motion frequency content.
- Supports seismic hazard assessment.
3. Machinery Vibration Analysis
- Detects faults in rotating machinery.
- Identifies wear and imbalance.
Further Reading
9687752
{9687752:268I6Q5D},{9687752:4AINT3HT},{9687752:GUGSGEYP}
1
apa
50
default
634
https://earthinversion.com/wp-content/plugins/zotpress/
%7B%22status%22%3A%22success%22%2C%22updateneeded%22%3Afalse%2C%22instance%22%3Afalse%2C%22meta%22%3A%7B%22request_last%22%3A0%2C%22request_next%22%3A0%2C%22used_cache%22%3Atrue%7D%2C%22data%22%3A%5B%7B%22key%22%3A%22GUGSGEYP%22%2C%22library%22%3A%7B%22id%22%3A9687752%7D%2C%22meta%22%3A%7B%22creatorSummary%22%3A%22Scherbaum%22%2C%22parsedDate%22%3A%222006%22%2C%22numChildren%22%3A0%7D%2C%22bib%22%3A%22%3Cdiv%20class%3D%5C%22csl-bib-body%5C%22%20style%3D%5C%22line-height%3A%202%3B%20padding-left%3A%201em%3B%20text-indent%3A-1em%3B%5C%22%3E%5Cn%20%20%3Cdiv%20class%3D%5C%22csl-entry%5C%22%3EScherbaum%2C%20F.%20%282006%29.%20%3Ci%3EOf%20poles%20and%20zeros%3A%20Fundamentals%20of%20digital%20seismology%3C%5C%2Fi%3E%20%28Vol.%2015%29.%20Springer%20Science%20%26amp%3B%20Business%20Media.%20%3Ca%20href%3D%27https%3A%5C%2F%5C%2Fbooks.google.com%5C%2Fbooks%3Fhl%3Den%26lr%3D%26id%3Du-WcNVPFCs0C%26oi%3Dfnd%26pg%3DPR7%26dq%3DScherbaum%2C%2BF.%2B%282001%29.%2B%2522Of%2BPoles%2Band%2BZeros%3A%2BFundamentals%2Bof%2BDigital%2BSeismology.%2522%26ots%3DSObWdy2C_R%26sig%3DqFp4UjHp6nZd4-LMrmaY5bKP5ts%27%3Ehttps%3A%5C%2F%5C%2Fbooks.google.com%5C%2Fbooks%3Fhl%3Den%26lr%3D%26id%3Du-WcNVPFCs0C%26oi%3Dfnd%26pg%3DPR7%26dq%3DScherbaum%2C%2BF.%2B%282001%29.%2B%2522Of%2BPoles%2Band%2BZeros%3A%2BFundamentals%2Bof%2BDigital%2BSeismology.%2522%26ots%3DSObWdy2C_R%26sig%3DqFp4UjHp6nZd4-LMrmaY5bKP5ts%3C%5C%2Fa%3E%3C%5C%2Fdiv%3E%5Cn%3C%5C%2Fdiv%3E%22%2C%22data%22%3A%7B%22itemType%22%3A%22book%22%2C%22title%22%3A%22Of%20poles%20and%20zeros%3A%20Fundamentals%20of%20digital%20seismology%22%2C%22creators%22%3A%5B%7B%22creatorType%22%3A%22author%22%2C%22firstName%22%3A%22Frank%22%2C%22lastName%22%3A%22Scherbaum%22%7D%5D%2C%22abstractNote%22%3A%22%22%2C%22date%22%3A%222006%22%2C%22language%22%3A%22%22%2C%22ISBN%22%3A%22%22%2C%22url%22%3A%22https%3A%5C%2F%5C%2Fbooks.google.com%5C%2Fbooks%3Fhl%3Den%26lr%3D%26id%3Du-WcNVPFCs0C%26oi%3Dfnd%26pg%3DPR7%26dq%3DScherbaum%2C%2BF.%2B%282001%29.%2B%2522Of%2BPoles%2Band%2BZeros%3A%2BFundamentals%2Bof%2BDigital%2BSeismology.%2522%26ots%3DSObWdy2C_R%26sig%3DqFp4UjHp6nZd4-LMrmaY5bKP5ts%22%2C%22collections%22%3A%5B%22VHQXXADA%22%5D%2C%22dateModified%22%3A%222025-01-31T06%3A25%3A03Z%22%7D%7D%2C%7B%22key%22%3A%224AINT3HT%22%2C%22library%22%3A%7B%22id%22%3A9687752%7D%2C%22meta%22%3A%7B%22creatorSummary%22%3A%22Bendat%20and%20Piersol%22%2C%22parsedDate%22%3A%222011%22%2C%22numChildren%22%3A0%7D%2C%22bib%22%3A%22%3Cdiv%20class%3D%5C%22csl-bib-body%5C%22%20style%3D%5C%22line-height%3A%202%3B%20padding-left%3A%201em%3B%20text-indent%3A-1em%3B%5C%22%3E%5Cn%20%20%3Cdiv%20class%3D%5C%22csl-entry%5C%22%3EBendat%2C%20J.%20S.%2C%20%26amp%3B%20Piersol%2C%20A.%20G.%20%282011%29.%20%3Ci%3ERandom%20data%3A%20analysis%20and%20measurement%20procedures%3C%5C%2Fi%3E.%20John%20Wiley%20%26amp%3B%20Sons.%20%3Ca%20href%3D%27https%3A%5C%2F%5C%2Fbooks.google.com%5C%2Fbooks%3Fhl%3Den%26lr%3D%26id%3DqYSViFRNMlwC%26oi%3Dfnd%26pg%3DPT20%26dq%3DBendat%2C%2BJ.%2BS.%2C%2B%2526%2BPiersol%2C%2BA.%2BG.%2B%282011%29.%2B%2522Random%2BData%3A%2BAnalysis%2Band%2BMeasurement%2BProcedures.%2522%26ots%3DUdZPMMIMtl%26sig%3DfOYIYQiHbZyUIsxXUjx1VPYW2i4%27%3Ehttps%3A%5C%2F%5C%2Fbooks.google.com%5C%2Fbooks%3Fhl%3Den%26lr%3D%26id%3DqYSViFRNMlwC%26oi%3Dfnd%26pg%3DPT20%26dq%3DBendat%2C%2BJ.%2BS.%2C%2B%2526%2BPiersol%2C%2BA.%2BG.%2B%282011%29.%2B%2522Random%2BData%3A%2BAnalysis%2Band%2BMeasurement%2BProcedures.%2522%26ots%3DUdZPMMIMtl%26sig%3DfOYIYQiHbZyUIsxXUjx1VPYW2i4%3C%5C%2Fa%3E%3C%5C%2Fdiv%3E%5Cn%3C%5C%2Fdiv%3E%22%2C%22data%22%3A%7B%22itemType%22%3A%22book%22%2C%22title%22%3A%22Random%20data%3A%20analysis%20and%20measurement%20procedures%22%2C%22creators%22%3A%5B%7B%22creatorType%22%3A%22author%22%2C%22firstName%22%3A%22Julius%20S.%22%2C%22lastName%22%3A%22Bendat%22%7D%2C%7B%22creatorType%22%3A%22author%22%2C%22firstName%22%3A%22Allan%20G.%22%2C%22lastName%22%3A%22Piersol%22%7D%5D%2C%22abstractNote%22%3A%22%22%2C%22date%22%3A%222011%22%2C%22language%22%3A%22%22%2C%22ISBN%22%3A%22%22%2C%22url%22%3A%22https%3A%5C%2F%5C%2Fbooks.google.com%5C%2Fbooks%3Fhl%3Den%26lr%3D%26id%3DqYSViFRNMlwC%26oi%3Dfnd%26pg%3DPT20%26dq%3DBendat%2C%2BJ.%2BS.%2C%2B%2526%2BPiersol%2C%2BA.%2BG.%2B%282011%29.%2B%2522Random%2BData%3A%2BAnalysis%2Band%2BMeasurement%2BProcedures.%2522%26ots%3DUdZPMMIMtl%26sig%3DfOYIYQiHbZyUIsxXUjx1VPYW2i4%22%2C%22collections%22%3A%5B%22VHQXXADA%22%5D%2C%22dateModified%22%3A%222025-01-31T06%3A24%3A19Z%22%7D%7D%2C%7B%22key%22%3A%22268I6Q5D%22%2C%22library%22%3A%7B%22id%22%3A9687752%7D%2C%22meta%22%3A%7B%22creatorSummary%22%3A%22Welch%22%2C%22parsedDate%22%3A%221967-06%22%2C%22numChildren%22%3A1%7D%2C%22bib%22%3A%22%3Cdiv%20class%3D%5C%22csl-bib-body%5C%22%20style%3D%5C%22line-height%3A%202%3B%20padding-left%3A%201em%3B%20text-indent%3A-1em%3B%5C%22%3E%5Cn%20%20%3Cdiv%20class%3D%5C%22csl-entry%5C%22%3EWelch%2C%20P.%20%281967%29.%20The%20use%20of%20fast%20Fourier%20transform%20for%20the%20estimation%20of%20power%20spectra%3A%20A%20method%20based%20on%20time%20averaging%20over%20short%2C%20modified%20periodograms.%20%3Ci%3EIEEE%20Transactions%20on%20Audio%20and%20Electroacoustics%3C%5C%2Fi%3E%2C%20%3Ci%3E15%3C%5C%2Fi%3E%282%29%2C%2070%26%23x2013%3B73.%20%3Ca%20href%3D%27https%3A%5C%2F%5C%2Fdoi.org%5C%2F10.1109%5C%2FTAU.1967.1161901%27%3Ehttps%3A%5C%2F%5C%2Fdoi.org%5C%2F10.1109%5C%2FTAU.1967.1161901%3C%5C%2Fa%3E%3C%5C%2Fdiv%3E%5Cn%3C%5C%2Fdiv%3E%22%2C%22data%22%3A%7B%22itemType%22%3A%22journalArticle%22%2C%22title%22%3A%22The%20use%20of%20fast%20Fourier%20transform%20for%20the%20estimation%20of%20power%20spectra%3A%20A%20method%20based%20on%20time%20averaging%20over%20short%2C%20modified%20periodograms%22%2C%22creators%22%3A%5B%7B%22creatorType%22%3A%22author%22%2C%22firstName%22%3A%22P.%22%2C%22lastName%22%3A%22Welch%22%7D%5D%2C%22abstractNote%22%3A%22The%20use%20of%20the%20fast%20Fourier%20transform%20in%20power%20spectrum%20analysis%20is%20described.%20Principal%20advantages%20of%20this%20method%20are%20a%20reduction%20in%20the%20number%20of%20computations%20and%20in%20required%20core%20storage%2C%20and%20convenient%20application%20in%20nonstationarity%20tests.%20The%20method%20involves%20sectioning%20the%20record%20and%20averaging%20modified%20periodograms%20of%20the%20sections.%22%2C%22date%22%3A%221967-06%22%2C%22language%22%3A%22%22%2C%22DOI%22%3A%2210.1109%5C%2FTAU.1967.1161901%22%2C%22ISSN%22%3A%221558-2582%22%2C%22url%22%3A%22https%3A%5C%2F%5C%2Fieeexplore.ieee.org%5C%2Fabstract%5C%2Fdocument%5C%2F1161901%3Fcasa_token%3DjIXaCkydl1UAAAAA%3Amh9nlcowCicUxGylgDAb0RnHIoHHi6Hv_p45ar-mIOK1--POzENqKPf1EDbUTHncTp9fdeGTwg%22%2C%22collections%22%3A%5B%22VHQXXADA%22%5D%2C%22dateModified%22%3A%222025-01-31T06%3A23%3A24Z%22%7D%7D%5D%7D
Welch, P. (1967). The use of fast Fourier transform for the estimation of power spectra: A method based on time averaging over short, modified periodograms.
IEEE Transactions on Audio and Electroacoustics,
15(2), 70–73.
https://doi.org/10.1109/TAU.1967.1161901
Views: 5