981 likes | 1.19k Views
SIGNALS AND SYSTEMS AND INTRODUCTION TO DIGITAL SIGNAL PROCESSING. CSE, RU. Dr. Md. Ekramul Hamid Associate Professor Department of Computer Science and Engineering University of Rajshahi. Digital Signal Processing.
E N D
SIGNALS AND SYSTEMSANDINTRODUCTION TO DIGITAL SIGNAL PROCESSING CSE, RU Dr. Md. EkramulHamidAssociate ProfessorDepartment of Computer Science and EngineeringUniversity of Rajshahi
Digital Signal Processing • Signal Processing deals with the enhancement, extraction, and representation of information for communication or analysis • Many different fields of engineering rely upon signal processing technology • Acoustics, telephony, radio, television, seismology, and radar are some examples • Initially, signal processing systems were implemented exclusively with analog hardware • However, recent advances in high-speed digital technology have made discrete signal processing systems more popular. • Digital systems have an advantage over analog systems in that they can process signals with an extraordinary degree of precision • Unlike the resistive and capacitive networks of analog systems, digital systems can be built numerically with the simple operations of addition and multiplication. • Digital Signal Processing is a field of numerical mathematics that is concerned with the processing of discrete signals • This area of mathematics deals with the principles that underlie all digital systems
Applications of DSP: Multimedia • Compression: Fast, efficient, reliable transmission and storage of data • Applied on audio, image and video data for transmission over the Internet, storage • Examples: CDs, DVDs, MP3, MPEG4, JPEG • Mathematical Tools: Fourier Transform, Quantization, Modulation
Applications of DSP: Biological signal • Examples: • Brain signals (EEG) • Cardiac signals (ECG) • Medical images (x-ray, PET, MRI) • Goals: • Detect abnormal activity (heart attack) • Help physicians with diagnosis • Tools: Filtering, Fourier Transform
Applications of DSP: Biometrics • Identifying a person using physiological characteristics • Examples: • Fingerprint Identification • Face Recognition • Voice Recognition
Applications of DSP: Audio Signal processing • Active noise cancellation: Adaptive filtering • Headphones used in cockpits • Digital Audio Effects • Add special music effects such as delay, echo, reverb • Audio signal separation • Separate speech from interference
Main Topics to be Covered: • Signals And Systems – (Prerequisite of DSP) • Linear Time Invariant Systems • Convolution • Correlation
Signals and Systems Defined • A signal is any physical phenomenon which conveys information • Systems respond to signals and produce new signals • Excitation signals are applied at system inputs and response signals are produced at system outputs
Independent Variable • Time is often the independent variablefor a signal. x(t) will be used to representa signal that is a function of time, t. • A temporal signal is defined by the relationship of its amplitude (the dependent variable) to time (the independent variable). • An independent variable can be 1D (time), 2D (space), 3D (space) or even something more complicated. • The signal is described as a function of this variable. • There are many types of functions that can be used to describe signals (continuous, discrete, random).
Analog and Digital Signal • Signals can be analog or digital. • Analog signals can have an infinite number of values in a range. • Digital signals can have only a limited number of values.
Analog or continuous Time Signal • Most of the signals in the physical world are CT signals, since the time scale is infinitesimally fine (e.g., voltage, pressure, temperature, velocity). • Often, the only way we can view these signals is through a transducer, a device that converts a CT signal to an electrical signal. • Common transducers are the ears, the eyes, the nose… but these are a little complicated. • Simpler transducers are voltmeters, microphones, and pressure sensors.
Analog Signal Amplitude Phase Frequency f(x) = 5cos (x) f(x) = 5 cos (x + 3.14) f(x) = 5 cos (3 x + 3.14)
2 Hz 10 Hz Magnitude Magnitude Time Time 2 Hz + 10 Hz + 20Hz 20 Hz Magnitude Magnitude Time Time Signal in Time Domain • The Independent Variable is Time • The Dependent Variable is the Amplitude • Most of the Information is Hidden in the Frequency Content
Analog to Digital Recording Chain ADC Microphone converts acoustic to electrical energy. It’s a transducer. Continuously varying electrical energy is an analog of the sound pressure wave. ADC (Analog to Digital Converter) converts analog to digital electrical signal. Digital signal transmits binary numbers. DAC (Digital to Analog Converter) converts digital signal in computer to analog for your headphones.
ADC: Step1: Sampling Instantaneous amplitudes of continuous analog signal, measured at equally spaced points in time. A series of “snapshots”
Analog to Digital Overview Sampling Rate How often analog signal is measured [samples per second, Hz] Example: 44,100 Hz Sampling Resolution [a.k.a. “sample word length,” “bit depth”]Precision of numbers used for measurement: the more bits, the higher the resolution. Example: 16 bit
Sampling Rate Determines the highest frequency that you can represent with a digital signal. Nyquist Theorem: Sampling rate must be at least twice as high as the highest frequency you want to represent. Capturing just the crest and trough of a sine wave will represent the wave exactly.
Recovery of a sampled sine wave for different sampling rates
A high frequency signal sampled at too low a rate looks like … … a lower frequency signal. Aliasing What happens if sampling rate not high enough? That’s called aliasing or foldover. An ADC has a low-pass anti-aliasing filter to prevent this. Synthesis software can cause aliasing.
Anti-Aliasing Filter An anti-aliasing filter removes frequencies that are higher than half the sampling rate using what is called a low pass filter. A low pass filter lets the low frequencies “pass" and "cut" the high frequencies. Low pass filters are sometimes called high cut filters.
Common Sampling Rates Which rates can represent the range of frequencies audible by (fresh) ears? Most software can handle all these rates.
A/D: Step2: Quantization • Sampling results in a series of pulses of varying amplitude values ranging between two limits: a min and a max. • The amplitude values are infinite between the two limits. • We need to map the infinite amplitude values onto a finite set of known values. • This is achieved by dividing the distance between min and max into Lzones, each of height = (max - min)/L
Quantization Level • The midpoint of each zone is assigned a value from 0 to L-1 (resulting in L values) • Each sample falling in a zone is then approximated to the value of the midpoint.
Assigning Codes to Zones • Each zone is then assigned a binary code. • The number of bits required to encode the zones, or the number of bits per sample as it is commonly referred to, is obtained as follows: nb = log2 L • Given our example, nb = 3 • The 8 zone (or level) codes are therefore: 000, 001, 010, 011, 100, 101, 110, and 111 • Assigning codes to zones: • 000 will refer to zone -20 to -15 • 001 to zone -15 to -10, etc.
7 6 5 4 3 2 1 0 3-bit Quantization A 3-bit binary (base 2) number has 23 = 8 values. Amplitude Time — measure amp. at each tick of sample clock
14 12 10 8 6 4 2 0 4-bit Quantization A 4-bit binary number has 24 = 16 values. Amplitude Time — measure amp. at each tick of sample clock A better approximation
Quantization Error • When a signal is quantized, we introduce an error - the coded signal is an approximation of the actual amplitude value. • The difference between actual and coded value (midpoint) is referred to as the quantization error. • The more zones, the smaller which results in smaller errors. • BUT, the more zones the more bits required to encode the samples -> higher bit rate
Quantization Noise Round-off error: difference between actual signal and quantization to integer values… Random errors: sounds like low-amplitude noise
A/D: step3: Coding Quantization Quantization is the process of converting the sampled analog voltages into digital words. Data coding Data coding separates the digital words so that they are more easily identified.
7 6 5 4 3 2 1 0 Digital to Analog Conversion: Sample and Hold To reconstruct analog signal, hold each sample value for one clock tick; convert it to steady voltage. Amplitude Time
7 6 5 4 3 2 1 0 DAC: Smoothing Filter Apply an analog low-pass filter to the output of the sample-and-hold unit: averages “stair steps” into a smooth curve. Amplitude Time
10 0 -10 t (ms) 0 20 40 60 80 100 10 0 -10 n (samples) 0 10 20 30 40 50 Discrete-Time Signal (Example) • Discrete-time signals are represented by sequence of numbers • The nth number in the sequence is represented with x[n] • Often times sequences are obtained by sampling of continuous-time signals • In this case x[n] is value of the analog signal at xc(nT) • Where T is the sampling period
if : any integer : positive integer then the is called a periodic sequence, and the value of N is called the fundamental period. Signals With Symmetry: Periodic • The periodicity of sequence
Signals With Symmetry: Even/Odd • Even • Odd
Signals With Symmetry: Even/Odd • Any signals can be expressed as a sum of even and odd signals. That is: • This is demonstrated to the right for a signal referred to as a unit step.
1.5 1 0.5 0 -10 -5 0 5 10 1.5 1 0.5 0 -10 -5 0 5 10 1 0.5 0 -10 -5 0 5 10 The Discrete-Time Signal: Sequences • Unit sample sequence • Unit step sequence • Exponential sequence
where is an integer delaying operation Unit delay Unit advance z-1 z advance operation The Discrete-Time Signal: Sequences • Operations on sequence • Time-shifting operation
Time-shifting operation The Discrete-Time Signal: Sequences Time-shifting operation
Sample-by-sample addition Adder The Discrete-Time Signal: Sequences • Time-reversal (folding) operation • Addition operation
folding operation The Discrete-Time Signal: Sequences folding operation