# Development Of Ray Tracing Simulator Computer Science Essay

Published:

This essay has been submitted by a student. This is not an example of the work written by our professional essay writers.

## 3.1 INTRODUCTION

To develop an indoor location registration and paging algorithm it is essential to predict the propagation of the signal in the indoor environment. The prediction of the propagated signals helps to study the behavior of the signal inside the buildings and the effect of the indoor environment to these signals. The predicted signals are used to have a fingerprint of the received signal strength at the location of the mobile terminal while it is roaming in the indoor environment. The prediction technique has to be accurate, fast and scalable. The site-specific model propagation model was selected to represent the propagation of the signal in indoor environments. The site-specific model does not depend on special assumption, so it works on most general building environment with less site-specific information about the building structure. There are a variety of phenomena that occur when an electromagnetic wave is incident on a surface. These phenomena depend upon the polarization of the wave, the geometry of the surface, the material properties of the surface, and the characteristics of the surface relative to the wavelength of the electromagnetic wave (Seybold 2005). For telecommunications, the path loss suffered by the signal in traversing the distance between a transmitter and receiver and the root mean square (RMS) multipath delay spread (Ï„ rms) are important. Characterization of channel parameters aims at optimizing the coverage and maximizing data rates (Krishnamurthy et al. 1998).

This Chapter discusses the development of ray tracing simulator based on Matlab platform to study the characterization of indoor wireless radio channel. The numerical methods such as the finite element method (FEM) and the finite-difference time-domain (FDTD) method or any other numerical method are able to analyze complex structures, but they are complicated to implement and computationally intensive, considering the relative dimension of a building environment in terms of wavelength (Yang & Brown 2010). The proposed ray tracing algorithm is basically developed to design, implement and evaluated an indoor registration and paging algorithm.

The developed ray tracing algorithm is trying to improve some of the above limitations in the existing algorithms such as the large amount of the computational time to achieve the ray tracing process, the huge amount of memory to save the database of the building constructions, propagated rays, reflection and refraction coefficients. In addition to improving the accuracy of the predicted signals, this chapter is intended as a precursor to the main purpose of the thesis which is the development of location registration and paging algorithm for indoor wireless environments. Different modeling approaches vary in complexity and accuracy. In general, there is a tradeoff between complexity and accuracy, and using a complex model can only be justified by high accuracy. The accuracy of a propagation model is measured by the mean and standard deviation of the error term XÏƒ. The goal is to find a model with zero mean error and standard deviation as small as possible.

## 3.2 DEVELOPMENT OF RAY TRACING SIMULATOR

The need to have a good prediction of the propagated signal on radio waves propagation inside the buildings lead to the development of software tools to study the effect of the wall material parameters such as refractive index of the construction materials on the propagated signal and the average received signal strength. Among these prediction algorithms, the ray tracing (RT) algorithm has been used widely for accurately predicting the site-specific radio propagation characteristics (Mudhafar & Pahlavan 2002). The ray tracing technique was initially developed in the field of computer graphics to model the visible light spectrum and produce photorealistic computer generated images. The rays are casting from a source and traced until they reach the destination after they reflected, refracted and scattered from the medium objects. The same principle could be used with the electromagnetic waves propagated from the transmitter in the wireless channel by replacing the source with the transmitter and receiver with the destination point of interest. Ray tracing is more economical method of predicting the propagation of radio waves in indoor, metropolitan, and rural areas, it requires only the floor plan of the site and a high performance general purpose computer (Falsafi et al. 1995). It provides deterministic prediction models of small scale and large scale path loss in a wide range of operating environments (Rappaport 2002:133). Ray-tracing models are widely used in determining electromagnetic properties of the radio channel. To develop this method, the knowledge of building layout and refractive index of the construction materials is necessary to calculate the reflection and transmission coefficients of the materials under consideration.

Source: Kadi Bouatouch. 2005. Stochastic Ray Tracing

.IRISA

The ray tracing simulation plays a great role in predicting the propagation of the electromagnetic signal within and outside the buildings. It reduces the cost and the time consumption for a large amount of measurements and provides accurate information about the channel parameters for the wireless networks. Also the interactive computer graphics allow us to observe electromagnetic field behavior which we could previously only imagine (Swanson & Hoefer 2003). There are two types of ray-tracing methods: one is called the image method [2-4], and the other is the "brute force" ray-tracing method [5, 6]. The image method is well suited to analysis of radio propagation associated with geometries of low complexity and having a small number of reflections. The brute-force method launches a bundle of rays, which may or may not reach the receiver. It requires numerous ray-object-intersection tests, and extensive data arrays for ray tracing. In the "brute-force'' method, both refraction and diffraction can be considered. In these two methods, both the two-dimensional ray-tracing model and the three-dimensional ray-tracing model are widely used. In the two-dimensional model, only those rays in a plane are traced, so less computation time is needed. In the three-dimensional model, all rays must be traced, so much more computation time is needed (Ji et al. 2001).

The two-dimensional ray-tracing technique is widely used for indoor propagation prediction (Ghobadi et al. 1998; Rizk et al. 1997; Ji et al. 1999; Tam & Tran 1996). When the indoor environment consists of many walls and partitions it becomes complex, the calculation of the propagation characteristics will take a lot of time. It is therefore important to improve the computational efficiency. In (Ji et al. 1999) and (Tam & Tran 1996), only those rays that have a certain contribution to the receiver were traced. In reference (Chang & Kim 1997), the effective-propagation-area method and the dominant-comer-extraction method were used (Ji et al. 2001). Naruniranat et al. (1999) sets a threshold level of each path can be pre-determined before the ray-tracing process taking place to increase the computation efficiency without decreasing the accuracy of the prediction. In our ray tracing algorithm the improvement in efficiency achieved by reducing the number of the propagated rays in which the angle step between each two successive rays is increased so that the accuracy of the ray tracing algorithm does not affected.

## 3.2.1 Development of two-dimensional ray tracing algorithm

The two-dimensional ray tracing models assume that the all important signal contributions can be traced within one single plane (horizontal or vertical). In our case, the horizontal plane is used. When a ray is traced in a usual two-dimensional ray-tracing model, one needs to locate the ray intersections with every segment (wall, ceiling and floor) in the building structure. The function to find these intersections is presented in Appendix X.

The start and the end points of the electromagnetic waves (rays) and building walls are represented by points in two-dimensional Cartesian coordinates. While the rays and walls themselves are represented by geometrical lines.

Figure 3.x 2-D representation of the building structure

Floor plan of the building

Step 1: Given the start point of the initial ray (Transmitter coordinates), the initial angle in radian (Î¸) and assuming the length of the radius (Ï) which must be very long to give accurate results, the algorithm calculates the end point (P) of the first ray by transforming the polar coordinates to two-dimensional Cartesian, or x-y, coordinates as shown in the figure bellow:

x = Ï . cos (Î¸) (3.x)

y = Ï . sin (Î¸) (3.x)

Y

X

P

Î¸

Ï

Figure 3.1 Polar to Cartesian mapping

Source: www.mathworks.com

Step 2: The algorithm calculates the next incident angle which is the angle between the initial ray and the normal to the wall. Then the algorithm finds the intersection point between the ray and the wall. We neglect the effects of internal reflection of the electromagnetic wave within the wall. From a geometrical point of view, one ray may intersect with many segments. It is important to get the point of intersection that is the nearest to the origin of the ray where the reflection and refraction really occurs. After that the algorithm calculates the next initial angle (reflection angle) using Snell's law. The reflection angle is the angle between the reflected ray and the normal to the wall. The reflective angle is the same as the incident angle because the ray reflects in the same medium with a given refractive index as shown in Figure 3.2.

Start point

Wall

Initial angle

End point

Initial ray

Normal

Reflected ray

Reflective angle

Incident angle

Figure 3.2 Representation of incident and reflection angle with respect to wall surface

Step 3: The refractive angle is the angle between the normal to the wall and the refracted ray which passes throw the wall to the other side and it bends according to Snell's law as shown in Figure 3.3. This angle is depends on the refractive index of the wall. According to Snell's law the ray bends toward the normal when the ray enters a medium of greater refractive index, and away from the normal when entering a medium of lesser refractive index. In our case the ray bends toward the normal as the ray enters from air with refractive index 1.000292 (Rick Reed 2009) to the wall with higher refractive index. The total refraction happens with incident angle of -90 or 90 degree.

Wall

Refractive angle

Initial ray

Normal

Incident angle

Refracted ray

Figure 3.3. The angle of refraction

Step 4: Calculate the reflection and transmission coefficients according. In two-dimensional scenario, we consider the reflection coefficient as the ratio of electric field strength of the incident ray to the electric field of the reflected ray, and that we have the case of horizontal polarization, i.e. the electric field is parallel to the plane of separation (Holt et al. 1992), then the parallel reflection and the transmission coefficients will calculated using (3.6) and (3.8) respectively.

## 3.2.2 Development of three-dimensional ray tracing algorithm

The three-dimensional model uses the same propagation model of the two-dimensional model in addition to the height which is presented by z-plane. The third plane gives the representation of the multi-story. This considers more interaction with all the walls and increases the complexity of the algorithm. Thus, optimized geometrical algorithms have to be applied. In the developed simulator, the three-dimensional representation of the building structure differs from the two-dimensional one in the way of representing the walls, ceiling and floors. In the two-dimensional the walls are represented as lines (segments) in x-y Cartesian coordinates with start and end points. While in the three-dimensional representation, the walls are represented as patches in x-y-z Cartesian coordinates. This representation reflects to the mathematical models to find the intersections between the propagated rays and the walls as in Appendix D. Also the propagated rays will have an elevation angle from 0 to 2Ï€, while it equals to zero in the two dimensional.

The next end of the propagated ray in three dimensional coordinates was found by using spherical to Cartesian transformation as in (3.e1), (3.e2) and (3.e3). The elevation angle (Î¦) and the propagation angle (Î¸) are known in advance. The radius (r) of the propagated ray assumed to be the ray starts from the coordinate's origin.

x = r . cos(Î¦) . cos(Î¸) (3.e1)

y = r . cos(Î¦) . sin(Î¸) (3.e2)

Z = r . sin(Î¦) (3.e3)

## r

## Y

## X

## P

## Î¸

## Z

## Î¦

Figure 3.x Mapping from spherical coordinates to three-dimensional Cartesian coordinates

Source: www.mathworks.com

The three-dimensional ray tracing algorithm for propagation prediction in indoor wireless networks uses a mathematical model to represent the building constructions with different types of materials. The model also represents the propagation of electromagnetic signals by using geometrical optics (GO). The channel parameters such as the impulse response for received power, the excess delay time, RMS delay spread, and power delay profile could be calculated.

## 3.2.3 Representation of the 3-D building structure

Matlab patch function has been used to represent the building constructions (walls, roof and floors). Figure 3.X shows the procedures achieved to build the data structure of the ray tracing simulator, specify the simulation parameters and run the simulation to build the received signal map. The user has to draw or load these constructions before the simulation starts. In the case of drawing a new construction, the user has to define the area of the building, number of floors and the height of each floor. The building plan and electromagnetic parameters are used as the input of the ray tracing program. The constructed building data is stored in Matlab data file (mat file).

Figure 3.x 3-D representation of the building structure

The simulation starts by interactively selecting the locations of the transmitter and the receiver within the building (see flow chart X.x). The system parameters such as the transmitted power, operating frequency, transmitter and receiver gains, transmitter elevation angle, transmitter propagation angle, type of construction material, and the number of reflections and refractions are defined by the user. The transmitter elevation angle could be from 0 to 2Ï€ for this three dimensional model. In this simulation we considered only the reflection and refraction of the propagated rays because the other effects such as diffraction, scattering have less effect for indoor radio propagations (Seybold 2005). To simplify this analysis, we assumed that the rooms are empty, such that all reflection originates from only the ceiling, floor, and walls. Furniture, windows and etc. are not considered. We used three reflections and one refraction. Assuming that the signals at these points are greater than the minimum power threshold value (-75 dBm) as shown in Figure 1.

Figure 1 Propagation of the signal with three reflections and one refraction

We consider the incident electromagnetic wave as un-polarized (containing an equal mix of parallel and perpendicular polarizations), the reflection coefficient is RÂ = (RsÂ +Â Rp)/2 (Holt et al. 1992). The typical value of reflection coefficients and refraction coefficients is between zero and one. The system parameters are specified as in Table X.X and the simulation parameters are defined according to Table X.X

## Pre-simulation Process

## Simulation Process

## Start

## Load/Draw Wall Configuration

## Draw walls?

## Define Building Area

## Add New Walls

## Specify each Floor Height

## Define No. of Floors

## Plot the Building

## Save & Load Wall Configuration

## No. of Tx and their Locations

## Propagate Rays based on Propagation & Elevation Angles

## Find Intersection Points

## Calculate Reflection or Refraction Coefficients

## Calculate received power

## End

No

Yes

Figure 3.X Structure of the ray tracing simulator

## 3.4 SELECTION OF THE INDOOR CHANNEL MODEL

In the recent researches the software tools are essential equipments to design, develop and analyze the systems before production and development. The selection of the appropriate model is related to purpose of the model and the desired parameters from that model. In our case, the purpose of the indoor propagation model is to study the effect of the building materials on the propagation of the electromagnetic wave inside the building structures and study their effect on the performance of the indoor location update and paging algorithms. So a mathematical model represents the transmitter, receiver and building structure material parameters is required. The model in (2.x) was adopted to calculation of the received signal strength with respect to the refractive index of the materials and the system parameters. There is no need to collect more information about the propagation constant of the medium for several places inside the building. The propagation constant is in the range from 3 - 4.5 according to the environment []

The existing indoor propagation models (Ali & Nobles 2007; Wang et al. 2005; Cuinas et al. 2007) can be classified into two major classes: Statistical models rely on measurement data (Tam & Tran 1995) and offers computational simplicity but low accuracy (Mudhafar & Pahlavan 2002). The other class is site-specific propagation models which are based on electromagnetic-wave propagation theory and are preferred in many practical situations (Tam & Tran 1995). Several models exist for the statistical characterization of microwave propagation within buildings; However, statistical models do not provide site-specific information (Valenzuela 1994).

The effect of a plane wave incident on a flat surface of either a perfect dielectric or a perfect conductor is characterized from a theoretical standpoint (Seybold 2005). The ray-tracing method generally assumes buildings have homogeneous and smooth surfaces. Associated with the electromagnetic wave incidence on a surface, some of the energy will be reflected and/or scattered and some will be absorbed/refracted. An electromagnetic wave that is incident on a material boundary will have both a reflected and a refracted or transmitted component. The incident wave is treated by using the concept of a reflection and a transmission coefficient. For a smooth, flat surface, the angle of reflection is equal to the grazing angle. Snell's law of refraction from optics provides another convenient relationship

(3.1)

where v2 and v1 are the propagation velocities in materials 2 and 1, respectively, and n1 and n2 are the refraction indexes (n = c/v) of materials 1 and 2, respectively. (The index of refraction is related to the permittivity by). This may be expressed in terms of permittivity and unity permeability as

(3.2)

The averaged LOS power from the averaged LOS delay profile can be calculated using the free space or Friis equation (Parasons 2000; Mudhafar & Pahlavan 2002; Landron et al. 1996; Rappaport 2002) as follow:

(3.3)

where PT is the power supplied to the transmitted antenna, GT is the power gain of the transmitted antenna, GR is the gain at the receiving antenna, Î» is the transmitted wave length and dLOS is the LOS distance between the transmitter and the receiver. The averaged reflected power assumed to be the free space value for the unfolded path length (d1,..,dn) multiplied by the square of the voltage reflection coefficient (Ð“), where dn is the distance of the reflected nth rays, or

(3.4)

taking the ratio of (3) and (4) and solving for the reflection coefficient

(3.5)

The total received electric field at a point is the summation of the electric fields of each multipath component (or ray path) that illuminates the receiver (Landron et al. 1996). The above model has been selected for its relation to the system parameters and the constructive materials of the buildings. Hence, there is no need to measure the propagation constant for individual position inside the buildings as it is changing from one position to another.

Some of the existing ray tracing models such as (Laurenso 1994; Fitzpatrick 2004) use the image technique to produce the image of the source of the propagated rays with respect to the plane of incidence as shown in figure 2. X. This technique produces a large amount of computations for all the reflected and transmitted electromagnetic rays. In our ray tracing model, we directly calculate the reflection and refraction angles by using (3.1) from the given incidence angle.

Figure 2.x Propagation paths using this fixed image source

Source: Laurenso 1994

## Refractive Index

## 3.4.1 Calculation of the reflection and transmission coefficients

In general, an electromagnetic wave that is incident on a material boundary will have both a reflected and a refracted or transmitted component. The amount of the reflected and transmitted power is related to the reflection and transmission properties of the construction materials of the buildings. This separation of the incident wave is treated by using the concept of a reflection and a transmission coefficient which can be calculated using the following relations (Balanis 1989; Moulson & Herbert 2003),

(3.6)

(3.7)

(3.8)

(3.9)

where and are the parallel and perpendicular reflection coefficient respectively, while and are parallel and perpendicular transmission coefficient respectively, ni and nt are the incident and transmission media refractive index respectively, and Î¸i and Î¸t are incident and transmission angles respectively.

Site-specific propagation model has been used with a developed Matlab-based brute-force ray-tracing method where a bundle of transmitted rays has been considered that may or may not reach the receiver. The ray tracing based on the fact that high-frequency radio waves behave in a ray-like fashion. By using the concept of ray-tracing, rays may be launched from a transmitter location and the interaction of the rays with partitions within a building modeled using well-known reflection and transmission theory. This method accounts for all possible propagation paths. The transmitters and receivers are modeled as points at discrete locations in two-dimensional space as shown in Fig. 1. All the possible angles of departure and arrival at the transmitters and receivers are considered to determine all possible rays that may leave the transmitter and arrive at the receiver. Ray tracing is accomplished by an exhaustive search of a ray tree taking into account decomposition of the ray at each planar intersection. First the model determines whether a line-of-sight path exists and if so computes the received LOS signal. Next, the model traces a source ray in a specified direction and detects whether an object intersection occurs. If no intersection is found, the process stops and a new source ray in a direction making an angle with the original ray is initiated. Once an intersection has occurred, a check is made to see whether the ray can be considered to have reached any of the specified receiver locations. If the ray is found to reach a receiver location, the received signal is computed. After checking the reception, the incident ray is divided into a transmitted and a reflected ray, each of which is traced to the next intersection in the same way. This recursion continues until the ray intensity falls below a specified threshold, the defined number of intersections reached or no further intersections occur. Figure 3.1 shows a cross-section of a building (20m x 20 m) layout consisting of a group of rooms and a corridor.

Figure 3.1. The layout of the building structure

The simulation process starts by defining the operating frequency which is 900 MHz and 2.4 GHz in our case. The input power at the transmitting antenna terminals was around 44 dBm.

## Simplification

Only the horizontal and vertical building structures are considered.

## 3.4.2 Simulation assumptions

The diffraction and scattering effect are neglected in the proposed propagation model because of the minor contribution of the radio in this band.

The multipath power at receiver is determined as the sum of all individual powers regardless of the phase of each path.

Only rays with power above a fixed threshold are considered because highly attenuated rays do not reach the receiver in reality even though a transmission path exists in theory (German et al. 2001).

To simplify this analysis, assume that the room is empty, such that all reflection originates from only the ceiling, floor, and walls.

Neglect the effects of internal reflection of the electromagnetic wave within the wall assuming that the walls are 20-30 cm thick (Ji et al. 2001).

## PROPOSED INTERPOLATION PREDICTION METHOD (IPM)

The propagation of all the possible rays makes the ray tracing models have more computational time and consumes more system memory. Thus the ray tracing models become very slow or they need some pre-processing and simplifications to be faster (Pechac &Â Klepal 2001). To overcome these limitations, it is essential to develop suitable techniques that make the ray tracing models faster, accurate and simple (Wertz et al. 2003).

In RT algorithms, the rays propagate with a certain propagation and elevation angles. The small is the angle step between each ray and its subsequent ray, the more accurate and precise is the RT algorithm. This leads to increase the time needed to propagate the rays, calculate reflective and transmission coefficients and calculate the received signals at each intersection position. Increasing the angle step leads to reduce the number of the propagated rays. The rays will reach fewer positions, thus reducing the computational time to perform the ray tracing. The receiver position (Rx) in the simulation could be in a region where there are no propagated rays, Fig. 1a. To overcome this limitation, an Interpolation Prediction Method (IPM) has been proposed to predict the propagated signal at these positions when needed. IPM uses the nearest neighbor interpolation algorithm. This algorithm constructs new data the required points of the propagated signals at a certain positions of the receiver by interpolate their nearest known data points deduced from ray tracing.

(a)

Fig. 1 3D representation of the transmitter (Tx), receiver (Rx) and the reflected and transmitted rays as (a) a top view of the building, (b) a side view

## 4.6 RECEIVED SIGNAL STRENGTH MEASUREMENTS

[Position location techniques... pp. 57].

## VERIFICATION AND VALIDATION OF THE RAY TRACING MODEL

Verification is defined as the process of determining that a model operates as intended (Ince 2007; XXX 2010). The verification process is also referred to as "debugging." The aim is to try to find and remove unintentional errors in the model's logic and in its implementation. Verification will involve performing test runs in which a comprehensive set of tests will be devised to generate ideally all errors, and that all errors generated during these test runs are recognized. Validation, on the other hand, is the process of assessing an acceptable level of confidence that the inferences drawn from the model correctly represent the real-world system modeled (Chung 2004). The aim is to determine whether or not the simplifications and omissions of detail knowingly made in the model introduce unacceptably large errors in the results.

The validation of our ray tracing simulator begins with simple, easily manageable problems for which the solution is known in advance.

Checking the code

The developed simulation model has been to ensure that the right data and logic have been entered. All the functions have been tested individually by comparing their results with a manually calculated values and test the integration of these functions in the whole simulator.

Visual checks

The visual display of the model proves to be a powerful aid for verification and validation [Robinson, S. 2004. Simulation: the Practice of Model Development and Use. John Wiley & Sons Ltd].

By running the model and watching how each element behaves both the logic of the model and the behaviour against the real world can be checked. Various ideas aid this approach:

Stepping through the model event by event.

Stopping the model, predicting what will happen next, running the model on and checking what happens.

Interactively setting up conditions to force certain events to take place.

Creating extreme conditions, such as a very high arrival rate, to determine whether the model behaves as expected.

Isolating areas of the model so it runs faster, reducing the time to perform thorough verification and validation.

Explaining the model as it runs to those knowledgeable about the real system in order to gain their opinion.

Tracing the progress of an item through the model.

Model inputs and outputs

Sufficient verification and validation of the simulator is performed

1 Introduction

Two-dimensional ray tracing algorithm has been developed in (Holt et al. 1996) to predict the radio propagation in the indoor radio channel from the layout of the floor plan in a complex laboratory environment. It shows that the two dimensional ray tracing algorithm can accurately model the indoor radio channel. The characterization of the indoor wireless propagation channel using a vector three-dimensional image ray tracing (3D-IRT) approach has presented in (Naruniranat 1999). This technique sets a threshold value to decrease the computational time and reduce the usage of the memory resources.

The main purpose of our simulator is to study indoor wireless propagations for indoor wireless networks for different types of systems and building constructions to develop an indoor location update and paging algorithm. We are looking for a versatile and accurate algorithm to predict the received signal inside indoor environments. This work represents the development of three-dimensional ray tracing algorithm for indoor wireless networks followed by the measurement procedure. Comparison between predicted and measured received signals for WLAN has been achieved.

Ray Tracing Algorithm Simulations

The simulator starts by creating a custom indoor environment. The user has to define the area of the building, wall locations and materials, ceiling height and the locations of the transmitters and receiver. The system parameters such as the operating frequency, the transmitter and receiver gains, transmitter elevation angle (vertical), transmitter propagation angle (horizontal) and the number of reflections and refractions are defined by the user. The ray tracing starts with the reflection phenomena on the basis that the vast majority of the energy is contained in the reflected components followed by transmission. The other effects such as diffraction, scattering have less effect for indoor radio propagations.

Site-specific propagation model has been used with brute-force ray-tracing method where a bundle of transmitted rays has been considered that may or may not reach the receiver. By using the concept of ray-tracing, rays may be launched from a transmitter location and the interaction of the rays with partitions within a building modeled using well-known reflection and transmission theory. The transmitter (Tx) and receiver (numbered) are modeled as points at discrete locations in three-dimensional space. All the possible angles of departure and arrival at the transmitter and receiver are considered to determine all possible rays that may leave the transmitter and arrive at the receiver as shown in Fig. 1a and b.

## Rx

## Tx

Figure 1 3D representation of the transmitter (Tx), receiver (Rx) and the reflected and transmitted rays as (a) a top view of the building, (b) a side view

First, the model determines whether a line-of-sight (LOS) path exists and if so computes the received LOS signal.

Next, the model traces a source ray in a specified direction and detects whether an intersection occurs. If no intersection is found, the process stops and a new source ray in a direction making an angle (angle step) of 10Â° with the original ray initiates. Once an intersection has occurred, the received signal is computed for a reflected and transmitted ray, each of which is traced to the next intersection in the same way. This recursion continues until the number of reflections and transmissions reached maximum defined value (3 for this simulation) as shown in Fig. 1a and b.

Figure 2 Floor plan of the building showing the location of the transmitter (Tx) and the measurement positions for the receiver (numbered).

## RSS in 802.11

## Signal strength measurements

[Location awareness in wireless networks]

All IEEE 802.11 WLAN cards measure the RSSI continuously. The Physical Medium Dependent (PMD) sublayer returns a continual RSSI to the Physical Layer Convergence Procedure (PLCP) in the PMD service primitive PMD_RSSI.indicate. In the 802.11 Frequency Hopping Spread Spectrum system, this is a four bit field with a range of values from 0 (weakest) to 15 (strongest) signal strength (Geier 2001, p. 133). Other 802.11 physical layer specifications (including 802.11 DSSS, 802.11a and 802.11b), use an eight bit field which allows 256 levels of signal strength (pp. 140, 149, 154). Both 802.11 Direct Sequence Spread Spectrum and 802.11b also optionally report signal quality in an eight bit primitive named PMD_SQ.indicate.

The RSSI is used by the PLCP for its clear channel assessment functions but, given suitable drivers, can be read by applications. Many adaptors are supplied with a configuration utility that includes the capability to display RSSI for the currently active channel or in some cases for all received channels. The RSSI indicator is implemented to provide necessary information for the limited internal use of the WLAN system and there is no guarantee that it will provide precise measurement to external applications. [Location awareness in wireless networks]

## Software

Inssider from NetStumbler was used to measure the propagated signal

An arbitrary transmitted power level of +22 dBm. +20dBm (100 mw).

There are several software packages and utilities available to measure, log and map WLAN signal strengths. While their interest is in locating and mapping wireless access points rather than finding the position of a wireless node, Byers and Kormann (2003, pp. 43-44) discuss some hardware and software issues that are relevant to the current problem. They include standard networking utilities and packages designed to discover and map WLANs such as NetStumbler and Kismet.

## NETSTUMBLER

NetStumbler is a tool for Windows that allows the detection and measurement of the signal strength of WLANs access points using IEEE 802.11b, 802.11a and 802.11g protocols. It works with many WLAN cards with 2.4 GHz and but depends on firmware and driver versions (Milner 2004). NetStumbler is a favoured tool of the warchalking subculture, but has uses in planning and configuring WLANs.

The RSSI of packets on the IEEE 802.11b wireless network technique has the great advantage that it may be implemented using off the shelf hardware that is generally already deployed to support the data network.

As the distance of the transmission path increases, the amount of change in signal strength for a given change of distance decreases [location awareness in wireless networks].

Figure X.X Received LOS and NLOS received signal at 2.4 GHz

## 3.9 SUMMARY

This chapter describes the development of three dimensional (3D) ray tracing simulator for predicting the propagated signal in indoor wireless environments. In this chapter, we describe our research methodology. We begin with the development of 3D simulator for indoor wireless networks. We then discuss the data collection process, including tools we developed for this purpose. Finally, we describe the processes we performed on the data as a precursor to the analysis described in chapter 5 [Bahl P. & Padmanabhan V. N. 1999. User location and tracking in an in-building radio network. Technical Report MSR-TR-99-12. Microsoft Research. Redmond. WA 98052].

In brief, in this chapter a Ray Tracing (RT) model has been designed in such a way to minimize the number and orientation of the propagated rays from the transmitter that can still give an acceptable received signal prediction. This has been achieved by reducing the angle step between each two successive rays. The ray tracing simulator has been verified by conducting a comparison between predicted and measured received signals for WLAN. The optimum number of three reflections was found. Furthermore, an Interpolation Prediction Method (IPM) has been proposed to predict the propagated signal in the blind areas by using the nearest neighbor interpolation algorithm. The predicted signal strength data then has been used as a platform for the user mobility model in an office environment to determine the location registration status.

A 3D MATLAB-based simulator has been developed to study indoor wireless systems with picocell topology in terms of location registration and paging.

This chapter has outlined the mathematical basis for the modelling of an

electromagnetic wave generated at a transmitter and subsequently reflected

and diffracted by ideal planes and edges.

The computational efficiency is improved while maintaining accuracy.

Ali, S. & Nobles, P. 2007. A novel indoor location sensing mechanism for IEEE 802.11 b-g wireless LAN. 4th Workshop on Positioning, Navigation and Communication, 2007, WPNC '07 9 - 15.

Balanis C.A. 1989. Advanced Engineering Electromagnetics. New York: John Wiley & Sons. chapter 5.

Chang, K.R. & Kim, H.T. 1997. Improvement of the Computation Efficiency for a Ray-Launching Model. IEE Proceedings on Microwave Antennas and Propagation 145(4): 303-308.

Chung. C.A. 2004. Simulation modeling handbook: a practical approach. CRC Press LLC.

Cuinas, I., Martinez, D., Sanchez, M.G. & Alejos, A.V. 2007. Modelling and measuring reflection due to flat dielectric surfaces at 5.8 GHz. IEEE Transactions on Antennas and Propagation 55(4): 1139 - 1147.

Falsafi, A., Pahlavan, K. & Ganing, Y. 1995. A comparison of different wireless LAN transmission techniques using ray tracing. Sixth IEEE Int. Symposium on Personal, Indoor and Mobile Radio Communications, 1995. PIMRC'95 3: 1062-1066.

Fitzpatrick, J. 2004. Simulation of a MIMO wireless system. B.Eng. project. Dublin City University.

German, G., Spencer, Q., Swindlehurst, L. & Valenzuela, R. 2001. Wireless indoor channel modeling: statistical agreement of ray tracing simulations and channel sounding measurements. Proceedings of IEEE Int. Conf. on acoustics, Speech, and Signal Processing, 2001, (ICASSP '01) 4: 2501 - 2504.

Ghobadi, G., Shepherd, P.R. & Pennock, S.R. 1998. 2D Ray-Tracing Model for Indoor Radio Propagation .at Millimeter Frequencies, and the Study of Diversity Techniques. IEE Proceedings on Microwave Antennas and Propagation 145(4): 349-353.

Hashemi, H. 1993. The indoor radio propagation channel. Proceeding of the IEEE 81(7): 943-968.

Hassan-Ali, M. & Pahlavan, K. 2002. A new statistical model for site-specific indoor radio propagation prediction based on geometric optics and geometric probability. IEEE Transactions on Wireless Communications 1(1): 112-124.

Holt, T., Pahlavan, K. & Lee, J.F. 1992. A computer graphics package for indoor radio channel simulation using a 2D ray tracing algorithm. Proceedings of 17th Conference on Local Computer Networks 511 - 518.

Holt, T., Pahlavan, K. & Lee, J.F. 1992. A graphical indoor radio channel simulator using 2d ray tracing. In Proceedings of the 3rd IEEE International Symposium on Personal, Indoor and Mobile Radio Communications 411-416.

Ince. A.N. 2007. European Concerted Research Action COST 285 Action Objectives and the Symposium. Istanbul Technical University. In. Ince, A.N. & Bragg, A. (eds). Recent advances in modeling and simulation tools for communication networks and services. pp: 7. Springer Science + Business Media, LLC.

Ji, Z., Li, B-H, Wang, H-X., Chen, H-Y & Sarkar, T.K. 2001. Efficient ray-tracing methods for propagation prediction for indoor wireless communications. IEEE Antennas and Propagation Magazine 43(2): 41-49.

Ji, Z., Li, B-H., Wang, H-X., Chen, H-Y. & Zhou, Y-G. 1999. An improved ray-tracing propagation model for predicting path loss on single floors. Microwave and Optical Technology Letters 22(1): 39-41.

Krishnamurthy, P., Beneat, J., Marku, M. & Pahlavan, K. 1998. Modeling of the Wideband Indoor Radio Channel for Geolocation Applications in Residential Areas. Personal, Indoor and Mobile Radio Communications.

Landron, O., Feuerstein, M.J. & Rappaport, T.S. 1996. A comparison of theoretical and empirical reflection coefficients for typical exterior wall surfaces in a mobile radio environment. IEEE Transactions on Antennas and Propagation 44(3): 341 - 351.

Laurenso, D.I. 1994. Indoor radio channel propagation modelling by ray tracing techniques, PhD thesis. University of Edinburgh. http://www.see.ed.ac.uk/~dil/thesis_mosaic/total.html [20 November 2010].

Moulson, A.J. & Herbert, V. 2003. Electroceramics: Materials, Properties and Applications, 2nd ed., England, Chichester: John Wiley & Sons Ltd. pp.466-467.

Mudhafar, H.A. & Pahlavan, K. 2002. A new statistical model for site-specific indoor radio propagation prediction based on geometric optics and geometric probability. IEEE Transactions on Wireless Communications 1(1): 112-124.

Naruniranat, S., Huang, Y. & Parsons, D. 1999. a three-dimensional image ray tracing (3D-IRT) method for indoor wireless channel characterisation. High Frequency Postgraduate Student Colloquium 62-67.

Naruniranat, S., Huang, Yi. & Parsons, D. 1999. A three-dimensional Image Ray Tracing (3D-IRT) method for indoor wireless channel characterization. High Frequency Postgraduate Student Colloquium 62-67.

Parasons, J.D. 2000. The Mobile Radio Propagation Channel. 2nd Edition. Chichester: John Wiley & Sons, Ltd.

Pechac, P. Klepal, M. 2001. Effective Indoor Propagation Predictions. IEEE VTS 54th Vehicular Technology Conference, 2001. VTC 2001 Fall 3: 1247 - 1250.

Pena D., Feick, R. Hristov H.D. & Grote, W. 2003. Measurement and modeling of propagation losses in brick and concrete walls for the 900-MHz band. IEEE Trans. On antennas and propagation 51(1): 31-39.

Rappaport, T.S. 2002. Wireless communications: principles and practices. 2nd Ed., New Jersey: Prentice Hall.

Remley, K. A., Anderson, H. R. & Weisshar, A. 2000. Improving the Accuracy of Ray-Tracing Techniques, IEEE Transactions on Vehicular Technology, 49 (6): 2350-2358.

Rick Reed's. 2009. Snell's law applet & table of indices of refraction. http://www.ps.missouri.edu/rickspage/refract/refraction.html. [20 November 2010].

Rizk, K., Wagen, J.F. & Gardiol, F. 1997. Two-Dimensional Ray-Tracing Modeling for Propagation Prediction in Microcellular Environments. IEEE Transactions on Vehicular Technology 46(2): 508-518.

Seidel S.Y. & Rappaport T.S. 1992. 914 MHz path loss prediction models for indoor wireless communications in multifloored buildings. IEEE Transactions on Antennas and Propagation 40(2): 207-217.

Seybold, J.S. 2005. Introduction to RF Propagation, John Wiley & Sons, Inc 25-28.

Swanson, Jr.D.G. & Hoefer, W.J.R. .2003 .Microwave Circuit Modeling Using Electromagnetic Field Simulation. Norwood: Artech House, Inc.

Tam, W.K. & Tran, V.N. 1995. Propagation modelling for indoor wireless communication. Electronics & Communication Engineering Journal 7(5): 221-228.

Tam, W.K. & Tran, V.N. 1996. Multi-ray propagation model for indoor wireless communications. Electronics Letters 32(2): 135-137.

Tang, R. 1999. Indoor propagation in cellular/PCS system design. 1999 Emerging Technologies Symposium on Wireless Communications and Systems 8.1 - 8.4.

Valenzuela R.A. 1994. Ray tracing prediction of indoor radio propagation. 5th IEEE International Symposium on Wireless Networks-Catching the Mobile Future, Personal, Indoor and Mobile Radio Communications 1: 140-144.

Valenzuela R.A., Fortune, S. & Ling, J. 1998. Indoor propagation prediction accuracy and speed versus number of reflections in image-based 3-D ray-tracing. 48th IEEE Vehicular Technology Conference (VTC 89) 1: 539-543.

Wang, C-L, Chiou, Y-S & Yeh, S-C. 2005. A location algorithm based on radio propagation modeling for indoor wireless local area networks. IEEE 61st Vehicular Technology Conference, 2005, VTC 2005 5: 2830-2834.

Wertz, P., Zimmermann, D.,Â Landstorfer, F.M., Wolfle, G. & Hoppe, R.Â 2003. Hybrid ray optical models for the penetration of radio waves into enclosed spaces. IEEE 58th Vehicular Technology Conference, 2003. VTC 2003-Fall 1: 109-113.

Goldsmith, A. 2005. Wireless communications. Cambridge University Press.

Wireless Insite. 2005. Site-specific Radio propagation Prediction Software. User's Manual Vervion 2.1.0. Remcom Inc.

Yang, M. & Brown, A. 2010. Simulation of propagation through a frequency selective wall at 3 GHz. Proceedings of the Fourth European Conference on Antennas Mand Propagation (EuCAP) 1-5.