Skip to content
This repository was archived by the owner on Jan 24, 2023. It is now read-only.

Commit ca02b62

Browse files
author
skalade
committed
corrected psd equation in spectral notebook
1 parent b7e8f3c commit ca02b62

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

notebooks/frequency_spectrum/01_spectrum_analysis.ipynb

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -685,7 +685,7 @@
685685
"\n",
686686
"One of the most common ways of observing the power spectra of a signal of interest is by calculating the Power Spectral Density (PSD), defined as\n",
687687
"\n",
688-
"$PSD[n] = 10 \\times \\log_{10}(\\frac{2 {|y[n]|^{2}}}{F_{s} \\sum^{N_{w}}_{n=0}w^{2}[n]})$\n",
688+
"$PSD[n] = 10 \\times \\log_{10}(\\frac{2 {|y[n]|^{2}}}{F_{s} \\sum^{N_{w}-1}_{n=0}w^{2}[n]})$\n",
689689
"\n",
690690
"We get the power of the signal by squaring the absolute values of the FFT output $y[n]$, and normalizing by the sampling rate $F_{s}$ and the sum of our window weights $w$, where $N_{w}$ is the length of our window. Don't forget to add a factor of 2 since we are dealing with a one-sided spectrum. The PSD is measured in decibels per hertz (dB/Hz)."
691691
]

0 commit comments

Comments
 (0)