Abstract
Quantum genetic algorithm (QGA) is an optimization algorithm based on the probability that combines the idea of quantum computing and traditional genetic algorithm. In this paper, a new type of control law is developed for an underwater vehicle along with the desired path. The proposed controller is based on sliding mode control (SMC) in which the reaching law is modified to overcome two challenging problems, chattering, and sensitivity against noise. The disturbance is considered as a set of sinus waves with different frequencies which its parameters are estimated by Particle Swarm Optimization (PSO). Since QGA has some advantages such as fast convergence speed, small population size, and strong global search capabilities, we use QGA to determine the gain of the proposed controller. Finally, the Lyapunov theorem is used to prove that trajectory-tracking error converges to zero. Simulation results show that QGA can converge to the optimal response with a population consist of one chromosome.
Introduction
A lot of control methods are used in the autonomous underwater vehicles (AUVs) such as fuzzy and neural network methods, nonlinear control, adaptive control. Because of the nonlinear nature of AUVs, controllers which are used in AUVs should be accurate and they have to robust against noise, disturbance, and uncertainties.
Uncertainties in the modeling, environmental changes, and disturbance are reasons that many papers use intelligent methods and fuzzy logic control for controlling an AUV. Fuzzy control method in AUVs is studied in Smith et al., 1 Raeisy et al., 2 Shi et al., 3 Huajun et al., 4 and intelligent methods are surveyed in Venugopal et al., 5 Kodogiannis et al., 6 and Van De Ven et al. 7 Disturbance and noise are inevitable in many systems. There has been the number of works in the literature which address this problem in nonlinear systems such as Zhu et al., 8 Zhu, 9 and Wang and Zhu. 10
Due to some important factor such as the high nonlinearity and time-varying dynamics, ocean currents, and unpredictable disturbances, many kinds of literature use the nonlinear and adaptive methods to control an AUV. Nonlinear control is surveyed in Lapierre et al., 11 Lapierre and Soetanto 12 . An adaptive control using a regressor matrix consist of unknown parameters was designed in Sahu and Subudhi 13 . Also, an adaptive terminal sliding mode controller based on nonlinear disturbance observer was applied for an AUV in Chen et al. 14 They could estimate disturbance with a fairly good approximation. In Chang, 15 an adaptive sliding surface designed for a class of multi-input nonlinear systems with perturbations and regulation problem is solved based on the Lyapunov stability and back-stepping technique.
Quantum genetic algorithm (QGA) is a combination of GA and quantum computing. In 1996, QGA is proposed by Narayanan and Moor to solve the traveling salesman problem (TSP). The efficiency of QGA is significantly better than the conventional genetic algorithm. Some advantages of the QGA are a small value of the population and a fast speed of convergence and a great capability of global optimization. 16 Quantum computation is the product of quantum mechanics applying in the field of an algorithm. The ability of parallelism is the essential difference between classical computation and quantum computation. In the concept of probability calculation, the system is not in an invariable state. Conversely, it has a certain probability, and the state probability vector is corresponding to different possible states. Quantum computation is similar to it, the probability amplitudes of quantum states are used in quantum computation, and probability amplitudes of quantum states are squared normalized. Quantum rotating gates are used for realizing quantum transformation. There are some specific properties of quantum computation relative to classical computation. 16
In Layeb and Saidouni, 17 a QGA was also used to solve the binary decision diagram ordering problem. In Roy et al., 18 it was explained why and how quantum algorithms provide a fundamental improvement over classical ones; also it analyzed the benefits and drawbacks of QGA. In Laboudi and Salim, 19 QGA and conventional GA were compared and they have shown that QGA can be a very promising tool for exploring search spaces.
To accelerate the evolutionary process and increase the probability to find the optimal solution, Wang et al. 16 proposed a method to improve QGA performance. They improved the determination of the rotating angle by self-adaptive strategy and they added the quantum mutation operation and disaster operation.
Particle swarm optimization (PSO) was proposed by Kennedy and Eberhart in 1995. It is a population-based search algorithm which is simple and easy to realize. PSO can optimize a function only by modifying some parameters. In Chang et al., 20 amplitude and phase of harmonic are estimated by PSO.
In the concept of control of an AUV, trajectory tracking of an AUV along the desired path is an important task. It is difficult to develop a controller for an AUV in the presence of uncertainties, disturbances, and noises. Under these hardships, this paper focuses on developing a new control law for trajectory tracking for AUV in the depth plane.
This paper is based on our previous work 21 in which we applied a sliding mode control (SMC) with adaptive gains such that some of its parameters should be specified by the designer with trial and error. Therefore, we use the QGA to determine the gains of proposed control law, so a QGA is employed instead of adaptive gains for trajectory tracking of the underwater vehicle in the depth channel. We have modified the reaching law and have used a QGA to obtain the gain of the SMC. In the presented reaching law, a continuous term instead of the discrete sign function is used and also the velocity term is entered in the reaching law. To avoid selection of big constant gain, which is one of the factors causing chattering, the gain of the controller is obtained by quantum genetic, such that when the small gain is sufficient for the controller, the big gain is not selected. Since there is no sign function in the proposed controller, so our controller is not vulnerable to noise. Since the disturbance entered the system is usually unknown, we have used PSO algorithm to determine disturbance and applied it to control signal. In this paper, the disturbance is considered as a function of two sinus waves with different frequencies14,22,23 and we will try to estimate its amplitude and frequency. Simulation results of the proposed controller are compared with sliding mode controller with boundary layer technique. Minimization of tracking error and boundedness of the closed-loop signals are proved via Lyapunov stability theorem. Results show that the proposed control law can provide a good performance in the presence of external disturbances and noise.
Contributions of the paper are listed as follows:
In this paper, we extend our previous sliding mode controller with a new reaching law for controlling an underwater vehicle in the depth plane. In the presented reaching law, a continuous term instead of the discrete sign function is used; also the velocity term is entered in the reaching law. Because we do not use sign function, proposed controller is not vulnerable to noise.
Due to existence of uncertainties and disturbances, we determine the gains of our controller with an intelligent method instead of trial and error method. Since QGA has more advantages than conventional genetic algorithm (as it is mentioned in our paper), we use QGA for finding the gains of sliding mode controller for the first time.
We have considered disturbances interred the system as a function of two sinus waves (which is a reasonable assumption for disturbances in AUV problems) with different frequencies and amplitudes. We estimate this disturbance with PSO algorithm and apply it to proposed controller.
In simulation results, we have shown QGA can reach to the desired gains with a population consist of one chromosome.
It can be seen the QGA can be reach to desired response with a less size of population than that in the conventional genetic algorithm.
This paper is organized as follows: in section “Dynamic model,” dynamic model of vehicle is presented. In section “Depth control,” an overview of SMC for depth control of an underwater vehicle is surveyed and then proposed controller and estimation of disturbances by PSO are presented. QGA for determining the gains of the proposed controller is studied in section “An overview of QGA.” Finally, the simulation results for two cases are shown in section “Simulation results.”
Dynamic model
The motion equations for underwater vehicles are presented in Figure 1 with respect to an inertial reference frame or to a body-fixed reference frame. It is conventional to express the dynamic model of underwater vehicles based on the inertial reference frame by the position/attitude vector
where

Underwater vehicle with both inertial and body-fixed reference frames. 24
Assumption 1
The parameter
Assumption 2
The parameter
Depth control
In this section, at first, the sliding mode controller for the described system is explained and then we design a new sliding mode controller.
SMC
Let
where
is the tracking error,
Assumption 3
The states
Assumption 4
Furthermore,
In this paper, the problem of controlling the vertical motion of a remotely operated underwater vehicle, is considered by equation (2), where a control law composed by two components: the equivalent control term that is defined as
where
In the conventional SMC,
where
It can be easily verified that equation (3) is sufficient to impose the sliding condition
where
Disturbance estimation by PSO
In order to get a good disturbance approximation
where
Considering disturbance as a sinus function with two different frequencies, we try to estimate it with
in which
Proposed sliding mode controller and stability analysis
In the design of BLC, the width of the boundary layer plays two conflicting roles; the width must be large to reduce chattering and vice versa it should be small to achieve a good control accuracy. When noise is larger than the width of the boundary layer, the high-frequency fluctuations in the noise will be reflected and reinforced.32,33 In our method by modifying the reaching law and using the QGA for finding the optimal gain in the SMC, these problems are eliminated from the input signal.
We modify the reaching law in SMC and apply a combination of sliding surface and its derivative instead of sign function. Since the states which quickly encounter to the sliding surface causing the states to be separated from the sliding surface and creating chattering, the velocity term is entered in the reaching law. Coefficient
There are external disturbances, noise, and uncertainties in the system dynamics and modeling, so states may be separate from the surface and cause chattering. To avoid selection of the big constant gain, which is one of the factors causing chattering, the gain of the controller is selected by QGA.
Consider the sliding surface defined in equation (2). Differencing with respect to time yields
By defining
The proposed control input is defined as
which can be rewritten as follows
where
Theorem 1
The tracking error
Proof
Consider the Lyapunov function as
From equation (3), we have
and from equation (12), it is concluded that
Combining equations (15) and (19) yields
Then from equations (17) and (20) and defining
Then
From Barbalat’s lemma, we conclude that
An overview of QGA
QGA is a combination of GA and quantum computing. The efficiency of QGA is significantly better than the conventional genetic algorithm. The QGA uses a small population size and results to achieve rapid convergence in global search. The ability of parallelism is the essential difference between quantum computation and classical computation. The probability amplitudes of quantum states are used in quantum computation and probability amplitudes of quantum states are squared normalized, so the speed of calculation of quantum computation is faster than the speed of classic calculation.
16
Due to these capabilities, we use QGA to find sub-optimal gains of proposed sliding mode controller. In quantum computing, we use a quantum bit (qubit) as the smallest unit of information storage. Each par of
A qubit can adopt state 1, state 0, or a superposition of both. The state representation of a qubit is as follows 17
where
In classical GA, the representation of chromosomes is a binary string, but in QGA the representation of chromosomes is based on vectors of qubits such that a chromosome can represent the superposition of all possible states. In other words, a chromosome is a string of m qubits which forms a quantum register.
17
QGA maintains a population of Q-bit individuals,
where

QGA algorithm.
Initializing the population
Without loss of generality, we suppose that all the amplitude of qubits is initialized to
Evaluation of individuals
This stage allows to quantify the quality of each chromosome in the population to help a better population to be built. Such as conventional GA to evaluate each individual, we need to an objective function. Here the objective function is considered the difference between the desired state and real state. 19
Quantum genetic operations
Measurement
In order to use of effectively of superposed states of qubits, we must observe each qubit. The process of generating binary string from the qubit string is called observation. 35 This leads to getting a classic chromosome as shown in Figure 3.

Measured chromosome. 19
Interference
This operation allows modifying the amplitudes of individuals in order to improve performance. It mainly consists of moving the state of each qubit in the sense of the value of the best solution. This is useful for intensifying the search around the best solution. It can be performed using a unit transformation that allows a rotation whose angle is a function of the
Figure 4 illustrates quantum interference and its direction is determined by Table 1 as a function of the value of

Quantum interference. 17
Look-up table for quantum rotation. 19
The population
where
Mutation operator
Quantum mutation is an assistant operation with the purpose to increase the local searching ability of QGA algorithm and avoid the loss of important information in the population. 16 This operator performs permutation between two qubits (Figure 5). It selects randomly an individual; then two qubits is selected randomly and exchange with each other.

Mutation operator. 17
Crossover operator
Single-point crossover is applied to the algorithm (Figure 6). To reach this, two individuals have been selected randomly afterward the parts of them are changed with each other around a cut point. The cut point of crossover is selected randomly. After crossover, we apply the objective function to the offspring.

Quantum crossover. 17
Mapping binary string into real numbers
To map the binary string into a real number
where
Second, we calculate the corresponding real number on the interval
In this paper, we have the two-dimensional domain
where
where
Now we assign
Simulation results
To evaluate the proposed controller, it is compared with the conventional SMC and boundary layer SMC. Also proposed controller is simulated with conventional GA and QGA and its results are compared. The results of the simulations are shown in the following figures. Finally, the controller performance is evaluated in the presence of noise. It is considered that the model parameters,
The parameters of the SMC controller and the model.
SMC: sliding mode control.
Consider
Because QGA is capable of showing any linear superposition of states, it can converge to the optimal response with a population consist of one chromosome.
Remark 1
We consider two cases for the population in the both QGA and conventional GA:
Case 1: in the QGA, number of population is
Case 2: in the QGA, number of population is
Remark 2
We considered noise as white Gaussian noise with signal-to-noise (SNR) ratio (SNR = 30) for surveying vulnerability of controllers against noise. For conventional SMC and boundary layer SMC,

Conventional SMC with

BLC with

(a) BLC with applied noise and (b) proposed controller with applied noise in Case 1.

Proposed controller with QGA and disturbance estimation in Case 1.

Proposed controller with QGA with one-chromosome population in Case 2.
The parameters of GA and QGA in two cases.
QGA: quantum genetic algorithm; GA: genetic algorithm.
We consider disturbance as a sinus function with two different frequencies,

Disturbance estimation by PSO and best cost function.
Simulation results for disturbance estimation by PSO for every 20 iterations.
PSO: particle swarm optimization.
Figures 13 and 14 show the proposed controller which its gains are determined by conventional GA in two cases. As Figures 11 and 14 show the speed of convergence to the desired trajectory with conventional GA in the case of the one-chromosome population is much slower than the speed of convergence in the proposed controller.

Proposed controller with conventional GA in Case 1.

Proposed controller with conventional GA with one-chromosome population in Case 2.
Conclusion
A quantum genetic SMC was developed for trajectory tracking of an AUV. Pure sliding mode controller has disadvantages such as chattering and being too vulnerable to noise. The key idea behind the proposed controller was to modify the reaching law in SMC and apply a combination of sliding surface and its derivative instead of sign function to solve these problems. We used PSO algorithms to determine amplitude and frequencies of disturbance and applied it to control signal. Because QGA has some advantages than the conventional genetic algorithm, the gains of the proposed controller are defined by QGA. Because of linear superposition of states in QGA, simulation results show that a population consist of one chromosome can converge to the optimal response. As future works one can design a new sliding mode controller based on disturbance observers via an analytical method, or one can apply the proposed method on more complex systems such as industrial systems, and robots.
Footnotes
Declaration of conflicting interests
The author(s) declared no potential conflicts of interest with respect to the research, authorship, and/or publication of this article.
Funding
The author(s) received no financial support for the research, authorship, and/or publication of this article.
