## 1 Introduction  
Currently, sensor networks are the main part of many monitoring and control systems. Many of them tend to be wireless because it allows them to be spatially distributed. Wireless Sensor Networks (WSNs) [1] are formed dynamically because the connectivity between nodes depends on their position and their position variation over the time. These kinds of networks are easy to be deployed and are self-configuring. A sensor node is a transmitter, a receiver, and it offers services of routing between nodes without direct vision, as well as recording data from other sensors. Since the 1950s, location systems have been incorporated into our lives. In the 1980s the Global Position System (GPS) [2] began as a location method for outdoor environments. This system is based on a triangulation system of variables, where we know the position of a device thanks to the existing satellite network. Now, this system remains the most used because of its good performance and the low price of the required devices. At the end of the year 2000 other location systems appeared, based on cellular networks [3]. These systems are designed for emergency situations. In this case, the base stations are used as a reference point and the location is made through the distance and the angle of the signal. These systems are developed to work in outdoor environments and the devices must also have several communication skills. Previous technologies are not adequate for indoor environments. This is mainly due to the signal characteristics. Other wireless technologies, such as IEEE 802.11a/b/g [4], Radio Frequency IDentification (RFID) [5], Ultra Wide Band wideband (UWB) [6], Bluetooth [7] or Zigbee [8], must be used for indoor locations. The main problem in these environments is the multipath effect and signal variability. The location in these types of environments can be centralized [4] or distributed [9]. The centralized location uses reference devices. These devices tend to have a greater capacity and they are located in a fixed position, for example a base station (BS) or an Access Point (AP). In contrast, in the distributed location there are no reference devices. The devices interact with their neighbors in order to know their position. A study about the oscillation of the received signal is shown in reference [10]. The RSS variation is introduced in our approach in order to obtain smaller degree errors in the location service. The three main issues that make variations in the RSS are the following ones:  
* Temporal variations: when the receiver remains in a fixed position, the signal level measured varies as time goes by. * Small-Scale variations: the signal level changes when the device is moving over small distances (less than the wavelength). In IEEE 802.11 b/g technologies the wavelength is 12.5 cm. * Large-Scale variations: the signal level varies with the distance due to the attenuation that the radio frequency (RF) signal suffers with the distance. Besides these typical variations of the RF signal together with the receiver mobility, we have also considered the temperature and humidity variations, the effect of opening and closing doors, the changes in the localization of the furniture, and the presence and movement of human beings, which are all characteristics of indoor environments. These variations have already been analyzed in [11]. All these systems can be used in different applications. Localization in sensor networks has attracted a large research effort in the last decade. Some WSNs location systems application areas are:* Emergencies: When we want to locate an individual in the case of an emergency (injury or criminal attacks) or in a life-threatening situation. Both can be located using the positioning capability of the mobile device. * Information: It can be used in public places such as swimming pools, museums, conferences, etc. in order to provide information service about this place to the user depending on his position.