Suggested Solutions to Examination SSY130 Applied Signal Processing

Similar documents
(i) Understanding of the characteristics of linear-phase finite impulse response (FIR) filters

Final Exam Solutions June 14, 2006

CS3291: Digital Signal Processing

(i) Understanding of the characteristics of linear-phase finite impulse response (FIR) filters

DSP Laboratory (EELE 4110) Lab#10 Finite Impulse Response (FIR) Filters

ECE 5650/4650 Exam II November 20, 2018 Name:

DFT: Discrete Fourier Transform & Linear Signal Processing

Basic Signals and Systems

Filter Banks I. Prof. Dr. Gerald Schuller. Fraunhofer IDMT & Ilmenau University of Technology Ilmenau, Germany. Fraunhofer IDMT

Digital Video and Audio Processing. Winter term 2002/ 2003 Computer-based exercises

Electrical & Computer Engineering Technology

Digital Filters IIR (& Their Corresponding Analog Filters) Week Date Lecture Title

F I R Filter (Finite Impulse Response)

Design of FIR Filters

PROBLEM SET 6. Note: This version is preliminary in that it does not yet have instructions for uploading the MATLAB problems.

FIR FILTER DESIGN USING A NEW WINDOW FUNCTION

Two-Dimensional Wavelets with Complementary Filter Banks

Discrete Fourier Transform (DFT)

Lecture on Angular Vibration Measurements Based on Phase Demodulation

Experiment 4- Finite Impulse Response Filters

GEORGIA INSTITUTE OF TECHNOLOGY. SCHOOL of ELECTRICAL and COMPUTER ENGINEERING. ECE 2026 Summer 2018 Lab #8: Filter Design of FIR Filters

y(n)= Aa n u(n)+bu(n) b m sin(2πmt)= b 1 sin(2πt)+b 2 sin(4πt)+b 3 sin(6πt)+ m=1 x(t)= x = 2 ( b b b b


Final Exam Solutions June 7, 2004

Project I: Phase Tracking and Baud Timing Correction Systems

2.1 BASIC CONCEPTS Basic Operations on Signals Time Shifting. Figure 2.2 Time shifting of a signal. Time Reversal.

4. Design of Discrete-Time Filters

The University of Texas at Austin Dept. of Electrical and Computer Engineering Final Exam

B.Tech III Year II Semester (R13) Regular & Supplementary Examinations May/June 2017 DIGITAL SIGNAL PROCESSING (Common to ECE and EIE)

Digital Filters FIR and IIR Systems

CHAPTER 4 IMPLEMENTATION OF ADALINE IN MATLAB

DIGITAL FILTERS. !! Finite Impulse Response (FIR) !! Infinite Impulse Response (IIR) !! Background. !! Matlab functions AGC DSP AGC DSP

Signals. Continuous valued or discrete valued Can the signal take any value or only discrete values?

(i) Understanding the basic concepts of signal modeling, correlation, maximum likelihood estimation, least squares and iterative numerical methods

Frequency Domain Representation of Signals

Multirate Digital Signal Processing

speech signal S(n). This involves a transformation of S(n) into another signal or a set of signals

ECE 4213/5213 Homework 10

ECE438 - Laboratory 7a: Digital Filter Design (Week 1) By Prof. Charles Bouman and Prof. Mireille Boutin Fall 2015

Design of FIR Filter for Efficient Utilization of Speech Signal Akanksha. Raj 1 Arshiyanaz. Khateeb 2 Fakrunnisa.Balaganur 3

Biomedical Signals. Signals and Images in Medicine Dr Nabeel Anwar

Data Acquisition Systems. Signal DAQ System The Answer?

Chapter 4 SPEECH ENHANCEMENT

Signals. Periodic vs. Aperiodic. Signals

Simulation Based Design Analysis of an Adjustable Window Function

Topic 2. Signal Processing Review. (Some slides are adapted from Bryan Pardo s course slides on Machine Perception of Music)

EE 422G - Signals and Systems Laboratory

Multirate DSP, part 1: Upsampling and downsampling

Linear Time-Invariant Systems

Report 3. Kalman or Wiener Filters

University of Washington Department of Electrical Engineering Computer Speech Processing EE516 Winter 2005

Lecture 3, Multirate Signal Processing

Team proposals are due tomorrow at 6PM Homework 4 is due next thur. Proposal presentations are next mon in 1311EECS.

ESE531 Spring University of Pennsylvania Department of Electrical and System Engineering Digital Signal Processing

Computer exercise 4: Fast Least Mean Square

Corso di DATI e SEGNALI BIOMEDICI 1. Carmelina Ruggiero Laboratorio MedInfo

Sampling and Reconstruction of Analog Signals

EECS 452 Practice Midterm Exam Solutions Fall 2014

Chapter 5 Window Functions. periodic with a period of N (number of samples). This is observed in table (3.1).

Problem Set 1 (Solutions are due Mon )

Moving from continuous- to discrete-time

Signals and Systems Lecture 6: Fourier Applications

Laboratory Assignment 4. Fourier Sound Synthesis

Signal processing preliminaries

Final Exam Practice Questions for Music 421, with Solutions

PHYS 352. FFT Convolution. More Advanced Digital Signal Processing Techniques

Lecture 20: Mitigation Techniques for Multipath Fading Effects

Hideo Okawara s Mixed Signal Lecture Series. DSP-Based Testing Fundamentals 14 FIR Filter

Frequency-Response Masking FIR Filters

CS 591 S1 Midterm Exam Solution

Digital Signal Processing

Harmonic Analysis. Purpose of Time Series Analysis. What Does Each Harmonic Mean? Part 3: Time Series I

George Mason University ECE 201: Introduction to Signal Analysis

Copyright S. K. Mitra

E Final Exam Solutions page 1/ gain / db Imaginary Part

Wireless Communication

EC6502 PRINCIPLES OF DIGITAL SIGNAL PROCESSING

Spectrum Analysis - Elektronikpraktikum

MATLAB SIMULATOR FOR ADAPTIVE FILTERS

UNIVERSITY OF SWAZILAND

Short-Time Fourier Transform and Its Inverse

Review of Filter Types

Concordia University. Discrete-Time Signal Processing. Lab Manual (ELEC442) Dr. Wei-Ping Zhu

1. Find the magnitude and phase response of an FIR filter represented by the difference equation y(n)= 0.5 x(n) x(n-1)

Part A: Question & Answers UNIT I AMPLITUDE MODULATION

Performance Comparison of ZF, LMS and RLS Algorithms for Linear Adaptive Equalizer

Narrow-Band Low-Pass Digital Differentiator Design. Ivan Selesnick Polytechnic University Brooklyn, New York

Wireless PHY: Modulation and Demodulation

Experiments #6. Convolution and Linear Time Invariant Systems

6 Sampling. Sampling. The principles of sampling, especially the benefits of coherent sampling

ELEC Dr Reji Mathew Electrical Engineering UNSW

Digital Processing of Continuous-Time Signals

Speech Signal Analysis

Revision of Wireless Channel

ELEC-C5230 Digitaalisen signaalinkäsittelyn perusteet

Signal Processing Summary

MULTIPLE CHOICE. Choose the one alternative that best completes the statement or answers the question.

EEM478-WEEK8 Finite Impulse Response (FIR) Filters

Digital Processing of

GEORGIA INSTITUTE OF TECHNOLOGY SCHOOL of ELECTRICAL and COMPUTER ENGINEERING. ECE 2025 Fall 1999 Lab #7: Frequency Response & Bandpass Filters

Transcription:

Suggested Solutions to Examination SSY13 Applied Signal Processing 1:-18:, April 8, 1 Instructions Responsible teacher: Tomas McKelvey, ph 81. Teacher will visit the site of examination at 1:5 and 1:. Score from the written examination will together with course score determine the final grade according to the Course PM. Solutions are published on the course home-page latest 15 noon April 1. Your preliminary grade is reported to you via email. Exam grading review will be held in the Blue Room on level at 1:15-1:5 on April 3, 1. Allowed aids at exam: L. Råde and B. Westergren, Mathematics Handbook (any edition, including the old editions called Beta). Any calculator One a size single page with written notes Other important issues: The ordering of the questions is arbitrary. All solutions should be well motivated and clearly presented in order to render a full score. Unclear presentation or adding, for the problem in questing, irrelevant information render a reduction of the score. The maximum score is 5 points. 1

Error 1 1 Coeff 1 3 1 8 Filter error e(n) 1 Filter coefficients 1 3 1 3 5 7 8 9 1 1 3 5 7 8 9 1 Error 1 Coeff 3 1 8 Filter error e(n) 1 Filter coefficients 1 3 1 3 5 7 8 9 1 1 3 5 7 8 9 1 Error 3 1 Coeff 3 3 8 Filter error e(n) 1 Filter coefficients 1 3 1 3 5 7 8 9 1 1 3 5 7 8 9 1 Figure 1: Graphs for adaptive filtering problem. Left column error. Right column coefficients. Problems 1. In Figure 1 you find graphs. The 3 left graphs are the time evolution of the filtering error signal and the 3 right graphs correspond to the filter coefficient evolution over time. Below you find the filter updating equations for three different adaptive filtering algorithms. Which of the error signal graphs and the filter coefficient graphs correspond to which algorithm respectively? Motivate your choices carefully. What are the names of each of the algorithms. (1p) A1) Ri = 1*eye(1); alpha=1; for k=nh:1-nh, e(k) = d(k) - hx(:,k) *x(k-nh+1:k); K = Ri*x(k-Nh+1:k); Rinv = (Ri - K*K /(alpha + x(k-nh+1:k) *K))/alpha; hx(:,k+1) = hx(:,k) + Ri*x(k-Nh+1:k)*e(k);

end A) Ri =.5e-; for k=nh:1-nh, e(k) = d(k) - hx(:,k) *x(k-nh+1:k); hx(:,k+1) = hx(:,k) + Ri*x(k-Nh+1:k)*e(k); end A3) Ri = 1*eye(1); alpha=.8; for k=nh:1-nh, e(k) = d(k) - hx(:,k) *x(k-nh+1:k); K = Ri*x(k-Nh+1:k); Rinv = (Ri - K*K /(1 + x(k-nh+1:k) *K))/alpha; hx(:,k+1) = hx(:,k) + Ri*x(k-Nh+1:k)*e(k); end Solution: A1 is RLS, A is LMS and A3 is RLS with forgetting factor.8. RLS is superior to LMS in convergence so clearly Error and Coeff 3 belong to the LMS algorithm. The difference between RLS with and without forgetting is that the RLS without forgetting factor will converge as the number of samples increases even in presence of noise. Since the Coeff 1 graph has some residual variations around the correct values this graph belongs to algorithm A3. Since the coefficients vary for A3 this also leads to a higher residual variance for the error. Graph Error 1 has less residual variance as compared to Error 3 and hence Error 1 belongs to RLS without forgetting. In conclusion: A1 Error 1 Coeff A Error Coeff 3 A3 Error 3 Coeff 1. Each cylinder in a four-stroke combustion engine provides a net torque contribution once every second revolution, i.e. once for each 7 degrees of crank shaft revolution. In the top graph in the figure below, 7 samples of the signal from a crankshaft mounted torque sensor is shown. The signal has been sampled every one degree of crankshaft revolution. In the bottom graph in the figure the 1 first bins of the 7 samples DFT are shown. 3

Crankshaft torque [Nm] 15 1 5 5 1 1 3 5 7 8 Crank angle (deg) 3 x 1 7 samples FFT of torque signal FFT Magnitude of torque.5 1.5 1.5 5 1 15 5 3 35 FFT bin (a) How many cylinders does the engine have? (b) During the measurement period the engine speed variations were very small. The average sample rate was 5879 samples per second. What was the speed of the engine given in RPM (revolutions per minute)? (p) (c) The sampling of the signals in this application is not driven by a clock but instead of an angle encoder. Discuss some signal processing challenges which arise when sampling is not based on a clock. (5p) Solution: (a) After 7 degrees of crankshaft revolution the engine has made a full cycle and since the graph covers 7 degrees and we see 5 pulses in the torque signal we conclude that the engine has 5 cylinders. In the FFT graph we also se that the first bin with a large energy is at bin 5 (5 per 7 degrees). (b) Each sample corresponds to 1 degree of crankshaft revolution, 1 revolution is 3 degrees and one minute is seconds. Hence RPM = 5879/3 = 98 (c) An engine in an automotive application is operating at varying speeds, e.g. 8 RPM - RPM. With a sampling based on crankshaft angles this means that the sampling freuqency is varying over a large range. Anti aliasing filter design is then a challenge since the Nyquist frequency is varying with the engine speed and the choice of (a fixed) cut off frequency has to be a trade-off between bandwidth of the measurements and aliasing effects. Discrete time filtering of a signal which has been sampled in a time varying fashion also requires special considerations particularly time varying filters need to be employed. (3p) 3. A digital signal processing system is operating at a sampling frequency of 1 khz. A linear phase high-pass FIR filter with unit gain in the passband and a cut-off frequency of 3 khz is to be designed. (a) Determine the cut-off frequency in the unit of radians per sample. (pt)

(b) Design a causal FIR filter with 5 filter coefficients (N = 5) using the Fourier series method with the specifications as above. Hint: The inverse Fourier transform for a symmetric frequency function is given by c n = 1 π where ω is in radians per sample. π H D (ω)cos(nω)dω (c) A so called window function, other than the implicit rectangular window, can be used to modify the designed filter. Explain why this technique is often employed and the effects (both positive and negative) it has on the designed filter. (p) (d) Use the window (a Hanning window) defined by and modify your filter design. w n = sin ((n + 1)π/(N + 1)); n < N (5p) (pt) (e) Since the filter is a high-pass filter it is natural that the amplitude function at half the sampling frequency (the Nyquist frequency) is equal to one. Determine the amplitude at the Nyquist frequency for your filter design. (pt) (f) Explain any deviation from amplitude one and suggest how to modify the filter to obtain amplitude one at the Nyquist frequency (3pt) Solution: (a) ω c = πfc f s = π 3 1 = 3 5π = 1.88 rad/s (b) Symmetric coefficients around n = are obtained by inverse Fourier transform of the desired frequency response : c n = 1 π π ω c cos(nω)dω = 1 πn [sin(nω)]π ω c = 1 πn (sin(πn) sin(nω c)) n =, ±1, ± which yields. n = c n =.33 n = ±1.9 n = ± This impulse response is non-causal and needs to be delayed samples to yield a causal filter. [ h h 1 h h 3 h ] = [.9.33..33.9 ] (c) The window method starts with a brick-wall design with an (implicit) infinite filter length. The truncation to a finite length filter leads to two major effects; 1) the transition band between the stop band and pass band becomes wider and ) ripple in the stop band and pass band appears which limits the stop-band attenuation as well as distorts the constant gain in the passband. The relative effect of these two properties can be controlled by multiplying the filter coefficients with different window functions. (d) The window is applied by element-wise multiplication h w i = h i w i : [ h w hw 1 hw hw 3 hw ] = [.3.7..7.3 ] (e) H w (π) = k= hw k e jkπ = k= hw k ( 1)k =.91 (f) The deviation at the Nyquist frequency has it s origin both in the truncation of the impulse response to a finite length and the effect of the multiplication with the Hanning window. Since the transfer function is a linear function of the filter coefficients a rescaling yields the desired result h f i = hw i / Hw (π) [ h f hf 1 hf hf 3 hf ] = [..5..5. ] 5

. In a signal quality monitoring system it is desired to monitor the amplitudes of the fundamental frequency of 5 Hz and the amplitude of the first harmonic with a frequency of 1 Hz. In the application amplitudes and phases are varying over time at a rate slower than the fundamental frequency. Your task is to design a Kalman filtering based solution which estimates and track both amplitudes of both signal components. We assume the signal measured can be described as y(n) = Asin(π 5n t + ϕ A ) + B sin(π 1n t + ϕ B ) + e(n) where e(n) is zero mean white noise with a Gaussian distribution and t is the sampling interval. (a) The amplitudes appear linear in the signal model but the phases are non-linear which makes a direct application of the Kalman filter not possible. Show that the alternate model y(n) = α sin(π 5n t) + β cos(π 5n t) + γ sin(π 1n t) + θ cos(π 1n t) is an equivalent model and how the amplitudes A and B can be derived from the knowledge of α,β,γ and θ. (p) (b) Rewrite the signal model into a state-space form suitable for a direct Kalman filter application. (5p) (c) It is known that the amplitude of the 1 Hz signal component changes at a much slower rate compared to the 5 Hz component. Explain how this knowledge can be used when tuning the Kalman filter. (5p). Solution: (a) Defining A = α + β and cos ϕ A = and the result follows. α we obtain α +β Asin(t + ϕ A ) = α sin t + β cos t (b) The parameters to track are α,β,γ and θ and we hence put them into the state-vector x(n) = [ α β γ θ ] T From the problem formulation the amplitudes are assumed to vary slowly and a simple random walk model is suitable for the state-update equation: 1 x(n + 1) = 1 1 x(n) + w(n) } {{ 1 } A where w(n) is a zero mean random vector with covariance matrix Q 1. The measurement equation is then derive d directly from the signal model as y(n) = C n x(n) + e(n) where the time varying row vector C n is given by C n = [ sin(π 5n t) cos(π 5n t) sin(π 1n t) cos(π 1n t) ] and the measurement noise e(n) is zero mean and a (co)variance Q.

(c) In the model the rate of change for each of the parameters are described in the diagonal elements of Q 1. To capture the knowledge that the 1 Hz signal is changing amplitudes at a rate much slower then the 5 Hz signal we can for example use [ ] s1 I Q 1 = s I where I are identity matrices of size by and s 1 and s are two positive scalars. By setting s 1 > s we explicitly model that α and β varies faster than the two other parameters. The relative sizes between on one hand s 1 and s and on the other hand Q control trade off between the how fast the filter can track changes and the variability of the estimates of the tracked parameters. If Q is selected small in comparison with s 1 and s then measurements are assumed good and tracking speed is fast. 7