Você está na página 1de 66

Digital Signal Processing

Lecture-1
Overview

• Signal
• Continuous or analog signals
• Discrete-time signals
• Causal signals
• Deterministic and Random signals
• Digital Functions (Impulse, Step, Ramp, Power, Exponential, Sine)
• Notation for Digital Signals
• Composite Functions
• Two-Dimensional Digital Signals
• Linear, Time-Invariant (LTI), Causal Systems
Signal
• A signal is a physical quantity, or quality, which conveys
information
• The variation of the signal value as a function of the
independent variable is called a waveform
• The independent variable often represents time
• We define a signal as a function of one independent variable
that contains information about the behavior or nature of a
phenomenon
• We assume that the independent variable is time even in
cases where the independent variable is a physical quantity
other than time
Continuous or Analog Signals
• Continuous signal is a signal that exists at every instant of time

• A continuous signal is often referred to as continuous time (CT)


or analog

• The independent variable is a continuous variable

• Continuous signal can assume any value over a continuous


range of numbers
Continuous or Analog Signals
• Most of the signals in the physical world are CT signals.

• Examples: voltage & current, pressure, temperature, velocity,


etc.
Discrete-Time Signals
• A signal defined only for discrete values of time is called a
discrete-time (DT) signal or simply a discrete signal

• Discrete signal can be obtained by taking samples of an analog


signal at discrete instants of time

• Digital signal is a discrete-time signal whose values are


represented by digits
Discrete-Time Signals
• Figure (a): CT Signal
• Figure (b): DT Signal

• Examples of DT signals in nature:


• Number of students in a class
• Population of the nth generation of certain species
Deterministic and Random
Signal
• Signal that can be described by an explicit mathematical form
is deterministic

• Periodic signal consists of a basic shape of finite duration that


is replicated infinitely

• Signal that cannot be described in an explicit mathematical


form is called random, also known as nondeterministic or
stochastic
Digital Functions
The basic digital functions (signal or sequence) are

• Unit Impulse Function


• Unit Step Function
• Unit Ramp Function
• Power Function
• Exponential Function
• Sine Function

9
Unit Impulse Function
The unit impulse function or unit sample sequence is defined as
the sequence with values
Unit Impulse Function
The unit impulse function δ[n] has an amplitude of zero at all
samples except n = 0, where it has the value 1.

Every digital signal can be written as a sum of impulse functions,


using the amplitude at each sample.
Unit Impulse Function
Example: Determine the following:
a) δ[0]
b) δ[3]
c) δ[-2]

Answers

a) δ[0] = 1

b) δ[3] = 0

c) δ[-2] = 0
Scaled Unit Impulse Function
Example: Draw the following signal:

x[n] = 4δ[n]
Scaled Unit Impulse Function
Example: Draw the following signal:

x[n] = -2δ[n]
Shifted Unit Impulse Function
Example: Draw the following signals:

a) x[n] = δ[n - 2]

b) x[n] = δ[n + 2]
Shifted Unit Impulse Function
Example: Draw the following signal:

x[n] = δ[n - 3]
Unit Impulse Function
Example: write a function to describe the signal in the figure.

x[n] = δ[n] + δ[n-1] + δ[n-2] + δ[n-3] + δ[n-4]

17
Unit Impulse Function
Example: write a function to describe the signal in the figure.

x[n] = 4δ[n] - 2δ[n-1] + 3δ[n-2] - δ[n-3]

18
Unit Impulse Function

1, k  0
k  
0, k  0
Matlab Code
Unit impulse sequence
k1 = -5;
k2 = 10; 1
k = k1:k2;
0.8
x = (k==0); k
0.6

stem(k, x) 0.4

xlabel('k') 0.2
ylabel('\delta_k')
title('Unit impulse sequence') 0
axis([k1 k2 -0.1 1.1]) -5 0 5 10
k
Unit Step Function
The unit step function or unit step sequence is defined as the
sequence with values
Unit Step Function
The unit step function u[n] has an amplitude of zero for n < 0
and an amplitude of one for all other samples.

The signal u[-n] has the value one up to and including n = 0, and
the value zero thereafter.
Unit Step Function
Example: Determine the values of the following
a) u[-1], b) u[0], c) u[1]

Answers

a) u[-1] = 0
b) u[0] = 1
c) u[1] = 1
Scaled Unit Step Function
Example: Draw the signal x[n] = 3u[n]
Shifted Unit Step Function
Example: Draw the signal x[n] = u[n - 2], and x[n] = u[n + 2]
Unit Step Function
Example: Draw the signal x[n] = u[-n]
Unit Step Function
Example: Draw the signal x[n] = u[n - 3]
Unit Step Function
Example: Draw the signal x[n] = u[3 - n]
Unit Step Function
Example: Draw the signal
x[n] = u[n] + 2u[n - 2]
Unit Step Function
Example: Draw the signal
x[n] = u[n] - u[n - 3]
Unit Step Function
Example: A digital signal is described as x[n] = 4(u[n] - u[n - 1]).
Write the function that describes x[n-3].

Answer

Substituting n = (n – 3) gives

x[n-3] = 4(u[n-3] - u[n - 4])


Unit Step Function

1, k  0
uk  
0, k  0
Matlab Code
Unit step sequence
k1 = -5;
1
k2 = 10;
k = k1:k2; 0.8

x = (k>=0); 0.6
uk

stem(k, x) 0.4

xlabel('k') 0.2
ylabel('u_k')
0
title('Unit step sequence')
axis([k1 k2 -0.1 1.1]) -5 0 5 10
k
Unit Ramp Function

• The unit-ramp function is defined as

32
Power Function
• Power functions take the form:
x[n] = Aα βn
• In the special case where α = e, such functions are called
exponential functions.
• When β is positive, the function grows.
• When β is negative the function decays.
• When α is negative, the signal samples alternate positive and
negative.
• The value of A is determine the magnitude/amplitude/value
of the function when n = 0

33
Power Function
• Example: Draw a signal x[n] = (-0.6)n

34
Exponential Function
• Exponential functions take the form:

x[n] = Ae βn

• Where e = 2.71828
• When β is positive, the function grows.
• When β is negative the function decays.
• When α is negative, the signal samples alternate positive and
negative.
• The value of A is determine the magnitude/amplitude/value
of the function when n = 0

35
Exponential Function
• Example: Draw a signal x[n] = e-0.5n

36
Complex Exponential Function
• A digital signal of the form

x[n] = Aejβn

is called a complex exponential function.

• For all n, samples of this signal lie in the complex plane on a


circle with radius A.

• By Euler’s identity, a complex exponential may be expressed


as a rectangular-form complex number
eβn= cosβn + jsinβn
37
Sinusoidal Sequence
The sinusoidal functions take the form

x[n] = Asin(nW + q) or x[n] = Acos(nW + q) for all n with real A.

where W is a digital frequency in radians and q is a phase shift.


Sinusoidal Sequence
Example: plot of x[n] = 3sin(nπ/8)
Phase Shifting a Digital Sinusoid
Example: Plot the following signals

x1[n] = sin(n2π/9)

x2[n] = sin(n2π/9 - 3π/5)

40
Periodicity of Digital Sinusoidal Sequence

• Compared to analog counterpart, digital sine and cosine signals


are not always periodic sequences.

• These functions are periodic only when 2p/W is a ratio of


integers N/M.

• When 2p/W = N/M, N is the number of samples in the digital


period, and M is the number of analog cycles that elapse while N
samples are collected.

• An analog frequency f in Hz is related to its corresponding digital


frequency W in radians through the equation
Periodicity of Digital Sinusoidal Sequence

Example: Repeating and non-repeating digital sinusoids.


Periodicity of Digital Sinusoidal Sequence

Example: A digital signal is defined as x[n] = cos(2n)


• Is this a digital sequence periodic?
• Find the first eight elements in the sequence.

Solution
W  2,
2p/W = π, this number is irrational and cannot be expressed in term of ratio of two
integers. Therefore this digital sequence is not periodic.
Periodicity of Digital Sinusoidal Sequence

Example: A digital signal is defined as x[n] = cos(n4π/5)


• Is this a digital sequence periodic?
• Find the first eight elements in the sequence.

Solution
W  4π/5,
2p/W = 5/2, this number is rational and can be expressed in term of ratio of two
integers N/M. Therefore this digital sequence is periodic. Where N = 5 means
sequence repeats every 5 samples, and M = 2 means these 5 samples are
collected over 2 complete cycles of the analog signal being sampled.
Notation for Digital Signals
• A stream of digital codes is presented to a digital signal processor
for processing.

• It is not convenient, however, to represent a digital signal using


these codes.

• Instead, it is more helpful to represent it using the quantization


levels for each sample.

• A digital signal x is given the notation x[n] to indicate that it has


values only where samples are taken.

• The integer n marks the number of the sample, taken at the time t
= nTS, where TS is the sampling interval.
45
Notation for Digital Signals
• A digital signal x[n] may be modified by time shifts and
resampling.

For Example
• Signal x[n-2], shifts x[n] two steps to the right
• Signal x[n+3], shifts x[n] three steps to the left
• Signal x[2n], selects every other sample from x[n]
• Signal x[3n], selects every third sample
46
Notation for Digital Signals
Example: Find the Following:

a) x[0] = 0.25
b) x[5] = 0.5

47
Notation for Digital Signals
Example: Find the Following:

a) x[0] = 0.25
b) x[5] = 0.5
c) x[n-1]

Signal x[n-1] is found by shifting


the sample values of signal x[n] by
1 steps towards right.

48
Notation for Digital Signals
Example: Find the Following:

a) x[0] = 0.25
b) x[5] = 0.5
c) x[n-1]
d) x[n-2]

Signal x[n-2] is found by shifting


the sample values of signal x[n] by
2 steps towards right.

49
Notation for Digital Signals
Example: Find the Following:

a) x[0] = 0.25
b) x[5] = 0.5
c) x[n-1]
d) x[n-2]
e) x[2n]

Signal x[2n] selects alternate


sample from the signal x[n].

50
Notation for Digital Signals
Example: Find the Following:

a) x[0] = 0.25
b) x[5] = 0.5
c) x[n-1]
d) x[n-2]
e) x[2n]
f) x[3n]
if y(n) = x(2n) then y(n) takes only even
numbered sample. i.e y(0) = x(0), y(1) = x(2),y(2) = x(4), y(3) = x(6)

Signal x[3n] selects every third


sample from the signal x[n].

51
Generation of Digital Signals
Example:

Solution
a)

52
Generation of Digital Signals
b) The first five sample values for part (1) are calculated and
plotted in the Figure.

53
Generation of Digital Signals
b) The first eight sample values for part (2) are calculated and
plotted in the Figure.

54
Linear System

• A linear system is illustrated in the figure.


• The linear system obeys the superposition principle.
• 𝑦1(𝑛) is the system output using an input 𝑥1(𝑛)
• 𝑦2(𝑛) the system output with an input 𝑥2(𝑛)

55
Linear System

• The Linear system output due to the weighted sum inputs


∝𝑥1(𝑛) + 𝛽𝑥2(𝑛) is equal to the same weighted sum of the
individual outputs obtained from their corresponding inputs,
that is, 𝑦(𝑛) = ∝𝑦1(𝑛) + 𝛽𝑦2(𝑛), where ∝ and 𝛽 are constants.

56
Linear System

Example: A digital amplifier is represented by 𝑦(𝑛) = 10𝑥(𝑛), the


input is multiplied by 10 to generate the output.

57
Linear System

58
Linear System

59
Time-Invariant System

A time-invariant system is illustrated in the figure.

60
Time-Invariant System

61
Time-Invariant System

Example: Determine whether the linear system y(𝑛) = 2𝑥(𝑛) − 5


is time invariant.

62
Time-Invariant System

63
Time-Invariant System

Example: Determine whether the linear system y(𝑛) = 2𝑥(3𝑛)


is time invariant.

The system is not time invariant.

64
Causal System

65
Causal System

Example: Determine whether the following systems are causal or not.

Solution

1) Causal
2) Non-causal

66

Você também pode gostar