MEH-Nakai Lab-1
MEH-Nakai Lab-1
Phase
-3
-4
-5
-10 -5 -1 0 5 10
Frequency -3
-5
3.14) -10 -5
1
-1 0 5 10
-3
-5
The Independent Variable is Time
The Dependent Variable is the Amplitude
Most of the Information is Hidden in the Frequency Content
1 1
0.5 0.5
Magnitude
2 Hz
Magnitude
0 0
10 Hz
-0.5 -0.5
-1 -1
0 0.5 1 0 0.5 1
Time Time
1 4
2 Hz +
20 Hz
0.5 2
Magnitude
Magnitude
0 0 10 Hz +
-0.5 -2 20Hz
-1 -4
0 0.5 1 0 0.5 1
Time Time
Stationary signal
• Frequency content of stationary signals do
not change in time.
• All frequency components exist at all times
Non-Stationary signal
• Frequency content of stationary signals
change in time.
Magnit
ude
20 Hz 80 Hz 120 Hz
Speech is the message content or information conveyed
Noise is the unwanted signal that interfere
Speech
3000
2000
Amplitude
0
• Non-stationary -1000
-2000
-3000
0 1 2 3 4 5 6
Time (sec.)
-40 -40
Crowd Factory
-60 -60
Noise
PSD
PSD
-80 -80
-100 -100
• Unknown -120
0 1000 2000 3000 4000 5000
-120
0 1000 2000 3000 4000 5000
Frequency Frequency
non-stationary (babble)
PSD
PSD
-80 -80
-120 -120
0 1000 2000 3000 4000 5000 0 1000 2000 3000 4000 5000
Frequency Frequency
• For voiced speech, when SNR is low- periodicity
and structure of speech are affected.
• For unvoiced, the low energy parts are highly amplified,
looking like voiced.
Voiced speech Unvoiced speech
3000 1500
2000 1000
Amplitude
Amplitude
1000 500
0 0
-1000 -500
-2000 -1000
-3000 -1500
0 50 100 150 200 0 50 100 150 200
Sample number Sample number
3000 1500
2000 1000
Amplitude
Amplitude
1000 500
0 0
-1000 -500
-2000 -1000
-3000 -1500
0 50 100 150 200 0 50 100 150 200
Sample number Sample number
Almost all biological signals are non-stationary. Some of the most
famous ones are ECG (electrical activity of the heart,
electrocardiograph), EEG (electrical activity of the brain,
electroencephalogram), and EMG (electrical activity of the
muscles, electromyogram).
ECG
EEG
EMG
ADC
Microphone converts acoustic to
electrical energy. It’s a transducer.
Continuously varying electrical energy is an
analog of the sound pressure wave.
ADC (Analog to Digital Converter) converts
analog to digital electrical signal.
Digital signal transmits binary numbers.
DAC (Digital to Analog Converter) converts digital
signal in computer to analog for your headphones.
Instantaneous amplitudes of
continuous analog signal, measured
at equally spaced points in time.
A series of “snapshots”
Sampling Rate
How often analog signal is measured
[samples per second, Hz]
Sampling Resolution
[ “sample word length,” “bit depth”]
Precision of numbers used for measurement:
the more bits, the higher the resolution.
Example: 16 bit
Determines the highest frequency that you can
represent with a digital signal.
Sampling/Nyquist Theorem:
Sampling rate must be at least twice as high as
the highest frequency you want to represent.
looks like …
7
6
5
Amplitude
4
3
2
1
0
Time — measure amp. at each tick of sample clock
A 4-bit binary number has 24 = 16 values.
14
12
10
Amplitude
8
6
4
2
0
Time — measure amp. at each tick of sample clock
A better approximation
When a signal is quantized, we introduce an
error - the coded signal is an approximation
of the actual amplitude value.
The difference between actual and coded
value (midpoint) is referred to as the
quantization error.
The more zones, the smaller ∆ which results
in smaller errors.
BUT, the more zones the more bits required
to encode the samples -> higher bit rate
Round-off error: difference between actual
signal and quantization to integer values…
Random errors:
sounds like low-
amplitude noise
Quantization
Quantization is the process of
converting the sampled analog voltages
into digital words.
Data coding
Data coding separates the digital words
so that they are more easily identified.
To reconstruct analog signal, hold each sample value for
one clock tick; convert it to steady voltage.
7
6
5
Amplitude
4
3
2
1
0
Time
Apply an analog low-pass filter to the output of the
sample-and-hold unit: averages “stair steps” into a smooth
curve.
7
6
5
Amplitude
4
3
2
1
0
Time
Discrete-time signals are represented by sequence of
numbers
The nth number in the sequence is represented with x[n]
Often times sequences are obtained by sampling of
continuous-time signals
In this case x[n] is value of the analog signal at xc(nT)
Where T is the sampling period
10
-10
0 20 40 60 80 100 t (ms)
10
-10
0 10 20 30 40 50 n (samples)
Even
x ( n) = x ( − n)
Odd
x ( n) = − x ( − n)
• Any signals can be expressed as a
sum of even and odd signals. That is:
1.5
1
0.5
δ ( n) = u( n) − u( n − 1)
0 ∞
-10 -5 0 5 10
1.5
u( n) = ∑ δ ( n − m )
1
m =0
0.5
0
-10 -5 0 5 10 Exponential sequence
1
0.8
Amplitude
0.6
0.4
0.2
0
-10 -5 0 5 10 15 20
δ ( n − 5)
n
0.8
Amplitude
0.6
0.4
0.2
0
-10 -5 0 5 10 15 20
n
u(n) unit step sequence
0.8
Amplitude
0.6
0.4
0.2
0
-5 0 5 10 15 20
u( n − 5)
n
0.8
Amplitude
0.6
0.4
0.2
0
-5 0 5 10 15 20
n
Operations on sequence
Time-shifting operation
where is an integer
delaying operation
Unit delay x (n) z-1 y( n) = x ( n − 1)
advance operation
Unit x (n) z y( n) = x ( n + 1)
advance
Time-shifting operation
Time-shifting
0.2
original sequence
operation
0.2 × 0.8 n u( n)
Amplitude
0.1
0 n
-10 -5 0 5 10 15 20 25 30
delayed sequence
0.2
0.2 × 0.8 n − 5 u( n − 5)
Amplitude
0.1
0
-10 -5 0 5 10 15 20 25 30 n
advanced sequence
0.2
0.2 × 0.8 n + 5 u( n + 5)
Amplitude
0.1
0 n
-10 -5 0 5 10 15 20 25 30
Time-reversal (folding) operation
Addition operation
Sample-by-sample addition
Adder x (n) y( n) = x ( n) + w ( n)
w (n)
folding operation
olding operation 1
original sequence
0.8 n u( n)
0.8
Amplitude
0.6
0.4
0.2
0
-20 -15 -10 -5 0 5 10 15 20
n
folding sequence
−n
1
0.8 u( − n)
0.8
Amplitude
0.6
0.4
0.2
0
-20 -15 -10 -5 0 5 10 15 20
n
addition operation
1
x1(n) 0.8 n u( n)
Amplitude
0.5
0
0 5 10 15 20 25 30 35 40 n
x2(n)
1 cos(0.2n)u( n)
Amplitude
-1
0 5 10 15 20 25 30 35 40 n
x1(n)+x2(n)
2 0.8 n u( n) + cos(0.2n)u( n)
Amplitude
-1
0 5 10 15 20 25 30 35 40 n
Scaling operation
Multiplier x (n) A y( n) = Ax ( n)
modulator x (n) y( n) = x ( n) ⋅ w ( n)
w (n)
modulation operation x1(n) 0.1 sin 0.0125nπ
0.1
Amplitude
-0.1
0 20 40 60 80 100 120 140 160
x2(n)
1
sin 0.125nπ
Amplitude
-1
0 20 40 60 80 100 120 140 160
0.1
x1(n)*x2(n)
x1 ( n) ⋅ x 2 ( n)
Amplitude
-0.1
0 20 40 60 80 100 120 140 160
Decimation---down-sampling
y ( m ) = x ( mN )
x(n)
Decimation---down-sampling
y ( m ) = x ( mN )
Decimation---down-sampling
y ( m ) = x ( mN )
y(m)
Interpolation --- up-sampling
y ( m) = x ( m / M )
Interpolation --- up-sampling
y ( m) = x ( m / M )
1.5 × cos( 0.05 × 2π n )
Sin u so id al seq u en ce
2
1
Amplitude
-1
-2
0 10 20 30 40 50 60
1
Amplitude
-1
-2
0 10 20 30 40 50 60
n
Introduction
Linear System
Time-Invariant (Shift-Invariant) System
Linear Time-Invariant (LTI) System
Causal System
Stable System
Memory System
Linear System
if T [ x ( n)] = y( n)
then T [ x ( n − n0 )] = y( n − n0 )
Linear Time-Invariant (LTI) System
0.5
0
0 5 10 15 20 25 30 35 40 45 50
h(n)
1.5
h( n) = 0.9 n u( n)
Amplitude
0.5
0
0 5 10 15 20 25 30 35 40 45 50
y(n)
10
y( n) = x ( n) ∗ h( n)
Amplitude
0
0 5 10 15 20 25 30 35 40 45 50
e.g.
δ [ n] System h[n]
Linear Time-Invariant Systems
and Convolution
Linear Time-Invariant Systems
and Convolution
Linear Time-Invariant Systems
and Convolution
Linear Time-Invariant Systems
and Convolution
Linear Time-Invariant Systems
and Convolution
Linear Time-Invariant Systems
and Convolution
Correlation addresses the question: “to what
degree is signal A similar to signal B.”
An intuitive answer can be developed by
comparing deterministic signals with
stochastic signals.
Deterministic = a predictable signal equivalent to
that produced by a mathematical function
Stochastic = an unpredictable signal equivalent to
that produced by a random process
Correlation is maximum when
Two signals are similar in shape
And are in phase (or unshifted)
Correlation is measure of similarity
between two signals as a function of
time shift between them
Correlation functions shows how similar two
signals are, and how long they remain similar when
one is shifted with respect to the other
Correlating a signal with itself
∞
rxx ( l ) = ∑ x ( n ) x ( n − l ) = r ( −l )
n =−∞
xx l = 0, ±1, ±2,
Cross-correlation of x(n) and y(n) is a
sequence, rxy(l)
∞
rxy ( l ) = ∑ x (n) y (n − l )
n = −∞
l = 0, ±1, ±2,
∞
rxy ( l ) = ∑ x (n − l ) y (n)
n = −∞
l = 0, ±1, ±2,
Thanks for your
attention