Digital Signals and Systems

advertisement
Digital Signals and Systems
1
Digital Signals
A discrete-time signal ๐‘ฅ(๐‘›) is a function of an integer variable ๐‘›. In the DS processor, the signal is represented by the discrete
encoded values with a finite precision.
Graphical representation of a discrete-time signal ๐’™(๐’)
Functional representation
๐‘ฅ ๐‘› = … , 0 , ๐ŸŽ , 1 , 4 , 1, 0, 0, …
๐‘ฅ ๐‘› = ๐ŸŽ , −2 , 1 , 4 , −1,
Tabular representation
๐‘–๐‘›๐‘“๐‘–๐‘›๐‘–๐‘ก๐‘’ − ๐‘‘๐‘ข๐‘Ÿ๐‘Ž๐‘ก๐‘–๐‘œ๐‘› ๐‘ ๐‘–๐‘”๐‘›๐‘Ž๐‘™
๐‘“๐‘–๐‘›๐‘–๐‘ก๐‘’ − ๐‘‘๐‘ข๐‘Ÿ๐‘Ž๐‘ก๐‘–๐‘œ๐‘› ๐‘ ๐‘–๐‘”๐‘›๐‘Ž๐‘™
Sequence representation (bold or arrow for origin n=0)
Mathematically a discrete-time signal ๐‘ฅ ๐‘› can be determined by
2
Common Digital Sequences
Unit-impulse sequence:
Unit-step sequence:
Exponential sequence:
๐‘ฅ ๐‘› = ๐‘Ž๐‘› ๐‘“๐‘œ๐‘Ÿ ๐‘Ž๐‘™๐‘™ ๐‘›
0<a<1
3
Shifted Sequences
Shifted unit-impulse
Shifted unit-step
Right shift by
two samples
Left shift by
two samples
4
Example 1
Sketch this following digital signal sequence,
x(๐‘›) = δ(๐‘› + 1) + 0.5 δ (๐‘› − 1) + 2 ๐›ฟ(๐‘› − 2).
Solution:
5
Generation of Digital Signals
In order to generate the digital sequence from its analog signal function, the analog signal ๐‘ฅ ๐‘ก is uniformly sampled at the
time interval of โˆ†๐‘ก = ๐‘‡ , T is the sampling period.
x(n): digital signal
x(t): analog signal
sampling interval : โˆ†๐‘ก = ๐‘‡
๐‘ฅ ๐‘› = ๐‘ฅ(๐‘ก)
๐‘ก=๐‘›๐‘‡
= ๐‘ฅ(๐‘›๐‘‡
Also
6
Example 2
Convert analog signal x(t) into digital signal x(n), when sampling period is 125 microsecond, also plot sample values.
Solution:
The first five sample values:
Plot of the digital sequence:
7
Digital Systems
A digital system is a device or an algorithm that performs prescribed operations (or transformation) on a signal ๐‘ฅ ๐‘› , called the
input or excitation, to produce another signal ๐‘ฆ ๐‘› called the output or response of the system.
transformation
๐‘ฅ ๐‘›
Input signal
(Excitation)
Digital System
๐’š ๐’
Output signal
(Response)
Example
Determine the response of the following system (mean value of three values) to the input signal
๐‘ฅ ๐‘› =
๐‘ฆ ๐‘› =
๐‘›,
0,
−3 ≤ ๐‘› ≤ 3
๐‘œ๐‘กโ„Ž๐‘’๐‘Ÿ๐‘ค๐‘–๐‘ ๐‘’
1
๐‘ฅ ๐‘› + 1 + ๐‘ฅ ๐‘› + ๐‘ฅ(๐‘› − 1)
3
๐‘ฅ ๐‘› = … , 0,3, 2, 1, ๐ŸŽ, 1, 2, 3, 0, … ๐‘ค๐‘–๐‘กโ„Ž ๐‘ฅ 0 = 0 ๐‘๐‘œ๐‘™๐‘‘ .
1
1
2
)
๐‘ฆ 0 = ๐‘ฅ −1 + ๐‘ฅ 0 + ๐‘ฅ(1 = 1 + 0 + 1 =
3
3
3
5
๐Ÿ
5
๐‘ฆ ๐‘› = … , 0,1, , 2, 1, , 1, 2, , 1, 0, …
3
๐Ÿ‘
3
8
Block Diagram Representation of Discrete-Time Systems
adder
Constant multiplier
unit delay element
signal multiplier
unit advance element
9
Example 3
Sketch the block diagram representation of the discrete-time system described by the input-output relation.
1
1
1
๐‘ฆ ๐‘› = 4 ๐‘ฆ ๐‘› − 1 + 2 ๐‘ฅ ๐‘› + 2 ๐‘ฅ(๐‘› − 1)
Solution
The output ๐‘ฆ ๐‘› is obtained by rearranging the input-output equation:
1
1
๐‘ฆ ๐‘› = ๐‘ฆ ๐‘› − 1 + ๐‘ฅ ๐‘› + ๐‘ฅ(๐‘› − 1)
4
2
10
Causal and non-causal systems
A system is causal if its output at any time ๐‘› depends only on present and past inputs [i.e. ๐‘ฅ ๐‘› , ๐‘ฅ ๐‘› − 1 , ๐‘ฅ ๐‘› − 2 , … ], but
does not depend on future inputs [i.e. ๐‘ฅ ๐‘› + 1 , ๐‘ฅ ๐‘› + 2 , …].
Example 4
Determine whether the systems described below are causal
Solution
a. Since for ๐‘› > 0 the output ๐‘ฆ ๐‘› depends on the current input ๐‘ฅ ๐‘› and its past value ๐‘ฅ ๐‘› − 2 the system is causal.
b. Since for ๐‘› > 0 the output ๐‘ฆ ๐‘› depends on the current input ๐‘ฅ ๐‘› and its future value ๐‘ฅ ๐‘› + 1 the system is non-causal.
11
Linear System
Time, t
Continuous system
Sample number, n
discrete system
12
Linear Systems: Property 1
A digital system S is linear if and only if it satisfy the superposition principle (Homogeneity and Additivity):
Homogeneity: (Deals with amplitude )
If x[n] ๏ƒ 
y[n],
then
kx[n] ๏ƒ 
ky[n]
K is a constant
13
Linear Systems: Property 2
Additivily
Homogeneity & Additivity
(superposition principle)
14
Example 5 (a)
Let a digital amplifier,
If the inputs are:
Outputs will be:
If we apply combined input to the system:
The output will be:
Individual outputs:
2๐‘ฅ1 ๐‘› = 2๐‘ข(๐‘›)
X 10
2๐‘ฆ1 ๐‘› = 20๐‘ข(๐‘›)
15
Example 5 (b)
๐‘ฆ ๐‘› = ๐‘ฅ 2 (๐‘›)
๐‘ฅ ๐‘›
System
๐‘ฅ1 ๐‘› = ๐‘ข(๐‘›)
If the input is:
System
๐‘ฆ1 ๐‘› = ๐‘ฅ 2 (๐‘›)
๐‘ฅ2 ๐‘› = ๐›ฟ(๐‘›)
System
๐‘ฆ2 ๐‘› = ๐›ฟ 2 (๐‘›)
4๐‘ฅ1 ๐‘› + 2๐‘ฅ2 (๐‘›)
2
2
Then the output is: ๐‘ฆ ๐‘› = ๐‘ฅ (๐‘›) = (4๐‘ฅ1 ๐‘› + 2๐‘ฅ2 (๐‘›))
2
= (4๐‘ข ๐‘› + 2๐›ฟ(๐‘›)) = 16๐‘ข2 ๐‘› + 16๐‘ข ๐‘› ๐›ฟ ๐‘› +4๐›ฟ 2 ๐‘›
= 16๐‘ข ๐‘› + 20๐›ฟ ๐‘› .
16
Linear Systems: Property 3
Shift (time) Invariance
A system is called time-invariant (or shift-invariant) if its input-output characteristics do not change with time (a shifted input
signal will produce a shifted output signal, with the same of shifting amount).
17
Example 6 (a)
Given the linear system ๐‘ฆ ๐‘› = 2๐‘ฅ ๐‘› − 5 , find whether the system is time invariant or not.
Solution:
๐‘ฅ1 ๐‘›
System
Let the shifted input be:
๐‘ฆ1 ๐‘› = 2๐‘ฅ1 (๐‘› − 5)
๐‘ฅ2 ๐‘› = ๐‘ฅ1 ๐‘› − ๐‘›0
Therefore system output: ๐‘ฆ2 ๐‘› = 2๐‘ฅ2 ๐‘› − 5 = 2๐‘ฅ1 (๐‘› − ๐‘›0 − 5)
Shifting ๐‘ฆ2 ๐‘› = 2๐‘ฅ1 (๐‘› − 5)
Equal
By ๐‘›0 samples leads to ๐‘ฆ1 ๐‘› − ๐‘›0 = 2๐‘ฅ1 (๐‘› − 5 − ๐‘›0 )
18
Example 6 (b)
Given the linear system ๐‘ฆ ๐‘› = 2๐‘ฅ 3๐‘› , find whether the system is time invariant or not.
Solution:
๐‘ฅ1 ๐‘›
๐‘ฆ1 ๐‘› = 2๐‘ฅ1 (3๐‘›)
System
Let the shifted input be:
๐‘ฅ2 ๐‘› = ๐‘ฅ1 ๐‘› − ๐‘›0
Therefore system output:
๐‘ฆ2 ๐‘› = 2๐‘ฅ2 3๐‘› = 2๐‘ฅ1 (3๐‘› − ๐‘›0 )
Shifting ๐‘ฆ2 ๐‘› = 2๐‘ฅ1 (3๐‘›)
By ๐‘›0 samples leads to ๐‘ฆ1 ๐‘› − ๐‘›0 = 2๐‘ฅ1 3 ๐‘› − ๐‘›0
Not Equal
= 2๐‘ฅ1 3๐‘› − 3๐‘›0
19
Difference Equation
A causal, linear, and time invariant system can be represented by a difference equation as follows:
Outputs
Inputs
After rearranging:
Finally:
20
Example 7
Identify non zero system coefficients of the following difference equations.
21
System Representation Using Impulse Response
A linear time-invariant system (LTI system) can be completely described by its unit-impulse response โ„Ž(๐‘›) due to the impulse
input ๐›ฟ(๐‘›) with zero initial conditions.
22
Example 8 (a)
Consider the difference equation with an initial condition ๐‘ฅ −1 = 0.
a. Determine the unit-impulse response โ„Ž
๐‘›
.
b. Draw the system block diagram.
c. Write the output using the obtained impulse response.
Solution
23
Example 8 (b)
Solution
24
Finite Impulse Response (FIR) system:
When the difference equation contains no previous outputs, ( ๐‘Ž๐‘– coefficients of ๐‘ฆ(๐‘› − ๐‘–) are zero).
Infinite Impulse Response (IIR) system:
When the difference equation contains previous outputs, ( ๐‘Ž๐‘– coefficients of ๐‘ฆ(๐‘› − ๐‘–) are not all zero).
25
BIBO Stability
BIBO: Bounded In and Bounded Out
A stable system is one for which every bounded input produces a bounded output.
Let, in the worst case, every input value reaches to maximum value M.
Using absolute values of the impulse responses,
26
BIBO Stability
To determine whether a system is stable, we apply the following equation:
27
Example 9
Given a linear system given by:
Which is described by the unit-impulse response:
Determine whether the system is stable or not.
Solution
28
Digital Convolution
A LTI system can be represented using a digital convolution sum. The unit-impulse response โ„Ž(๐‘›) relates the system input and
output. To find the output sequence ๐‘ฆ(๐‘›) for any input sequence ๐‘ฅ(๐‘›), we use the digital convolution:
The sequences are interchangeable.
Convolution sum requires h(n) to be reversed and shifted.
If h(n) is the given sequence, h(-n) is the reversed sequence.
29
Reversed Sequence Example 10
30
Convolution Using Table Method
Example 11 (a)
31
Convolution Using Table Method Example 11 (b)
32
Convolution Properties
the order in which
two signals are
convolved makes no
difference
33
Examples of Convolution
34
Low Pass Filters
(filter's impulse
response)
each sample in the output
signal being a weighted
average of many adjacent
points from the input signal.
removing high-frequency
components
The rectangular pulse is
best at reducing noise
while maintaining edge
sharpness.
The Exponential
is the simplest
recursive filter.
The sinc function is used to
separate one band of
frequencies from another.
35
High Pass Filters
Typical high-pass filter
kernels. These are formed by
subtracting the corresponding
low-pass filter kernels from a
delta function.
The distinguishing
characteristic of high-pass
filter kernels is a spike
surrounded by many
adjacent negative samples.
36
Signal-to-Noise Ratio (SNR)
Signal-to-noise ratio ( SNR) is a measure that compares the level of a desired signal to the level of background
noise.
It is defined as the ratio of signal power to the noise power, often expressed in decibels.
If the variance of the signal and noise are known, and the signal is zero-mean:
Because many signals have a very wide dynamic range, SNRs are often expressed using the logarithmic
decibel scale. In decibels, the SNR is defined as
A logarithmic scale is a nonlinear scale used when
there is a large range of quantities.
37
Signal-to-Noise Ratio (SNR)
The decibel (dB) is a logarithmic unit used to express the ratio between two values of a physical quantity,
often power or intensity.
38
Example 12
Periodicity
Consider the following continuous signal for the current
which is sampled at 12.5 ms. Will the resulting discrete signal be periodic?
39
Download