Sei sulla pagina 1di 33

DSP Overview

Ing. Guillermo Evangelista Adrianzn


gevangelistaa@upao.edu.pe
DIGITAL SIGNAL PROCESSING
In this modern world we are surrounded by all kinds of signals in various forms. Some of the signals
are natural, but most of the signals are manmade. Some signals are necessary (speech), some are
pleasant (music), while many are unwanted or unnecessary in a given situation. In an engineering
context, signals are carriers of information, both useful and unwanted. Therefore extracting or
enhancing the useful information from a mix of conflicting information is a simplest form of signal
processing. More generally, signal processing is an operation designed for extracting, enhancing,
storing, and transmitting useful information. The distinction between useful and unwanted
information is often subjective as well as objective. Hence signal processing tends to be application
dependent.
HOW ARE SIGNALS PROCESSED?
The signals that we encounter in practice are mostly analog signals. These signals, which vary
continuously in time and amplitude, are processed using electrical networks containing active and
passive circuit elements.
This approach is known as analog signal processing (ASP)-for example, radio and television
receivers.

Figure N 1. Analog Signal Processor.
HOW ARE SIGNALS PROCESSED?
They can also be processed using digital hardware containing adders, multipliers, and logic elements or
using special-purpose microprocessors.
However, one needs to convert analog signals into a form suitable for digital hardware. This form of
the signal is called a digital signal.
It takes one of the finite number of values at specific instances in time, and hence it can be represented
by binary numbers, or bits. The processing of digital signals is called DSP.
HOW ARE SIGNALS PROCESSED?
PrF: This is a prefilter or an antialiasing filter, which conditions the analog signal to prevent aliasing. ADC: This
is called an analog-to-digital converter, which produces a stream of binary numbers from analog signals. Digital
signal processor: This is the heart of DSP and can represent a general-purpose computer or a special-purpose
processor, or digital hardware, and so on. DAC: This is the inverse operation to the ADC, called a digital-to-
analog converter, which produces a staircase waveform from a sequence of binary numbers, a first step towards
producing an analog signal. PoF: This is a postfilter to smooth out staircase waveform into the desired analog
signal.
Figure N 2. Equivalent Analog Signal Processor.
ADVANTAGES OF DSP OVER ASP
Some important advantages of DSP are these:
1. Systems using the DSP approach can be developed using software running on a general-purpose
computer. Therefore DSP is relatively convenient to develop and test, and the software is
portable.
2. DSP operations are based solely on additions and multiplications, leading to extremely stable
processing capabilityfor example, stability independent of temperature.
3. DSP operations can easily be modified in real time, often by simple programming changes, or by
reloading of registers.
ADVANTAGES OF DSP OVER ASP
Some important advantages of DSP are these:
4. DSP has lower cost due to VLSI technology, which reduces costs of memories, gates,
microprocessors, and so forth.
The principal disadvantage of DSP is the limited speed of operations limited by the DSP hardware,
especially at very high frequencies. Primarily because of its advantages, DSP is now becoming a first
choice in many technologies and applications, such as consumer electronics, communications,
wireless telephones, and medical imaging.
TWO IMPORTANT CATEGORIES OF DSP
Some important advantages of DSP are these:
Most DSP operations can be categorized as being either signal analysis tasks or signal filtering tasks:
Figure N 3. DSP operations.
TWO IMPORTANT CATEGORIES OF DSP
Signal analysis This task deals with the measurement of signal properties. It is generally a frequency-
domain operation. Some of its applications are:
Spectrum (frecuency and/or phase) analysis
Speech recognition
Speaker verification
Target detection.
TWO IMPORTANT CATEGORIES OF DSP
Signal filtering This task is characterized by the signal-in signal-out situation. The systems that
perform this task are generally called filters. It is usually (but not always) a time-domain operation.
Some of the applications are:
Removal of unwanted background noise
Removal of interference
Separation of frequency bands
Shaping of the signal spectrum.
In some applications, such as voice synthesis, a
signal is first analyzed to study its characteristics,
which are then used in digital filtering to generate
a synthetic voice.
Signals and Sequences
Ing. Guillermo Evangelista Adrianzn
gevangelistaa@upao.edu.pe

SIGNALS AND CLASSIFICATION OF SIGNALS
A signal is a function representing a physical quantity or variable, and typically it contains
information about the behavior or nature of the phenomenon. For instance, in a RC circuit the
signal may represent the voltage across the capacitor or the current flowing in the resistor.
Mathematically, a signal is represented as a function of an independent variable t. Usually t
represents time. Thus, a signal is denoted by x(t).
SIGNALS AND CLASSIFICATION OF SIGNALS
A. Continuous-Time and Discrete-Time Signals:
A signal x(t) is a continuous-timesignal if t is a continuous variable. If t is a discrete variable, that is,
x(t) is defined at discrete times, then x(t) is a discrete-time signal. Since a discrete-time signal is
defined at discrete times, a discrete-time signal is often identified as a sequence of numbers, denoted
by {x} or x[n], where n = integer.
SIGNALS AND CLASSIFICATION OF SIGNALS
B. Analog and Digital Signals:
If a continuous-time signal x(t) can take on any value in the continuous interval (a, b), where a may
be - and b may be +, then the continuous-time signal x(t) is called an analog signal. If a discrete-
time signal x[n] can take on only a finite number of distinct values, then we call this signal a digital
signal.
C. Real and Complex Signals:
A signal x(t) is a real signal if its value is a real number, and a signal x(t) is a complex signal if its
value is a complex number.
SIGNALS AND CLASSIFICATION OF SIGNALS
D. Deterministic and Random Signals:
Deterministic signals are those signals whose values are completely specified for any given time.
Thus, a deterministic signal can be modeled by a known function of time t. Randomsignals are those
signals that take random values at any given time and must be characterized statistically.
E. Even and Odd Signals:
A signal x(t) or x[n] is referred to as an even signal if x(-t) = x(n) or x[-n] = x[n]
A signal x(t) or x[n] is referred to as an odd signal if x(-t) = -x(t) or x[-n] = -x[n]
SIGNALS AND CLASSIFICATION OF SIGNALS
F. Periodic and Nonperiodic Signals:
A continuous-time signal x(t) is said to be periodic with period T if there is a positive nonzero value
of T for which + = .
Periodic discrete-time signals are defined analogously. A sequence (discrete-time signal) x[n] is
periodic with period N if there is a positive integer N for which + = .
Any sequence which is not periodic is called a nonperiodic (or aperiodic) sequence.
SIGNALS AND CLASSIFICATION OF SIGNALS
G. Energy and Power Signals:
1. x(t) (or x[n]) is said to be an energy signal (or sequence) if and only if 0<E<m, and so P=0.
2. x(t) (or x[n]) is said to be a power signal (or sequence) if and only if 0<P<m, thus implying that
E=.
3. Signals that satisfy neither property are referred to as neither energy signals nor power signals.
Note that a periodic signal is a power signal if its energy content per period is finite, and then the
average power of this signal need only be calculated over a period.
BASIC SIGNALS
1. The Unit I mpulse:
The unit impulse function , also known as the Heaviside unit function, is defined as:
=
, = 0
0, 0

On the other hand, the unit impulse sequence is defined as:
=
1, = 0
0, 0

BASIC SIGNALS
2. The Unit Step:
The unit step function , also known as the Dirac Delta function, is defined as:
=
1, > 0
0, < 0

On the other hand, the unit step sequence is defined as:
=
1, 0
0, < 0

BASIC SIGNALS
3. Ramp:
The ramp function is defined as:
=
, > 0
0, < 0

On the other hand, the ramp sequence is:
=
, 0
0, < 0

BASIC SIGNALS
4. Real Exponential:
The real exponential function

is defined as:
=

,

On the other hand, the real exponential sequence

is:
=

, ;
BASIC SIGNALS
5. Complex Exponential:
The complex exponential function
+
0

is defined as:
=
+
0



On the other hand, the complex exponential sequence
+
0

is:
=
+
0

,
BASIC SIGNALS
6. Sinusoidal:
The sinusoidal function sin
0
+ is defined as:
= cos
0
+

On the other hand, the sinusoidal sequence sin
0
+ is:
= cos
0
+ ,
OPERATIONS ON SEQUENCES
A. Signal adition:
This is a sample-by-sample addition given by:

1
+
2
=
1
+
2

B. Signal multiplication:
This is a sample-by-sample (or dot) multiplication) given by.

1

2
=
1

2


OPERATIONS ON SEQUENCES
C. Scaling:
In this operation each sample is multiplied by a scalar .
=
D. Shifting:
In this operation, each sample of is shifted by an amount to obtain a shifted sequence .
=
+ = , =
OPERATIONS ON SEQUENCES
E. Folding:
In this operation each sample of is flipped around = 0 to obtain a folded sequence .
=
F. Sample summation:
It adds all sample values of between
1
and
2
. This differs from signal addition operation.
=
1
++
2

2
=
1

OPERATIONS ON SEQUENCES
G. Sample products:
It multiplies all sample values of between
1
and
2
. This differs from signal multiplication.
=
1

2

1

H. Signal Energy:
The energy of a sequence is given by:


OPERATIONS ON SEQUENCES
I . Signal Power:
The average power of a periodic sequence with fundamental period is given by:

=
1


2
1
0

Time-based Applications
Ing. Guillermo Evangelista Adrianzn
gevangelistaa@upao.edu.pe
PICTURE RESIZER
>> xilinx=imread('C:\Users\Guillermo\Desktop\Xilinx Spartan.jpg');
>> imshow(xilinx);
function [picout] = picresize(picin,rows,cols)

l=size(picin)
Fr=l(1)/rows;
Fc=l(2)/cols;

for k=1:l(3)
for j=1:cols
for i=1:rows
picout(i,j,k)=picin(fix(i*Fr),fix(j*Fc),k);
end
end
end

subplot(2,1,1), imshow(picin); title('Original Picture')
subplot(2,1,2), imshow(picout); title('Resized Picture')

end
picout = picresize(xilinx,600,1000);
1
2
3
VOICE SAMPLING
1
T=1.5; %Time in seconds
recObj = audiorecorder(8000,8,1); %Sampling rate, #Bits, Mode(mono)

disp('Start to talk!')
recordblocking(recObj,T); %Record T seconds
disp('End of recording.');

play(recObj); %Play after recording
myData = getaudiodata(recObj); %Storing data
plot(myData,'r'), grid; %Plot the waveform

VOICE SAMPLING
2
function [sData] = shortData(Data,samples)

l=length(Data);
F=l/samples;

for i=1:samples
sData(i)=Data(fix(i*F));
end
%sData=sData'

subplot(2,1,1), plot(Data,'r'); grid,
title('Original Signal')
subplot(2,1,2), plot(sData); grid,
title('Processed Signal')

end
function [pData] = playData(data,Fs)

tic

pData = audioplayer(data,Fs,8);
%play(pData);
playblocking(pData);

toc

end
3
pData=playData(sData,4000)
4
5
sData=shortData(myData,6000);
VOICE SAMPLING

Potrebbero piacerti anche