Analytical Synthesis of Regulators for Nonlinear Systems with a Terminal State Method on Examples of Motion Control of a Wheeled Robot and a Vessel

The paper is devoted to several examples of control algorithm development for two-wheeled double-track robot and low-tonnage vessel-catamaran with two Azipods that show practical aspects of the application of one nonlinear system control method — terminal state method. This method, developed by the authors of the present paper, belongs to the class of methods for inverse dynamics problem solving. Mathematical models of control objects in the form of normal systems of third-order nonlinear differential equations for the wheeled robot and seventh-order ones for the vessel are presented. Design formulas of the method in general form for terminal and stabilizing controls are shown. A routine of obtaining calculation expressions for control actions is shown. Results of computer simulation of bringing the robot to a given point in a given time, as well as bringing the vessel to a given course during a “strong” maneuver, are described.


Introduction
Currently, ultimate nonlinear system modes often arise in control problems.In such cases, classical methods based on the linear automatic control theory are unusable.Due to it, more and more attention is being paid to the development and improvement of nonlinear system control methods.We can single out several approaches that gave rise to most nonlinear system control methods.They include methods of solving the inverse mechanics (dynamics) problem [1][2][3][4]; differential-geometric methods [5]; and methods based on artificial neural networks [6] and fuzzy logic [7].These approaches do not require preliminary linearization in the classical sense.Therefore, there is no need to specify reference modes for the system operation and subsequently pursue a composite control.One of the methods of the first group is a "terminal state method" (TSM) [4].Both the control objective and the system model are formulated via the "terminal state variables" (TSV) in it.These variables depend on two times (terminal   and current ) and on the current state ().
The TSV sense is the finite state of the uncontrolled system which is at the current moment  in the state ().The ability to solve control problems via the TSV is related to its obvious property (, , ()) = (), which is valid for any moments  ∈ [ 0 ,   ] of the system operation interval.The terminal state method is developed for various types of nonlinear systems: differential systems with smooth right sides; discrete in time and mixed; with state independent variable time delays; multi-index (discrete analogs of the distributed systems).The initial application area of the TSM was terminal problems on a finite time interval.Consecutive application of the TSM at short intervals allows solving adaptive control problems, including problems with reference models.In general, the calculation of TSM control requires significant computational costs.They are associated with the multiple numerical integration of differential equations to evaluate the TSV and nonlinear (according to V.M. Alekseev) transition matrices as functions of the second argument (in the continuous case) or solutions of nonlinear systems of finite type equations (in discrete cases).There are, however, problems in which the control evaluation is performed by sufficiently simple finite type expressions that are easily realized in practice.
The paper is devoted to the questions of practical application of the method under discussion in cases when TSMcontrol calculations are rather simple.So are the terminal problem of bringing a two-wheeled double-track mobile robot to a given point and the problem of bringing the vessel at a given heading angle.Herewith, it is required to ensure the possibility of pursuing the so-called "strong" vessel maneuvers.These are, for instance, maneuvers with a large angle of deviation of the steering components (in this paper, Azipod).
Two-wheeled two-track robots are employed as amphibious platforms for observation and measurement.For example, a similar robot with crawler is proposed in [8] to be used, in particular, for monitoring underwater cables.
A mathematical model of a two-wheeled double-track robot is given in paper [9], and an algorithm for its terminal control based on the TSM is constructed in [4].Because of the robot mathematical model specificity, obtained algorithm is a set of algebraic relations.Control was implemented on real equipment -programmable robot Sparki by ArcBotics.It showed the algorithm efficiency in conditions when discrete time step in the control calculation is not less than 0.1s.Such step, combined with the algorithm relative complexity and the need to evaluate robot current position by the numbering method using its mathematical model, prompts the use of controls calculated at discrete moments [10].Herewith, the current state can be calculated with a small step, and the control with a large step.
The second problem being solved is a part of a larger problem, which is to develop a crew-free operation mode for a small-sized robotic research vessel designed for environmental monitoring of the marine coastal area.In this case, a version of TSM with stabilizing (tracking) type criterion was used.To keep the vessel on a previously specified route, it is necessary to control it in automatic mode so that in case of deviation from the route the vessel returns to the route.In this case, there may be situations (sudden obstacle avoidance, moving in narrow areas, etc.) when the vessel maneuver is performed at a large rudder angle or Azimuthing Electric Propulsion Drive (Azipod) rotation.Then vessel dynamics becomes nonlinear and therefore the appropriate control methods should be applied.In navigation such vessel maneuvers are called "strong".
The specifics of the problem to keep the vessel on a route and the vessel mathematical model limit the range of possible control methods appropriate for obtaining a solution.In particular, it refers to the nonlinear vessel model we have obtained [11].To solve the problem of vessel control during "strong" maneuvers, when model linearization is difficult, it is proposed, for example, to use methods [12,13].The essence of these inventions is the following.Firstly, control is pursued according to information from satellites and onboard measuring devices.Secondly, it is calculated with the use of "engineering" control signals generating methods, i.e., intuitively understandable algorithms that do not require vessel mathematical model using.Thus, for example, rudder deflection angle is calculated by numerical integration of the following differential equation [12]: where , ,  * ,  are, respectively, rudder angle, current course, given course, angular velocity of the ship's rotation around the center of mass;  1 ,  2 ,  3 are undetermined coefficients.
For bow maneuvering devices, it is proposed to use additionally the algorithm in the form of differential equation relative to the transverse control force [13]: Herewith algorithms of calculating anticipatory points are used.From these points precalculated program controls are pursued to turn the vessel to a new course.Conditions of the stabilization along a given course  * mode reverse activation are used as well.
A common drawback of these methods, as well as others based on the use of linear feedback from the state coordinates [14,15], is that they contain indeterminate coefficients that are unknown in advance and may depend on the operating conditions.To adapt to the operation conditions, principles of adaptive and intelligent control are used [16,17].To a lesser extent, such drawbacks are inherent in methods based on the use of control object mathematical models [18,19].
Often during the nonlinear system synthesis, methods of solving the inverse dynamics problem are used.These include, in particular, the input-output linearization method [1, 2], Batenko's method [3], and the terminal state method (TSM) [4].Method [1,2] is developed for solving the stabilization or tracking problems and is suitable for keeping the vessel on a given route.The other two methods [3,4] are terminal; i.e., they are designed to bring the system to a specified state at a given time.Their application to the vessel track-keeping control is possible when the system operation time is divided into small intervals, and then the terminal method is applied on each of these small intervals.

Terminal State Method for Terminal Differential Systems.
Terminal state method was developed to solve terminal control problems for nonlinear affine systems in the form of (3) with smooth criterion functions and dynamic constraints of various kinds (differential, delay differential, finite difference, etc.).
For differential systems with smooth constraints, criterion problem is formulated according to (3), (4).
According to this method, control (TSM control) is calculated by the following expressions: Obtained controls may be constrained by amplitude limitations, if necessary.Such constraints in the active state affect deviation from the given (e.g., exponential) form of the criterion function.At the same time, control goal-to achieve a given terminal state-is commonly accomplished.Sometimes, for the process of control to be sustainable, artificial imposition of restrictions is preferable.
In (5), terminal state variables (TSV)  and nonlinear transition matrix according to V.M. Alekseev (TM)  are used.They are defined by a joint system of differential equations [20]: where  is identity matrix.
It is important to realize that for calculations in (5), TSV and TM are required as functions of the second argument , and they are defined as functions of the first argument  for each of the  values by (6).

Terminal State Method for Differential System Stabilization Tasks.
For stabilization problems, the algorithm formed from ( 5), ( 6) is used at each of the short time intervals  +1 −   = ℎ = .
Then the criterion transforms to and instead of ( 6), simplified expressions obtained by linearizing ( 6) are used:

A Mathematical Model of a Two-Wheeled Double-Track
Mobile Robot.The robot model excluding the wheel drives dynamics description, i.e., its kinematic model, has the following form [10]: where  1 ,  2 are linear movements of the robot along the coordinate axes;   is the diameter of the first and second wheels;  1 ,  2 are the first and second wheels angular speeds of rotation (control actions);   is the distance between wheels.
The kinematic model defined by (9) actually coincides with the model from [16].The only difference between the models is that control actions in (9) have the form of robot wheels angular velocities, and in [16] the form of robot wheels linear velocities   ,   .Replacing linear velocities with expressions   = (  /2) 1 ,   = (  /2) 2 makes the model from [16] coincide with (9).
First of all, it should be noted that models of this type take place in the case of using stepper driving motors, as well as when using crawler propulsions.
Some features of this model are as follows: the right sides of its differential equations are independent from the state vector; controls  1 ,  2 are included linearly in the right sides with state dependent coefficients.The latter feature allows us to classify this model as affine (see below).

A Mathematical Model of a Vessel for Integrating Drives.
Mathematical model was obtained in [11] by the methods described in [21][22][23][24] assuming that the Azipod drives are of integrating type.In accordance with the problem formulation, vessel is controlled by rotating two Azipod units at the same angle  with given thrusts equal on both units: V1, V2, i.e., V1 = V2 = V.
Mathematical model has the form of ( 4), where the vessel state vector consists of seven components: Herewith, , ,  are, respectively, Azipod rotation angle, heading angle, vessel angular velocity relative to its center of mass;   ,   ,  1 ,  2 are, respectively, speeds and positions of the vessel center of mass along its longitudinal and transverse axes.The seventh component  ≡  7 that is a control action essentially, is included in vessel model equations not additively (see below).To transform the system to an affine form, its state vector is extended by one component  7 ≡  with a differential equation for the new state: where  is the new control action.Equation ( 11) describes a drive of integrating type.The transformed system of the seventh order, in accordance with the form (4) and extended state vector, has the following components.
Φ (, ) fl State functions ,   ,   ,   ,   ,  are defined in terms of variables  by the expressions [21]: In ( 12)- (19),  is the vessel resulting speed in the coordinate system associated with the vessel;   ,   are the vessel resistance forces in the longitudinal and transverse directions considering the two catamaran hulls and conversion of the force dimension from kilonewtons to newtons;   is approximated by the polynomial vessel resistance in kilonewtons dependent on the speed  (in  ⋅  −1 ), obtained by simulating vessel in the OpenFOAM software;  is the vessel length in meters;   ,   are the vessel weights, taking into account water added masses in longitudinal and transverse movements;  = 1025  ⋅  −3 is the sea water density.
Masses and moment of inertia from (12) are determined by the relations [21]: where   is the moment of inertia of the vessel;  is the weight draught (mass) of the vessel in kilograms.Coefficients of the added masses and moment are selected from the following ranges:  11 = 0.05 ÷ 0.15;  22 = 0.7 ÷ 1.2;  66 = 0.6 ÷ 1.3.For the considered vessel of small tonnage  = 155000 , the lower bounds of the mentioned coefficients were taken.

A Mathematical Model of a Vessel Considering Drives
Inertance.To obtain control formula considering Azipod drives dynamics instead of (11), we should use the following drive dynamics equation in the form of first order inertial link of (4): with a coefficient   , time constant   , and a control action V.
Equating right sides of ( 21) with the control  for the case when drives dynamics is not taken into account, results in Subsequently we obtain expression demonstrating dependence between the controls with and without assumption of the drive dynamics:

Terminal State Method Applications
4.1.Robot Control. A. Isidori's linearizing by input/output method [1] in Wei Wu's modification [2] and TSM [4] were used in [9] to bring robot to a given point at a given time.
Because of the specificity of the model described by ( 4), both methods led to the same algorithm: where () ≡ (()) is the criterion function that defines desired exponential trajectory with a time constant   .Differential equation for this function is the following: (24), (25) result from ( 5), ( 6) and the fact that TM  in this case is identity matrix on the entire period of the system's operation, since the uncontrolled system vector Φ is equal to zero according to (9).
The sense of criterion by ( 27) is that when the current state () converges to a given point  * , the value of the criterion function tends to the given value  * , which must obviously be equal to zero.This target may be unattainable by the control (24) that results in deviation of the actual behavior by (27) from the desired trajectory (25).The main reason for unattainability is that the scalar   nulls at some points or intervals of the time axis.Obviously, this fact causes unattainability, as control target does not meet the way it is being achieved along the trajectory according to (25).Another possible reason for the deviation of the actual trajectory from the given one is the amplitude constraints on the control actions that cannot be taken into account in the methods used.Thus, rotational speeds of the robot wheels are limited in amplitude by the   value: The output of the controls evaluated by ( 24) with constraints by (28) also distorts the form of the criterion function defined by (25).But still the criterion function decreases, converging to some minimally attainable value  * .Herewith attained value  * determines the accuracy of bringing state vector components to given values.
System of ( 9) is a nonlinear affine system of (4) with two control actions  1 ,  2 , where Φ is zero vector, and the components of the matrix  = {  },  = 1, 2, 3,  = 1, 2, are the following: In [9], the results of Mathcad modeling of the system of ( 9) with control by (24), criterion by ( 27 The same algorithm is implemented in the onboard C++ version of a real robot.As follows from the kinematic scheme, which is the basis for (9), there is a nonlinear dependence between the states of the system of (9).
Consequently, equations ( 9) are dependent.It means that during control by (24) implementation, specified values can be reached simultaneously for a pair of variables  1 , ( 1 ,  3 ) or for a pair  2 , ( 2 ,  3 ).As for the pair  1 ,  2 ( 1 ,  2 ), this target is generally unattainable.This is clear from (9) with other control actions: (31) The resulting system is From (32) it is clear that control V 2 affects only  3 , and control V 1 affects simultaneously  1 and  2 .If a certain value of  3 is reached at a selected value V 2 , then V 1 may be chosen for the known  3 , providing either a given  1 or given  2 .A pair of variables  1 ,  2 can simultaneously reach specified values  * 1 and  * 2 only if those values are agreed.However, it is more interesting to bring the robot to a given point  1 ,  2 at a given time from a practical point of view.Therefore, it is necessary to obtain a robot control variant, which takes (30) into account.
For this purpose, the control problem should be modified by assigning the other criterion function instead of (27).

𝐽 (𝑧 (𝑡
This function reflects the following control objective: bringing the coordinate  1 to a value  * 1 , and the coordinate  ≡  3 to such a value that will provide a value  * 2 according to (30).As movement trajectory of the robot is curvilinear, at each current moment the angle of convergence to the target is variable and is reckoned from the attained state.This explains the use of the differences under the sign of arctangent in (33).Algorithm (24) modification for the case of transforms to new expressions for (()) (33) instead of (27) and for the vector components: The latter are now much more complicated than in the case of criterion in the form of (27).This may be especially critical when implementing on the onboard robot controller, whose software does not include inverse trigonometric functions.Expressions for the components have the following form (we omit argument  for the sake of brevity): )) . (37) Control by (24) with criterion by (33) was verified by Mathcad modeling, in particular, for the case of  * 1 = 1.5 m,  * 2 = 0.8 m,   = 60 s, integration step ℎ = 0.001 s, 1 = 10, 3 = 1.The specified point is reached with a sufficiently high accuracy (1.488 m versus 1.5 m for  1 , and 0.784 m versus 0.8 m for  2 ).In other tried cases, the accuracy is approximately the same.Figures 1-3 show time dependencies graphs of coordinates and trajectory of the robot.
Figures 4 and 5 show time dependencies graphs of the robot control actions.

Heading Angle Control by Simultaneous Rotation of Two
Azipod Units at the Same Angle.For the denoted problem, criterion by ( 3) is specified in the form: It should be noted that we had to add a term containing  7 (Azipod rotation angle) to the criterion by (38), because without this term the TSM control cannot be obtained.The matrices from the system of ( 4) have the form of ( 12), (13).Applying ( 5), (6) to this case, we obtain the following:  For the case when the drive (integrating) inertia is not taken into account, we have Herewith, according to (23), where Φ 7 = 0 and  77 = 1.
The expression for the pseudoinverse matrix is the following: and the expression for TSV is As a result, we obtain the following expression for the control action at the integrating drive input: where   ≡   () are the state variables.Weights and parameter   are chosen depending on the goals of the system.
In the algorithm of (45), ℎ is the integration step of the differential equations;  6 ,  7 are the weight coefficients, and  7 <<  6 so that the control target (bringing the vessel path  6 to a given value  * 6 ) is not distorted.Since the value of Azipod rotation angle is not of interest,  * 7 can actually have any value.However, during the modeling process it was revealed that the algorithm stability depends on  7 and  * 7 values.The values for which algorithm of (45) stable operation is achieved in a wide range of operating conditions are  7 = 0,01 and  * 7 = 0,01 ⋅ sign  * .Because of the small value of the weight coefficient  7 , criterion by (38) in case of  * = 0 displays approximately the mentioned initial control target.To prevent the division by zero in (45), a small number  can be added to the denominator.A control amplitude limit can be set for this purpose as well.
Control by (23), where  is substituted by (45), leads to a given Azipod rotation angle in case of drive dynamics being considered.

Angular Velocity and Heading Angle Control by Simultaneous Rotation of Two Azipod Units to the Same Angle.
In contrast to the problem solved in the previous paragraph, now let us set the problem of controlling the vessel course by means of an implicit criterion: where  * 3 () =  * () is the specified behavior of the angular velocity.From the sixth equation of the system of ( 4), (12) for the heading angle  6 / =  3 , at a constant angular velocity  3 () =  =  * 3 ≡  * , it follows that The second expression of (47) determines the moment  * when the vessel reaches the given route  * 6 .Therefore, the time-varying master control  * 3 () is evaluated using a conditional expression written in the third line of (47) according to the rule: if the condition  <  * is true, then  * 3 () =  * ; otherwise  * 3 () = 0. To evaluate the control, we apply ( 5), ( 6 In accordance with (8) and taking into account the definition of Φ 3 from (12): the element  37 of transition matrix  is evaluated by the following expression: Then, for   = ( * 3 −  3 ( +1 ,   , (  )))/  , we get the following expression for control: Simulation showed that, in any case, for the vessel in question, instead of the latter formula, the simplified one can be used.This follows from the fact that Φ 3 (angular acceleration) has sufficiently small value and from the second relation of (51): In ( 51), (52) ℎ is a time step of the control values calculation;   is a given time constant of the exponential motion of a variable  3 () to a given value  * 3 according to the equation: Control by (23), where  is substituted by (51) or (52), depending on used control (original or simplified), will result in a given Azipod rotation angle in case of drive dynamics being considered.
Thus, two algorithms for bringing the vessel to a given course were obtained: by means of control by (45) and by means of controls by (47)-( 50), (51) or controls by (47)-(50), (52).The first approach is simpler in terms of the amount of calculations.Still it has low accuracy because its criterion in the form of (38) reflects an artificial target-bringing to the given values both the course and Azipod rotation angle.The second approach is more difficult to implement, but its target in the form of criterion by ( 46) and ( 47) is exactly the attainment of the given course  * ≡  * 6 .To achieve both simplicity and accuracy of computations, a composite algorithm is offered.This algorithm includes a "strong" maneuver through the control by (45).A "slight" maneuver for static error compensation is included through the control by (50), (52).In the latter case transition function  37 is calculated by the simplified formula for small Azipod rotation angles, when cos( 7 ) ≈ 1.
Applying composite algorithm makes sense in the case of using onboard controllers, intended to perform simple computational operations.This is of course not typical for the catamaran vessel in question.It is more relevant to ordinary small vessels intended for everyday purposes, for example, for cleaning leaves and relatively large debris from the water surface.
Simulation results in the form of the time  dependence of the vessel model coordinates are obtained by Mathcad modeling.The results are obtained for the model defined by ( 4), ( 12)-( 19) with correction by (21) using the control by ( 47 and  * 3 = 0.05 ⋅  −1 , corresponding to a slowed and accelerated vessel rotation at a given heading angle of 57.3 degrees ( * 6 = 1 ).A certain influence on the trajectory is also provided by the value of the free parameter   , on which transient period for angular velocity depends.Figure 9 shows how by increasing parameter   by a factor of twenty, a smoother vessel turn trajectory can be attained (compare with the trajectory in Figure 6 for  = 0.1 ).
Graphs shown in Figures 6-13 illustrate how the free parameters  * 3 (vessel angular velocity),  * 6 (specified heading angle), and   (speed parameter) affect the shape of the vessel trajectory.
We note that in all the cases presented, the control error is close to zero (in the simulation, the first significant digit is in fourth place after the decimal point).By control error, we mean the difference between specified and attained values of the course.Graphs in Figures 14 and 15 show the results of vessel motion simulation under the influence of composite control by (45), (52), (54).
Simulation was performed for two consecutive time intervals with a duration of 500 .During the first time interval, the vessel was controlled by algorithm of (45) with all zero initial conditions except speed   (0) = 4  ⋅  −1 .During the second time interval, the vessel was controlled by algorithm of (47), (52), (54).The initial conditions for the second interval were the values of all coordinates at the end of the first interval, except for  7 (0) = 0. From a technical point of view, this means that Azipod should be brought to the zero (neutral) position at the beginning of second interval.This peculiarity of composite control is connected with the fact that the algorithm of (47), (52), (54) does not contain a feedback from  7 .Therefore, the nonzero initial condition of this coordinate is ignored by the control algorithm.If the initial condition  7 (0) for the second interval is nonzero, an uncompensated static error is formed at the end of the process.
As can be seen from the graphs of Figures 14 and 15, vessel reached the heading angle of 3.051 radians under the influence of control by (45).Then the vessel made a turn of 3.14 radians to the set course under the influence of control by ( 52), (54).Herewith, the actual time of the turn is very short-it is about one minute (more precisely, 1193 steps with a duration of 0.05 seconds, that is, 59.65 seconds).
It is important to note that the control by (47), (52), (54) explicitly depends on the mass-dimensional and propulsion parameters of the vessel, as well as on parameters ℎ,   ,  * 3 ≡  * affecting the shape of the vessel track to the given course.This fact makes it possible to eliminate the problem of smoothing the trajectory (calculating anticipatory points, etc., proposed in [12]).
It should be noted that the results concerning vessel control adduced in this paper represent development of methods and algorithms published in [25], regarding a definite implementation of the composite algorithm and refinement of the methods of analytical synthesis of controls as well.A Mathcad program code simulating the vessel motion with a model in the form of ( 12)-( 19) and control by (52) is given in the mentioned paper.This program is easy to modify with (23) and composite control by (45), (52), (54) for the case of the Azipod inertial drive.

Conclusion
The practical aspects of using the author's nonlinear systems control method-terminal state method (TSM)-are discussed in the paper.Expressions for control calculating according to TSM with respect to terminal and stabilization (tracking) problems are presented.A special feature of the method is the use of terminal state variables (TSV), whose sense is the forecast of uncontrolled system final state, dependent on the current time and current state.Two examples of the method application are provided.The first one is a terminal state control of a two-wheeled doubletrack mobile robot.The second one is a control of the course of a small-capacity vessel-catamaran with Azipods during the "strong" maneuvers performing, i.e., maneuvers at large rudder angles.Two TSM algorithms are proposed for the course control.The first one is based on a quadratic criterion for deviations from a given course.The second one is based on the criterion for tracking the vessel angular velocity in relation to its center of mass.The first algorithm is proven to be simpler from a computational point of view, but gives a noticeable static error.The second algorithm is more complicated but has a zero static error.A composite algorithm, consisting of a consecutive implementation of the first and second algorithms, combines the advantages of both algorithms.Mathematical models of two control objects and expressions for control are presented.A routine of obtaining expressions for control actions is described.Results of computer simulation in the form of graphs of time dependencies for robot and vessel current coordinates, their trajectories, and robot control actions are shown.

Figure 1 :
Figure 1: Time dependence of the robot left wheel coordinate.

Figure 2 :Figure 3 :
Figure 2: Time dependence of the robot right wheel coordinate.

Figure 4 :Figure 5 :
Figure 4: Time dependence of the robot left wheel angular velocity (control action).