3.1. Overview
The methodological framework of the proposed positioning and navigation system is presented in
Figure 1. The framework is divided into four parts: data collection, acoustic-based estimation, PDR-based estimation, and EKF-based fusion positioning.
In data collection, acceleration, gyroscope, magnetometer, and ultrasonic signals can be sampled and saved in *.txt format in a smartphone. The collected data will be intermittently uploaded to the server terminal. After preprocessing the collected data, the estimation-based acoustic is solved by the hybrid CHAN–Taylor algorithm. Then, the peaks and valleys of accelerations are detected and step frequency can be determined. The coarse step-length estimation is obtained by the previous three steps and the maximum and minimum values of the acceleration at the current step, and then we combine LASSO regularization spatial constraint and the acceleration peak-to-valley amplitude difference, walking frequency, acceleration variance, mean acceleration, peak median, and valley median to achieve fine step-length estimation. The heading direction is obtained by quaternions method. In the target location estimation, the outliers are detected for acoustic-based estimation. Then, the EKF is used to fuse the target localization. The dead reckoning estimation is taken as the state vector, and the acoustic-based estimation is taken as the observation vector. Finally, the target location is obtained by incorporating the EKF method.
3.2. Acoustic-Based Estimation
Linear frequency modulation signals increase the transmission bandwidth of the signal by carrier frequency and perform pulse compression during reception. Additionally, linear frequency modulation signals have high resolution, can distinguish interference and targets at a distance, and can greatly simplify the signal processing system. A chirp is a typical nonstationary signal with great applications in sonar, radar, and other fields. In this paper, we use the chirp signal to transmit the acoustic signal. To validate the characteristics of the acoustic signals, we collect the acoustic signal using a Vivo X30 (Guangdong, China) smartphone. Collected signals are filtered and preprocessed through a Finite Impulse Response (FIR) bandpass filter, which basically filters out the interference information, such as indoor inherent noise and electronic components. In the final filtering stage, the adaptive minimum mean square error method is used to fuse the nonlinear approximation linearization, which once again alleviates the impact of noise.
Figure 2 shows the strength fluctuation of the acoustic signal after filtering. From the figure, the acoustic signal is stable at 8–14 kHz and 17.5–19.5 kHz. Considering the interference of speech signals on positioning, pseudo ultrasound ranging from 17.5 to 19.5 kHz is selected as the acoustic localization source because the human ear is not sensitive to it. And the location estimation based on acoustic signal is solved using a cross correlation function. These data come from the same sending and receiving device every time. Device heterogeneity has little effect on the performance based on acoustic localization.
The CHAN algorithm is a non-iterative method with an analytic solution. The advantages of this algorithm are a high localization accuracy and low computation, but the localization accuracy is easily affected by complex indoor obstacles. The Taylor algorithm is a recursive algorithm that requires an initial position estimate. This algorithm solves the local least squares solution of the measurement error value at each recursion, continuously updating the estimate. The Taylor algorithm is robust and suitable for complex environments, but it is too dependent on initial values. This hybrid algorithm combines the advantages of the CHAN algorithm’s low computation and the Taylor algorithm’s good robustness. Therefore, for acoustic-based estimation, we chose the CHAN–Taylor hybrid algorithm for this paper.
The spatial geometric distribution of the three anchors and the target location is shown in
Figure 3. Assuming the target location
is
, the three anchors
are
,
.
The distance between the target
and the anchor
is
where
denotes the distance from the
i-th anchor to the target
.
Expanding Equation (1), we can obtain
where
.
Using anchor
as the reference anchor, the difference
between the
i-th anchor and anchor
can be derived:
where
denotes the distance from the first anchor to the target
.
Letting
,
,
Equation (5) can be expressed with matrix as follows:
Considering the measurement error, the error vector is depicted as
where
is the value without Gaussian noise.
Its covariance matrix is
where
, and
is the covariance matrix of the measurement errors.
The weighted least squares estimate of
can be derived:
After obtaining the first estimate, the weighted squares method was again utilized to calculate the second estimate. The error variance can be expressed as
with the constraint:
where
are the estimation errors.
,
,
.
Then, the
estimation is
where
The location of the target is
Then, the estimate is used as the initial iterative solution of the Taylor algorithm. Specifically, the function
is assumed to represent the constraint relationship between the anchor and the target position.
is expanded in a Taylor series at
, ignoring components above the second order to obtain the following equation:
By defining
and
, the following can be obtained:
According to Equation (3),
can be represented as
where
is the distance between the coordinate
and the anchor
.
Converting Equation (17) into matrix form is as follows:
where
is the error vector and
is the difference matrix between the real and measured values.
is the estimation error, as follows:
The weighted least squares solution is computed as
In the next recursive operation, the iterative computation is performed after updating the coordinate values of the target estimate.
where
is the updated estimate calculated at each iteration.
and
are also constantly updated. The above process is repeated continuously until the iterative operation stops when the error meets the set conditions.
where
η is the error threshold.
Finally, the localization of the target
M is determined as
3.3. Step Count Detection
During the data collection process, the collected data always include noise. Inaccurate step count detection, pseudo peaks and pseudo valleys, or missed detections will occur in the peak and valley detection if the original data are used. Therefore, noise cancellation processing is required for data collection.
Sliding-window filtering, low-pass filtering, median filtering, and Hampel filtering are common methods. To validate the performance of these methods, we recruited one volunteer to sample acceleration data in the experimental path at a stable speed.
Figure 4 shows the acceleration results after filtering. The experiments demonstrate that sliding-window filtering retains better smoothness for the collected acceleration data than the other three methods. It has the best filtering performance compared with the other methods.
Therefore, we adopt sliding-window filtering to preprocess the original data. The width of the window size is chosen as 10 samples. In
Figure 5, the original acceleration data are denoted by the blue dashed line, and the acceleration data after filtering are denoted by the red solid line. Compared with the original data, the filtered acceleration values have less fluctuation, which is favorable for step detection.
The peaks and valleys of the acceleration values are used to determine the step count. This mainly includes the following steps:
- (1)
Setting the acceleration threshold
Different pedestrians have different motion patterns. Depending on the motion pattern, the acceleration threshold is set differently. When the acceleration value is greater than the preset threshold, this is determined as a candidate peak or a candidate valley.
- (2)
Setting the recognition sequence
Acceleration exhibits a distinct regularity with successive peak–valley pairs. When one peak is recognized in the acceleration data, the valley will be judged in the next interval of data.
- (3)
Setting the time interval threshold
The current candidate peak or candidate valley is valid only if the time interval between two neighboring peaks or valleys exceeds the preset time interval threshold.
To validate the above step detection method, a volunteer holding a Vivo X30 phone collected acceleration data on a 42 m experimental path.
Figure 6 shows the maximum and minimum results of the pedestrian accelerations for each step on a 42 m experimental path. The maximum values of the pedestrian acceleration each step are marked in red stars, and the minimum values of the pedestrian acceleration each step are marked in gray stars. Therefore, step counts are accurately detected. This is because the above step detection methods can effectively identify pseudo-peaks and pseudo-valleys.
3.4. Step Length Prediction
Step-length prediction plays an important role in PDR localization. There are nonlinear and linear models in step-length prediction. A linear model only considers the relationship between step length and step frequency, which is not very accurate. A nonlinear model, which describes the more accurate correlation between the step size and motion parameters, is often used. The Scarlet model [
44], Kim model [
45], and Weinberg model [
46] are typical nonlinear models. These three models are established on the basis of the relationship between the peak and valley of pedestrian acceleration and step length. However, pedestrian step length is related not only to the peak-to-valley amplitude difference in acceleration but also to multiple other potential characteristics. Therefore, it can achieve better performance when multiple characteristics are used to estimate the step length. Additionally, data overfitting and increased model complexity occur if there are too many characteristics.
Considering the continuity of adjacent steps and inspired by reference [
26], the current step length is estimated by the weighted fusion of the previous three step lengths. In addition, to avoid overfitting, a regularization term constraining multiple characteristics is adopted to modify the step length. LASSO regression and ridge regression are commonly used regression methods with regularization terms. Ridge regression incorporates an L2 regularization term. LASSO regression incorporates an L1 regularization term and has an additional variable-filtering function compared with the former [
47]. In addition, LASSO can not only prevent data overfitting but also reduces the model complexity. Therefore, LASSO regression is chosen to deal with the feature variables related to step length in this paper.
To address the above problems, we propose a novel step-length model; the coarse predicted value of the current step length is obtained using the weighted previous three steps based on the Weinberg model. The coarse step length at time i can be obtained by the previous three steps and the acceleration maximum and minimum.
The coarse predicted step length
is described below:
with the LASSO constraint:
where
,
, and
are the lengths of the previous three steps.
,
,
and
are the weight factors.
K is an empirical constant.
are the maximum and minimum of the pedestrian accelerations for step
i.
denotes the step number and
N represents the number of features.
is the six features of the acceleration values.
denotes the regression coefficient, and
is the penalty coefficient, which is chosen based on 10-fold cross-validation.
Firstly, we can obtain the coarse step length
from Equation (28);
is used as the dependent variable of the model. The peak-to-valley amplitude difference, walking frequency, acceleration variance, acceleration mean, peak median, and valley median are extracted from the collected acceleration sensors. and the six motion features are used as the independent variables
of the model. Then, we will find the optimal value from Equation (29).
Equation (29) presents the minimum of loss function. The first part represents the squared loss function, and the second part represents the L1 regularization term. in Equation (29) adjusts the size of the regression coefficient .
Expanding Equation (29), we can obtain the following:
where
denotes the
i-th sample value of the
j-th feature variable.
To achieve better performance, the loss function in Equation (29) chooses the minimum value. Therefore, the first derivative of the regularization term in Equation (32) is expressed as follows:
Then, the first derivative of Equation (27) is obtained:
In the multidimensional derivative, the fixed values
can be described as follows:
Equation (34) can be simplified as follows:
Finally, all regression coefficients are calculated. The final estimates of the step length are obtained:
where
denotes the matrix of constants corresponding to the regression coefficients.
To validate the weighted fusion step improvement model based on LASSO, a volunteer holding a Vivo X30 smartphone collected acceleration data along a 42 m experimental path.
Figure 7 shows the step error of the Weinberg, Scarlet, Kim, Multi-feature, Yan+ 2022 [
26], and proposed step models. From the results, the average step length error of the step improvement model proposed in this paper has the least errors compared with the others. Therefore, we can find that the step improvement method proposed in this paper is effective and the accuracy of the calculated step length is higher.
3.5. Heading Direction Calculation
Heading direction estimation is also an important factor in PDR and determines the direction of the entire track deflection [
48]. The measured angular velocity of gyroscope sensors
, the angular velocity of earth coordinate system relative to inertial coordinate system
, the angular velocity of navigation coordinate system relative to earth coordinate system
and the angular velocity of body coordinate system relative to navigation coordinate system
satisfy as follows:
where
is the transfer matrix between earth coordinate system and navigation coordinate system.
is the angular velocity of earth coordinate system.
is the angular velocity of navigation coordinate system relative to earth coordinate system.
The attitude angular velocity equation can be expressed in matrix as
where
,
, and
are the transfer matrix vectors of earth coordinate system to navigation coordinate system,
is the transfer matrix from navigation coordinate system to body coordinate system.
From Equation (42), we can obtain the angular velocity
, and then we will continue to find the quaternion elements
through the differential equation below:
where
,
are real numbers, and
,
,
are mutually orthogonal unit vectors.
is called a normalized quaternion.
Expanding Equation (43) into matrix as
Once determining the vector (
), the attitude matrix can be depicted as follows:
To simplify Equation (45),
can be expressed as:
The attitude directions are
3.6. EKF-Based Fusion Positioning
In fusion positioning, the acoustic-based estimation is set as the initial location of the target. To avoid the outliers, we set a threshold to detect anomalies in the estimation. At time i − 1, the acoustic-based estimation is , and the estimation of the proposed dead reckoning method is .
Case 1: If the distance between the acoustic-based estimation and the localization is greater than the preset threshold , the acoustic-based estimation is discarded as an outlier. Then, the estimation at time i − 1 is used for localization, where .
Case 2: When the distance between the acoustic-based estimation and the localization is less than the preset threshold , is determined by EKF-based fusion positioning.
In our localization scheme, the PDR estimation is set as the state variable and the estimation is set as the observation variable. The state and observation vector are expressed as follows:
where
is the pedestrian step length and
is the heading direction of the target.
is the PDR estimation, and
is the acoustic-based estimation.
In fusion localization, the observation equation and state equation of the EKF algorithm are described as follows:
where
,
is the pedestrian target position to be estimated, which is the state vector of the Kalman filter.
is the volume measurement vector, representing the acoustic estimate.
is the process noise.
is the measurement noise, which satisfies a Gaussian distribution.
and
are the nonlinear state and observation functions, respectively.
State vectors
, measure vectors
and noise signals
,
satisfy statistical properties:
where
and
are
where
are the errors in PDR positioning.
are the errors in acoustic positioning.
are the number of steps and direction angle of the PDR, respectively.
To estimate accurate pedestrian target location information, the nonlinear function needs to be linearized. The local linearization
and
of nonlinear functions
and
are expressed as follows:
where
The linearization of Equation (50) is described as follows:
Equation (60) can then be used to achieve fused localization using Kalman filtering. Thus, the fusion localization objective in this paper becomes the design of a suitable optimized filter for the system.
Design the Kalman recursive filter in the following form:
where
is the filtering gain at moment
.
is the state estimate at moment
i with initial value
.
is the one-step state vector prediction at moment
i.
In fusion localization, calculating the gain of the Kalman filter often requires calculating the inverse of a high-dimensional matrix, which increases the computational complexity. Therefore, it is necessary to consider suboptimal filters. To facilitate the analytical derivation of the suboptimization problem, the following two theorems are introduced.
Theorem 1. For matrices A and B of appropriate dimensions, the trace of the matrix exists: Theorem 2. The filter Equation (61) is estimated unbiased, implying that all satisfies E{(i)} is zero.
Proof. Combining Equations (60) and (61), the estimated value of the state vector
at time
i:
Then the expectation of the state vector
is expressed as
In the fusion localization process, the mean value of the time i = 0 is used as the estimated mean value, , According to Equation (51),
When , . Thus, we have proved that the filter (53) is unbiasedly estimated. □
For the fusion localization in this paper, we need to solve the recursive filtering suboptimization problem.
According to Equation (61), the estimation error is
The mean square error of prediction is
The measurement noise
is uncorrelated with the one-step prediction error
, resulting in
Equation (66) can be expressed as
Thus, the suboptimal problem for Equation (61) becomes solving Equation (69) to minimize the mean-square error, which is equal to the derivation of the matrix trace for Equation (69).
According to Theorem 1, the derivation of the matrix trace for Equation (69) is
To obtain
min (
), we obtain
Lemma 1. is the position of the target to be estimated, which is a state vector of the extended Kalman filter. is the one-step predicted value of the target, and is the process noise obeying a Gaussian distribution. is an approximate linear state function. The one-step prediction estimation of the mean square error satisfies linear estimation with the mean square error of the previous moment.
Proof. According to Equation (60), the mean square error of the one-step prediction estimate is
According to Equation (65), we obtain
Compute the second and third terms of Equation (73), respectively.
Based on Equations (52) and (54) of the previous fusion localization model, the following can be obtained:
The one-step prediction mean square error is
Thus, the mean square error one-step prediction value is proved. □
Substituting Equation (79) into (72), the filter gain at moment i can be derived based on the minimum mean square error. The minimum mean square error under suboptimal filtering is obtained by substituting the obtained from the projection into Equation (69). Thus, the suboptimal estimation problem of fusion localization is solved.
The filter gain design in Equation (72) does not require a very large dimensional inversion of the inverse. A fusion localization scheme is established based on Theorems 1, 2, and Lemma 1. In this paper, the focus is on the transient characteristics, where the filtered mean-square error is obtained at each sampling instant . The appropriate gain is designed to make the fusion localization sub-optimal.