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

Size: px
Start display at page:

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

Transcription

1 Concordia University Discrete-Time Signal Processing Lab Manual (ELEC442) Course Instructor: Dr. Wei-Ping Zhu Fall 2012

2 Lab 1: Linear Constant Coefficient Difference Equations (LCCDE) Objective In this experiment, you will learn how to use MATLAB to generate the output of the LTI systems that are represented using Linear Constant Coefficient Difference Equation (LCCDE). Introduction Linear Constant Coefficient Difference Equation (LCCDE) is the equation that describes the relationship between the input and the output of a discrete time system. It describes the operation of the system in the time domain and provides a method for computing the response of a system [], to an arbitrary input []. An Nth-order linear constant coefficient difference equation is expressed as [ ] = [ ] = [ ] [ ] with the initial conditions 1 =, 2 =, = and the coefficients 0 and as constants that define the system. The relation in the equation above is a general linear relation between [], the input, and [], the output of the discrete time system. We also say that is the degree of the system. An example is the difference equation

3 [] 2[ 1] = [] where (the order of the discrete difference equation) here is 1. Thus, it is a first-order difference equation. If the difference equation has one or more terms that are nonzero for > 0, the difference equation is said to be recursive. On the other hand, if all of the coefficients, > 0 are equal to zero, the difference equation is said to be non-recursive [1][2]. LTI System as a Filter A discrete time LTI system that has been designed to achieve a particular purpose or perform a given function, such as frequency selection or attenuation, is called a Filter. The LTI systems can be classified into finite impulse response (FIR) filters and infinite impulse response (IIR) filters according to their impulse responses. The Impulse Response The impulse response is the output of a discrete time LTI system when the input is an impulse signal []. We call the output, [], as h[] when the input [] is []. This is shown in Figure 1. Figure 1. An LTI system can be classified, according to its impulse response, into an FIR or IIR system.

4 Finite Impulse Response (FIR) Systems If the impulse response of a linear time invariant system is of finite duration, the system is said to be a finite impulse response (FIR) system. It is also called a non-recursive system because the output samples can be computed using only the current and previous input samples. An FIR filter can be represented by the difference equation [] = [ ] The output of an FIR system, also, can be computed using the convolution operation [] = [] h[] = h[][ ] = h[][ ] which is equivalent to the difference equation in this case by noting as h. Infinite impulse response (IIR) systems If the impulse response of a linear time invariant system is of infinite duration, the system is said to be an infinite impulse response (IIR) system. It is also called a recursive system because it produces output samples based on the current and possibly previous input samples and the previous values of its own output. It should be noted that if the impulse response is absolutely summable, the filter will be stable. An IIR filter can be represented by the difference equation = [ ] [ ] or more generally, by the convolution theorem.

5 Solution of an LCCDE Using MATLAB The filter command in MATLAB can be used to compute the response of LTI systems that are represented using LCCDE. The filter command has the following syntax y=filter(b,a,x) where is the input signal vector, = [,,,, ] and = [,,,, ] are row vectors representing the coefficients of the LCCDE respectively. is the output sequence. Read more about the filter function in MATLAB help. It should be noted that the output signal generated from filter command has same length as the input signal while using the regular convolution of the input by the impulse response causes an increase in the length of the output signal. Example 1. Find the impulse response for a causal LTI system whose input x[n] and output y[n] are related by the difference equation [] 1 [ 1] = [] 2 Solution: This is a recursive equation, and the system is causal LTI. So the initial rest condition can be applied ( [] = 0 for all 1 ). The input signal is [] = [], so we can compute [] for 0 as follows [0] = [0] [ 1] = 1 [1] = [1] [0] = 1 2 [2] = [2] [1] = 1 2 [3] = [3] [2] = 1 2 and so on. Thus, the solution can be written as

6 [] = h[] = 1 2 [] The impulse response h[] is of infinite duration, so the system is infinite impulse response (IIR). Pre-lab Question 1. Consider a causal LTI system whose input [] and output [] are related by the following LCCDE [] = 1 [ 1] + [] 4 (a) Determine the impulse response h[]. (b) Determine [] for [] = [] [ 10]. Question 2. Look up in the MATLAB help about the filter command description, and determine how you can define the vectors and. Note: You may need the following MATLAB commands to answer the lab problems. So it is recommended to read MATLAB help about them. Elementary Matrices and Matrix Manipulation: i, ones, pi, rand, randn, zeros. Two-Dimensional Graphics: axis, grid, legend, plot, stem, title, xlabel, ylabel. Elementary Functions: cos, sin, exp, imag, real. Data Analysis: sum

7 Lab problems Create script files for each question. Include your name and ID as comments in the script files. For each question, submit as part of the written lab report, the script file and any required plots. It is suggested to save the script file under meaningful name, such as LAB1_P_1.m. Problem 1. Use 0 50 to answer the following parts. (a) Use MATLAB conv (convolution) command to find the output [] for question1- part (b) in the Prelab section. (b) Use MATLAB filter command to find the output [] for question1-part (b) in the Prelab section. Note: plot the input signal and the output signal in the same figure for each part. Adjust the title, xlabel and ylabel accordingly. (c) Explain any differences between using conv and filter commands. Problem 2. Use filter command to answer to this problem. Consider an LTI system whose input [] and output [] are related by the following LCCDE [] = 1 2 [ 1] 1 [ 2] + [] + 2[ 1] + [ 3] 4 (a) Determine and plot the impulse response of the system over 0 100, and determine the stability of LTI system from h[]. (Hint: An LTI system with impulse response h[] is stable if and only if h[] is absolutely summable) (b) Determine and plot the output [] over 0 200, if the input to this system is [] = [ cos sin0.7 ][] Note: Plot the input signal and the output signal in the same figure for each part. Adjust the title, xlabel and ylabel accordingly. Problem 3. A digital differentiator is given by

8 [] = [] [ 1] which computes a backward first-order difference of the input sequence. Implement this differentiator on the following sequences, plot the results and give your comments on the output results (a) [] = 5[] [ 30], (rectangle pulse) (b) [] = [] [ 20] + 40 [ 20] [ 40], (triangle pulse) (c) [] = 15 sin [] [ 100], (sinusoidal pulse) Note: plot the input signal and the output signal in the same figure for each part. Adjust the title, xlabel and ylabel accordingly. Problem 4. A common example of a digital signal processing application is the removal of the noise component from a signal corrupted by additive noise. Let [] be the signal corrupted by a random noise [] resulting in the noisy signal [] = [] + []. The objective is to operate on [] to generate a signal [] which is a reasonable approximation to []. To this end, a simple approach is to generate an output sample by averaging a number of input samples around the sample at instant. For example, a three-point moving average filter is given by [] = 1 [ 1] + 2[] + [ + 1] 4 Given the following system Where [] is given by the following MATLAB code %%========================== Number_of_samples=200; Time_length=20;

9 Ts=Time_length/(Number_of_samples-1); n=0:ts:time_length; %real signal, non-periodic xn= ((0.9).^n).* cos(2*pi.*n); %%========================== LTI system-1 is given by [] 1 [ 1] = [] 4 [] is a Gaussian noise with zero mean and 0.2 standard deviation. LTI system-2 is given by [] = [] 1 [ 1] 4 (a) Determine and plot each of the following signals [], [], [], [], [], [], make sure that you plot all signal in the same figure using subplot command and adjust the title, xlabel and ylabel accordingly. (b) Calculate the mean square error (MSE) between [] and [] and the ratio of the MSE to the squared size of []. Note: If we have an original signal [] and a recovered signal [], both of length N, the mean square error is calculated as = [] [] Also, the squared size of the [] (energy) is calculated as = []

10 Lab 2: The Z-Transform Objectives To see how Z-transform can be used to answer questions concerning stability, causality and convergence To see how Z-transform can be used to determine system output To study the use of Z-transform in the systems design process To see how Z-transform is used in the analysis for frequency response Pre-Lab Signal Acquisition Prior to coming to the lab, you should acquire a real-life signal of some sort. Recall that signal is a stream of data. The data in your stream may be real or complex. The stream should be single channel and one dimensional. It should of course be a digital signal. Possible ways to acquire a signal can be Running an experiment at work/home and capturing the results of the experiment on the computer Running a software experiment on the computer Investigation of sources on the computers at Concordia (like images and sounds) Getting signals from the internet Any other way you want During the lab period, you must place at least 1000 samples of your signal in the directory designated by the TA and hand in a write-up to the lab TA that: Describes the signal that you acquired and how you acquired it. Describes why it is an interesting/important signal (This will likely be the most interesting part, so do not be afraid to indulge in a very good description).

11 State the sampling rate and the unit of the samples (for example, if the signal is the output of a stereo amplifier to a speaker, the unit might be volts) If you cannot say what unit it is, then explain it as best you understand it. The file containing your signal should be ASCII readable format (text). It should be such that it can be loaded into MATLAB using the load command. This means that the file can take one of the two following formats: 1- The number representing each sample is placed on a new line. Thus, there is only one number on each line (column vector). 2- The numbers representing the samples are all on the same line each separated by one or more spaces. This file contains one line (row vector). Z-Transform Laplace transform can be considered to be a generalization of the Fourier Transform (FT) in the continuous-time domain. Similarly, in the discrete-time domain, Z-transform is a generalization of the discrete-time Fourier Transform (DTFT). Z-transform plays an important role in both analysis and design of discrete-time systems. It provides another domain in which signals and systems can be investigated. The two sided or bilateral Z-transform can be written as the following summation = [] or notationally as = {[]}. Two important properties of Z-transform are apparent from its definition. First, this transform is linear. Its second property enables the treatment of shifted sequences, i.e. [] [ ] Z-transform has many other valuable properties that make it a powerful analysis tool. One of the most important properties is the equivalence of convolution of two sequences and the multiplication of Z-transform in the transform domain, i.e.

12 [] [] where denotes the convolution operation in time domain. By expressing the complex variable in the polar form as =, Z-transform has an interpretation in terms of Fourier transform. With so expressed, the Z-transform becomes = [] = [] If = 1, i.e. = 1, the Z-transform is equivalent to the DTFT of the sequence []. In this experiment, we motivate the use of Z-transform by the role it plays in both design and analysis of discrete-time systems. Problem 1. The focus in this problem is on demonstrating how the Z-transform answers questions concerning causality, stability and convergence. Consider the second-order system transfer function and an input sequence specified by = = The input sequence is taken to have a region of convergence (ROC) given by > Derive theoretically the inverse z-transform of associated with the different regions of convergence. Indicate all relevant steps. On a polar plot, indicate the pole and zero locations of the second-order system as well as the corresponding ROCs. Discuss the causality and stability for each ROC. Does the Fourier Transform = exist for each ROC? 2. Theoretically, calculate the convolution of the input sequence corresponding to with the stable sequence(s) corresponding to. Show all relevant analytical calculations. Does the Fourier Transform exist for all ROC of?

13 Generate the convolution of the input sequence for with the stable sequence(s) corresponding to using the MATLAB routine conv. Consider an input sequence and impulse response of length = 10 samples and length = 250 samples. These results are to be compared with the analytical expression you derived in Part 2. From the analytical expression(s) of Part 2, generate two sequences of lengths N = 19 and N = 499 samples. Plot your results using the stem routine. Label each convolution sequence accordingly. Do the numerical convolution results agree with the theoretical expression? Why or why not? Problem 2. Knowledge of the impulse response of a system is very important in digital signal processing. In this problem, you will find the system transfer function of an unknown system by determining the system impulse response. 1. Find the impulse response of the unknown system defined by the function func_8. This can be done by using an impulse as the input to func_8. Use the MATLAB command stem to show the results. (You should be given func_8 as an m-file) a. Generate an N-point sample input (take N=32 for this experiment). 1, = 0 [] = [] = 0, 0 < 1 b. Determine the output of the unknown system defined by func_8. 2. Do the following: a. Define x [n] = 2δ[n 3] as in (1) using 100 samples. b. Find the output [] = [ []] with as the system defined by func_8. c. Using the convolution routine conv in MATLAB, evaluate [] as [] = [] h[] 3. Is the system LTI? Is this system stable? Explain why. 4. If is LTI and given that its impulse response is exponential, find the transfer function. Why must the system be LTI so that its transfer function can be determined? Is it necessary that it is also stable?

14 Recall that the frequency response of a system is equivalent to evaluating the transfer function of that system on the unit circle, i.e. let = = Using this methodology, it is possible to sketch the frequency response of the system that is related to its poles and zeros. Here we will only consider the magnitude response, while phase response can be considered in a similar way and is left as an exercise. Let be written in its factorized form Then, the magnitude response can be written as = = A geometrical interpretation can be formed by evaluating the magnitude response of an arbitrary term. The point lies on the unit circle at an angle of as in Figure 2. The location of = is also shown in the figure. The quantity of interest is the magnitude of the difference between these two vectors as shown in Figure 2. Figure 2: Geometric interpretation of the contribution of the magnitude response due to a single root at an arbitrary frequency.

15 It is evident that as the vector rotates from 0 to 2 in a counter-clock-wise direction, the magnitude of the difference vector also varies. The implication of the geometric representation is that we can evaluate the magnitude response due to the root as the length of this difference vector at different frequencies in the range [0, 2]. In Figure 2, at ω = 0, the magnitude of the difference vector is some finite value. As ω starts to increase, this value starts decreasing and is minimum when ω = θ, the angle of the root z. If we continue to increase ω, the difference magnitude again starts to increase until ω = 2π at which point everything is repeated again. From this geometrical interpretation, the idea of periodicity of DTFT is evident. That is, if we continue to rotate around the unit circle beyond 2, the magnitude starts to repeat. Each such revolution of the magnitude around the unit circle corresponds to a single period which leads to the idea of periodicity of the DTFT. The example of Figure 2 illustrates how the graphical representation can be generalized to represent any arbitrary system function. The magnitude response can be represented as the product of individual difference vectors for the zeros divided by the product of difference vectors for the poles at each frequency. At this time, several useful observations relating the magnitude response and pole/zero locations can be made. Zeros close to the unit circle cause the DTFT magnitude dip in the region near the zeros and the minimum value of the dip occurs at the angle of the zero. If the zero is on the unit circle, the DTFT magnitude is zero for that frequency (angle of zero). Similarly, the poles close to the unit circle force a peak in the magnitude response at frequencies close to the angle of the poles. With these observations in mind, we are able to generate a rule for sketching the magnitude response of. As we move around the unit circle the magnitude peaks when we pass close to a pole and dips when we pass near a zero. The sharpness of the peaks and valleys depend on the closeness of the poles and zeros on the unit circle. Poles and zeros far from the unit circle do not affect the magnitude response significantly.

16 Problem Given an all-pole filter (IIR) transfer function 1 = (a) Find its magnitude response using the MATLAB routine freqz. From the magnitude response what can be said about the pole locations? (b) From the magnitude response, try to sketch the pole/zero plot. (c) Using zplane routine, plot the true pole/zero locations. 2. Repeat (1) for the all-zero (FIR) filter transfer function given by Hz = Repeat (1) for the following transfer function (use a value of = 0.8) = 1 2 cos cos +, = /4 Based on part (3) above, answer the following questions. What visible clues in the magnitude response of the given transfer function provide information about the pole/zero locations? How are these clues affected by the poles and zeros away from the unit circle? How does affect the pole locations? What values can take such that the system is stable? Based on your sketch of the magnitude response from the pole/zero plot, what can you say about the system function of this filter (What does this system do)? Problem 4. In this discussion, the effect of pole locations on the output of a discrete-time system is considered. The effect that the poles have on system dampening behavior is investigated by examining a simple system. 1. Using MATLAB, implement and test a two pole oscillator. An oscillator can be understood as a system that continues to generate an output between prescribed limits once it has been started, i.e. a marginally stable system. The sampling rate is 1200Hz with the resonant or center frequency of the system taken to be 35Hz. The output of the oscillator is to be a sequence of real numbers. A two pole oscillator

17 has a complex-conjugate pair of poles that ensure a real system. The output of this two pole oscillator contains a sinusoid of frequency 35 Hz. Design notes should include a polar plot of the pole locations with sampling rate and resonant frequency appropriately indicated on the plot. The difference equation of the oscillator should be included with the initial conditions required to initiate oscillation. Can any input to the oscillator be used to start the system oscillating with bounded amplitude? What if a unit step of finite amplitude is used as the initial excitation? (Would the output of the oscillator have a bounded output?) Generate and plot 32 samples of the oscillator output. The time axis should be properly scaled in seconds. Hint: Examine the input-output relationship in the z-domain. 2. The output of the oscillator is to be dampened. Explain what must be done in order to dampen the output. Note that dampening and attenuation are different. Choose an example where the output of the system is dampened and plot the output of the system for 256 samples.

18 Lab 3: The DFT and the Sampling Theorem Objectives The principle objectives of this experiment are To introduce the DFT as a signal analysis tool and LTI filters as signal restoration tools (this lab involves designing filters based on analysis using the DFT and other tools) To study the effects of different sampling rates To understand the issues involved in sampling of a continuous-time signal To be able to use the filter design tools provided by MATLAB To have an introduction to multirate filtering Spectrum of a Signal In chapter 2 of Oppenheim and Schaefer [1], we learned how to express a signal in the frequency domain using the Fourier Transform for Discrete Signals. The transform takes the following form = [] This is a transform that must be done on pencil and paper. In class, we learned of the Discrete Fourier Transform (DFT) which is similar to the above but can be done on a digital computer. The DFT is normally defined as = []

19 15 for = 0,, 1, where In class, we learned some of the differences between the Discrete-Time Fourier Transform (DTFT) and the DFT. We also learned that Fast Fourier Transform (FFT) is a method of evaluating the DFT that is computationally more efficient. MATLAB command fft will evaluate the DFT using an efficient FFT algorithm. Problem 1. Look in the folder Data_for_Lab3 and look at the READ ME file. Read this file carefully. It will tell you the names of several signals, names of the corresponding corrupted signals and a short description of each of the signals. Now, take the spectrum of each of the signals and their corruption. Plot the signals in the time domain and provide sketches of them in the frequency domain. Describe qualitatively what you see in the plots. Objective Quality Measurement The corrupted signals are degraded versions of the originals. We would like to quantify how much corruption has taken place. A common measure of degradation is Mean Squared Error (MSE). If we have a signal x[n] and the same signal corrupted by some way called x [n], each of length N, then the following is the MSE = 1 [] [] Problem 2. Write a MATLAB code to determine the MSE for each of the signal pairs that you read about in the README file and obtain the MSE s. Give these results in your write-up. Signal Restoration Signal Restoration usually refers to the enhancement or improvement of signals that have been degraded in some way.

20 Problem 3. For each of the two signal pairs given, try to recover the signal by designing an LTI filter using MATLAB tools as discussed in the class. Your LTI filter will take the corrupted signal as input. The output should be as close to the original signal as possible. Use MSE as a quality measure for this task and state the MSE that you were able to obtain with your filter. Give the details of your approach in designing the filter and the designed filer itself. Use the following Limit your filter to an FIR filter of length 20. Design your system using an FIR filter of length 50. Design your system using an IIR filter of order 20. Design your system using an IIR filter of order 50. Design your system using any kind of processing you like (not necessarily LTI). Your only restriction is that the only input is the corrupted signal. NOTE: the MSE values that you obtained will be used to grade this lab. Be sure to give all your MSE values. Sampling Issues Signals bearing information may be available in either analog or discrete forms. An analog signal is one in which both the amplitude and time vary continuously in the prescribed intervals, respectively. Speech signals or the electrical activity of the brain (EEG) are examples of such signals. Conversely, a discrete signal takes on digital values of the amplitude and time. Examples of which are computer data and telegraph signals. A discrete signal can always be generated from an analog signal by the Analog to Digital (A/D) conversion. The operations involved in such a conversion are anti-alias filtering, sampling and quantization, as depicted in Figure 3. Figure 3: Analog to Digital Conversion.

21 The key operation involved in the (A/D) process is sampling and is provided by what is known as the Sampling Theorem. It is this topic that we will explore in this section. In the ideal sampling operation, only exact values of the continuous signal at uniformly spaced discrete intervals (, where denotes the sampling period) are retained. A sampled signal can be generated by using a method referred to as sampling by modulation as shown in Figure 4. The modulator scheme uses a train of impulses as the carrier, = The sampled signal (where the subscript s refers to sampled) can now be represented as = = Taking the Fourier Transform (DTFT) of we obtain = F = 1 2 F[] F = 1 2 with denoting the convolution operator and = manipulations, we obtain is the sampling frequency. By further = 1 = 1 The above analysis demonstrates how the spectrum in ideal sampling can be achieved. It also shows that the FT of the sampled signal is periodic in frequency domain with period.

22 Figure 4: Ideal Sampling by Modulation. Sampling Theorem In this section, one version of the sampling theorem is discussed in which aliasing is avoided when all frequency components of a continuous-time signal are band-limited to. From the FT of the ideally sampled signal, it is evident that as the sampling period is decreased ( increases), all replicas of move farther apart (see Figure 5 the middle). On the other hand, if increases ( decreases), the replicas of move closer together. As is continually increased, a point will be reached where the replicas will begin to overlap as shown in Figure 5 bottom. This overlap of the frequency spectrum is known as aliasing or folding. The maximum sampling period (equivalent to minimum sampling frequency) at which there is no aliasing is attained when = 2 = 2 = 2

23 Figure 5: Fourier Transform of continuous time and the sampled signal. where or is the highest frequency component in. In the communications literature, or is called the Nyquist frequency and = 2 or = 2 is called the Nyquist rate. Assuming ideal sampling, the ideal low-pass reconstruction can be stated as follows. Let denote a continuous-time signal with Fourier Transform such that = 0 i.e. the Nyquist bandwidth of is equal to. < Then can be expressed (reconstructed) exactly in terms of its samples as = sin where the sampling period must meet the Nyquist criterion as 2 = = 2 > 2

24 Reconstruction The lowpass version of the sampling theorem provides insight into the way a discrete-time signal can be reconstructed back into a continuous-time form. We note that in the above continuoustime signal representation, the discrete-time samples implied by = are convolved with an ideal lowpass filter specified by its impulse response h = sin In practice, the conversion of a sampled signal to a continuous-time form, referred to as the digital to analog (D/A) operation, involves two parts, namely a hold operation followed by lowpass filtering. The most common form of hold operation is the zero-order hold or sample and hold. The impulse response for the sample and hold device is given by h = 1, 0 < 0, h The operation of the sample and hold is illustrated in Figure 6. Note that the lowpass filter operation which follows the sample and hold removes the higher order spectral components of the spectrum which are the replicas of the baseband signal spectrum.

25 Figure 6: Reconstruction of a continuous time signal. Problem 1. Consider a sinusoidal signal = sin where = 10 /. 1. Using a sampling rate 20 times the Nyquist rate, simulate the continuous-time signal. Using the MATLAB plot routine, generate the graph over the time interval 0 1 seconds. Ensure that the graph has proper time scale. 2. Sample at the Nyquist rate and overlay the resulting sequence on the above graph using the MATLAB stem routine. See also hold and axis routines to do this. [The sampled sequence [] above can be generated by using the functions exp2_pl, which has been generated for this experiment. For example, given the sampling rate and the length of the time interval = 1 seconds, the sampled sequence [] can be generated as [t,x]=exp2_pl(f s,t f ) where t is a time vector representing the sampling instants and x is the sampled sequence []]. Problem 2. The signal of interest is = 1 2 sin sin sin sin30 1. Theoretically calculate the two-sided FT of.

26 2. Sample on the interval 0 20 at 20 times the Nyquist rate. Evaluate its twosided spectrum using discrete Fourier Transform (DFT). The details of this will be discussed in the future experiments. Here, we are only concerned with using the transform to derive the spectrum. The DFT is performed in MATLAB by using the routine fft. The output of the transform, which we denote by is a complex sequence of length N samples representing the phase and magnitude information contained in the spectrum. The important point to note here is that the samples of the DFT spectrum are spaced in normalized frequency by = 2 = 0, 1,, 1 This means that the spectral width (frequency separation) of each DFT sample is 2 / in normalized frequency, implying that a sinusoid with normalized frequency = / will appear in the DFT spectrum at the DFT sample (bin) if <. Normalized frequency can be changed to the absolute scale frequency by multiplying it by the sampling rate to obtain a scheme for the signal DTFT. [Use the MATLAB function named, exp2_p2 that has been written to give the required sequence directly, e.g. [F,Y]=exp2_p2(f s,t f ) where Y is the DFT of sampled at the rate over the interval 0 and F is the vector containing frequency spacing of the spectrum in Y]. 3. Plot the two-sided spectrum evaluated in (2) using the MATLAB stem routine. 4. Repeat 2 and 3 with the following sampling frequencies: a. 3/2 time the Nyquist rate b. 5/6 times the Nyquist rate c. 13/30 times the Nyquist rate Plot all graphs with the same axes.

27 Question 1. Explain the differences in signals spectra in case of meeting Nyquist criterion (no aliasing) and violating it (having aliasing). Why the resulting frequency components exist in the observed locations? What are these frequency locations? (Use the frequency folding or aliasing around = /2) Question 2. Given that the sampling rate for is fixed to be 20Hz, how would it be possible to ensure that the spectrum of the sampled signal [] for the frequencies 0 10 is a true representation. Draw a block diagram of the procedure to meet such an objective.

28 Lab 4: Multirate Digital Signal Processing Objective In this lab experiment, you will learn how to use MATLAB to implement sampling rate conversion and multirate signal processing systems. Introduction A multirate Digital Signal Processing (DSP) system is characterized by the use of multiple sampling rates in its realization. That is, signal samples at various points in the systems may not correspond to the same physical sampling frequency. Some applications of multi-rate processing include Sampling rate conversion between different digital audio standards Digital anti-aliasing filtering (used in commercial CD players) Sub-band coding of speech and video signals In some applications, the need for multi-rate processing comes naturally from the problem definition (e.g. sampling rate conversion). In other applications, multi-rate processing is used to achieve improved performance of a DSP function (e.g. lower binary rate in speech compression). In our previous experiments, we have assumed that all signals in a given system have the same sampling rate. We have interpreted the time index as an indicator of the physical time, where is the sampling interval. In many practical applications of DSP, one is faced with the problem of changing the sampling rate of a signal, either increasing it or decreasing it by some ratio. For example, in telecommunication systems that transmit and receive different types of

29 signals (e.g. speech, video, etc.), there is a requirement to process the various signals at different rates commensurate with the corresponding bandwidths of the signals. The process of converting a signal from a given rate to a different rate is called sampling rate conversion. In turn, systems that employ multiple sampling rates in the processing of digital signals are called multirate digital signal processing systems. Fundamental Multirate Operations The two basic operations in a multirate system are decreasing and increasing the sampling rate of a signal. The former is called decimation or down-sampling. The latter is called interpolation or up-sampling. Downsampling and Decimation Downsampling can be considered as the discrete-time counterpart of sampling. Whereas in sampling we start with a continuous-time signal and convert it to a sequence of samples [], in downsampling we start with a discrete-time signal [] and convert it to another discrete-time signal [], which consists of subsamples of []. Thus, the formal definition of M-fold downsampling is [] = [] where is a positive integer. The block diagram representation of the downsampler is shown in Figure 7. Figure 7: Down-sampler by integer factor M. Where the output sequence [] is sampled at sampling rate equal to 1/th of the sampling rate of input sequence []. The downsampler can be implemented by keeping all the input samples that have indices equal to an integer multiple of.

30 Example 1. Downsampling by integer factor 2, = 2. Figure 8: Down-sampling by integer factor = 2. Note that the samples corresponding to = 1, 3, 5, 7, 9 are lost by downsampling. The frequency domain relation between the input [] and the output [] of a downsampler is given by = 1 as we see, the output discrete Fourier transform can be viewed as copies of the periodic discrete Fourier transform of frequency scaled by factor and shifted by

31 integer multiple of 2. For more detail about how the frequency domain relation between and is derived read section 4.6 from [1]. Since downsampling operation, like sampling, leads to potential aliasing, it is desirable to precede the downsampler with an anti-aliasing filter. Unlike sampling, here the input signal is already in discrete time, so we use a digital anti-aliasing filter. The anti-aliasing filter, also called the decimation filter, should approximate an ideal low-pass filter with cut-off frequency /, as shown in Figure 9. The combination of the lowpass filter followed by a downsampler is called decimation. Figure 9: A general decimation system, lowpass filter has gain equal to 1 and cut-off frequency / combined with down-sampler by integer factor M. Upsampling and Interpolation Upsampling is another operation on a discrete-time signal that yields a discrete-time signal. It is related to reconstruction of a discrete-time signal, similar to interpolation that yields a continuous-time signal. However, the relation is less obvious than in the case of sampling and decimation. The mathematical definition of L-fold upsampling, where L is a positive integer, is [] = [/], = 0, ±, ±2 0, otherwise The block diagram representation of an upsampler with upsampling factor of is shown in Figure 10.

32 Figure 10: Upsampler by integer factor L. Upsampling (expanding) is an information-preserving operation, i.e. all samples of [] are present in the expanded signal []. The samples of the upsampled signal appear at a rate faster than that of the original signal by a factor. That means [] can always be recovered from [] and no loss of information or aliasing happens. Example 2. Up-sampling by integer factor = 2

33 Figure 11: Up-sampling by integer factor = 2. The frequency-domain relation between the input [] and the output [] of the upsampler is given by = As we see, the shape of the discrete-time Fourier transform (DTFT) of the output signal is constructed by scaling (compressing) the frequency axis by factor. It is actually a copy of the input spectrum being repeated times in the range [, ]. Thus, it should be noted that the shape of the discrete-time Fourier transform of the input signal is preserved confirming our conclusion that upsampling does not lead to aliasing. For more

34 details about how the frequency domain relation between and is derived, refer to section 4.6 from [1][2]. Upsampling does not result in aliasing, but it yields undesired replicas of the signal's spectrum in the range [, ]. These replicas can be eliminated by a digital lowpass filter with cutoff frequency = / and gain equal to following the upsampler, as shown in Figure 12. Figure 12 Interpolation, up-sampler with integer factor L combined with low-pass filter. The combination of upsampler followed by lowpass filtering is called interpolation and the lowpass filter is called an interpolation filter or an anti-imaging filter. Whereas downsampling may or may not be preceded by a decimation filter, upsampler is almost always followed by an interpolation filter, because without such a filter, the upsampled signal has little use. It should be noted that the upsampler and downsampler operations are linear but time-varying (not time-invariant) discrete-time systems. The upsampler and the downsampler building blocks shown in Figure 7 and Figure 10 are often involved in multirate signal processing. Sampling Rate Conversion A common use of multirate signal processing is for sampling rate conversion. Suppose we are given a digital signal [] sampled at interval and we wish to obtain from it a signal [] sampled at interval. The techniques of decimation and interpolation enable this operation, provided the ratio / is a rational number say /. We distinguish now between two possibilities:

35 1) >, meaning that the sampling rate should be increased. This is always possible without aliasing. 2) <, meaning that the sampling rate should be decreased. This is possible without aliasing only if [] is band limited to a frequency range not higher than ± /. If [] does not fulfill this condition, a part of its frequency contents must be eliminated before decimation to avoid aliasing. Sampling-rate conversion can be accomplished by upsampling by factor followed by lowpass filtering and down-sampling by factor as it is observed in Figure 13. The lowpass filter performs both interpolation of the upsampled signal and anti-aliasing. If the sampling rate is to be increased, then we have >. The lowpass filter should then have a cutoff frequency /. If the sampling rate is to be decreased, then we have <. The lowpass filter should then have a cutoff frequency /. In this case, the filter will eliminate a part of the signal's frequency contents if its original bandwidth is higher than /. Thus, the sampling-rate conversion filter should always have a cutoff frequency / max{, }. This configuration is shown in Figure 13. Figure 13: System for changing the sampling rate by a non-integer factor with combined interpolation and decimation filters. Linear filtering with decimation, interpolation, and sampling-rate conversion allows potential computational savings. However, it is not always obvious how to take advantage of this potential saving. Polyphase filters is a name given to certain realizations of multirate filtering operations which facilitate computational savings in both software and hardware implementations. It should be noted that polyphase implementations are useful for FIR filters, but not for IIR ones [1].

36 Pre-lab Question 1. The discrete-time Fourier transform for signals [], [] and [] is shown in Figure 14 (a), (b) and (c) respectively. Use [] as input to the systems (a), (b), (c), (d) and (e) shown in Figure 15 and plot the discrete Fourier transform of the outputs [] (and [] if exist) over the range 2 2. Repeat this for [] and []. 1 1 ω ω (a) 2 ω ω (b) 3 ω (c) Figure 14: Discrete Fourier transform of signals [], [] and []. 2 ω

37 Figure 15: Down-sampler, decimation system, up-sampler, interpolation system and a rate-conversion system. Question 2. Consider the analysis-synthesis system shown in Figure 16. The lowpass filter h [] and the highpass filter h [] are identical in the analyzer and synthesizer parts. The Fourier transforms of h [] and h [] are related by =. Write a general expression for in term of, and. Figure 16: An analysis-synthesis system.

38 Note: The following MATLAB commands you may need to answer the lab problems. It is recommended to read MATLAB help about them. Elementary Matrices and Matrix Manipulation: i, ones, pi, zeros, ones. Two-Dimensional Graphics: axis, grid, legend, plot, subplot, stem, title, xlabel, ylabel. Elementary Functions: cos, sin, exp, imag, real, sinc, fir2, fir1, freqz Multirate Signal Processing: decimate, downsample, interp, upsample

39 Lab problems Create a script file for each question and include your name and ID as comments in the script file. Submit as part of the lab report the script file and any required plots. It is suggested to save the script files under meaningful names such as LAB4_P_1.m. Problem 1. (a) Write a MATLAB script to generate the signals [], [] and [] that have the discrete Fourier transform shown in Figure 14 (a), (b) and (c) respectively. Make sure that each signal has length of 1025 samples. Plot the resulting discrete Fourier transform over the range 1 1 as shown in Figure 17. Hint: You can use either sinc or fir2 MATLAB commands to solve the problem. Figure 17: The magnitude of the discrete Fourier transform of [], [] and [] in MATLAB.

40 (b) Write a MATLAB function that returns coefficients (impulse response) of a general FIR lowpass filter. The function must accept as input the number of coefficients, gain and cutoff frequency. For example function [h_n]=my_lowpass_filter(num_coeff,gain_val,cutoff_freq) Based on the above, do the following. (1) Design a lowpass FIR filter having 128 coefficients, gain equal to 1 and a cutoff frequency of ω = π/3. (2) Design a lowpass FIR filter having 128 coefficients, gain equal to 3 and a cutoff frequency of ω = π/3. Plot the magnitude and the phase of the designed filters over the range 2 2 on the same figure. Adjust the title, xlabel and ylabel accordingly. Hint: You can use the function fir1 command. (c) Use [] of part (a) as the input to the systems (a), (b), (c), (d), and (e) shown in Figure 15 and write a MATLAB script to generate the output [] (and [] if exists) for each system. Plot the discrete Fourier transform of the input signal [] and the output signal [] (and [] if exists) on same figure using subplot command for each system. Adjust the title, xlabel and ylabel for each figure accordingly. Hint: You may find it useful to plot discrete Fourier transform over the range 4 4. The discrete Fourier transform of the output signals for each system shown in Figure 15 using [] as the input signal are shown in Figure 18. (d) Repeat part c for [] and [].

41 Figure 18: The magnitude of the discrete Fourier transform of the input signal [] and the output signals [] of the five systems shown in Figure 15 plotted over the range 4 4 generated using MATLAB. Problem 2. In this problem, you will implement the system shown in Figure 16. Let [] =, where the continuous time signal is given by = [cosω + cosω + cosω + cosω ] with Ω = /, Ω = /, Ω = /, Ω = / and the sampling frequency is = 1/ = Write a MATLAB code to

42 (a) Compute [] = for , and to compute the discrete Fourier transform for 2 2. Plot [] over the range and plot over the range 2 2 using the subplot command. (b) I. Design a lowpass filter h [], FIR filter having 129 coefficients, gain equal to 1 and a cutoff frequency of ω = π/2. II. Design a highpass filter h [], FIR filter such that the Fourier transforms of h []and h [] are related by =. III. Plot the magnitude of both and over the range 2 2. Adjust the title, xlabel and ylabel accordingly and use the subplot command. (c) I. Compute and plot the magnitude of and over the range 4 4 on the same figure using the subplot command. II. Compute and plot the magnitude of and over the range 4 4 on the same figure using the subplot command. III. Compute and plot the magnitude of and over the range 2 2 on the same figure using the subplot command. IV. Plot the magnitude of and over the range 2 2 on the same figure using the subplot command. (d) Determine whether the aliasing phenomenon occurred or not in the above system implementation and discuss its impacts on the output single [].

43 References [1] A. Oppenheim and R. Schafer, Discrete-Time Signal Processing, 2nd ed. Englewood Cliffs, NJ: Prentice-Hall, [2] Signals and Systems, 2nd ed., A.V. Oppenheim and A.S Willsky, Prentice-Hall, ISBN , 1997.

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

PROBLEM SET 6. Note: This version is preliminary in that it does not yet have instructions for uploading the MATLAB problems. PROBLEM SET 6 Issued: 2/32/19 Due: 3/1/19 Reading: During the past week we discussed change of discrete-time sampling rate, introducing the techniques of decimation and interpolation, which is covered

More information

Basic Signals and Systems

Basic Signals and Systems Chapter 2 Basic Signals and Systems A large part of this chapter is taken from: C.S. Burrus, J.H. McClellan, A.V. Oppenheim, T.W. Parks, R.W. Schafer, and H. W. Schüssler: Computer-based exercises for

More information

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

Digital Video and Audio Processing. Winter term 2002/ 2003 Computer-based exercises Digital Video and Audio Processing Winter term 2002/ 2003 Computer-based exercises Rudolf Mester Institut für Angewandte Physik Johann Wolfgang Goethe-Universität Frankfurt am Main 6th November 2002 Chapter

More information

DFT: Discrete Fourier Transform & Linear Signal Processing

DFT: Discrete Fourier Transform & Linear Signal Processing DFT: Discrete Fourier Transform & Linear Signal Processing 2 nd Year Electronics Lab IMPERIAL COLLEGE LONDON Table of Contents Equipment... 2 Aims... 2 Objectives... 2 Recommended Textbooks... 3 Recommended

More information

Electrical & Computer Engineering Technology

Electrical & Computer Engineering Technology Electrical & Computer Engineering Technology EET 419C Digital Signal Processing Laboratory Experiments by Masood Ejaz Experiment # 1 Quantization of Analog Signals and Calculation of Quantized noise Objective:

More information

Multirate Digital Signal Processing

Multirate Digital Signal Processing Multirate Digital Signal Processing Basic Sampling Rate Alteration Devices Up-sampler - Used to increase the sampling rate by an integer factor Down-sampler - Used to increase the sampling rate by an integer

More information

EE 422G - Signals and Systems Laboratory

EE 422G - Signals and Systems Laboratory EE 422G - Signals and Systems Laboratory Lab 3 FIR Filters Written by Kevin D. Donohue Department of Electrical and Computer Engineering University of Kentucky Lexington, KY 40506 September 19, 2015 Objectives:

More information

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

ECE438 - Laboratory 7a: Digital Filter Design (Week 1) By Prof. Charles Bouman and Prof. Mireille Boutin Fall 2015 Purdue University: ECE438 - Digital Signal Processing with Applications 1 ECE438 - Laboratory 7a: Digital Filter Design (Week 1) By Prof. Charles Bouman and Prof. Mireille Boutin Fall 2015 1 Introduction

More information

SMS045 - DSP Systems in Practice. Lab 1 - Filter Design and Evaluation in MATLAB Due date: Thursday Nov 13, 2003

SMS045 - DSP Systems in Practice. Lab 1 - Filter Design and Evaluation in MATLAB Due date: Thursday Nov 13, 2003 SMS045 - DSP Systems in Practice Lab 1 - Filter Design and Evaluation in MATLAB Due date: Thursday Nov 13, 2003 Lab Purpose This lab will introduce MATLAB as a tool for designing and evaluating digital

More information

Module 3 : Sampling and Reconstruction Problem Set 3

Module 3 : Sampling and Reconstruction Problem Set 3 Module 3 : Sampling and Reconstruction Problem Set 3 Problem 1 Shown in figure below is a system in which the sampling signal is an impulse train with alternating sign. The sampling signal p(t), the Fourier

More information

Signals and Systems Using MATLAB

Signals and Systems Using MATLAB Signals and Systems Using MATLAB Second Edition Luis F. Chaparro Department of Electrical and Computer Engineering University of Pittsburgh Pittsburgh, PA, USA AMSTERDAM BOSTON HEIDELBERG LONDON NEW YORK

More information

Lecture 3 Review of Signals and Systems: Part 2. EE4900/EE6720 Digital Communications

Lecture 3 Review of Signals and Systems: Part 2. EE4900/EE6720 Digital Communications EE4900/EE6720: Digital Communications 1 Lecture 3 Review of Signals and Systems: Part 2 Block Diagrams of Communication System Digital Communication System 2 Informatio n (sound, video, text, data, ) Transducer

More information

Advanced Digital Signal Processing Part 2: Digital Processing of Continuous-Time Signals

Advanced Digital Signal Processing Part 2: Digital Processing of Continuous-Time Signals Advanced Digital Signal Processing Part 2: Digital Processing of Continuous-Time Signals Gerhard Schmidt Christian-Albrechts-Universität zu Kiel Faculty of Engineering Institute of Electrical Engineering

More information

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

B.Tech III Year II Semester (R13) Regular & Supplementary Examinations May/June 2017 DIGITAL SIGNAL PROCESSING (Common to ECE and EIE) Code: 13A04602 R13 B.Tech III Year II Semester (R13) Regular & Supplementary Examinations May/June 2017 (Common to ECE and EIE) PART A (Compulsory Question) 1 Answer the following: (10 X 02 = 20 Marks)

More information

Sampling and Reconstruction of Analog Signals

Sampling and Reconstruction of Analog Signals Sampling and Reconstruction of Analog Signals Chapter Intended Learning Outcomes: (i) Ability to convert an analog signal to a discrete-time sequence via sampling (ii) Ability to construct an analog signal

More information

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

Signals. Continuous valued or discrete valued Can the signal take any value or only discrete values? Signals Continuous time or discrete time Is the signal continuous or sampled in time? Continuous valued or discrete valued Can the signal take any value or only discrete values? Deterministic versus random

More information

ECE 5650/4650 MATLAB Project 1

ECE 5650/4650 MATLAB Project 1 This project is to be treated as a take-home exam, meaning each student is to due his/her own work. The project due date is 4:30 PM Tuesday, October 18, 2011. To work the project you will need access to

More information

System analysis and signal processing

System analysis and signal processing System analysis and signal processing with emphasis on the use of MATLAB PHILIP DENBIGH University of Sussex ADDISON-WESLEY Harlow, England Reading, Massachusetts Menlow Park, California New York Don Mills,

More information

Chapter 9. Chapter 9 275

Chapter 9. Chapter 9 275 Chapter 9 Chapter 9: Multirate Digital Signal Processing... 76 9. Decimation... 76 9. Interpolation... 8 9.. Linear Interpolation... 85 9.. Sampling rate conversion by Non-integer factors... 86 9.. Illustration

More information

Experiments #6. Convolution and Linear Time Invariant Systems

Experiments #6. Convolution and Linear Time Invariant Systems Experiments #6 Convolution and Linear Time Invariant Systems 1) Introduction: In this lab we will explain how to use computer programs to perform a convolution operation on continuous time systems and

More information

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

(i) Understanding of the characteristics of linear-phase finite impulse response (FIR) filters FIR Filter Design Chapter Intended Learning Outcomes: (i) Understanding of the characteristics of linear-phase finite impulse response (FIR) filters (ii) Ability to design linear-phase FIR filters according

More information

ECE 429 / 529 Digital Signal Processing

ECE 429 / 529 Digital Signal Processing ECE 429 / 529 Course Policy & Syllabus R. N. Strickland SYLLABUS ECE 429 / 529 Digital Signal Processing SPRING 2009 I. Introduction DSP is concerned with the digital representation of signals and the

More information

Islamic University of Gaza. Faculty of Engineering Electrical Engineering Department Spring-2011

Islamic University of Gaza. Faculty of Engineering Electrical Engineering Department Spring-2011 Islamic University of Gaza Faculty of Engineering Electrical Engineering Department Spring-2011 DSP Laboratory (EELE 4110) Lab#4 Sampling and Quantization OBJECTIVES: When you have completed this assignment,

More information

Digital Signal Processing

Digital Signal Processing Digital Signal Processing Fourth Edition John G. Proakis Department of Electrical and Computer Engineering Northeastern University Boston, Massachusetts Dimitris G. Manolakis MIT Lincoln Laboratory Lexington,

More information

SIGNALS AND SYSTEMS LABORATORY 13: Digital Communication

SIGNALS AND SYSTEMS LABORATORY 13: Digital Communication SIGNALS AND SYSTEMS LABORATORY 13: Digital Communication INTRODUCTION Digital Communication refers to the transmission of binary, or digital, information over analog channels. In this laboratory you will

More information

Digital Processing of Continuous-Time Signals

Digital Processing of Continuous-Time Signals Chapter 4 Digital Processing of Continuous-Time Signals 清大電機系林嘉文 cwlin@ee.nthu.edu.tw 03-5731152 Original PowerPoint slides prepared by S. K. Mitra 4-1-1 Digital Processing of Continuous-Time Signals Digital

More information

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

GEORGIA INSTITUTE OF TECHNOLOGY. SCHOOL of ELECTRICAL and COMPUTER ENGINEERING. ECE 2026 Summer 2018 Lab #8: Filter Design of FIR Filters GEORGIA INSTITUTE OF TECHNOLOGY SCHOOL of ELECTRICAL and COMPUTER ENGINEERING ECE 2026 Summer 2018 Lab #8: Filter Design of FIR Filters Date: 19. Jul 2018 Pre-Lab: You should read the Pre-Lab section of

More information

Understanding Digital Signal Processing

Understanding Digital Signal Processing Understanding Digital Signal Processing Richard G. Lyons PRENTICE HALL PTR PRENTICE HALL Professional Technical Reference Upper Saddle River, New Jersey 07458 www.photr,com Contents Preface xi 1 DISCRETE

More information

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

(i) Understanding the basic concepts of signal modeling, correlation, maximum likelihood estimation, least squares and iterative numerical methods Tools and Applications Chapter Intended Learning Outcomes: (i) Understanding the basic concepts of signal modeling, correlation, maximum likelihood estimation, least squares and iterative numerical methods

More information

Two-Dimensional Wavelets with Complementary Filter Banks

Two-Dimensional Wavelets with Complementary Filter Banks Tendências em Matemática Aplicada e Computacional, 1, No. 1 (2000), 1-8. Sociedade Brasileira de Matemática Aplicada e Computacional. Two-Dimensional Wavelets with Complementary Filter Banks M.G. ALMEIDA

More information

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

(i) Understanding of the characteristics of linear-phase finite impulse response (FIR) filters FIR Filter Design Chapter Intended Learning Outcomes: (i) Understanding of the characteristics of linear-phase finite impulse response (FIR) filters (ii) Ability to design linear-phase FIR filters according

More information

Digital Processing of

Digital Processing of Chapter 4 Digital Processing of Continuous-Time Signals 清大電機系林嘉文 cwlin@ee.nthu.edu.tw 03-5731152 Original PowerPoint slides prepared by S. K. Mitra 4-1-1 Digital Processing of Continuous-Time Signals Digital

More information

Experiment 6: Multirate Signal Processing

Experiment 6: Multirate Signal Processing ECE431, Experiment 6, 2018 Communications Lab, University of Toronto Experiment 6: Multirate Signal Processing Bruno Korst - bkf@comm.utoronto.ca Abstract In this experiment, you will use decimation and

More information

Signal Processing. Naureen Ghani. December 9, 2017

Signal Processing. Naureen Ghani. December 9, 2017 Signal Processing Naureen Ghani December 9, 27 Introduction Signal processing is used to enhance signal components in noisy measurements. It is especially important in analyzing time-series data in neuroscience.

More information

1. In the command window, type "help conv" and press [enter]. Read the information displayed.

1. In the command window, type help conv and press [enter]. Read the information displayed. ECE 317 Experiment 0 The purpose of this experiment is to understand how to represent signals in MATLAB, perform the convolution of signals, and study some simple LTI systems. Please answer all questions

More information

EECS 216 Winter 2008 Lab 2: FM Detector Part I: Intro & Pre-lab Assignment

EECS 216 Winter 2008 Lab 2: FM Detector Part I: Intro & Pre-lab Assignment EECS 216 Winter 2008 Lab 2: Part I: Intro & Pre-lab Assignment c Kim Winick 2008 1 Introduction In the first few weeks of EECS 216, you learned how to determine the response of an LTI system by convolving

More information

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

DIGITAL FILTERS. !! Finite Impulse Response (FIR) !! Infinite Impulse Response (IIR) !! Background. !! Matlab functions AGC DSP AGC DSP DIGITAL FILTERS!! Finite Impulse Response (FIR)!! Infinite Impulse Response (IIR)!! Background!! Matlab functions 1!! Only the magnitude approximation problem!! Four basic types of ideal filters with magnitude

More information

Discrete-Time Signal Processing (DTSP) v14

Discrete-Time Signal Processing (DTSP) v14 EE 392 Laboratory 5-1 Discrete-Time Signal Processing (DTSP) v14 Safety - Voltages used here are less than 15 V and normally do not present a risk of shock. Objective: To study impulse response and the

More information

Sampling of Continuous-Time Signals. Reference chapter 4 in Oppenheim and Schafer.

Sampling of Continuous-Time Signals. Reference chapter 4 in Oppenheim and Schafer. Sampling of Continuous-Time Signals Reference chapter 4 in Oppenheim and Schafer. Periodic Sampling of Continuous Signals T = sampling period fs = sampling frequency when expressing frequencies in radians

More information

Project I: Phase Tracking and Baud Timing Correction Systems

Project I: Phase Tracking and Baud Timing Correction Systems Project I: Phase Tracking and Baud Timing Correction Systems ECES 631, Prof. John MacLaren Walsh, Ph. D. 1 Purpose In this lab you will encounter the utility of the fundamental Fourier and z-transform

More information

Problem Set 1 (Solutions are due Mon )

Problem Set 1 (Solutions are due Mon ) ECEN 242 Wireless Electronics for Communication Spring 212 1-23-12 P. Mathys Problem Set 1 (Solutions are due Mon. 1-3-12) 1 Introduction The goals of this problem set are to use Matlab to generate and

More information

Electrical and Telecommunication Engineering Technology NEW YORK CITY COLLEGE OF TECHNOLOGY THE CITY UNIVERSITY OF NEW YORK

Electrical and Telecommunication Engineering Technology NEW YORK CITY COLLEGE OF TECHNOLOGY THE CITY UNIVERSITY OF NEW YORK NEW YORK CITY COLLEGE OF TECHNOLOGY THE CITY UNIVERSITY OF NEW YORK DEPARTMENT: Electrical and Telecommunication Engineering Technology SUBJECT CODE AND TITLE: DESCRIPTION: REQUIRED TCET 4202 Advanced

More information

Sampling and Signal Processing

Sampling and Signal Processing Sampling and Signal Processing Sampling Methods Sampling is most commonly done with two devices, the sample-and-hold (S/H) and the analog-to-digital-converter (ADC) The S/H acquires a continuous-time signal

More information

ELEC-C5230 Digitaalisen signaalinkäsittelyn perusteet

ELEC-C5230 Digitaalisen signaalinkäsittelyn perusteet ELEC-C5230 Digitaalisen signaalinkäsittelyn perusteet Lecture 10: Summary Taneli Riihonen 16.05.2016 Lecture 10 in Course Book Sanjit K. Mitra, Digital Signal Processing: A Computer-Based Approach, 4th

More information

Lecture Schedule: Week Date Lecture Title

Lecture Schedule: Week Date Lecture Title http://elec3004.org Sampling & More 2014 School of Information Technology and Electrical Engineering at The University of Queensland Lecture Schedule: Week Date Lecture Title 1 2-Mar Introduction 3-Mar

More information

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

The University of Texas at Austin Dept. of Electrical and Computer Engineering Final Exam The University of Texas at Austin Dept. of Electrical and Computer Engineering Final Exam Date: December 18, 2017 Course: EE 313 Evans Name: Last, First The exam is scheduled to last three hours. Open

More information

Lecture 17 z-transforms 2

Lecture 17 z-transforms 2 Lecture 17 z-transforms 2 Fundamentals of Digital Signal Processing Spring, 2012 Wei-Ta Chu 2012/5/3 1 Factoring z-polynomials We can also factor z-transform polynomials to break down a large system into

More information

Copyright S. K. Mitra

Copyright S. K. Mitra 1 In many applications, a discrete-time signal x[n] is split into a number of subband signals by means of an analysis filter bank The subband signals are then processed Finally, the processed subband signals

More information

FFT analysis in practice

FFT analysis in practice FFT analysis in practice Perception & Multimedia Computing Lecture 13 Rebecca Fiebrink Lecturer, Department of Computing Goldsmiths, University of London 1 Last Week Review of complex numbers: rectangular

More information

EE 403: Digital Signal Processing

EE 403: Digital Signal Processing OKAN UNIVERSITY FACULTY OF ENGINEERING AND ARCHITECTURE 1 EEE 403 DIGITAL SIGNAL PROCESSING (DSP) 01 INTRODUCTION FALL 2012 Yrd. Doç. Dr. Didem Kıvanç Türeli didem.kivanc@okan.edu.tr EE 403: Digital Signal

More information

Bibliography. Practical Signal Processing and Its Applications Downloaded from

Bibliography. Practical Signal Processing and Its Applications Downloaded from Bibliography Practical Signal Processing and Its Applications Downloaded from www.worldscientific.com Abramowitz, Milton, and Irene A. Stegun. Handbook of mathematical functions: with formulas, graphs,

More information

Module 9: Multirate Digital Signal Processing Prof. Eliathamby Ambikairajah Dr. Tharmarajah Thiruvaran School of Electrical Engineering &

Module 9: Multirate Digital Signal Processing Prof. Eliathamby Ambikairajah Dr. Tharmarajah Thiruvaran School of Electrical Engineering & odule 9: ultirate Digital Signal Processing Prof. Eliathamby Ambikairajah Dr. Tharmarajah Thiruvaran School of Electrical Engineering & Telecommunications The University of New South Wales Australia ultirate

More information

Laboratory Assignment 5 Amplitude Modulation

Laboratory Assignment 5 Amplitude Modulation Laboratory Assignment 5 Amplitude Modulation PURPOSE In this assignment, you will explore the use of digital computers for the analysis, design, synthesis, and simulation of an amplitude modulation (AM)

More information

II Year (04 Semester) EE6403 Discrete Time Systems and Signal Processing

II Year (04 Semester) EE6403 Discrete Time Systems and Signal Processing Class Subject Code Subject II Year (04 Semester) EE6403 Discrete Time Systems and Signal Processing 1.CONTENT LIST: Introduction to Unit I - Signals and Systems 2. SKILLS ADDRESSED: Listening 3. OBJECTIVE

More information

EE 215 Semester Project SPECTRAL ANALYSIS USING FOURIER TRANSFORM

EE 215 Semester Project SPECTRAL ANALYSIS USING FOURIER TRANSFORM EE 215 Semester Project SPECTRAL ANALYSIS USING FOURIER TRANSFORM Department of Electrical and Computer Engineering Missouri University of Science and Technology Page 1 Table of Contents Introduction...Page

More information

DIGITAL SIGNAL PROCESSING (Date of document: 6 th May 2014)

DIGITAL SIGNAL PROCESSING (Date of document: 6 th May 2014) Course Code : EEEB363 DIGITAL SIGNAL PROCESSING (Date of document: 6 th May 2014) Course Status : Core for BEEE and BEPE Level : Degree Semester Taught : 6 Credit : 3 Co-requisites : Signals and Systems

More information

George Mason University Signals and Systems I Spring 2016

George Mason University Signals and Systems I Spring 2016 George Mason University Signals and Systems I Spring 2016 Laboratory Project #4 Assigned: Week of March 14, 2016 Due Date: Laboratory Section, Week of April 4, 2016 Report Format and Guidelines for Laboratory

More information

Digital Signal Processing

Digital Signal Processing Digital Signal Processing System Analysis and Design Paulo S. R. Diniz Eduardo A. B. da Silva and Sergio L. Netto Federal University of Rio de Janeiro CAMBRIDGE UNIVERSITY PRESS Preface page xv Introduction

More information

Multirate Signal Processing Lecture 7, Sampling Gerald Schuller, TU Ilmenau

Multirate Signal Processing Lecture 7, Sampling Gerald Schuller, TU Ilmenau Multirate Signal Processing Lecture 7, Sampling Gerald Schuller, TU Ilmenau (Also see: Lecture ADSP, Slides 06) In discrete, digital signal we use the normalized frequency, T = / f s =: it is without a

More information

Advanced Digital Signal Processing Part 5: Digital Filters

Advanced Digital Signal Processing Part 5: Digital Filters Advanced Digital Signal Processing Part 5: Digital Filters Gerhard Schmidt Christian-Albrechts-Universität zu Kiel Faculty of Engineering Institute of Electrical and Information Engineering Digital Signal

More information

Instruction Manual for Concept Simulators. Signals and Systems. M. J. Roberts

Instruction Manual for Concept Simulators. Signals and Systems. M. J. Roberts Instruction Manual for Concept Simulators that accompany the book Signals and Systems by M. J. Roberts March 2004 - All Rights Reserved Table of Contents I. Loading and Running the Simulators II. Continuous-Time

More information

Design of FIR Filters

Design of FIR Filters Design of FIR Filters Elena Punskaya www-sigproc.eng.cam.ac.uk/~op205 Some material adapted from courses by Prof. Simon Godsill, Dr. Arnaud Doucet, Dr. Malcolm Macleod and Prof. Peter Rayner 1 FIR as a

More information

Final Exam Practice Questions for Music 421, with Solutions

Final Exam Practice Questions for Music 421, with Solutions Final Exam Practice Questions for Music 4, with Solutions Elementary Fourier Relationships. For the window w = [/,,/ ], what is (a) the dc magnitude of the window transform? + (b) the magnitude at half

More information

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

Digital Filters IIR (& Their Corresponding Analog Filters) Week Date Lecture Title http://elec3004.com Digital Filters IIR (& Their Corresponding Analog Filters) 2017 School of Information Technology and Electrical Engineering at The University of Queensland Lecture Schedule: Week Date

More information

INTRODUCTION DIGITAL SIGNAL PROCESSING

INTRODUCTION DIGITAL SIGNAL PROCESSING INTRODUCTION TO DIGITAL SIGNAL PROCESSING by Dr. James Hahn Adjunct Professor Washington University St. Louis 1/22/11 11:28 AM INTRODUCTION Purpose/objective of the course: To provide sufficient background

More information

CS3291: Digital Signal Processing

CS3291: Digital Signal Processing CS39 Exam Jan 005 //08 /BMGC University of Manchester Department of Computer Science First Semester Year 3 Examination Paper CS39: Digital Signal Processing Date of Examination: January 005 Answer THREE

More information

Signal processing preliminaries

Signal processing preliminaries Signal processing preliminaries ISMIR Graduate School, October 4th-9th, 2004 Contents: Digital audio signals Fourier transform Spectrum estimation Filters Signal Proc. 2 1 Digital signals Advantages of

More information

Department of Electronic Engineering NED University of Engineering & Technology. LABORATORY WORKBOOK For the Course SIGNALS & SYSTEMS (TC-202)

Department of Electronic Engineering NED University of Engineering & Technology. LABORATORY WORKBOOK For the Course SIGNALS & SYSTEMS (TC-202) Department of Electronic Engineering NED University of Engineering & Technology LABORATORY WORKBOOK For the Course SIGNALS & SYSTEMS (TC-202) Instructor Name: Student Name: Roll Number: Semester: Batch:

More information

Chapter-2 SAMPLING PROCESS

Chapter-2 SAMPLING PROCESS Chapter-2 SAMPLING PROCESS SAMPLING: A message signal may originate from a digital or analog source. If the message signal is analog in nature, then it has to be converted into digital form before it can

More information

Signal Processing Toolbox

Signal Processing Toolbox Signal Processing Toolbox Perform signal processing, analysis, and algorithm development Signal Processing Toolbox provides industry-standard algorithms for analog and digital signal processing (DSP).

More information

PROBLEM SET 5. Reminder: Quiz 1will be on March 6, during the regular class hour. Details to follow. z = e jω h[n] H(e jω ) H(z) DTFT.

PROBLEM SET 5. Reminder: Quiz 1will be on March 6, during the regular class hour. Details to follow. z = e jω h[n] H(e jω ) H(z) DTFT. PROBLEM SET 5 Issued: 2/4/9 Due: 2/22/9 Reading: During the past week we continued our discussion of the impact of pole/zero locations on frequency response, focusing on allpass systems, minimum and maximum-phase

More information

Lab 8. Signal Analysis Using Matlab Simulink

Lab 8. Signal Analysis Using Matlab Simulink E E 2 7 5 Lab June 30, 2006 Lab 8. Signal Analysis Using Matlab Simulink Introduction The Matlab Simulink software allows you to model digital signals, examine power spectra of digital signals, represent

More information

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

ESE531 Spring University of Pennsylvania Department of Electrical and System Engineering Digital Signal Processing University of Pennsylvania Department of Electrical and System Engineering Digital Signal Processing ESE531, Spring 2017 Final Project: Audio Equalization Wednesday, Apr. 5 Due: Tuesday, April 25th, 11:59pm

More information

Multirate DSP, part 1: Upsampling and downsampling

Multirate DSP, part 1: Upsampling and downsampling Multirate DSP, part 1: Upsampling and downsampling Li Tan - April 21, 2008 Order this book today at www.elsevierdirect.com or by calling 1-800-545-2522 and receive an additional 20% discount. Use promotion

More information

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

DSP Laboratory (EELE 4110) Lab#10 Finite Impulse Response (FIR) Filters Islamic University of Gaza OBJECTIVES: Faculty of Engineering Electrical Engineering Department Spring-2011 DSP Laboratory (EELE 4110) Lab#10 Finite Impulse Response (FIR) Filters To demonstrate the concept

More information

Outline. Discrete time signals. Impulse sampling z-transform Frequency response Stability INF4420. Jørgen Andreas Michaelsen Spring / 37 2 / 37

Outline. Discrete time signals. Impulse sampling z-transform Frequency response Stability INF4420. Jørgen Andreas Michaelsen Spring / 37 2 / 37 INF4420 Discrete time signals Jørgen Andreas Michaelsen Spring 2013 1 / 37 Outline Impulse sampling z-transform Frequency response Stability Spring 2013 Discrete time signals 2 2 / 37 Introduction More

More information

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

2.1 BASIC CONCEPTS Basic Operations on Signals Time Shifting. Figure 2.2 Time shifting of a signal. Time Reversal. 1 2.1 BASIC CONCEPTS 2.1.1 Basic Operations on Signals Time Shifting. Figure 2.2 Time shifting of a signal. Time Reversal. 2 Time Scaling. Figure 2.4 Time scaling of a signal. 2.1.2 Classification of Signals

More information

McGraw-Hill Irwin DIGITAL SIGNAL PROCESSING. A Computer-Based Approach. Second Edition. Sanjit K. Mitra

McGraw-Hill Irwin DIGITAL SIGNAL PROCESSING. A Computer-Based Approach. Second Edition. Sanjit K. Mitra DIGITAL SIGNAL PROCESSING A Computer-Based Approach Second Edition Sanjit K. Mitra Department of Electrical and Computer Engineering University of California, Santa Barbara Jurgen - Knorr- Kbliothek Spende

More information

Biomedical Signals. Signals and Images in Medicine Dr Nabeel Anwar

Biomedical Signals. Signals and Images in Medicine Dr Nabeel Anwar Biomedical Signals Signals and Images in Medicine Dr Nabeel Anwar Noise Removal: Time Domain Techniques 1. Synchronized Averaging (covered in lecture 1) 2. Moving Average Filters (today s topic) 3. Derivative

More information

Laboratory Assignment 4. Fourier Sound Synthesis

Laboratory Assignment 4. Fourier Sound Synthesis Laboratory Assignment 4 Fourier Sound Synthesis PURPOSE This lab investigates how to use a computer to evaluate the Fourier series for periodic signals and to synthesize audio signals from Fourier series

More information

Final Exam Solutions June 14, 2006

Final Exam Solutions June 14, 2006 Name or 6-Digit Code: PSU Student ID Number: Final Exam Solutions June 14, 2006 ECE 223: Signals & Systems II Dr. McNames Keep your exam flat during the entire exam. If you have to leave the exam temporarily,

More information

Experiment 8: Sampling

Experiment 8: Sampling Prepared By: 1 Experiment 8: Sampling Objective The objective of this Lab is to understand concepts and observe the effects of periodically sampling a continuous signal at different sampling rates, changing

More information

ELEC3104: Digital Signal Processing Session 1, 2013 LABORATORY 3: IMPULSE RESPONSE, FREQUENCY RESPONSE AND POLES/ZEROS OF SYSTEMS

ELEC3104: Digital Signal Processing Session 1, 2013 LABORATORY 3: IMPULSE RESPONSE, FREQUENCY RESPONSE AND POLES/ZEROS OF SYSTEMS ELEC3104: Digital Signal Processing Session 1, 2013 The University of New South Wales School of Electrical Engineering and Telecommunications LABORATORY 3: IMPULSE RESPONSE, FREQUENCY RESPONSE AND POLES/ZEROS

More information

Moving from continuous- to discrete-time

Moving from continuous- to discrete-time Moving from continuous- to discrete-time Sampling ideas Uniform, periodic sampling rate, e.g. CDs at 44.1KHz First we will need to consider periodic signals in order to appreciate how to interpret discrete-time

More information

DSP First Lab 08: Frequency Response: Bandpass and Nulling Filters

DSP First Lab 08: Frequency Response: Bandpass and Nulling Filters DSP First Lab 08: Frequency Response: Bandpass and Nulling Filters Pre-Lab and Warm-Up: You should read at least the Pre-Lab and Warm-up sections of this lab assignment and go over all exercises in the

More information

Lakehead University. Department of Electrical Engineering

Lakehead University. Department of Electrical Engineering Lakehead University Department of Electrical Engineering Lab Manual Engr. 053 (Digital Signal Processing) Instructor: Dr. M. Nasir Uddin Last updated on January 16, 003 1 Contents: Item Page # Guidelines

More information

Brief Introduction to Signals & Systems. Phani Chavali

Brief Introduction to Signals & Systems. Phani Chavali Brief Introduction to Signals & Systems Phani Chavali Outline Signals & Systems Continuous and discrete time signals Properties of Systems Input- Output relation : Convolution Frequency domain representation

More information

Lab S-5: DLTI GUI and Nulling Filters. Please read through the information below prior to attending your lab.

Lab S-5: DLTI GUI and Nulling Filters. Please read through the information below prior to attending your lab. DSP First, 2e Signal Processing First Lab S-5: DLTI GUI and Nulling Filters Pre-Lab: Read the Pre-Lab and do all the exercises in the Pre-Lab section prior to attending lab. Verification: The Exercise

More information

Final Exam Solutions June 7, 2004

Final Exam Solutions June 7, 2004 Name: Final Exam Solutions June 7, 24 ECE 223: Signals & Systems II Dr. McNames Write your name above. Keep your exam flat during the entire exam period. If you have to leave the exam temporarily, close

More information

ME scope Application Note 01 The FFT, Leakage, and Windowing

ME scope Application Note 01 The FFT, Leakage, and Windowing INTRODUCTION ME scope Application Note 01 The FFT, Leakage, and Windowing NOTE: The steps in this Application Note can be duplicated using any Package that includes the VES-3600 Advanced Signal Processing

More information

Spring 2018 EE 445S Real-Time Digital Signal Processing Laboratory Prof. Evans. Homework #1 Sinusoids, Transforms and Transfer Functions

Spring 2018 EE 445S Real-Time Digital Signal Processing Laboratory Prof. Evans. Homework #1 Sinusoids, Transforms and Transfer Functions Spring 2018 EE 445S Real-Time Digital Signal Processing Laboratory Prof. Homework #1 Sinusoids, Transforms and Transfer Functions Assigned on Friday, February 2, 2018 Due on Friday, February 9, 2018, by

More information

Laboratory Assignment 2 Signal Sampling, Manipulation, and Playback

Laboratory Assignment 2 Signal Sampling, Manipulation, and Playback Laboratory Assignment 2 Signal Sampling, Manipulation, and Playback PURPOSE This lab will introduce you to the laboratory equipment and the software that allows you to link your computer to the hardware.

More information

Digital Signal Processing. VO Embedded Systems Engineering Armin Wasicek WS 2009/10

Digital Signal Processing. VO Embedded Systems Engineering Armin Wasicek WS 2009/10 Digital Signal Processing VO Embedded Systems Engineering Armin Wasicek WS 2009/10 Overview Signals and Systems Processing of Signals Display of Signals Digital Signal Processors Common Signal Processing

More information

1 PeZ: Introduction. 1.1 Controls for PeZ using pezdemo. Lab 15b: FIR Filter Design and PeZ: The z, n, and O! Domains

1 PeZ: Introduction. 1.1 Controls for PeZ using pezdemo. Lab 15b: FIR Filter Design and PeZ: The z, n, and O! Domains DSP First, 2e Signal Processing First Lab 5b: FIR Filter Design and PeZ: The z, n, and O! Domains The lab report/verification will be done by filling in the last page of this handout which addresses a

More information

Signal Processing for Speech Applications - Part 2-1. Signal Processing For Speech Applications - Part 2

Signal Processing for Speech Applications - Part 2-1. Signal Processing For Speech Applications - Part 2 Signal Processing for Speech Applications - Part 2-1 Signal Processing For Speech Applications - Part 2 May 14, 2013 Signal Processing for Speech Applications - Part 2-2 References Huang et al., Chapter

More information

ADSP ADSP ADSP ADSP. Advanced Digital Signal Processing (18-792) Spring Fall Semester, Department of Electrical and Computer Engineering

ADSP ADSP ADSP ADSP. Advanced Digital Signal Processing (18-792) Spring Fall Semester, Department of Electrical and Computer Engineering ADSP ADSP ADSP ADSP Advanced Digital Signal Processing (18-792) Spring Fall Semester, 201 2012 Department of Electrical and Computer Engineering PROBLEM SET 5 Issued: 9/27/18 Due: 10/3/18 Reminder: Quiz

More information

SIGMA-DELTA CONVERTER

SIGMA-DELTA CONVERTER SIGMA-DELTA CONVERTER (1995: Pacífico R. Concetti Western A. Geophysical-Argentina) The Sigma-Delta A/D Converter is not new in electronic engineering since it has been previously used as part of many

More information

Lab 4 Digital Scope and Spectrum Analyzer

Lab 4 Digital Scope and Spectrum Analyzer Lab 4 Digital Scope and Spectrum Analyzer Page 4.1 Lab 4 Digital Scope and Spectrum Analyzer Goals Review Starter files Interface a microphone and record sounds, Design and implement an analog HPF, LPF

More information

FUNDAMENTALS OF SIGNALS AND SYSTEMS

FUNDAMENTALS OF SIGNALS AND SYSTEMS FUNDAMENTALS OF SIGNALS AND SYSTEMS LIMITED WARRANTY AND DISCLAIMER OF LIABILITY THE CD-ROM THAT ACCOMPANIES THE BOOK MAY BE USED ON A SINGLE PC ONLY. THE LICENSE DOES NOT PERMIT THE USE ON A NETWORK (OF

More information

EE 470 Signals and Systems

EE 470 Signals and Systems EE 470 Signals and Systems 9. Introduction to the Design of Discrete Filters Prof. Yasser Mostafa Kadah Textbook Luis Chapparo, Signals and Systems Using Matlab, 2 nd ed., Academic Press, 2015. Filters

More information