Chapter 3
Chapter 3
• Classes of sequences
✓ Finite /infinite (extent in n)
✓Real/complex:
✓Left and Right-sided
Classes of Sequences
• Complex sequence : {x[n]} ={𝑥𝑟𝑒 [n]} + j{𝑥𝑖𝑚 [𝑛]}
✓ Rectangular form ; x = 𝑥𝑟𝑒 + j𝑥𝑖𝑚
2 2 −1 𝑋𝑖𝑚
where magnitude |x| = 𝑥𝑟𝑒 + 𝑥𝑖𝑚 and phase θ = 𝑡𝑎𝑛 ( )
𝑋𝑟𝑒
• Multiplication operation:
Basic Operations On Sequences
• Product (modulation) operation:
𝟏 𝒏≥𝒌
𝒖[𝒏 − 𝒌] = {
𝟎 𝒏<𝑘
Basic Sequences
• The unit step is related to the impulse by:
u[n] = σ𝑛𝑘=−∞ δ[𝑘];
i.e., the values of the unit step sequence at (time) index n is equal to the accumulated sum of
the values at index n and all previous values of the impulse sequence.
• An alternative representation of the unit step in terms of the impulse is obtained by
interpreting the unit step in terms of a sum of delayed impulses.
u[n] = δ[n] +δ[n-1] + δ[n-2] + . . . . Or
u[n] = σ∞ 𝑘=0 δ[𝑛 − 𝑘]
• Conversely, the impulse sequence can be expressed as the first backward difference of the
unit step sequence.
i.e. , δ[n] = u[n] – u[n-1]
Basic Sequences
Exponential Sequence:
✓Important in representing and analyzing LTI discrete-time systems:
x[n] = Aα𝑛
✓If A and α are real numbers, then the sequence is real.
✓If 0 < α < 1 and A is positive, then the sequence values are positive
and decrease with increasing n.
✓If -1 < α <0, the sequence values alternate in sign, but again decrease
in magnitude with increasing n.
✓If |α|>1, then the sequence grows in magnitude with increasing n.
Basic Sequences
Basic Sequences
• Sinusoidal sequences:
✓A general form: x[n] = Acos ω0 𝑛 + ϕ , for all n, A and ϕ are real
constants.
• The exponential sequence Aα𝑛 with complex A and α has real and
imaginary parts that are exponentially weighted sinusoids.
✓ α = |α|𝑒 𝑗ω0 ,and A = |A|𝑒 𝑗ϕ
✓x[n] = Aα𝑛 = |A|𝑒 𝑗ϕ . |α|𝑛 𝑒 𝑗ω0 𝑛
= |A||α|𝑛 𝑒 𝑗(ω0𝑛+ϕ)
= |A||α|𝑛 cos ω0 𝑛 + ϕ + j|A||α|𝑛 sin ω0 𝑛 + ϕ
✓The sequence oscillates with an exponentially growing envelope if
|α|> 1 or with exponentially decaying envelope if |α| < 1.
Basic Sequences
✓ If |α|= 1,the sequence is referred to as a complex exponential sequence
and has the form:
x[n] = |A|𝑒 𝑗(ω0 𝑛+ϕ) = |A|cos ω0 𝑛 + ϕ +j |A|sin ω0 𝑛 + ϕ
✓ Varies with n (samples)
✓ω0 is frequency of the complex exponential (radians/sample)
✓Φ is phase.
• Consider a frequency (ω0 +2π) |α|= 1, |A| = real
x[n] = |A|𝑒 𝑗 ω0 𝑛+2π 𝑛
I. Shifting: If 𝒚[𝒏] = 𝒙[𝒏 – 𝒏𝒐], x(n) is shifted to the right by no samples if no is positive (this is referred to
as a delay), and it is shifted to the left by no samples if no is negative (referred to as an advance).
II. Reversal: If 𝒚[𝒏] = 𝒙[−𝒏], x(n) is inverted about vertical axis. This transformation involves "flipping"
the signal x(n) with respect to the index n.
𝑛
III. Time Scaling: This transformation is defined by 𝑥(𝑀𝑛) 𝑜𝑟 𝑥( ) where M and N are positive integers.
𝑁
If 𝑦[𝑛] = 𝑥[𝑀𝑛] (the sequence x(Mn) is formed by taking every Mth sample of x(n)), then this operation is
known as down sampling.
𝑛
If 𝑦(𝑛) = 𝑥( ), then this operation is known as up sampling and is defined as follows
𝑁
𝒏
𝒙[ ] 𝒏 = 𝟎, ±𝑵, ±𝟐𝑵, ±𝟑𝑵, … … … … …
𝒚𝒏 ={ 𝑵
𝟎 𝒐𝒕𝒉𝒆𝒓𝒘𝒊𝒔𝒆
Example: Consider a discrete time signal x[n] as shown in figure. For the given signal
perform the following operations.
1. x[n-2] (Shifting)
2. x[-n] (Reversal)
3. x[2n] (Time scaling-down sampling)
4. x[n/2] (Time scaling- up sampling)
Ans:-
Addition, Multiplication, and Scaling
The most common types of amplitude transformations are addition, multiplication, and scaling.
Addition: The sum of two signals is formed by the point wise addition of the signal values.
𝒚[𝒏] = 𝒙𝟏 [𝒏] + 𝒙𝟐 [𝒏] −∞ <𝑛 <∞
Multiplication: The multiplication of two signals is formed by the pointwise product of the signal values.
𝒚[𝒏] = 𝒙𝟏 [𝒏]𝒙𝟐 [𝒏] −∞ <𝑛 <∞
Scaling: Amplitude scaling of a signal x(n) by a constant c is accomplished by multiplying every signal value by c:
𝒚[𝒏] = 𝒄𝒙[𝒏 ] −∞ <𝑛 <∞
Signal Decomposition
The unit sample may be used to decompose an arbitrary signal x(n) into a sum of weighted and shifted unit
samples as follows:
𝒙[𝒏] = ⋯ + 𝒙[−𝟏]𝜹[𝒏 + 𝟏] + 𝒙[𝟎]𝜹[𝒏] + 𝒙 𝟏 𝜹[𝒏 − 𝟏] + 𝒙[𝟐]𝜹[𝒏 − 𝟐] + ⋯
This decomposition may be written concisely as
∞
𝒙[𝒏] = 𝒙 𝒌 𝜹[𝒏 − 𝒌]
𝒌=−∞
Block Diagram Representation of Discrete-Time Systems
i. Constant multiplier:
ii. Adder :
An IIR filter, on the other hand, has an impulse response h(n) of infinite duration, defined over the infinite
interval −∞ < n < ∞.{… h-1, h0, h1, h2, . . . }
The I/O equation is:
𝟏 𝟏
which is written as 𝒙𝒆 𝒏 = + 𝜹[𝒏]
𝟐 𝟐
1/2 𝑛 > 0
𝟏 0 𝑛 = 0)
The odd part of u[n] is, 𝒙𝒐 [𝒏] = 𝒖 𝒏 − 𝒖[−𝒏] = −1/2 𝑛 < 0
𝟐
𝟏
which is written as 𝒙𝒐 [𝒏] = 𝒔𝒈𝒏(𝒏)
𝟐
For complex sequences the symmetries of interest are slightly different.
Periodic and Aperiodic Sequences
A discrete-time signal may always be classified as either being periodic or aperiodic.
A signal x(n) is said to be periodic if, for some positive real integer N,
𝒙[𝒏] = 𝒙[𝒏 + 𝑵] 𝒇𝒐𝒓 𝒂𝒍𝒍 𝒏.
This is equivalent to saying that the sequence repeats itself every N samples.
Note: If x1(n) is a sequence that is periodic with a period N1, and x2(n) is another sequence
that is periodic with a period N2,the sum
𝒙[𝒏] = 𝒙𝟏 [𝒏] + 𝒙𝟐 [𝒏]
Ans:-
Because 0.125𝜋 = 𝝅/𝟖 , and
𝝅 𝝅
𝐜𝐨𝐬 𝒏 = 𝐜𝐨𝐬 𝒏 + 𝟏𝟔
𝟖 𝟖
2𝜋
x[n] is periodic with period N = = 16
Ω
Energy and Power Signals
• The total energy of a sequence x[n]:
𝐸𝑥 = σ∞ 𝑛=−∞ |𝑥 𝑛 | 2
EN = |x n |2
n=−N
Energy and Power Signals
Fig: A transformation that maps an input sequence x[n] into unique output sequence y[n]
✓ Represents a rule or formula for computing the o/p sequence from the input sequence
values.
Examples:
i. The ideal delay system
y[n] = x[n-nd ], -∞ < 𝑛 <∞ nd : fixed positive integer
Discrete-time Systems
ii. Moving Average
1
y[n] = σ𝑀 2
𝑥[𝑛 − 𝐾]
M1 + M2 +1 𝑘=−𝑀1
1
= (x[n+M1 ) + x[n+M1 − 1] + . . . +x[n] + x[n − 1]+ . . . +x[n − M2 ])
M1 + M2 +1
Input-output relationship:
T
x[n] →y[n] y[n] is the response of the system T to the excitation of x[n].
• Classes of systems are defined by placing constraints on the properties of the
transformation
• T{ . }.
Classification Of Discrete-time System
1. Memoryless System
✓ Output y[n] at every value of n depends only on the input x[n] at the same
value of n.
Example.:
a. y[n] = (𝑥[𝑛])2 , for each value of n is memoryless system.
b. y[n] = x[n-𝑛𝑑 ], for each value of n if 𝑛𝑑 = 0, the system is memoryless.
c. 𝑦 𝑛 = 𝑥 𝑛 + 𝑥[𝑛 − 1] --------------non memoryless system(with memory)
d. The moving average system is not memoryless unless 𝑀1 = 𝑀2 = 0.
2. Linear systems
• Defined by the principle of superposition.
• A system that is both additive and homogeneous is said to be linear.
o An additive system is one for which the response to a sum of inputs is equal to the sum of
the inputs individually.
o A system is said to be homogeneous if scaling the input by a constant results in a scaling
of the output by the same amount.
If 𝑦1 [n] and 𝑦2 𝑛 are responses of a system when 𝑥1 [n] and 𝑥2 [n] are the respective inputs,
then the system is linear if and only if:
T{𝑥1 [n] + 𝑥2 [n] } = T{𝑥1 [n] } + T{𝑥2 [n] } = 𝑦1 [n] + 𝑦2 [n] and
T{ ax[n] } = aT{x[n]} = ay[n] where a is an arbitrary constant.
✓ The first property is called additive property and the second is called the homogeneity or
scaling property.
✓ These two properties can be combined into the principle of superposition.
T{𝑎𝑥1 [n] + 𝑏𝑥2 [n] } = aT{𝑥1 [n] } + bT{𝑥2 [n] } for arbitrary constant a and b.
Continued …
• Generalizing for many inputs
If x[n] = σk ak xk n , then the o/p of the linear system y[n] = σk ak yk n
where yk n is the system response to input xk n .
Example: The accumulator system:
y[n] = σ𝑛𝑘=−∞ 𝑥[𝑘]
✓ The o/p at time n is just the sum of the present and all previous input samples.
✓ The accumulator system is a linear system.
Proof: Show that it satisfies the superposition principle for all the inputs.
Define two arbitrary inputs x1 [𝑛] and x2 [𝑛] and there corresponding outputs
y1 [𝑛] = σ𝑛𝑘=−∞ x1 [𝑘],
y2 [𝑛] = σ𝑛𝑘=−∞ x2 [𝑘]
✓When the input is x3 [𝑛] = ax1 [𝑛] + bx2 [𝑛] , the superposition principle requires the
output y3 [𝑛] = ay1 [𝑛] + by2 [𝑛] for all possible values a and b.
Continued …
4. Causality
• A system is causal, if, for every choice of 𝑛0 , the output sequence value at index
n = 𝑛0 depends only on the input sequence values for n≤ 𝑛0 .
✓If 𝑥1 [𝑛] = 𝑥2 [𝑛] for n≤ 𝑛0
then 𝑦1 [𝑛] = 𝑦2 [𝑛] for n≤ 𝑛0 , the system is not anticipative.
Continued …
Example: The forward difference system y[n] = x[n+1] –x[n]
✓This system is not causal, as the current value of the output depends on a future
value of the input.
✓The backward difference system: y[n] = x[n] –x[n-1] output depends only on the
present and past values of the input.
5. Stability
• A system is stable in the bounded-input, bounded-output (BIBO) sense if every
bounded input sequence produces a bounded output sequence.
• The input x[n] is bounded if there exists a fixed positive finite value 𝐵𝑥 ,such
that
|x[n]| ≤ 𝐵𝑥 < ∞ Ɐn.
Continued …
h[n+2],h[n-4],h[n-6]
• i/p: x[n] = 0.5 δ[n+2] +1.5 δ[n-1]- δ[n-2]+ δ[n-4]+0.75 δ[n-6]
• o/p: y[n] =0.5h[n+2] 1.5h[n-1]-h[n-2]+h[n-4]+0.75h[n-6]
y[n] = σ∞
−∞ 𝒙[𝒌] 𝐡[n-k] ….. Convolution sum
There are several different approaches that may be used, and the one that is the easiest will
depend upon the form and type of sequences that are to be convolved.
i. Direct Evaluation:
In performing convolutions directly, it is usually necessary to evaluate finite or infinite sums
involving terms of the form 𝛼 𝑛 or 𝑛𝛼 𝑛 .
Example: Let us perform the convolution of the two signals:
𝑥 𝑛 = 𝑎𝑛 𝑢 𝑛 𝑎𝑛𝑑 ℎ 𝑛 = 𝑢(𝑛)
With the direct evaluation of the convolution sum we find
∞ ∞ 𝑛
1 − 𝑎 𝑛+1
𝑦 𝑛 = 𝑥 𝑛 ∗ ℎ 𝑛 = 𝑥 𝑘 ℎ 𝑛 − 𝑘 = 𝑎𝑘 𝑢 𝑘 𝑢 𝑛 − 𝑘 = 𝑎𝑘 =
1−𝑎
𝑘=−∞ 𝑘=−∞ 𝑘=0
1−𝑎𝑛+1
Therefore 𝑦𝑛 = 𝑢(𝑛)
1−𝑎
•Consider a system with impulse response:
h[n] = u[n] –u[n-N]
1. Because x(k) and h(k) are both plotted as a function of k in Fig. (a) and (b), we next choose
one of the sequences to reverse in time. In this example, we time-reverse h(k), which is shown
in Fig. (c).
2. Forming the product, x(k)h(-k), and summing over k, we find that y(0) = 1.
3. Shifting h(k) to the right by one results in the sequence h(l - k ) shown in Fig. (d). Forming
the product, x(k)h(l - k), and summing over k, we find that y(1) = 3.
4. Shifting h(l - k) to the right again gives the sequence h(2 - k) shown in Fig. (e). Forming the
product, x(k)h(2 - k), and summing over k, we find that y(2) = 6.
5. Continuing in this manner, we find that y(3) = 5. y(4) = 3, and y(n) = 0 for n > 4.
6. We next take h(-k) and shift it to the left by one as shown in Fig. (f ). Because the product,
x(k)h(- 1 - k), is equal to zero for all k, we find that y(- I ) = 0. In fact. y(n) = 0 for all n < 0.
Figure (g) shows the convolution for all n.
iii. Slide Rule Method:
The steps involved in the slide rule method are as follows:
1. Write the values of 𝑥[𝑘]along the top of a piece of paper, and the values of ℎ[−𝑘]along the top
of another piece of paper
2. Line up the two sequence values 𝑥[0]and ℎ[0], multiply each pair of numbers, and add the
products to form the value of 𝑦[0].
3. Slide the paper with the time-reversed sequence h[k] to the right by one, multiply each pair of
numbers, sum the products to find the value 𝑦[𝑛] , and repeat for all shifts to the right by 𝑛 > 0.
Do the same, shifting the time-reversed sequence to the left, to find the values of y[n] for 𝑛 < 0.
Example: Find the convolution of the two finite-length sequences using the slide rule.
𝑛𝜋
𝑥 𝑛 = 0.5𝑛 𝑢 𝑛 − 𝑢 𝑛 − 5 𝑎𝑛𝑑 ℎ 𝑛 = 2 sin [𝑢 𝑛 + 2 − 𝑢 𝑛 − 4 ]
2
iV. Convolution Table:
Consider finite length input and finite impulse response, each output y(n) is the sum of all
possible products hixj with i + j = n.
Example for i=3 & j=4, the convolution table is:
▪ The rows of the table correspond to the successive delays (right shifts) of the h(n) sequence-the mth row
corresponds to delay by m units.
▪ Each row is scaled by the corresponding input sample, that is, the mth row represents the term xmhn−min the
LTI form. After the table is filled, the table entries are summed column-wise to obtain the output samples
y(n), which is equivalent to forming the sum:
Example: Calculate the convolution of the following impulse response and input signals
using the LTI form:
h(n)= [1, 2,−1, 1], x(n)= [1, 1, 2, 1, 2, 2, 1, 1]
Solution: The corresponding LTI table is in this case:
Solution; The output samples are obtained by summing the entries in each column.
y(n) = [1, 3, 3, 5, 3, 7, 4, 3, 3, 0, 1]
Vi. Matrix Form:
The convolution can also be written in the linear matrix form:
y = Hx
where H is built out of the filter’s impulse response h. Because the output vector y has
length L+M and the input vector x length L, the filter matrix H must be rectangular with
dimensions Ly × Lx = (L + M)×L
The output samples can be arranged in the matrix form
Note that the columns of H are the successively delayed replicas of the impulse response
vector h. There are as many columns as input samples. Note also that H is a so-called
Toeplitz matrix, in the sense that it has the same entry along each diagonal. The Toeplitz
property is a direct consequence of the time invariance of the impulse response.
Example: Calculate the convolution of the following impulse response and input signals
using the matrix form:
h(n)= [1, 2,−1, 1], x(n)= [1, 1, 2, 1, 2, 2, 1, 1]
Solution: Because Ly = 11 and Lx = 8, the filter matrix will be 11 × 8 dimensional. We have,
There is also an alternative matrix form written as follows:
❖ Matrix representations of convolution are very useful in some applications, such as image
processing, and in more advanced DSP methods such as parametric spectrum estimation
and adaptive filtering.
Linear constant-coefficient Difference Equation
• Subclass of LTI systems consists of systems for which the input x[n] and y[n]
satisfy an N th order linear constant-coefficient difference equation:
The general form of a linear constant-coefficient difference equation is:
σN 𝑎
k=0 𝑘 𝑦[𝑛 − 𝐾] = σ𝑀
𝑚=0 𝑏𝑚 𝑥[𝑛 − 𝑚]
• Example: Difference equation representation of the accumulation
y[n] = σnk=−∞ 𝑥 k
The output for n-1:
y[n-1] = σn−1
k=−∞ 𝑥 k
y[n] = x[n] + σn−1
k=−∞ 𝑥 k
y[n] = x[n] + y[n-1]
y[n] – y[n-1] =x[n]
Continued …
✓ Satisfy a linear constant-coefficient difference equation of the form
with N = 1, 𝑎0 = 1, 𝑎1 = −1,M =0 and 𝑏0 = 1
Solving Linear constant-coefficient Difference Equation
• The procedure for computing the solution of constant-coefficient difference
equation is very similar to that employed for solving the constant-coefficient
differential equation in the case of an LTI continuous-time system.
• The output response y[n] consists of two components which are computed
independently and then added to yield the total solution.
y[n] = 𝑦𝑝 𝑛 + 𝑦ℎ 𝑛
𝑦ℎ 𝑛 :homogeneous solution with x[n] =0, i.e. solution to the equation
Solving Linear Constant coefficient Difference Equation
σNk=0 𝑎𝑘 𝑦ℎ 𝑛 − 𝑘 = 0
• 𝑦𝑝 𝑛 : Particular solution resulting from the specified into x[n], often
called forcing function
• First compute the homogeneous solution 𝑦ℎ 𝑛 , assume it is of the form:
yh 𝑛 = λ𝑛
Substituting σ𝑁 𝑘=0 𝑘 ℎ𝑎 𝑦 [n-k] = σ 𝑁
𝑎
𝑘=0 𝑘 λ (𝑛−𝑘)
=0
=λ(𝑛−𝑁) (𝑎0 λ𝑁 + 𝑎1 λ𝑁−1 + . . . +𝑎𝑁−1 λ + 𝑎𝑁 ) = 0
✓Characteristic polynomial of the discrete-time system
✓Let λ1 , λ2 , λ3 , . . . , λ𝑁 denote its N roots
Continued …
✓If these roots are all distinct, then general form of the homogenous solution is:
yh 𝑛 = α1 λ1 𝑛 + α2 λ2 𝑛 + . . . + α𝑁 λ𝑁 𝑛
Where α1 , α2 , . . . , α𝑁 are constants determined from the specified initial
conditions of the discrete-time system.
✓ The determination of the particular solution yp 𝑛 is of the form as the
specified input x[n], if x[n] has the form λ0 𝑛
(λ0 ≠ λi , i = 1, 2, . . . , N) for all N.
✓If x[n] is constant, yp 𝑛 is also assumed constant.
✓If x[n] is sinusoidal sequence, then yp 𝑛 is also assumed to be a sinusoidal
sequence and so on.
Continued …
This system may be represented by a difference equation that has time-varying coefficients: