Welcome to TSRT78 Digital Signal Processing Fredrik Gustafsson Division of Automatic Control Department of Electrical Engineering Linköping University E-mail: fredrik.gustafsson@liu.se Phone: 28276 Office: House B, entrance 23-25 214 Fredrik Gustafsson (LiU) Digital Signal Processing, Lecture 1 214 1 / 33
Outline Lecture 1 I Introduction and motivation II Course administration III Frequency description 1 Continuous time signals 2 Fourier series and transform (FS & FT) 3 Discrete time signals, sampling 4 Discrete time Fourier transform (DTFT) 5 Poisson s summation formula, FT DTFT 6 Sampling theorem 7 The alias problem 8 Signal energy Fredrik Gustafsson (LiU) Digital Signal Processing, Lecture 1 214 2 / 33
What is signal processing? Signal processing is the art of getting what you want from signals Fredrik Gustafsson (LiU) Digital Signal Processing, Lecture 1 214 3 / 33
Example 1 Species variation Asimplefirstthingtodo:Look at the data! Data: Number of species on earth. Calculated from fossil sedimentations. Problem: Are there periodic variations? Do these correlate with, e.g., ice ages and climate variations? Preprocessing of data, removing trends. Brian Hayes, Life Cycles, American Scientist, 93(4):299 33, July August, 25. Fredrik Gustafsson (LiU) Digital Signal Processing, Lecture 1 214 4 / 33
Example 2 UAV Acceleration Measurements Sensor signals from an Unmanned Aerial Vehicle (UAV). We use various types of UAVs in research projects, see, e.g., www.cadics.isy.liu.se and www.cuas.isy.liu.se. Image courtesy of Unmanned Aircraft Systems Technologies Lab, IDA, LiU. Frequency domain description of signals (Ch. 2) Peaks at 13.85 Hz = 83 rpm (rotor speed). Fredrik Gustafsson (LiU) Digital Signal Processing, Lecture 1 214 5 / 33
Example 3 Speech Data: Sampled speech signals.8.8.4.6.6.3.4.4.2.2 ssound bsound.2 msound.1.2.4.2.1.6.4.2.8 1.2 1.4 1.6 1.8 1.1 1.12 1.14 Time [s].6 1.5 1.1 1.15 1.2 1.25 1.3 1.35 1.4 1.45 Time [s].3 1.52 1.54 1.56 1.58 1.6 1.62 1.64 Time [s] Problems: Analysis and representation. Transmission and storage. Fredrik Gustafsson (LiU) Digital Signal Processing, Lecture 1 214 6 / 33
Example 3 Speech (spectral analysis) Different sounds have different frequency content. Compare the energy spectrum for the sounds s, b and m. 1 6 1 8 1 1 1 12 ssound bsound msound 1 2 1 3 1 4 1 5 Frequency [rad/s] Spectral analysis and spectral estimation (Ch. 3) Fredrik Gustafsson (LiU) Digital Signal Processing, Lecture 1 214 7 / 33
Example 3 Speech (filtering).15.15.1.1.5.5.5.5.1.1.15.15.2 1 2 3 4 5 6 7 8 Time [s] Original sound.2 1 2 3 4 5 6 7 8 Time [s] Filtered signal (echo with.2 s delay) Filtering theory (Ch. 4) Fredrik Gustafsson (LiU) Digital Signal Processing, Lecture 1 214 8 / 33
Example 3 Speech (GSM coding) In the GSM standard the signal is modelled as y(t) = a 1 y(t 1) a 2 y(t 2) a 8 y(t 8)+e(t) where e(t) is driving noise. The next signal value can be predicted as ŷ(t t 1) = a 1 y(t 1) a 2 y(t 2) a 8 y(t 8) The coefficients a i are estimated every 2 ms. The eight coefficients and the prediction errors y(t) ŷ(t t 1) are transmitted, rather than the full signal (errors smaller than signal values, i.e. requires fewer bits). Signal Models (Ch. 5) and Estimating Signal Models (Ch. 6) Fredrik Gustafsson (LiU) Digital Signal Processing, Lecture 1 214 9 / 33
Example 3 Speech (GSM coding) The estimated signal model for m-sound, â =[ 9 34 85 48 79 59 17 2] gives the residuals.4 12 x 1 3.3 1 8 msound.2.1.1 Prediction errors 6 4 2 2.2 4 6.3 2 4 6 8 1 12 14 16 18 2 22 Sample 8 2 4 6 8 1 12 14 16 18 2 22 Sample Signal Models (Ch. 5) and Estimating Signal Models (Ch. 6) Fredrik Gustafsson (LiU) Digital Signal Processing, Lecture 1 214 1 / 33
Example 4 Track people in video data Ongoing research project: To use small UAV s to, e.g., help first responders get an overview of a crash site. 1 5 1 5 1 15 2 2 1 1 www.cuas.isy.liu.se State space models (Ch. 5) and Kalman filtering (Ch. 8) Fredrik Gustafsson (LiU) Digital Signal Processing, Lecture 1 214 11 / 33
Example 5 Estimating tire-to-road friction Given: Measurements of engine torque and wheel slip, and a linear model. Problem: Estimate friction between tire and road surface as slope of curve. The slope of the straight line that approximates the measurements is proportional to the friction. Compare asphalt and snow above. Adaptive filtering (Ch. 9) Fredrik Gustafsson (LiU) Digital Signal Processing, Lecture 1 214 12 / 33
Example 5 Estimating tire-to-road friction (adaptation) The parameters that determine the slope are time varying. Use model adaptation, e.g., Kalman filter or Recursive Least Squares. Kalman filter (Ch. 8) and Adaptive filters (Ch. 9) Fredrik Gustafsson (LiU) Digital Signal Processing, Lecture 1 214 13 / 33
Signal processing in a bigger context Signal processing has an important role in itself, however, it also has a very important role as part of bigger systems, which we will give examples of: Control systems Autonomous systems Fredrik Gustafsson (LiU) Digital Signal Processing, Lecture 1 214 14 / 33
Signal processing in control Fredrik Gustafsson (LiU) Digital Signal Processing, Lecture 1 214 15 / 33
Signal processing in control Control goal: Stabilize the heading angle Standard maneuver: Double lane change at 1 km/h. The controller affects the angle of the front wheel (active steering). Without controller With controller Videos used with permission from ZF Lenksysteme, www.zf-lenksysteme.com Fredrik Gustafsson (LiU) Digital Signal Processing, Lecture 1 214 16 / 33
Signal processing in an Autonomous System Sensors: Joint displacements Force Current 3D Gyroscopes 3D Accelerometers Temperature (engine, oil) Oil flow Oil pressure Engine RPM Stereo Vision Laser range Big Dog by Boston Dynamics, www.bostondynamics.com All measurements from all sensors need signal processing in some form! Fredrik Gustafsson (LiU) Digital Signal Processing, Lecture 1 214 17 / 33
Course Aim The aims of the course are to show the most important methods and algorithms for signal processing, and to show how these can be applied on signals of various kinds. Fredrik Gustafsson (LiU) Digital Signal Processing, Lecture 1 214 18 / 33
Lectures and exercise sessions Lecturer and examiner: Fredrik Gustafsson 14 lectures: Theory Examples Guest lectures from industry 12 exercise sessions, 7 in computer labs: Solve problems (you will use Matlab) Discuss and ask questions Two teaching assistants: Michael Roth André Carvalho Bittencourt Fredrik Gustafsson (LiU) Digital Signal Processing, Lecture 1 214 19 / 33
Labs There are two labs in the course. 1 Fundamental Signal processing Gives practical experience with the theory and algorithms Collect data in lab, work in your own time Examined by a Lab report, including peer review 1 Write your report 2 Review another group s report 3 Revise your own report 4 Receive comments from teachers 2 Active noise control Suppress disturbing noise in real time Standard 4h lab Examined in the lab, be prepared! Work in pairs, sign up on course homepage. Fredrik Gustafsson (LiU) Digital Signal Processing, Lecture 1 214 2 / 33
Book Introduction (Ch. 1) Non-parametric signal processing Transform theory (Ch. 2) Stochastic signals, spectral estimation (Ch. 3) Filtering (Ch. 3) Parametric signal processing Parametric signal models (Ch. 5) Estimating signal models (Ch. 6) Linear estimation (Wiener and Kalman filters) (Ch. 7 8) Adaptive signal processing (Ch. 9) There is an older version in Swedish, however the updated English version is recommended. Fredrik Gustafsson (LiU) Digital Signal Processing, Lecture 1 214 21 / 33
Additional course administration All course information, including lecture material, is available on the course homepage http://www.control.isy.liu.se/student/tsrt78/ The course requires you to use computer, especially Matlab More than half of the exercise sessions take place in computer rooms, both labs require computer and Matlab. Download Matlab from the Student Portal, or buy it at Bokakademin in Kårallen. The exam is approx. 5% computer problems, hence it takes place in ISY s computer rooms. Allowed aids are The book with normal study notes. Not the book with exercises! Computer with Matlab Fredrik Gustafsson (LiU) Digital Signal Processing, Lecture 1 214 22 / 33
Introduction to/repetition of frequency description 1 Continuous time signals 2 Fourier series and transform (FS & FT) 3 Discrete time signals, sampling 4 Discrete time Fourier transform (DTFT) 5 Poisson s summation formula, FT DTFT 6 Sampling theorem 7 The alias problem 8 Signal energy Fredrik Gustafsson (LiU) Digital Signal Processing, Lecture 1 214 23 / 33
Fourier series example: square wave Using the N first terms in the Fourier series 1.2 1.2 1 1.8.8 Amplitude.6.4 Amplitude.6.4.2.2.2 1 2 3 4 5 6 7 Time (s).2 1 2 3 4 5 6 7 Time (s) 1.2 N = 1 1.2 N = 2 1 1.8.8 Amplitude.6.4 Amplitude.6.4.2.2.2 1 2 3 4 5 6 7 Time (s).2 1 2 3 4 5 6 7 Time (s) N = 5 N = 1 Fredrik Gustafsson (LiU) Digital Signal Processing, Lecture 1 214 24 / 33
Fourier series example: Söderåsen Current measured in 4kV transformer at Söderåsen when it is switched on. 1 5 5 5 Hz 1 Hz 15 Hz 2 Hz 5 1.3.31.32.33.34.35.36.37.38.39.4 Time [s] Solid line measured Dashed approximation i(t) 4 n=1 5.3.31.32.33.34.35.36.37.38.39.4 Time [s] Fundamental frequency (5Hz) and three first harmonics. a n cos (n2 5t + b n ) Acompactandsimplerepresentationofthesignal. Fredrik Gustafsson (LiU) Digital Signal Processing, Lecture 1 214 25 / 33
Sampling a continuous signal Acontinuoustime(CT)signal 1 x(t) t.5 is observed in discrete time (DT) x[k] =x(kt ) k = 1 2 where T is the sample time..5 1 Sampling freq: s = 2 T [rad/s] 1 2 3 4 5 6 7 8 9 1 Time [s] In reality we only have acess to N samples, more on this next lecture. Fredrik Gustafsson (LiU) Digital Signal Processing, Lecture 1 214 26 / 33
Poisson s summation formula Describe the CT signal at the sampling instants using the IFT. x(kt )= 1 2 = r= 1 2 =[ = + r s] = 1 2 r= = 1 2 s 2 Compare this to the IDTFT. X (i )e i kt d s 2 +r s s 2 X (i )e i kt d s 2 +r s s 2 s 2 r= X (i( + r s))e i( +r s)kt d X (i( + r s)) e i kt d Fredrik Gustafsson (LiU) Digital Signal Processing, Lecture 1 214 27 / 33
Poisson s summation formula, example Relationship FT DTFT X(iw) ws/2 ws/2 2ws 1ws 1ws 2ws X(iw) vs X T (e iwt ) X(iw) vs X T (e iwt ) X T (e iwt ) 2ws 1ws 1ws 2ws ws/2 ws/2 Fredrik Gustafsson (LiU) Digital Signal Processing, Lecture 1 214 28 / 33
Important properties of the FT and DTFT x(t ) e i X (i ) x(t)y(t) 1 2 X (i i )Y (i )d X (i i ) e i t x(t) X (i )Y (i ) x(t )y( )d x[k m] e i Tm X T (e i T ) x[k]y[k] 1 2 T T X T e i( )T Y T e i T d T X T e i( )T e i Tk x[k] e i T 1 T XT (ei T )Y T m= x[k m]y[m] Fredrik Gustafsson (LiU) Digital Signal Processing, Lecture 1 214 29 / 33
Aliasing example 1 X(iw) ws/2 ws/2 3ws 2ws 1ws 1ws 2ws 3ws X(iw) vs X T (e iwt ) X(iw) vs X T (e iwt ) X T (e iwt ) 3ws 2ws 1ws 1ws 2ws 3ws ws/2 ws/2 Fredrik Gustafsson (LiU) Digital Signal Processing, Lecture 1 214 3 / 33
Aliasing example 2 X(iw) ws/2 ws/2 ws/2 ws/2 X(iw) X(iw) vs X T (e iwt ) X(iw) vs X T (e iwt ) ws/2 ws/2 ws/2 ws/2 Fredrik Gustafsson (LiU) Digital Signal Processing, Lecture 1 214 31 / 33
Signal energy We can show how signal energy varies both over frequencies and time. Below is for speech signal used in Example 3 (filtering). Fredrik Gustafsson (LiU) Digital Signal Processing, Lecture 1 214 32 / 33
Summary of Lecture 1 Signal processing: The art of getting what you want from signals. FT and DTFT: Fourier transforms for continuous time and discrete time signals, respectively. Poisson s summation formula: Describes the relationship between FT and DTFT. The sampling theorem: FT and DTFT are identical for [ s 2 s 2] if all energy content for the continuous signal is in [ s 2 s 2]. The alias problem: If the sampling theorem does not hold, frequencies will appear under false name (alias), as explained by Poisson s summation formula. Fredrik Gustafsson (LiU) Digital Signal Processing, Lecture 1 214 33 / 33