Lecture 2 BME452 Biomedical Signal Processing 2013 (copyright Ali Işın, 2013)1 BME452 Biomedical Signal Processing Lecture 2  Discrete Time Signals and.

Slides:



Advertisements
Similar presentations
Analog to digital conversion
Advertisements

Analogue to Digital Conversion (PCM and DM)
Lecture 9: D/A and A/D Converters
ADC AND DAC Sub-topics: Analog-to-Digital Converter -. Sampling
Quantization Prof. Siripong Potisuk.
CEN352, Dr. Ghulam Muhammad King Saud University
Chapter 1 -Discrete Signals A Sampled or discrete time signal x[n] is just an ordered sequence of values corresponding to the index n that embodies the.
MM3FC Mathematical Modeling 3 LECTURE 2 Times Weeks 7,8 & 9. Lectures : Mon,Tues,Wed 10-11am, Rm.1439 Tutorials : Thurs, 10am, Rm. ULT. Clinics : Fri,
Time - Domain Analysis Of Discrete - Time Systems The first half of Chapter 3.
Data Acquisition. Data Acquisition System Analog Signal Signal Conditioner ADC Digital Processing Communication.
Data Sampling & Nyquist Theorem Richa Sharma Dept. of Physics And Astrophysics University of Delhi.
Digital to Analogue Conversion Natural signals tend to be analogue Need to convert to digital.
Over-Sampling and Multi-Rate DSP Systems
Finite Impuse Response Filters. Filters A filter is a system that processes a signal in some desired fashion. –A continuous-time signal or continuous.
Lecture 9 FIR and IIR Filter design using Matlab
Digital Signals and Systems
Chapter 4: Sampling of Continuous-Time Signals
FT Representation of DT Signals:
EE513 Audio Signals and Systems Digital Signal Processing (Systems) Kevin D. Donohue Electrical and Computer Engineering University of Kentucky.
The sampling of continuous-time signals is an important topic It is required by many important technologies such as: Digital Communication Systems ( Wireless.
Discrete-Time and System (A Review)
DTFT And Fourier Transform
DIGITAL VOICE NETWORKS ECE 421E Tuesday, October 02, 2012.
Random signals. Histogram of the random signal Continuous Time Sinusoidal signals.
Chapter 2 Discrete-Time Signals and Systems
1 Signals & Systems Spring 2009 Week 3 Instructor: Mariam Shafqat UET Taxila.
Chapter 2: Discrete time signals and systems
DISCRETE-TIME SIGNALS and SYSTEMS
Digital Signal Processing
Classification of Signals & Systems. Introduction to Signals A Signal is the function of one or more independent variables that carries some information.
Signal Encoding Techniques. Lecture Learning Outcomes Be able to understand, appreciate and differentiate the different signal encoding criteria available.
Chapter #5 Pulse Modulation
1 Prof. Nizamettin AYDIN Advanced Digital Signal Processing.
Unit-V DSP APPLICATIONS. UNIT V -SYLLABUS DSP APPLICATIONS Multirate signal processing: Decimation Interpolation Sampling rate conversion by a rational.
Signals and Systems Dr. Mohamed Bingabr University of Central Oklahoma
Prof. Brian L. Evans Dept. of Electrical and Computer Engineering The University of Texas at Austin Lecture 4 EE 345S Real-Time.
1 Lecture 1: February 20, 2007 Topic: 1. Discrete-Time Signals and Systems.
Hossein Sameti Department of Computer Engineering Sharif University of Technology.
Department of Electrical and Computer Engineering Brian M. McCarthy Department of Electrical & Computer Engineering Villanova University ECE8231 Digital.
EEE 503 Digital Signal Processing Lecture #2 : EEE 503 Digital Signal Processing Lecture #2 : Discrete-Time Signals & Systems Dr. Panuthat Boonpramuk Department.
CHAPTER 2 Discrete-Time Signals and Systems in the Time-Domain
1 Digital Signal Processing Lecture 3 – 4 By Dileep kumar
revision Transfer function. Frequency Response
Technological Educational Institute Of Crete Department Of Applied Informatics and Multimedia Neural Networks Laboratory Slide 1 FOURIER TRANSFORMATION.
Lecture 5 BME452 Biomedical Signal Processing 2013 (copyright Ali Işın, 2013)1 BME 452 Biomedical Signal Processing Lecture 5  Digital filtering.
4.2 Digital Transmission Pulse Modulation Pulse Code Modulation
Technological Educational Institute Of Crete Department Of Applied Informatics and Multimedia Neural Networks Laboratory Slide 1 DISCRETE SIGNALS AND SYSTEMS.
Meghe Group of Institutions
Lecture 2 Analog to digital conversion & Basic discrete signals.
Continuous-time Signal Sampling
What is filter ? A filter is a circuit that passes certain frequencies and rejects all others. The passband is the range of frequencies allowed through.
PAM Modulation Lab#3. Introduction An analog signal is characterized by the fact that its amplitude can take any value over a continuous range. On the.
Prof. Brian L. Evans Dept. of Electrical and Computer Engineering The University of Texas at Austin Lecture 3
Finite Impuse Response Filters. Filters A filter is a system that processes a signal in some desired fashion. –A continuous-time signal or continuous.
Digital Signal Processing
Real-time Digital Signal Processing Digital Filters.
بسم الله الرحمن الرحيم Digital Signal Processing Lecture 2 Analog to Digital Conversion University of Khartoum Department of Electrical and Electronic.
In summary If x[n] is a finite-length sequence (n  0 only when |n|
Discrete Time Signal Processing Chu-Song Chen (陳祝嵩) Institute of Information Science Academia Sinica 中央研究院 資訊科學研究所.
CEN352 Dr. Nassim Ammour King Saud University
Chapter 3 Sampling.
Sampling rate conversion by a rational factor
Soutenance de thèse vendredi 24 novembre 2006, Lorient
لجنة الهندسة الكهربائية
Lecture 10 Digital to Analog (D-to-A) Conversion
MECH 373 Instrumentation and Measurements
Digital Control Systems Waseem Gulsher
UNIT-I SIGNALS & SYSTEMS.
ELEN E4810: Digital Signal Processing Topic 11: Continuous Signals
DIGITAL CONTROL SYSTEM WEEK 3 NUMERICAL APPROXIMATION
Presentation transcript:

Lecture 2 BME452 Biomedical Signal Processing 2013 (copyright Ali Işın, 2013)1 BME452 Biomedical Signal Processing Lecture 2  Discrete Time Signals and Systems

Lecture 2 BME452 Biomedical Signal Processing 2013 (copyright Ali Işın, 2013)2 Lecture 2 Outline  In this lecture, we’ll study the following Analogue to digital conversion  Sampling, quantisation, coding, aliasing Digital to analogue conversion (in brief) Classification of systems Basic operations of systems

Lecture 2 BME452 Biomedical Signal Processing 2013 (copyright Ali Işın, 2013)3 Analogue to digital conversion  Recorded biological signals are analogue signals  To process analogue signals by digital means (like using a PC), we need to convert them to digital form  I.e. to convert them to a sequence of numbers having finite precision  This process is known as analogue to digital (A/D) conversion, which involves  i) Sampling  ii) Quantisation  iii) Coding

Lecture 2 BME452 Biomedical Signal Processing 2013 (copyright Ali Işın, 2013)4 The Sampling Process  Often, a discrete time sequence x[n] is developed by uniformly sampling an analogue signal x(t) as indicated below  I.e. conversion of a continuous-time, continuous amplitude signal into discrete-time signal (i.e. continuous-amplitude, discrete-time)  Done by taking samples at specific uniform intervals of time  The sampling interval is the time of one of these uniform intervals  Sampling frequency is the number of uniform time intervals in one second  The relation between the two signals are Discrete-time signal Analogue signal

Lecture 2 BME452 Biomedical Signal Processing 2013 (copyright Ali Işın, 2013)5 Aliasing  Aliasing Aliasing causes ambiguities in reconstruction, i.e. distorts the sampled signal To avoid aliasing, the sampling frequency has to be more than twice of the highest frequency contained in x(t) This is known as Nyquist theorem and the minimum frequency known as Nyquist frequency(rate)

Lecture 2 BME452 Biomedical Signal Processing 2013 (copyright Ali Işın, 2013)6 Example – Nyquist rate computation  Consider the analog signal x(t)=3 cos 50t + 10 sin 300 t – cos 100 t What is the Nyquist frequency (rate)?  Answer  Use the generic term, A cos 2ft (or A sin 2ft) to compute the frequencies present in the signal => which are 25 Hz, 150 Hz and 50 Hz  So, Nyquist frequency is 2* highest frequency= 2*150 Hz=300 Hz  In practise, we normally sample at a much higher rate than Nyquist frequency

Lecture 2 BME452 Biomedical Signal Processing 2013 (copyright Ali Işın, 2013)7 Quantisation and Coding  Quantisation This is the conversion of discrete-time continuous amplitude signal (after sampling) into discrete-time discrete amplitude signal  Quantisation levels The value of each sample is represented by a value selected from a finite set of possible values Quantisation width= (xmax-xmin)/(No of levels -1) Quantisation error is the error in the quantisation process by rounding to the nearest level  Coding In the coding process, each discrete value is represented by a certain number of bits 2 number of bits no of levels

Lecture 2 BME452 Biomedical Signal Processing 2013 (copyright Ali Işın, 2013)8 Example of performing quantisation and coding  Example of quantisation and coding  Eg: Assume after sampling, we have the 5 th sample, x(5)=1.66 volts Assume 9 levels are used to represent amplitude values of 0 V (min) to 2 V (max) Quantisation width= (xmax-xmin)/(No of levels -1) =0.25 V The possible quantised values are 0, 0.25, 0.5, 0.75, 1.00, 1.25, 1.50, 1.75, 2.00 So, x(5) =1.75 volts (rounded to nearest level) = 7 th quantised level 2 number of bits no of levels, so we need at least 4 bits After coding, it is 0111  Quantisation error 1.66 V is represented as 1.75 V, so there is an error of 0.09 V, this is the quantisation error This error can be reduced by using more bits in coding thereby increasing the number of quantisation levels In some hardware, the quantisation is done to the nearest lower level, so it would 1.50 instead of 1.75

Lecture 2 BME452 Biomedical Signal Processing 2013 (copyright Ali Işın, 2013)9 Quantisation and coding – further example  For the same example in the previous, what would be the code and quantisation error if 17 levels were used? 17 levels in the range 0 V (min) to 2 V (max) Quantisation width= (xmax-xmin)/(No of levels -1) =0.125 V The possible quantised values are 0, 0.125, 0.25, 0.375, 0.5, 0.625, 0.75, 0.875, 1.00, 1.125, 1.25, 1.375, 1.50, 1.625, 1.75, 1.875, 2.00 So, x(5) =1.625 volts (rounded to nearest level) = 13 th quantised level 2 number of bits no of levels, so we need at least 5 bits After coding, it is  Quantisation error 1.66 V is represented as V, so there is an error of V, this is the quantisation error This error is reduced by the increase of bits/quantisation levels

Lecture 2 BME452 Biomedical Signal Processing 2013 (copyright Ali Işın, 2013)10 Digital to analog (D/A) conversion  This is not important for this course  Converts digital to analogue signals by performing some kind of interpolation to ‘connect the dots’  Eg: zero-order hold/staircase approximation A/D converter (the simplest)

Lecture 2 BME452 Biomedical Signal Processing 2013 (copyright Ali Işın, 2013)11 Sequences  Sometimes, a discrete-time signal is known as a sequence and vice versa  A discrete-time signal may be a finite length or an infinite-length sequence  Eg: x[n]=3+4n 3, -5n  4 is a finite length sequence with length 4-(-5)+1=10  x[n]=sin(0.1n) is an infinite-length sequence An N length sequence can be increased by padding with zeros  Eg: length 3 changed to length 5

Lecture 2 BME452 Biomedical Signal Processing 2013 (copyright Ali Işın, 2013)12 Discrete-time systems  Discrete-time systems operates on an input sequence, according to some prescribed transfer function and produces another output sequence  Example, the input sequence could be a noisy ECG signal that we studied in Quiz 1 and the system outputs a noise reduced ECG signal In this case, the discrete-time system is a band-pass filter  There are some classifications and basic operations for discrete- time systems, which we will study next

Lecture 2 BME452 Biomedical Signal Processing 2013 (copyright Ali Işın, 2013)13 Classifications of Discrete-time Systems  As with signals, systems can also be classified as: Static and dynamic systems Linear and non-linear systems Time-variant and time-invariant systems Causal and non-causal systems Stable and non-stable systems

Lecture 2 BME452 Biomedical Signal Processing 2013 (copyright Ali Işın, 2013)14 Static and dynamic systems  Static The output of a static system at any time depends only on the input values at that particular time (not on past or future input values) It has no memory or energy storage elements A resistive network is an example Eg: y[n]=4x[n]+(x[n]) 3  Dynamic The output of a dynamic system depends on the inputs at the specific time and at other previous times. Have memory or energy storage elements (eg: capacitive/inductive network) It always contains a difference equation Eg: y[n]=4x[n]-x[n-1]

Lecture 2 BME452 Biomedical Signal Processing 2013 (copyright Ali Işın, 2013)15 Linear and non-linear systems  Linear A linear system is one in which the principle of superposition holds  For eg, if the system has two inputs, x[n] and y[n], the superposition is defined as follows  H is the transfer function of the system  Nonlinear If the system does not satisfy the superposition principle, it is non- linear

Lecture 2 BME452 Biomedical Signal Processing 2013 (copyright Ali Işın, 2013)16 Time-variant and time-invariant systems  Time invariant or shift-invariant system Also known as fixed system Input-output relationship does not vary with time Eg: H[x(n-k)]=y(n-k) where k is an integer In other words, if y[n] is the response of the system to any input x[n], then the response of the system to the time shifted input is the response of the system to x[n] shifted by the same amount  Time-variant (shift-variant) If the system does not satisfy the above property, it is time- variant/shift-variant.

Lecture 2 BME452 Biomedical Signal Processing 2013 (copyright Ali Işın, 2013)17 Causal and non-causal systems  Causal system A causal system is non-anticipatory The response depends only on the present and/or past value of the input, not future values Eg: y[n]=0.5x[n]-x[n-2]  Non-causal system The response depends on some future values of the input Not realisable in practise Eg: y[n]=0.1x[n-1]+x[n]-0.8x[n+1]

Lecture 2 BME452 Biomedical Signal Processing 2013 (copyright Ali Işın, 2013)18 Stable and non-stable systems  Stable system A stable system produces bounded output for bounded input In other words, for a bounded (i.e. limited) input, the output does not grow unreasonably large Eg: y[n]=H(x[n]) The energy of x is bounded, |x[n]|Mx for all n => the energy of y is also bounded, |y[n]|My for all n  Non-stable system The response can be unreasonably large for a bounded input

Lecture 2 BME452 Biomedical Signal Processing 2013 (copyright Ali Işın, 2013)19 Basic system operations  Product (modulation) y[n]=x[n].w[n] Normally used in windowing – where a discrete time finite signal is obtained from a discrete time infinite signal  Addition y[n]=x[n] + w[n]  Multiplication y[n]=A.x[n] This is the system!

Lecture 2 BME452 Biomedical Signal Processing 2013 (copyright Ali Işın, 2013)20 Basic system operations (cont)  Time reversal (folding) y[n]=x[-n] Important operation in filtering Arrow points to n=0  Branching Used to provide multiple copies of the signal  Time shifting y[n]=x[n-N] (delay) y[n]=x[n+N] (advance)

Lecture 2 BME452 Biomedical Signal Processing 2013 (copyright Ali Işın, 2013)21 Basic system operations (cont)  Time scaling (downsampling/upsampling)  Downsampling, y[n]=x[nM] In downsampling, every Mth sample of the input sequence is kept and M-1 in between samples are removed No. of samples is reduced Eg: y[n]=x[3n] Figure from S.K.Mitra, DSP 3 rd ed.

Lecture 2 BME452 Biomedical Signal Processing 2013 (copyright Ali Işın, 2013)22 Basic system operations (cont)  Upsampling, y[n]=x[n/N] In upsampling, N-1 equidistant zero-values samples are inserted by the upsampler between each consecutive samples of the input sequence No. of samples is increased Eg: y[n]=x[n/3] Figure from S.K.Mitra, DSP 3 rd ed.

Lecture 2 BME452 Biomedical Signal Processing 2013 (copyright Ali Işın, 2013)23 Combination of basic operations  Often, a system includes a combination of operations  Example - figure shows a discrete time system block diagram

Lecture 2 BME452 Biomedical Signal Processing 2013 (copyright Ali Işın, 2013)24 Example – sequence computation  For the following sequences, defined for 0  n  4 (length=5), a[n]={ } b[n]={ }  obtain the new sequences c[n]={a[n].b[n]} d[n]={a[n]+b[n]} e[n]=1.5{a[n]}  Ans  c[n]={ }  d[n]={ }  e[n]={ }  These are easy as both a[n] and b[n] have same length. What if their lengths differ?

Lecture 2 BME452 Biomedical Signal Processing 2013 (copyright Ali Işın, 2013)25 Example – differing sequence lengths  If the lengths of sequences differ, then pad with zeros (in front or end or in between) to obtain same length sequences and same defined ranges BEFORE applying the operations  Example, for the following sequence f[n]={ } defined for 0  n  2 what would be g[n]=a[n]+f[n]?  Hint: f[n] has length 3, while a[n] has length five, so pad f[n] with 2 zeros  Sometimes, making a table will make it easier  Answer  a[n]={ } defined for 0  n  4  f pad [n]={ } defined for 0  n  4  f[n] is padded with 2 zeros at the end as to make the defined ranges of a[n] and f pad [n] equal.  So, g[n]={ }

Lecture 2 BME452 Biomedical Signal Processing 2013 (copyright Ali Işın, 2013)26 Advanced example  Consider the following sequences: x[n]={ }, -3 n 3 y[n]={ }, -1 n 5 w[n]={ }, 2 n 8  The sample values of each of the above sequences outside ranges specified are all zeros. Generate the following sequences (put an arrow at n=0): (a) c[n]=x[-n+2] (b) d[n]=y[-n-3] (c) e[n]=w[-n] (d) u[n]=x[n]+y[n-2] Hint: x(n+k) signal moves k x(n-k) signal moves k x(-n+k) signal moves k x(-n-k) signal moves k  Answer  c[n]={ }  d[n]={ }  e[n]={ }  u[n]={ }  Continued in next slide

Lecture 2 BME452 Biomedical Signal Processing 2013 (copyright Ali Işın, 2013)27 Solution  Prepare tables  Min range, n=-3  Max range, n=8 (a) c[n]=x[-n+2] (b) d[n]=y[-n-3] (c) e[n]=w[-n] (d) u[n]=x[n]+y[n-2]

Lecture 2 BME452 Biomedical Signal Processing 2013 (copyright Ali Işın, 2013)28 Precedence of flip operation  For the example in the previous slide,  Is y(-n-3) = y(-(n+3))?  What about y(-n-3) = y(-3-n)?  Try them now  y(-(n+3)) ={ }

Lecture 2 BME452 Biomedical Signal Processing 2013 (copyright Ali Işın, 2013)29 Study guide (Lecture 2)  From this week’s lecture, you should know A/D and D/A conversion Sampling, quantisation, coding procedures Nyquist theorem Basic system operations The different classifications of systems Computation of combined sequence operations Obtaining output sequence given a discrete-time system block diagram and vice versa End of lecture 2