Simulation Of Flat Fading Using MATLAB For Classroom Instruction*

Gayatri S. Prabhu and P. Mohana Shankar

Department of Electrical and Computer Engineering

Drexel University

3141 Chestnut Street

Philadelphia, PA 19104

Abstract

An approach to demonstrate flat fading in communication systems is presented here, wherein the basic concepts are reinforced by means of a series of MATLAB simulations. Following a brief introduction to fading in general, flat fading is dealt with in detail. Theoretical distributions of the received signal under different conditions are presented. Models for flat fading are developed and simulated using MATLAB. The concept of outage is also demonstrated using MATLAB. We suggest that the use of MATLAB exercises will assist the students in gaining a better understanding of the various nuances of flat fading.

* This work was supported, in part, by the Gateway Engineering Education Coalition under NSF Grant # EEC 9727413.

I.INTRODUCTION

Wireless communications is one of the fastest growing areas in Electrical Engineering. Because of this, courses in wireless communications are being offered as a part of the electrical engineering curriculum at the undergraduate and graduate level. With the incorporation of computers in the curriculum [1], [2], it has become much easier to bring some of the concepts of this new and exciting field of wireless communications into the classrooms. MATLAB is extensively being used in colleges and universities to accomplish this integration of computers and curriculum. In this paper, a MATLAB based approach is proposed and implemented to demonstrate the concept of fading, one of the topics in wireless communications.

Before delving into the details of the way in which MATLAB is used as a learning tool, it is necessary to understand underlying principles of fading in wireless systems. This is done in Section II. Mathematical models are used in Section III to describe the concept of flat fading. Section IV shows how MATLAB can be used to reinforce these concepts, and the observations obtained from the MATLAB simulations are discussed. The use of these results in the calculation of outage probability is presented in Section V. Finally, the conclusions are presented in Section VI.

II. FADING IN A WIRELESS ENVIRONMENT

Radio waves propagate from a transmitting antenna, and travel through free space undergoing reflection, refraction, diffraction, and scattering. They are greatly affected by the ground terrain, the atmosphere, and the objects in their path, like buildings, bridges, hills, trees, etc. These multiple physical phenomena are responsible for most of the characteristic features of the received signal.

In most of the mobile or cellular systems, the height of the mobile antenna may be much lower than the surrounding structures. Thus, the existence of a direct or line-of-sight path between the transmitter and the receiver is highly unlikely. In such a case, propagation is mainly due to reflection and scattering from the buildings and by diffraction over and/or around them. So, in practice, the transmitted signal arrives at the receiver via several paths with different time delays creating a multipath situation as in Fig.1.

At the receiver, these multipath waves with randomly distributed amplitudes and phases combine to give a resultant signal that fluctuates in time and space. Therefore, a receiver at one location may have a signal that is much different from the signal at another location, only a short distance away, because of the change in the phase relationship between the incoming radio waves. This causes significant fluctuations in the signal amplitude. This phenomenon of random fluctuations in the received signal level is termed as fading.

The short-term fluctuation in the signal amplitude caused by the local multipath is called small-scale fading, and is observed over distances of about half a wavelength. On the other hand, long-term variation in the mean signal level is called large-scale fading. The latter effect is a result of movement over distances large enough to cause gross variations in the overall path between the transmitter and the receiver. Large-scale fading is also known as shadowing, because these variations in the mean signal level are caused by the mobile unit moving into the shadow of surrounding objects like buildings and hills. Due to the effect of multipath, a moving receiver can experience several fades in a very short duration, or in a more serious case, the vehicle may stop at a location where the signal is in deep fade. In such a situation, maintaining good communication becomes an issue of great concern, although passing objects often disturb the field pattern, reducing the risk of the signal remaining in deep fade for a long time.

Small-scale fading can be further classified as flat or frequency selective, and slow or fast [3]. A received signal is said to undergo flat fading, if the mobile radio channel has a constant gain and a linear phase response over a bandwidth greater than the bandwidth of the transmitted signal. Under these conditions, the received signal has amplitude fluctuations due to the variations in the channel gain over time caused by multipath. However, the spectral characteristics of the transmitted signal remain intact at the receiver. On the other hand, if the mobile radio channel has a constant gain and linear phase response over a bandwidth smaller than that of the transmitted signal, the transmitted signal is said to undergo frequency selective fading. In this case, the received signal is distorted and dispersed, because it consists of multiple versions of the transmitted signal, attenuated and delayed in time. This leads to time dispersion of the transmitted symbols within the channel arising from these different time delays resulting in intersymbol interference (ISI).

When there is relative motion between the transmitter and the receiver, Doppler spread is introduced in the received signal spectrum, causing frequency dispersion. If the Doppler spread is significant relative to the bandwidth of the transmitted signal, the received signal is said to undergo fastfading. This form of fading typically occurs for very low data rates. On the other hand, if the Doppler spread of the channel is much less than the bandwidth of the baseband signal, the signal is said to undergo slowfading.

The work reported here will be confined to flat fading. Results on lognormal fading are also presented because of the existence of some general approaches, which incorporate short term and long term fading resulting in a single model.

III. STATISTICAL MODELING OF FLAT FADING

In a multipath environment, if the difference in the time delay of the number of paths is less than the reciprocal of the transmission bandwidth, the paths cannot be individually resolved. These paths also have random phases. They add up at the receiver according to their relative strengths and phases. The envelope of the received signal is therefore a random variable. This random nature of the received signal envelope is referred to as fading and may be described by different statistical models. These models are described below [4]:

(a)Rayleigh Distribution

As discussed earlier, the mobile antenna, instead of receiving the signal over one line-of-sight path, receives a number of reflected and scattered waves, as shown in Fig.1. Because of the varying path lengths, the phases are random, and consequently, the instantaneous received power becomes a random variable. In the case of an unmodulated carrier, the transmitted signal at frequency creaches the receiver via a number of paths, the ith path having an amplitude ai, and a phase i. The received signal s(t) can be expressed as

s(t) = …(1)

where N is the number of paths. The phase i depends on the varying path lengths, changing by 2 when the path length changes by a wavelength. Therefore, the phases are uniformly distributed over [0,2].

Effect of motion

Let the ith reflected wave with amplitude ai and phase i arrive at the receiver from an angle i relative to the direction of motion of the antenna. The Doppler shift of this wave is given by

…(2)

where v is the velocity of the mobile, c is the speed of light (3x108 m/s), and the i’sare uniformly distributed over [0,2].

The received signal s(t) can now be written as

s(t) = …(3)

Expressing the signal in inphase and quadrature form, eqn. (3) can be written as

…(4)

where the inphase and quadrature components are respectively given as

I(t) = …(5)

Q(t) = …(6)

Probability density function of the received signal envelope

If N is sufficiently large, by virtue of the central limit theorem, the inphase and quadrature components I(t) and Q(t) will be independent Gaussian processes which can be completely characterized by their mean and autocorrelation function [5]. In this case, the means of I(t) and Q(t) are zero. Furthermore, I(t) and Q(t) will have equal variances, 2, given by the mean-square value or the mean power. The envelope, r(t), of I(t) and Q(t) is obtained by demodulating the signal s(t) as shown in Fig.2. The received signal envelope is given by

…(7)

and the phase  is given by

…(8)

The probability density function (pdf) of the received signal amplitude (envelope), f(r), can be shown to be Rayleigh [5] given by

,r  0…(9)

The cumulative distribution function (cdf) for the envelope is given by

…(10)

The mean and the variance of the Rayleigh distribution are and (2-/2)2, respectively. The phase is uniformly distributed over [0,2]. The instantaneous power is thus exponential. The Rayleigh distribution is a commonly accepted model for small-scale amplitude fluctuations in the absence of a direct line-of-sight (LOS)path, due to its simple theoretical and empirical justifications.

(b)Rician Distribution

The Rician distribution is observed when, in addition to the multipath components, there exists a direct path between the transmitter and the receiver. Such a direct path or line-of-sight component is shown in Fig.1. In the presence of such a path, the transmitted signal can be written as

s(t) = …(11)

where the constant kd is the strength of the direct component, dis the Doppler shift along the LOS path, and di are the Doppler shifts along the indirect paths given by equation (2).

Probability density function of the received signal envelope

The derivation for the probability density function here is similar to that for the Rayleigh case. If N is sufficiently large, then by virtue of the central limit theorem, the inphase and quadrature components I(t) and Q(t) are independent Gaussian processes which can be characterized by their mean and autocorrelation function. In the Rician case, the mean values of I(t) and Q(t) will not be zero because of the presence of the direct component. The envelope r(t), of I(t) and Q(t) is obtained by demodulating the signal s(t). The envelope in this case has a Rician density function given by [5]

, r 0…(12)

where I0() is the zeroth-order modified Bessel function of the first kind. The cumulative distribution of the Rician random variable is given as

,r 0…(13)

where Q( , ) is the Marcum’s Q function [4,6]. The Rician distribution is often described in terms of the Rician factor K, defined as the ratio between the deterministic signal power (from the direct path) and the diffuse signal power (from the indirect paths). K is usually expressed in decibels as

…(14)

In equation (12), if kd goes to zero (or if kd 2/22« r2/22), the direct path is eliminated and the envelope distribution becomes Rayleigh, with K(dB) = -. On the other hand, if the LOS path is much stronger than all the indirect paths combined, r and  are both approximately normal, with K(dB) > 1. The Rician pdf for different values of K is shown in Fig.3, where K = 0 corresponds to the Rayleigh density function. When the envelope is Rician, the instantaneous power follows a non-central chi-square distribution with two degrees of freedom [5].

(c)Nakagami-m Distribution

It is possible to describe both Rayleigh and Rician fading with the help of a single model using the Nakagami distribution [6]. Nakagami fading occurs, for instance, for multipath scattering with relatively large delay-time spreads, with different clusters of reflected waves. Within any one cluster, the phases of individual reflected waves are random, but the delay times are approximately equal for all waves. As a result, the envelope of each cumulated cluster signal is Rayleigh distributed. The fading model for the received signal envelope, proposed by Nakagami, has the pdf given by

,r 0…(15)

where (m) is the Gamma function, and m is the shape factor (with the constraint that m ½) given by

…(16)

The parameter  controls the spread of the distribution and is given by

…(17)

The corresponding cumulative distribution function can be expressed as

…(18)

where P( , ) is the incomplete Gamma function. If the envelope is Nakagami distributed, the corresponding instantaneous power is gamma distributed [6]. In the special case m = 1, Nakagami reduces to Rayleigh distribution. For m > 1, the fluctuations of the signal strength reduce compared to Rayleigh fading, and Nakagami tends to Rician.

(d)Lognormal Distribution

As seen in Section II, fading over large distances causes random fluctuations in the mean signal power. Evidence suggests that these fluctuations are lognormally distributed. A heuristic explanation for encountering this distribution is as follows: As shown in Fig.4, the transmitted signal undergoes multiple reflections at the various objects in its path, before reaching the receiver. Then it splits up into a number of paths, which finally combine at the receiver. The expression for the transmitted signal is the same as that given in equation (3), except that the path amplitudes aiare themselves the products of the amplitudes due to the multiple reflections [7], as

…(19)

where Mi is the number of multiple reflections per path. Multiplication of the signal amplitude leads to a lognormal distribution [7], in the same manner that an addition results in a normal distribution by virtue of the central limit theorem [5]. A study of mobile radio propagation modeling reveals that there is no direct reference to the global statistics of path amplitudes. However, the fact that the mean of the envelope is lognormal seems to be well established in the literature. The lognormal pdf is given by

,r 0…(20)

where is the mean of log(r), and 2 is the variance of log(r). The corresponding cdf is given as below

…(21)

With this distribution, log r has a normal distribution. Fig. 5 shows the lognormal probability density function. There is overwhelming empirical evidence for this distribution in urban propagation.

(e)Suzuki Distribution

Another approach used to describe the statistical fluctuations in the received signal combines the Rayleigh and lognormal in a single model. In a mobile radio channel, the local distribution of the signal amplitude over small distances of the order of a wavelength is Rayleigh, whereas the wide area fading is represented by the lognormal distribution. It is of interest, therefore, to examine the overall distribution of the received signal envelope in these large areas. As in Fig.4, the main wave, which is lognormally distributed due to multiple reflections or refractions, splits up into subpaths due to scattering by local objects. Each subpath is assumed to have random amplitude and uniformly distributed random phase. These subwaves arrive at the receiver with approximately the same delay. Suzuki [8] suggested that the envelope statistics of the received signal envelope could be represented by a mixture of Rayleigh and lognormal distributions in the form of a Rayleigh distribution with a lognormally varying mean [8]. He suggested the formulation

…(22)

where  is the mode or the most probable value of the Rayleigh distribution,  is the shape parameter of the lognormal distribution. Equation (22) is the integral of the Rayleigh distribution over all possible values of , weighted by the pdf of , and this attempts to provide a transition from local to global statistics.

IV. MATLAB IMPLEMENTATION OF FLAT FADING

The concepts outlined in Section III were demonstrated using MATLAB. The fading models were studied by undertaking simulation of multipath channels. Statistical testing then was performed to verify that the probability density functions fit the theoretical models. After generating the rf signals, chi-square tests [5] were performed to see the statistical fit to the appropriate models.

The Signal Processing, Statistics, and Communications Toolbox were used in the simulations. Some of the commands used are given in Appendix I. The values chosen for the simulations are given in Appendix II. The simulation procedure was as follows:

(a)Rayleigh – The relationship between the number of paths (N) and Rayleigh statistics was studied by varying N from 4 to 40. For each value of N, the simulation was done 50 times. Each simulation was carried out for a time interval corresponding to 1250 wavelengths. For a given time instant, the received signal in the case of a stationary receiver was generated using equation (1). Generating the signal using equation (3) allows us to incorporate Doppler effect by introducing motion. The path amplitudes ai were taken to be Weibull distributed so as to allow flexibility in varying its parameters. The phases i were taken to be uniform in [0,2]. The Weibull random numbers were generated using the function weibrnd from the Statistics Toolbox, and the uniform phases were generated using the function unifrnd. The received signal was then demodulated to get the inphase and quadrature components, using the command demod from the Signal Processing Toolbox. Subsequently, the envelope was calculated using equation (7). This envelope was tested against the Rayleigh distribution using the chi-square test described in Appendix III. The average chi-square statistic was computed. This value was compared with the chi-square value from tables [5] for 20 bins at the 95th percentile. If the computed average chi-square statistic is less than the corresponding value from the tables, the hypothesis is true. The chi-square tests were written as MATLAB functions and called in the main program. The fading envelope in the absence of a line-of-sight path fits the Rayleigh distribution for as few as six paths. One of the curves (with 10 paths) so obtained along with the average chi-square test values is shown in Fig.6.

(b)Rician - To simulate the presence of a direct component, the received signal was modeled by equation (11). The rest of the simulation was carried out as in part (a). In the presence of a line-of-sight path, the envelope is found to fit the Rician distribution well. The fit improves as the Rician factor K(dB) increases. The curves (with 10 paths) for a particular value of K(dB) is shown in Fig.7. The rf signals and demodulated envelopes for both Rayleigh and Rician, for mobile velocity 0 and 25 m/s, are compared in Fig.8 and Fig.9 respectively. The mean of the envelope (shown by a solid line in (c) and (d)) in the Rician case is seen to be larger than that in Rayleigh fading, indicating the existence of a line-of-sight component. Moreover, as the mobile velocity increases, the number of zero crossings increases, leading to an increase in the number of deep fades and a higher probability of outage, as can be seen from the figures 8 and 9.