Adv Syst Sci Appl 2017; 3:1–8 Published online at http://ijassa.ipu.ru/ojs/ijassa/article/view/502 AUV Thrust Allocation with Variable Constraints V.V. Kostenko1, A.Yu. Tolstonogov1,2∗ 1Institute for Marine Technology Problems FEB RAS, Sukhanova st. 5a, Vladivostok, 690091, Russia 2 Far Eastern Federal University, Sukhanova st. 8, Vladivostok, 690091, Russia Abstract: Modern multipurpose Autonomous Underwater Vehicles (AUVs) represent the next generation of robotic systems with new technological tasks faced by researchers. One method of extending the functionality of the vehicle is installing tunnel thrusters in addition to the stern propulsion system. Thereby the vehicle becomes able to undertake both survey-style missions and low speed interactions with the environment. But the efficiency of the tunnel thruster depends strongly on the vehicle’s velocity, due to hydrodynamic aspects. The usual solution to this problem uses different control models and thrust allocation methods for these types of mission. A unified approach to thrust allocation is presented in this paper. The approach is based on solving the allocation problem by quadratic programming with variable constraints, depending on the velocity of the AUV and the thrusters’ angle of attack. The well-known implementation of active set method was used to model the proposed allocation method. Keywords: AUV, propulsion system, thruster hydrodynamics, control allocation problem, quadratic programming, interior point method, active set method 1. INTRODUCTION The design of a control algorithm for an underwater vehicle is often divided into several levels (Fig. 1.1) [1]. First, a high-level motion control algorithm is designed to compute a vector of virtual unbounded inputs to the vehicle fc (eq. (1.1)) from the target and current vehicle states and the control type. Fig. 1.1. Control system structure. fc is the vector of commanded inputs, f is the virtual vector of inputs, τ is the vector of allocated thrusts, u is the vector of low-level actuator inputs. ∗Corresponding author: tolstonogov.anton@gmail.com http://ijassa.ipu.ru/ojs/ijassa/article/view/502 2 V.V. KOSTENKO, A.YU. TOLSTONOGOV ẋ(t) = A(t)x +B(t)f y(t) = C(t)x (1.1) Here, x(t) ∈ Rn is the system state vector, t is time, y(t) is the vector of outputs, f ∈ Rm is the vector of virtual inputs, which should be equal to the command vector fc of the high level motion algorithm, andA(t), B(t), C(t) are the coefficient matrices of the mechanical system. The virtual inputs are usually chosen to have a number of forces and torques that equals the number of degrees of freedom, m, that the motion control system wants to control. Second, the control allocation algorithm is designed in order to map the vector of virtual input forces and torques fc to individual thruster forces τ such that the total forces and torques generated by all thrusters f amount to the commanded virtual input fc. f = B(x, t)τ (1.2) Here, B(x, t) is the thruster configuration matrix. It contains the location and orientation of all thrusters, in the vehicle body-fixed frame. τ ∈ A ⊂ Rp is the vector of actuator thrusts generated by the vehicle propulsion system, A are constraints from the saturation of the thrusters or other physical constraints, and p is the number of actuators. Third, there is a separate high-frequency low-level controller for each actuator, that controls the desired thrust τi by a low-level control input ui. For each actuator, τi = hi(x, t, ui) (1.3) where h is a function, τi is the thrust of actuator i, and ui ∈ U ⊂ R is the low-level control input of actuator i. Usually, the effector model is linear in u: τi = hi(x, t, ui) = G(x, t)ui (1.4) but the relation between the actuator thrust and the low-level control input is not considered in this article. We assume that each low-level controller maintains the desired thrust τi with sufficient quality. This modularity allows the high-level motion control algorithm to be designed without detailed knowledge about the vehicle propulsion system. In addition to coordinating the effects of the different thrusters in the system, issues such as thruster/fault tolerance, redundancy, and control constraints are typically handled within the control allocation module. In the case of an over-actuated propulsion system, when the number of thrusters is greater than the number of degrees of freedom (DOF) controlled by the vehicle (p > m), the control allocation module solves an optimization problem to achieve a minimal power consumption of the propulsion system. There are different approaches to the high-level motion control of a vehicle. The PID (proportional-integral-derivative) is a widespread control method, but new methods such as linear quadratic Gaussian (LQG) [2], the H∞ control method [3], or fuzzy logic control, are being rapidly developed. An interesting method is Model Predictive Control [4], which solves a suboptimal motion control problem at each iteration, with the ability to combine the first and second levels of the motion, with the consequent increase in the computational complexity. In this paper, the problem of high-level control is assumed to be solved and the only the problem of optimal thrust allocation in the case of an over-actuated vehicle is considered. This problem is well studied. There is a survey devoted to this problem [1]. Different approaches to this problem, including linear iterative approach as well as the quadratic programming approach satisfying optimality criteria, are treated in that survey. There are also papers published more recently [5–7]. These papers devoted to control allocation are focused on reducing the computational complexity of the optimal thrust allocation, but there is no mention of the fact that the thruster constraints can drift dynamically due to thruster hydrodynamics. A new approach, taking into account the vehicle speed and the thrusters’ angle of attack, is proposed in the present article. Copyright c© 2017 ASSA. Adv Syst Sci Appl (2017) AUV THRUST ALLOCATION WITH VARIABLE CONSTRAINTS 3 This approach allows controlling both survey-style missions and low speed interactions with the environment for a vehicle equipped with tunnel thrusters. 2. PROBLEM FORMULATION Let the vector of virtual inputs computed by the high-level motion control or vehicle operator be denoted by the generalized force vector f = (fx, fy, fz,mx,my,mz) T , here fi is the projection of the force onto the axis i (i equals to the x, y and z axis) and mi is the projection of the torque onto the axis i in the body-fixed coordinate frame. The body-fixed reference frame [8] is used in this work. The x axis is directed along the longitudinal vehicle axis from the vehicle’s stern to the fore, the y axis is directed along the latitudinal vehicle to the starboard, and the z axis completes the frame to a right-handed coordinate system. Assume that the system is equipped with p thrusters with control thrust τi(i = 1, . . . , p). This leads to the following relation between τ = (τ1, τ2, . . . , τp) and the virtual inputs f : Bτ = f (2.5) According to [9], the optimization problem can be written as min τ,s 1 2 (τTQτ + sTRs) Bτ = f + s (2.6) τmin ≤ τ ≤ τmax where s is the vector of slack variables used to penalize |Bτ− f |, Q and R are the weight diagonal matrices for the thrusters and DOFs, respectively, τmin and τmax are the vector of thrust constraints according to Bollard pull tests. The thrust allocation of an overactuated AUV with tunnel vertical thrusters is a velocity- dependent problem. For example, the pitch motion of the vehicle on zero velocity is better created by tunnel thrusters due to their large thrust arm. But the effectiveness of a tunnel thruster tends to zero at high velocities (Fig. 2.2). We propose a variable constraints method for the thrust allocation problem. This method allows reallocating the thrust depending on the vehicle velocity. The method considers thrust constraints that depend on the vehicle velocity, as well as the thrusters’ angle of attack: τmin(v, θ) ≤ τ ≤ τmax(v, θ) where τmin(v, θ) and τmax(v, θ) are the variable thrust constraints depending on the vehicle velocity and the thrusters’ angle of attack. 3. THE MODEL OF THRUSTER CONSTRAINTS The thrust and torque generated by a thruster can be described by the following formulas: τ = Kτ(J0)ρΩ |Ω|D4 m = Km(J0)ρΩ |Ω|D5 where ρ is the density of water, Ω is the rotational speed of the thruster propeller, andD is the diameter of the propeller.Kτ(J0), Km(J0) are the coefficients of thrust and torque determined Copyright c© 2017 ASSA. Adv Syst Sci Appl (2017) 4 V.V. KOSTENKO, A.YU. TOLSTONOGOV (a) v < 0.7ms−1 (b) v > 0.7ms−1 Fig. 2.2. Thrust allocation for pitch motion depending on vehicle velocity. by the form of the propeller and the characteristics of the motor. J0 = v/ΩD is the advance ratio (where v is a velocity of thruster input flow, this velocity equals to velocity of the vehicle in case of the absence of currents). The function Kτ(J0) can be fitted as a linear function of J0 at J0 > 0 and v > 0 [10]: K+ τ (J0) = K0 τ (0)− a1J0 (3.7) where K+ τ (J0) is the thrust coefficient Kτ(J0) at J0 > 0 and equi-directional state of ambient flow and axial thruster flow. K0 τ is the thrust coefficient at J0 = 0 and a1 is a coefficient determined by the shape of the propeller. The equation may be rewritten as a function of velocity by fixing the value of Ω: Kτ(v) = K0 τ − b1v (3.8) where b1 = a1/DΩ. The thrusters’ efficiency also depends on the thrusters’ angle of attack θ. At small angle of attack (θ < θ∗1, where θ∗1 is the first Critical Incoming Angle [10]), Kτ(v, θ) can be written as Kθ τ (v, θ) = K0 τ + ( K0 τ −K+ τ (v) ) [ sin ( θ θ∗1 π 2 ) − 1 ] (3.9) where Kθ τ (v, θ) is the thrust coefficient at vehicle velocity equals to v and the thrusters’ angle of attack equals to θ,K+ τ (v) is determined by equation 3.8, and θ∗1 is the first Critical Incoming Angle: θ∗1 = π/2− a1v. During Bollard pull tests (at v = 0), the thrust of the actuators can be obtained as a function of the input code or the current. The maximum thrust of the thruster can be written as a function of Kτ: Copyright c© 2017 ASSA. Adv Syst Sci Appl (2017) AUV THRUST ALLOCATION WITH VARIABLE CONSTRAINTS 5 τMax = K0 τρΩMax ∣∣ΩMax ∣∣D4 (3.10) where τMax is the maximum thrust generated by the thruster during the Bollard pull test and ΩMax is the number of revolution per second of the propeller at maximum thrust. Hence, the maximum thrust τMax for a stern thruster at vehicle velocity v and the thrusters’ angle of attack θ can be obtained from equations (3.7), (3.9) and (3.10): τMax(v, θ) = τMax − Cv [ 1− sin ( θ θ∗1 π 2 )] (3.11) where τMax(v, θ) is the maximum thrust generated by the thruster at vehicle velocity v and the thrusters’ angle of attack θ, C = b1/ρΩMax ∣∣ΩMax ∣∣D4. More complicated cases, when J < 0 or v < 0, can be obtained from the appropriate equations [10]. The steady state performance of a tunnel thruster can be fitted as an exponential function of the velocity ratio v/vjet [11]: τ(v) = τ(0)exp [ −c ( v vjet )2 ] where τ(v) is the the resulting force of the tunnel thruster for a vehicle velocity of v, τ(0) is the thruster’s performance in the Bollard pull test, and vjet is the axial velocity of flow generated by the thruster: vjet = √ τ(0) ρS . (3.12) Here, ρ is the density of water and S is the cross sectional area of the tunnel thruster. Hence, the tunnel thruster constraints can be written as τ(v)max = τ(0)maxexp [ −c ( v vjet,lim )2 ] (3.13) where τ(v)max is the maximum thrust when the vehicle’s motion has velocity v and τ(0)max is the thruster constraint provided by the Bollard pull tests of the thruster. 4. PROPULSION SYSTEM SETUP The model of the AUV “MT-2012” [12] propulsion system was used for algorithm simulation. The propulsion system consists of five thrusters: four thrusters located at the stern of the vehicle at an angle of α to the longitudinal axis (x axis), and a vertical tunnel thruster located at the forward part of the vehicle (Fig. 4.3). The propulsion system of the vehicle can be described by the thrusters’ configuration matrix B [13]: B = [bb, bl, bu, br, bf ] where bd, bl, bu, br are column vectors for (down, left, up, right) the stern thrusters and bf is the column vector for the forward tunnel thruster. The column vectors in four DOFs (surge, heave, pitch and yaw) take the form described below. Copyright c© 2017 ASSA. Adv Syst Sci Appl (2017) 6 V.V. KOSTENKO, A.YU. TOLSTONOGOV Fig. 4.3. Propulsion system of “MT-2012”. For the up and down stern thrusters: bu =  cosα − sinα 0 luz cosα− lux sinα  , bd =  cosα sinα 0 ldz cosα− ldx sinα  . For the left and right stern thrusters: bl =  cosα 0 lly cosα− llx sinα 0  , br =  cosα 0 lry cosα− lrx sinα 0  . For the vertical tunnel thruster: bf =  0 1 −ltunnelx 0  where ri = [lix, l i y, l i z] is the arm vector of thruster i (where i = u, d, l, r, f ). For this propulsion system, for reasons of symmetry, luz = lry = −ldz = −lly = Lsternzy and lux = ldx = llx = lrx = Lsternx . The parameters of the propulsion system are shown in Table 4.1. Table 4.1. Parameters of the AUV “MT-2012” propulsion system Lsternx , m 1.88 α, grad 22.5◦ Lsternzy , m 0.23 f sternlim , N 120.1/-68.2 ltunnelx , m 1.20 f tunnellim , N 122.1/-122.0 5. SIMULATION SETUP The proposed allocation control method with variable constraints was tested on depth maneuvering at different velocities, 0.3, . . . , 1.8 ms−1 (corresponding to forward forces 3.6, . . . , 129.6 N, and 50 Nm of pitch torque. Copyright c© 2017 ASSA. Adv Syst Sci Appl (2017) AUV THRUST ALLOCATION WITH VARIABLE CONSTRAINTS 7 The optimal thrust allocation problem for different velocities was solved by MATLAB Optimization Toolbox. Since Q > 0 and R > 0 (equation (2.6)) this is a convex quadratic problem in τ, so the interior point method or active set method for convex optimization problem can be used. The results of the thrust allocation for different vehicle velocities are shown in Fig. 5.4. Fig. 5.4. Thrust allocation for different velocities. There are some implementations of quadratic programming solvers in the C/C++ languages. These implementations are faster than the MATLAB version, and are easy to integrate in vehicle software. There are different types of quadratic programming solvers: qpOASES implements the active set method [14], which allows using a hot start to reduce the calculation time for each new iteration using the data of the previous one, and there are several libraries with implementations of the interior point method: [15] and [16]. 6. CONCLUSION To create a multi-purpose AUV capable of undertaking both survey-style missions and low speed interactions requires an over-actuated propulsion system and a sophisticated thrust allocation algorithm. One method of extending the functionality of the vehicle is installing tunnel thrusters to the vehicle propulsion system. A new approach for thrust allocation algorithm is proposed in the present article. The method based on the quadratic cost optimal problem with constraints. The main feature of the method is that thrust constraints depend on the vehicle velocity, as well as the thrusters’ angle of attack. This method takes into account the decrease in the thrust of tunnel and stern thrusters at high velocities, and reallocates the thrust accordingly. The proposed algorithm was tested with a simulation model of the real AUV “MT-2012” propulsion system. The propulsion system consists of five thrusters: four thrusters located at the stern of the vehicle and the vertical tunnel thruster located at the forward part of the vehicle. The result shows the adaptive thrust reallocation depending on vehicle velocity in case of depth maneuvering. Copyright c© 2017 ASSA. Adv Syst Sci Appl (2017) 8 V.V. KOSTENKO, A.YU. TOLSTONOGOV REFERENCES 1. Fossen, T. I. & Johansen, T. A. (2013) Control allocation—A survey. Automatica, 1, 1087–1103. 2. Naeem, W., Sutton, R., & Chudley, J. (2006) Soft computing design of a linear quadratic Gaussian controller for an unmanned surface vehicle. In 14th Mediterranean Conference on Control and Automation, Palermo, Italy, 1–6. 3. Moreira, L. & Guedes Soares, C. (2008) H2 and Hinf designs for diving and course control of an autonomous underwater vehicle in presence of waves. IEEE Journal of Oceanic Engineering, 33, 69–88, https://dx.doi.org/10.1109/ICSMC.2012.6378129. 4. Yan, Z., Chung, S. F., & Wang, J. (2012) Model predictive control of autonomous underwater vehicles based on the simplified dual neural network. In 2012 IEEE International Conference on Systems, Man, and Cybernetics (SMC), Seoul, Korea, 2551–2556, https://dx.doi.org/10.1109/ICSMC.2012.6378129. 5. Pham, C. D., Spiten, C., & From, P. J. (2015) A control allocation approach to haptic control of underwater robots. In 2015 IEEE International Workshop on Advanced Robotics and its Social Impacts (ARSO), Lyon, France, 1–6, https://dx.doi.org/10.1109/ARSO.2015.7428209. 6. Saback, R., Cesar, D., Arnold, S., Lepikson, H., Santos, T., & Albiez, J. (2016) Fault-tolerant control allocation technique based on explicit optimization applied to an autonomous underwater vehicle. In OCEANS 2016 MTS/IEEE Monterey, Monterey, CA, 1–8, https://dx.doi.org/10.1109/OCEANS.2016.7761251. 7. Huang, H., Zhang, G., Yang, Y., Xu, J., Li, J., & Wan, L. (2016) Thrust optimal allocation for broad types of underwater vehicles. In Advances in Swarm Intelligence: 7th International Conference, ICSI 2016, Bali, Indonesia, 491–502, https://dx.doi.org/10.1007/978-3-319-41009-8 53. 8. Ben, M. & Lee, T. H. (2011) Unmanned Rotorcraft Systems. Berlin, Germany: Springer- Verlag. 9. Johansen, T., Fossen, T., & Tøndel, P. (2005) Efficient optimal constrained control allocation via multiparametric programming. Journal of Guidance, Control, and Dynamics, 28, 506–515. 10. Kim, J. (2009) Thruster modeling and controller design for unmanned underwater vehicles (UUVs). In Inzartsev, A. V. (ed.), Underwater Vehicles, (pp. 235–250), InTechg, https://dx.doi.org/10.5772/6705. 11. Palmer, A., Hearn, G., & Stevenson, P. (2008) Modelling tunnel thrusters for autonomous underwater vehicles. IFAC Proceedings Volumes, 41, 91–96. 12. Matvienko, Y. V., Boreyko, A. V., Lvov, O. Y., & Vaulin, Y. V. (2015) Kompleks robototehnicheskih sredstv dlja vypolnenija poiskovyh rabot i obsledovanija podvodnoj infrastruktury na shel’fe [Complex Robotic Tools to Perform Searches and Surveys of Underwater Infrastructure on the Shelf]. Podvodnye issledovaniya i robototekhnika, 1, 4–15, [in Russian]. 13. Fossen, T. (2011) Handbook of Marine Craft Hydrodynamics and Motion Control. Chichester, UK: John Wiley & Sons, Ltd. 14. Ferreau, H., Kirches, C., Potschka, A., Bock, H., & Diehl, M. (2014) qpOASES: A parametric active-set algorithm for quadratic programming. Mathematical Programming Computation, 6, 327–363. 15. Gertz, E. M. & Wright, S. J. (2003) Object-oriented software for quadratic programming. ACM Transactions on Mathematical Software, 1, 58–81. 16. Yan, Y. (2014), C++ implementation of the interior point methods (CPIPM). [Online]. Available https://github.com/YimingYAN/cppipm. Copyright c© 2017 ASSA. Adv Syst Sci Appl (2017) https://dx.doi.org/10.1109/ICSMC.2012.6378129 https://dx.doi.org/10.1109/ICSMC.2012.6378129 https://dx.doi.org/10.1109/ARSO.2015.7428209 https://dx.doi.org/10.1109/OCEANS.2016.7761251 https://dx.doi.org/10.1007/978-3-319-41009-8_53 https://dx.doi.org/10.5772/6705 https://github.com/YimingYAN/cppipm Introduction Problem Formulation The Model of Thruster Constraints Propulsion System Setup Simulation Setup Conclusion