| Wireless Sensor Network(WSN)technology is an important way to get information,which has been widely used in intelligent building.In order to provide people with a safe,comfortable,efficient and convenient environment,many applications in intelligent buildings such as indoor navigation,living alone monitoring,fire rescue,remote data monitoring and so on need the determinate location information.Therefore,as one of the core technologies of WSN,node location technology is essential for intelligent building.This paper mainly studies the localization technology of wireless sensor networks based on TOA ranging and WIFI fingerprinting location.In this paper,based on the analysis of the location requirements in the building,the design scheme of TOA location and WIFI location in the corridor area is proposed.Then,this paper discusses the problems and the sources of errors in TOA ranging,and makes use of the improved Kalman filter for the existence of non-line-of-sight errors and random errors.At the same time the system error caused by the node’s own characteristic and multi-path interference will have an impact on the positioning results.This paper proposes a strategy to solve the localization problem by using the nonlinear constraint idea.In the process of solving the particle swarm algorithm,this paper constructs the penalty function of the system error estimation range to further narrow the feasible region of the solution,and improve the positioning accuracy.Experimental results show that the improved Kalman filter and particle swarm optimization algorithm can effectively suppress the ranging error and improve the indoor positioning accuracy.Then,based on the WIFI location of corridor area,this paper discusses the problems faced by WIFI fingerprint matching location.In view of the problem that RSSI is susceptible to environmental interference,this paper proposes a Kalman filtering algorithm.On the other hand,In this paper,a fingerprint selection strategy based on BP neural network is proposed,which uses the mean clustering algorithm to classify out fingerprints.By taking the MAC address and RSSI of the acquired WIFI anchor node as the characteristics of the BP network classifier,the current sub-region index of the unknown node is obtained.When the k-nearest neighbor matches the fingerprint,the fingerprint of the non-correlative region is extracted by the sub-region index.A weighted k-Nearest Neighbor-Fingerprint Matching(K-Nearest Neighbor)algorithm is used to calculate the Euclidean distance between the matching fingerprint and the RSSI vector.Experiments show that Kalman filter has good smoothing effect on RSSI value.Combining BP neural network region discriminant and weighted k-nearest neighbor algorithm,we can effectively eliminate outliers in fingerprint database clustering results,and improve the localization precision obviously.Finally,a hybrid building positioning system based on TOA and WIFI fingerprint is designed and implemented.TOA location is used in the indoor area and WIFI fingerprint location in the corridor area.In order to solve the problem of positioning algorithm switching when the unknown nodes move in the two areas of the building,the MAC address + TOA ranging value and the WIFI fingerprint are used as the classification characteristics of the BP network classifier to solve the current position of the unknown node before solving the position using the positioning algorithm.And the positioning algorithm is selected in real time according to the discrimination result.The experimental results show that the proposed method is feasible and effective for the hybrid Positioning System. |