S-72.1140 Transmission Methods in Telecommunication Systems Naser Tarhuni Matlab exercise, autumn term 2007 Page 1/1 Is the mains power supply purely sinusoidal? Assume that you have the mains power supply signal given by, x(t ) = 380 cos(2π 50t ) [Volts] (1) If the signal is distorted by some nonlinear device, then in frequency domain new harmonics will appear. We like to know how pure the signal is, therefore, Total Harmonic Distortion (THD) can be used. THD is given by, THD = ∑ harmonics power Fundamental frequency power × 100% (2) Other definitions may be used, but in the following we select (2). More on THD can be found at http://en.wikipedia.org/wiki/Total_harmonic_distortion Consider that the signal in (1) is passed through a limiter with characteristics given by, ⎧ x(t ) if x(t ) ≤ A ⎪ y (t ) = ⎨ A if x(t ) > A ⎪ − A if x(t ) < − A ⎩ This device curve is shown in Figure 1. Consider also that the signal for the time interval from 0 to 0.999 [sec], is sampled at a sampling period of 0.1 [ms]. You tasks are to write Matlab program files for the following: a. For A = 150 , plot x(t ) and y(t ) on the same figure for the time interval from 0 to 0.1 [sec]. Then plot the single sided spectrum of x(t ) and y(t ) for the frequency range from 0 to 500 [Hz]. b. For 50 ≤ A ≤ 380 plot the THD as a function of A / 380 . (3) y A -A A x Figure 1. Hints: - Use Matlab function fft(). For correctly scaling the result of the function try with simple and known result. For example use a sinusoid with amplitude 1 to check the result of the fft() function. Don’t forget the absolute value for the magnitude spectrum. - You need to review Parseval’s theorem [see Carlson’s book, chapter 2]. - You may need to use the Matlab function find() to isolate the harmonics. - The frequency axis should be correctly set for correct plots, check the demo related to the FFT in Matlab. - Please see more hints from eeForum: http://tltpc12.hut.fi/cgi-bin/mwf/board_show.pl?bid=46