4.2. Null Space Algorithms
From Formulas (32) and (38), we can conclude that the ranging error is the null space of
. It is also known from Property 1 that once
has been determined, if the number of nontrivial solutions of ranging error
is
, we have
. If and only if
, then
. If
, the solution satisfying the equation should be a set, i.e., there is an infinite number of
satisfying the equation. Hence, if a basic solution of
has been obtained,
is the linear space formed by
, where
. Let
; then, the general solution of
can be expressed as:
where
and
. Equation (
39) indicates that for
in the same linear space, the LS cost function
F has the same local optimal point. However, convexity will vary with
. If
,
F is likely to be a nonconvex function; thus, multiple local optima will exist. If
, it is known from Proposition 2 that
F can be transformed into a convex function in the global range. Assuming that
is known, we can determine
for a given
. If there exists a linear combination of column vectors in
that results in
, then by the same property of the local optima, we can change the LS cost function
F and make it convex in the global range.
Proposition 3. Let ν be an element of the null space of Ω
such that ; then, Equations (7) and (12) can be rewritten as: In this paper, we refer to and collectively as . In Proposition 3, and F have the same local optimal point, i.e., the objective functions are equivalent. Additionally, is also globally convex, which endows it with the characteristic of large-scale convergence. Thus, using it can reduce the sensitivity to the initial value selection. If we want to apply Proposition 3, the following problems remain to be solved:
How do we achieve ?
For an arbitrary , does satisfy the condition of ?
When there are errors in , how do we deal with them?
For the first problem, the direct method is to measure the angle, which is similar to the AOA method. In this way, Proposition 3 is transformed into an AOA/TOA hybrid location algorithm. Another method is to transform the distance data into the corresponding angle via the cosine theorem and construct the relative angle matrix. To answer the second question, we will prove that the following properties are valid:
Property 2. In both noncooperative and cooperative scenarios, there always exists if the node to be located is inside the convex polygon composed of adjacent nodes, whereas there is no ν satisfying this condition if the node is outside the convex polygon.
According to Property 2, Proposition 3 can be applied in both noncooperative and cooperative scenarios; however, there is a limitation that it can only be applied if all the targets are located in the convex hull composed of adjacent nodes. In contrast, Proposition 3 does not hold if there are targets outside the convex hull formed by neighboring nodes.
In the third problem, the angle measurement errors will influence the final positioning result. In addition, in the process of calculating the null space of , it is possible that no suitable exists due to the errors. In this case, Proposition 3 will also be invalid, and it is necessary to eliminate it.
The paper [
36] used the method of principal component analysis (PCA) to reduce the deviation of the relative angular matrix in source localization. The main steps are as follows. First,
is decomposed by SVD. Then, all the eigenvalues are sorted in descending order, and the large eigenvalues are selected as the main eigenvalues. At the same time, the eigenvectors corresponding to the eigenvalues are selected to reconstruct
, which is denoted by
. The null space of
is determined; one of the vectors is selected as the value of the base vector
and is multiplied by the coefficient
to satisfy
. The PCA method is simple and efficient; when the measurement errors are not large, it can calculate
well. In WSN localization, the PCA method cannot obtain the appropriate
as the errors and the number of targets increase. If the cosine theorem is used to transform the ranging data into angle data, the ranging measurement error will be converted into the angle measurement error after the calculation. Hence, similar problems will also exist. We consider the main reason for this problem to be that the distance circles formed by the node and the range measurement may not intersect at one point. Then, the sum of radian measures of the relative angles of each node at the same point will not equal
.
Let
be the estimated values of the angles, formed by the target and its adjacent nodes, and the corresponding angle measurements or calculated values be
. We define the angle least squares cost function as follows:
Formula (42) is a linear optimization problem with equality constraints and can be transformed into an unconstrained optimization problem by introducing Lagrange multipliers. If the Lagrange multiplier is
, then Formula (42) is equivalent to:
We calculate the partial derivatives of
:
Setting every derivative in (44) to zero, we obtain the following optimal point:
Using this method, the relative angle between targets and adjacent nodes can be estimated. After that, the sum of relative angular radians of each target will be . According to the properties of the relative angular matrix, must exist. After that, F can be transformed into a globally convex function by Proposition 3 and solved by the Gauss–Newton iteration method.
If the cosine theorems are used to calculate the angle, the theorem may be inapplicable. In other words, because of the existence of the ranging error, the triangle’s trilateral side lengths may not satisfy the theorem’s condition, and the method needs to be further improved. In this paper, we use the generalized cosine law. Assume that the angle in a triangle is denoted by
; then, we calculate
as follows:
Above, tis calculated from the trilateral relationship according to the cosine theorem. We call the respective methods the “angle-based null space algorithm” (A-NLS) and “cosine law-based null space algorithm” (C-NLS), whereby the angles are obtained by angle measurement or the cosine law calculation. The main steps of the algorithm are shown in Algorithm 1.
Algorithm 1: A-NLS and C-NLS algorithms. |
Input: and (the angle observation is unnecessary for C-NLS); |
Output: |
1: Measuring or calculating that entails errors; |
2: Angle estimation is performed by using the Equation (45); |
3: Obtain ; |
4: Calculate the null space of , and choose the appropriate so that ; |
5: For , calculate , set , , and choose random ; |
6: while do |
7: Update for using the Gauss–Newton iteration method; |
8: ; |
9: end while |
10: return |