Professional Documents
Culture Documents
Lecture 2 PDF
Lecture 2 PDF
MEC 222
Chapter One
Introduction to Digital Signals Processing
Precision of the data is based on the number of bits used in the DSP system. As shown in Figure for the floating-
point DS processor, we can identify the first five sample amplitudes at their time indices as follows:
x(0)=2.25
X(1)=2
X(2)=2
X(3)=-1
X(4)=0
3
..
2- Generation of Digital Signals
The procedure to develop the digital sequence from its analog signal function is as follows:
Assuming that an analog signal x(t) is uniformly sampled at the time interval of 𝑇𝑇, where T is the
sampling period.
the corresponding digital function (sequence) x(n) gives the instant encoded values of the analog
signal x(t) at all the time instants t = 𝑛𝑛𝑇𝑇 and can be achieved by substituting time 𝑡𝑡 = 𝑛𝑛𝑛𝑛 into the
analog signal
𝑥𝑥 𝑛𝑛 = 𝑥𝑥 𝑡𝑡 � = 𝑥𝑥(𝑛𝑛𝑛𝑛)
𝑡𝑡=𝑛𝑛𝑛𝑛
4
Example 1 Assume we have a DSP system with a sampling time interval of 125 microseconds.
a. Convert each of following analog signals x(t) to a digital signal x(n)
𝑥𝑥 𝑡𝑡 = 10𝑒𝑒 −5000𝑡𝑡 u(t) y 𝑡𝑡 = 10sin(2000𝜋𝜋𝜋𝜋)u(t)
b. Determine and plot the sample values from each obtained digital function.
Solution
a) Since T=0.000125 S t=nT=nX0.000125=0.000125 n
𝑥𝑥 𝑛𝑛 = 10𝑒𝑒 −5000×0.000125𝑛𝑛 𝑢𝑢 𝑛𝑛𝑛𝑛 = 10𝑒𝑒 −0.625𝑛𝑛 𝑢𝑢(𝑛𝑛)
y 𝑛𝑛 = 10 sin 2000𝜋𝜋 ∗ 0.000125𝑛𝑛 𝑢𝑢 𝑛𝑛𝑛𝑛 = 10 sin 0.25𝜋𝜋𝜋𝜋 𝑢𝑢(𝑛𝑛)
b)
5
Periodic DS
Discrete signal x(n) is periodic if
x(n) = x(n + kN)
where
k is an integer
N is the period, which is an integer as well
A periodic discrete signal is shown in Fig. 3. This signal has a period of 4. This periodic signal repeats every N = 4
instances.
6
Example 2
Solution
Perdiodic Aperiodic
7
3. BASIC DISCRETE-TIME SIGNALS
Like the continuous-time unit step, we define the unit step sequence u[n] as
8
3.2 Unit Impulse
1- 𝑥𝑥 𝑛𝑛 𝛿𝛿 𝑛𝑛 = 𝑥𝑥 0 𝛿𝛿 𝑛𝑛
2- 𝑥𝑥 𝑛𝑛 𝛿𝛿 𝑛𝑛 − 𝑘𝑘 = 𝑥𝑥 𝑘𝑘 𝛿𝛿 𝑛𝑛 − 𝑘𝑘
3- 𝛿𝛿 𝑛𝑛 = 𝑢𝑢 𝑛𝑛 − 𝑢𝑢(𝑛𝑛 − 1)
4- 𝑢𝑢 𝑛𝑛 = ∑𝑛𝑛𝑘𝑘=−∞ 𝛿𝛿(𝑘𝑘)
9
3.3 Unit Ramp Sequence
10
3.5 Sinusoidal Sequence
The sinusoidal sequence or a discrete-time sinusoid is given by
where
𝜃𝜃𝑜𝑜 : 𝐷𝐷𝐷𝐷𝐷𝐷𝐷𝐷𝐷𝐷𝐷𝐷𝐷𝐷 𝑓𝑓𝑓𝑓𝑓𝑓𝑓𝑓𝑓𝑓𝑓𝑓𝑓𝑓𝑓𝑓𝑓𝑓
1
𝜃𝜃0 = 𝜔𝜔𝜔𝜔 = 2𝜋𝜋𝜋𝜋 (𝑟𝑟𝑟𝑟𝑟𝑟/𝑠𝑠𝑠𝑠𝑠𝑠𝑠𝑠𝑠𝑠𝑠𝑠𝑠𝑠)
𝑓𝑓𝑠𝑠
or
2𝜋𝜋
𝜃𝜃0 = 𝜔𝜔𝜔𝜔 = 𝑇𝑇 (𝑟𝑟𝑟𝑟𝑟𝑟)
𝑇𝑇 𝑠𝑠
2𝜋𝜋𝜋𝜋
𝜃𝜃0 = 𝜔𝜔𝜔𝜔 = (𝑟𝑟𝑟𝑟𝑟𝑟)
𝑓𝑓𝑠𝑠
If N/k is a rational number (ratio of two integers), then x(n) is periodic and the period is
2𝜋𝜋
The smallest value of N that satisfies the previous equation is called the fundamental period. If is not a
𝜃𝜃𝑜𝑜
rational number, then x(n) is not periodic.
12
Example 3 Consider the following continuous signal for the current
𝑖𝑖 𝑡𝑡 = cos(20𝜋𝜋𝜋𝜋)
which is sampled at 12.5 ms. Will the resulting discrete signal be periodic?
Solution
The continuous radian frequency is 𝜔𝜔 = 20𝜋𝜋 𝑟𝑟𝑟𝑟𝑟𝑟/𝑠𝑠. Since the sampling interval Ts is 12.5 ms = 0.0125 s,
2𝜋𝜋 𝜋𝜋
𝑥𝑥 𝑛𝑛 = cos 2𝜋𝜋 10 0.0125 𝑛𝑛 = cos 𝑛𝑛 = cos 𝑛𝑛
8 4
we get
2𝜋𝜋 𝑁𝑁 16𝜋𝜋 8
= = =
2𝜋𝜋/8 𝑘𝑘 2𝜋𝜋 1
Solution
2 𝜃𝜃2 = 𝜋𝜋 2𝜋𝜋 2
= Rational number Periodic signal
𝜋𝜋 1
𝑗𝑗𝑗𝑗8𝜋𝜋
1- 2𝑒𝑒 𝑗𝑗𝑗𝑗 2- 𝑒𝑒 𝑗𝑗𝑗𝑗𝑗𝑗 3- 𝑒𝑒 𝑗𝑗2𝜋𝜋𝜋𝜋+2 4- 𝑒𝑒 3
Solution
1 2𝜋𝜋 𝑁𝑁
= Not rational Not periodic
1 𝑘𝑘
2𝜋𝜋 𝑁𝑁
2 = Rational Periodic For k=1, N=2
𝜋𝜋 𝑘𝑘
2𝜋𝜋 𝑁𝑁
4 = Rational Periodic For k=4, N=3
8𝜋𝜋 𝑘𝑘
15
3
Example 6
Solution
16
Example 7 Represent the following discrete signals using impulse signals
17
4. Basic Operation on Discrete Signals
𝑥𝑥 𝑛𝑛 = 𝑥𝑥[−𝑛𝑛] 18
4. Basic Operation on Discrete Signals
… …
0 1 2 3 4 n -3 -2 -1 0 n 0 n
… …
0 1 2 3 4 n -3 -2 -1 0 n 0 2 n
U(-n+2) 𝛿𝛿(𝑛𝑛 + 2)
U(n+2)
…
…
-3 -2 -1 0 1 2 4 n -2 0 n
-2 -1 0 1 2 3 4 n
19
Example 8
Solution
20
Example 9
(a) (b)
(c)
21
Example 10
Consider the discrete pulse in Figure Write this pulse as a sum of discrete step signals.
𝑢𝑢 𝑛𝑛 + 2 − 𝑢𝑢[𝑛𝑛 − 3]
𝑢𝑢[𝑛𝑛 − 3] 22
𝑢𝑢 𝑛𝑛 + 2
4. Basic Operation on Discrete Signals
Consider the two discrete signals x1(n) and x2(n). The addition/subtraction of these two signals is y(n) where
A scalar multiplication of the discrete signal x(n) is the signal y(n) where
4.5 Modulation
Consider the two discrete signals x1(n) and x2(n). The resulting signal y(n)
y[n] is called the modulation of x1(n) and x2(n). y(n) is a discrete signal found by multiplying the sample values of
x1(n) and x2(n) at every instant.
23
Example 11
Solution
24
Example 12
Solution
25
4. Basic Operation on Discrete Signals
4.6 Combined Operations
We may have multiple operations among input discrete signals. One operation may be represented as
where we have scaling, shifting, and addition operations combined. In other operations you may have the output
y(n) presented as
where you have x1(n) scaled, then the modulated signal resulting from x2(n) and x3(n) is subtracted from 2x1(n).
26
4. Basic Operation on Discrete Signals
27
Example 13
Solution
𝑛𝑛
1- The new time axis in this case is 𝑛𝑛𝑛𝑛𝑛𝑛𝑛𝑛 = 𝑜𝑜𝑜𝑜𝑜𝑜
2
where 𝑛𝑛𝑜𝑜𝑜𝑜𝑜𝑜 is the
index of the given x(n). The indices are arranged as in the following
𝑛𝑛
with the help of the equation 𝑛𝑛𝑛𝑛𝑛𝑛𝑛𝑛 = 𝑜𝑜𝑜𝑜𝑜𝑜 .
2
2- The new time axis in this case is 𝑛𝑛𝑛𝑛𝑛𝑛𝑛𝑛 = 2 𝑛𝑛𝑜𝑜𝑜𝑜𝑜𝑜 where 𝑛𝑛𝑜𝑜𝑜𝑜𝑜𝑜 is the index of the given x(n). The indices are
arranged as in the following with the help of the equation 𝑛𝑛𝑛𝑛𝑛𝑛𝑛𝑛 = 2 𝑛𝑛𝑜𝑜𝑜𝑜𝑜𝑜 .
𝒏𝒏𝒐𝒐𝒐𝒐𝒐𝒐 𝒏𝒏𝒏𝒏𝒏𝒏𝒏𝒏 = 𝟐𝟐 𝒏𝒏𝒐𝒐𝒐𝒐𝒐𝒐 X[n/2]
-3 -6 0
-2 -4 1
-1 -2 1
0 0 0
1 2 -1
2 4 -1
3 6 0
29
Sheet 2
2 Calculate the first eight sample values, and sketch each of them
a) x n = 0.5𝑛𝑛 𝑢𝑢(𝑛𝑛)
b) x n = 5 sin(0.2𝜋𝜋𝜋𝜋)𝑢𝑢(𝑛𝑛)
c) x n = 5 cos 0.1𝜋𝜋𝜋𝜋 + 300 𝑢𝑢(𝑛𝑛)
d) x n = 5 0.75 𝑛𝑛 sin(0.1𝜋𝜋𝜋𝜋)𝑢𝑢(𝑛𝑛)
3 Sketch each of the following sequences:
30
Sheet 2
4 Write an expression for the following sequence shown in Figure using impulse response
5 Assume that a DS processor with a sampling time interval of 0.01 second converts the following analog
signals x(t) to a digital signal ; x(n)determine the digital sequence for each of the analog signals.
8 Check the periodicity for each of the following signals for 0 ≤ n ≤ ∞. If they are periodic, what is the period?
a) x t = cos(2𝜋𝜋𝜋𝜋 + 𝜋𝜋)
𝜋𝜋
b) x t = 0.1 n cos(5𝜋𝜋𝜋𝜋 + )
2
c) x t = cos( 2𝜋𝜋𝜋𝜋)
d) x t = 2cos(2𝑛𝑛 − 𝜋𝜋)
32
Sheet 2
9 A discrete-time signal is shown in Figure Sketch each of the following signals:
(a) x[n−3], (b) x[−n + 3], (c) x[2n]. (d) x[n + 2], (e) x[n/2]