0% found this document useful (0 votes)
57 views13 pages

Dspmodule2-Discrete Time Systems Described by Difference Equations and Frequency Domain

Uploaded by

21wh1a0487
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
57 views13 pages

Dspmodule2-Discrete Time Systems Described by Difference Equations and Frequency Domain

Uploaded by

21wh1a0487
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 13

Digital Signal Processing

Module 2
Discrete Time Systems Described by Difference Equations and Frequency Domain
Representation

Objective:

1. Description of systems using linear constant coefficient difference equations.


2. Representation of discrete-time signals and systems in the frequency domain.

Introduction:

 An important class of LTI systems consists of those systems for which the input x[n]
and the output y[n] satisfy an Nth-order linear constant-coefficient difference equation
of the form

Solving these difference equations indicate finding the response of the LTI systems
for different inputs.
 The Fourier representation of signals plays an extremely important role in both
continuous-time and discrete-time signal processing. It provides a method for
mapping signals into another "domain" in which to manipulate them. The Fourier
representation is useful particularly in the form of a property that the convolution
operation is mapped to multiplication. In addition, the Fourier transform provides a
different way to interpret signals and systems. we will develop the discrete-time
Fourier transform (i.e., a Fourier transform for discrete-time signals).

Description:
Linear Constant Coefficient Difference Equations (LCCDE)
The convolution sum expresses the output of a linear shift-invariant system in terms
of a linear combination of the input values x(n). For example, a system that has a unit sample
response h(n) = anu(n) is described by the equation

In some cases it may be possible to more efficiently express the output in terms of past values
of the output in addition to the current and past values of the input. The previous system, for
example, may be described more concisely as follows:

The above equation is a special case of what is known as a linear constant coefficient
difference equation, or LCCDE. The general form of a LCCDE is
𝑞 𝑝

𝑦 𝑛 = 𝑏𝑘 𝑥 𝑛 − 𝑘 − 𝑎𝑘 𝑦 𝑛 − 𝑘
𝑘=0 𝑘=1
where the coefficients ak and bk are constants that define the system. If the difference
equation has one or more terms ak that are nonzero, the difference equation is said to be
recursive. On the other hand, if all of the coefficients ak are equal to zero, the difference
equation is said to be non-recursive. Thus, the equation

is an example of a first-order recursive difference equation, whereas

is an infinite-order non-recursive difference equation.


Difference equations provide a method for computing the response of a system, y(n),
to an arbitrary input x(n). Before these equations may be solved, however, it is necessary to
specify a set of initial conditions. For example, with an input x(n) that begins at time n = 0 ,
the solution to general form of LCCDE at time n = 0 depends on the values of y(-1),…, y(-p).
Therefore, these initial conditions must be specified before the solution for n≥ 0 may be
found. When these initial conditions are zero, the system is said to be in initial rest.
For an LSI system that is described by a difference equation, the unit sample
response, h(n), is found by solving the difference equation for x(n) = δ(n) assuming initial
rest. For a non-recursive system, ak = 0, the difference equation becomes
𝑞

𝑦 𝑛 = 𝑏𝑘 𝑥 𝑛 − 𝑘
𝑘=0
and the output is simply a weighted sum of the current and past input values. As a result, the
unit sample response is simply
𝑞

ℎ 𝑛 = 𝑏𝑘 𝛿 𝑛 − 𝑘
𝑘=0
Thus, h(n) is finite in length and the system is referred to as a finite-length impulse response
(FIR) system. However, if ak ≠ 0, the unit sample response is, in general, infinite in length
and the system is referred to as an infinite-length impulse response (IIR) system. For
example, if

the unit sample response is h(n) = anu(n).


There are several different methods that one may use to solve LCCDEs for a general
input x(n). The direct approach involves finding the homogeneous and particular solution and
then writing the total output for given initial conditions. Another approach called as Indirect
approach is to use z-transforms.

Direct Approach for solving LCCDE

Given an LCCDE, the general solution is a sum of two parts,

where yh(n) is known as the homogeneous solution and yp(n) is the particular solution. The
homogeneous solution is the response of the system to the initial conditions, assuming that
the input x(n) = 0. The particular solution is the response of the system to the input x(n),
assuming zero initial conditions.
The homogeneous solution is found by solving the homogeneous difference equation
𝑝

𝑦 𝑛 + 𝑎𝑘 𝑦(𝑛 − 𝑘) = 0
𝑘=1
The solution to above equation may be found by assuming a solution of the form

Substituting this, we obtain the polynomial equation


𝑝

𝑧𝑛 + 𝑎𝑘 𝑧 𝑛−𝑘 = 0
𝑘=1
or
𝑧 𝑛−𝑝 𝑧 𝑝 + 𝑎1 𝑧 𝑝−1 + 𝑎2 𝑧 𝑝−2 + ⋯ + 𝑎𝑝−1 𝑧 + 𝑎𝑝 = 0

The polynomial in braces is called the characteristic polynomial. Because it is of degree p, it


will have p roots, which may be either real or complex. If the coefficients ak are real-valued,
these roots will occur in complex conjugate pairs (i.e., for each complex root z, there will be
another that is equal to z*). If the p roots zi are distinct, zi ≠ zk for k ≠ i , the general solution
to the homogeneous difference equation is

where the constants Ak are chosen to satisfy the initial conditions. For repeated roots, the
solution must be modified as follows. If zl is a root of multiplicity m with the remaining p - m
roots distinct, the homogeneous solution becomes

For the particular solution, it is necessary to find the sequence yp(n) that satisfies the
difference equation for the given x(n). For many of the typical inputs that we are interested
in, the solution will have the same form as the input. Table 2.1 lists the particular solution for
some commonly encountered inputs. For example, if x(n) = anu(n), the particular solution
will be of the form

provided a is not a root of the characteristic equation. The constant C is found by substituting
the solution into the difference equation. Note that for x(n) = Cδ(n) the particular solution is
zero. Because x(n) = 0 for n > 0, the unit sample only affects the initial condition of y(n).

Table 2.1 The Particular Solution to an LCCDE for Several Different Inputs
Frequency Response
Eigen functions of linear shift-invariant systems are sequences that, when input to the
system, pass through with only a change in (complex) amplitude. That is to say, if the input is
x(n), the output is y(n) = λx(n), where λ, the eigen value, generally depends on the input x(n).

Signals of the form

where ω is a constant, are eigen functions of LSI systems. This may be shown from the
convolution sum:

Thus, the eigen value, which we denote by H(ejω), is

Note that H(ejω) is, in general, complex-valued and depends on the frequency ω of the
complex exponential. Thus, it may be written in terms of its real and imaginary parts.

or in terms of its magnitude and phase,

where

and

Discrete Time Fourier Transform (DTFT)

Many sequences can be represented by a Fourier integral of the form

…………………(1)
where

…………………(2)
Equations (1) and (2) together form a Fourier representation for the sequence. Equation (1),
the inverse Fourier transform, is a synthesis formula. That is, it represents x[n] as a
superposition of infinitesimally small complex sinusoids of the form

with ω ranging over an interval of length 2π and with X(ejω) determining the relative amount
of each complex sinusoidal component. Although, in writing Eq. (1), we have chosen the
range of values for ω between −π and +π, any interval of length 2π can be used. Eq. (2), the
Fourier transform, is an expression for computing X(ejω) from the sequence x[n], i.e., for
analyzing the sequence x[n] to determine how much of each frequency component is required
to synthesize x[n] using Eq. (1). In general, the Fourier transform is a complex-valued
function of ω. As with the frequency response, we may either express X(ejω)in rectangular
form as

or in polar form as

with representing the magnitude and the phase.

A sufficient condition for convergence can be found as follows:

Thus, if x[n] is absolutely summable, then X (ejω) exists

Using this concept, the impulse response can be obtained from the frequency response by
applying the inverse Fourier transform integral; i.e.,

where H(ejω) is the frequency response of the system.

Properties of DTFT
The Table 2.2 summarizes the properties or theorems of Fourier Transforms
Table 2.2 Properties of DTFT

The symmetry properties of the Fourier transform are summarized in Table 2.3

Table 2.3 Symmetry Properties of Fourier Transform

Fourier transform is a sum, whereas the inverse transform is an integral with a periodic
integrand. The Fourier transform of some basic sequences is summarized in Table 2.4
Table 2.4 Fourier Transform Pairs

DTFT in Discrete Time signal analysis

We present some applications of the DTFT in discrete-time signal analysis. These


include finding the frequency response of an LSI system that is described by a difference
equation, performing convolutions, solving difference equations that have zero initial
conditions.
1) LSI Systems and LCCDEs
An important subclass of LSI systems contains those whose input, x(n), and output, y(n), are
related by a linear constant coefficient difference equation (LCCDE):
𝑝 𝑞

𝑦 𝑛 =− 𝑎𝑘 𝑦 𝑛 − 𝑘 + 𝑏𝑘 𝑥 𝑛 − 𝑘
𝑘=1 𝑘=0

The linearity and shift properties of the DTFT may be used to express this difference
equation in the frequency domain as follows:

𝑝 𝑞

𝑌 𝑒 𝑗𝜔 = − 𝑎𝑘 𝑌 𝑒 𝑗𝜔 𝑒 −𝑗𝜔𝑘 + 𝑏𝑘 𝑋 𝑒 𝑗𝜔 𝑒 −𝑗𝜔𝑘
𝑘=1 𝑘=0
or

𝑝 𝑞

𝑌 𝑒 𝑗𝜔 1+ 𝑎𝑘 𝑒 −𝑗𝜔𝑘 = 𝑋 𝑒 𝑗𝜔 𝑏𝑘 𝑒 −𝑗𝜔𝑘
𝑘=1 𝑘=0

Therefore, the frequency response of this system is


𝑞
𝑗𝜔
𝑌 𝑒 𝑗𝜔 𝑘=0 𝑏𝑘 𝑒
−𝑗𝜔𝑘
𝐻 𝑒 = =
𝑋 𝑒 𝑗𝜔 1 + 𝑝𝑘=1 𝑎𝑘 𝑒 −𝑗𝜔𝑘

2) Performing Convolutions
Because the DTFT maps convolution in the time domain into multiplication in the
frequency domain, the DTFT provides an alternative to performing convolutions in the time
domain

3) Solving Difference Equations


The DTFT may be used to solve difference equations in the "frequency domain" provided
that the initial conditions are zero. The procedure is simply to transform the difference
equation into the frequency domain by taking the DTFT of each term in the equation, solving
for the desired term, and finding the inverse DTFT.

Illustrative Examples:

Problem 1: Find the solution to the difference equation

for x(n) = u(n) assuming initial conditions of y(- 1) = 1 and y(-2) = 0.

Solution:
We begin by finding the particular solution. From Table 2.1 we see that for x(n) = u(n)

Substituting this solution into the difference equation we find

In order for this to hold, we must have

To find the homogeneous solution, we set yh(n) = zn, which gives the characteristic
polynomial

or

Therefore, the homogeneous solution has the form


Thus, the total solution is

The constants A1, and A2 must now be found so that the total solution satisfies the given
initial conditions, y(-1) = 1 and y(-2) = 0. Because the solution given in the above equation
only applies for n ≥ 0, we must derive an equivalent set of initial conditions for y(0) and y(1).
Evaluating the LCCDE

at n = 0 and n = 1. we have

Substituting these derived initial conditions into the total solution obtained containing A1 and
A2, we have

Solving for A1 and A2 we find

Thus, the solution is

Problem 2: Find the Fourier transform of

Solution:
Applying the DTFT

Using the geometric series, this sum is

provided |α| < 1.

Problem 3: Consider the linear shift-invariant system characterized by the second-order


linear constant coefficient difference equation

Find the frequency response.

Solution:
The frequency response may be found by applying the DTFT on both sides and taking the
ratio of output spectrum to input spectrum
𝑌 𝑒 𝑗𝜔
𝐻 𝑒 𝑗𝜔 =
𝑋 𝑒 𝑗𝜔
Therefore for the difference equation given

Problem 4: If the unit sample response of an LSI system is

find the response of the system to the input x(n) = βnu(n), where |α| < 1, |β|< 1, and α ≠ β.

Solution:
Because the output of the system is the convolution of x(n) with h(n),

the DTFT of y (n) is

Therefore, all that is required is to find the inverse DTFT of Y(ejω). This may be done easily
by expanding Y(ejω) as follows:

where A and B are constants that are to be determined. Expressing the right-hand side of this
expansion over a common denominator,

and equating coefficients, the constants A and B may be found by solving the pair of
equations

The result is

Therefore,

and it follows that the inverse DTFT is

Problem 5:
Solve the following LCCDE for y(n) for x(n) = δ(n), assuming zero initial conditions.

Solution:
We begin by taking the DTFT of each term in the difference equation:
Because the DTFT of x(n) = δ(n)is X(ejω) = 1,

Using the DTFT pair

the inverse DTFT of Y(ejω) may be easily found using the linearity and shift properties,

Summary:
To summarize, for a system for which the input and output satisfy a linear constant
coefficient difference equation, the output for a given input is not uniquely specified.
Auxiliary information or initial conditions are required. Linearity, time invariance, and
causality of the system will depend on the auxiliary conditions. If an additional condition is
that the system is initially at rest, then the system will be linear, time invariant, and causal.

Assignment:

Problem 1: Find the Fourier Transform of

Problem 2: Suppose X(ejω) consists of an impulse at frequency ω = ωo. Find the Inverse
DTFT
Problem 3:Find the difference equation representation of the system if its frequency response
is

Problem 4: The inverse of a system with unit sample response h(n) is a system that has a unit
sample response g(n) such that

If , find g(n).
Problem 5: Show that if X(ejω) is real and even, x(n) is real and even.
Simulation:
To Calculate Unit Impulse Response (Unit Sample), Unit Step Response of the given LTI
system

Input:
type the numerator vector [1,1/4]
type the denominator vector [1,-3/8,-2/3]
Program:
%To calculate Unit Impulse response
clc;
clear all;
close all;
% Given system
%y(n)=(3/8)y(n-1)+(2/3)y(n-2)+x(n)+(1/4)x(n-1)
num = input ('type the numerator vector ');
den = input ('type the denominator vector ');
N = input ('type the desired length of the output sequence N ');
n = 0 : N-1;
h=impz(num,den);
disp('The impulse response of LTI system is'); disp(h(1:N));
stem(n,h(1:N))
xlabel ('time index n');
ylabel ('Amplitude ');
title ('Impulse Response of LTI system');

% To calculate Unit Step response


% Given system
%y(n)=(3/8)y(n-1)+(2/3)y(n-2)+x(n)+(1/4)x(n-1)
num = input ('type the numerator vector ');
den = input ('type the denominator vector ');
N = input ('type the desired length of the output sequence N ');
n = 0 : 1 : N-1;
s=stepz(num,den);
disp('The step response of LTI system is'); disp(s(1:N));
stem(n,s(1:N))
xlabel ('time index n');
ylabel ('s(n)');
title ('Step Response of LTI system');
% To calculate Sinusoidal response
% Given system
%y(n)=(3/8)y(n-1)+(2/3)y(n-2)+x(n)+(1/4)x(n-1)
num = input ('type the numerator vector ');
den = input ('type the denominator vector ');
n = 0 : 0.1 :2*pi;
in = sin(n);
s = filter ( num, den, in );
subplot(2,1,1);
stem(n,in);
xlabel ('time index n');
ylabel ('(n)');
title('Input sinusoidal sequence');
subplot(2,1,2);
stem(n,s);
xlabel ('time index n');
ylabel ('s(n)');
title ('Sinusoidal Response of LTI system');

References:
1. Digital Signal Processing, Principles, Algorithms and Applications – John G Proakis, Dimitris G Manolakis,
Pearson Education / PHI, 2007
2. Discrete Time Signal Processing – A V Oppenheim and R W Schaffer, PHI, 2009
3. Digital Signal Processing – Monson H.Hayes – Schaum’s Outlines, McGraw-Hill,1999
4. Fundamentals of Digital Signal Processing using Matlab – Robert J Schilling, Sandra L Harris, Thomson
2007.
5. Digital Signal processing – A Practical Approach, Emmanuel C Ifeachor and Barrie W Jervis, 2 nd Edition, PE
2009

6. Digital Signal Processing – A Computer Based Approach, Sanjit K.Mitra, McGraw Hill,2 nd Edition, 2001

You might also like