Digital signal processing using matlab pdf free download






















In addition, image processing is discussed in several chapters with examples taken from medical imaging. Finally, new to this second edition are two chapters on classification that review linear discriminators, support vector machines, cluster techniques, and adaptive neural nets.

Comprehensive yet easy to understand, this revised edition of a popular volume seamlessly blends theory with practical application. Most of the concepts are presented first by providing a general understanding, and second by describing how the tools can be implemented using the MATLAB software package. Through the concise explanations presented in this volume, readers gain an understanding of signal and image processing that enables them to apply advanced techniques to applications without the need for a complex understanding of the underlying mathematics.

A solutions manual is available for instructors wishing to convert this reference to classroom use. Neural network-based compression methods. Preface Why and How this Book was Written Sometimes it is easier to say what a book is not than what it exactly represents. From this point of view, our book is certainly not a traditional course, although it recalls many theoretical signal processing concepts.

Indeed, we emphasize a limited number of important ideas instead of making a detailed description of the involved concepts. Intuitive manners have been used to link these concepts to physical aspects. Hence, we hope that reading this book will be much more exciting than studying a traditional signal processing course.

This book is also not a physics course, although a major purpose of most proposed exercises is to link abstract signal processing concepts to real-life problems. The main topics of this book cover the usual program of an undergraduate signal processing course.

It is especially written for language and computer science students, but also for a much larger scientific community who may wish to have a comprehensive signal processing overview. Students will certainly find here what they are looking for, while others will probably find new and interesting knowledge. This book is also intended to illustrate our pedagogical approach, which is based on three major reasons: 1.

Students need to know how the teaching provided can be useful for them; it is their customer attitude. Students have good potential for doing independent work; their interest and curiosity should be continuously stimulated by: — using a diversified pedagogical approach that combines the two sides of a complete presentation methodology: from components to the system and vice versa; — encouraging them to take advantage of their creativity through interactive educational tools; they should be allowed to make changes and even contribute to their development.

The role of simulations is becoming more and more important in the framework of a scientific education because it is an effective way to understand many physical phenomena, some of them less known or mastered, and to take into account their complexity. Simulations in signal processing education enable students to learn faster and facilitate the comprehension of the involved physical principles.

From a teaching point of view, simulation tools lead to lower costs and time efficiency. This book is based on a signal processing course, which has been successfully given for many years in several universities.

According to our experience, signal theory abstract concepts and signal processing practical potentialities can be linked only through tutorial classes and simulation projects.

In this framework, simulations appear to be the necessary complement for the classical tripod theory — modeling — experimentation. This book brings together into a clear and concise presentation the main signal processing methods and the related results, using MATLAB software as a simulation tool.

It is submitted to various transformations when it goes through a system. Thus, in a communication chain, the signal is subject to some changes distortion, attenuation, etc. The aim is to understand this evolution in order to properly recover the initial message. In other words, a signal is a physical support of information. It may carry the orders in a control and command equipment or multimedia speech and image over a network.

It is generally very weak and it has to be handled with much caution in order to reach the signal processing final goal, i. Signal processing is widely used in many industrial applications such as: telecommunications, audio and speech signal processing, radar, sonar, nondestructive control, vibrations, biomedicine, imagery, etc. Standard signal processing functions include signal analysis, improvement, synthesis, compression, detection, classification, etc.

The digital signal processing methods provide noteworthy capabilities: accurate system design, excellent equipment reproducibility, high stability of their exploitation characteristics and an outstanding supervision facility.

The digital signal processing boom is related to the development of fast algorithms to calculate the discrete Fourier transform. Indeed, this is the equivalent of the Fourier transform in the discrete domain and so it is a basic tool to study discrete systems.

However, related concepts are generally considered highly theoretical and accessible to scientific researchers rather than to most engineers. This book aims to overcome this difficulty by putting the most useful results of this domain within the understanding of the engineer. Chapter 1 briefly describes essential concepts of MATLAB software, which is an interactive software tailored for digital signal processing. Language rules, elementary operations as well as basic functions are presented.

Chapter 2 illustrates the generation of 1D or 2D image digital signals as data vectors and matrices respectively. Finding the solution of a signal processing problem involves several distinct phases. The first phase is the modeling: the designer chooses a representation model for an observed data. When it can be done very accurately the signals are said to be deterministic. A powerful tool for analyzing them is provided by the Fourier transform, also called frequency representation, which is presented in Chapter 5.

There are many other processes, which give different and apparently unpredictable results, although they are observed using identical experimental conditions. The wide sense stationary random processes, which form a particularly interesting class of these signals, are presented in Chapter 3.

Some useful statistical tools for testing different hypothesis about their parameters behavior are provided in Chapter 4. From a very general point of view, digital signal processing covers all the operations, arithmetical calculations and number handling performed on the signal to be processed, defined by a number series, in order to obtain a transformed number series representing the processed signal.

Very different functions can be carried out in this way, such as classical spectral analysis Chapter 10 , time-frequency analysis Chapters 11 and 12 , linear filtering Chapters 7 and 8 , detection and estimation Chapter 9 , and feature extraction for information classification or compression Chapters 13 and Theoretical developments have been reduced to the necessary elements for a good understanding and an appropriate application of provided results.

A lot of MATLAB programs, solved examples and proposed exercises make it possible to directly approach many practical applications. The reader interested in some more complementary information will find this in the references cited at the end of this book.

It is particularly effective when the data format is vector or matrix. Many demonstrations are available using the command demo. This digital simulation software enables a fast and simple visualization of the obtained results. MATLAB is especially designed for digital signal processing and for complex digital system modeling and simulation. It is also suitable for processing data series, images or multidimensional data fields. MATLAB software general structure The toolboxes extend the basic MATLAB functions and perform specific tasks corresponding to different digital processing fields, such as image processing, optimization, statistics, system control and identification, neural networks, fuzzy systems, etc.

SIMULINK is an interactive software designed for modeling and simulating continuous-time or discrete-time dynamical systems or hybrid structures containing both analog and digital systems. It makes use of a mathematical equation set and provides a large variety of predefined or user-defined functional blocks. MATLAB has been developed for several years, especially as a consequence of its use in the academic environment as an excellent education tool in mathematics, engineering and science.

Important MATLAB commands and functions who lists the variables in the current workspace whos the same as previous, but lists more information about each variable what lists MATLAB-specific files in directory size provides the size of a data array length provides the size of a data vector help displays help text in Command Window exit, quit exits from MATLAB Table 1.

General commands dir, chdir, delete, load, save, type similar to the corresponding DOS commands pack consolidates workspace memory Table 1. Special variables and constants Introduction abs absolute value function sqrt square root function real real part of a complex variable imag imaginary part of a complex variable angle returns the phase angles, in radians, of a complex variable conj complex conjugate operator sign signum function rem returns the remainder after division exp exponential function log natural logarithm function log10 base 10 logarithm function Table 1.

Elementary mathematical functions sin, cos, tan, cot, sec usual trigonometric functions asin, acos, atan, acot, asec inverse trigonometric functions sinh, cosh, tanh, coth, sech hyperbolic functions asinh, acosh, atanh, acoth, asech inverse hyperbolic functions Table 1. Trigonometric functions max largest component min smallest component mean average or mean value std standard deviation sum sum of elements cumsum cumulative sum of elements prod product of elements cumprod cumulative product of elements Table 1.

Data analysis functions 5 6 Digital Signal Processing using MATLAB conv convolution and polynomial multiplication deconv deconvolution and polynomial division roots finds polynomial roots poly converts roots to polynomial polyval evaluates polynomial residue partial-fraction expansion residues Table 1.

Polynomial related functions zeros enables generation of zero arrays ones enables generation of ones arrays rand enables generation of uniformly distributed random numbers randn enables generation of normally distributed random numbers linspace enables generation of linearly spaced vectors logspace enables generation of logarithmically spaced vector det calculates the determinant of a square matrix norm calculates matrix or vector norm inv calculates matrix inverse eig calculates matrix eigenvalues and eigenvectors Table 1.

Vector or matrix related functions input gives the user the prompt and then waits for input from the keyboard ginput gets an unlimited or a predefined number of points from the current axes and returns their coordinates Table 1.

Control commands 1. Running a command usually results in creating one or several variables in the current workspace, displaying a message or plotting a graph. A semicolon has to be added at the end of the statement if it is not necessary to display the result. Both of these are saved with the extension. Some of them are intrinsic, the others being provided by external libraries toolbox : they cover specific domains such as mathematics, data analysis, signal processing, image processing, statistics, etc.

A function may use none, one or several input arguments and return none, one or several output values. In fact, all the variables are local by default. The on-line help can be obtained using: help. The first lines of the file. It is also possible to search all the files containing a given keyword in their help using the command: lookfor.

They can be reloaded using the command load. Type help save and help load for more information. Scalars, vectors, matrices MATLAB handles only one data type, because all the variables are considered as floating point complex matrices. It is not necessary to declare or to size these matrices before using them.

In fact, when a variable is assigned a value, MATLAB replaces the previous value if this variable exists in the work space; otherwise the variable is created and sized properly. You should try to use matrix operation as much as possible instead of loops in order to save execution time and memory space.

The effectiveness of an algorithm can be measured using the functions flops number of floating point operations and etime elapsed time. Thus, the couple of commands flops 0 and flops inserted just before and after an algorithm code line returns the number of operations required.

The function clock yields the present time, while etime t1,t2 provides the time elapsed between t1 and t2. There are some predefined variables. Type clear pi to recover the initial value of this variable. Elementary operations An operation involving 2 variables is possible only if the corresponding matrix sizes match.

Type M :,1 , M :,2 ,N :,1 and M :,2. The pointwise operators: ". Introduction 13 1. However, it is an uncompiled language and thus is not particularly suitable for developing very complex applications.

However, it is provided with all the necessary algorithmic structures for rigorous programming. Consider the couples of vectors x1, y1 and x2, y2. Introduction Original signal sin 2 pi. Generate 1, independent values x1, Plot the corresponding histogram and calculate the mean and the standard deviation of the generated series using the functions hist, mean and std. Find out the mean and the standard deviation of the random series x21, …,x21, Then compare the obtained results with the theoretical results.

A and f are chosen by the user. Estimate the mean value, the autocorrelation function xcorr and the spectrum of x t using the periodogram and the correlogram use fft and fftshift. Compare the obtained results to the theoretical results.

Change A in order to control the SNR. However, the more p moves away from 0. In order to meet these conditions N has to be larger than The explanation comes from the fact that the more p is different from 0. Generate and plot 4 outcomes of the random process x t , sampled at kHz, during 0. Random phase sinusoids The 1st and 2nd order moments are time-invariant.

This random process is therefore wide-sense stationary. Thus, it can also be demonstrated that its autocorrelation function depends only on the difference between the observation moments. Temporal variation of the random process 1st and 2nd order moments Plot the autocorrelation matrix of the random process x t and conclude about its wide-sense stationarity.

Consequently, the autocorrelation matrix only depends on the difference among observation moments. Note that the curve corresponding to the 2nd order moment variation is obtained here as the main diagonal of the autocorrelation matrix. Test the 1st and 2nd order ergodicity property for this random process.

Thus, the process is 2nd order ergodic. Generate a white Gaussian random process with the mean 3 and the variance 3 on 1, points. Plot its autocorrelation function and its power spectral density. Filter the previously generated random process after removing its mean. Use an IIR filter having a zero in 0 and a real simple pole in 0. The two signals will be considered 2nd order ergodic. Comment on the results obtained and conclude about the link between the signal predictability and the shape of its autocorrelation function.

Signals and associated autocorrelation functions The autocorrelation function of the white Gaussian noise is a Dirac pulse, as for large temporal shifting it tends towards the square of the mean value, i. Discrete-Time Random Signals 75 In the case of the filtered noise, the autocorrelation function decreases very slowly. It also tends towards the square of the mean value, which is zero in this case.

The lowpass filtering correlates the random process samples as it can be seen on the corresponding autocorrelation function depicted on the left side of the figure above.

The effect of the convolution introduced by the linear filter depends on its pulse response and it would be easy to verify that the lower its cutoff frequency, the larger the main lobe of the autocorrelation function is and thus, the stronger the correlation introduced by the lowpass filter. It is obvious then that the filtered signal can be partially predicted, while the white noise is completely unpredictable. PSDs of a filtered top and unfiltered bottom white noise The filtering effect can be easily identified on the PSDs plotted on Figure 3.

Note the DC component in the spectrum of the white noise, which corresponds to its mean value. The depicted PSDs are very fluctuant because their estimation is performed using a finite number of samples and no method is used to reduce the estimate variance this topic will be discussed in Chapter They are asked to provide their height and weight, which are compared with the standard values.

The difference between the real and the standard values is a random Gaussian quantity, whose variance depends on the parameter considered. Estimate the correlation coefficient for each pair of variables: weight, height , age, weight and age, height.

A linear system can be characterized using a white noise as input. The power spectral density of the output signal then provides an estimation of its transfer function. Simulate a 2nd order digital bandpass filter, having a central frequency of 2 kHz and a frequency bandwidth of 1 kHz.

Consider a sampling frequency of 10 kHz and a zero-mean white Gaussian noise, with the variance 1, as input signal. Discrete-Time Random Signals 79 Then define a bank of 6th order Butterworth filters, with a frequency bandwidth of Hz, which will be useful to measure the filtered signal power in each frequency band.

Finally, plot the power variation as a function of frequency. Transfer functions The filter bank outputs illustrate properly the frequency system behavior. More accurate results could be obtained by the reduction of the filter frequency bandwidth, but this increases the processing time and results in a more complex filter synthesis instability risk.

The increased signal duration should also be considered to integrate the measured power properly system identification problem: trade-off between the frequency bandwidths of the bandpass filters and the output integrator filter. Determine the pdf of the output signals and estimate their 1st and 2nd order moments.

Go back to exercise 3. Comment on the 2nd order stationarity of the new random process? Does the ergodicity have any sense in this case? The discrete Fourier transform -- 6. Digital filter structures -- 7. FIR filter design -- 8. IIR filter design -- 9. Applications in adaptive filtering -- Applications in communications. There are no reviews yet.

Let N be an even integer. Specifically, let x1 n and x2 n be two N -point sequences. This can be obtained from the one given in the text by two simple changes. If m is a scaler then y n is circularly shifted sequence or array. If m is a vector then y n is a matrix, each row of which is a circular shift in x n corresponding to entries in the vector m. Sequence x n in a closed form: The time-domain sequence x n is a linear combination of the harmonically related complex exponential.

Using the results from Example 5. Such a matrix is called a circulant matrix. It is completely described by the first column or the row. Circular Convolution x3 n 1 Amplitude 0. Circular Convolution x3 n Amplitude 4 2 0 0 5 10 15 20 25 30 35 40 45 50 n Figure 5.

Circular Convolution: x3 n 1. In this method we have to save the intermediate convolution results and then properly overlap these before adding to form the final result y n. From the results of the above two parts, the minimum value of N to make the circular convolution equal to the linear convolution is 7.

If we make N equal to the length of the linear convolution which is equal to the length of x1 n plus the length of x2 n minus one, then the desired result can be achieved. This is a windowed cosine sequence containing no leakage. Verification of the results of parts 1. Sequence: x4 n 1 0.

Sequence: x5 n 1 0. It is a natural result due to the fact that bandlimited periodic cosines are sampled over noninteger periods. Due to this fact, the periodic extension of x n does not result in a continuation of the cosine waveform but has a jump at every N interval.

This jump results in the leakage of one frequency into the abducent frequencies and hence the result of the Problem P5. Sequence: x n 1 0. This is a windowed sine sequence containing no leakage. Sequence: x2 n 1 0. The above result is the leakage property of sines. It is a natural result due to the fact that bandlimited periodic sines are sampled over noninteger periods. Due to this fact, the periodic extension of x n does not result in a continuation of the sine waveform but has a jump at every N interval.

An N -point DFT is used to obtain an estimate of the magnitude spectrum of xa t. Consider the overlap-and-save method of block convolution along with the FFT algorithm to implement high-speed block convolution. Using this approach, determine y n with FFT sizes of , , and Compare the above approaches in terms of the convolution results and their execution times. Canonical structure: i The given structure is canonical ii The given structure is not canonical.

The canonical structure is 0. Block diagram of the above system with input node x n and output node y n is shown below. Transposed block diagram: The block diagram due to steps i and ii is shown below. The normal direct form I structure block diagram is shown below on the left. The transposed direct form I structure block diagram is shown above on the right.

The normal direct form II structure block diagram is shown below on the left. The transposed direct form II structure block diagram is shown above on the right. Clearly it looks similar to that in part 1.

A parallel structure containing second-order normal direct from II sections: Matlab script: 1. A parallel structure containing second-order transposed direct from II sections: Matlab script: 1. The required form is the cascade form. This solution is not unique since numerator and denominator biquads can be grouped differently. The given signal flow graph is a parallel connection containing one second-order cascade branch.

The solution is not unique since any two out of three parallel biquads can be used to construct a cascade branch.



0コメント

  • 1000 / 1000