DataAnalysis2021/04-FFT_DFT_and_Applications/spectrogram.ipynb

53 lines
1.6 KiB
Plaintext

{
"cells": [
{
"cell_type": "markdown",
"metadata": {},
"source": [
"# Time-Frequency Analysis\n",
"## Moving window analysis\n",
"One way to analyse the time-varying frequency content of a signal is to\n",
"apply windows in the time domain to the signal and to calculate a Fourier spectrum\n",
"of the windowed part. The window marches along the signal with defined overlap creating\n",
"a series of Fourier spectra associated with the center times of the windows. The resulting amplitude\n",
"spectra are then plotted versus window center time. In more detail:\n",
"\n",
"1. Choose windowing functions: $w(t,t_m)$ with $t_m$ the center of the window.\n",
"2. Multiply windowing function with time series: $f_m(t) = f(t)w(t,t_m)$\n",
"3. Detrend the windowed signal.\n",
"4. Perform a DFT: $F_{km} = \\Delta t\\sum_{n=0}^N f_m(t)\\exp(-2\\pi i \\frac{kn}{N})$\n",
" and calculate the absolute value, $|F_{km}|$.\n",
"5. Plot the resulting matrix: $|F_{km}|$ in the time-frequency plane."
]
},
{
"cell_type": "code",
"execution_count": null,
"metadata": {},
"outputs": [],
"source": []
}
],
"metadata": {
"kernelspec": {
"display_name": "Python 3",
"language": "python",
"name": "python3"
},
"language_info": {
"codemirror_mode": {
"name": "ipython",
"version": 3
},
"file_extension": ".py",
"mimetype": "text/x-python",
"name": "python",
"nbconvert_exporter": "python",
"pygments_lexer": "ipython3",
"version": "3.6.7"
}
},
"nbformat": 4,
"nbformat_minor": 2
}