# Power Spectral Density

### From Python Wiki

**Utilities**

The scripts on this page require the utility modules

**PSD of a Time History**

The PSD of a time history may be calculated using psd.py

The psd.py script uses the FFT function.

*from scipy.fftpack import fft*

It includes options for retangular and Hanning windows.

A GUI version which uses Tkinter is given at: psd_gui.py

**Matplotlib PSD**

An alternate method would be to use the matplotlib psd function.

**Spectrogram PSD**

A script for a spectrogram PSD of a time history is given at: spectrogram.py

The script uses the Matplotlib function specgram.

This function is useful for tracking the frequency change with time.

**Overall GRMS Level**

The overall GRMS level for a PSD function can be calculated via: psdint.py

**Synthesize a Time History to Satisfy a Specified PSD**

A sample time history can be synthesized via: psd_syn.py

This script also requires: velox_correction.py

Note that a given PSD does not have a unique time history, because it discards the phase angle.

**SDOF Response**

This script calculates the response of a single-degree-of-freedom system to an acceleration PSD base input: sdof_ran.py

The method is more accurate than Miles equation, because it performs a point-by-point multiplication of the power transmissibility function times the base input PSD. It thus allows the PSD to vary with frequency.

This script calculates the vibration response spectrum (VRS) for a PSD base input: vrs.py

Return to: Main Page | Vibrationdata Python Scripts