CN110401977B - Multi-floor indoor positioning method based on Softmax regression multi-classification recognizer - Google Patents

Multi-floor indoor positioning method based on Softmax regression multi-classification recognizer Download PDF

Info

Publication number
CN110401977B
CN110401977B CN201910544573.3A CN201910544573A CN110401977B CN 110401977 B CN110401977 B CN 110401977B CN 201910544573 A CN201910544573 A CN 201910544573A CN 110401977 B CN110401977 B CN 110401977B
Authority
CN
China
Prior art keywords
floor
rss
target
value
softmax
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Active
Application number
CN201910544573.3A
Other languages
Chinese (zh)
Other versions
CN110401977A (en
Inventor
罗娟
王纯
章翠君
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Hunan University
Original Assignee
Hunan University
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Hunan University filed Critical Hunan University
Priority to CN201910544573.3A priority Critical patent/CN110401977B/en
Publication of CN110401977A publication Critical patent/CN110401977A/en
Application granted granted Critical
Publication of CN110401977B publication Critical patent/CN110401977B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Images

Classifications

    • GPHYSICS
    • G01MEASURING; TESTING
    • G01SRADIO DIRECTION-FINDING; RADIO NAVIGATION; DETERMINING DISTANCE OR VELOCITY BY USE OF RADIO WAVES; LOCATING OR PRESENCE-DETECTING BY USE OF THE REFLECTION OR RERADIATION OF RADIO WAVES; ANALOGOUS ARRANGEMENTS USING OTHER WAVES
    • G01S5/00Position-fixing by co-ordinating two or more direction or position line determinations; Position-fixing by co-ordinating two or more distance determinations
    • G01S5/02Position-fixing by co-ordinating two or more direction or position line determinations; Position-fixing by co-ordinating two or more distance determinations using radio waves
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F18/00Pattern recognition
    • G06F18/20Analysing
    • G06F18/21Design or setup of recognition systems or techniques; Extraction of features in feature space; Blind source separation
    • G06F18/214Generating training patterns; Bootstrap methods, e.g. bagging or boosting
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F18/00Pattern recognition
    • G06F18/20Analysing
    • G06F18/24Classification techniques
    • G06F18/241Classification techniques relating to the classification model, e.g. parametric or non-parametric approaches
    • G06F18/2413Classification techniques relating to the classification model, e.g. parametric or non-parametric approaches based on distances to training or reference patterns
    • G06F18/24147Distances to closest patterns, e.g. nearest neighbour classification
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04BTRANSMISSION
    • H04B17/00Monitoring; Testing
    • H04B17/30Monitoring; Testing of propagation channels
    • H04B17/309Measuring or estimating channel quality parameters
    • H04B17/318Received signal strength
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04WWIRELESS COMMUNICATION NETWORKS
    • H04W64/00Locating users or terminals or network equipment for network management purposes, e.g. mobility management
    • H04W64/006Locating users or terminals or network equipment for network management purposes, e.g. mobility management with additional information processing, e.g. for direction or speed determination

Landscapes

  • Engineering & Computer Science (AREA)
  • Data Mining & Analysis (AREA)
  • Theoretical Computer Science (AREA)
  • Physics & Mathematics (AREA)
  • General Physics & Mathematics (AREA)
  • Evolutionary Biology (AREA)
  • Signal Processing (AREA)
  • Computer Networks & Wireless Communication (AREA)
  • General Engineering & Computer Science (AREA)
  • Evolutionary Computation (AREA)
  • Life Sciences & Earth Sciences (AREA)
  • Artificial Intelligence (AREA)
  • Bioinformatics & Cheminformatics (AREA)
  • Bioinformatics & Computational Biology (AREA)
  • Computer Vision & Pattern Recognition (AREA)
  • Remote Sensing (AREA)
  • Radar, Positioning & Navigation (AREA)
  • Electromagnetism (AREA)
  • Quality & Reliability (AREA)
  • Collating Specific Patterns (AREA)
  • Image Analysis (AREA)

Abstract

The invention discloses a multi-floor indoor positioning method based on a Softmax regression multi-classification recognizer, which comprises an offline stage and an online stage. The off-line stage comprises an off-line fingerprint database acquisition stage and an off-line multi-floor judgment classifier construction stage, wherein the off-line fingerprint database acquisition stage is used for establishing an off-line RSS fingerprint database by acquiring RSS values of all APs sensed by all sampling points; and in the off-line multi-floor discrimination classifier construction stage, training the multi-floor discrimination classifier, minimizing a cross entropy loss function of the multi-floor discrimination classifier through a gradient descent algorithm, and constructing an optimal multi-floor discrimination classifier by using a model parameter corresponding to the minimum cross entropy loss function value. When positioning a target to be positioned in an online stage, firstly, a multi-floor discrimination classifier is adopted to calculate the probability that the target belongs to each floor, the floor corresponding to the maximum probability is the floor where the target to be positioned is located, and then an improved KNN algorithm is utilized to calculate the coordinate position where the target to be positioned is located.

Description

Multi-floor indoor positioning method based on Softmax regression multi-classification recognizer
Technical Field
The invention belongs to the technical field of wireless local area networks and indoor positioning, and particularly relates to a multi-floor indoor positioning method based on WiFi and Softmax regression multi-classification recognizers.
Background
The progress of the era stimulates people's desire to acquire precise positions anytime and anywhere, and the desire is further intensified by the era of the internet of things. As a result, indoor positioning systems have penetrated many aspects of modern life, such as indoor navigation, in-store shopping guide, item tracking, and other related activities. In recent years, with the wide-range deployment of wireless communication systems in indoor environments, indoor wireless positioning technologies have attracted more and more research interests, and various wireless indoor positioning technologies, such as wireless local area network WiFi, bluetooth, sensor networks, Ultra Wide Band (UWB), radio frequency identification tags (RFID), etc., have emerged, and the positioning accuracy thereof varies from several meters to tens of meters. In addition to the positioning accuracy, the cost of the device also becomes a consideration, at present, Wi-Fi RSS (received signal strength) based on IEEE 802.11n protocol standard is widely applied to indoor positioning systems due to its low price and easy availability, and the fingerprint positioning technology based on Wi-Fi RSS becomes the focus of the current indoor positioning technology research due to its advantages of no need of extra infrastructure, low cost, high positioning accuracy and the like.
In recent years, the urban space is becoming three-dimensional and complex, people's daily life, work and leisure are increasingly concentrated on high-rise buildings, and people pay more attention to floors and location information services contained therein. To date, most indoor positioning studies have been based on two-dimensional space, i.e., single-floor studies. For the measurement of floors in high-rise buildings, manual designation is generally adopted, and then two-dimensional space positioning is carried out, so that the intelligent degree of positioning application is greatly reduced. Therefore, intelligent and efficient multi-floor indoor positioning technology gradually receives extensive attention and research.
Currently, there are two main research directions for multi-floor indoor positioning technology: firstly, a positioning method for distinguishing multiple floors through a WiFi fingerprint database is based on the WiFi fingerprint database, a plurality of two classifiers are trained on reference position fingerprint sample data with the number of floors in an off-line stage (the common training methods comprise artificial neural network, Bayesian classification and K nearest neighbor), a floor discrimination model is obtained by combining a voting mechanism, and the to-be-positioned points are judged by using the obtained floor discrimination model in an on-line stage. However, as the number of ap (access point) and floors increases, the computational complexity of the method also increases. Secondly, the built-in barometer of smart mobile phone can detect the height on ground, but not all smart mobile phones all have the baroceptor, and the motion mode of people under the stair scene is very complicated, and the change law of barometer value is different under different speeds of motion, and the floor judges the accuracy lower.
Disclosure of Invention
Aiming at the defects of the prior art, the invention provides a multi-floor indoor positioning method based on a Softmax multi-classification recognizer, which is characterized in that a grid division is carried out in an off-line stage, and then data are collected in each grid, so that a complete off-line fingerprint database is established; then establishing a multi-classifier floor discrimination model by using a Softmax discrimination analysis method; in the online stage, judging a floor where a target to be positioned is finally located according to the multi-classifier floor judgment model in the offline stage; and finally, positioning the specific position of the target to be positioned by utilizing an improved KNN algorithm.
The invention solves the technical problems through the following technical scheme:
a multi-floor indoor positioning method based on a Softmax regression multi-classification recognizer comprises an off-line stage and an on-line stage:
1) off-line phase
Step (1): acquiring offline RSS fingerprint information and establishing an offline RSS fingerprint database;
step (2): initializing parameters of a Softmax regression multi-class recognizer, establishing a floor discrimination model of the initial multi-class recognizer, and training the Softmax regression multi-class recognizer by utilizing an offline RSS fingerprint database;
and (3): constructing a Softmax multi-floor discrimination classifier model by using the model parameters obtained by training;
2) on-line phase
And (4): acquiring RSS values of APs acquired by a target to be positioned, inputting the RSS values into a Softmax multi-classification recognizer floor discrimination model, calculating the probability that the target to be positioned belongs to each floor by using the Softmax multi-classification recognizer floor discrimination model, and selecting a floor corresponding to the maximum probability as a final judgment result of the floor where the target to be positioned is located;
and (5): and calculating the specific position of the target to be positioned according to the distance between the RSS value of each AP acquired by the target to be positioned and the RSS value acquired by each sampling point in the RSS fingerprint database of the floor where the target to be positioned is located.
Further, the specific operation steps of establishing the offline RSS fingerprint database in the offline stage in step (1) are as follows:
step (1.1): setting N APs in the multi-floor indoor area, and performing homogenization grid division on the multi-floor indoor area, wherein each floor is divided into M grids, and the plane projection coordinates of the M grids of each floor are the same;
step (1.2): uniformly selecting s sampling points in each grid, collecting RSS values of all APs sensed by each sampling point for t times, and carrying out s multiplied by t times sampling on each grid;
calculating the average value of the RSS values acquired by each sampling point in each grid, the average value of the RSS values of each grid and the average value of the RSS value of each AP in each grid of each floor;
due to the influence of indoor multipath (including noise, personnel walking and other objects), the RSS value of the collected AP has larger fluctuation, and the average value is adopted here, so that the error caused by fluctuation can be reduced;
step (1.3): the RSS fingerprint library is formed by fingerprint sequences of a plurality of sampling points, and the fingerprint sequence of each sampling point is expressed as [ Fj,Gji,RSS1,RSS2,...,RSSr,...,RSSn],FjIndicating the jth floor, GjiThe ith grid corresponding to the jth floor is represented, i is less than or equal to M, RSSrAnd representing the RSS value of the r-th AP collected by the sampling point, wherein N represents the number of the APs perceived by the sampling point, N is less than N, and j, i and r all represent independent variables.
Further, the Softmax multi-floor discrimination classifier model in the step (2) is as follows:
Figure GDA0002198525200000031
wherein θ ═ θ12,…,θK) Parameters representing a Softmax multi-floor discrimination classifier model are obtained by calculation through a training sample constructed by an offline RSS fingerprint database, and an initial value is a random value in the training process; y is(i)A label representing a floor category; k represents the number of actual floors in the building; j represents the number of the middle floor of the building; x is the number of(i)Representing RSS values, p (y), of N APs collected at grid i of a floor(i)=j|x(i)(ii) a Theta) represents x(i)Belongs to the predicted probability value collected at floor j;
Figure GDA0002198525200000032
representing a normalization function and T represents a transposition.
The probability distribution is normalized such that the output elements are probability values between 0-1 and the sum of all probabilities is 1.
Further, the parameters of the Softmax multi-floor discrimination classifier model in the step (3) are parameters corresponding to a minimum cross entropy loss function obtained when a gradient descent method is adopted to minimize the cross entropy loss function for model training based on training samples constructed by an offline RSS fingerprint library;
the calculation formula of the cross entropy loss function is as follows:
Figure GDA0002198525200000033
wherein m represents the total number of grids for all floors in the building; k represents the number of actual floors in the building; j represents one of the floors; 1 {. is an illustrative function, and its value rule is 1{ expression whose value is true } ═ 1, and 1{ expression whose value is false } ═ 0; 1{ y(i)J represents the true probability distribution of the sample; p (y)(i)=j|x(i)(ii) a Theta) represents x(i)Belonging to the predicted probability value collected at floor j.
Further, the gradient calculation expression for minimizing the cross entropy loss function by adopting a gradient descent method is as follows:
Figure GDA0002198525200000034
wherein the content of the first and second substances,
Figure GDA0002198525200000035
is a vector, the ith element represents J (theta) to thetajThe partial derivative of the ith component of (a).
The multi-classification recognizer floor discrimination model comprises a multi-classifier; training the multiple classifiers by adopting a Softmax discriminant analysis method, and selecting the multiple classifiers corresponding to the minimum value of the cross entropy loss function as optimal multiple classifiers; the input of the multi-classifier is the RSS values of all APs received by the sampling points, and the output is the probability value (namely, the prediction probability distribution) of the target belonging to each floor; the multi-classifier is trained through a Softmax discriminant analysis method, a Softmax multi-classification recognizer floor discriminant model is established, the traditional method that a plurality of two classifiers are combined with a voting mechanism to perform judgment is replaced, floor pairing, training of the plurality of two classifiers and final voting are not needed, and storage and calculation expenses are greatly reduced;
further, in the step (5), an improved K-nearest neighbor algorithm is adopted to calculate the specific position of the target to be positioned;
step (5.1): the RSS value of each AP collected by a target to be positioned is set as
Figure GDA0002198525200000041
RSSrRepresenting the RSS value of the r AP acquired by the target to be positioned, wherein r is an independent variable;
step (5.2): calculating the distance from the RSS value of the target to be positioned to the RSS value acquired by all sampling points in the floor offline RSS fingerprint database of the target to be positioned, wherein the distance calculation formula is as follows:
Figure GDA0002198525200000042
wherein the RSSirRepresenting the RSS value of the r-th AP acquired by an acquisition point i in an off-line RSS fingerprint library, wherein i and r are independent variables, i is more than or equal to 1 and less than or equal to s, and r is more than or equal to 1 and less than or equal to n; s is the number of sampling points selected in each grid; n represents the number of APs sensed by the sampling point i; diRepresenting the RSS value distance between the target to be positioned and the sampling point i;
step (5.3): selecting four sampling points closest to each other, and endowing the four sampling points with different weights lambda according to the distancejJ sequentially takes 1,2,3 and 4, namely four sampling points with the shortest distance, and the weight calculation formula is
Figure GDA0002198525200000043
djDenotes the jth nearest distance, d1+d2+d3+d4Represents the sum of the four closest distances;
step (5.4): calculating the coordinates (p) of the object to be positionedx,py)=λ1(x1,y1)+λ2(x2,y2)+λ3(x3,y3)+λ4(x4,y4) Wherein (x)1,y1)、(x2,y2)、(x3,y3)、(x4,y4) Respectively representing the position coordinates of the four nearest sampling points in the RSS fingerprint database.
Has the advantages that:
the invention provides a multi-floor indoor positioning method based on a Softmax regression multi-classification recognizer, which comprises the steps of meshing floors in an off-line stage, selecting sampling points to obtain RSS values of all APs sensed by the sampling points, and establishing an off-line RSS fingerprint database; then classifying a plurality of floors in the detection area, and distributing a corresponding floor label for each floor; initializing parameters of a Softmax multi-class recognizer, on the basis, solving model parameters corresponding to the minimum cross entropy loss function value by adopting a gradient descent method, namely optimal Softmax multi-class recognition parameters, and constructing a corresponding optimal multi-class recognizer floor discrimination model by utilizing the optimal Softmax multi-class recognition parameters; when positioning a target to be positioned, substituting an RSS value of an AP (access point) collected by the target to be positioned into an optimal multi-classification recognizer floor discrimination model to obtain a floor where the target to be positioned is located, and finally calculating a coordinate position where the target to be positioned is located;
according to the invention, a multi-classifier floor discrimination model is constructed by adopting a Softmax multi-classification recognizer, a traditional method for judging by combining a plurality of two classifiers with a voting mechanism is replaced, and task splitting (floor pairing), a plurality of two classifiers construction and a voting decision process are not required, so that the storage and calculation expenses are greatly saved, and the reliability and expandability of floor discrimination are improved; after the floor is determined, the invention adopts MDKNN to calculate the coordinates of the target to be positioned finally, thereby improving the positioning precision and achieving the aim of the invention.
Drawings
In order to more clearly illustrate the technical solution of the present invention, the drawings needed to be used in the description of the embodiments are briefly introduced below, and it is obvious that the drawings in the following description are only one embodiment of the present invention, and it is obvious for those skilled in the art to obtain other drawings based on the drawings without creative efforts.
FIG. 1 is a block diagram of a multi-floor indoor positioning method based on a Softmax regression multi-classification recognizer of the present invention;
FIG. 2 is a schematic diagram of a Softmax regression multi-class recognizer in the present invention;
FIG. 3 is a classification result obtained by the minimum cross entropy loss function according to an embodiment of the present invention;
fig. 4 is a comparison of the positioning accuracy between the floor determination model and the case of no floor determination according to the present invention.
Detailed Description
The technical solutions in the present invention are clearly and completely described below with reference to the drawings in the embodiments of the present invention, and it is obvious that the described embodiments are only a part of the embodiments of the present invention, and not all of the embodiments. All other embodiments, which can be derived by a person skilled in the art from the embodiments given herein without making any creative effort, shall fall within the protection scope of the present invention.
As shown in fig. 1, the multi-floor indoor positioning method based on Softmax regression multi-class recognizer provided by the present invention includes an offline phase and an online phase, wherein the offline phase includes the following steps:
step (1), establishing an RSS fingerprint database: the method comprises the following steps of performing grid division on multi-floor indoor areas, collecting RSS values of APs in each grid, and generating an RSS fingerprint database, wherein the method comprises the following specific operation steps:
step (1.1) setting N APs in a multi-floor indoor area, carrying out homogenization grid division on the multi-floor indoor area, dividing each floor into M grids, and enabling plane projection coordinates of the M grids of each floor to be the same;
step (1.2) uniformly selecting 6 sampling points in each grid, collecting the RSS value of each AP sensed by each sampling point for 5 times, and then sampling each grid for 6 multiplied by 5 times;
calculating the average value of the RSS values acquired by each sampling point in each grid, the average value of the RSS values of each grid and the average value of the RSS value of each AP in each grid of each floor;
due to the influence of indoor multipath (including noise, personnel walking and other objects), the RSS value of the collected AP has larger fluctuation, and the average value is adopted here, so that the error caused by fluctuation can be reduced;
step (1.3) forming an RSS fingerprint library by using a fingerprint sequence of a plurality of sampling points, wherein the fingerprint sequence of each sampling point is represented as [ F ]j,Gji,RSS1,RSS2,...,RSSr,...,RSSn],FjIndicating the jth floor, GjiThe ith grid corresponding to the jth floor is represented, i is less than or equal to M, RSSrAnd representing the RSS value of the r-th AP collected by the sampling point, wherein N represents the number of the APs perceived by the sampling point, N is less than N, and j, i and r all represent independent variables.
Step (2) minimizing a cross entropy loss function: firstly, initializing parameters of a Softmax regression multi-classification recognizer, and establishing a floor discrimination model of the initial multi-classification recognizer; then classifying a plurality of floors in the detection area, and distributing a corresponding floor label for each floor; secondly, inputting a training data set with labels, constructing real probability distribution of training sample classes for each given sample according to the actual class label of the given sample, outputting the probability of the sample belonging to each class by using a discrimination function of a multi-classifier floor discrimination model, namely obtaining the predicted probability distribution of the training sample classes, and representing the similarity between the real class label distribution of a plurality of training samples and the class label distribution predicted by the model through a cross entropy loss function; finally, minimizing the cross entropy loss function by using a gradient descent method to obtain a corresponding model parameter when the loss function is minimized;
step (3) building a classifier floor discrimination model: constructing an optimal multi-classification recognizer floor discrimination model by using model parameters corresponding to the minimum value of the cross entropy loss function;
in the indoor positioning of multiple floors (the number of floors is more than or equal to 3), because the number of floors is more, the complexity and the difficulty of positioning are increased, the invention adopts the mode of converting the multi-floor judgment into the multi-class classification problem, and utilizes a Softmax multi-class recognizer to construct a floor judgment model so as to solve the problem of multiple floors and reduce the complexity of positioning.
The Softmax multi-classification recognizer converts a multi-floor judgment problem into a multi-class classification task to solve, namely firstly classifying a plurality of floors in a detection area and allocating a corresponding floor label to each floor; secondly, initializing parameters of a Softmax regression multi-classification recognizer, minimizing a cross entropy loss function by using a gradient descent method, and training parameters of an optimal multi-classifier to obtain the optimal Softmax multi-classification recognizer; during online positioning, floor prediction is carried out by using a floor discrimination model constructed based on a Softmax multi-classification recognizer, the probability that a positioning target belongs to each floor is calculated, and the floor corresponding to the maximum probability value is selected as a final classification result.
As shown in fig. 2, taking 3 floors (f1, f2, f3 represent 3 floors) as an example, first, a floor attribute sequence is input to a Softmax multi-class identifier floor discrimination model, the model outputs probability values (P1, P2, P3) that the targets are located at 3 floors, and the floor f3 corresponding to the maximum probability value P3 is the floor where the targets are located.
The floor attribute of each sample data refers to the average value of the RSS value of each grid of each AP in the corresponding floor in the sample data;
taking 3 floors, 2 APs per floor as an example, 3 floors are respectively represented by f1, f2 and f3, two APs of f1 are represented by AP1-1 and AP1-2, two APs of f2 are represented by AP2-1 and AP2-2, and two APs of f3 are represented by AP3-1 and AP3-2, and the signals of the floor and other floors AP can be received by the target at each floor. Taking floor f1 as an example, the target can receive information from AP1-1, AP1-2, AP2-1, AP2-2, AP3-1 and AP3-2 at floor f 1. The floor attributes of the floor f1 include RSS values received at a certain grid position of f1 by six APs (AP1-1, AP1-2, AP2-1, AP2-2, AP3-1, AP3-2), and taking 3 grids per floor as an example, RSS values received by the target at grid 1 from six APs (AP1-1, AP1-2, AP2-1, AP2-2, AP3-1, AP3-2) are 70.28, 68.67, 70.39, 72.72, 74.11, 71.50, respectively, so that the floor attributes of samples collected by the target at grid 1 of f1 are [70.28, 68.67, 70.39, 72.72, 74.11, 71.50], and the floor attributes of other floors (f2, f3) are analogized in turn. The actual RSS values are negative values, which are convenient to calculate and the negative sign is omitted.
The calculation formula of the category discrimination function in the Softmax multi-classification recognizer floor discrimination model is as follows:
Figure GDA0002198525200000071
wherein θ ═ θ12,…,θK) Parameters representing a Softmax multi-floor discrimination classifier model are obtained by calculation through a training sample constructed by an offline RSS fingerprint database, and an initial value is a random value in the training process; y is(i)A label representing a floor category; k represents the number of actual floors in the building; j represents the number of the middle floor of the building; x is the number of(i)Representing RSS values, p (y), of N APs collected at grid i of a floor(i)=j|x(i)(ii) a Theta) represents x(i)Belongs to the predicted probability value collected at floor j;
Figure GDA0002198525200000072
representing a normalization function and T represents a transposition. The probability distribution is normalized such that the output elements are probability values between 0-1 and the sum of all probabilities is 1.
When the Softmax multi-classification recognizer floor discrimination model is trained, the real probability distribution is calculated according to the real floor labels of each group of training data, and then the floor attribute of each group of training data is substituted into the formula (1) to obtain the prediction probability distribution.
The invention adopts a multi-class classification strategy to solve the problem of multiple floors, and then adopts a gradient descent method to train a model. The principle of the Softmax multi-classification recognizer is that attributes of a sample set with labels are mapped into prediction probability distribution through a discriminant function, so that the probability distribution constructed according to a target real label is similar to the probability distribution predicted by the discriminant function as much as possible, when new samples are classified, the probability distribution of the new samples is predicted by the same discriminant function, and then the classes of the new samples are determined according to the probability maximum value in the prediction probability distribution.
The probability calculation formula for classifying the samples into different floors (f1, f2, f3) in the discriminant function is as follows:
Figure GDA0002198525200000081
wherein X represents X1、X2、X3Y represents different floor labels (f1, f2, f3), X1RSS value sets, X, representing targets collected at different grid locations in floor f12RSS value sets, X, representing targets collected at different grid locations in floor f23Representing the set of RSS values collected by the target at different grid locations in floor f 3.
At this time, the equation of the cross entropy loss function of the Softmax multi-classification recognizer floor discrimination model is as follows:
Figure GDA0002198525200000082
wherein m represents the total number of grids for all floors in the building; k represents the number of actual floors in the building; j represents one of the floors; 1 {. is an illustrative function, and its value rule is 1{ expression whose value is true } ═ 1, and 1{ expression whose value is false } ═ 0; 1{ y(i)J represents the true probability distribution of the sample; p (y)(i)=j|x(i)(ii) a Theta) represents x(i)Belonging to the predicted probability value collected at floor j.
Obviously, the cross entropy loss function characterizes the difference between the predicted output and the true label of the sample set, and the closer the predicted output is to the true sample label, the smaller the loss function J (θ) is. The objective to be minimized is obtained by trying to make the probability distribution constructed according to the target real label and the probability distribution predicted by the discriminant function as similar as possible, which is equation (3).
By substituting formula (2) for formula (3), formula (3) is rewritten as:
Figure GDA0002198525200000083
the formula (4) is a cross entropy loss function J (θ) of the target to be minimized, i.e., the sample true label and the prediction output, and the gradient descent method can be used to minimize the formula (4), i.e., the gradient descent method is used to obtain a parameter θ corresponding to the minimized cross entropy loss function.
When the parameter θ in the equation (4) is solved by the gradient descent method, the partial derivative function of the cross entropy loss function equation (4) must be obtained, and the partial derivative function of the equation (4) is shown in the equation (5):
Figure GDA0002198525200000084
in conjunction with formula (2), formula (5) can be rewritten as:
Figure GDA0002198525200000091
wherein the content of the first and second substances,
Figure GDA0002198525200000092
the partial derivatives of the loss function on the ith parameter of the jth class are shown.
And (3) obtaining an optimal parameter set theta by utilizing a gradient descent method through multiple iterations and minimizing the formula (4), and further obtaining a practical and available Softmax multi-classification recognizer floor discrimination model.
Taking a building with three floors as an example, 6 APs are uniformly distributed on the first floor and the second floor, the optimal parameter set θ is constructed into formula (1), 25 test samples are collected for each floor, 25 × 3 ═ 75 test samples are used as a test set, the probability that each test sample in the test set belongs to each floor is calculated according to formula (1), and the floor corresponding to the maximum probability value is selected as the final floor judgment result of the test sample. Fig. 3 is a result of finally classifying a test set having three categories (three floors), and the result of fig. 3 shows that an optimal parameter set θ can be selected by using a minimum cross entropy loss function calculated by gradient descent, and then a corresponding multi-classification recognizer floor discrimination model is constructed by using the optimal parameter set, and the corresponding multi-classification recognizer floor discrimination model is used for determining the number of floors where an object to be positioned is located, and the determination result is accurate.
The online phase includes the following steps:
and (4) judging the floor where the target to be positioned is located: the method comprises the steps of obtaining RSS values of all APs collected by a target to be positioned, inputting the RSS values of all APs collected by the target to be positioned into an optimal multi-classification recognizer floor discrimination model, calculating the probability that the positioning target belongs to each floor by the multi-classification recognizer floor discrimination model, and selecting the floor corresponding to the maximum probability as the final judgment result of the floor where the target to be positioned is located.
Taking 3 floors, 2 APs per floor as an example, 3 floors are respectively represented by f1, f2 and f3, two APs of f1 are represented by AP1-1 and AP1-2, two APs of f2 are represented by AP2-1 and AP2-2, and two APs of f3 are represented by AP3-1 and AP3-2, and the signals of the floor and other floors AP can be received by the target at each floor. The RSS values of the APs are collected at the position of the target to be positioned, the RSS values of the APs 1-1, AP1-2, AP2-1, AP2-2, AP3-1 and AP3-2 are collected at the position of the target to be positioned, the labels AP1-1, AP1-2, AP2-1, AP2-2, AP3-1 and AP3-2 of the target to be positioned are substituted into the multi-classification identifier floor discrimination model, so that the RSS values [70.28, 68.67, 70.39, 72.72, 74.11 and 71.50] of the AP from the AP1-1, AP1-2, AP2-1, AP2-2, AP3-1 and AP3-2 collected by the target to be positioned are mapped to (f, f) of the multi-classification identifier, the probability distribution predictor with the maximum probability of the floor distribution is selected and output (1, 3, 1, 599) of the multi-classification identifier floor distribution predictor, as shown in fig. 2, if the probability value of f3 is 0.78, which is the maximum probability value, the floor on which the target to be positioned is located is f 3.
And (5) calculating the specific position of the target to be positioned.
Step (5.1) setting RSS values of all APs collected by the target to be positioned
Figure GDA0002198525200000093
RSSrRepresenting the RSS value of the r AP acquired by the target to be positioned, wherein r is an independent variable;
step (5.2) calculating the distance from the RSS value of the target to be positioned to the RSS value collected by all sampling points in the floor offline RSS fingerprint database where the target to be positioned is located, wherein the distance calculation formula is as follows:
Figure GDA0002198525200000101
wherein the RSSirRepresenting the RSS value of the r-th AP acquired by an acquisition point i in an off-line RSS fingerprint library, wherein i and r are independent variables, i is more than or equal to 1 and less than or equal to s, and r is more than or equal to 1 and less than or equal to n; s is the number of sampling points selected in each grid; n represents the number of APs sensed by the sampling point i; diRepresenting the RSS value distance between the target to be positioned and the sampling point i, wherein the distance is calculated by the square sum of the difference of the corresponding RSS values of the APs between the target to be positioned and the sampling point; the number of the APs collected by the target to be positioned is equal to the number of the APs perceived by each sampling point;
step (5.3) selecting four sampling points with the nearest distance, and endowing the four sampling points with different weights lambda according to the distancejJ sequentially takes 1,2,3 and 4, namely four sampling points with the shortest distance, and the weight calculation formula is
Figure GDA0002198525200000102
djDenotes the jth nearest distance, d1+d2+d3+d4Representing the sum of the four closest distances. In the embodiment, 4 sampling points are selected according to experience, 3 or less sampling points are selected relatively less, the error is large, more than 4 sampling points are selected far away, and the error is large, so that 4 sampling points are selected most appropriately;
step (5.4) calculating the coordinates (p) of the target to be positionedx,py)=λ1(x1,y1)+λ2(x2,y2)+λ3(x3,y3)+λ4(x4,y4) Wherein (x)1,y1)、(x2,y2)、(x3,y3)、(x4,y4) Respectively representing the position coordinates of the four nearest sampling points in the RSS fingerprint database.
After the floors are determined by adopting an improved K-nearest neighbor algorithm, the APs with the closer distances of other floors are filtered, the APs are only selected in the same floor, and finally, positioning is carried out. Compared with the traditional K-neighbor algorithm, the method only finds the nearest AP for positioning and does not distinguish floors, so that the positioning accuracy of the improved K-neighbor algorithm is higher for the multi-floor condition.
The method comprises the steps of selecting 30 targets to be positioned for testing, wherein one is floor judgment by using the floor judgment model of the invention, and the other is floor judgment by testing without floor judgment, specifically, as shown in figure 4, the average positioning accuracy of positioning by using the floor judgment model of the invention is 1.38m, the average positioning accuracy of positioning without floor judgment is 3.41m, and the positioning accuracy is obviously improved.
The above-mentioned embodiments are further described in detail in the technical field, background, objects, schemes and advantages of the present invention, and it should be understood that the embodiments are only preferred embodiments of the present invention and are not intended to limit the present invention, and any modifications, equivalents, improvements and the like made within the spirit and principle of the present invention should be included in the protection scope of the present invention.

Claims (5)

1. A multi-floor indoor positioning method based on a Softmax regression multi-classification recognizer is characterized by comprising an off-line stage and an on-line stage:
1) off-line phase
Step (1): acquiring offline RSS fingerprint information and establishing an offline RSS fingerprint database;
step (2): initializing parameters of a Softmax regression multi-class recognizer, establishing a floor discrimination model of the initial multi-class recognizer, and training the Softmax regression multi-class recognizer by utilizing an offline RSS fingerprint database;
and (3): constructing a Softmax multi-floor discrimination classifier model by using the model parameters obtained by training;
2) on-line phase
And (4): acquiring RSS values of APs acquired by a target to be positioned, inputting the RSS values into a Softmax multi-classification recognizer floor discrimination model, calculating the probability that the target to be positioned belongs to each floor by using the Softmax multi-classification recognizer floor discrimination model, and selecting a floor corresponding to the maximum probability as a final judgment result of the floor where the target to be positioned is located;
and (5): calculating the specific position of the target to be positioned according to the distance between the RSS value of each AP acquired by the target to be positioned and the RSS value acquired by each sampling point in the RSS fingerprint database of the floor where the target to be positioned is located;
the Softmax multi-floor discrimination classifier model in the step (2) is as follows:
Figure FDA0002830196960000011
wherein θ ═ θ12,…,θK) Parameters representing a Softmax multi-floor discrimination classifier model are obtained by calculation through a training sample constructed by an offline RSS fingerprint database, and an initial value is a random value in the training process; y is(i)A label representing a floor category; k represents the number of actual floors in the building; j represents the number of the middle floor of the building; x is the number of(i)Representing RSS values, p (y), of N APs collected at grid i of a floor(i)=j|x(i)(ii) a Theta) represents x(i)Belongs to the predicted probability value collected at floor j;
Figure FDA0002830196960000012
representing a normalization function and T represents a transposition.
2. The multi-floor indoor positioning method based on the Softmax regression multi-classification recognizer according to claim 1, wherein the parameters of the Softmax multi-floor discrimination classifier model in the step (3) are parameters corresponding to a minimum cross entropy loss function obtained when a gradient descent method is adopted to minimize the cross entropy loss function to perform model training based on training samples constructed by an offline RSS fingerprint library;
the calculation formula of the cross entropy loss function is as follows:
Figure FDA0002830196960000021
wherein m represents the total number of grids for all floors in the building; k represents the number of actual floors in the building; j represents one of the floors; 1 {. is an illustrative function, and its value rule is 1{ expression whose value is true } ═ 1, and 1{ expression whose value is false } ═ 0; 1{ y(i)J represents the true probability distribution of the sample; p (y)(i)=j|x(i)(ii) a Theta) represents x(i)Belonging to the predicted probability value collected at floor j.
3. The Softmax regression multi-classification recognizer-based multi-floor indoor positioning method as claimed in claim 2, wherein the gradient calculation expression for minimizing the cross entropy loss function by using the gradient descent method in the step (2) is as follows:
Figure FDA0002830196960000022
wherein the content of the first and second substances,
Figure FDA0002830196960000023
is a vector, the ith element represents J (theta) to thetajThe partial derivative of the ith component of (a).
4. The Softmax regression multi-classification recognizer-based multi-floor indoor positioning method as claimed in claim 1, wherein said step (5) adopts a modified K-nearest neighbor algorithm to calculate the specific location of the target to be positioned;
step (5.1): the RSS value of each AP collected by a target to be positioned is set as
Figure FDA0002830196960000026
RSSrRepresenting the RSS value of the r AP acquired by the target to be positioned, wherein r is an independent variable;
step (5.2): calculating the distance from the RSS value of the target to be positioned to the RSS value acquired by all sampling points in the floor offline RSS fingerprint database of the target to be positioned, wherein the distance calculation formula is as follows:
Figure FDA0002830196960000024
wherein the RSSirRepresenting the RSS value of the r-th AP acquired by an acquisition point i in an off-line RSS fingerprint library, wherein i and r are independent variables, i is more than or equal to 1 and less than or equal to s, and r is more than or equal to 1 and less than or equal to n; s is the number of sampling points selected in each grid; n represents the number of APs sensed by the sampling point i; diRepresenting the RSS value distance between the target to be positioned and the sampling point i;
step (5.3): selecting four sampling points closest to each other, and endowing the four sampling points with different weights lambda according to the distancejJ sequentially takes 1,2,3 and 4, namely four sampling points with the shortest distance, and the weight calculation formula is
Figure FDA0002830196960000025
djDenotes the jth nearest distance, d1+d2+d3+d4Represents the sum of the four closest distances;
step (5.4): calculating the coordinates (p) of the object to be positionedx,py)=λ1(x1,y1)+λ2(x2,y2)+λ3(x3,y3)+λ4(x4,y4) Wherein (x)1,y1)、(x2,y2)、(x3,y3)、(x4,y4) Respectively representing the position coordinates of the four nearest sampling points in the RSS fingerprint database.
5. The multi-floor indoor positioning method based on Softmax regression multi-classification recognizer according to any one of claims 1-4, wherein the specific operation steps of the step (1) establishing the off-line RSS fingerprint database are as follows:
step (1.1): setting N APs in the multi-floor indoor area, and performing homogenization grid division on the multi-floor indoor area, wherein each floor is divided into M grids, and the plane projection coordinates of the M grids of each floor are the same;
step (1.2): uniformly selecting s sampling points in each grid, collecting RSS values of all APs sensed by each sampling point for t times, and carrying out s multiplied by t times sampling on each grid;
calculating the average value of the RSS values acquired by each sampling point in each grid, the average value of the RSS values of each grid and the average value of the RSS value of each AP in each grid of each floor;
step (1.3): the RSS fingerprint library is formed by fingerprint sequences of a plurality of sampling points, and the fingerprint sequence of each sampling point is expressed as [ Fj,Gji,RSS1,RSS2,...,RSSr,...,RSSn],FjIndicating the jth floor, GjiThe ith grid corresponding to the jth floor is represented, i is less than or equal to M, RSSrAnd representing the RSS value of the r-th AP collected by the sampling point, wherein N represents the number of the APs perceived by the sampling point, N is less than N, and j, i and r all represent independent variables.
CN201910544573.3A 2019-06-21 2019-06-21 Multi-floor indoor positioning method based on Softmax regression multi-classification recognizer Active CN110401977B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201910544573.3A CN110401977B (en) 2019-06-21 2019-06-21 Multi-floor indoor positioning method based on Softmax regression multi-classification recognizer

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201910544573.3A CN110401977B (en) 2019-06-21 2019-06-21 Multi-floor indoor positioning method based on Softmax regression multi-classification recognizer

Publications (2)

Publication Number Publication Date
CN110401977A CN110401977A (en) 2019-11-01
CN110401977B true CN110401977B (en) 2021-03-02

Family

ID=68323314

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201910544573.3A Active CN110401977B (en) 2019-06-21 2019-06-21 Multi-floor indoor positioning method based on Softmax regression multi-classification recognizer

Country Status (1)

Country Link
CN (1) CN110401977B (en)

Families Citing this family (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN111818446B (en) * 2020-06-02 2022-06-24 南京邮电大学 Indoor positioning optimization method and system based on position fingerprints
CN111693938B (en) * 2020-06-10 2024-06-18 北京云迹科技股份有限公司 Floor positioning method and device for robot, robot and readable storage medium
CN112748399B (en) * 2020-12-28 2024-02-13 北京科技大学 Visible light three-dimensional positioning system and method based on multi-PD receiver
CN112699888A (en) * 2020-12-31 2021-04-23 上海肇观电子科技有限公司 Image recognition method, target object extraction method, device, medium and equipment

Family Cites Families (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN106793067A (en) * 2016-11-29 2017-05-31 上海斐讯数据通信技术有限公司 A kind of many floor indoor orientation methods and server based on joint network
CN108810799B (en) * 2018-05-28 2020-07-24 湖南大学 Multi-floor indoor positioning method and system based on linear discriminant analysis

Also Published As

Publication number Publication date
CN110401977A (en) 2019-11-01

Similar Documents

Publication Publication Date Title
CN110401977B (en) Multi-floor indoor positioning method based on Softmax regression multi-classification recognizer
CN108268838B (en) Facial expression recognition method and facial expression recognition system
Campos et al. Wi-Fi multi-floor indoor positioning considering architectural aspects and controlled computational complexity
CN107703480B (en) Mixed kernel function indoor positioning method based on machine learning
CN112887902B (en) Indoor positioning method of WiFi fingerprint based on Gaussian clustering and hybrid measurement
CN111726765B (en) WIFI indoor positioning method and system for large-scale complex scene
Alitaleshi et al. EA-CNN: A smart indoor 3D positioning scheme based on Wi-Fi fingerprinting and deep learning
Yu et al. An accurate WiFi indoor positioning algorithm for complex pedestrian environments
CN109151995A (en) A kind of deep learning recurrence fusion and positioning method based on signal strength
CN108810799B (en) Multi-floor indoor positioning method and system based on linear discriminant analysis
JPWO2011086643A1 (en) Pattern recognition apparatus, pattern recognition method, and program for pattern recognition
CN113596989A (en) Indoor positioning method and system for intelligent workshop
Zhang et al. Feature fusion using stacked denoising auto-encoder and GBDT for Wi-Fi fingerprint-based indoor positioning
Alitaleshi et al. WiFi fingerprinting based floor detection with hierarchical extreme learning machine
Tarekegn et al. D fops: Deep-learning-based fingerprinting outdoor positioning scheme in hybrid networks
CN112381298A (en) Intelligent navigation and passenger-taking guiding self-service system for airport passengers
Gu et al. ZeeFi: Zero-effort floor identification with deep learning for indoor localization
Labinghisa et al. A deep learning based scene recognition algorithm for indoor localization
Xingli et al. Indoor positioning technology based on deep neural networks
Subakti et al. Indoor Localization with Fingerprint Feature Extraction
Wietrzykowski et al. Adopting the FAB-MAP algorithm for indoor localization with WiFi fingerprints
Yuan et al. Indoor localization with wireless heterogeneous devices by composite fingerprint sets and hybrid classification
CN109766969B (en) RFID indoor positioning algorithm based on asynchronous dominant motion evaluation
CN109379713B (en) Floor prediction method based on integrated extreme learning machine and principal component analysis
Sonny et al. Fingerprint Image-Based Multi-Building 3D Indoor Wi-Fi Localization Using Convolutional Neural Networks

Legal Events

Date Code Title Description
PB01 Publication
PB01 Publication
SE01 Entry into force of request for substantive examination
SE01 Entry into force of request for substantive examination
GR01 Patent grant
GR01 Patent grant