3.1. MPC Optimization Problem Formulation
This part aims to solve Problem 1.
Based on our previous work [
7], a reference state named
the Ideal State was proposed to construct the relationship between the image feature vector and
. As for the reference state, it has the following constant state:
Note that
is a given constant. When given the desired circling radius
,
can be expressed as
. Denote the coordinates of the feature point in
by
, and in the reference state by
; then, the relationship can be written as:
Simultaneously,
and
can be obtained from (20) in [
7], which is
Define
and based on (
8), the discrete time state-space model can be expressed as
where is the sampling time.
For convenience of subsequent analysis, the discrete form is rewritten as
Since the yaw rate of the fixed-wing UAV is restricted, then the following constraint needs to be satisfied:
In order to guarantee that the change in
can be smooth, the acceleration constraint is also given:
where
Furthermore, the perception capability of the camera is taken into consideration as well. Under the condition of invariant camera parameters, whether the target can be detected correctly usually depends on the amount of feature information contained in the image. More specifically, it is related to the maximum perceived distance of the camera, which is denoted by
. Therefore, the clear perception range of the camera is equivalent to a cone, as shown in
Figure 3.
In order to determine whether the target is within the cone, the feature point in the current image plane is first mapped into that in the horizontal image plane. Define the feature point in the latter plane as
, considering that
of (
7) in the
Ideal State; then,
can be obtained from
based on the following transformation:
where . After solving the above three equations, the value of and can be obtained.
Since the flight altitude
H of the UAV is constant in this paper, the maximum perceived distance can be converted into the maximum horizontal distance, which is denoted by
. Therefore, the target is recognized to be within the perception range if, and only if, the following condition is met:
After that, in order to keep the target within the perception range when the UAV circles around it,
in (
7) needs to satisfy the following condition:
Simultaneously, considering the constraint of
in (
12), there exists
Define
,
, then
. Based on (
16), the perception constraint at time-step
k can be defined as
where
Denote the error of the feature point by
where is the desired value of , and
is the observed value at time-step k. Since
, then the cost function can be defined as follows:
where
and similar to
,
is positive definite and . The control sequence is
is the prediction horizon.
Note that if, and only if,
and
for . That is, the constant control input of the UAV makes it circle around the static target.
Due to the fact that only the first control input of
in (
23) is used, the following contraction constraint is provided to ensure the stability of the system (which will be proven in
Section 3.3):
where
represents the 2-norm of
, .
Therefore, based on Equations (
11)–(
13), (
19), (
22), and (
24), the MPC optimization problem can be formulated as
where .
3.2. Switching-Based Optimization Control
Problem 2.
With the increase in and limited by the computing capability of the processors, it is time-consuming to solve the optimization problem of (25) with nonlinear hard constraints (25e) and (25f) online. Even worse, they may also lead to the problem of an infeasible solution within the predefined iterations. Then, the question arises of how to design an online MPC strategy for practical application?
To solve the problem, this paper considers adding the hard constraints into the cost function, so that these constraints need not be strictly satisfied.
Firstly, add the constraint (25e) into
; then, we have
where is a constant.
Remark 1.
In the context of discrete systems as addressed in this work, the discontinuous nature of the sampling points renders the exact occurrence at
highly improbable. Furthermore, it is essential to acknowledge that the cost function focuses on the overall optimization objective, thus rendering the non-differentiability of specific points inconsequential to the overall optimization.
Furthermore, considering the constraints of (
12), (
13), and the unknown motion of the target, it may be unable to make
when
. Therefore,
in (
20) is redefined as follows to make
in (
26) function earlier:
where . Then, (26) is rewritten as
After that, turn (
24) into a soft constraint as well; then, the cost function can be represented as
Compared with the soft constraints-based method that introduces slack variables like [
26], the method that uses the max function is more efficient. When
is satisfied, the nonlinear function does not participate in solving the gradient in each iteration when using the interior point method. However, the gradients of all the
still need to be calculated in each iteration for the former method, which is more time-consuming.
Therefore, the MPC optimization problem can be reformulated as
where .
A warm start is also used in this work. Based on our previous work [
7], the control input for the UAV can be obtained with the aid of LSM and (
11), which is denoted by
. Note that
is required; then, the initial control sequence can be chosen as
Obviously, satisfies the inequality constraints of (30c) and (30d). This indicates that is the feasible solution of the optimization problem.
Furthermore, denote the optimal solution at time-step
k by
; then, the feasible solution at time-step
, denoted by
, can be chosen as
With increase in the target speed, the relative distance between the fixed-wing UAV and the target may exceed the maximum perceived distance limited by the constraints of (
12) and (
13). Although the target may still be recognized with the aid of a detection algorithm, the accuracy of detection will decline and the details of the target cannot be clearly distinguished. It is noted that investigating the details of the target is a basic need for UAV target tracking applications.
The items of
in the cost function
of (
28) help to avoid the relative distance from exceeding
. However, the optimization problem of (30) is still more concerned with the convergence of
. Moreover, both the gradients about
and
need to be calculated online, which increases the workload of computation.
To solve the problem, a switching-based control method is proposed. When the relative distance keeps within the maximum perceived distance, the optimization problem (30) is considered to enable the UAV to fly around the target. However, if the condition is unsatisfied, the other optimization problem is designed to return the target back to the perception range quickly.
According to (
16), the perception constraint is directly affected by
. However, the optimization problem
focuses on the convergence of
to
. Therefore, in order to accelerate the convergence of
to 0 once the perception constraint is unsatisfied, a new cost function is defined as follows:
where
is positive definite, and
In addition, to ensure the convergence of
, the following contraction constraint is also given:
where
represents the 2-norm of
. Similar to (29), in order to avoid the nonlinear constraint of (35), the cost function of
in (33) is rewritten as
where .
Remark 2.
The convergence of in (
24)
does not theoretically guarantee the convergence of in (
35)
around . Only when and converge simultaneously can the convergence of (
35)
be ensured (refer to Section 3.3 for the proof), thereby ensuring the stability of the switching process.
To this end, a new contractive constraint is defined as follows:
Referring to (
36), the corresponding cost function can be written as
Considering that (
37) necessitates the simultaneous convergence of both
and
, whereas (
35) only mandates the convergence of
, it is evident that the solution requirements for the former are more stringent. By comprehensively considering the stability of the switching process and alleviating the solution constraints, we reformulate the control optimization problem based on Equations (30), (
36), and (
38) as
where , and
Note that
functions as a counter that increases by one when
and resets to 0 when
. Moreover,
represents the counting threshold. The constraint (
35) is employed to relax the solution limit only after
reaches
, thereby mitigating the potential issue of an unstable switching process.
The update of
is formulated as
where the saturation function is defined as
The initialization of
is as follows:
The implementation of the proposed method is shown as Algorithm 1.
Algorithm 1:Switching-based optimization control for target tracking |
Require: The image captured by camera |
Ensure:, |
- 1:
-
Let , calculate , and initialize based on ( 43).
- 2:
-
while Discover the target do
- 3:
-
Detect the centroid coordinates ;
- 4:
-
Calculate of the reference state ( 7);
- 5:
-
if then
- 6:
-
Obtain initial control sequence based on ( 31).
- 7:
-
else
- 8:
-
Obtain initial control sequence based on ( 32).
- 9:
-
end if
- 10:
-
Solve the optimization problem (39) online to obtain
.
- 11:
-
Choose the first element of
to be the control input.
- 12:
-
.
- 13:
-
Obtain the control input of the pan-tilt based on ( 9).
- 14:
-
Calculate and update based on ( 41).
- 15:
-
end while
|