Presentation is loading. Please wait.

Presentation is loading. Please wait.

Signal Processing and Data Analysis Simon Godsill Lent 2015

Similar presentations


Presentation on theme: "Signal Processing and Data Analysis Simon Godsill Lent 2015"— Presentation transcript:

1 Signal Processing and Data Analysis Simon Godsill Lent 2015
Demos Signal Processing and Data Analysis Simon Godsill Lent 2015

2 Handout 3 and 4 – Fourier Transforms Spectrum of a sine-wave

3 Spectrum of a square wave

4 Handout 5 – Sampling theory Aliasing example
Flute correctly sampled at f_0=44.1kHz Low-pass Pre-filtered to 20kHz Flute incorrectly sampled at much lower f_0 - same low-pass pre-filtering at 20kHz

5 Handout 6 Discrete Fourier Transform DFT of Musical Audio (f_s=44
Handout 6 Discrete Fourier Transform DFT of Musical Audio (f_s=44.1kHz, N=40000)

6 Non-stationary (time-varying) audio and the Spectrogram
For a long time-varying signal, can split up the data into lots of shorter `frames’ and Perform the DFT on each. Then piece the |DFT|s all back together as an image intensity `time-frequency’ plot, the Spectrogram:

7 Spectrogram of saxophone extract
The |DFT | of one short data frame, plotted as a vertical slice of the image

8 DFT of sinewave, 1kHz, f_s=44.1kHz, N=1000
fs=44100; % Sampling rate, Hz x=sin([1:44100]./fs*1000*2*pi); % Generate 1s of 1kHz sinewave X=fft(x(1:1000)); % Take the DFT of first N=1000 data points

9 DFT of square wave, 1kHz, f_0=44.1kHz, N=1000
x=square([1:44100]./fs*1000*2*pi); % Generate 1s of square wave X=fft(x(1:1000)); % Take the DFT of N=1000 data points

10 Sampling and Aliasing Take Spectrogram of a `chirp’ signal
Use a sampling frequency of 10kHz (> twice maximum frequency in chirp):

11 Aliased Chirp Now, the same chirp signal but sampled at only at 5kHz
(< twice maximum frequency of chirp). No pre-filtering is applied to remove components above 5kHz: Now get aliasing of the high frequency components

12 Why does this happen? Consider one frequency occurring at around 1.8 s, frequency is roughly 3.5kHz. Fourier Transform of this should look like:

13 But, we are sampling at 5kHz, with no prefiltering to remove high frequency components.
Sampled spectrum has form: Viewed graphically we get:

14 This is the bit plotted in the
Spectrogram at t=1.8s


Download ppt "Signal Processing and Data Analysis Simon Godsill Lent 2015"

Similar presentations


Ads by Google