33
DSP Overview Ing. Guillermo Evangelista Adrianzén [email protected]

Primera Unidad - Teoría

Embed Size (px)

Citation preview

DSP OverviewIng. Guillermo Evangelista [email protected] SIGNAL PROCESSINGIn 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 ASPSome important advantages of DSP are these: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.DSP operations are based solely on additions and multiplications, leading to extremely stable processing capabilityfor example, stability independent of temperature.DSP operations can easily be modified in real time, often by simple programming changes, or by reloading of registers.ADVANTAGES OF DSP OVER ASPSome important advantages of DSP are these: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 DSPSome 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 DSPSignal 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) analysisSpeech recognitionSpeaker verificationTarget detection.TWO IMPORTANT CATEGORIES OF DSPSignal 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 noiseRemoval of interferenceSeparation of frequency bandsShaping 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 SequencesIng. Guillermo Evangelista [email protected]

11SIGNALS AND CLASSIFICATION OF SIGNALSA 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 SIGNALSContinuous-Time and Discrete-Time Signals:A signal x(t) is a continuous-time signal 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 SIGNALSAnalog 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.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 SIGNALSDeterministic 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. Random signals are those signals that take random values at any given time and must be characterized statistically.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 SIGNALSSIGNALS AND CLASSIFICATION OF SIGNALSEnergy and Power Signals:x(t) (or x[n]) is said to be an energy signal (or sequence) if and only if 0 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 endend subplot(2,1,1), imshow(picin); title('Original Picture')subplot(2,1,2), imshow(picout); title('Resized Picture') endpicout = picresize(xilinx,600,1000);123VOICE SAMPLING1T=1.5; %Time in secondsrecObj = audiorecorder(8000,8,1); %Sampling rate, #Bits, Mode(mono)

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

play(recObj); %Play after recordingmyData = getaudiodata(recObj); %Storing dataplot(myData,'r'), grid; %Plot the waveform

VOICE SAMPLING2function [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') endfunction [pData] = playData(data,Fs)

tic

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

toc

end3pData=playData(sData,4000)45sData=shortData(myData,6000);VOICE SAMPLING