Comparing Methods of DC Motor Control for UUVs

: Adaptive and learning methods are proposed and compared to control DC motors actu-ating control surfaces of unmanned underwater vehicles. One type of adaption method referred to as model-following is based on algebraic design, and it is analyzed in conjunction with parameter estimation methods such as recursive least squares, extended least squares, and batch least squares. Another approach referred to as deterministic artificial intelligence uses the process dynamics defined by physics to control output to track a necessarily specified autonomous trajectory (sinusoidal versions implemented here). In addition, one instantiation of deterministic artificial intelligence uses 2-norm optimal feedback learning of parameters to modify the control signal, while another instantiation is presented with proportional plus derivative adaption. Model-following and deterministic artificial intelligence are simulated, and respective performance metrics for transient response and input tracking are evaluated and compared. Deterministic artificial intelligence outperformed the model-following approach in minimal peak transient value by a percent range of approximately 2–70%, but model-following achieved at least 29% less error in input tracking than deterministic artificial intelligence. This result is surprising and not in accordance with the recently published literature, and the explanation of the difference is theorized to be efficacy with discretized implementations.


Introduction
Adoption of computers and automation revolutionized manufacturing and optimization of the computerization is deemed to be continuing the revolution. Like the manufacture of DC motors, motor operations are also amidst revolutionary change. DC motors are commonplace mechanisms to actuate control surfaces and rotate propellors of unmanned underwater vehicles, as depicted in Figure 1. Example motors are depicted in Figure 2, where current is supplied to wires at one end of the motor and rotation is provided by the motor at the other end (as depicted). Control of the motor is a well-studied topic in the literature [1][2][3][4], culminating in a very recent publication of deterministic artificial intelligence used for motor control [5,6]. Motor control using neural networks was presented in [1][2][3], while indirect self-tuners were presented in [4], which were the basis for comparison of the recently presented method of deterministic artificial intelligence [5], where the prequel comparison to self-tuners is presented in [6] applied to DC motors for unmanned underwater vehicles.   [7] utilizing typically available DC motors [8,9].
This manuscript firstly seeks to validate the results of the recently proposed application of deterministic artificial intelligence [6] to a disparate motor to reveal the general efficacy of the methodology. Secondly, this manuscript evaluates the efficacy of the proposed approach in direct comparison to state-of-the-art methods: model-following methods with various methods of parameter estimation including batch least squares, recursive least squares, and extended least squares.

Literature Review
At the ancient age of 18 years old, Gauss developed the method of least squares in 1795, although Legendre is often credited with its development in 1805 [10] and subsequent (significant) expansion as stochastic methods [11,12] in the following years [13][14][15][16]. Gauss used the method to determine the motion of heavenly bodies about the sun in conic sections [10], subsequently focusing on errors of estimation and prediction fitting of linear relationships (mathematical models). Gauss's thinking helped establish one of the first international journals in the field of astronomy [13], founded in 1821 by the German astronomer Heinrich Christian Schumacher. It claims to be the oldest astronomical journal in the world that is still being published [14].
Legendre is credited with developing the least squares method to use only measurements to learn about natural processes.
To determine the orbit of a heavenly body, without any hypothetical assumption, from observations not embracing a great period of time, and not allowing the selection with a view to the application of special methods [15,16].
The least squares method forms the basis of estimation for several adaptive modeling methods described by Å ström and Wittenmark in [17][18][19] using the recursive forms compared in [20,21], while the batch form is emphasized by Slotine in [22], which was improved as an adaptive method by Fossen in [23] and subsequently by Sands in [24]. The feedback measurements emphasized by Gauss are parameterized in a Diophantine equation [25], also referred to in the literature as a Bezout identity [26], or, alternatively, as an Aryabhatta equation [27] discussed relative to each other in [27]. Without overtly saying so, system identification is described [28] where the time-varying terms in a nonlinear adaptive controller are the identified system parameters.
For a system of unknown parameters, several methods of adaption can be implemented to control the system and achieve a desired response. Often, a desired response is rapid tracking of an input signal by an output signal [29]. Most natural processes do not cause a change in input to be matched by its resulting output, so certain adaptive methods can allow for control and tracking using physics-based methods of Lorenz [30], which were experimentally validated in [31] as applied to space systems.
The main difference between nonlinear adaptive control as presented by Slotine [29] and the physics-based method offered by Lorenz [30] is the time-invariant nature of the mathematical expression of modeling by physics, where Slotine adapts a form of the mathematical expression to counter deleterious error effects. The general spirit of both is embodied in the feedforward portion of the recently proposed deterministic artificial intelligence (wh's process flow is illustrated in Figure 3 and who's the self-awareness statements are depicted in Figure 4). Parameter adaption (per Slotine) is one option, while optimal learning (per Smeresky in [32]) is another option which utilizes variations of the aforementioned least squares methods of Gauss. Topology of deterministic artificial intelligence whose depiction applied to UUV system whose actuators are powered by DC motors is in Figure 4. Two main avenues studied to achieve input tracking are through controller design for self-tuning regulators or through learning parameters and modifying an input signal without changing the process dynamics of the system [33,34]. Self-tuning regulators allow for process control through algebraic design and parameter estimation, so an accurate controller is developed as process parameters are estimated over time. These methods form the benchmark for comparison to recently published adaption and learning methods.
Learning methods like deterministic artificial intelligence [5] whose topology is depicted in Figure 4, involve using the process dynamics (dictated by mathematical models of physics) as a form of control [6], and evaluation is done by analyzing input tracking performance metrics. It noteworthy to indicate self-awareness statements in deterministic artificial intelligence only function when supplied an analytic desired trajectory, where error calculation necessitates state observers [35] which enable both adaption or 2-norm optimal learning according to recently published results by Smeresky [32]. Foreshadowing this manuscript's Materials and Methods section, where the method of deterministic artificial intelligence is formally presented, the brevity of its elaboration (merely two necessary equations with explanatory verbiage) is testament to its strength (simplicity) compared to the other methods compared.
The challenges, motivation, and literature gap this work aims to address include application of previously published methods to a new motor model.

Challenges
Step functions are challenging, discontinuous demanded trajectories and square waves compound the challenges by repeatedly reversing direction with discontinuous steps. One key unsolved challenge remains tracking such demanded trajectories without dramatic overshoot and settling.

Motivation
Previously published studies indicated efficacy of model-following techniques and also deterministic artificial intelligence applied to a certain kind of DC motor. This work is motivated to investigate efficacy of various parallel instantiations of model-following and deterministic artificial intelligence on a disparate motor to ascertain the general applicability of the methods, particularly in discrete-time (unlike the sequel [6]).

Literature Gap
The study in [6] represents a most recently published addition to the literature and this manuscript extends that most recent publication to a disparate system. The study in [6] uses self-tuning regulators with a continuous plant while model-following designs are utilized here with a discretized plant (of a different motor than used in [6]).

Developments Presented
Validation is attempted of recently proposed methods on a disparate motor: this manuscript applies methods to a different motor model than recently published and illustrates comparison of transient response and input tracking using disparate adaptive techniques as the benchmark for comparison. Deterministic artificial intelligence outperformed the model-following approach in minimal peak transient value by a percent range of approximately 2%-70%, but model-following achieved at least 29% less error in input tracking than deterministic artificial intelligence This relatively poorer performance (compared to the recently published results) in tracking error led to impromptu studies of possible explanations, and those studies led to the second development presented in this manuscript. Illumination of key, unpublished facet: in this study, deterministic artificial intelligence illustrated relatively greater performance degradation using discretized implementations revealing a unique weakness, namely relatively higher reliance on computational capacity that may preclude application of the technique on unmanned underwater systems like spacecraft, aircraft, and other such systems where constraints on computation capacity are driven by trade-off decisions with weight and cost. A short summary of novel contributions follows: 1. Validation of recently published proposal to use deterministic artificial intelligence for motor control by application to a disparate motor. 2. Comparison of four disparate methods (including model-following) paralleling comparisons just published. 3. Illumination of a limitations due to discretization with deterministic artificial intelligence Section 2 of this manuscript introduces the mathematical motor model and introduces model-following control design presented by Å ström and Wittenmark in [19] and compared in [21]. The newly proposed method of deterministic artificial intelligence [6] is introduced next. The methods are compared in Section 3 firstly emphasizing estimation performance followed by adaptive model-following and then deterministic artificial intelligence. Lastly, Section 4 discusses the results and how they can be interpreted from the perspective of previous studies and of the working hypotheses. The findings and their implications are discussed in the broadest context possible and future research directions are also be highlighted.

Materials and Methods
This section introduces the mathematical motor model and introduces model-following control design. The newly proposed method of deterministic artificial intelligence is introduced next, where methods and protocols are described in detail while well-established methods can be briefly described and appropriately cited.

Truth Model for Motor Dynamics
The process truth model for natural dynamics of a DC motor as described by the sequel [6] in Equation (1) is shown in frequency domain form using the z-transform for discrete-time signals, while the motor investigate here is included in Equation (2). Notice both the disparate Equations (1) and (2) and the final discretization utilized here (2).
The process equation, known as a transfer function, has a zero at = −0.8469 and poles at = 1.1, 0.80. The transfer function has an unstable pole, and the approach with model-following will effectively relocate these poles to stable locations at = 0.2 ± 0.2 . The deterministic artificial intelligence modeling approach does not attempt to achieve pole relocation, but rather achieves an autonomously determined trajectory using proportional plus derivative (PD) feedback adaption of unknown parameters to follow the target path. The truth model also incorporates correlated Gaussian noise with distribution (0, 1 625 ) added as two delayed noise terms. Simulations were performed for both modeling approaches using scripts developed in MATLAB, and the code for each implementation can be found within Appendix A. Identical square wave inputs signals were fed to model-following control designs as well as deterministic artificial intelligence, while the latter method includes an autonomous path planning algorithm to create sinusoidal trajectories that commence at the starting discontinuity of the square wave and end at the peak of each square wave discontinuity.

Model-Following Motor Control Design
The designed control system implemented a dynamic feedforward for input and negative dynamic feedback for output that is summed to produce the process input , as shown in Figure 3.3 in [19]. The model-following topology can be directly compared with the deterministic artificial intelligence topology depicted by Figure 2 in [5]. The system response can be described by Equation (3), with ( ) equal to the z-transform of the control signal, and ( ) equal to the z-transform of the control output.
As the designed topology allows for certain cancellations to occur within Equation (3), the numerator and denominator can be represented as a product of factors as well in Equation (3), where + represents the cancelled zeros, − represents uncancelled zeros, ′ represents a scalar multiple to the system, and 0 represents the pole-zero cancellations used to generate the desired system transfer function.
Since the demonstrated control design will involve no process zero cancellations, + is set to 1. According to causality conditions, the polynomials R, S, and T are of first order. By manipulation of Equation (4), the coefficients of polynomials R', S, and T can be defined in terms of estimated and desired process parameters in Equations (5)-(7), which are adapted from [19].
With the added feedforward and feedback signals, the control signal into the process can now be described by Equation (8) to Equation (9). The factor of β in Equation (9) will cause the system response to have unity gain, which is important for attaining zero asymptotic tracking error [19].

Deterministic Artificial Intelligence Methodology
Through modeling with deterministic artificial intelligence, changes in input do not result in a drastically forced change in output to match the input signal value. Instead, with change in state of the input, a trajectory (sinusoidal here) is calculated for the output to follow in progression towards the target state so there is no undefined position (analytically) for any timestep. Unlike model-following, dynamics of the process are asserted as the control mechanism in a feedforward fashion establishing self-awareness, and the control signal can be modulated through feedback parameters that are learned using a proportional-derivative feedback mechanism or 2-norm optimal methods. Equation (10) shows how feedback parameters can be calculated through batch least squares per Smeresky in [32], with ϕ representing desired trajectory states, θ representing learned parameters to adjust control input , and δ representing error in control input.
Proportional plus derivative parameter adjustment of θ from [28] with proportional adaption gain of two and derivative adaption gain of six was used in the presented experiments in combination with assertion of self-awareness (original process dynamics described in Equation (11)), where Equation (10) describes optimal feedback adjustment described in [32], where no tuning is required for self-awareness and learning. Equation (11) embodies the static physics-based feedforward mentioned in the literature review of Section 1.1.
Equation (12) shows the sinusoid-based trajectory calculation for a change in input, where is the target state, 0 is the original state, ω is the frequency corresponding to maneuver speed, and ϕ is the phase offset of the sinusoid [36].
When a change in state is detected, Equation (12) can be utilized to analytically determine a desired trajectory rather than relying on a model-following controller to stabilize the system. In the presented simulation, the sinusoidal frequency ω = 0.1π and phase ϕ = − π 2 ⁄ . Using the specified parameters for trajectory calculation in response to changes in state with the square wave allowed for a smooth transition in state with a halfwave of a sinusoid instead of an abrupt change (e.g., associated with step functions) by magnitude ( − 0 ).

Analysis and Prediction
Comparison of Equation (1) to Equation (2), the two disparate motor models, indicates disparate results are possible compared to the just published literature [6]. Since the model-following methods drive performance to follow a desired model, the deterministic artificial intelligence method is predicted to produce smaller tracking errors, since the method does not impose a desired model, instead utilizes the model determined by mathematical physics. The prequel realized this prediction achieving 4.8% lower mean and 211% lower standard deviation of tracking errors as compared to the best modeling method investigated (indirect self-tuner without process zero cancellation and minimum phase plant). This manuscript applies deterministic artificial intelligence in accordance with the prequel [6] but compares the performance to other state of the art (model-following) methods, applying both methodologies to a new motor model. Since indirect selftuning regulators also utilize a preferred model to tune performance [37], the model-following results are predicted here to perform well, but with slightly inferior tracking errors.

Plant Parameter Estimation for Model-Following Benchmark
Dynamic systems can often be modeled in terms of a finite set of parameters that can be methodically estimated through minimization of the summed squared difference between a fitted model and truth model. Batch least squares (LS), recursive least squares (RLS), and extended least squares (ELS) are examples of such estimation methods. RLS incorporates an operator for multiplication with previous parameter estimates to use error between true values and estimates as a technique to update the parameter vector to its most likely state for a specific timestep (determined by the specified discretization). Discretization timestep will prove to be a very important facet of implementation. As an extension of RLS, ELS is identical to RLS, where the system vector ϕ holds values of process input and output. Using ELS, values for noise, which may be correlated, are included in the vector ϕ. Such a structure is important when a process has naturally occurring noise, resulting in the need for an estimation of contribution to the system from noise to estimate process parameter values more accurately. The third technique tested, known as Batch LS, allows for a least squares estimation of process parameters based on a collected amount of observed input and output data, minimizing error for all observations rather than one at a time.
Based on the formulation of the RLS, ELS, and Batch LS parameter estimation techniques, a simulation was conducted to determine estimation performance of each approach. Plots in Figure 5 depict the convergence of each estimation method towards true values for two of four total unknown parameters over the 200 timestep simulation. As shown in Figure 5 and Table 1, estimation using ELS performed the same or better than implementations of RLS and Batch LS. ELS had an error 9% higher than RLS for estimation of but performed better in estimating the parameters of , , with equal or lesser error averages and standard deviations than ELS and Batch LS. RLS performed similarly to ELS in estimating parameters and , and Batch LS exhibited high error in comparison to RLS and ELS.

Adaption Using Model-Following and Various Parameter Estimation (Benchmarks)
Model-following involves the design of a control topology that effectively converts an unstable system response to a stable one, which prevents divergence of the output and allows for inputs to be tracked asymptotically. In addition, model-following can incorporate parameter estimation techniques like RLS, ELS, and Batch LS to iteratively adapt the designed control topology to the estimated process characteristics, which is known as a self-tuning regulator.
Deterministic artificial intelligence (deterministic artificial intelligence) takes a different approach to input tracking, where an autonomous trajectory for output is defined for changes in input using a half-wave of a sinusoid. With the deterministic artificial intelligence modeling approach, natural system dynamics are asserted instead of modifying the existing process through control design as is done in model-following. In Figure 6a, a contrast between deterministic artificial intelligence and model-following performances exists in the transient responses with either approach. The transient with deterministic artificial intelligence has a comparably smaller peak, with a peak magnitude lower than that of RLS by 2.66%, ELS by 43.24%, and Batch LS by 67.18%. The discrete-time square wave depicted in Figure 6 was created with a sampling frequency of 1, displaying a slight slant visible in the plot at times of state change due to the short time axis length and nature of discrete (integer) sampling. The reference signal functionally acts as a square wave for discrete-time systems. As shown in Table 2, output with the deterministic artificial intelligence modeling approach results in a significant average input tracking error at least 40.88% higher than error resulting from implementations of model-following with different parameter estimation techniques. The high error is also reflected in Figure 6a, in which the output with deterministic artificial intelligence visibly fluctuates heavily after each change in input. Error distributions between each implementation of model-following are similar, with each average error being within a 9% margin of each other. It is evident, however, that there is a sharp difference in tracking accuracy between model-following and deterministic artificial intelligence. Seeking to elaborate the surprise difference in performance (especially relative to the superior performance of deterministic artificial intelligence achieved in [6], the results from that study are replicated in Figure 7 and Table 3. The key distinguishing feature is discretization where the present study implemented discretization while the study of [6] did not, and this difference revealed the surprising discovery constituting an unexpected novel contribution of this manuscript: performance of deterministic artificial intelligence is severely degraded by discretization implementation compared to the prequel [6] using Equation (1) whose results are depicted in Figure 7.  (1) as opposed to Equation (2). Repeated from [6] comparing disparate modeling techniques (self-tuners without cancellation of process zeros) versus the identical deterministic artificial intelligence method used in this study. In this figure output is on ordinate with time in seconds on the abscissa. The reader is urged to compare the blue, thick dashed line in Figure 7 to the deterministic artificial intelligence results presented in Figure 6b. The difference is elaborated in Section 3.3.

Analysis
The results presented in Section 3.2 highlight a contribution: deterministic artificial intelligence performance seems quite sensitive to discretization. Utilization of Equation (1) compared to Equation (2) clearly degrades performance of all methods used; but when compared to each other, the performance of deterministic artificial intelligence degrades relatively more making the approach less desirable in instances where small discretization is not possible due to pressures on computer abilities (e.g., unmanned underwater vehicles, space systems, aircraft). Deterministic artificial intelligence uses optimal feedforward combined with either optimal learning in a 2-norm sense or alternatively nonlinear adaption. While model-following designs presented here were designed in discrete time [19].

Discussion
This research attempted to duplicate the just-published application of deterministic artificial intelligence to DC motors used on unmanned underwater vehicles. The just-published prequel makes comparisons to state-of-the-art methods in the category of self-tuning regulators, while this manuscript compares performance (of a disparate DC motor) to state-of-the-art methods in the category of model-following algorithms. Deterministic artificial intelligence outperformed the model-following approach in minimal peak transient value by a percent range of approximately 2%-70%, but model-following achieved at least 29% less error in input tracking than deterministic artificial intelligence. This result is surprising and not in accordance with the recently published literature, and the explanation of the difference is shown to be efficacy with discretized implementations. In the prequel [6] utilizing similar estimation methods, deterministic artificial intelligence yielded 4.8% lower mean and 211% lower standard deviation of tracking errors as compared to the best modeling method investigated in that article: indirect self-tuner without process zero cancellation and minimum phase plant. The implication is the increased reliance by deterministic artificial intelligence on small nondiscretization size to replicated continuous systems.