Digital Signal Processing
Chapter 2: Discrete-Time Signals and Systems
Dr. Hussein Hijazi
[Link]@[Link]
Spring 2014
1
1 Discrete-Time Signal (Cont’d) Dr. Hijazi (Spr ing 2014)
• Objective:
Introduction some elementary DT signals (other than sinusoidal)
Characterization of DT systems
Collection of techniques for the analysis of DT systems
• Discrete-Time Signal: it is a function x(n) of an independent integer
variable n.
• Notes:
x(n) is not defined at instants between two successive samples.
Incorrect to think that x(n) is equal to zero if n is not an integer.
x(n): referred to n-th sample
x(n) can be inherently discrete-time signal or obtained from analog signal
x(n) = xa(n)
2
1 Discrete-Time Signal Dr. Hijazi (Spr ing 2014)
There are some alternative representations for DT signals:
Functional Representation:
Tabular Representation:
Sequence Representation:
Infinite duration signals
Finite duration signals
seven-point sequence four-point sequence
3 Note: the time origin (n = 0) is indicated by the symbol
2 Elementary Discrete-Time Signals (Cont’d) Dr. Hijazi (Spr ing 2014)
• Unit sample sequence or Unit impulse:
• Unit step signal:
• Unit ramp signal:
4
2 Elementary Discrete-Time Signals (Cont’d) Dr. Hijazi (Spr ing 2014)
• Exponential signal:
Note: if a is complex
or
5
2 Elementary Discrete-Time Signals Dr. Hijazi (Spr ing 2014)
Damped (decaying exponential) cosine Damped sine function.
6
3 Classification of DT Signals (Cont’d) Dr. Hijazi (Spr ing 2014)
The mathematical methods employed in the analysis of discrete-time
signals depend on the characteristics of the signals.
• Energy Signals and Power Signals:
- Energy of x(n):
- Power of x(n):
If E is finite (i.e., 0 < E < ∞), then x(n) is called an energy signal. ( P = 0)
If P is finite (i.e., 0 < P < ∞), then x(n) is called an power signal. ( E = ∞)
Example: Determine the power and energy of
u(n) ; ur(n) ;
7
3 Classification of DT Signals (Cont’d) Dr. Hijazi (Spr ing 2014)
• Periodic and Aperiodic Signals:
- x(n) is periodic with period N (N > 0) if and only if
Note: smallest value of N for which the eq. holds is called the (fundamental) period.
- If there is no value of N that satisfies the eq. above, the signal is called aperiodic.
Note: if x(n) is a periodic signal with fundamental period N, its power is given by
• Symmetric (even) and antisymmetric (odd) signals:
- A real-valued signal x(n) is called symmetric (even) if
- A real-valued signal x(n) is called antisymmetric (odd) if
Note: if x(n) is odd, then x(0) = 0.
8
3 Classification of DT Signals Dr. Hijazi (Spr ing 2014)
Any signal can be expressed as:
The even signal component of x(n) is:
The odd signal component of x(n) is:
9
4 Manipulation of DT Signals (Cont’d) Dr. Hijazi (Spr ing 2014)
Signal Manipulations: time transformation and amplitude transformation
Time transformation: it includes shift, reversal, and scaling.
• Time shift: x(n) x(n-k) (replace n by n-k)
k >0 delay by k units (shift to right) ; k < 0 advance by |k| units (shift to left)
Note:
• If x(n) is stored (disk or PC’s memory), it is realizable to introduce a delay or an advance
off-line processing.
• If x(n) is generated in real time (not stored), possible to delay but advance is unrealizable
(impossible to view samples not yet generated (future samples)) on-line processing.
10
4 Manipulation of DT Signals (Con’td) Dr. Hijazi (Spr ing 2014)
Time reversal: x(n) x(– n) (replace n by –n)
Folding or reflection x(n) about the time origin n = 0.
Note:
• Folding can be realizable only in off-line processing
• Real-life example: playing recording music backward (musicians: Beatles, Pink Floyd, Frank
Zappa, …)
• The operations of folding and time delaying (or advancing) a signal are not commutative.
x(n) Folding: x(–n) delaying by k: x(–n +k)
x(n) Delaying by k: x(n – k) Folding: x(–n – k)
11
4 Manipulation of DT Signals (Cont’d) Dr. Hijazi (Spr ing 2014)
• Time scaling: x(n) x(μ.n) (replace n by μ.n)
y(-2) = x(-4) ; y(-l) = x(-2) ; y(0) = x(0) ; y(1) = x(2) ; y(2) = x(4) and so on.
Note:
• If x(n) = xa(nT) (sampling at rate 1/T) y(n) = x(2n) = xa(2nT) (sampling at rate 1/2T)
down-sampling by a factor of 2.
• Real-life example: listening to an answering-machine message on fast forward.
12
4 Manipulation of DT Signals Dr. Hijazi (Spr ing 2014)
Amplitude transformation: it includes scaling, addition, and multiplication.
Amplitude scaling: x(n) Ax(n) (multiplying all samples by A)
Real-life example: amplifier with a gain A
Sum of two signals: y(n) = x1(n) + x2(n)
Value of y(n) at any instant is equal to the sum of the values of these two signals at that
instant.
Product of two signals: y(n) = x1(n) x2(n)
Value of y(n) at any instant is equal to the product of the values of these two signals at
that instant.
13
5 DT Systems: Input-Output (Cont’d) Dr. Hijazi (Spr ing 2014)
DT system:
It is a device or an algorithm that performs some prescribed operation on a discrete-
time signal.
y(n) = T[x(n)], T: transformation or operator
Input-Output description of a DT system:
It consists of a mathematical expression or a rule, which explicitly defines the relation
between the input and output signals.
Note:
As user, the exact internal structure of the system is either unknown or ignored. Thus
the only way to interact with the system is to assume it a "black box".
14
5 DT Systems: Input-Output Dr. Hijazi (Spr ing 2014)
Example: Determine the response of the following systems to the input signal
Note:
• Median is the middle value of a sorted list. (present, immediate past and future)
• Accumulator is a running sum of all the past samples up to the present time.
15
6 DT Systems: Block Diagram Representation Dr. Hijazi (Spr ing 2014)
There are some basic building blocks that can be interconnected to form complex DT
systems. (more details about DT systems implementation in chapter 9)
Adder:
Constant Multiplier:
Signal Multiplier:
Unit Delay Element: based on memory
Unit Advance Element: possible only in off-line
Example: sketch the block diagram representation of the DT system described by the input-output
relation
Note: system is relaxed at time n = no if outputs at time prior no are zero (i.e., all
16 memory is filled with zeros).
7 Classification of DT Systems (Cont’d) Dr. Hijazi (Spr ing 2014)
In the analysis and design of systems, it is desirable to classify the systems according to the
general properties.
Static vs Dynamic systems:
• A DT system is called static or memoryless if output at any instant n depends at most on the
input sample at the same time (not on past or future samples of the input).
• Otherwise, system is said to be dynamic or to have memory.
Example:
Time-invariant vs Time-variant systems:
• A relaxed system T is time invariant if and only if
• Otherwise, system is said to be time variant
Example:
17
7 Classification of DT Systems (Cont’d) Dr. Hijazi (Spr ing 2014)
Linear vs Nonlinear systems:
• A relaxed system is linear if and only if
Note:
• A relaxed, linear system with zero input produces a zero output.
• If a system produces a nonzero output with a zero input, the system may be either
nonrelaxed or nonlinear.
• If a relaxed system does not satisfy the superposition principle as given by the definition
above, it is called nonlinear.
Example:
Causal vs Noncausal systems:
• A system is said to be causal if the output of the system at any time n [i.e., y(n)] depends
only on present and past inputs [i.e., x(n), x(n - 1), x(n - 2),...]. Otherwise, it is called
noncausal (depends on future inputs).
• A noncausal system cannot be implemented in real-time (on-line) only in off-line. (ex:
geophysical signals and images).
Example
18
7 Classification of DT Systems Dr. Hijazi (Spr ing 2014)
Stable versus unstable systems:
• A relaxed system is said to be bounded input-bounded output (BIBO) stable if and only if
every bounded input produces a bounded output.
• If, for some bounded input sequence x(n), the output is unbounded (infinite), the system is
classified as unstable.
Note: Unstable systems cause overflow in any practical implementation.
Example:
- Compute the output for the input:
- Deduce the stability of the system
19
8 Interconnection of DT Systems Dr. Hijazi (Spr ing 2014)
There are two basic ways in which systems can be interconnected:
• Cascade (series)
• Parallel.
Note:
• In general, we have:
• If the systems and are LTI, then: is LTI and
20
9 Analysis of DT LTI Systems Dr. Hijazi (Spr ing 2014)
- We now focus to the analysis of the important class of linear, time-invariant (LTI) systems.
- To be able to determine the output of any linear, time-invariant system to any arbitrary input
signal.
x(n) y(n) = x(n) * h(n) (h(n): impulse response)
LTI
System (difference equation)
- There are two basic methods for analyzing the response y(n) of an LTI system to a given
input:
• Computing the convolution sum (*) by using h(n) (only for a relaxed system)
• Solving the difference equation (input-output relation)
21
10 Convolution Sum: Definition Dr. Hijazi (Spr ing 2014)
• h(n): the response of the LTI system to the unit sample sequence x(n) = δ(n)
• The convolution sum y(n) = x(n) * h(n) is defined as:
• To summarize, the process of computing the convolution between x(n) and h(n) involves the
following four steps.
Fold h(k) h(-k)
Shift h(-k) by n h(n-k)
Multiply x(k) by h(n-k) vn(k) = x(k)h(n-k) (product sequence)
Sum all the values of vn(k) to obtain y(n)
Example: -Determine the response of the system to the input signal
Solution
- Determine the output y(n) for h(n) = an u(n) and x(n) = u(n) where |a| < 1
22 for n >= 0 and y(n) = 0 for n < 0
11 Convolution Sum: Properties Dr. Hijazi (Spr ing 2014)
• Identity and Shifting:
• Commutative law:
• Associative law:
• Distributive law:
• Cascade LTI systems:
Example: Determine the impulse response for the cascade of two LTI systems
• Parallel LTI systems:
23
12 Causality and Stability of LTI System Dr. Hijazi (Spr ing 2014)
• An LTI system is causal if and only if
• Note:
- Causal sequence x(n) x(n) = 0 for n < 0
- noncausal sequence x(n) x(n) is nonzero for n > 0 and n < 0
Example: Determine the unit step response of the LTI system with impulse response
• An LTI system is stable if its impulse response is absolutely summable:
Example:
- Determine the range of values of the parameter a for which the LTI system with impulse
response h(n) is stable.
- Determine the range of values of the parameter a and b for which the LTI system with impulse
response h(n) is stable.
• Finite-duration Impulse Response (FIR) and Infinite-duration Impulse Response (IIR):
FIR h(n) = 0 outside an a finite time interval.
ex: h(n) = 0 for n < and n ≤ M output
24 system has finite memory of length M samples
13 DT Systems: Difference Equation Dr. Hijazi (Spr ing 2014)
• The output of a causal and recursive system can be expressed in general as
• The output of a causal and nonrecursive system can be expressed in general as
Note:
- Output of a recursive system is computed in order [i.e., y(0), y(l), y(2),...]
- Output a nonrecursive system can be computed in any order [i.e., y(200), y(15), y(3), etc.].
Example: Square-Root Algorithm
x(n) = Au(n) and y(-1) = estimation of sqrt(A) y(n) tends toward to sqrt(A).
ex: A = 2 and y(-1) = 1, compute y(0), y(1), y(2)
25
14 DT Systems: Linear Difference Equation Dr. Hijazi (Spr ing 2014)
• A recursive system defined by a linear difference equation of order N is:
<==>
Note:
- To determine y(n) for n ≥ 0, we need x(n) for n ≥ 0 and N initial conditions
[ y(-1), y(-2), …, y(-N)].
- A system defined by constant coefficients {ak} and {bk} is time invariant system.
- If one or more of these coefficients depends on time (function of n), the system is time
variant.
• Analyze of first order linear constant-coefficient difference equation:
- Assume that the system is exited by an input x(n) for n ≥ 0, determine an explicit expression
for the output y(n).
- Find the zero-state (relaxed system) response yzs(n).
- Find the zero-input (nonrelaxed) response (natural or free response) yzi(n).
26
15 Solution of Linear Cte Coefficient DE (Cont’d) Dr. Hijazi (Spr ing 2014)
• Given an LTI system defined by a linear constant-coefficient difference equation.
Goal: find an explicit expression y(n), n ≥ 0, for a desired input x(n), n ≥ 0, and N initial
conditions [y(-1), y(-2), ….., y(-N)]
x(n) y(n)
LTI
System
Direct method Indirect method
Total solution: y(n) = yh(n) + yp(n) (based on z-transform, chapter 3)
yh(n): Homogeneous solution yp(n): Particular solution
27
15 Solution of Linear Cte Coefficient DE (Cont’d) Dr. Hijazi (Spr ing 2014)
Homogenous Equation:
• Characteristic polynomial
• Find the N roots { λ1, λ2, …. λN }
Note: roots can be complex and have multiple order
λi:simple root (order 1), yh(n) contains C. λin (C: parameter)
λi:simple root (order 3), yh(n) contains (C1 + C2 n + C3 n2 ). λin (Ci: parameters)
Note:
- There will be N parameters { C1, C2, …., CN } in yh(n)
- These parameters are computed by using the N initial conditions [y(-1), y(-2), ….., y(-N)]
Example: Determine the homogenous solutions for n ≥ 0
28
15 Solution of Linear Cte Coefficient DE Dr. Hijazi (Spr ing 2014)
Particular Solution: yp(n) depends on the form of input signal x(n)
δ(n) 0
Example: Determine the total solution y(n), n ≥ 0,
29
16 Impulse Response of LTI Recursive System Dr. Hijazi (Spr ing 2014)
The impulse response of an LTI recursive system, h(n) is simply equal to the zero-state
response (relaxed system) of the system when the input x(n) = δ(n)
x(n) = δ(n) y(n) = h(n) (system is initially relaxed)
LTI
System
Example: Determine the impulse response h(n) for the below system
Note:
- A causal system described by a linear constant-coefficient difference equation is BIBO stable
if and only if all roots of the characteristic polynomial { λ1, λ2, …. λN } have magnitude less
than unity ==> |λi | < 1
- If one ore more of the |λi | ≥ 1, the system is unstable
30
17 Implementation of Linear DE (Cont’d) Dr. Hijazi (Spr ing 2014)
The implementation of a DT system is driven by the method of implementation and by some
constraints, such as cost, hardware limitations, size limitations, and power requirements.
There are two basic methods to implement a DT system described by a linear constant-
coefficients difference equation:
• Direct form I
31
17 Implementation of Linear DE (Cont’d) Dr. Hijazi (Spr ing 2014)
• Direct form II or Canonic form
32
17 Implementation of Linear DE Dr. Hijazi (Spr ing 2014)
Example: Implement in direct form I and II
- Recursive System
- Purely recursive system
- Nonrecursive system
FIR or Nonrecursive system:
Every FIR system can be implemented nonrecursively and recursively.
Example: Implement the moving average system in recursive and nonrecursive ways.
33
17 Correlation of DT Signals (Cont’d) Dr. Hijazi (Spr ing 2014)
Objective:
• Computing correlation between two signals is to measure the degree to which the two signals
are similar and thus to extract some information related to the application.
• Correlation of signals is often encountered in radar, sonar, digital communications, geology,
and other areas in science and engineering.
• In radar:
- Determine if a target is present
- Determine D and compute the distance to the target
- Visual inspection of y(n) does not reveal the presence
or absence of the desired signal reflected from
the target due to noise corruption
- Solution correlation
D: round-trip delay
α: attenuation
w(n): additive noise
34
17 Correlation of DT Signals (Cont’d) Dr. Hijazi (Spr ing 2014)
• Crosscorrelation: The crosscorrelation between two real signals x(n) and y(n) is
Energy signals
Power signals
Periodic signals with period N
• Autocorrelation: The autocorrelation of a real signal x(n) is rxx(l)
Example: Determine the crosscorrelation between x(n) and y(n)
35
17 Correlation of DT Signals (Cont’d) Dr. Hijazi (Spr ing 2014)
36
17 Correlation of DT Signals Dr. Hijazi (Spr ing 2014)
37