SlideShare a Scribd company logo
1 of 83
Sampling of Continuous-Time
Signals
Chapter4. Sampling of Continuous-Time Signals
1. A/D Conversion and Sampling
2. Reconstruction of a Bandlimited Signals
3. Continuous-Discrete Frequency Characteristics
4. Digital Processing of Continuous-Time Signals
5. Changing the Sampling Rate Using Discrete-Time Processing
6. Multi rate Signal Processing
7. Practical Considerations in A/D and D/A Conversions
8. Multirate Processing for A/D and D/A Conversions
Signal Types
3
 Analog signals: continuous in time and amplitude
 Example: voltage, current, temperature,…
 Digital signals: discrete both in time and amplitude
 Example: attendance of this class, digitizes analog signals,…
 Discrete-time signal: discrete in time, continuous in amplitude
 Example: hourly change of temperature in Austin
 Theory is based on discrete-time continuous-amplitude signals
 Most convenient to develop theory
 Good enough approximation to practice with some care
Why digital?
4
Digital techniques need to distinguish between discrete symbols
allowing regeneration versus amplification
Good processing techniques are available for digital signals, such as
medium.
 Data compression (or source coding)
 Error Correction (or channel coding)
 Equalization
 Security
 Easy to mix signals and data using digital techniques (Time Division
Multiplexing)
4
Analog to Digital Conversion
6
Sampling
• The signals we use in the real world, such as our voices, are
called "analog" signals.
• To process these signals in computers, we need to convert the
signals to "digital" form.
• Analog signal is continuous in both time and amplitude, a
digital signal is discrete in both time and amplitude.
Sampling(.)
• To convert a signal from continuous time to discrete time, a process
called sampling is used. The value of the signal is measured at certain
intervals in time.
• Each measurement is referred to as a sample. (The analog signal is
also quantized in amplitude, but that process is ignored as it will be
explained by some other group)
Figure 0: Signal sampling representation.
The continuous signal is a green colored line
Discrete samples are indicated by the blue vertical lines.
Analog to Digital Conversion
10
 Analog-to-digital conversion is (basically) a 2 step process:
 Sampling
• Convert from continuous-time analog signal xa(t) to discrete-time
continuous value signal x(n).
• Is obtained by taking the “samples” of xa(t) at discrete-time
intervals, Ts
 Quantization
• Convert from discrete-time continuous valued signal to discrete
time discrete valued signal
Definition
11
 Bit Rate
 Actual rate at which information is transmitted per second
are transmitted,
 Baud Rate
 Refers to the rate at which the signaling elements
i.e. number of signaling elements per second.
 Bit Error Rate
 The probability that one of the bits is in error or simply the
probability of error
Sampling
12
Sampling is the processes of converting continuous-time analog signal,
xa(t), into a discrete-time signal by taking the “samples” at discrete-time
intervals
 Sampling analog signals makes them discrete in time but still continuous valued.
 If done properly (Nyquist theorem is satisfied), sampling does not introduce
distortion
 Sampled values:
 The value of the function at the sampling points
 Sampling interval:
 The time that separates sampling points (interval b/w samples), Ts
 If the signal is slowly varying, then fewer samples per second will be required than
if the waveform is rapidly varying
 So, the optimum sampling rate depends on the maximum frequency component
present in the signal
Sampling(..)
• A sample is a value or set of values at a point in time and/or space.
• A sampler is a subsystem or operation that extracts samples from a
continuous signal.
• A theoretical ideal sampler produces samples equivalent to the
instantaneous value of the continuous signal at the desired points.
First step toward Digital Signal Processing
 Main question:
Can a finite number of samples of a continuous wave be enough to
represent the information?
OR
Can you tell what the original signal was below?
14
Sampling
15
t=[34 42 142 191 221 240 207 88 99 110 127 223];
>> x=0:1:11;
>> t1=sin(x);
>> plot(x,t1,'r')
>> stem(x,t1,'m')
Figure Command?
Subplot?, How to compare graphs, Axis?
Sampling
16
• If one period of Sine wave spans takes 32 ms to complete then, t=32ms
• Given Time Period=125μs
• Number of Samples=?
• N= 32ms/125μs= 256 samples
How sampling is done?
• First obtain signal values from the continuous signal at regular time-
intervals (Ts). Which is sampling time and its reciprocal is fs sampling
frequency
• The result of this process is just a sequence of numbers.
• Our discrete time signal will be denoted as x[n] where n is index.
• As sampling interval Ts is defined, sampling just extracts the signals
value at all integer multiples of Ts such that
x[n] = x(n·Ts)
How sampling is done?(.)
• At this point (after sampling), our signal is not yet completely digital
because the values x[n] can still take on any number from a
continuous range.
• So we use the terms discrete-time signal.
• Figure 1 illustrates the process of sampling a continuous sinusoidal.
How sampling is done?(..)
• For Input signal
• Known as discrete time frequency, Normalized continuous frequency.
Example: Sampling rate Comparisons
• Consider at sampling rates of 240 and 1000 samples per second
Example(.)
Example(..)
Key Elements of Sampling and Reconstruction
Sampling
continuous-time
signal
t
analog sampling
analog-digital
conversion
DSP Operations
t n
DSP Operations
digital-analog
conversion
reconstruction
continuous-time
signal
23
• A continuous-time signal is sampled at discrete time intervals and subsequently
converted to a sequence of digital values for processing.
Reconstruction
n t t
• The sequence of digital values is converted into a series of impulses at discrete
time intervals before being reconstructed into a continuous-time signal.
• Sampling and Reconstruction are mathematical duals.
Ambiguity of Sampled-Data Signals
2
4
• Which continuous-time signal does this discrete-time sequence represent?
• Knowing the sampling rate, is not enough to uniquely
reconstruct a continuous-time signal from a discrete-time
sequence.
• The uncertainty is a result of aliasing.
Ideal Sampling
25
 Sampling Rate (or sampling frequency fs):
 The rate at which the signal is sampled, expressed as the number of samples
per second (reciprocal of the sampling interval), 1/Ts = fs
 Nyquist Sampling Theorem (or Nyquist Criterion):
 If the sampling is performed at a proper rate, no info is lost about the
original signal and it can be properly reconstructed later on
 Statement:
“If a signal is sampled at a rate at least, but not exactly equal to twice
the max frequency component of the waveform, then the waveform can
be exactly reconstructed from the samples without any distortion”
fs  2fmax
Ideal Sampling
26
In case the signal fails to fulfill the Nyquist criterion, there are two main
scenarios that can occur
1. Over Sampling
2. Under Sampling
Under Sampling
• In Undersampling a band pass signal is sampled slower than
its Nyquist rate.
• When one undersamples a bandpass signal, the samples are
indistinguishable from the samples of a low-frequency samples of the
high-frequency signal.
• In such a way that the lowest-frequency alias satisfies the Nyquist
criterion, because the bandpass signal is still uniquely represented
and recoverable. Such undersampling is also known as bandpass
sampling, harmonic sampling, IF sampling, and direct IF to digital
conversion.
Oversampling
• In Oversampling a signal is sampled faster than its Nyquist rate.
• Oversampling is used in most modern analog-to-digital converters to
reduce the distortion or noise effects introduced by practical digital-
to-analog converters.
Representation of CT Signal by its Samples
Representation of CT Signal by its Samples
Representation of CT Signal by its Samples
4.1 Periodic Sampling
In this method x[n] obtained
from xc(t) according to the
relation :
32
[ ] ( )
1/
c
s
x n x nT n
T sampling period f T sampling frequency
    
  
• The sampling operation is generally not invertible i.e.,
given the output x[n] it is not possible in general to
reconstruct xc(t). Although we remove this ambiguity by
restricting xc(t).
Chapter 4: Sampling of Continuous-Time Signals
BGL/SNU
Ideal C/D Conversion
Ideal D/C conversion
s(t)-impulse train
o T 2T 0 1 2.......
xc(t) xs(t) x(n)
Impluse train to
discrete
sequence
Conversion
X
Ideal
Reconstruction
Filter
Disc.Seq.to
Imp.Tr.
Conversion
0 1 2
T 2T...
ys(n)
Hr(j)
y(n) yr(n)
Sampling with a Periodic Impulse Train
Figure(a) is not a representation
of any physical circuits, but it is
convenient for gaining insight in
both the time and frequency
domain.
34
( ) ( )
n
s t t nT



 

(a) Overall system
(b) xs(t) for two sampling rates
(c) Output for two sampling
rates
35
 
t
x
 
0
x  
T
x  
T
x 2
 
t
x  
t
xp
   
nT
t
t
p
n

 




-3T -2T -T 0 T 2T 3T 4T t
Impulse Sampling
Sampled waveform
0
1 20
Signal waveform
0
1 20
Impulse sampler
0
Impulse Sampling
with increasing sampling time T
Sampled waveform
0
1 20
Sampled waveform
0
1 20
Sampled waveform
0
1 20
Sampled waveform
0
1 20
38







)]
(
*
)
(
[
2
1
)
(
)
(
)
(
)
(



 j
P
j
X
j
X
t
p
t
x
t
x
p
p
x(t)
p(t)
xp(t)







n
T nT
t
t
t
p
where )
(
)
(
)
( 

Sampling
Chapter 7 Sampling
39
Time domain:








n
T
p nT
t
nT
x
t
t
x
t
x )
(
)
(
)
(
)
(
)
( 

Chapter 7 Sampling
4.2 Frequency Domain Representation of Sampling
Let us now consider the Fourier transform of xs(t):
40
( ) ( ) ( ) ( ) ( ) ( )
( ) ( ) ( ) ( )
s c c
n
s c
n
x t x t s t x t t nT Modulation
x t x nT t nT Shifting property






  
 


( ) ( )
Fourier
s t S j
  ( ) ( )
Fourier
c C
x t X j
 
radians/s.
in
rate
sampling
the
is
/
2
where
)
(
2
)
( T
k
T
j
S s
k
s 








 



 
1 1
( ) ( )* ( ) ( )
2
s c c s
k
X j X j S j X j k
T



       

Chapter 4: Sampling of Continuous-Time Signals
Frequency Domain Representation of Sampling
By applying the continuous-time Fourier transform to
equation
We obtain
consequently
41
2
1
)
( 












 


 T
k
T
j
X
T
e
X
k
c
j 


( ) ( ) ( )
j j T
s T
X j X e X e




   
( ) ( ) ( )
s c
n
x t x nT t nT



 

( ) ( ) j Tn
S c
n
X j x nT e

 

  
[ ] ( ) ( ) [ ]
j j n
c
n
x n x nT and X e x n e
 



  
Chapter 4: Sampling of Continuous-Time Signals
Exact Recovery of Continuous-Time from Its Samples
(a) represents a band
limited Fourier transform
of xc(t) Whose highest
nonzero frequency is
.
(b) represents a periodic
impulse train with
frequency.
(c) shows the output of
impulse modulator in the
case
42
N

S

2
S N N S N
       
Chapter 4: Sampling of Continuous-Time Signals
Exact Recovery of Continuous-Time from Its Samples
In this case
don’t overlap
therefore xc(t) can be
recovered from xs(t) with
an ideal low pass filter
with gain T and cutoff
frequency
It means
43
=
( )
C
X j
( )
r
H j 
N C S N
     
( ) ( )
r C
X j X j
  
Chapter 4: Sampling of Continuous-Time Signals
Aliasing Distortion
(a) represents a band
limited Fourier transform
of xc(t) Whose highest
nonzero frequency is
.
(b) represents a periodic
impulse train with
frequency.
(c) shows the output of
impulse modulator in the
case
44
N

S

2
S N N S N
       
Chapter 4: Sampling of Continuous-Time Signals
Aliasing Distortion
In this case the copies of overlap and is not longer
recoverable by lowpass filtering therefore the reconstructed
signal is related to original continuous-time signal through a
distortion referred to as aliasing distortion.
45
( )
C
X j
Chapter 4: Sampling of Continuous-Time Signals
Aliasing Understanding through MATLAB
f = 60; % Hz
tmin = -0.05;
tmax = 0.05;
t = linspace(tmin, tmax, 400);
x_c = cos(2*pi*f * t);
plot(t,x_c)
xlabel('t (seconds)'
46
Chapter 4: Sampling of Continuous-Time Signals
Continuous-time cosine signal at 60 Hz.
linspace(X1, X2) generates a row vector of 100
linearly equally spaced points between X1 and X2.
Aliasing Understanding through MATLAB
T = 1/800;
nmin = ceil(tmin / T);
nmax = floor(tmax / T);
n = nmin:nmax;
x1 = cos(2*pi*f * n*T);
hold on
plot(n*T,x1,'.')
hold off
47
Chapter 4: Sampling of Continuous-Time Signals
Sample with a sampling frequency of 800 Hz.
The sampling frequency of 800 Hz is well
above 120 Hz, which is twice the
frequency of the cosine. And you can see
that the samples are clearly capturing
the oscillation of the continuous-time
cosine.
Aliasing Understanding through MATLAB
T = 1/400;
nmin = ceil(tmin / T);
nmax = floor(tmax / T);
n = nmin:nmax;
x1 = cos(2*pi*f * n*T);
plot(t, x_c)
hold on
plot(n*T, x1, '.')
hold off
48
Chapter 4: Sampling of Continuous-Time Signals
Sample with a sampling frequency of 400 Hz.
The samples above are still adequately
capturing the shape of the cosine.
Aliasing Understanding through MATLAB
T = 1/120;
nmin = ceil(tmin / T);
nmax = floor(tmax / T);
n = nmin:nmax;
x1 = cos(2*pi*f * n*T);
plot(t, x_c)
hold on
plot(n*T, x1, 'o')
hold off
49
Chapter 4: Sampling of Continuous-Time Signals
Drop the sampling frequency down to exactly 120 Hz, twice the frequency of the 60 Hz cosine.
See how the samples jump back and forth
between 1 and -1? And how they capture only
the extremes of each period of the cosine
oscillation? This is the significance of "twice
the highest frequency of the signal" value for
sampling frequency.
Aliasing Understanding through MATLAB
T = 1/70;
nmin = ceil(tmin / T);
nmax = floor(tmax / T);
n = nmin:nmax;
x1 = cos(2*pi*f * n*T);
plot(t, x_c)
hold on
plot(n*T, x1, 'o')
hold off
50
Chapter 4: Sampling of Continuous-Time Signals
Sampling frequency at 70 Hz.
The samples above look like they
actually could have come from a 10 Hz
cosine signal, instead of a 60 Hz cosine
signal. (Nyquist Criterion not followed)
Aliasing Understanding through MATLAB
T = 1/70;
x_c = cos(2*pi*10 * t);
nmin = ceil(tmin / T);
nmax = floor(tmax / T);
n = nmin:nmax;
x1 = cos(2*pi*f * n*T);
plot(t, x_c)
hold on
plot(n*T, x1, 'o')
hold off
51
Chapter 4: Sampling of Continuous-Time Signals
Sampling frequency at 70 Hz.
You can see that it worked perfectly for
a 10 Hz cosine signal, because now the
signal is following Nyquist Criterion
Aliasing Understanding through MATLAB
52
Chapter 4: Sampling of Continuous-Time Signals
Conclusion
That's the heart of the "problem" of aliasing. Because the sampling
frequency was too low, a high-frequency cosine looked like a low-
frequency cosine after we sampled it.
BGL/SNU
Sampling
<Input> )
(t
xc )
( 
j
Xc
<Impulse train>
)
(
)
(
)
( t
s
t
x
t
x c
s 

)
(
)
( nT
t
t
x
n
c 
  
<Impulsed input>
)
(
*
)
(
2
1
)
( 


 j
S
j
X
j
X c
s

)
(
*
)
(
1
 




n
s
c k
j
X
T

)
]
[
(
1
 



n
s
c k
j
X
T






n
nT
t
t
s )
(
)
( 








 )
(
2
)
( s
k
T
j
S 

:
2
T
s


 Sampling
frequency
)
(
)
( nT
t
t
x
n
c 
 
Example 2
BGL/SNU
<output>
)
(
*
)
(
)
( t
y
t
h
t
y s
r
r 
)
(
)
(
)
( 


 j
Y
j
H
j
Y s
r
r
))
(
(
1
)
( s
k
j
Y
T
j
H
k
c
r 



 
)
( 
 j
Yc
If )
( 
j
Hr
is an ideal LPF
Nyquist Sampling Theorem
When xc (t) is bandlimited s.t.
c
c j
X 




 |
|
,
0
)
(
If we do sampling by taking
Then xc (t) is uniquely reconstructed from x[n]= xc (nT)
,
2 c
s 


2
s


2
s

T

)
( 
j
S
)
( 
j
Hr
Illustration of Sampling
)
( 
j
Xc
)
(t
Xc
t

2
s

c
 s

)
( 
j
X s
c

 c

s

0

T
1
T
1
2
s
c



s


0
T
2
)
(t
Xs
t
)
(t
S
t
0 T ...
1
c

 c

BGL/SNU
c

 c

0

1
t
)
( 
j
Yr
What if ?
2
s
c



Aliasing
c
 s

0
c
s



2
)
(
)
( 

 j
X
j
Y c
r
Example: The effect of aliasing in the sampling of cosine signal
Suppose
57
0
( ) cos( )
c
x t t
 
Chapter 4: Sampling of Continuous-Time Signals
Nyquist Sampling Theorem
58
• Sampling theorem describes precisely how much information is
retained when a function is sampled, or whether a band-limited
function can be exactly reconstructed from its samples.
• Sampling Theorem: Suppose that is band-limited
to a frequency interval , i.e.,
Then xc(t) can be exactly reconstructed from equidistant samples
where is the sampling period, is the sampling
frequency (samples/second), is for radians/second.
( ) ( )
c C
x t X j
 
 
,
N N
 
( ) 0 for
C N
X j    

( )
C
X j 
N
 N

0
[ ] ( ) (2 / )
c s c s
x n x nT x n

  
s
s T
f /
1

2
s N
  
s
s
T 
 /
2
s
s T
/
2


Chapter 4: Sampling of Continuous-Time Signals
BGL/SNU
Illustration of aliasing
t
t
xc 
4000
cos
)
(  
4000
0 
 2000
0 
f
Sampling period
s
T




2
1500
1

3000

s 1500

s
f
Then the reconstructed output has 1000 component


1000
'
0 
 500
'
0 
f
(note, to avoid aliasing, ) 
8000
2 


 c
s
0
-4 1 2 3 4  (*1000)
BGL/SNU
1 2
ms
5
.
0
2000
1

3
2
3
4
f0
signal
f0'
signal
ms
2
500
1

0
t
t
xc 
4000
cos
)
(  t
t
xc 
1000
cos
)
( 
Original signal Aliased signal
Oversampled
Suppose that is band-limited:
Then if is sufficiently small, appears as:
Condition:
61
( ) ( )
c C
x t X j
 
S
T ( )
j
X e 
2 or or 2
N S N S N S S N
T T T
 
       
( )
C
X 
A
N
 N

0 
0
( )
j
X e 
N S
T
 N S
T




2
  
2

s
T
A
Chapter 4: Sampling of Continuous-Time Signals
Critically Sampled
62
Critically sampled: or 2
N S S N
T 
    
According to the Sampling Theorem, in general the signal cannot be
reconstructed from samples at the rate .
This is because of errors will occur if , the folded
frequencies will add at
Consider the case:
and note that for
 
( ) sin( ) ( ) ( )
c N N N
x t A t Aj  
     
( )
j
X e 
s
T
A
0



2
  
2

/
S N
T 
 
( ) 0
c N
X  
.

 
/ .
S N
T 
 
( ) sin( ) sin( ) 0 (for all )
s c s
x nT A nT A n n

   
Chapter 4: Sampling of Continuous-Time Signals
Under sampled (aliased)
63
If sampling theorem condition is not satisfied or 2
N S S N
T 
    
• The frequencies are folded - summed. This changes the shape of the
spectrum. There is no process whereby the added frequencies can be
discriminated - so the process is not reversible.
• Thus, the original (continuous) signal cannot be reconstructed exactly.
Information is lost, and false (alias) information is created.
• If a signal is not strictly band-limited, sampling can still be done at twice the
effective band-limited.
( )
j
X e 
s
T
A
0



2
  
2

Chapter 4: Sampling of Continuous-Time Signals
4.3 Reconstruction of a Bandlimited Signal from
Its Samples
Figure(a) represents an ideal
reconstruction system.
Ideal reconstruction filter has
the gain of T and cutoff
frequency
we choice
.
This choice is appropriate for
any relationship between
and .
64
c

N C S N
     
/ 2 /
C S T

   
S

N

Chapter 4: Sampling of Continuous-Time Signals
Reconstruction of a Bandlimited Signal from Its
Samples
Therefore
65
( ) [ ] ( )
( ) [ ] ( )
sin( / )
( )
/
sin( ( ) / )
( ) [ ]
( ) /
S
n
r r
n
r
r
n
x t x n t nT
x t x n h t nT
t T
h t
t T
t nT T
x t x n
t nT T











 
 







Chapter 4: Sampling of Continuous-Time Signals
Ideal D/C Converter
The properties of the ideal D/C converter are most easily seen in
the frequency domain.
66
( ) [ ] ( ) ( ) [ ] ( )
( ) ( ) [ ]
j Tn
r r r r
n n
j Tn
r r
n
x t x n h t nT X j x n H j e
X j H j x n e
 
 
 

 

      
   
 

( ) ( ) ( )
j T
r r
X j H j X e 
  
Chapter 4: Sampling of Continuous-Time Signals
4.4.1 LTI Discrete-Time systems
In general if the discrete-time system is LTI and if the
sampling frequency is above the Nyquist rate
associated with the band width of the input xc(t), then
the overall system will be equivalent to a LTI
continuous-time system with an effective frequency
response given by:
67
( ) ( ), /
( ) ( ) ( )
0, /
( ), /
( )
0, /
j T
C
r eff C
j T
eff
H e X j T
Y j H j X j
T
H e T
H j
T






   

    

 


  

  
 


Chapter 4: Sampling of Continuous-Time Signals
Example: Ideal Continuous-Time Lowpass Filtering Using a
Discrete-Time Lowpass Filter
68
1,
( )
0,
C
j
C
H e   
  
 

 
 


1,
( )
0,
C
eff
C
T
H j
T



 


  
  


Chapter 4: Sampling of Continuous-Time Signals
Example: Ideal Continuous-Time Lowpass Filtering Using a
Discrete-Time Lowpass Filter
69
Chapter 4: Sampling of Continuous-Time Signals
4.6 Changing the sampling rate using discrete-time processing
We have seen that a continuous-time signal can be represented by a
discrete-time signal.
It is often necessary to change the sampling rate of x[n] and obtain a
new discrete-time signal such that
One approach is to reconstruct and then resample it with
period, but it is of interest to consider methods that involve only
discrete time operations.
70
[ ] ( )
c
x n x nT

[ ] ( )
c
x n x nT
 

( )
c
x t
Chapter 4: Sampling of Continuous-Time Signals
4.6.1 Sampling rate reduction by an integer factor
Discrete-time sampler or compressor
If then is an exact
representation of
Downsampling: the operation of reducing the sampling
rate (including any filtering).
71
[ ] [ ] ( )
d c
x n x nM x nMT
 
( ) 0
C N
X j for
     [ ]
d
x n
( ) / /
c N
x t iff T MT
 
   
Chapter 4: Sampling of Continuous-Time Signals
Frequency domain relation between the
input and output of the compressor
72
1
0
1
( / 2 / )
0
1 2
[ ] ( ) ( ) ( ( ))
1 2
[ ] ( ) ( ) ( ( ))
, 0 1
1 1 2 2
( ) ( ( ))
1
( ) ( )
j
c C
k
j
d c d C
r
M
j
d C
i k
M
j j M i M
d
i
k
x n x nT X e X j
T T T
r
x n x nMT X e X j
MT MT MT
r i kM k i M
k i
X e X j
M T MT T MT
X e X e
M



  
 
 
  




 
 



   
   
        
 
  
 
 
 
  


 

Chapter 4: Sampling of Continuous-Time Signals
Down Sampling
73
a) Shows a Fourier Transform of a bandlimited signal
b) Fourier Transform of impulse train of samples when sampling with T
c) Shows
d) Figure (b) and (c) differ only in scaling of the frequency variable
e) Shows DTFT of down sampled sequence when M=2,
f) In this example,
• Original sampling rate is exactly twice the minimum rate to avoid aliasing
• Using the given expression, we know,
Substituting , we have,
𝑋(𝑒𝑗𝜔
𝜔 = 𝛺𝑇′
2𝜋
𝑇
= 4𝛺𝑁
𝜔𝑁 = 𝛺𝑁𝑇
𝛺𝑁
𝜔𝑁 = 𝜋 2
Down sampling without Aliasing
74
Chapter 4: Sampling of Continuous-Time Signals
Down sampling without Aliasing
75
Chapter 4: Sampling of Continuous-Time Signals
Down sampling with aliasing
76
Chapter 4: Sampling of Continuous-Time Signals
4.6.2 Increasing the sampling rate by an integer factor
We will refer to the operation of increasing the sampling rate upsampling
The system on the left is called a sampling rate expander. Its output is
The system on the right is a lowpass discrete-time filter with cutoff frequency
and gain L.
77
[ ] [ / ] ( / ) 0, , 2 ,...
i c
x n x n L x nT L n L L
    
[ / ], 0, , 2 ,...
[ ]
0,
[ ] [ ] [ ]
e
e
k
x n L n L L
x n
otherwise
x n x k n kL



  

 

 

/ L

Chapter 4: Sampling of Continuous-Time Signals
Increasing the sampling rate by an integer factor
This system is an
interpolator because of it fills in
the missing samples.
78
( ) [ ] [ ] [ ] ( )
j j n j Lk j L
e
n k k
X e x k n kL e x k e X e
   

  
 
  
 
   
 
 
  
Chapter 4: Sampling of Continuous-Time Signals
Increasing the Sampling Rate by an Integer Factor
If the input sequence was obtained by
sampling without aliasing then is correct for
all n, And is obtained by oversampling of .
79
[ / ], 0, , 2 ,...
[ ]
0,
[ ] [ ] [ ]
sin( / )
[ ]
/
sin( ( )/ )
[ ] [ ]
( )/
[ ] [ / ] ( / ) ( ) 0, , 2 ,...
i
e
e
k
i
k
i c c
x n L n L L
x n
otherwise
x n x k n kL
n L
h n
n L
n kL L
x n x k
n kL L
therefore x n x n L x nT L x nT n L L









  

 

 





     


[ ] ( )
c
x n x nT

[ ] ( )
i c
x n x nT 

( )
c
x t [ ]
i
x n
Chapter 4: Sampling of Continuous-Time Signals
4.6.3 Changing the Sampling Rate by a Non integer Factor
By combining decimation and interpolation it is possible to
change the sampling rate by a noninteger factor.
The interpolation and decimation filter can be combined
together.
80
Chapter 4: Sampling of Continuous-Time Signals
Changing the Sampling Rate by a Non integer Factor
81
Chapter 4: Sampling of Continuous-Time Signals
Down Sampling
82
x=[1 2 4 6 8 10 12 16];
n=[0: length(x)-1];
factor=input('samping by factor:');
x_downsampled=[ ];
for i=1:factor:length(x)
x_downsampled=[x_downsampled x(i)];
end
grid on
subplot 211
stem(n, x);
xlabel('n')
ylabel('value')
title('original signal')
grid on
subplot 212
stem(0:length(x_downsampled)-1,x_downsampled);
xlabel('n')
ylabel('v')
title('downsampled signal signal')
grid on
Up Sampling
83
x=[1 2 3 4 5]
n=[0: length(x)-1]
factor=input('samping by factor:')
x_upsampled=[ ]
for i=1:length(x)
x_upsampled=[x_upsampled x(i)]
for j=1:factor-1
x_upsampled=[x_upsampled 0]
end
end
subplot 211
stem(n, x)
xlabel('n')
ylabel('value')
title('original signal')
subplot 212
stem(0:length(x_upsampled)-1,x_upsampled)
xlabel('n')
ylabel('v')
title('upsampled signal')

More Related Content

Similar to UPDATED Sampling Lecture (2).pptx

DSP_2018_FOEHU - Lec 02 - Sampling of Continuous Time Signals
DSP_2018_FOEHU - Lec 02 - Sampling of Continuous Time SignalsDSP_2018_FOEHU - Lec 02 - Sampling of Continuous Time Signals
DSP_2018_FOEHU - Lec 02 - Sampling of Continuous Time SignalsAmr E. Mohamed
 
Classification of Signal.pdf
Classification of Signal.pdfClassification of Signal.pdf
Classification of Signal.pdfShivarkarSandip
 
Chapter 6m
Chapter 6mChapter 6m
Chapter 6mwafaa_A7
 
Analog to digital conversion technique
Analog to digital conversion techniqueAnalog to digital conversion technique
Analog to digital conversion techniqueUmar Shuaib
 
CHƯƠNG 2 KỸ THUẬT TRUYỀN DẪN SỐ - THONG TIN SỐ
CHƯƠNG 2 KỸ THUẬT TRUYỀN DẪN SỐ - THONG TIN SỐCHƯƠNG 2 KỸ THUẬT TRUYỀN DẪN SỐ - THONG TIN SỐ
CHƯƠNG 2 KỸ THUẬT TRUYỀN DẪN SỐ - THONG TIN SỐlykhnh386525
 
PCM and delta modulation.ppt
PCM and delta modulation.pptPCM and delta modulation.ppt
PCM and delta modulation.ppt1637ARUNIMADAS
 
Digital transmission & analog Digital to conversion
Digital transmission &  analog Digital to conversionDigital transmission &  analog Digital to conversion
Digital transmission & analog Digital to conversionChAwais15
 
Signal & systems
Signal & systemsSignal & systems
Signal & systemsAJAL A J
 
DSP Third Class.ppsx
DSP Third Class.ppsxDSP Third Class.ppsx
DSP Third Class.ppsxHebaEng
 
Ch4 1 Data communication and networking by neha g. kurale
Ch4 1 Data communication and networking by neha g. kuraleCh4 1 Data communication and networking by neha g. kurale
Ch4 1 Data communication and networking by neha g. kuraleNeha Kurale
 
Digital communication
Digital communicationDigital communication
Digital communicationmeashi
 
Unit 4 Pulse Modulation.pdf
Unit 4 Pulse Modulation.pdfUnit 4 Pulse Modulation.pdf
Unit 4 Pulse Modulation.pdfTejasAuti4
 
Digial instrumentation fnal
Digial instrumentation fnalDigial instrumentation fnal
Digial instrumentation fnalBishal Rimal
 
DSP_2018_FOEHU - Lec 1 - Introduction to Digital Signal Processing
DSP_2018_FOEHU - Lec 1 - Introduction to Digital Signal ProcessingDSP_2018_FOEHU - Lec 1 - Introduction to Digital Signal Processing
DSP_2018_FOEHU - Lec 1 - Introduction to Digital Signal ProcessingAmr E. Mohamed
 

Similar to UPDATED Sampling Lecture (2).pptx (20)

Pcm
PcmPcm
Pcm
 
DSP_2018_FOEHU - Lec 02 - Sampling of Continuous Time Signals
DSP_2018_FOEHU - Lec 02 - Sampling of Continuous Time SignalsDSP_2018_FOEHU - Lec 02 - Sampling of Continuous Time Signals
DSP_2018_FOEHU - Lec 02 - Sampling of Continuous Time Signals
 
Classification of Signal.pdf
Classification of Signal.pdfClassification of Signal.pdf
Classification of Signal.pdf
 
Chapter 6m
Chapter 6mChapter 6m
Chapter 6m
 
Analog to digital conversion technique
Analog to digital conversion techniqueAnalog to digital conversion technique
Analog to digital conversion technique
 
CHƯƠNG 2 KỸ THUẬT TRUYỀN DẪN SỐ - THONG TIN SỐ
CHƯƠNG 2 KỸ THUẬT TRUYỀN DẪN SỐ - THONG TIN SỐCHƯƠNG 2 KỸ THUẬT TRUYỀN DẪN SỐ - THONG TIN SỐ
CHƯƠNG 2 KỸ THUẬT TRUYỀN DẪN SỐ - THONG TIN SỐ
 
PCM and delta modulation.ppt
PCM and delta modulation.pptPCM and delta modulation.ppt
PCM and delta modulation.ppt
 
Digital transmission & analog Digital to conversion
Digital transmission &  analog Digital to conversionDigital transmission &  analog Digital to conversion
Digital transmission & analog Digital to conversion
 
Sampling
SamplingSampling
Sampling
 
Signal & systems
Signal & systemsSignal & systems
Signal & systems
 
DSP Third Class.ppsx
DSP Third Class.ppsxDSP Third Class.ppsx
DSP Third Class.ppsx
 
Basic concepts
Basic conceptsBasic concepts
Basic concepts
 
Ch4 1 Data communication and networking by neha g. kurale
Ch4 1 Data communication and networking by neha g. kuraleCh4 1 Data communication and networking by neha g. kurale
Ch4 1 Data communication and networking by neha g. kurale
 
Digital communication
Digital communicationDigital communication
Digital communication
 
Dcom ppt(en.39) dpcm
Dcom ppt(en.39) dpcmDcom ppt(en.39) dpcm
Dcom ppt(en.39) dpcm
 
Unit 4 Pulse Modulation.pdf
Unit 4 Pulse Modulation.pdfUnit 4 Pulse Modulation.pdf
Unit 4 Pulse Modulation.pdf
 
Digial instrumentation fnal
Digial instrumentation fnalDigial instrumentation fnal
Digial instrumentation fnal
 
IARE_DSP_PPT.pptx
IARE_DSP_PPT.pptxIARE_DSP_PPT.pptx
IARE_DSP_PPT.pptx
 
DSP_2018_FOEHU - Lec 1 - Introduction to Digital Signal Processing
DSP_2018_FOEHU - Lec 1 - Introduction to Digital Signal ProcessingDSP_2018_FOEHU - Lec 1 - Introduction to Digital Signal Processing
DSP_2018_FOEHU - Lec 1 - Introduction to Digital Signal Processing
 
lecture 1+2.pdf
lecture 1+2.pdflecture 1+2.pdf
lecture 1+2.pdf
 

More from HarisMasood20

-Report of the Activities Done for Struggling Students.pptx
-Report of the Activities Done for Struggling Students.pptx-Report of the Activities Done for Struggling Students.pptx
-Report of the Activities Done for Struggling Students.pptxHarisMasood20
 
10aiusesinhealthcare-21060120322353.pptx
10aiusesinhealthcare-21060120322353.pptx10aiusesinhealthcare-21060120322353.pptx
10aiusesinhealthcare-21060120322353.pptxHarisMasood20
 
Dr Sohaira-CACIO-V2a_EngineeringTech.pptx
Dr Sohaira-CACIO-V2a_EngineeringTech.pptxDr Sohaira-CACIO-V2a_EngineeringTech.pptx
Dr Sohaira-CACIO-V2a_EngineeringTech.pptxHarisMasood20
 
Faculty of Engineering-Summary of Activities to Groom Students (SW and CPE).pptx
Faculty of Engineering-Summary of Activities to Groom Students (SW and CPE).pptxFaculty of Engineering-Summary of Activities to Groom Students (SW and CPE).pptx
Faculty of Engineering-Summary of Activities to Groom Students (SW and CPE).pptxHarisMasood20
 
1. Deans Presentation Departmental Admission and Campaign (02-14-2024).pptx
1. Deans Presentation Departmental Admission and Campaign  (02-14-2024).pptx1. Deans Presentation Departmental Admission and Campaign  (02-14-2024).pptx
1. Deans Presentation Departmental Admission and Campaign (02-14-2024).pptxHarisMasood20
 
assessment of EBTL organization theory.pptx
assessment of EBTL organization theory.pptxassessment of EBTL organization theory.pptx
assessment of EBTL organization theory.pptxHarisMasood20
 
14th BOS Presentation for engineering.pptx
14th BOS Presentation for engineering.pptx14th BOS Presentation for engineering.pptx
14th BOS Presentation for engineering.pptxHarisMasood20
 
Admissions Fall 2021 (ACC Meeting 21 Dec 2021).pptx
Admissions Fall 2021 (ACC Meeting 21 Dec 2021).pptxAdmissions Fall 2021 (ACC Meeting 21 Dec 2021).pptx
Admissions Fall 2021 (ACC Meeting 21 Dec 2021).pptxHarisMasood20
 
Dr sohaira Future Academic Plansss.pptx
Dr sohaira  Future Academic Plansss.pptxDr sohaira  Future Academic Plansss.pptx
Dr sohaira Future Academic Plansss.pptxHarisMasood20
 
Format Draft for Research Productivity Data (1) (1).pptx
Format Draft for Research Productivity Data (1) (1).pptxFormat Draft for Research Productivity Data (1) (1).pptx
Format Draft for Research Productivity Data (1) (1).pptxHarisMasood20
 
Electrical Engineering Deptt Research Outputs 2022-2023.pptx
Electrical Engineering Deptt Research Outputs  2022-2023.pptxElectrical Engineering Deptt Research Outputs  2022-2023.pptx
Electrical Engineering Deptt Research Outputs 2022-2023.pptxHarisMasood20
 
Updated Revenue Generation 7-8-23 (Electrical Engineering).pptx
Updated Revenue Generation 7-8-23 (Electrical Engineering).pptxUpdated Revenue Generation 7-8-23 (Electrical Engineering).pptx
Updated Revenue Generation 7-8-23 (Electrical Engineering).pptxHarisMasood20
 
Qualifier B - Haider Ali - rev 3.0 (1).pptx
Qualifier B - Haider Ali - rev 3.0 (1).pptxQualifier B - Haider Ali - rev 3.0 (1).pptx
Qualifier B - Haider Ali - rev 3.0 (1).pptxHarisMasood20
 
cornea 3 rd year 2023.pptx
cornea 3 rd year 2023.pptxcornea 3 rd year 2023.pptx
cornea 3 rd year 2023.pptxHarisMasood20
 
Proposal PPT EE.pptx
Proposal PPT EE.pptxProposal PPT EE.pptx
Proposal PPT EE.pptxHarisMasood20
 

More from HarisMasood20 (20)

-Report of the Activities Done for Struggling Students.pptx
-Report of the Activities Done for Struggling Students.pptx-Report of the Activities Done for Struggling Students.pptx
-Report of the Activities Done for Struggling Students.pptx
 
10aiusesinhealthcare-21060120322353.pptx
10aiusesinhealthcare-21060120322353.pptx10aiusesinhealthcare-21060120322353.pptx
10aiusesinhealthcare-21060120322353.pptx
 
Dr Sohaira-CACIO-V2a_EngineeringTech.pptx
Dr Sohaira-CACIO-V2a_EngineeringTech.pptxDr Sohaira-CACIO-V2a_EngineeringTech.pptx
Dr Sohaira-CACIO-V2a_EngineeringTech.pptx
 
Faculty of Engineering-Summary of Activities to Groom Students (SW and CPE).pptx
Faculty of Engineering-Summary of Activities to Groom Students (SW and CPE).pptxFaculty of Engineering-Summary of Activities to Groom Students (SW and CPE).pptx
Faculty of Engineering-Summary of Activities to Groom Students (SW and CPE).pptx
 
1. Deans Presentation Departmental Admission and Campaign (02-14-2024).pptx
1. Deans Presentation Departmental Admission and Campaign  (02-14-2024).pptx1. Deans Presentation Departmental Admission and Campaign  (02-14-2024).pptx
1. Deans Presentation Departmental Admission and Campaign (02-14-2024).pptx
 
assessment of EBTL organization theory.pptx
assessment of EBTL organization theory.pptxassessment of EBTL organization theory.pptx
assessment of EBTL organization theory.pptx
 
14th BOS Presentation for engineering.pptx
14th BOS Presentation for engineering.pptx14th BOS Presentation for engineering.pptx
14th BOS Presentation for engineering.pptx
 
Admissions Fall 2021 (ACC Meeting 21 Dec 2021).pptx
Admissions Fall 2021 (ACC Meeting 21 Dec 2021).pptxAdmissions Fall 2021 (ACC Meeting 21 Dec 2021).pptx
Admissions Fall 2021 (ACC Meeting 21 Dec 2021).pptx
 
Dr sohaira Future Academic Plansss.pptx
Dr sohaira  Future Academic Plansss.pptxDr sohaira  Future Academic Plansss.pptx
Dr sohaira Future Academic Plansss.pptx
 
Format Draft for Research Productivity Data (1) (1).pptx
Format Draft for Research Productivity Data (1) (1).pptxFormat Draft for Research Productivity Data (1) (1).pptx
Format Draft for Research Productivity Data (1) (1).pptx
 
Electrical Engineering Deptt Research Outputs 2022-2023.pptx
Electrical Engineering Deptt Research Outputs  2022-2023.pptxElectrical Engineering Deptt Research Outputs  2022-2023.pptx
Electrical Engineering Deptt Research Outputs 2022-2023.pptx
 
Updated Revenue Generation 7-8-23 (Electrical Engineering).pptx
Updated Revenue Generation 7-8-23 (Electrical Engineering).pptxUpdated Revenue Generation 7-8-23 (Electrical Engineering).pptx
Updated Revenue Generation 7-8-23 (Electrical Engineering).pptx
 
Qualifier B - Haider Ali - rev 3.0 (1).pptx
Qualifier B - Haider Ali - rev 3.0 (1).pptxQualifier B - Haider Ali - rev 3.0 (1).pptx
Qualifier B - Haider Ali - rev 3.0 (1).pptx
 
cornea 3 rd year 2023.pptx
cornea 3 rd year 2023.pptxcornea 3 rd year 2023.pptx
cornea 3 rd year 2023.pptx
 
EBTL LECTURE 2.pptx
EBTL LECTURE 2.pptxEBTL LECTURE 2.pptx
EBTL LECTURE 2.pptx
 
Lec5.pptx
Lec5.pptxLec5.pptx
Lec5.pptx
 
lec4-PF (Done).pptx
lec4-PF (Done).pptxlec4-PF (Done).pptx
lec4-PF (Done).pptx
 
ADSP (17 Nov).ppt
ADSP (17 Nov).pptADSP (17 Nov).ppt
ADSP (17 Nov).ppt
 
Proposal PPT EE.pptx
Proposal PPT EE.pptxProposal PPT EE.pptx
Proposal PPT EE.pptx
 
GEC PPT MWM.pptx
GEC PPT MWM.pptxGEC PPT MWM.pptx
GEC PPT MWM.pptx
 

Recently uploaded

Difference Between Search & Browse Methods in Odoo 17
Difference Between Search & Browse Methods in Odoo 17Difference Between Search & Browse Methods in Odoo 17
Difference Between Search & Browse Methods in Odoo 17Celine George
 
Roles & Responsibilities in Pharmacovigilance
Roles & Responsibilities in PharmacovigilanceRoles & Responsibilities in Pharmacovigilance
Roles & Responsibilities in PharmacovigilanceSamikshaHamane
 
Gas measurement O2,Co2,& ph) 04/2024.pptx
Gas measurement O2,Co2,& ph) 04/2024.pptxGas measurement O2,Co2,& ph) 04/2024.pptx
Gas measurement O2,Co2,& ph) 04/2024.pptxDr.Ibrahim Hassaan
 
Proudly South Africa powerpoint Thorisha.pptx
Proudly South Africa powerpoint Thorisha.pptxProudly South Africa powerpoint Thorisha.pptx
Proudly South Africa powerpoint Thorisha.pptxthorishapillay1
 
ECONOMIC CONTEXT - LONG FORM TV DRAMA - PPT
ECONOMIC CONTEXT - LONG FORM TV DRAMA - PPTECONOMIC CONTEXT - LONG FORM TV DRAMA - PPT
ECONOMIC CONTEXT - LONG FORM TV DRAMA - PPTiammrhaywood
 
Framing an Appropriate Research Question 6b9b26d93da94caf993c038d9efcdedb.pdf
Framing an Appropriate Research Question 6b9b26d93da94caf993c038d9efcdedb.pdfFraming an Appropriate Research Question 6b9b26d93da94caf993c038d9efcdedb.pdf
Framing an Appropriate Research Question 6b9b26d93da94caf993c038d9efcdedb.pdfUjwalaBharambe
 
Hierarchy of management that covers different levels of management
Hierarchy of management that covers different levels of managementHierarchy of management that covers different levels of management
Hierarchy of management that covers different levels of managementmkooblal
 
Crayon Activity Handout For the Crayon A
Crayon Activity Handout For the Crayon ACrayon Activity Handout For the Crayon A
Crayon Activity Handout For the Crayon AUnboundStockton
 
Atmosphere science 7 quarter 4 .........
Atmosphere science 7 quarter 4 .........Atmosphere science 7 quarter 4 .........
Atmosphere science 7 quarter 4 .........LeaCamillePacle
 
Influencing policy (training slides from Fast Track Impact)
Influencing policy (training slides from Fast Track Impact)Influencing policy (training slides from Fast Track Impact)
Influencing policy (training slides from Fast Track Impact)Mark Reed
 
How to do quick user assign in kanban in Odoo 17 ERP
How to do quick user assign in kanban in Odoo 17 ERPHow to do quick user assign in kanban in Odoo 17 ERP
How to do quick user assign in kanban in Odoo 17 ERPCeline George
 
MULTIDISCIPLINRY NATURE OF THE ENVIRONMENTAL STUDIES.pptx
MULTIDISCIPLINRY NATURE OF THE ENVIRONMENTAL STUDIES.pptxMULTIDISCIPLINRY NATURE OF THE ENVIRONMENTAL STUDIES.pptx
MULTIDISCIPLINRY NATURE OF THE ENVIRONMENTAL STUDIES.pptxAnupkumar Sharma
 
Full Stack Web Development Course for Beginners
Full Stack Web Development Course  for BeginnersFull Stack Web Development Course  for Beginners
Full Stack Web Development Course for BeginnersSabitha Banu
 
Introduction to AI in Higher Education_draft.pptx
Introduction to AI in Higher Education_draft.pptxIntroduction to AI in Higher Education_draft.pptx
Introduction to AI in Higher Education_draft.pptxpboyjonauth
 
How to Configure Email Server in Odoo 17
How to Configure Email Server in Odoo 17How to Configure Email Server in Odoo 17
How to Configure Email Server in Odoo 17Celine George
 
Quarter 4 Peace-education.pptx Catch Up Friday
Quarter 4 Peace-education.pptx Catch Up FridayQuarter 4 Peace-education.pptx Catch Up Friday
Quarter 4 Peace-education.pptx Catch Up FridayMakMakNepo
 
ECONOMIC CONTEXT - PAPER 1 Q3: NEWSPAPERS.pptx
ECONOMIC CONTEXT - PAPER 1 Q3: NEWSPAPERS.pptxECONOMIC CONTEXT - PAPER 1 Q3: NEWSPAPERS.pptx
ECONOMIC CONTEXT - PAPER 1 Q3: NEWSPAPERS.pptxiammrhaywood
 

Recently uploaded (20)

Difference Between Search & Browse Methods in Odoo 17
Difference Between Search & Browse Methods in Odoo 17Difference Between Search & Browse Methods in Odoo 17
Difference Between Search & Browse Methods in Odoo 17
 
Roles & Responsibilities in Pharmacovigilance
Roles & Responsibilities in PharmacovigilanceRoles & Responsibilities in Pharmacovigilance
Roles & Responsibilities in Pharmacovigilance
 
Gas measurement O2,Co2,& ph) 04/2024.pptx
Gas measurement O2,Co2,& ph) 04/2024.pptxGas measurement O2,Co2,& ph) 04/2024.pptx
Gas measurement O2,Co2,& ph) 04/2024.pptx
 
Proudly South Africa powerpoint Thorisha.pptx
Proudly South Africa powerpoint Thorisha.pptxProudly South Africa powerpoint Thorisha.pptx
Proudly South Africa powerpoint Thorisha.pptx
 
ECONOMIC CONTEXT - LONG FORM TV DRAMA - PPT
ECONOMIC CONTEXT - LONG FORM TV DRAMA - PPTECONOMIC CONTEXT - LONG FORM TV DRAMA - PPT
ECONOMIC CONTEXT - LONG FORM TV DRAMA - PPT
 
Framing an Appropriate Research Question 6b9b26d93da94caf993c038d9efcdedb.pdf
Framing an Appropriate Research Question 6b9b26d93da94caf993c038d9efcdedb.pdfFraming an Appropriate Research Question 6b9b26d93da94caf993c038d9efcdedb.pdf
Framing an Appropriate Research Question 6b9b26d93da94caf993c038d9efcdedb.pdf
 
Hierarchy of management that covers different levels of management
Hierarchy of management that covers different levels of managementHierarchy of management that covers different levels of management
Hierarchy of management that covers different levels of management
 
Model Call Girl in Tilak Nagar Delhi reach out to us at 🔝9953056974🔝
Model Call Girl in Tilak Nagar Delhi reach out to us at 🔝9953056974🔝Model Call Girl in Tilak Nagar Delhi reach out to us at 🔝9953056974🔝
Model Call Girl in Tilak Nagar Delhi reach out to us at 🔝9953056974🔝
 
Crayon Activity Handout For the Crayon A
Crayon Activity Handout For the Crayon ACrayon Activity Handout For the Crayon A
Crayon Activity Handout For the Crayon A
 
Atmosphere science 7 quarter 4 .........
Atmosphere science 7 quarter 4 .........Atmosphere science 7 quarter 4 .........
Atmosphere science 7 quarter 4 .........
 
Influencing policy (training slides from Fast Track Impact)
Influencing policy (training slides from Fast Track Impact)Influencing policy (training slides from Fast Track Impact)
Influencing policy (training slides from Fast Track Impact)
 
OS-operating systems- ch04 (Threads) ...
OS-operating systems- ch04 (Threads) ...OS-operating systems- ch04 (Threads) ...
OS-operating systems- ch04 (Threads) ...
 
How to do quick user assign in kanban in Odoo 17 ERP
How to do quick user assign in kanban in Odoo 17 ERPHow to do quick user assign in kanban in Odoo 17 ERP
How to do quick user assign in kanban in Odoo 17 ERP
 
MULTIDISCIPLINRY NATURE OF THE ENVIRONMENTAL STUDIES.pptx
MULTIDISCIPLINRY NATURE OF THE ENVIRONMENTAL STUDIES.pptxMULTIDISCIPLINRY NATURE OF THE ENVIRONMENTAL STUDIES.pptx
MULTIDISCIPLINRY NATURE OF THE ENVIRONMENTAL STUDIES.pptx
 
Full Stack Web Development Course for Beginners
Full Stack Web Development Course  for BeginnersFull Stack Web Development Course  for Beginners
Full Stack Web Development Course for Beginners
 
Introduction to AI in Higher Education_draft.pptx
Introduction to AI in Higher Education_draft.pptxIntroduction to AI in Higher Education_draft.pptx
Introduction to AI in Higher Education_draft.pptx
 
How to Configure Email Server in Odoo 17
How to Configure Email Server in Odoo 17How to Configure Email Server in Odoo 17
How to Configure Email Server in Odoo 17
 
Raw materials used in Herbal Cosmetics.pptx
Raw materials used in Herbal Cosmetics.pptxRaw materials used in Herbal Cosmetics.pptx
Raw materials used in Herbal Cosmetics.pptx
 
Quarter 4 Peace-education.pptx Catch Up Friday
Quarter 4 Peace-education.pptx Catch Up FridayQuarter 4 Peace-education.pptx Catch Up Friday
Quarter 4 Peace-education.pptx Catch Up Friday
 
ECONOMIC CONTEXT - PAPER 1 Q3: NEWSPAPERS.pptx
ECONOMIC CONTEXT - PAPER 1 Q3: NEWSPAPERS.pptxECONOMIC CONTEXT - PAPER 1 Q3: NEWSPAPERS.pptx
ECONOMIC CONTEXT - PAPER 1 Q3: NEWSPAPERS.pptx
 

UPDATED Sampling Lecture (2).pptx

  • 2. Chapter4. Sampling of Continuous-Time Signals 1. A/D Conversion and Sampling 2. Reconstruction of a Bandlimited Signals 3. Continuous-Discrete Frequency Characteristics 4. Digital Processing of Continuous-Time Signals 5. Changing the Sampling Rate Using Discrete-Time Processing 6. Multi rate Signal Processing 7. Practical Considerations in A/D and D/A Conversions 8. Multirate Processing for A/D and D/A Conversions
  • 3. Signal Types 3  Analog signals: continuous in time and amplitude  Example: voltage, current, temperature,…  Digital signals: discrete both in time and amplitude  Example: attendance of this class, digitizes analog signals,…  Discrete-time signal: discrete in time, continuous in amplitude  Example: hourly change of temperature in Austin  Theory is based on discrete-time continuous-amplitude signals  Most convenient to develop theory  Good enough approximation to practice with some care
  • 4. Why digital? 4 Digital techniques need to distinguish between discrete symbols allowing regeneration versus amplification Good processing techniques are available for digital signals, such as medium.  Data compression (or source coding)  Error Correction (or channel coding)  Equalization  Security  Easy to mix signals and data using digital techniques (Time Division Multiplexing)
  • 5. 4
  • 6. Analog to Digital Conversion 6
  • 7. Sampling • The signals we use in the real world, such as our voices, are called "analog" signals. • To process these signals in computers, we need to convert the signals to "digital" form. • Analog signal is continuous in both time and amplitude, a digital signal is discrete in both time and amplitude.
  • 8. Sampling(.) • To convert a signal from continuous time to discrete time, a process called sampling is used. The value of the signal is measured at certain intervals in time. • Each measurement is referred to as a sample. (The analog signal is also quantized in amplitude, but that process is ignored as it will be explained by some other group)
  • 9. Figure 0: Signal sampling representation. The continuous signal is a green colored line Discrete samples are indicated by the blue vertical lines.
  • 10. Analog to Digital Conversion 10  Analog-to-digital conversion is (basically) a 2 step process:  Sampling • Convert from continuous-time analog signal xa(t) to discrete-time continuous value signal x(n). • Is obtained by taking the “samples” of xa(t) at discrete-time intervals, Ts  Quantization • Convert from discrete-time continuous valued signal to discrete time discrete valued signal
  • 11. Definition 11  Bit Rate  Actual rate at which information is transmitted per second are transmitted,  Baud Rate  Refers to the rate at which the signaling elements i.e. number of signaling elements per second.  Bit Error Rate  The probability that one of the bits is in error or simply the probability of error
  • 12. Sampling 12 Sampling is the processes of converting continuous-time analog signal, xa(t), into a discrete-time signal by taking the “samples” at discrete-time intervals  Sampling analog signals makes them discrete in time but still continuous valued.  If done properly (Nyquist theorem is satisfied), sampling does not introduce distortion  Sampled values:  The value of the function at the sampling points  Sampling interval:  The time that separates sampling points (interval b/w samples), Ts  If the signal is slowly varying, then fewer samples per second will be required than if the waveform is rapidly varying  So, the optimum sampling rate depends on the maximum frequency component present in the signal
  • 13. Sampling(..) • A sample is a value or set of values at a point in time and/or space. • A sampler is a subsystem or operation that extracts samples from a continuous signal. • A theoretical ideal sampler produces samples equivalent to the instantaneous value of the continuous signal at the desired points.
  • 14. First step toward Digital Signal Processing  Main question: Can a finite number of samples of a continuous wave be enough to represent the information? OR Can you tell what the original signal was below? 14
  • 15. Sampling 15 t=[34 42 142 191 221 240 207 88 99 110 127 223]; >> x=0:1:11; >> t1=sin(x); >> plot(x,t1,'r') >> stem(x,t1,'m') Figure Command? Subplot?, How to compare graphs, Axis?
  • 16. Sampling 16 • If one period of Sine wave spans takes 32 ms to complete then, t=32ms • Given Time Period=125μs • Number of Samples=? • N= 32ms/125μs= 256 samples
  • 17. How sampling is done? • First obtain signal values from the continuous signal at regular time- intervals (Ts). Which is sampling time and its reciprocal is fs sampling frequency • The result of this process is just a sequence of numbers. • Our discrete time signal will be denoted as x[n] where n is index. • As sampling interval Ts is defined, sampling just extracts the signals value at all integer multiples of Ts such that x[n] = x(n·Ts)
  • 18. How sampling is done?(.) • At this point (after sampling), our signal is not yet completely digital because the values x[n] can still take on any number from a continuous range. • So we use the terms discrete-time signal. • Figure 1 illustrates the process of sampling a continuous sinusoidal.
  • 19. How sampling is done?(..) • For Input signal • Known as discrete time frequency, Normalized continuous frequency.
  • 20. Example: Sampling rate Comparisons • Consider at sampling rates of 240 and 1000 samples per second
  • 23. Key Elements of Sampling and Reconstruction Sampling continuous-time signal t analog sampling analog-digital conversion DSP Operations t n DSP Operations digital-analog conversion reconstruction continuous-time signal 23 • A continuous-time signal is sampled at discrete time intervals and subsequently converted to a sequence of digital values for processing. Reconstruction n t t • The sequence of digital values is converted into a series of impulses at discrete time intervals before being reconstructed into a continuous-time signal. • Sampling and Reconstruction are mathematical duals.
  • 24. Ambiguity of Sampled-Data Signals 2 4 • Which continuous-time signal does this discrete-time sequence represent? • Knowing the sampling rate, is not enough to uniquely reconstruct a continuous-time signal from a discrete-time sequence. • The uncertainty is a result of aliasing.
  • 25. Ideal Sampling 25  Sampling Rate (or sampling frequency fs):  The rate at which the signal is sampled, expressed as the number of samples per second (reciprocal of the sampling interval), 1/Ts = fs  Nyquist Sampling Theorem (or Nyquist Criterion):  If the sampling is performed at a proper rate, no info is lost about the original signal and it can be properly reconstructed later on  Statement: “If a signal is sampled at a rate at least, but not exactly equal to twice the max frequency component of the waveform, then the waveform can be exactly reconstructed from the samples without any distortion” fs  2fmax
  • 26. Ideal Sampling 26 In case the signal fails to fulfill the Nyquist criterion, there are two main scenarios that can occur 1. Over Sampling 2. Under Sampling
  • 27. Under Sampling • In Undersampling a band pass signal is sampled slower than its Nyquist rate. • When one undersamples a bandpass signal, the samples are indistinguishable from the samples of a low-frequency samples of the high-frequency signal. • In such a way that the lowest-frequency alias satisfies the Nyquist criterion, because the bandpass signal is still uniquely represented and recoverable. Such undersampling is also known as bandpass sampling, harmonic sampling, IF sampling, and direct IF to digital conversion.
  • 28. Oversampling • In Oversampling a signal is sampled faster than its Nyquist rate. • Oversampling is used in most modern analog-to-digital converters to reduce the distortion or noise effects introduced by practical digital- to-analog converters.
  • 29. Representation of CT Signal by its Samples
  • 30. Representation of CT Signal by its Samples
  • 31. Representation of CT Signal by its Samples
  • 32. 4.1 Periodic Sampling In this method x[n] obtained from xc(t) according to the relation : 32 [ ] ( ) 1/ c s x n x nT n T sampling period f T sampling frequency         • The sampling operation is generally not invertible i.e., given the output x[n] it is not possible in general to reconstruct xc(t). Although we remove this ambiguity by restricting xc(t). Chapter 4: Sampling of Continuous-Time Signals
  • 33. BGL/SNU Ideal C/D Conversion Ideal D/C conversion s(t)-impulse train o T 2T 0 1 2....... xc(t) xs(t) x(n) Impluse train to discrete sequence Conversion X Ideal Reconstruction Filter Disc.Seq.to Imp.Tr. Conversion 0 1 2 T 2T... ys(n) Hr(j) y(n) yr(n)
  • 34. Sampling with a Periodic Impulse Train Figure(a) is not a representation of any physical circuits, but it is convenient for gaining insight in both the time and frequency domain. 34 ( ) ( ) n s t t nT       (a) Overall system (b) xs(t) for two sampling rates (c) Output for two sampling rates
  • 35. 35   t x   0 x   T x   T x 2   t x   t xp     nT t t p n        -3T -2T -T 0 T 2T 3T 4T t
  • 36. Impulse Sampling Sampled waveform 0 1 20 Signal waveform 0 1 20 Impulse sampler 0
  • 37. Impulse Sampling with increasing sampling time T Sampled waveform 0 1 20 Sampled waveform 0 1 20 Sampled waveform 0 1 20 Sampled waveform 0 1 20
  • 40. 4.2 Frequency Domain Representation of Sampling Let us now consider the Fourier transform of xs(t): 40 ( ) ( ) ( ) ( ) ( ) ( ) ( ) ( ) ( ) ( ) s c c n s c n x t x t s t x t t nT Modulation x t x nT t nT Shifting property              ( ) ( ) Fourier s t S j   ( ) ( ) Fourier c C x t X j   radians/s. in rate sampling the is / 2 where ) ( 2 ) ( T k T j S s k s                 1 1 ( ) ( )* ( ) ( ) 2 s c c s k X j X j S j X j k T             Chapter 4: Sampling of Continuous-Time Signals
  • 41. Frequency Domain Representation of Sampling By applying the continuous-time Fourier transform to equation We obtain consequently 41 2 1 ) (                   T k T j X T e X k c j    ( ) ( ) ( ) j j T s T X j X e X e         ( ) ( ) ( ) s c n x t x nT t nT       ( ) ( ) j Tn S c n X j x nT e        [ ] ( ) ( ) [ ] j j n c n x n x nT and X e x n e         Chapter 4: Sampling of Continuous-Time Signals
  • 42. Exact Recovery of Continuous-Time from Its Samples (a) represents a band limited Fourier transform of xc(t) Whose highest nonzero frequency is . (b) represents a periodic impulse train with frequency. (c) shows the output of impulse modulator in the case 42 N  S  2 S N N S N         Chapter 4: Sampling of Continuous-Time Signals
  • 43. Exact Recovery of Continuous-Time from Its Samples In this case don’t overlap therefore xc(t) can be recovered from xs(t) with an ideal low pass filter with gain T and cutoff frequency It means 43 = ( ) C X j ( ) r H j  N C S N       ( ) ( ) r C X j X j    Chapter 4: Sampling of Continuous-Time Signals
  • 44. Aliasing Distortion (a) represents a band limited Fourier transform of xc(t) Whose highest nonzero frequency is . (b) represents a periodic impulse train with frequency. (c) shows the output of impulse modulator in the case 44 N  S  2 S N N S N         Chapter 4: Sampling of Continuous-Time Signals
  • 45. Aliasing Distortion In this case the copies of overlap and is not longer recoverable by lowpass filtering therefore the reconstructed signal is related to original continuous-time signal through a distortion referred to as aliasing distortion. 45 ( ) C X j Chapter 4: Sampling of Continuous-Time Signals
  • 46. Aliasing Understanding through MATLAB f = 60; % Hz tmin = -0.05; tmax = 0.05; t = linspace(tmin, tmax, 400); x_c = cos(2*pi*f * t); plot(t,x_c) xlabel('t (seconds)' 46 Chapter 4: Sampling of Continuous-Time Signals Continuous-time cosine signal at 60 Hz. linspace(X1, X2) generates a row vector of 100 linearly equally spaced points between X1 and X2.
  • 47. Aliasing Understanding through MATLAB T = 1/800; nmin = ceil(tmin / T); nmax = floor(tmax / T); n = nmin:nmax; x1 = cos(2*pi*f * n*T); hold on plot(n*T,x1,'.') hold off 47 Chapter 4: Sampling of Continuous-Time Signals Sample with a sampling frequency of 800 Hz. The sampling frequency of 800 Hz is well above 120 Hz, which is twice the frequency of the cosine. And you can see that the samples are clearly capturing the oscillation of the continuous-time cosine.
  • 48. Aliasing Understanding through MATLAB T = 1/400; nmin = ceil(tmin / T); nmax = floor(tmax / T); n = nmin:nmax; x1 = cos(2*pi*f * n*T); plot(t, x_c) hold on plot(n*T, x1, '.') hold off 48 Chapter 4: Sampling of Continuous-Time Signals Sample with a sampling frequency of 400 Hz. The samples above are still adequately capturing the shape of the cosine.
  • 49. Aliasing Understanding through MATLAB T = 1/120; nmin = ceil(tmin / T); nmax = floor(tmax / T); n = nmin:nmax; x1 = cos(2*pi*f * n*T); plot(t, x_c) hold on plot(n*T, x1, 'o') hold off 49 Chapter 4: Sampling of Continuous-Time Signals Drop the sampling frequency down to exactly 120 Hz, twice the frequency of the 60 Hz cosine. See how the samples jump back and forth between 1 and -1? And how they capture only the extremes of each period of the cosine oscillation? This is the significance of "twice the highest frequency of the signal" value for sampling frequency.
  • 50. Aliasing Understanding through MATLAB T = 1/70; nmin = ceil(tmin / T); nmax = floor(tmax / T); n = nmin:nmax; x1 = cos(2*pi*f * n*T); plot(t, x_c) hold on plot(n*T, x1, 'o') hold off 50 Chapter 4: Sampling of Continuous-Time Signals Sampling frequency at 70 Hz. The samples above look like they actually could have come from a 10 Hz cosine signal, instead of a 60 Hz cosine signal. (Nyquist Criterion not followed)
  • 51. Aliasing Understanding through MATLAB T = 1/70; x_c = cos(2*pi*10 * t); nmin = ceil(tmin / T); nmax = floor(tmax / T); n = nmin:nmax; x1 = cos(2*pi*f * n*T); plot(t, x_c) hold on plot(n*T, x1, 'o') hold off 51 Chapter 4: Sampling of Continuous-Time Signals Sampling frequency at 70 Hz. You can see that it worked perfectly for a 10 Hz cosine signal, because now the signal is following Nyquist Criterion
  • 52. Aliasing Understanding through MATLAB 52 Chapter 4: Sampling of Continuous-Time Signals Conclusion That's the heart of the "problem" of aliasing. Because the sampling frequency was too low, a high-frequency cosine looked like a low- frequency cosine after we sampled it.
  • 53. BGL/SNU Sampling <Input> ) (t xc ) (  j Xc <Impulse train> ) ( ) ( ) ( t s t x t x c s   ) ( ) ( nT t t x n c     <Impulsed input> ) ( * ) ( 2 1 ) (     j S j X j X c s  ) ( * ) ( 1       n s c k j X T  ) ] [ ( 1      n s c k j X T       n nT t t s ) ( ) (           ) ( 2 ) ( s k T j S   : 2 T s    Sampling frequency ) ( ) ( nT t t x n c    Example 2
  • 54. BGL/SNU <output> ) ( * ) ( ) ( t y t h t y s r r  ) ( ) ( ) (     j Y j H j Y s r r )) ( ( 1 ) ( s k j Y T j H k c r       ) (   j Yc If ) (  j Hr is an ideal LPF Nyquist Sampling Theorem When xc (t) is bandlimited s.t. c c j X       | | , 0 ) ( If we do sampling by taking Then xc (t) is uniquely reconstructed from x[n]= xc (nT) , 2 c s    2 s   2 s  T 
  • 55. ) (  j S ) (  j Hr Illustration of Sampling ) (  j Xc ) (t Xc t  2 s  c  s  ) (  j X s c   c  s  0  T 1 T 1 2 s c    s   0 T 2 ) (t Xs t ) (t S t 0 T ... 1 c   c 
  • 56. BGL/SNU c   c  0  1 t ) (  j Yr What if ? 2 s c    Aliasing c  s  0 c s    2 ) ( ) (    j X j Y c r
  • 57. Example: The effect of aliasing in the sampling of cosine signal Suppose 57 0 ( ) cos( ) c x t t   Chapter 4: Sampling of Continuous-Time Signals
  • 58. Nyquist Sampling Theorem 58 • Sampling theorem describes precisely how much information is retained when a function is sampled, or whether a band-limited function can be exactly reconstructed from its samples. • Sampling Theorem: Suppose that is band-limited to a frequency interval , i.e., Then xc(t) can be exactly reconstructed from equidistant samples where is the sampling period, is the sampling frequency (samples/second), is for radians/second. ( ) ( ) c C x t X j     , N N   ( ) 0 for C N X j      ( ) C X j  N  N  0 [ ] ( ) (2 / ) c s c s x n x nT x n     s s T f / 1  2 s N    s s T   / 2 s s T / 2   Chapter 4: Sampling of Continuous-Time Signals
  • 59. BGL/SNU Illustration of aliasing t t xc  4000 cos ) (   4000 0   2000 0  f Sampling period s T     2 1500 1  3000  s 1500  s f Then the reconstructed output has 1000 component   1000 ' 0   500 ' 0  f (note, to avoid aliasing, )  8000 2     c s 0 -4 1 2 3 4  (*1000)
  • 61. Oversampled Suppose that is band-limited: Then if is sufficiently small, appears as: Condition: 61 ( ) ( ) c C x t X j   S T ( ) j X e  2 or or 2 N S N S N S S N T T T           ( ) C X  A N  N  0  0 ( ) j X e  N S T  N S T     2    2  s T A Chapter 4: Sampling of Continuous-Time Signals
  • 62. Critically Sampled 62 Critically sampled: or 2 N S S N T       According to the Sampling Theorem, in general the signal cannot be reconstructed from samples at the rate . This is because of errors will occur if , the folded frequencies will add at Consider the case: and note that for   ( ) sin( ) ( ) ( ) c N N N x t A t Aj         ( ) j X e  s T A 0    2    2  / S N T    ( ) 0 c N X   .    / . S N T    ( ) sin( ) sin( ) 0 (for all ) s c s x nT A nT A n n      Chapter 4: Sampling of Continuous-Time Signals
  • 63. Under sampled (aliased) 63 If sampling theorem condition is not satisfied or 2 N S S N T       • The frequencies are folded - summed. This changes the shape of the spectrum. There is no process whereby the added frequencies can be discriminated - so the process is not reversible. • Thus, the original (continuous) signal cannot be reconstructed exactly. Information is lost, and false (alias) information is created. • If a signal is not strictly band-limited, sampling can still be done at twice the effective band-limited. ( ) j X e  s T A 0    2    2  Chapter 4: Sampling of Continuous-Time Signals
  • 64. 4.3 Reconstruction of a Bandlimited Signal from Its Samples Figure(a) represents an ideal reconstruction system. Ideal reconstruction filter has the gain of T and cutoff frequency we choice . This choice is appropriate for any relationship between and . 64 c  N C S N       / 2 / C S T      S  N  Chapter 4: Sampling of Continuous-Time Signals
  • 65. Reconstruction of a Bandlimited Signal from Its Samples Therefore 65 ( ) [ ] ( ) ( ) [ ] ( ) sin( / ) ( ) / sin( ( ) / ) ( ) [ ] ( ) / S n r r n r r n x t x n t nT x t x n h t nT t T h t t T t nT T x t x n t nT T                       Chapter 4: Sampling of Continuous-Time Signals
  • 66. Ideal D/C Converter The properties of the ideal D/C converter are most easily seen in the frequency domain. 66 ( ) [ ] ( ) ( ) [ ] ( ) ( ) ( ) [ ] j Tn r r r r n n j Tn r r n x t x n h t nT X j x n H j e X j H j x n e                         ( ) ( ) ( ) j T r r X j H j X e     Chapter 4: Sampling of Continuous-Time Signals
  • 67. 4.4.1 LTI Discrete-Time systems In general if the discrete-time system is LTI and if the sampling frequency is above the Nyquist rate associated with the band width of the input xc(t), then the overall system will be equivalent to a LTI continuous-time system with an effective frequency response given by: 67 ( ) ( ), / ( ) ( ) ( ) 0, / ( ), / ( ) 0, / j T C r eff C j T eff H e X j T Y j H j X j T H e T H j T                                 Chapter 4: Sampling of Continuous-Time Signals
  • 68. Example: Ideal Continuous-Time Lowpass Filtering Using a Discrete-Time Lowpass Filter 68 1, ( ) 0, C j C H e                1, ( ) 0, C eff C T H j T                Chapter 4: Sampling of Continuous-Time Signals
  • 69. Example: Ideal Continuous-Time Lowpass Filtering Using a Discrete-Time Lowpass Filter 69 Chapter 4: Sampling of Continuous-Time Signals
  • 70. 4.6 Changing the sampling rate using discrete-time processing We have seen that a continuous-time signal can be represented by a discrete-time signal. It is often necessary to change the sampling rate of x[n] and obtain a new discrete-time signal such that One approach is to reconstruct and then resample it with period, but it is of interest to consider methods that involve only discrete time operations. 70 [ ] ( ) c x n x nT  [ ] ( ) c x n x nT    ( ) c x t Chapter 4: Sampling of Continuous-Time Signals
  • 71. 4.6.1 Sampling rate reduction by an integer factor Discrete-time sampler or compressor If then is an exact representation of Downsampling: the operation of reducing the sampling rate (including any filtering). 71 [ ] [ ] ( ) d c x n x nM x nMT   ( ) 0 C N X j for      [ ] d x n ( ) / / c N x t iff T MT       Chapter 4: Sampling of Continuous-Time Signals
  • 72. Frequency domain relation between the input and output of the compressor 72 1 0 1 ( / 2 / ) 0 1 2 [ ] ( ) ( ) ( ( )) 1 2 [ ] ( ) ( ) ( ( )) , 0 1 1 1 2 2 ( ) ( ( )) 1 ( ) ( ) j c C k j d c d C r M j d C i k M j j M i M d i k x n x nT X e X j T T T r x n x nMT X e X j MT MT MT r i kM k i M k i X e X j M T MT T MT X e X e M                                                             Chapter 4: Sampling of Continuous-Time Signals
  • 73. Down Sampling 73 a) Shows a Fourier Transform of a bandlimited signal b) Fourier Transform of impulse train of samples when sampling with T c) Shows d) Figure (b) and (c) differ only in scaling of the frequency variable e) Shows DTFT of down sampled sequence when M=2, f) In this example, • Original sampling rate is exactly twice the minimum rate to avoid aliasing • Using the given expression, we know, Substituting , we have, 𝑋(𝑒𝑗𝜔 𝜔 = 𝛺𝑇′ 2𝜋 𝑇 = 4𝛺𝑁 𝜔𝑁 = 𝛺𝑁𝑇 𝛺𝑁 𝜔𝑁 = 𝜋 2
  • 74. Down sampling without Aliasing 74 Chapter 4: Sampling of Continuous-Time Signals
  • 75. Down sampling without Aliasing 75 Chapter 4: Sampling of Continuous-Time Signals
  • 76. Down sampling with aliasing 76 Chapter 4: Sampling of Continuous-Time Signals
  • 77. 4.6.2 Increasing the sampling rate by an integer factor We will refer to the operation of increasing the sampling rate upsampling The system on the left is called a sampling rate expander. Its output is The system on the right is a lowpass discrete-time filter with cutoff frequency and gain L. 77 [ ] [ / ] ( / ) 0, , 2 ,... i c x n x n L x nT L n L L      [ / ], 0, , 2 ,... [ ] 0, [ ] [ ] [ ] e e k x n L n L L x n otherwise x n x k n kL              / L  Chapter 4: Sampling of Continuous-Time Signals
  • 78. Increasing the sampling rate by an integer factor This system is an interpolator because of it fills in the missing samples. 78 ( ) [ ] [ ] [ ] ( ) j j n j Lk j L e n k k X e x k n kL e x k e X e                           Chapter 4: Sampling of Continuous-Time Signals
  • 79. Increasing the Sampling Rate by an Integer Factor If the input sequence was obtained by sampling without aliasing then is correct for all n, And is obtained by oversampling of . 79 [ / ], 0, , 2 ,... [ ] 0, [ ] [ ] [ ] sin( / ) [ ] / sin( ( )/ ) [ ] [ ] ( )/ [ ] [ / ] ( / ) ( ) 0, , 2 ,... i e e k i k i c c x n L n L L x n otherwise x n x k n kL n L h n n L n kL L x n x k n kL L therefore x n x n L x nT L x nT n L L                                [ ] ( ) c x n x nT  [ ] ( ) i c x n x nT   ( ) c x t [ ] i x n Chapter 4: Sampling of Continuous-Time Signals
  • 80. 4.6.3 Changing the Sampling Rate by a Non integer Factor By combining decimation and interpolation it is possible to change the sampling rate by a noninteger factor. The interpolation and decimation filter can be combined together. 80 Chapter 4: Sampling of Continuous-Time Signals
  • 81. Changing the Sampling Rate by a Non integer Factor 81 Chapter 4: Sampling of Continuous-Time Signals
  • 82. Down Sampling 82 x=[1 2 4 6 8 10 12 16]; n=[0: length(x)-1]; factor=input('samping by factor:'); x_downsampled=[ ]; for i=1:factor:length(x) x_downsampled=[x_downsampled x(i)]; end grid on subplot 211 stem(n, x); xlabel('n') ylabel('value') title('original signal') grid on subplot 212 stem(0:length(x_downsampled)-1,x_downsampled); xlabel('n') ylabel('v') title('downsampled signal signal') grid on
  • 83. Up Sampling 83 x=[1 2 3 4 5] n=[0: length(x)-1] factor=input('samping by factor:') x_upsampled=[ ] for i=1:length(x) x_upsampled=[x_upsampled x(i)] for j=1:factor-1 x_upsampled=[x_upsampled 0] end end subplot 211 stem(n, x) xlabel('n') ylabel('value') title('original signal') subplot 212 stem(0:length(x_upsampled)-1,x_upsampled) xlabel('n') ylabel('v') title('upsampled signal')