# A Biologically Inspired Framework for the Intelligent Control of Mechatronic Systems and Its Application to a Micro Diving Agent

Authors: Wallace M. Bessa; Gerrit Brinkmann; Daniel A. Duecker; Edwin Kreuzer; Eugen Solowjow
Journal: Mathematical Problems in Engineering
 (2018)

---

## Abstract

Mechatronic systems are becoming an intrinsic part of our daily life, and the adopted control approach in turn plays an essential role in the emulation of the intelligent behavior. In this paper, a framework for the development of intelligent controllers is proposed. We highlight that robustness, prediction, adaptation, and learning, which may be considered the most fundamental traits of all intelligent biological systems, should be taken into account within the project of the control scheme. Hence, the proposed framework is based on the fusion of a nonlinear control scheme with computational intelligence and also allows mechatronic systems to be able to make reasonable predictions about its dynamic behavior, adapt itself to changes in the plant, learn by interacting with the environment, and be robust to both structured and unstructured uncertainties. In order to illustrate the implementation of the control law within the proposed framework, a new intelligent depth controller is designed for a microdiving agent. On this basis, sliding mode control is combined with an adaptive neural network to provide the basic intelligent features. Online learning by minimizing a composite error signal, instead of supervised off-line training, is adopted to update the weight vector of the neural network. The boundedness and convergence properties of all closed-loop signals are proved using a Lyapunov-like stability analysis. Numerical simulations and experimental results obtained with the microdiving agent demonstrate the efficacy of the proposed approach and its suitableness for both stabilization and trajectory tracking problems.


---

## Body

## 1. Introduction

In the last few years we have witnessed the emergence of autonomous and intelligent mechatronic systems. Household robots, such as automated vacuum cleaners and lawn mowers, as well as delivery drones and self-driving cars, just to name a few, are examples of the way intelligent devices are entering our lives. Unlike industrial robots, which operate in a well-structured environment and perform repetitive tasks, autonomous systems have to cope with a high level of uncertainties and adjust their behavior according to both internal and external changes. Thus, although conventional control schemes have been successfully employed to a large variety of robotic manipulators and other industrial applications, they might not represent the most proper choice to deal with mechatronic systems subject to drastic changes in operating conditions. On the other hand, because of their ability to undertake assignments in an environment of uncertainty and imperfect information, soft computing techniques, such as fuzzy logic and artificial neural networks, are commonly used when highly uncertain plants are to be considered [1].Assuming that intelligent control may be understood as a combination of modern control theory with computational intelligence [2, 3], many authors have adopted this approach to propose their control schemes. Boukens and Boukabou [4], for example, associated an optimal controller with an adaptive neural network to solve the trajectory tracking problem of a mobile robot subject to external disturbances, unmodeled dynamics, and nonholonomic constraints. In [5], a gain scheduling PID controller optimized by a genetic algorithm is designed for an unmanned marine surface vessel. Lu et al. [6] combined an interval type 2 fuzzy neural network with a proportional-derivative controller and applied the resulting scheme to a Delta parallel robot. By means of the Lyapunov stability theory, Mai and Commuri [7] proposed a robust neural network controller for a prosthetic ankle joint with gait recognition. Radial basis function (RBF) neural network is adopted in [8] in order to design a reinforcement learning based adaptive nonlinear optimal controller for an air-breathing hypersonic flight vehicle. In [9], adaptive neural networks are also considered for the reinforcement learning-based control of wheeled mobile robots. A neural-network-based online near-optimal controller for overhead cranes is obtained in [10] by solving the corresponding Hamilton-Jacobi-Bellman equation. Using a network model to mimic those brain structures related to emotions, Lucas et al. [11] presented the so-called Brain Emotional Learning Based Intelligent Controller (BELBIC). This approach was later generalized in [12] by choosing a nonlinear learning module with universal approximation features.As a result of the essentially nonlinear nature of almost all mechatronic systems, nonlinear control methods have been frequently merged with soft computing approaches. The recursive structure of backstepping, for instance, represents a mighty feature that has been exploited in the development of intelligent controllers. In [13], RBF neural networks are adopted as disturbance observers in a backstepping based approach to handle with a class of strict-feedback nonlinear systems subject to modeling imprecisions and input nonlinearities. Lin et al. [14] used neural networks and a tuning function-based adaptive technique to propose an adaptive backstepping fault-tolerant control algorithm. Gao et al. [15] dealt with fault tolerant-control using neural networks and backstepping too, but, in their case, the controller is suitable for multiple-input and multiple-output (MIMO) systems. In [16], a neural-network-based adaptive backstepping controller is presented for a class of strict-feedback nonlinear state constrained systems subject to input delay. The control of nonaffine nonlinear systems with time-delays is in turn tackled with neural networks in a backstepping way by Wang et al. [17]. By combining backstepping with a neural approximator, Si et al. [18] developed a robust control scheme to cope with nonlinear systems with stochastic disturbances and unknown hysteresis input. Li et al. [19], on the other hand, proposed an adaptive fuzzy controller based on backstepping technique to deal with nonlinear strict-feedback systems subject to input delay and output constraint. By using small-gain approaches, Zhang et al. [20] and Su et al. [21] designed adaptive fuzzy backstepping schemes for uncertain nonlinear systems. Moreover, many other neural and fuzzy backstepping controllers have been recently employed in a variety of applications, ranging from robotic manipulators [22–24] to spacecrafts [25–27]. However, although promising alternatives have already been proposed [28, 29], the explosion of complexity, which is an inherent issue in backstepping, still poses some difficulties for the implementation of control schemes based on this method.Dynamic surface control (DSC) emerged as an appealing alternative to overcome the problems related to the explosion of terms. Nevertheless, DSC may lead to instabilities in the closed-loop system if the designed controller cannot properly cope with model uncertainty or external disturbances [30]. In order to surmount this handicap, intelligent approximators can be designed to compensate for modeling inaccuracies within DSC based schemes. In [31] dynamic surface control is combined with a radial basis function neural network and applied to a single link manipulator with a flexible joint. Xu and Sun [32] used fuzzy logic to design an intelligent approximator within a dynamic surface based controller. Dynamic surface control has been also combined with other neural networks based schemes [33–36] and with fuzzy inference systems [37–40].Because of its familiarity with the computed torque technique, the robotics community has commonly adopted feedback linearization method together with machine intelligence. By using intelligent algorithms, the major drawback of feedback linearization, namely, the requirement of a precise plant model, can be overcome. Modeling imprecisions and disturbances lead to a significant increase in tracking error when feedback linearization is applied without a compensation scheme [41]. Hence, neural networks [42–48], fuzzy logic [49–52], and evolutionary computation [53–55], for instance, have been used to surpass this limitation and to improve control performance.The fusion of sliding mode control (SMC) and soft computing is considered a powerful approach to deal with highly uncertain nonlinear systems [56]. Sliding mode controllers can successfully handle bounded uncertainties [57], but the utilization of discontinuous relays may lead to undesirable chattering effects [41]. Even though a properly designed boundary layer has the capacity to completely eliminate chattering, the adoption of this strategy usually results in an inferior tracking performance [58]. In this case, computational intelligence might be used to overcome the shortcomings of smooth sliding controllers [59]. As demonstrated by Bessa and Barrêto [60], adaptive fuzzy inference systems, for example, can be properly embedded within the boundary layer to compensate for modeling imprecisions, for the purpose of enhancing the overall control efficiency. This procedure has already been successfully applied to the dynamic positioning of underwater vehicles [61, 62], vibration suppression in smart structures [63], tracking of unstable periodic orbits in a chaotic pendulum [64], and the control of electrohydraulic servosystems [65].Considering that artificial neural networks can perform universal approximation [66], neural based schemes have been also merged with sliding mode controllers for the compensation of modeling inaccuracies. In [67], Azzaro and Veiga proposed a sliding mode controller for nonlinear systems with unknown dynamics. By means of the Levenberg-Marquardt algorithm, a neural network was trained to identify the plant dynamics. Fei and Lu [68] presented an adaptive sliding mode controller with a neural estimator and a fractional order sliding manifold. RBF neural networks and a fractional term in the sliding surface are used to improve the control performance. In [69], a double loop recurrent neural network is adopted to approximate unknown plant dynamics within a sliding mode controller. Zhang et al. [70] combined integral sliding modes with a critic neural network to propose an optimal guaranteed cost control scheme for constrained-input nonlinear systems with matched and unmatched disturbances. Yu and Kaynak addressed the integration of SMC with some other soft computing techniques in [56] and discussed further aspects and new trends about this approach in [59].Although it might be the dominant paradigm in the aforementioned works, could the mere fusion of computational intelligence with modern control theory be enough to define the resulting control scheme as intelligent? Would an autonomous mechatronic system equipped with such a controller be considered an intelligent agent? The answers to these questions rely on our understanding of what intelligence means. Moreover, as we show in this paper, the sense of what defines intelligence can provide a clear path to delineate the scope of intelligent control.In this work, supported by the most common definitions of natural intelligence, we propose a framework for the intelligent control of mechatronic agents. The intelligent controller should thereby be able to make reasonable predictions about the expected dynamic behavior of the system, adapt itself to changes in the plant and in the environment, learn by experience and by interacting with the environment, and be robust to modeling imprecisions and unexpected perturbations. In order to comply with these four requirements, an adaptive neural network is embedded within the boundary layer of a smooth sliding mode controller. Although several other approaches would be possible within the proposed framework, we think that the adopted strategy has some valuable features, which are discussed below. By means of a Lyapunov-like stability analysis, rigorous proofs for the boundedness and convergence properties of the closed-loop signals are provided. The proposed approach is applied to the intelligent depth control of a microdiving agent. Both numerical and experimental results obtained with the microdiving agent demonstrate the efficacy of the proposed approach and its suitableness for both stabilization and trajectory tracking problems.The following advantages of the proposed strategy can already be anticipated: (i) robustness to both modeling inaccuracies and external disturbances; (ii) the ability to incorporate prior knowledge of the plant and also to learn by interacting with the environment; (iii) the adoption of online learning, by minimizing a composite error signal, instead of supervised off-line training; (iv) it does not suffer from the curse of dimensionality, since the proposed neural network architecture requires only one neuron in the input layer, instead of all system states or state errors. The last two features not only simplify the design process and the resulting control law, but also minimize the required computational effort. As a matter of fact, the adoption of only one neuron in the input layer allows the computational complexity of the neural network to be exponentially reduced. Moreover, these attributes enable the proposed intelligent controller to be light enough to be employed in mechatronic systems with reduced computational power.Moreover, it should be highlighted that the intelligent scheme discussed here introduces a significant improvement over our recently proposed scheme, which has been presented in [49]. By merging sliding mode control with artificial neural networks, the new intelligent depth controller provides robustness and enhances the learning capacities of the diving agent.The rest of the paper is organized as follows. The usual concepts of intelligence and their respective adoption as the basis of a framework for intelligent control are addressed in Section2. This discussion guides the design of a new intelligent controller for a microdiving agent in Section 3. The performance of the proposed intelligent scheme is evaluated in Section 4 by means of numerical and experimental results. Finally, the concluding remarks are presented in Section 5.


## 2. A Framework for Intelligent Control

The relevance of control theory to the investigation of complex biological phenomena, especially those related to the nervous system and to natural self-regulating processes, was highlighted seventy years ago in the seminal work by Norbert Wiener [71]. The cybernetic approach proposed by Wiener, which turned out to be very fruitful to both biological and engineering sciences, reinforced the benefits of interdisciplinary research. Motivated by this perspective, in this section, we outline the essential requirements for an intelligent controller based on concepts derived from areas such as neuroscience and psychology.


### 2.1. What Is Intelligence?

Before starting to discuss the most common definitions, it should be clear that here we are referring to intelligence in a strict sense. In fact, what we usually consider intelligent depends on our expectations: although ordinary people know how to play chess, a baby with the same skill would be considered a genius; a dog, even if it could only understand the rules of the game, would be nothing short of a miracle [72]. Hence, our focus lies on the most fundamental traits of intelligent behavior.In order to delineate the strict meaning of the term, psychologists and neuroscientists have been trying to find the very essence of intelligence since the beginning of the twentieth century. According to Alfred Binet and Theodore Simon, the fathers of the IQ Test, intelligence represents the faculty of adapting oneself to new circumstances [73]. Thereafter, many researchers endorsed that adaptation is a core feature of intelligence [74]. Nevertheless, it should be noted that purely adaptive behavior seems to be not enough to distinguish an intelligent agent. Otherwise, even bacteria, which have the ability to adapt themselves to the environment [75], could be characterized as intelligent organisms. An agent equipped solely with the adaptation attribute has to adapt itself to each change in its environment, even if this change represents the return to a previously experienced condition. We expect, however, that an intelligent agent should be able to recognize an already experienced state and thus act accordingly, without any readaptation. Such behavior clearly suggests the need for memory and the ability to learn.According to Dawkins [76], the emergence of memory in living beings represented a great advance, inasmuch as their behavior could now be influenced not only by the immediate past, but also by events in the distant past.The psychologist Walter Dearborn has soon realized that the capacity to learn and to profit by experience represents a key aspect of intelligence [77]. Donald Hebb, whose work had an enormous influence on the field of artificial neural networks, has also highlighted the importance of learning [78]. As a matter of fact, Hebbian theory is the basis of one of the oldest and most important learning rules in neural networks. Nowadays, there is no doubt that learning is essential for all intelligent beings and it usually occurs throughout their entire lifetime. This process involves the continuous assimilation of new information, followed by the unceasing accommodation of the knowledge basis due to information arrival.More recently, neuroscientists begun to draw attention to another essential trait of intelligence: the capacity to predict. Wolpert [79] argued that humans and animals, in order to properly activate their muscles and limbs, develop an internal model of their own motor systems and of their environment as well. This internal model is constantly updated by sensory feedback and is used by the central nervous system (CNS) to predict the consequences of its control actions [80]. Edwards et al. [81] propose that the brain creates internal models of the environment to predict imminent sensory input. Llinás [82] emphasized that prediction is the prime objective of the brain and is imperative for intelligent motricity. In [83], Llinás and Roy suggested that the CNS has evolved for the purpose of predicting the outcomes of the impending motion. Moreover, since prediction in this case should be unique, the authors also claim that this feature may have led to the emergence of self-awareness in complex living beings.Another well-known property of biological systems is robustness [84]. Robust organisms are able to keep their functions even in the case of unexpected perturbations and under diverse environmental conditions. According to Kitano [85], since robustness favors evolvability, robust traits are usually selected by evolution. In addition, these naturally selected strategies can serve as inspiration for the design of artificial intelligent systems [86].In highly evolved systems, such as human beings, intelligence might be also associated with many other higher predicates: emotion, creativity, consciousness, just to name a few. Nevertheless, robustness, prediction, adaptation, and learning surely represent the most basic characteristics of all intelligent organisms, even the simplest ones. Furthermore, from the control theory perspective, besides being hallmarks of intelligence, these four features are also very convenient, since they can provide a structured way for the development of intelligent controllers.


### 2.2. Intelligent Control

Now, based on our previous discussion and assuming that an intelligent controller should be able to emulate the most essential traits of intelligence, then it must possess at least the following competencies.Prediction. Considering that prediction represents the ultimate function of the nervous system, the intelligent controller must be able to incorporate the available knowledge about the plant, in order to anticipate the appropriate control action.Adaptation. All intelligent organisms use adaptation to accommodate themselves to the needs for survival. Hence, the control scheme should also adapt itself to changes in the plant and in the environment.Learning. The capacity to learn by experience and acquire knowledge by interacting with the environment is essential to an intelligent system. Within the proposed framework, online learning improves the ability to predict the dynamics of the plant during task execution.Robustness. Since living beings are able to maintain their functions under diverse environmental circumstances, the intelligent controller must be robust against modeling inaccuracies and external disturbances, with the view of ensuring safe operating conditions.The topology of an intelligent controller designed within the proposed framework is shown in Figure1. In the adopted scheme, both prediction and learning blocks are responsible for incorporating knowledge to allow an appropriate control action. However, while the former takesa priori knowledge, available in the design phase, into account, the latter considersa posteriori knowledge, acquired by interacting with the environment. The adaptation block is in charge of adjusting the learning mechanism. Finally, by means of the signals computed usinga priori anda posteriori knowledge, the robustness block defines the control action that should be sent to the plant.Figure 1
Proposed topology for the intelligent controller.It is important to note that the four attributes considered in the proposed framework can also be used to distinguish the wide range of control schemes. Model-based controllers, for example, are able to consider onlya priori knowledge. Purely adaptive schemes can not learn and always have to adapt themselves, even to previously experienced situations. In fact, it is easy to infer that neither adaptive nor model-based controllers could be considered intelligent. Nevertheless, there are several situations where the distinction would not be so straightforward.Some control approaches that make use of soft computing techniques might eventually be considered intelligent in a broad context. Artificial neural networks employing offline supervised training or fuzzy methods based on heuristic schemes have been widely applied for control purposes and certainly have their application scopes as well. However, a mechatronic agent equipped with such controller could not adapt itself in face of new experiences, neither would it perform online learning by interacting with the environment. Therefore, in a strict sense, that agent would not be able to come up with intelligent behavior.Lastly, we would like to emphasize that the capacity to emulate intelligence does not necessarily imply better control performance. There are situations, as in the case of industrial robots operating in a well structured environment and performing repetitive tasks, in which a model-based controller would be the most appropriate choice as long as contact dynamics are not predominant. Moreover, robust or adaptive methods can also effectively deal with plants subject to structured uncertainties, i.e., parameter variations. However, when a high level of uncertainties comes on the scene and a mechatronic agent must operate in an environment of imperfect information, intelligent controllers represent the most appropriate strategy. In order to demonstrate this statement, an intelligent controller is designed within the proposed framework in the next section. By means of the numerical and experimental results, we show in Section4 that the designed intelligent scheme can handle large uncertainties and noisy input signals.


## 2.1. What Is Intelligence?

Before starting to discuss the most common definitions, it should be clear that here we are referring to intelligence in a strict sense. In fact, what we usually consider intelligent depends on our expectations: although ordinary people know how to play chess, a baby with the same skill would be considered a genius; a dog, even if it could only understand the rules of the game, would be nothing short of a miracle [72]. Hence, our focus lies on the most fundamental traits of intelligent behavior.In order to delineate the strict meaning of the term, psychologists and neuroscientists have been trying to find the very essence of intelligence since the beginning of the twentieth century. According to Alfred Binet and Theodore Simon, the fathers of the IQ Test, intelligence represents the faculty of adapting oneself to new circumstances [73]. Thereafter, many researchers endorsed that adaptation is a core feature of intelligence [74]. Nevertheless, it should be noted that purely adaptive behavior seems to be not enough to distinguish an intelligent agent. Otherwise, even bacteria, which have the ability to adapt themselves to the environment [75], could be characterized as intelligent organisms. An agent equipped solely with the adaptation attribute has to adapt itself to each change in its environment, even if this change represents the return to a previously experienced condition. We expect, however, that an intelligent agent should be able to recognize an already experienced state and thus act accordingly, without any readaptation. Such behavior clearly suggests the need for memory and the ability to learn.According to Dawkins [76], the emergence of memory in living beings represented a great advance, inasmuch as their behavior could now be influenced not only by the immediate past, but also by events in the distant past.The psychologist Walter Dearborn has soon realized that the capacity to learn and to profit by experience represents a key aspect of intelligence [77]. Donald Hebb, whose work had an enormous influence on the field of artificial neural networks, has also highlighted the importance of learning [78]. As a matter of fact, Hebbian theory is the basis of one of the oldest and most important learning rules in neural networks. Nowadays, there is no doubt that learning is essential for all intelligent beings and it usually occurs throughout their entire lifetime. This process involves the continuous assimilation of new information, followed by the unceasing accommodation of the knowledge basis due to information arrival.More recently, neuroscientists begun to draw attention to another essential trait of intelligence: the capacity to predict. Wolpert [79] argued that humans and animals, in order to properly activate their muscles and limbs, develop an internal model of their own motor systems and of their environment as well. This internal model is constantly updated by sensory feedback and is used by the central nervous system (CNS) to predict the consequences of its control actions [80]. Edwards et al. [81] propose that the brain creates internal models of the environment to predict imminent sensory input. Llinás [82] emphasized that prediction is the prime objective of the brain and is imperative for intelligent motricity. In [83], Llinás and Roy suggested that the CNS has evolved for the purpose of predicting the outcomes of the impending motion. Moreover, since prediction in this case should be unique, the authors also claim that this feature may have led to the emergence of self-awareness in complex living beings.Another well-known property of biological systems is robustness [84]. Robust organisms are able to keep their functions even in the case of unexpected perturbations and under diverse environmental conditions. According to Kitano [85], since robustness favors evolvability, robust traits are usually selected by evolution. In addition, these naturally selected strategies can serve as inspiration for the design of artificial intelligent systems [86].In highly evolved systems, such as human beings, intelligence might be also associated with many other higher predicates: emotion, creativity, consciousness, just to name a few. Nevertheless, robustness, prediction, adaptation, and learning surely represent the most basic characteristics of all intelligent organisms, even the simplest ones. Furthermore, from the control theory perspective, besides being hallmarks of intelligence, these four features are also very convenient, since they can provide a structured way for the development of intelligent controllers.


## 2.2. Intelligent Control

Now, based on our previous discussion and assuming that an intelligent controller should be able to emulate the most essential traits of intelligence, then it must possess at least the following competencies.Prediction. Considering that prediction represents the ultimate function of the nervous system, the intelligent controller must be able to incorporate the available knowledge about the plant, in order to anticipate the appropriate control action.Adaptation. All intelligent organisms use adaptation to accommodate themselves to the needs for survival. Hence, the control scheme should also adapt itself to changes in the plant and in the environment.Learning. The capacity to learn by experience and acquire knowledge by interacting with the environment is essential to an intelligent system. Within the proposed framework, online learning improves the ability to predict the dynamics of the plant during task execution.Robustness. Since living beings are able to maintain their functions under diverse environmental circumstances, the intelligent controller must be robust against modeling inaccuracies and external disturbances, with the view of ensuring safe operating conditions.The topology of an intelligent controller designed within the proposed framework is shown in Figure1. In the adopted scheme, both prediction and learning blocks are responsible for incorporating knowledge to allow an appropriate control action. However, while the former takesa priori knowledge, available in the design phase, into account, the latter considersa posteriori knowledge, acquired by interacting with the environment. The adaptation block is in charge of adjusting the learning mechanism. Finally, by means of the signals computed usinga priori anda posteriori knowledge, the robustness block defines the control action that should be sent to the plant.Figure 1
Proposed topology for the intelligent controller.It is important to note that the four attributes considered in the proposed framework can also be used to distinguish the wide range of control schemes. Model-based controllers, for example, are able to consider onlya priori knowledge. Purely adaptive schemes can not learn and always have to adapt themselves, even to previously experienced situations. In fact, it is easy to infer that neither adaptive nor model-based controllers could be considered intelligent. Nevertheless, there are several situations where the distinction would not be so straightforward.Some control approaches that make use of soft computing techniques might eventually be considered intelligent in a broad context. Artificial neural networks employing offline supervised training or fuzzy methods based on heuristic schemes have been widely applied for control purposes and certainly have their application scopes as well. However, a mechatronic agent equipped with such controller could not adapt itself in face of new experiences, neither would it perform online learning by interacting with the environment. Therefore, in a strict sense, that agent would not be able to come up with intelligent behavior.Lastly, we would like to emphasize that the capacity to emulate intelligence does not necessarily imply better control performance. There are situations, as in the case of industrial robots operating in a well structured environment and performing repetitive tasks, in which a model-based controller would be the most appropriate choice as long as contact dynamics are not predominant. Moreover, robust or adaptive methods can also effectively deal with plants subject to structured uncertainties, i.e., parameter variations. However, when a high level of uncertainties comes on the scene and a mechatronic agent must operate in an environment of imperfect information, intelligent controllers represent the most appropriate strategy. In order to demonstrate this statement, an intelligent controller is designed within the proposed framework in the next section. By means of the numerical and experimental results, we show in Section4 that the designed intelligent scheme can handle large uncertainties and noisy input signals.


## 3. Depth Control of a Micro Diving Agent

Compact underwater agents play an important role in oceanographic research and industrial monitoring. They have been deployed in the investigation of ocean phenomena [87] and in the development of underwater sensor networks [88]. However, the design of accurate controllers for this kind of mechatronic system can become very challenging, due to their intrinsic nonlinear behavior and highly uncertain dynamics [49]. Furthermore, they must have a compact size to be hydrodynamically transparent [87], which clearly restricts the dimensions of the embedded electronics and the associated computational power. Therefore, the control law should be able to deal with a challenging control task, even in the face of restricted computational resources.At this point, the framework discussed in the previous section is employed in the design of an intelligent depth controller for an autonomous diving agent. Autonomous diving agents are very representative of modern intelligent mechatronic systems since they should be able to present real-time learning in order to regulate their depth even considering all uncertainties and perturbations related to the underwater environment. This framework has been also successfully applied to the accurate position tracking of electrohydraulic servomechanism [89].The adopted microrobot is a revised and improved version of the agent introduced in [49] and was developed at the Institute of Mechanics and Ocean Engineering at Hamburg University of Technology [90]. The microdiving agent and its main components are presented in Figure 2. It is equipped with a Teensy 3.2 microcontroller board, an MS5803-01BA variometer to estimate the depth, two M24M02-DR EEPROM chips, a 3.7 V lithium polymer round cell battery with 1200 mAh, and an ESP8266 WiFi module for out-of-water communication purposes.Figure 2
Microdiving agent and its main components.
(a)
Assembled system (b)
Inside view (c)
Actuation mechanismThe diving agent is able to adjust its depth by regulating the displaced volume, which can be obtained by means of the actuation mechanism depicted in Figure2(c). The actuation mechanism is composed by a rack/pinion mechanism, a Faulhaber AM1020-V-3-16 stepper motor with a planetary gear (256:1), and a roller diaphragm. By driving the pinion gear with the stepper motor; the rack displaces the roller diaphragm and changes the volume of the chamber and its net buoyancy force τ. Considering that, due to constructive aspects, the actuation angle θ of the stepper motor is restricted to 0∘≤θ≤130∘ and the net buoyancy force τ related to θ can be estimated according to(1)τ=-ρg∇=ρgADhmaxθmax-2θ4irpθmax,with ρ the water density, g the gravitational acceleration, ∇ the displaced volume, AD=7.07×10-4m2 the area of the roller diaphragm, hmax=0.04 m the maximum stroke of the rack, irp=256 the rack/pinion transmission ratio, and θmax=2.27 rad (≈130∘) the maximum angular displacement of the stepper motor. For more details concerning the diving agent see [91].


### 3.1. System Dynamics

The dynamic behavior of an underwater agent must consider both rigid body effects and its interaction with the water, as well as the actuator dynamics. The Navier-Stokes equations might be adopted to represent the fluid-rigid body interaction, but it would be infeasible for real-time control. In order to overcome this problem, we choose to adopt the standard lumped parameters approach [92]. Thus, the vertical motion of the diving agent can be described as follows:(2)mtz¨+cz˙z˙=τ,where mt=m+ma stands for the mass of the agent plus the hydrodynamic added mass, z represents the depth position, with the z-axis pointing downwards, and c is the coefficient of the hydrodynamic quadratic damping.Considering that the actuator dynamics should not be neglected [49], a first-order low pass filter is used to describe its behavior(3)τ˙=-ατ-u,where u is the control signal and α is a strictly positive parameter concerning the filter time constant.Equations (2) and (3) allow the intelligent controller to be numerically evaluated, prior to its implementation in the real diving agent.


### 3.2. Intelligent Controller

With the view to design the intelligent control scheme, only the dynamical effects that can be rigorously computed in a straightforward manner are taken into consideration. All terms in (2), whose coefficients have to be experimentally estimated and are subject to variations in time, are considered as model uncertainties and neglected in the design of the control law. Thus, for control purposes, (3) is combined with the time derivative of mz¨=τ, leading to a third-order differential equation:(4)mz⃛=αu-τ+d,where d stands for the neglected hydrodynamic effects and external disturbances that may occur.The distinction between the scopes of the two mathematical models should be stressed: while (2) and (3) are adopted to simulate the dynamics of the agent in numerical studies, (4) is considered in the design of the controller that is used in both numerical and experimental evaluations.The control task is to ensure that the state vectorz=zz˙z¨⊤ will follow a desired reference zd=zdz˙dz¨d⊤, even in the presence of modeling inaccuracies. At this point, the sliding mode method is invoked to comply with the required robustness and to accommodate the prior knowledge about the plant. Hence, a sliding manifold is established in the state space:(5)σz~=z~¨+2λz~˙+λ2z~=0,where z~=z~z~˙z~¨⊤=z-zdz˙-z˙dz¨-z¨d⊤ is the error vector and λ is a strictly positive constant.In order to avoid the undesirable chattering effects, the standard relay term,sgn⁡σ, is smoothed out by means of a saturation function(6)sat⁡σϕ=sgn⁡σifσϕ≥1,σϕifσϕ<1,where ϕ is a positive parameter that represents the width of the resulting boundary layer that neighbors the sliding manifold. In addition, the control law is designed to ensure the attractiveness of the boundary layer:(7)u=α-1ατ+mz⃛d-2λz~¨-λ2z~˙-d^-κsat⁡σϕ,with κ representing the control gain and d^ standing for an estimate of d.Considering that artificial neural networks can be used as universal approximators [66], a single hidden layer network is adopted to estimate the neglected dynamical effects. Furthermore, artificial neural networks have the capacity to fulfill the required learning features.In order to avoid the issues related to the curse of dimensionality [93], this work considers only the switching variable in the input layer(8)d^=w⊤φσ,where w=w1w2…wn⊤ is the weight vector, φ(σ)=φ1φ2…φn⊤ represents the vector with the activation functions φi, i=1,…,n, and n is the total number of neurons in the hidden layer. The adopted layout for the single hidden layer network is depicted in Figure 3.Figure 3
Single hidden layer network.It should be noted that if the three state errors (z~, z~˙, z~¨) have been adopted as input, instead of a single switching variable σ, the computational complexity of the neural network would exponentially grow from n to n3.Now, the boundedness and the convergence properties of the closed-loop signals are investigated by means of a Lyapunov-like stability analysis. Thus, let a positive-definite functionV be defined as(9)Vt=12σ2+12νϵ⊤ϵ,where ν is a strictly positive constant and ϵ=w-w¯, with w¯ being the optimal weight vector that minimizes the approximation error ε=d-w¯⊤φ.Considering thatϵ˙=w˙, the time derivative of V is(10)V˙t=σσ˙+ν-1ϵ⊤w˙=z⃛-z⃛d+2λz~¨+λ2z~˙σ+ν-1ϵ⊤w˙=m-1αu-ατ+d-z⃛d+2λz~¨+λ2z~˙σ+ν-1ϵ⊤w˙.By applying the control law (7) to (10), V˙ becomes(11)V˙t=-m-1d^-d+κsat⁡σϕσ+ν-1ϵ⊤w˙=-m-1d^-ε-w¯⊤φ+κsat⁡σϕσ+ν-1ϵ⊤w˙=-m-1ϵ⊤φ-ε+κsat⁡σϕσ+ν-1ϵ⊤w˙=-m-1κsat⁡σϕ-εσ+ν-1ϵ⊤w˙-m-1νφσ.Since bothm and ν are strictly positive parameters, they can be combined into a single adaptation rate η=m-1ν.Hence, by updatingw according to(12)w˙=ηφσ,the time derivative of V becomes(13)V˙t=-m-1κsat⁡σϕ-εσ.If the control gain is defined according toκ>ϑ+ε, with ϑ being a strictly positive constant, it follows from (6) that outside the boundary layer, i.e., when σ/ϕ≥1, V˙ becomes(14)V˙t=-m-1κsgn⁡σ-εσ≤-m-1ϑσ.Integrating both sides of (14) yields(15)limt→∞⁡∫0tm-1ϑσdξ≤limt→∞⁡V0-Vt≤V0<∞.Since the absolute value function is uniformly continuous, it follows from Barbalat’s lemma [41] that the proposed intelligent controller ensures the convergence of the tracking error to the boundary layer.Moreover, considering that|σ/ϕ|<1 may be rewritten as -ϕ≤σ(z~)≤ϕ, it can be verified that, inside the boundary layer, one has(16)-ϕ≤z~¨+2λz~˙+λ2z~≤ϕ.Multiplying (16) by eλt, one get(17)-ϕeλt≤d2dt2z~eλt≤ϕeλt.Integrating (17) between 0 and t gives(18)-ϕλeλt+ϕλ≤ddtz~eλt-ddtz~eλtt=0≤ϕλeλt-ϕλ,or conveniently rewritten as(19)-ϕλeλt-ζ1≤ddtz~eλt≤ϕλeλt+ζ1,with ζ1=ϕ/λ+z~˙(0)+λz~(0) being a constant value.Integrating (19) between 0 and t yields(20)-ϕλ2eλt-ζ1t-ζ0≤z~eλt≤ϕλ2eλt+ζ1t+ζ0,with ζ0=ϕ/λ2+z~(0) also being a constant value.Dividing (20) by eλt, it can be verified, for t→∞, that(21)-ϕλ2≤z~≤ϕλ2.By imposing (21) to (19) and dividing it by eλt, it follows, for t→∞, that(22)-2ϕλ≤z~˙≤2ϕλ.Furthermore, applying (21) and (22) to (16) gives(23)-6ϕ≤z~¨≤6ϕ.Therefore, the intelligent controller defined by (7), (8), and (12) ensures the exponential convergence of the tracking error to the closed region Z={z~∈R3||z~(i)|≤(i+1)!λi-2ϕ,i=0,1,2}.It is important to note that the adopted approach is in total agreement with the framework proposed for intelligent control. The control law (7) not only yields the required robustness, but also accommodates both prior and acquired information.A priori knowledge is provided by (4), which represents our knowledge on the plant during the design phase. Equation (8), on the other hand, givesa posteriori knowledge, which stands for everything that is learned online by means of the interaction with the environment. Finally, (12) enables the controller to adapt itself online by adjusting the weights of the neural network. The online nature of the proposed adaptation law motivates the adoption of locally supported activation functions, in order to ensure the retention of learned experiences [94]. The block diagram of the proposed intelligent controller is presented in Figure 4.Figure 4
Block diagram of the intelligent controller.


## 3.1. System Dynamics

The dynamic behavior of an underwater agent must consider both rigid body effects and its interaction with the water, as well as the actuator dynamics. The Navier-Stokes equations might be adopted to represent the fluid-rigid body interaction, but it would be infeasible for real-time control. In order to overcome this problem, we choose to adopt the standard lumped parameters approach [92]. Thus, the vertical motion of the diving agent can be described as follows:(2)mtz¨+cz˙z˙=τ,where mt=m+ma stands for the mass of the agent plus the hydrodynamic added mass, z represents the depth position, with the z-axis pointing downwards, and c is the coefficient of the hydrodynamic quadratic damping.Considering that the actuator dynamics should not be neglected [49], a first-order low pass filter is used to describe its behavior(3)τ˙=-ατ-u,where u is the control signal and α is a strictly positive parameter concerning the filter time constant.Equations (2) and (3) allow the intelligent controller to be numerically evaluated, prior to its implementation in the real diving agent.


## 3.2. Intelligent Controller

With the view to design the intelligent control scheme, only the dynamical effects that can be rigorously computed in a straightforward manner are taken into consideration. All terms in (2), whose coefficients have to be experimentally estimated and are subject to variations in time, are considered as model uncertainties and neglected in the design of the control law. Thus, for control purposes, (3) is combined with the time derivative of mz¨=τ, leading to a third-order differential equation:(4)mz⃛=αu-τ+d,where d stands for the neglected hydrodynamic effects and external disturbances that may occur.The distinction between the scopes of the two mathematical models should be stressed: while (2) and (3) are adopted to simulate the dynamics of the agent in numerical studies, (4) is considered in the design of the controller that is used in both numerical and experimental evaluations.The control task is to ensure that the state vectorz=zz˙z¨⊤ will follow a desired reference zd=zdz˙dz¨d⊤, even in the presence of modeling inaccuracies. At this point, the sliding mode method is invoked to comply with the required robustness and to accommodate the prior knowledge about the plant. Hence, a sliding manifold is established in the state space:(5)σz~=z~¨+2λz~˙+λ2z~=0,where z~=z~z~˙z~¨⊤=z-zdz˙-z˙dz¨-z¨d⊤ is the error vector and λ is a strictly positive constant.In order to avoid the undesirable chattering effects, the standard relay term,sgn⁡σ, is smoothed out by means of a saturation function(6)sat⁡σϕ=sgn⁡σifσϕ≥1,σϕifσϕ<1,where ϕ is a positive parameter that represents the width of the resulting boundary layer that neighbors the sliding manifold. In addition, the control law is designed to ensure the attractiveness of the boundary layer:(7)u=α-1ατ+mz⃛d-2λz~¨-λ2z~˙-d^-κsat⁡σϕ,with κ representing the control gain and d^ standing for an estimate of d.Considering that artificial neural networks can be used as universal approximators [66], a single hidden layer network is adopted to estimate the neglected dynamical effects. Furthermore, artificial neural networks have the capacity to fulfill the required learning features.In order to avoid the issues related to the curse of dimensionality [93], this work considers only the switching variable in the input layer(8)d^=w⊤φσ,where w=w1w2…wn⊤ is the weight vector, φ(σ)=φ1φ2…φn⊤ represents the vector with the activation functions φi, i=1,…,n, and n is the total number of neurons in the hidden layer. The adopted layout for the single hidden layer network is depicted in Figure 3.Figure 3
Single hidden layer network.It should be noted that if the three state errors (z~, z~˙, z~¨) have been adopted as input, instead of a single switching variable σ, the computational complexity of the neural network would exponentially grow from n to n3.Now, the boundedness and the convergence properties of the closed-loop signals are investigated by means of a Lyapunov-like stability analysis. Thus, let a positive-definite functionV be defined as(9)Vt=12σ2+12νϵ⊤ϵ,where ν is a strictly positive constant and ϵ=w-w¯, with w¯ being the optimal weight vector that minimizes the approximation error ε=d-w¯⊤φ.Considering thatϵ˙=w˙, the time derivative of V is(10)V˙t=σσ˙+ν-1ϵ⊤w˙=z⃛-z⃛d+2λz~¨+λ2z~˙σ+ν-1ϵ⊤w˙=m-1αu-ατ+d-z⃛d+2λz~¨+λ2z~˙σ+ν-1ϵ⊤w˙.By applying the control law (7) to (10), V˙ becomes(11)V˙t=-m-1d^-d+κsat⁡σϕσ+ν-1ϵ⊤w˙=-m-1d^-ε-w¯⊤φ+κsat⁡σϕσ+ν-1ϵ⊤w˙=-m-1ϵ⊤φ-ε+κsat⁡σϕσ+ν-1ϵ⊤w˙=-m-1κsat⁡σϕ-εσ+ν-1ϵ⊤w˙-m-1νφσ.Since bothm and ν are strictly positive parameters, they can be combined into a single adaptation rate η=m-1ν.Hence, by updatingw according to(12)w˙=ηφσ,the time derivative of V becomes(13)V˙t=-m-1κsat⁡σϕ-εσ.If the control gain is defined according toκ>ϑ+ε, with ϑ being a strictly positive constant, it follows from (6) that outside the boundary layer, i.e., when σ/ϕ≥1, V˙ becomes(14)V˙t=-m-1κsgn⁡σ-εσ≤-m-1ϑσ.Integrating both sides of (14) yields(15)limt→∞⁡∫0tm-1ϑσdξ≤limt→∞⁡V0-Vt≤V0<∞.Since the absolute value function is uniformly continuous, it follows from Barbalat’s lemma [41] that the proposed intelligent controller ensures the convergence of the tracking error to the boundary layer.Moreover, considering that|σ/ϕ|<1 may be rewritten as -ϕ≤σ(z~)≤ϕ, it can be verified that, inside the boundary layer, one has(16)-ϕ≤z~¨+2λz~˙+λ2z~≤ϕ.Multiplying (16) by eλt, one get(17)-ϕeλt≤d2dt2z~eλt≤ϕeλt.Integrating (17) between 0 and t gives(18)-ϕλeλt+ϕλ≤ddtz~eλt-ddtz~eλtt=0≤ϕλeλt-ϕλ,or conveniently rewritten as(19)-ϕλeλt-ζ1≤ddtz~eλt≤ϕλeλt+ζ1,with ζ1=ϕ/λ+z~˙(0)+λz~(0) being a constant value.Integrating (19) between 0 and t yields(20)-ϕλ2eλt-ζ1t-ζ0≤z~eλt≤ϕλ2eλt+ζ1t+ζ0,with ζ0=ϕ/λ2+z~(0) also being a constant value.Dividing (20) by eλt, it can be verified, for t→∞, that(21)-ϕλ2≤z~≤ϕλ2.By imposing (21) to (19) and dividing it by eλt, it follows, for t→∞, that(22)-2ϕλ≤z~˙≤2ϕλ.Furthermore, applying (21) and (22) to (16) gives(23)-6ϕ≤z~¨≤6ϕ.Therefore, the intelligent controller defined by (7), (8), and (12) ensures the exponential convergence of the tracking error to the closed region Z={z~∈R3||z~(i)|≤(i+1)!λi-2ϕ,i=0,1,2}.It is important to note that the adopted approach is in total agreement with the framework proposed for intelligent control. The control law (7) not only yields the required robustness, but also accommodates both prior and acquired information.A priori knowledge is provided by (4), which represents our knowledge on the plant during the design phase. Equation (8), on the other hand, givesa posteriori knowledge, which stands for everything that is learned online by means of the interaction with the environment. Finally, (12) enables the controller to adapt itself online by adjusting the weights of the neural network. The online nature of the proposed adaptation law motivates the adoption of locally supported activation functions, in order to ensure the retention of learned experiences [94]. The block diagram of the proposed intelligent controller is presented in Figure 4.Figure 4
Block diagram of the intelligent controller.


## 4. Numerical and Experimental Results

The efficacy of the proposed control scheme is now evaluated by means of both numerical and experimental investigations.


### 4.1. Numerical Studies

In order to simulate the dynamic behavior of the diving agent, the fourth-order Runge-Kutta method is employed for time integration. The sampling rates are 1 kHz for the control system and 10 kHz for the dynamical model. Model parameters are assumed asm=0.38 kg, ma=0.07 kg, c=0.1 N m2/s2, and α=20 Hz. Control parameters are set to λ=0.4, κ=0.1, and ϕ=2. It should be noted that, according to (7), neither the added hydrodynamic mass nor the quadratic damping is taken into account in the control law. In this case, both hydrodynamic effects are considered as modeling inaccuracies.Regarding the adopted neural network, the weight vector is initialized asw=0 and updated at each iteration step according to (12). The adaptation rate is initially set to η=1. As depicted in Figure 5, two different types of locally supported activation functions are here taken into consideration: Gaussian and Triangular. In both cases, seven neurons are adopted in the hidden layer. The center of each neuron is defined in accordance with the width of the boundary layer.Figure 5
Adopted activation functions.
(a)
Gaussian type (b)
Triangular typeIn order to demonstrate the robustness of the proposed intelligent scheme against modeling imprecisions, as well as its almost indifference to the chosen neuron type, the controller is implemented with both Gaussian and Triangular activation functions. The diving agent is released on the surface and should dive to a depth ofzd=0.5 m. The obtained results are presented in Figure 6. With the view to facilitate the comparison with the experimental results, the control action is already presented by means of the actuation angle, which is computed according to (1).Figure 6
Depth regulation with both Gaussian and Triangular activation functions,η=1.
(a)
Obtained depth (b)
Control actionAs observed in Figure6, the performance associated with the two different types of neurons is quite similar. The Gaussian type allows the agent to dive a little faster (see Figure 6(a)), but at the cost of a slightly larger control action at the very beginning (see Figure 6(b)). In both cases, the controller is able to drive the agent to the desired depth, regardless of the presence of structured and unstructured uncertainties, respectively. It is important to note that, by setting w initially to zero, the neural network has no prior knowledge about the plant and should learn online and from scratch how to compensate for modeling inaccuracies.The relevance of the ability to learn can be highlighted by confronting the proposed intelligent approach with an adaptive sliding mode controller. For comparison purposes, the intelligent scheme can be easily converted to a purely adaptive law by adopting a single neuron in the hidden layer and defining its activation function according toφ=1. Thus, by evoking the Euler method, the purely adaptive scheme becomes d^k+1←d^k+ησΔt, with Δt being the sampling period of the controller, d^k standing for the estimation at the k-th iteration step, and d^0=0. Figures 7 and 8 present the results obtained, respectively, with η=1 and η=5, for both intelligent and adaptive controllers. Gaussian activation functions are taken into account within the intelligent approach.Figure 7
Depth regulation with both adaptive and intelligent schemes,η=1.
(a)
Obtained depth (b)
Control actionFigure 8
Depth regulation with both adaptive and intelligent schemes,η=5.
(a)
Obtained depth (b)
Control actionBy inspecting Figures7 and 8, it can be verified that a merely adaptive scheme does not represent the most suitable choice to cope with unstructured uncertainties. Regardless of the adopted adaptation rate, η=1 or η=5, the intelligent controller is able to stabilize the agent at the desired depth, Figures 7(a) and 8(a), with smooth control actions, Figures 7(b) and 8(b). The adaptive sliding mode controller, however, presents an impaired performance for η=1, Figure 7(a), even considering the successive attempts of the stepper motor to regulate the displaced volume, Figure 7(b). Moreover, it should be made clear that the inability of the adaptive control law is not a mere matter of parameter settings. Figure 8 shows that the increase in the adaptation rate to η=5 can improve the capacity of the purely adaptive scheme to stabilize the agent, but at the cost of a prohibitive control action. The high control activity related to the adaptive scheme (see Figure 8(b)) would lead to excessive power consumption by the stepper motor, which would compromise the agent’s battery resources. In addition, repeatedly applied loads may induce mechanical failures due to fatigue.The power consumption related to each control scheme can be estimated by means of the angular velocity of the motor. Considering that the rotational energy at the motor shaft is proportional to its squared angular velocity, the total energy spent can be estimated according to(24)E=∫0tendθ˙2dt.Table1 presents the energy expenditure for the adaptive and intelligent controllers, respectively, Eada and Eint, associated with the adaptation rates evaluated in Figures 7 and 8.Table 1
Energy expenditure for both adaptive and intelligent controllers.
E a d a E i n t Eada/Eint η = 1 (Figure 7) 28.45 0.50 56.90 η = 5 (Figure 8) 227.24 1.40 162.31According to Table1, the intelligent approach is much more efficient than the merely adaptive scheme. When compared with the intelligent scheme, the energy spent with the adaptive controller is almost sixty times greater for η=1 and more than a hundred and sixty times greater for for η=5. This is because the adaptive control law lacks the ability to learn from past experiences and needs to constantly adjust itself. The intelligent scheme, on the other hand, has the capacity to accommodate knowledge, by approximating the modeling inaccuracies as a function of sigma. On this basis, the proposed intelligent controller learns, through the iterations, how to properly compensate for uncertainties as a function of the distance between the state errors and the sliding manifold. The convergence of the neural network according to the iteration step is shown in Figure 9.Figure 9
Convergence of the neural network with respect to the number of iterations,η=5.Considering that the controller has a sampling rate of 1 kHz, it can be verified in Figure9 that after 5 seconds, i.e., 5000 iterations, the output of the neural network converges to a function of the sliding variable σ.


### 4.2. Experimental Validation

Now, the intelligent controller defined by (7), (8), and (12) is experimentally evaluated. The control scheme was implemented in the Teensy 3.2 microcontroller board, following a procedural programming paradigm in C++. The main loop runs at 40 Hz and consists of pressure and temperature sensor queries for determining water depth, which in turn is used to provide feedback for control command computations and stepper motor actuation. Data is stored in EEPROM and gathered after each experiment using the WiFi module. All trials were carried out in the wave tank of the Institute of Mechanics and Ocean Engineering, Hamburg University of Technology (Figure 10).Figure 10
Wave tank at the Institute of Mechanics and Ocean Engineering, Hamburg University of Technology.Since the proposed scheme requires the knowledge not only of the depth but also of the depths first and second time derivatives, state observers have to be implemented. Considering their appealing finite time convergence property [57], sliding mode observers have been adopted to estimate both diving velocity and diving acceleration. Hence, following Shtessel et al. [57], the estimated state x^2 can be obtained from a known input signal x1 according to(25)x^˙1=-μsat⁡x^1-x1ψ,(26)x^˙2=-γx^2+μsat⁡x^1-x1ψ,where γ, μ, and ψ are strictly positive parameters.Here, a cascade implementation of (25) and (26) is used to estimate z˙ and z¨ by means of the measured depth z. The choice of the observer parameters is straightforward and follows [90]: γ=5, μ=2.5, and ψ=0.5. Gerrit [90] evaluates the influence of the parameters on both estimation performance and convergence time of the observer, confirming its robustness to parameter variations and suitability to the microdiving agent. All control parameters are considered as before. Figure 11 shows the experimental evaluation of the proposed intelligent controller for the depth regulation at zd=0.5 m.Figure 11
Experimental depth regulation with the intelligent controller,η=5.
(a)
Measured depth (b)
Control actionAs observed in Figure11, the intelligent controller is able to stabilize the diving agent at the desired depth with a smooth control action that does not compromise neither the integrity of its mechanical components, nor the battery capacity.At this point, in order to demonstrate the ability of the proposed intelligent scheme to allow not only depth regulation but also trajectory tracking, the diving agent is set to follow a sinusoidal depth profile. This is a very useful feature for a sensor platform that is intended to monitor environmental values in a liquid column. Figure12 presents the experimentally obtained results.Figure 12
Experimental depth tracking with the intelligent controller,η=5.
(a)
Measured depth (b)
Control action (c)
Estimated velocity (d)
Estimated accelerationBy appraising Figure12, it can be ascertained that the intelligent controller allows the diving agent to track the desired trajectory, even considering that the initial states and the initial desired states do not match, z(0)≠zd(0). Moreover, as observed in Figure 12(b), the control action remains smooth throughout the tracking. Regarding the adopted sliding mode observer, it can be verified that velocities and accelerations, respectively (Figures 12(c) and 12(d)), are estimated with good confidence. Due to the double differentiation process related to the cascade implementation, the estimated acceleration signal becomes slightly noisy (Figure 12(d)). Even though, notwithstanding the presence of noisy signals, the proposed controller is able to track the reference (Figure 12(a)), without harming the smoothness of the control signal (Figure 12(b)).It should be emphasized that the designed intelligent depth controller represents an important improvement over our recently proposed scheme, which is discussed in [49]. By means of the combination of sliding mode control with artificial neural networks, the new intelligent depth controller’s contribution is twofold: it provides robustness and enhances the learning capacities of the diving agent.Finally, a self-organizing mechanism might also be implemented to automatically set the architecture of the neural network. However, despite an eventual improvement in tracking performance, this would certainly increase the computational requirements of the embedded electronics. Thus, in order to avoid compromising the implementation in embedded systems, the trade-off between computational costs and performance improvement must be taken into account during the design phase of the mechatronic system.


## 4.1. Numerical Studies

In order to simulate the dynamic behavior of the diving agent, the fourth-order Runge-Kutta method is employed for time integration. The sampling rates are 1 kHz for the control system and 10 kHz for the dynamical model. Model parameters are assumed asm=0.38 kg, ma=0.07 kg, c=0.1 N m2/s2, and α=20 Hz. Control parameters are set to λ=0.4, κ=0.1, and ϕ=2. It should be noted that, according to (7), neither the added hydrodynamic mass nor the quadratic damping is taken into account in the control law. In this case, both hydrodynamic effects are considered as modeling inaccuracies.Regarding the adopted neural network, the weight vector is initialized asw=0 and updated at each iteration step according to (12). The adaptation rate is initially set to η=1. As depicted in Figure 5, two different types of locally supported activation functions are here taken into consideration: Gaussian and Triangular. In both cases, seven neurons are adopted in the hidden layer. The center of each neuron is defined in accordance with the width of the boundary layer.Figure 5
Adopted activation functions.
(a)
Gaussian type (b)
Triangular typeIn order to demonstrate the robustness of the proposed intelligent scheme against modeling imprecisions, as well as its almost indifference to the chosen neuron type, the controller is implemented with both Gaussian and Triangular activation functions. The diving agent is released on the surface and should dive to a depth ofzd=0.5 m. The obtained results are presented in Figure 6. With the view to facilitate the comparison with the experimental results, the control action is already presented by means of the actuation angle, which is computed according to (1).Figure 6
Depth regulation with both Gaussian and Triangular activation functions,η=1.
(a)
Obtained depth (b)
Control actionAs observed in Figure6, the performance associated with the two different types of neurons is quite similar. The Gaussian type allows the agent to dive a little faster (see Figure 6(a)), but at the cost of a slightly larger control action at the very beginning (see Figure 6(b)). In both cases, the controller is able to drive the agent to the desired depth, regardless of the presence of structured and unstructured uncertainties, respectively. It is important to note that, by setting w initially to zero, the neural network has no prior knowledge about the plant and should learn online and from scratch how to compensate for modeling inaccuracies.The relevance of the ability to learn can be highlighted by confronting the proposed intelligent approach with an adaptive sliding mode controller. For comparison purposes, the intelligent scheme can be easily converted to a purely adaptive law by adopting a single neuron in the hidden layer and defining its activation function according toφ=1. Thus, by evoking the Euler method, the purely adaptive scheme becomes d^k+1←d^k+ησΔt, with Δt being the sampling period of the controller, d^k standing for the estimation at the k-th iteration step, and d^0=0. Figures 7 and 8 present the results obtained, respectively, with η=1 and η=5, for both intelligent and adaptive controllers. Gaussian activation functions are taken into account within the intelligent approach.Figure 7
Depth regulation with both adaptive and intelligent schemes,η=1.
(a)
Obtained depth (b)
Control actionFigure 8
Depth regulation with both adaptive and intelligent schemes,η=5.
(a)
Obtained depth (b)
Control actionBy inspecting Figures7 and 8, it can be verified that a merely adaptive scheme does not represent the most suitable choice to cope with unstructured uncertainties. Regardless of the adopted adaptation rate, η=1 or η=5, the intelligent controller is able to stabilize the agent at the desired depth, Figures 7(a) and 8(a), with smooth control actions, Figures 7(b) and 8(b). The adaptive sliding mode controller, however, presents an impaired performance for η=1, Figure 7(a), even considering the successive attempts of the stepper motor to regulate the displaced volume, Figure 7(b). Moreover, it should be made clear that the inability of the adaptive control law is not a mere matter of parameter settings. Figure 8 shows that the increase in the adaptation rate to η=5 can improve the capacity of the purely adaptive scheme to stabilize the agent, but at the cost of a prohibitive control action. The high control activity related to the adaptive scheme (see Figure 8(b)) would lead to excessive power consumption by the stepper motor, which would compromise the agent’s battery resources. In addition, repeatedly applied loads may induce mechanical failures due to fatigue.The power consumption related to each control scheme can be estimated by means of the angular velocity of the motor. Considering that the rotational energy at the motor shaft is proportional to its squared angular velocity, the total energy spent can be estimated according to(24)E=∫0tendθ˙2dt.Table1 presents the energy expenditure for the adaptive and intelligent controllers, respectively, Eada and Eint, associated with the adaptation rates evaluated in Figures 7 and 8.Table 1
Energy expenditure for both adaptive and intelligent controllers.
E a d a E i n t Eada/Eint η = 1 (Figure 7) 28.45 0.50 56.90 η = 5 (Figure 8) 227.24 1.40 162.31According to Table1, the intelligent approach is much more efficient than the merely adaptive scheme. When compared with the intelligent scheme, the energy spent with the adaptive controller is almost sixty times greater for η=1 and more than a hundred and sixty times greater for for η=5. This is because the adaptive control law lacks the ability to learn from past experiences and needs to constantly adjust itself. The intelligent scheme, on the other hand, has the capacity to accommodate knowledge, by approximating the modeling inaccuracies as a function of sigma. On this basis, the proposed intelligent controller learns, through the iterations, how to properly compensate for uncertainties as a function of the distance between the state errors and the sliding manifold. The convergence of the neural network according to the iteration step is shown in Figure 9.Figure 9
Convergence of the neural network with respect to the number of iterations,η=5.Considering that the controller has a sampling rate of 1 kHz, it can be verified in Figure9 that after 5 seconds, i.e., 5000 iterations, the output of the neural network converges to a function of the sliding variable σ.


## 4.2. Experimental Validation

Now, the intelligent controller defined by (7), (8), and (12) is experimentally evaluated. The control scheme was implemented in the Teensy 3.2 microcontroller board, following a procedural programming paradigm in C++. The main loop runs at 40 Hz and consists of pressure and temperature sensor queries for determining water depth, which in turn is used to provide feedback for control command computations and stepper motor actuation. Data is stored in EEPROM and gathered after each experiment using the WiFi module. All trials were carried out in the wave tank of the Institute of Mechanics and Ocean Engineering, Hamburg University of Technology (Figure 10).Figure 10
Wave tank at the Institute of Mechanics and Ocean Engineering, Hamburg University of Technology.Since the proposed scheme requires the knowledge not only of the depth but also of the depths first and second time derivatives, state observers have to be implemented. Considering their appealing finite time convergence property [57], sliding mode observers have been adopted to estimate both diving velocity and diving acceleration. Hence, following Shtessel et al. [57], the estimated state x^2 can be obtained from a known input signal x1 according to(25)x^˙1=-μsat⁡x^1-x1ψ,(26)x^˙2=-γx^2+μsat⁡x^1-x1ψ,where γ, μ, and ψ are strictly positive parameters.Here, a cascade implementation of (25) and (26) is used to estimate z˙ and z¨ by means of the measured depth z. The choice of the observer parameters is straightforward and follows [90]: γ=5, μ=2.5, and ψ=0.5. Gerrit [90] evaluates the influence of the parameters on both estimation performance and convergence time of the observer, confirming its robustness to parameter variations and suitability to the microdiving agent. All control parameters are considered as before. Figure 11 shows the experimental evaluation of the proposed intelligent controller for the depth regulation at zd=0.5 m.Figure 11
Experimental depth regulation with the intelligent controller,η=5.
(a)
Measured depth (b)
Control actionAs observed in Figure11, the intelligent controller is able to stabilize the diving agent at the desired depth with a smooth control action that does not compromise neither the integrity of its mechanical components, nor the battery capacity.At this point, in order to demonstrate the ability of the proposed intelligent scheme to allow not only depth regulation but also trajectory tracking, the diving agent is set to follow a sinusoidal depth profile. This is a very useful feature for a sensor platform that is intended to monitor environmental values in a liquid column. Figure12 presents the experimentally obtained results.Figure 12
Experimental depth tracking with the intelligent controller,η=5.
(a)
Measured depth (b)
Control action (c)
Estimated velocity (d)
Estimated accelerationBy appraising Figure12, it can be ascertained that the intelligent controller allows the diving agent to track the desired trajectory, even considering that the initial states and the initial desired states do not match, z(0)≠zd(0). Moreover, as observed in Figure 12(b), the control action remains smooth throughout the tracking. Regarding the adopted sliding mode observer, it can be verified that velocities and accelerations, respectively (Figures 12(c) and 12(d)), are estimated with good confidence. Due to the double differentiation process related to the cascade implementation, the estimated acceleration signal becomes slightly noisy (Figure 12(d)). Even though, notwithstanding the presence of noisy signals, the proposed controller is able to track the reference (Figure 12(a)), without harming the smoothness of the control signal (Figure 12(b)).It should be emphasized that the designed intelligent depth controller represents an important improvement over our recently proposed scheme, which is discussed in [49]. By means of the combination of sliding mode control with artificial neural networks, the new intelligent depth controller’s contribution is twofold: it provides robustness and enhances the learning capacities of the diving agent.Finally, a self-organizing mechanism might also be implemented to automatically set the architecture of the neural network. However, despite an eventual improvement in tracking performance, this would certainly increase the computational requirements of the embedded electronics. Thus, in order to avoid compromising the implementation in embedded systems, the trade-off between computational costs and performance improvement must be taken into account during the design phase of the mechatronic system.


## 5. Concluding Remarks

In this work, a framework for the intelligent control of mechatronic systems is presented. We have shown that the intelligent controller derived from this framework is able to emulate the essential traits of natural intelligence, namely, robustness, prediction, adaptation, and learning. In order to comply with these required attributes, we propose the design of an intelligent approach by embedding a neural network within the boundary layer of a smooth sliding mode controller. Thereby, the sliding mode method provides a robust structure to accommodate botha priori anda posteriori knowledge. The introduction of a neural network with an online adaptation scheme allows the controller to learn by interacting with the environment, without the necessity of offline training. It should be emphasized that the adoption of only one input not only simplifies the resulting control law but also avoids the issues related to the curse of dimensionality. By keeping the complexity low, the control scheme is allowed to be employed within the limited embedded hardware of most common mechatronic systems. All these features have granted the proposed approach to be taken into consideration within the design of a new depth controller for a diving agent. By means of numerical and experimental results, it has been demonstrated that the designed control law can cope with a plant subject to large unstructured uncertainties, incomplete information, and noisy input signals. In view of the robustness, prediction, adaptation, and learning capacities, granted by the combination of artificial neural networks with sliding mode control, the resulting intelligent scheme provides a stronger improved tracking performance over a purely adaptive one and allows power consumption at about 98% lower.



---

*Source: 9648126-2018-12-30.xml*