Experimental Evaluation on Depth Control Using Improved Model Predictive Control for Autonomous Underwater Vehicle (AUVs)

Due to the growing interest using model predictive control (MPC), there are more and more researches about the applications of MPC on autonomous underwater vehicle (AUV), and these researches are mainly focused on simulation and simple application of MPC on AUV. This paper focuses on the improvement of MPC based on the state space model of an AUV. Unlike the previous approaches using a fixed weighting matrix, in this paper, a coefficient, varied with the error, is introduced to adjust the control increment vector weighting matrix to reduce the settling time. Then, an analysis on the effect of the adjustment to the stability is given. In addition, there is always a lag between the AUV real trajectory and the desired trajectory when the AUV tracks a continuous trajectory. To solve this problem, a simple re-planning of the desired trajectory is developed. Specifically, the point certain steps ahead from current time on the desired trajectory is treated as the current desired point and input to the controller. Finally, experimental results for depth control are given to demonstrate the feasibility and effectiveness of the improved MPC. Experimental results show that the method of real-time adjusting control increment weighting matrix can reduce settling time by about 2 s when tracking step trajectory of 1 m, and the simple re-planning of the desired trajectory method can reduce the average of absolute error by about 15% and standard deviation of error by about 17%.


Introduction
In the complex deep sea, autonomous underwater vehicle (AUVs) are the unique solution for various missions, including seabed topographic survey, environmental monitoring, resource exploration, target search [1,2], and with underwater wireless sensor networks, AUV also can be applied into researches on abyssal habitats and aquaculture monitoring [3,4]. Operating in a complex marine environment, AUVs need to execute underwater missions autonomously, such as detection, cruise, and operation. Therefore, motion control is a significant important part for AUVs to complete their tasks [5,6].
A current topic in AUVs motion control is to improve the control accuracy, convergence speed of the controller, and the adaptability of AUVs. Nowadays, many control approaches have been proposed for motion control of AUVs, such as sliding mode control [7,8], neural network control [9,10], fuzzy control [11,12], and so on, which have been successfully used to improve the accuracy and convergence speed for some cases. In the sliding mode controller, the control output always has serious chattering phenomenon. Hence, the reduction of chattering phenomenon is an important issue in sliding mode where x, u, y are the continuous-time state, input and output vectors, respectively, A c is state matrix, B cu is the input-to-state matrix, and C c is the state-to-output matrix. The discrete-time state space form of Equation (3) is written as Equation (4):    C = C c v z (k) is the linear velocity with coordinates in the body-fixed frame in discrete-time domain, k is the time in discrete-time domain, x(k), u(k), y(k) are the discrete-time state, input and output vectors, respectively, and T c is the control cycle. The MPC algorithm that was used in this work embeds an integrator into the model to ensure zero steady-state errors for desired point tracking [32,33], and then the discrete-time state space model used in design can be expressed as Equation (5): where ∆x(k) = x(k) − x(k − 1) and ∆u(k) = u(k) − u(k − 1).

MPC Algorithm Control Law
According to [32,33], the cost function used in this paper is shown in Equation (6): where Y p (k + 1) is the predicted output vector with a prediction horizon of p at sample time k, p is the prediction horizon, R(k + 1) is the given reference vector at sample time k and R(k + 1) = [r(k + 1) T r(k + 2) T r(k + 3) T . . . r(k + p) T ] T , T represents the transpose of the matrix. ∆U(k) is the control increment vector at sample time k and ∆U(k) = [∆u(k) T ∆u(k + 1) T ∆u(k + 2) T . . . ∆u(k + m) T ] T , m is the control horizon. Γ y and Γ u are weight diagonal matrices for the predictive error vector and control increment vector, respectively, which are usually taken as constant matrices with compatible dimensions [16,22,32]. In this paper, according to [16,23,32], Γ y is an identity matrix, while the weight Γ u is adjusted based on the error, and more details will be given in the later. Routine analysis gives the solution of the control increment vector as Equation (7): where Using receding horizon control, ∆u(k), the first sub-vector of ∆U(k), is computed by Equation (8).
Then the actual control vector applied to the plant is computed by Equation (9): where u(k − 1) is the past input vector. As can be seen in Equation (8), in conventional MPC method, the weight matrix Γ u and the weight matrix Γ y are fixed during the control [33]. However, in the design of cost-function, three points are considered. Firstly, we want to reduce the term ||Yp(k + 1)−R(k + 1)|| 2 as small as possible in the whole process. Secondly, the term ||∆U(k)|| 2 in the transient stage should be paid more attention than that in the steady stage. Thirdly, in the transient stage, the attention that is given to the term ||∆U(k)|| 2 should be varied. Therefore, the control objective of this paper is to adjust Γ u , according to the error on-line and to decrease the lag between the real trajectory and the desired trajectory.

MPC Method with a Real-Time Adjusting Control Increment Vector Weighting Matrix
This section is addressed on the approach of real-time adjustment of Γ u (i.e., the control increment vector weighting matrix), and then analysis on the effect of the adjustment for Γ u on the stability is presented.
MPC is a typical control algorithm, which is widely applied to many nonlinear systems. But, there are not many published researches about MPC based control for AUVs, e.g., [16,26]. In these above references, the weights (Γ y , Γ u ) of the terms ||Y p (k + 1) − R(k + 1)|| 2 and ||∆U(k)|| 2 in the cost function are fixed. In this paper, we want to adjust the weights ratio between the term ||Y p (k + 1) − R(k + 1)|| 2 and the term ||∆U(k)|| 2 , according to the tracking error. In this paper, the weight (Γ y ) in the term ||Y p (k + 1) − R(k + 1)|| 2 is fixed identity matrix, while the weight (Γ u ) in the term ||∆U(k)|| 2 is varied. Specifically, in the case of a large tracking error, a small value (less than 1) is determined on-line based on tracking error for the weight (Γ u ) to reduce the term ||Y p (k + 1) − R(k + 1)|| 2 as soon as possible, i.e., to reduce the settling time. When the tracking error is small, the weight (Γ u ) is set as an identity matrix. As discussed in experimental verification, the improved MPC method is an optional for some special AUV applications, which focus on settling time and tracking precision.
A large Γ u will result in that the control increment vector is too conservative during the settling time, leading to long settling time. If Γ u is small, AUVs will be very sensitive to the environment disturbances and small fluctuations from the sensor during the steady state, which means that the constraint of control increment vector helps to reduce disturbances and fluctuations. In this section, an approach of adjusting Γ u according to the error is proposed. A coefficient varying with the error is introduced to adjust Γ u , not only to ensure that the control increment vector is not conservative, improving the system's dynamic response performance, but also to avoid bringing fluctuations into the steady state.

Adjusting Γ u According to the Error
In this paper, the MPC method with a real-time adjusting Γ u is realized by introducing a coefficient α to Γ u . Γ u can be expressed as Equation (10): where I m×m is m-dimensional identity matrix and α is tuned online according to the error of the current time referring to certain rules. According to the control precision requirements of AUV, two boundary values of depth error, e1 and e2, are determined, and e2 > e1 > 0. e denotes the current error of depth. When the error is large, i.e., ||e|| ≥ e2, in order to improve the response speed of the system, it is necessary to reduce the weight of control increment vector. In this case, α is set as 0. When the error is small, i.e., ||e|| ≤ e1, in order to avoid fluctuations that are caused by quick changes of input in the steady state, it needs to increase the weight of control increment vector. In this case α is set as 1. In order to obtain a smooth transition for α from α = 0 to α = 1, when e1 < ||e|| < e2, a linear function is used to determine the value of α shown as Figure 1, and the adjustment equation of α is shown as Equation (11). adjust Γu, according to the error on-line and to decrease the lag between the real trajectory and the desired trajectory.

MPC Method with a Real-Time Adjusting Control Increment Vector Weighting Matrix
This section is addressed on the approach of real-time adjustment of Γu (i.e., the control increment vector weighting matrix), and then analysis on the effect of the adjustment for Γu on the stability is presented.
MPC is a typical control algorithm, which is widely applied to many nonlinear systems. But, there are not many published researches about MPC based control for AUVs, e.g., [16,26]. In these above references, the weights (Γy, Γu) of the terms ||Yp(k + 1) − R(k + 1)|| 2 and ||ΔU(k)|| 2 in the cost function are fixed. In this paper, we want to adjust the weights ratio between the term ||Yp(k + 1) − R(k + 1)|| 2 and the term ||ΔU(k)|| 2 , according to the tracking error. In this paper, the weight (Γy) in the term ||Yp(k + 1) − R(k + 1)|| 2 is fixed identity matrix, while the weight (Γu) in the term ||ΔU(k)|| 2 is varied. Specifically, in the case of a large tracking error, a small value (less than 1) is determined on-line based on tracking error for the weight (Γu) to reduce the term ||Yp(k + 1) − R(k + 1)|| 2 as soon as possible, i.e., to reduce the settling time. When the tracking error is small, the weight (Γu) is set as an identity matrix. As discussed in experimental verification, the improved MPC method is an optional for some special AUV applications, which focus on settling time and tracking precision.
A large Γu will result in that the control increment vector is too conservative during the settling time, leading to long settling time. If Γu is small, AUVs will be very sensitive to the environment disturbances and small fluctuations from the sensor during the steady state, which means that the constraint of control increment vector helps to reduce disturbances and fluctuations. In this section, an approach of adjusting Γu according to the error is proposed. A coefficient varying with the error is introduced to adjust Γu, not only to ensure that the control increment vector is not conservative, improving the system's dynamic response performance, but also to avoid bringing fluctuations into the steady state.

Adjusting Γu According to the Error
In this paper, the MPC method with a real-time adjusting Γu is realized by introducing a coefficient α to Γu. Γu can be expressed as Equation (10): where Im×m is m-dimensional identity matrix and α is tuned online according to the error of the current time referring to certain rules. According to the control precision requirements of AUV, two boundary values of depth error, e1 and e2, are determined, and e2 > e1 > 0. e denotes the current error of depth. When the error is large, i.e., ||e|| ≥ e2, in order to improve the response speed of the system, it is necessary to reduce the weight of control increment vector. In this case, α is set as 0. When the error is small, i.e., ||e|| ≤ e1, in order to avoid fluctuations that are caused by quick changes of input in the steady state, it needs to increase the weight of control increment vector. In this case α is set as 1. In order to obtain a smooth transition for α from α = 0 to α = 1, when e1 < ||e|| < e2, a linear function is used to determine the value of α shown as Figure 1, and the adjustment equation of α is shown as Equation (11).

Stability Analysis for Adjusting Γ u
To discuss the stability of the system after adjusting Γ u , substitute Equation (10) into Equation (8), and yield to Equation (12): By using Equations (5) and (12), ∆x(k + 1) is expressed as Equation (13): According to [34,35], if all the eigenvalues of the matrix A − BK mpc (S x + I c C) are in the unit circle in the complex plane, the system is asymptotically stable. A, B, C used in this paper are described in Section 5.2, determined according to the dynamic model of the experimental AUV. Figure 2 shows the relationship between the eigenvalues of A − BK mpc (S x + I c C) and unit circle in the complex plane when α varies from 0 to 1. From Figure 2, it can be seen that all of the eigenvalues are in the unit circle. It indicates that the system with an adjusting Γ u is asymptotically stable.

Stability Analysis for Adjusting Γu
To discuss the stability of the system after adjusting Γu, substitute Equation (10) into Equation (8), and yield to Equation (12): By using Equations (5) and (12), ∆x(k + 1) is expressed as Equation (13): (13) According to [34,35], if all the eigenvalues of the matrix A − BKmpc(Sx + IcC) are in the unit circle in the complex plane, the system is asymptotically stable. A, B, C used in this paper are described in Section 5.2, determined according to the dynamic model of the experimental AUV. Figure 2 shows the relationship between the eigenvalues of A − BKmpc(Sx + IcC) and unit circle in the complex plane when α varies from 0 to 1. From Figure 2, it can be seen that all of the eigenvalues are in the unit circle. It indicates that the system with an adjusting Γu is asymptotically stable.

Simply Re-Planning the Desired Trajectory to Reduce the Lag Component
In this section, the method of simply re-planning the desired trajectory is discussed to reduce the lag component, including the reason of re-choosing another desired point real-time and how to determine this point.
More analysis on the experimental data from the MPC method in reference [16,26] shows that: During tracking a trajectory, there always a time lag between the output trajectory and the desired trajectory. In this section, an approach of simply re-planning the desired trajectory is proposed to reduce the lag component. In this approach, firstly, choose N (i.e., the count of steps ahead in simply re-planning the desired trajectory method), according the experimental data, and then in subsequent control, set the desired point N steps ahead as the desired point for current time.

Simply Re-Planning the Desired Trajectory to Reduce the Lag Component
In this section, the method of simply re-planning the desired trajectory is discussed to reduce the lag component, including the reason of re-choosing another desired point real-time and how to determine this point.
More analysis on the experimental data from the MPC method in reference [16,26] shows that: During tracking a trajectory, there always a time lag between the output trajectory and the desired trajectory. In this section, an approach of simply re-planning the desired trajectory is proposed to reduce the lag component. In this approach, firstly, choose N (i.e., the count of steps ahead in simply re-planning the desired trajectory method), according the experimental data, and then in subsequent control, set the desired point N steps ahead as the desired point for current time.

The Reason of Re-Choosing a Current Desired Point
To simplify analysis, in this paper, AUVs' block diagram is simplified, as shown in Figure 3a, where R(s) and C(s) are the desired-trajectory and the output trajectory, respectively, as described in frequency domain. G(s) is the transfer function of AUVs and G C (s) is the transfer function of the control

The Reason of Re-Choosing a Current Desired Point
To simplify analysis, in this paper, AUVs' block diagram is simplified, as shown in Figure 3a, where R(s) and C(s) are the desired-trajectory and the output trajectory, respectively, as described in frequency domain. G(s) is the transfer function of AUVs and GC(s) is the transfer function of the control algorithm, and e −γs is the lag component of sensor. Separating the lag component e −βs (including the lag components of the thruster, the vehicle, the control circuit, etc.) block of AUVs and moving the summing junction past the e −βs block, Figure 3a can be transformed into Figure Figure 3c, which can be implemented by re-planning of the desired trajectory, i.e., treating the point certain steps ahead on the desired trajectory as the present desired point and input of controller in the discrete-time domain. This paper uses parameter N to represent the certain steps. At time t, input is calculated by the error between output at time t and the desired point at time t + N × Tc, i.e., the desired point at time t is the point at time t + N × Tc on the desired trajectory. Tc is control interval and N is determined by the experimental data, as is shown in Section 4.2.
Moving back the e −βs block past the summing junction, the equivalent block diagram of Figure  3c is obtained, as shown in Figure 3d, and the block diagram shown in Figure 3d is used for AUV trajectory tracking control.
The transfer function of the original block diagram without any process shown in Figure 3a is: The transfer function after simply re-planning the desired trajectory shown in Figure 3d is: In Equation (15), the introduction of e βs is equivalent to the introduction of differential and high-order differential components, i.e., adding predictive function to the control system. It indicates  Figure 3c, which can be implemented by re-planning of the desired trajectory, i.e., treating the point certain steps ahead on the desired trajectory as the present desired point and input of controller in the discrete-time domain. This paper uses parameter N to represent the certain steps. At time t, input is calculated by the error between output at time t and the desired point at time t + N × T c , i.e., the desired point at time t is the point at time t + N × T c on the desired trajectory. T c is control interval and N is determined by the experimental data, as is shown in Section 4.2.
Moving back the e −βs block past the summing junction, the equivalent block diagram of Figure 3c is obtained, as shown in Figure 3d, and the block diagram shown in Figure 3d is used for AUV trajectory tracking control.
The transfer function of the original block diagram without any process shown in Figure 3a is: The transfer function after simply re-planning the desired trajectory shown in Figure 3d is: In Equation (15), the introduction of e βs is equivalent to the introduction of differential and high-order differential components, i.e., adding predictive function to the control system. It indicates that the introduction of e βs can improve the response speed and the trajectory tracking performance of the system. When comparing Equations (14) and (15), it can be seen that they have same poles, which means that the method of simply re-planning the desired trajectory proposed in this paper has no effect on the stability.

How to Determine the Parameter N
Parameter N is calculated by N = ∆t/T c , where ∆t is the lag time between the desired trajectory and the experimental output curve, shown in Figure 4, ∆t = (t 1 + t 2 )/2 − t 3 . In Figure 4, t 1 and t 2 is the time when the depth of the AUV reaches the equilibrium position of desired sinusoidal trajectory, and t 3 is the peak time of desired sinusoidal trajectory. that the introduction of e βs can improve the response speed and the trajectory tracking performance of the system. When comparing Equations (14) and (15), it can be seen that they have same poles, which means that the method of simply re-planning the desired trajectory proposed in this paper has no effect on the stability.

How to Determine the Parameter N
Parameter N is calculated by N = Δt/Tc, where Δt is the lag time between the desired trajectory and the experimental output curve, shown in Figure 4, Δt = (t1 + t2)/2 − t3. In Figure 4, t1 and t2 is the time when the depth of the AUV reaches the equilibrium position of desired sinusoidal trajectory, and t3 is the peak time of desired sinusoidal trajectory. For the AUV used in this article, Tc is 0.166667 s and experiment data shows Δt is about 5 s. Therefore, N is set as 30 in this paper.

Experimental Verification
To evaluate the proposed methods on the UVIC-I AUV, the developed control algorithm was translated into the C/C++ programming language and then integrated within the vehicle control software. In this paper, the prediction horizon p is 80 and the control horizon m is 8 for the For the AUV used in this article, T c is 0.166667 s and experiment data shows ∆t is about 5 s. Therefore, N is set as 30 in this paper. that the introduction of e βs can improve the response speed and the trajectory tracking performance of the system. When comparing Equations (14) and (15), it can be seen that they have same poles, which means that the method of simply re-planning the desired trajectory proposed in this paper has no effect on the stability.

How to Determine the Parameter N
Parameter N is calculated by N = Δt/Tc, where Δt is the lag time between the desired trajectory and the experimental output curve, shown in Figure 4, Δt = (t1 + t2)/2 − t3. In Figure 4, t1 and t2 is the time when the depth of the AUV reaches the equilibrium position of desired sinusoidal trajectory, and t3 is the peak time of desired sinusoidal trajectory. For the AUV used in this article, Tc is 0.166667 s and experiment data shows Δt is about 5 s. Therefore, N is set as 30 in this paper.

Experimental Verification
To evaluate the proposed methods on the UVIC-I AUV, the developed control algorithm was translated into the C/C++ programming language and then integrated within the vehicle control software. In this paper, the prediction horizon p is 80 and the control horizon m is 8 for the

Experimental Verification
To evaluate the proposed methods on the UVIC-I AUV, the developed control algorithm was translated into the C/C++ programming language and then integrated within the vehicle control software. In this paper, the prediction horizon p is 80 and the control horizon m is 8 for the developed UVIC-I AUV is equipped with eight thrusters, two to actuate surge, two to actuate sway and yaw, and four vertical thrusters to actuate heave, roll, and pitch, as shown in Figure 7, where L1 = 0.75 m, L2 = 0.85 m, L3 = 0.27 m [27]. A depth sensor, with an accuracy of 0.003 m, is installed on UVIC-I AUV for depth measurement, and the heave speed is obtained by depth sensor data differential. The depth and speed data are recorded on the UVIC-I AUV onboard memory for each control cycle. The data is read and analyzed offline. UVIC-I AUV is equipped with eight thrusters, two to actuate surge, two to actuate sway and yaw, and four vertical thrusters to actuate heave, roll, and pitch, as shown in Figure 7, where L 1 = 0.75 m, L 2 = 0.85 m, L 3 = 0.27 m [27]. A depth sensor, with an accuracy of 0.003 m, is installed on UVIC-I AUV for depth measurement, and the heave speed is obtained by depth sensor data differential. The depth and speed data are recorded on the UVIC-I AUV onboard memory for each control cycle. The data is read and analyzed offline. UVIC-I AUV is equipped with eight thrusters, two to actuate surge, two to actuate sway and yaw, and four vertical thrusters to actuate heave, roll, and pitch, as shown in Figure 7, where L1 = 0.75 m, L2 = 0.85 m, L3 = 0.27 m [27]. A depth sensor, with an accuracy of 0.003 m, is installed on UVIC-I AUV for depth measurement, and the heave speed is obtained by depth sensor data differential. The depth and speed data are recorded on the UVIC-I AUV onboard memory for each control cycle. The data is read and analyzed offline.

Experiments of Tracking Step Trajectory
For the MPC method with a real-time adjusting Γ u developed in this paper mainly focus on reducing settling time, experiments of tracking step trajectory is designed to verify the effectiveness. The following desired depth z d (t) in this paper is considered as: The experimental results based on MPC with fixed Γ u and adjusting Γ u are shown in Figure 8, and the time consumed for the error to be reduced from 1 m to 0.05 m is summarized in Table 1.

Experiments of Tracking Step Trajectory
For the MPC method with a real-time adjusting Γu developed in this paper mainly focus on reducing settling time, experiments of tracking step trajectory is designed to verify the effectiveness. The following desired depth zd(t) in this paper is considered as: The experimental results based on MPC with fixed Γu and adjusting Γu are shown in Figure 8, and the time consumed for the error to be reduced from 1 m to 0.05 m is summarized in Table 1.   Im×m).
Because of the current experimental conditions, experiments cannot be carried out at larger depths and depth variations. This is also an experimental content of the future work, and experiments need to be realized in the future lake test or the sea test.    = I m×m ).
Because of the current experimental conditions, experiments cannot be carried out at larger depths and depth variations. This is also an experimental content of the future work, and experiments need to be realized in the future lake test or the sea test.
When the error is large, the curve of input u in Figure 8b shows that MPC with real-time adjusting Γ u can change the input more rapidly than MPC with fixed Γ u to improve the response when the error is large. This is due to the fact that fixed Γ u set as I m×m results in that the control increment vector is too conservative during the settling stage. When the error is small, both the MPC with varied Γ u and the MPC with fixed Γ u have a good depth keep characteristic. This is due to varied Γ u is set as I m×m by Equation (11), which causes the controller to perform conservatively to maintain the characteristics of reducing output disturbances and fluctuations on the steady stage.

Experiments of Tracking other Trajectories Using MPC Method with a Real-Time Adjusting Γ u
In this section, experiments of tracking other trajectories using MPC method with a real-time adjusting Γ u are carried out to examine the control effect, as shown in Figure 9, and the results are summarized in Table 2. The following desired depth z d (t) is considered as: the characteristics of reducing output disturbances and fluctuations on the steady stage.

Experiments of Tracking other Trajectories Using MPC Method with a Real-Time Adjusting Γu
In this section, experiments of tracking other trajectories using MPC method with a real-time adjusting Γu are carried out to examine the control effect, as shown in Figure 9, and the results are summarized in Table 2    A sinusoidal trajectory z d = 0.5 × sin(πt/100) + 1.5 (18) and a triangular trajectory From Figure 9b

Experiments of Tracking Sinusoidal Trajectory
Experiments of the AUV tracking a trajectory of Equation (18) are carried out, and comparasive results for simply re-planning the desired trajectory method (i.e., treating the point N steps ahead on the desired trajectory as the present desired point method) and conventional tracking method (N = 0) are shown in Figure 10, and the results are summarized, as shown in Table 3. From data in Table 2

Experiments of Tracking Sinusoidal Trajectory
Experiments of the AUV tracking a trajectory of Equation (18) are carried out, and comparasive results for simply re-planning the desired trajectory method (i.e., treating the point N steps ahead on the desired trajectory as the present desired point method) and conventional tracking method (N = 0) are shown in Figure 10, and the results are summarized, as shown in Table 3.  Table 3. Statistical Result of Figure 10.  Figure 10a,b, in the early stage (i.e., 0-15 s), faster response and smaller error are obtained based on our new design, as compared with the conventional tracking method. From Figure 10a, it can be seen that the lag between the real trajectory and the desired one is also small based on the new design, in comparison with the result from the conventional MPC without trajectory re-planning. From Figure 10b From data in Table 3, it can be seen that average of absolute error and standard deviation of error reduce from {0.04174 m, 0.04736 m} to {0.04067 m, 0.04677 m} when tracking sinusoidal trajectory, with decrease percentage of 14.80% and 17.15%, respectively, using simply re-planning the desired trajectory method and conventional tracking method. The experimental results indicate that the actual output trajectory with simply re-planning the desired trajectory method is closer to the desired trajectory than using conventional tracking method, which means that the lag between actual output trajectory and desired trajectory is reduced using simply re-planning the desired trajectory method.

Experiments of Tracking Triangular Trajectory
To validate simply re-planning desired trajectory method, experiments of tracking triangular trajectory are conducted. The desired depth zd(t), shown as Equation (19), is considered. Comparative results for simply re-planning the desired trajectory method and conventional tracking method are shown in Figure 11, and the results are summarized, as shown in Table 4.   Table 3. Statistical Result of Figure 10. From Figure 10a,b, in the early stage (i.e., 0-15 s), faster response and smaller error are obtained based on our new design, as compared with the conventional tracking method. From Figure 10a, it can be seen that the lag between the real trajectory and the desired one is also small based on the new design, in comparison with the result from the conventional MPC without trajectory re-planning. From Figure 10b From data in Table 3, it can be seen that average of absolute error and standard deviation of error reduce from {0.04174 m, 0.04736 m} to {0.04067 m, 0.04677 m} when tracking sinusoidal trajectory, with decrease percentage of 14.80% and 17.15%, respectively, using simply re-planning the desired trajectory method and conventional tracking method. The experimental results indicate that the actual output trajectory with simply re-planning the desired trajectory method is closer to the desired trajectory than using conventional tracking method, which means that the lag between actual output trajectory and desired trajectory is reduced using simply re-planning the desired trajectory method.

Experiments of Tracking Triangular Trajectory
To validate simply re-planning desired trajectory method, experiments of tracking triangular trajectory are conducted. The desired depth z d (t), shown as Equation (19), is considered. Comparative results for simply re-planning the desired trajectory method and conventional tracking method are shown in Figure 11, and the results are summarized, as shown in Table 4.   Figure 11a,b, at the beginning stage (i.e., 0-15 s), the improved MPC has a faster respond speed and smaller error by adding the re-planning loop. Similar to Figure 10, Figure 11a also shows that the proposed method can reduce the lag between the real trajectory and the desired one. From Data in Table 4 shows that simply re-planning desired trajectory method can reduce the average of absolute error from 0.04733 m to 0.03928 m, decreased by 17.01% and standard deviation of error from 0.05346 m to 0.04373 m, decreased by 18.20% as compared with conventional tracking method. Similar to the case of sinusoidal trajectory tracking, in the case of triangular trajectory tracking, the experimental results validate that the actual output trajectory with simply re-planning the desired trajectory method is closer to the desired trajectory than using conventional tracking method and the lag between actual output trajectory and desired trajectory is reduced using simply re-planning the desired trajectory method.    Figure 11.

Average of Absolute Error Standard Deviation of Error
Conventional tracking method 0.04733 m 0.05346 m Simply re-planning the desired trajectory method 0.03928 m 0.04373 m Decrease percentage 17.01% 18.20% From Figure 11a,b, at the beginning stage (i.e., 0-15 s), the improved MPC has a faster respond speed and smaller error by adding the re-planning loop. Similar to Figure 10, Figure 11a also shows that the proposed method can reduce the lag between the real trajectory and the desired one. From Figure 11b Data in Table 4 shows that simply re-planning desired trajectory method can reduce the average of absolute error from 0.04733 m to 0.03928 m, decreased by 17.01% and standard deviation of error from 0.05346 m to 0.04373 m, decreased by 18.20% as compared with conventional tracking method. Similar to the case of sinusoidal trajectory tracking, in the case of triangular trajectory tracking, the experimental results validate that the actual output trajectory with simply re-planning the desired trajectory method is closer to the desired trajectory than using conventional tracking method and the lag between actual output trajectory and desired trajectory is reduced using simply re-planning the desired trajectory method.

Conclusions
The contributions in this paper are on the application of improved MPC for AUVs. Real-time adjusting Γ u , according to the error method and simply re-planning the desired trajectory method are addressed. The proposed method of varying Γ u according the error online can improve MPC, mainly reflected by the reduction of settling time when tracking the step signal, and the method of re-planning the desired trajectory can optimize MPC by improving the tracking accuracy when tracking the continuous signal. Experimental results on UVIC-I AUV show that the improved MPC can reduce the settling time and a smaller lag is obtained by the developed re-planning desired trajectory in this paper. In this research, some issues are raised and the following work needs to be done in future. Firstly, we need to investigate how to on-line adjust the time interval N according to error to further improve the tracking precision. Secondly, simulation models need to be developed for AUV with six degrees of freedom and lake or sea test also need to be conducted at larger depths and depth variations to further validate the feasibility of the new design.