EE 324 Digital Signal Processing Chapter 01 INTRODUCTION Prof. Tarek I Haweel Professor, Department of Electrical Engineering, Majmaah University Email: t.haweel@mu.edu.sa Signals and Signal Processing • Signals play an important role in our daily life. • A signal is a function of independent variables such as – – – – – TIME, DISTANCE, POSITION, TEMPERATURE, and PRESSURE. • Some Examples of Signals are shown next. 1 Examples of Typical Signals (1/10) • Speech and Music Signals – Represent AIR PRESSURE as function of TIME at a point in space. • Waveform of a speech signal “I like Digital Signal Processing” is shown below: 2 Examples of Typical Signals (2/10) • Electrocardiography (ECG) Signal – Represent the ELECTRICAL ACTIVITY of the heart. • A typical ECG signal is shown below: 3 Examples of Typical Signals (3/10) • The ECG trace is a periodic waveform • One period of the waveform shown below represents 4 Examples of Typical Signals (4/10) • Electroencephalogram (EEG) Signals: – Represent the electrical activity caused by the random firing of billions of neurons in the brain 5 Examples of Typical Signals (5/10) • Seismic Signals: – Caused by the movements of ROCKS resulting from an earthquake, o volcanic eruption or an underground explosion. • The ground movement generates three types of elastic waves that propagate through the body of earth in all directions from the source of movement. 6 Examples of Typical Signals (6/10) • Typical Seismograph record: – Vertical Ground Velocity 7 Examples of Typical Signals (7/10) • Typical Seismograph record: – North Ground Velocity 8 Examples of Typical Signals (8/10) • Typical Seismograph record: – East Ground Velocity 9 Examples of Typical Signals (9/10) • Black and White Picture – Represents light intensity as function of two spatial coordinates 10 Examples of Typical Signals (10/10) • Video Signal – Consists of a sequence of images, called frames, and is function of three variables: Two spatial coordinates and TIME 11 Signals and Signal Processing 12 • Most signals we encounter, are generated naturally. – However, a signal can also be generated synthetically or by computer • A signal carries information. • Objective of signal processing: – Extract the useful information carried by the signal • Method of information extraction: – Depends on the type of the signal and the nature of the information carried by the signal • This course is concerned with the discretetime representation of signals and their discrete-time processing Signal Classification (1/6) 13 • Deterministic Signals – A deterministic signal can be uniquely described by an explicit mathematical expression, a table of data, or a well defined rule. – Here all past, present and future values of the signal are known precisely, without any uncertainty • Random Signals – The signals whose time evolution can not be predicted, are said to be random in nature, e.g., noise generated by seismic signal, speech signals, etc. – Random signals are characterized by their statistical parameters: • Mean, standard deviation, variance, etc. Signal Classification (2/6) 14 • Multichannel Signals – A signal generated by more than one sources or sensors – An ECG signal obtained through 3-leads or 12-leads would result in a 3-channel or 12-channel signal. – Multichannel signals are represented in vector form, e.g., in 3-lead case: s1 (t ) s (t ) s2 (t ) s3 (t ) Signal Classification (3/6) 15 • Multidimensional Signals – A signal whose values depends on more than one independent variables. – A still Black & White image is a 2-dimentional signal, as each pixel value depends on two spatial coordinates; horizontal and vertical position and can be expressed as I (x, y). – A Black & White TV picture can be mathematically written as I (x, y, t). Thus brightness or image intensity, for a particular spatial coordinates, varies with time 3-dimensional signal Signal Classification (4/6) 16 • Color TV Signal: – The picture can be described by three intensity functions, corresponding to the strength of three principle colors: RED, GREEN and BLUE, as Ir (x, y, t), Ig (x, y, t), Ib (x, y, t) – Thus color TV picture is an example of 3-channel, 3dimensional signal and can be mathematically expressed as: I r ( x, y , t ) I ( x, y , t ) I g ( x, y , t ) I b ( x, y, t ) Signal Classification (5/6) Analog or Continuous Time Signal Sampling at discrete intervals Discrete-time or Sampled Signal Quantize the signals’ values to a set of discrete values Digital Signal 17 Signal Classification (6/6) 18 Typical Signal Processing Applications • Most signal processing operations in case of analog signals are carried out in the timedomain. • In case of discrete-time signals, both timedomain or frequency-domain operations are usually employed. 19 Elementary Time Domain Operations • Amplitude Scaling – Amplification – Attenuation • Time Shift – Delayed – Advance • Time Scaling – Stretching – Compressing • Addition / Multiplication • Integration / Differentiation 20 Filtering (1/9) • Filtering is one of the most widely used complex signal processing operations • The system implementing this operation is called FILTER • A filter PASSES certain frequency components without any distortion and BLOCKS other frequency components completely – The range of frequencies that is allowed to PASS is called the PASSBAND of the filter and – the range of frequencies that is BLOCKED is called the STOPBAND of the filter 21 22 Filtering (2/9) • The filtering operation for linear analog filter is described by the convolution integral y (t ) h(t ) x( )d • Where x(t) is input signal, y(t) is the output of the filter, and h(t) is the impulse response of the filter. Filtering (3/9) • Lowpass Filter – Passes all low-frequency components below a certain frequency fc, called the cutoff frequency, and blocks all high-frequency components above fc. • Highpass Filter – Passes all high-frequency components above a certain cutoff frequency fc, and blocks all highfrequency components below fc. 23 Filtering (4/9) • Bandpass Filter – Passes all frequency components between two cutoff frequencies fc1 and fc2 where fc1< fc2, and blocks all frequency components below the frequency fc1 and above the frequency fc2. • Bandstop Filter – Blocks all frequency components between two cutoff frequencies fc1 and fc2 where fc1< fc2, and passes all frequency components below the frequency fc1 and above the frequency fc2. 24 Filtering (5/9) There are various other types of filters: • A filter blocking a single frequency components is called NOTCH filter • A MULTIBAND filter has more than one stopband and more than one passband • A COMB filter blocks all frequencies that are integral multiple of a certain low frequency 25 Filtering (6/9) • In many applications the desired signal occupies a low frequency band from dc to fL Hz, and gets corrupted by a high frequency NIOSE with frequency components above fH Hz where fL < fH. • In such cases the desired signal can be recovered from the noise-corrupted signal by passing the later through a lowpass filter with a cutoff frequency fC, where fL < fC < fH. 26 Filtering (7/9) • A common source of noise is power lines radiating electric and magnetic fields • The noise generated by the power lines appears a 60 Hz sinusoidal signal corrupting the desired signal and can be removed by passing the corrupted signal through a NOTCH filter with NOTCH FREQUENCY at 60 Hz. 27 Filtering (8/9) • Consider an input signal consisting of three sinusoidal components of frequencies 50 Hz, 110 Hz, and 210 Hz 28 Filtering (9/9) • Output of different filters: 29 Modulation and Demodulation (1/2) • For efficient transmission of a lowfrequency signal over a channel, it is necessary to transform the signal to a highfrequency signal by means of a MODULATION operation. • At the receiving end the modulated highfrequency is DEMODULATED to extract/recover the desired low-frequency signal. 30 Modulation and Demodulation (2/2) • There are 4 types of modulation of analog signals: • Amplitude Modulation • Frequency Modulation • Phase Modulation • Pulse Amplitude Modulation 31 Why Digital Signal Processing (1/3) 32 • Guaranteed Accuracy – The accuracy is determined by yhe number of bits used • Perfect Reproducibility – Identical performance from unit to unit is obtained, since there are no variations due to component tolerances, e.g., using DSP techniques, a digital recording can be copied or reproduced several times without any degradation in the signal quality. • No drift in performance with temperature or age. Why Digital Signal Processing (2/3) • Advanced Semiconductor Technology – – – – – Greater reliability Smaller Size Low Cost Low Power Consumption High Speed • Greater Flexibility – DSP systems can be programmed and reprogrammed to perform a variety of functions, without modifying the hardware perhaps the most important feature of DSP. 33 Why Digital Signal Processing (3/3) • Superior Performance – DSP can be used to performed functions not possible with analog signal processing, e.g. Complex adaptive filtering algorithms can be implemented with DSP techniques • In some cases, the information may already be in digital form and DSP offers the only viable solution • DSP is not without disadvantages; e.g., – Cost and Speed – Design Time – Finite Word Length Effects But the significance of these disadvantages is being continuously diminished by the new technology. 34 Digital Processing of Analog Signals In this course we are concerned with discrete-time signal processing 35 Overview of DSP Applications (1/3) • Cellular/Mobile Telephony – – – – Speech and Channel Coding Voice and data processing Power Management Multipath equalization and Echo Cancellation • Digital Audio – Stereo and Surround sound – Audio equalization and Mixing – Electronic music • Automotive – Digital Audio – Digital Radio – Personal Communication System – Noise Reduction (Engine) 36 Overview of DSP Applications (2/3) • Personal Computer – – – – – Sound cards Data Storage and retriveal Multimedia Modems Internet phones, music and video • Medical Electronics – – – – Critical/intensive care monitors Digital X-rays Medical Imaging – CT Scans, MRI, Ultrasound ECG/EEG Recording and analysis • Digital Telephone – DTMF generation and detection – Topless answering machines – Speech Synthesizer 37 Overview of DSP Applications (3/3) • Military – Radar – Sonar – Secure Communication • Industrial – Oil and mineral processing – Process monitoring and control – NDT – Non destructive testing • Scientific – – – – Earthquake recording and analsysi Data acquisition Spectral analysis Simulation and recording 38 DSP and Other Areas 39 • DSP is very interdisciplinary, relying on the technical work in many adjacent fields. The borders between DSP and other technical disciplines are not sharp and well defined, but rather fuzzy and overlapping. If you want to specialize in DSP, these are the allied areas you will also need to study. Audio Applications of DSP (1/6) 40 1. DIGITAL AUDIO MIXING – The audio mixing system is a prime example of where DSP has been successfully employed to improve the audio quality and enhance its functionality. – A digital audio system includes facilities for • Audio equalization (EQs) • Audio Mixing & • Post-mix Processing, as shown below Audio Input Signals 1 1 . Pre-mix . Processing . (EQ’s Control) 32 . . . 32 1 . Mix Matrix . (32 x 16) . 16 Post-mix 1 Processing Processed Audio Outputs Post-mix 16 Processing Audio Applications of DSP (2/6) 1. DIGITAL AUDIO MIXING – The digital Audio Equalizer (EQ) is a set of digital filters, with adjustable characteristics, that is used to manipulate parts of frequency bands of the audio inputs to achieve the desired sound. – The equalized audio signals are then mixed by using a mix matrix facility which allows any and every audio input to be mixed to every output – The post-mix processing includes adding artificial echo's and reverberation to simulate actual listening environments, e.g., concert halls 41 Audio Applications of DSP (3/6) 2. SPEECH SYNTHESIS – The advances in semiconductor technology and DSP have made it possible to obtain a speech quality that is indistinguishable from human speech. – SPEAK-n-SPELL: It is an example of a successful commercial product with speech output. It is an electronic learning aid for children and uses, LPC (Linear Predictive Coding) technique. – In LPC, the actual human speech, to be produced later, is modeled as the response of a time varying digital filter to a periodic or a random excitation signal. 42 43 Audio Applications of DSP (4/6) 2. SPEECH SYNTHESIS – The periodic excitation is used for voiced sounds (e.g. vowels) and represents the air flow through the vocal cords as they vibrate. – The random excitation is used for unvoiced sounds (e.g. s, sh), and represents the noise created by forcing air past constrictions in the vocal tract. – The filter models the behavior of the vocal tract. Random Excitation Digital Filter Pitch Information Periodic Excitation Vocal Tract Filter Parameters Synthetic Speech Audio Applications of DSP (5/6) 44 3. SPEECH RECOGNITION – Voice recognition involves inputting of information into a computer using human voice, and the computer listening and recognizing the human speech – Training MODE: The user trains the system to recognize his or her voice by speaking each word to be recognized. • The system digitizes and creates a template for each word to be recognized, and stores this in its memory. – Recognition MODE: Each spoken word is digitized, its template compared with the stored template. • If a match occurs, a pre-defined action is taken. Audio Applications of DSP (6/6) 45 4. THE COMPACT DISC (CD) DITIGAL AUDIO SYSTEM – In the CD, the information is recorded in the digital form as spiral tracks that consists of a succession of pits. Each bit recorded on the CD occupies an area of 1 mic.meter.sq, that is 106 bits/mm2 Very high density of information on the CD. Telecommunication Applications of DSP (1/3) 1. MOBILE COMMUNICATION – Mobile cellular radio telephony systems, such as GSM employ digital technology, and so DSP is the natural choice for processing and conveying information. – In mobile radio telephony, DSP finds use in • • • • • • Speech Coding Multipath Equalization Signal Strength and Qualioty Measurement Voice Messaging Error Control Coding Modulation / Demodulation 46 Telecommunication Applications of DSP (2/3) 47 2. DIGITAL TV RECEPTION – Digital TV broadcasting promises a great deal to consumer: • INTERACTIVITY: play games, access internet, shop, etc. • MORE CHOICE: have instant replays, e.g., • BETTER SOUND AND PICTURE QUALITY – The heart of digital TV is MPEG coding algorithms which are used to compress video/audio information before transmission (to make good use of bandwidth) – Most existing TV sets in our homes can only receive analog transmission, and so require a digital recorder to receive digital TV. Telecommunication Applications of DSP (3/3) 3. ADAPTIVE TELEPHONE ECHO CANCELLATION – In long-distance telephone circuit, a 2-wire local loop is connected to a 4-wire trunk lines using a hybrid. – Due to impedance mismatching at hybrid, echos are generated in a 4-wire loop. – The solution is an echo canceller, which is based on ADAPTIVE FILTERING. 48 Biomedical Applications of DSP (1/4) 49 1. MEDICAL IMAGING – Before DSP the medical X-ray imaging was limited by four problems: 1. Overlapping structures in the body can hide behind each other, e.g., the portion of heart might not be visible behind the ribs. 2. It is not always possible to distinguish between similar tissues, e.g., it may be able to separate bones from soft tissues, but not distinguish a tumor from liver 3. X-ray images show anatomy, the body’s structure, and not physiology, the body’s operation The X-ray image of a living person and looks exactly like the X-ray image of a dead one 4. X-ray exposure can cause cancer, requiring it to be used sparingly and only with proper justification. Biomedical Applications of DSP (2/4) 50 1. MEDICAL IMAGING – Computer Tomography (CT Scan) • In computer Tomography X-rays from many directions are passed through a section of the patient’s body, being examined. • The signals are converted into digital data and stored in a computer. • The information is then used to calculate images that appear to be slices through the body. The images show much greater detail allowing significantly better diagnosis and treatment. Biomedical Applications of DSP (3/4) 51 1. MEDICAL IMAGING The last three x-ray problems have been solved by using penetrating energy other than x-rays, such as radio and sound waves. – Magnetic Resonance Imaging (MRI) • The MRI uses magnetic fields in conjunction with radio waves to probe the interior of the human body. • Properly adjusting the strength and frequency of the fields cause the atomic nuclei in a localized region of the body to resonate between quantum energy states. This resonance results in the emission of a secondary radio wave, detected with an antenna placed near the body. Biomedical Applications of DSP (4/4) 52 1. MEDICAL IMAGING – Magnetic Resonance Imaging (MRI) • • The strength and other characteristics of this detected signal provide information about the localized region in resonance. This information is usually presented as images, just as in computed tomography. Besides providing excellent discrimination between different types of soft tissue, MRI can provide information about physiology, such as blood flow through arteries. MRI relies totally on Digital Signal Processing techniques, and could not be implemented without them. 2. FETAL ECG ANALYSIS – To measure the heart-beat rate of fetus in mother’s womb, DSP is used to remove the strong interference caused by mother’s heartbeat.