Frequency Domain Characterisation of Signals
Frequency Domain Characterisation of Signals
Signal Representation
What is a signal Time-domain description
Waveform representation Periodic vs. non-periodic signals
Frequency-domain description
Periodic signals Sinusoidal signals Fourier series for periodic signals Fourier transform for non-periodic signals Concepts of frequency, bandwidth, filtering Numerical calculation: FFT, spectrogram Demo: real sounds and their spectrogram (from DSP First)
What is a signal
A variable (or multiple variables) that changes in time
Speech or audio signal: A sound amplitude that varies in time Temperature readings at different hours of a day Stock price changes over days Etc
Waveform Representation
Waveform representation
Plot of the variable value (sound amplitude, temperature reading, stock price) vs. time Mathematical representation: s(t)
2000
4000
6000
8000
10000
12000
14000
16000
2200
2400
2600
2800
3000
Entire waveform
Blown-up of a section
[y,fs]=wavread(sc01_L.wav'); v=axis; sound(y,fs); axis([1.1e4,1.2e4,-.2,.2]) figure; plot(y); Music typically has more periodic structure than speech Structure depends on the note being played
Yao Wang, 2006 EE3414: Signal Characterization 6
Sinusoidal Signals
2.5
Sinusoidal signals are important because they can be used to synthesize any signal
An arbitrary signal can be expressed as a sum of many sinusoidal signals with different frequencies, amplitudes and phases
0.5
s (t ) = Ak cos(2kf 0t )
k =0
-0.5
-1 -1.5
View note for matlab code
-1
-0.5
0.5
1.5
With many more sinusoids with appropriate magnitude, we will get the square wave exactly
Yao Wang, 2006 EE3414: Signal Characterization 9
1.2
4 Ak = k 0
k = 1,3,5,... k = 0,2,4,...
Each line corresponds to one harmonic frequency. The line magnitude (height) indicates the contribution of that frequency to the signal. The line magnitude drops exponentially, which is not very fast. The very sharp transition in square waves calls for very high frequency sinusoids to synthesize.
Amplitude
0.8
0.6
0.4
0.2
0 1 3 5 7 9 k,fk=f0*k 11 13 15
10
Period Signal
Period T: The minimum interval on which a signal repeats
Sketch on board
11
12
Euler formula
exp( jt ) + exp( jt ) = 2 cos(t ) exp( jt ) exp( jt ) = j 2 sin(t )
13
k =
T0
15
1.2
4 Ak = k 0
k = 1,3,5,... k = 0,2,4,...
Amplitude
0.8
0.6
0.4
0.2
0 1 3 5 7 9 k,fk=f0*k 11 13 15
Only the positive frequency side is drawn on the left (single sided spectrum), with twice the magnitude of the double sided spectrum.
16
0.8 s(t)
0.6
0.4
0.2
0 -1
-0.8
-0.6
-0.4
-0.2
0 t
0.2
0.4
0.6
0.8
The peaks of the FT magnitude drops slowly. This is because the pulse function has sharp transition, which contributes to very high frequency in the signal.
-8
-6
-4
-2
0 f
10
S( f ) = T
sin(Tf ) = T sinc(Tf ) Tf
19
S( f ) =
1 1 ; S( f ) = + j 2f 2 + 4 2 f 2
20
The FT magnitude drops much faster than for the pulse function. This is because the exponential decay function does not has sharp transition.
S( f ) =
1 1 ; S( f ) = + j 2f 2 + 4 2 f 2
21
(Effective) Bandwidth
1 0.9 0.8 0.7 0.6 0.5 0.4 0.3 0.2 0.1 0 -10
fmin (fma): lowest (highest) frequency where the FT magnitude is above a threshold Bandwidth: B=fmax-fmin
The threshold is often chosen with respect to the peak magnitude, expressed in dB dB=10 log10(ratio) 10 dB below peak = 1/10 of the peak value 3 dB below=1/2 of the peak
22
B
-8 -6 -4 -2 0 2 4 6 8 10
fmin
Yao Wang, 2006
fmax
EE3414: Signal Characterization
More on Bandwidth
Bandwidth of a signal is a critical feature when dealing with the transmission of this signal A communication channel usually operates only at certain frequency range (called channel bandwidth)
The signal will be severely attenuated if it contains frequencies outside the range of the channel bandwidth To carry a signal in a channel, the signal needed to be modulated from its baseband to the channel bandwidth Multiple narrowband signals may be multiplexed to use a single wideband channel
23
24
S(t)
0.03
0.02
0.01
-0.01
-0.02 2450
2460
2470
2480
2490
2500
2510
2520
2530
2540
2550
Numerical Calculation of FT
The original signal is digitized, and then a Fast Fourier Transform (FFT) algorithm is applied, which yields samples of the FT at equally spaced intervals. For a signal that is very long, e.g. a speech signal or a music piece, spectrogram is used.
Fourier transforms over successive overlapping short intervals
26
Spectrogram
0.08 0.06 0.04 0.02 0 -0.02 -0.04 -0.06 -0.08 -0.1 2000
S(t)
FFT
FFT
FFT
FFT
2600
FFT FFT
2800 3000
2200
2400
t
Yao Wang, 2006 EE3414: Signal Characterization 27
T
2200 2400 2600 2800 3000
2000
4000
6000
8000
10000
12000
14000
16000
Entire waveform
Blown-up of a section.
Signal within each short time interval is periodic. The period T is called pitch. The pitch depends on the vowel being spoken, changes in time. T~70 samples in this ex. f0=1/T is the fundamental frequency (also known as formant frequency). f0=1/70fs=315 Hz. k*f0 (k=integers) are the harmonic frequencies.
Yao Wang, 2006 EE3414: Signal Characterization 28
f0
0 2000 4000
f0
6000 Frequency
8000
10000
12000
figure; psd(x,256,fs);
Signal power drops sharply at about 4KHz
figure; specgram(x,256,fs);
Line spectra at multiple of f0, maximum frequency about 4 KHz What determines the maximum freq?
29
Entire waveform
Blown-up of a section.
30
Speech Spectrogram
figure; psd(x,256,fs);
Signal power drops sharply at about 4KHz
figure; specgram(x,256,fs);
Line spectra at multiple of f0, maximum frequency about 4 KHz
31
Entire waveform
Blown-up of a section
[y,fs]=wavread(sc01_L.wav'); v=axis; sound(y,fs); axis([1.1e4,1.2e4,-.2,.2]) figure; plot(y); Music typically has more periodic structure than speech Structure depends on the note being played
Yao Wang, 2006 EE3414: Signal Characterization 32
figure; psd(y,256,fs);
Signal power drops gradually in the entire frequency range
figure; specgram(y,256,fs);
Line spectra are more stationary, Frequencies above 4 KHz, more than 20KHz in this ex.
33
Spectral content
Within each short segment, a speech or music signal can be decomposed into a pure sinusoidal component with frequency f0, and additional harmonic components with frequencies that are multiples of f0. The maximum frequency is usually several multiples of the fundamental frequency Speech has a frequency span up to 4 KHz Audio has a much wider spectrum, up to 22KHz
34
Demo
Demo in DSP First, Chapter 3, Sounds and Spectrograms
Look at the waveform and spectrogram of sample signals, while listening to the actual sound Simple sounds Real sounds
35
36
Typical Filters
Lowpass -> smoothing, noise removal Highpass -> edge/transition detection Bandpass -> Retain only a certain frequency range
Low-pass H(f) High-pass H(f) Band-pass H(f)
37
Filtering is done by a simple multiplification: Y(f)= X(f) H(f) H(f) is designed to magnify or reduce the magnitude (and possibly change phase) of the original signal at different frequencies. A pulse signal after low pass filtering (left) will have rounded corners.
38
S(t)
1.2
0.8
0.4
0.2
-0.2 -1
-0.8
-0.6
-0.4
-0.2
0.2
0.4
0.6
0.8
0.25
h(t)
0.2 averaging over 11 samples fir1(10,0.25) 0.15
0.1
0.05
-0.05 1 2 3 4 5 6 7 8 9 10 11
40
Averaging
0.1
0.2 0.3 0.4 0.5 0.6 0.7 0.8 Normalized Angular Frequency ( rads/sample)
0.9
100
fir11(10,0.25)
0 0 -50 -100 -100 -200 0 -150 0 0.1 0.1 0.2 0.3 0.4 0.5 0.6 0.7 0.8 Normalized Angular Frequency ( rads/sample) 0.2 0.3 0.4 0.5 0.6 0.7 0.8 Normalized Angular Frequency ( rads/sample) 0.9 0.9 1 1
41
42
S(t)
1
0.6
0.4
0.2
-0.2
-0.4 -1
-0.8
-0.6
-0.4
-0.2
0.2
0.4
0.6
0.8
t
Yao Wang, 2006 EE3414: Signal Characterization 43
10
11
Magnitude (dB)
Frequency response
0 -20 -40 -60 -80 -100 0 0.1 0.2 0.3 0.4 0.5 0.6 0.7 0.8 Normalized Angular Frequency ( rads/sample) 0.9 1
400
44
45
Implementation of Filtering
Frequency Domain
FT -> Filtering by multiplication with H(f) -> Inverse FT
Time Domain
Convolution using a filter h(t) (inverse FT of H(f))
You should understand how to perform filtering in frequency domain, given a filter specified in frequency domain Should know the function of the filter given H(f) Computation of convolution is not required for this lecture Filter design is not required.
Yao Wang, 2006 EE3414: Signal Characterization 46
47
Filtering concept
Know how to apply filtering in the frequency domain Can interpret the function of a filter based on its frequency response
Lowpass -> smoothing, noise removal Highpass -> edge detection, differentiator Bandpass -> retain certain frequency band, useful for demodulation
48
References
Oppenheim and Wilsky, Signals and Systems, Sec. 4.2-4.3 (Fourier series and Fourier transform) McClellan, Schafer and Yoder, DSP First, Sec. 2.2,2.3,2.5 (review of sinusoidal signals, complex number, complex exponentials)
49