1-4) using the attached MATLAB codes (Lum - MATLAB Codes). 3. Write a MATLAB Code and generate Figure 1-5 (Exercise 3). Write a report to present your results using the following format (including a cover page): • Title with Date • Objective (Purpose) of the assignment/project • Results with Figure Captions Conclusion • Appendix that includes ALL MATLAB CODES clearly identified with corresponding, generated figures./n Due Mon: 5/16/4/ ELEC 350-MATLAB ASSG # 3. Chapter Excitations fm Page 1 Monday, July 2, 2007 10:50 AM M USD ! CHIXX 1 (B) -Exeruses 1, 2, 3a, 3b *** (C) - Exercise 3. c. Pise Do the Following. (A) - study the given materal (pp.1-8) "(B) - Reproduce Figs / brough Fig 1-4 1. using Lum - Matlab Codes (ATTACHED). (C) - Write a MATLAB CODE & GENERATE Fig 1-5 →→→ Exercise 3c *** *** Generation and Analysis of Excitation Signals Johan Schoukens and Rik Pintelon. Draft version, 16 February 2007. Vrije Universiteit Brus- sel, department ELEC, Pleinlaan 2, B1050 Brussels. email: johan.schoukens@vub.ac.be What you will learn: The aim of this chapter is to study the generation, analysis and use of different classes of excitations signals. What are the best excitations to be used to character- ize the dynamic behavior of a system? You will learn to generate periodic excitation signals and random noise excitations. It will also own how to analyze the behavior of these sig- nals starting from measurements tising fast Fourier transform methods! The properties of ex- citation signals can be shaped to improve the signal-to-noise ratio of the measurements, and it will be illustrated how to do this. Finally, the power of periodic excitation signals will be illu- minated by showing how to calculate the derivative of a signal üsing fft-techniques; at the same time the poise on the data will be removed, and this without building a parametric & model. Because the discrete Fourier transform and its fast implementation (the fast Fourier transform, also called fft) plays a central role in this chapter, we start with a study of its most important features, including alias and leakage errors. 1.1 THE DISCRETE FOURIER TRANSFORM (DFT) continuous, andleg #1/1 (*114) The Fourier integral transforms a signal from the time to the frequency-domain: ult) = (dr. -2π U(jo) N~1 U(I) = SΣ u(kF₂)e where l. = frequency like number (1-1) where w=271f. reveal Although such a transform does not create new information, it might give easier access to some of the properties of the signals. In practice this transform is calculated on a digital com- puter starting from a signal measured in a discrete, finite set of equidistant samples. Hence, the continuous time Fourier transform (1-1) is replaced by the discrete Fourier transform (DFT): (1-2) Chapter_Excitations.fim. Page 2 Monday, July 2, 2007. 10-50 AM b Chapter 1 Generation and Analysis of Excitation Signals : equated In this expression; S is an arbitrary scaling factor that is often pequed to: A M 1/√N for random noise sequences and signals where the number of frequency com- ponents grow proportional to N, e.g. a random noise sequence u-randn (N, 1). ■ 1/N. for sequences where the number of frequency components does not depend upon N, e.g. a sine wave: u-sin (2xt), t= 0, 1, . ..., N - 1. 2 Replacing the continuous Fourier transform (1-1) by the discrete Fourier transform involves the following actions: continuous replaced Discretisation in time: the signal u(t) is represented by the discrete set of samples u(kT). The sample frequency is f, = 1/T,. Windowing: the infinite integration interval ], [ is replaced by a finite window from [0, NT.I. Note that the end point NT, does not belong to the interval. ■ Discretisation in frequency: the integral is calculated at a discrete set of frequencies. U() is the DFT at frequency 1/NT, = lf/N. Observe that the frequency resolu- tion is set by the window length NT, of the previous step. rapidly The DFT can be fastly calculated using the Matlab instruction: U=fft (u), and the in- verse transform is given by u-ifft (). Note that the scaling factors of the Matlab fft- routine is S = 1. The fft and ifft are fastest calculated if the length of u, U is N = 2ª. However, the Matlab implementations allow also signal lengths that are different from this optimal value, while the calculation time is still very small. The major aspects of the three basic steps discussed before (discretisation in time, win-` ¸ ¨ dowing, discretisation in frequency) are illustrated in the next two exercises. In the rest of this chapter and this book, the fft and ifft routines will be intensively used. = The frequency axis of the DFT is often expressed in 'line numbers'. The zero frequency (f = 0) corresponds to line number zero, the 7th line number corresponds to the frequency lf/N. .. Exercise 1 (Discretisation in time: choice of the sampling frequency: ALIAS) Consider two sines with frequency fi= 1 Hz and f₂ = 9 Hz, for example: Ucl (7) sin (2xf₁7), and u(t)=sin(2xf₂7). Sample both signals in the time interval [0, 1[ with a sampling frequency f; = 10: for example un(t) = u(t/f) = u(IT.), with 0, 1, ..., N-1. Make a time domain figure with the continuous time and discrete time signals on one plot. Make a frequency domain plot with the spectrum of the continuous time signals, and the result of the DFT for both signals. Compare the DFT of both signals. Discussion - In the time domain, it can be observed (Figure 1-1, middle left side) that the samples of both signals completely coincide, it is no longer possible to distinguish them on the basis of the discrete time representation. The fast signal results in a slowly varying dis- crete time sequence. This effect will appear each time when the signal frequency is larger than half the sample frequency. It is the alias effect. In order to avoid alias, the maximum fre- quency fx of the sampled signals should be smaller than half the sample frequency: fmax
Fig: 1