Introducing a Novel Model-Free Multivariable Adaptive Neural Network Controller for Square MIMO Systems

In this study, a novel Multivariable Adaptive Neural Network Controller (MANNC) is developed for coupled model-free n-input n-output systems. The learning algorithm of the proposed controller does not rely on the model of a system and uses only the history of the system inputs and outputs. The system is considered as a ‘black box’ with no pre-knowledge of its internal structure. By online monitoring and possessing the system inputs and outputs, the parameters of the controller are adjusted. Using the accumulated gradient of the system error along with the Lyapunov stability analysis, the weights’ adjustment convergence of the controller can be observed, and an optimal training number of the controller can be selected. The Lyapunov stability of the system is checked during the entire weight training process to enable the controller to handle any possible nonlinearities of the system. The effectiveness of the MANNC in controlling nonlinear square multiple-input multiple-output (MIMO) systems is demonstrated via three simulation studies covering the cases of a time-invariant nonlinear MIMO system, a time-variant nonlinear MIMO system, and a hybrid MIMO system, respectively. In each case, the performance of the MANNC is compared with that of a properly selected existing counterpart. Simulation results demonstrate that the proposed MANNC is capable of controlling various types of square MIMO systems with much improved performance over its existing counterpart. The unique properties of the MANNC will make it a suitable candidate for many industrial applications.


Introduction
Over the past few years, there has been a significant improvement in controlling Multiple-Input Multiple-Output (MIMO) systems using adaptive control methods [1]. Many proposed adaptive controllers rely on model-based approaches [2,3] where mathematical models of the respective dynamic systems must be identified either directly or indirectly in advance. For most industry applications in practice, however, there are significant challenges with MIMO systems' model identifications. For instance, a predicted industrial plant model can be dynamically different from the true plant itself, due largely to the plant's structural uncertainties, unmodeled nonlinearities, and time-varying natures [4][5][6]. In some cases, if a constraint of an actual system for any reason changes, in order to achieve the desired outcomes, the system's model may need to be re-identified resulting in a redesigning of the corresponding controller [7]. Even at the circumstances where an exact model of a MIMO system could be identified, the controller designed for the predicted model of the system may still be subjected to conditional variations both internal and external to the system [8]. Due to these practical problems associated with model-based approaches, many existing

•
During the weight training process of the neural networks, the controlled systems can become unstable; • It is not always clear when to stop the weight training process; • A long training time for the weights can be unsatisfactory for the speed of the control systems; • The traditional activation functions employed in the neural networks may not be suitable for control purposes; • The common error back-propagation learning algorithm uses only the last two consecutive samples of the outputs in discrete derivative functions and does not comply with the requirement of a proper model-free approach in which a full history of inputs and outputs must be used in order to generate an effective control action.
In order to overcome the above-listed deficiencies, in this study, a novel model-free Multivariable Adaptive Neural Network Controller (MANNC) is proposed for controlling coupled MIMO systems in which the following are true.
By using the constraint generated from the Lyapunov stability conditions at each step of the online weight training process, the overall control system stability can be guaranteed at all time; this eliminates the risk of the system been falling into its local minimum [61,62] and prevents the loss of the control speed due to conservative learning rate selections [15,18,47,62,63]: • By constantly observing the accumulated errors and comparing them with their desired values, the controller can decide to stop the learning algorithm and lock the neural network weights at an optimal point; this ensures the convergence of the controller weight adjustments and provides a clear optimal number for the weight training steps; • By choosing proper initial learning rates and dynamically changing them during the learning process according to the system stability criteria, the weight training speed can be significantly increased; this forms a clear comparison with and improvement over the traditional static learning rates [15,18,47,62,63]; • By designing specific activation functions that utilize typical proportional, integral, and derivative operations in the neural network structure of the controller, the proposed controller is simple and straightforward in its configuration; this makes the controller a potential candidate suitable for replacing classical PID controllers in industrial applications; • By applying accumulated gradients in the error back-propagation algorithm and using new partial derivative estimations, the proposed method fully uses the history of the system outputs together with the current weights to produce the outputs of the controller (the inputs of the system) for the next step. This new learning method significantly reduces the overshoot and settling time of the system by minimizing the summation of errors of the system outputs in each step rather than using only the last two consecutive samples of the system outputs as its traditional counterparts do [61,[64][65][66][67], and allows for the closed-loop system to achieve its best control performance with a minimum number of weight training steps.
It is anticipated that, being truly model-free, the proposed MANNC can generate adequate control actions over a wide range of operating conditions. Additionally, by using a new cross-coupling network structure, the proposed controller is expected to be able to control strongly-coupled MIMO systems effectively. It should be mentioned that, according to the design to be presented in this paper, the proposed MANNC will only be applicable for square (n × n) MIMO systems. If an industrial MIMO system has different numbers of inputs and outputs, by squaring up (adding) or squaring down (removing) the inputs (i.e., the manipulated variables) or the outputs (i.e., the controlled variables), the given non-square MIMO system can be rewritten as a corresponding square MIMO system [68] to which the proposed MANNC will be applicable.
To reveal the proposed MANNC, the rest of this paper is organized as follows. In Section 2, the structure and matrix representation of the new neural network-based adaptive controller are introduced. In Section 3, the new learning method of the neural network based on the error back-propagation algorithm is described. The closed-loop system stability is analyzed in Section 4. In Section 5, the controlled system and the introduced method are specified for SISO systems. Section 6 demonstrates the validation results via simulation studies where the proposed method is seen to control three chosen nonlinear MIMO systems of a drum-boiler, a time-variant nonlinear MIMO system, and a hybrid system without the use of their respective models. Conclusions in relation to the design are drawn in Section 7.

Closed-Loop Structure of MANNC
As previously proposed in [18] by the authors, the outputs of three types of neurons: P-type, I-type, and D-type, in the discrete form can be respectively expressed as: where o X (k) and net X (k) represent the X-type neuron's output and input at the k th sample time, respectively. In this study, for stability concerns, further constraints to the neurons' activation functions of Equations (1)-(3) are applied as follows: In [18], a new Adaptive Neural Network Controller (ANNC) structure was proposed. The ANNC contained six neurons and three layers. In the input layer, there are two P-type neurons, which perform the distribution of the inputs in the constructed neural network. In the hidden layer, there are three neurons each being a P-type, an I-type, and a D-type, respectively; the P-neuron compares the desired output with the actual output; the I-neuron provides the necessary action to eliminate the steady-state error; the D-neuron predicts the future behavior of the error. In the output layer, there is a P-type neuron, which performs the summation of the PID functionalities of the neuron. In this paper, a new Multivariable Adaptive Neural Network Controller (MANNC) is proposed in Figure 1a as a closed-loop MIMO controller applicable to coupled square (n × n) multivariable systems. where and represent the X-type neuron's output and input at the sample time, respectively. In this study, for stability concerns, further constraints to the neurons' activation functions of Equations (1)-(3) are applied as follows: In [18], a new Adaptive Neural Network Controller (ANNC) structure was proposed. The ANNC contained six neurons and three layers. In the input layer, there are two Ptype neurons, which perform the distribution of the inputs in the constructed neural network. In the hidden layer, there are three neurons each being a P-type, an I-type, and a Dtype, respectively; the P-neuron compares the desired output with the actual output; the I-neuron provides the necessary action to eliminate the steady-state error; the D-neuron predicts the future behavior of the error. In the output layer, there is a P-type neuron, which performs the summation of the PID functionalities of the neuron. In this paper, a new Multivariable Adaptive Neural Network Controller (MANNC) is proposed in Figure  1a as a closed-loop MIMO controller applicable to coupled square ( × ) multivariable systems. Assuming that there are strong cross-coupling between the inputs and outputs of a MIMO system of concern, the proposed MANNC is designed using a − 3 − neural network structure. In this structure, the error for each output (i.e., the difference between each desired output ( ) and its corresponding actual output ( ) ( = Assuming that there are strong cross-coupling between the n inputs and n outputs of a MIMO system of concern, the proposed MANNC is designed using a n − 3n − n neural network structure. In this structure, the error for each output (i.e., the difference between each desired output (r i ) and its corresponding actual output (y i ) (i = 1, 2, . . . , n)) is generated, and the generated errors propagate to the two layers, the hidden layer and the output layer of the MANNC network. In the hidden layer, there are 3n neurons including clusters of P-type, I-type, and D-type neurons that are repeated consecutively. In the output layer, there are n P-type neurons that form the outputs of the MANNC, i.e., the inputs of the n × n MIMO system. There are 3n 2 weights in the output layer that are associated with the hidden-layer neurons and decide the impact of each neuron of the hidden layer on the generation of the inputs applied to the MIMO system.

Structure of Sub-MANNC (S-MANNC)
To be able to deal with the cross-couplings of an n × n MIMO system of concern, the proposed MANNC structure in Figure 1a is further decomposed into n-parallel sub-controllers each named as a Sub-MANNC (S-MANNC) and illustrated in Figure 1b. The neural network associated with the l th S-MANNC with input r l and output y l (l = 1, 2, . . . , n) is designed to have two layers (hidden layer and output layer) and four neurons; each neuron is able to be connected with the neurons of the other S-MANNCs in order to account for the cross-coupling effects of the underlying MIMO system. In the hidden layer of the l th S-MANNC, there are three neurons each being a P-type, an I-type, and a D-type, respectively. The P-neuron amplifies the difference between the desired output and the actual output, the I-neuron provides the necessary action to eliminate the steady-state error, and the D-neuron predicts the future behavior of the error. In the output layer of the l th S-MANNC, there is a P-type neuron, which performs the summation of the PID functionalities of the hidden-layer neurons. This neuron accumulates the outputs of the hidden layer and forms the control command applied to the l th output of the n × n MIMO system. Due to the fact the MANNC will be used for controlling coupled multivariable systems, the output neuron of each S-MANNC has 'n' number of inputs to be able to produce each control command by considering all the desired outputs and actual outputs. The inputs of the P-type, I-type, and D-type neurons (net 1 3l−2 , net 1 3l−1 , and net 1 3l ) and the outputs of these neurons (O 1 3l−2 , O 1 3l−1 , and O 1 3l ) are related together by the activation functions of the neurons represented in Equations (4)- (6). There are three weights (w 1,3l−2 , w 1,3l−1 , and w 1,3l ) in the output layer of each S-MANNC, relating to the P-type, I-type, and D-type neurons in the hidden layer.

Matrix Representation
The matrix representation of a closed-loop square MIMO system using the proposed MANNC Figure 1a  l and y l be, respectively, the l th input and the l th output of the system, where 1 ≤ l ≤ n, and let G ij be the transfer function relating the j th -component of the i th output (y i ) to the j th input (O 2 j ), where 1 ≤ i ≤ n and 1 ≤ j ≤ n. The vectors and matrices associated with Figure 1b are named in Table 1 and are defined as follows.
· · · w n,3n−2 w n,3n−1 w n,3n 3n×1 = y 1 y 1 y 1 y 2 y 2 y 2 · · · y n y n y n 1×3n T (16) Hidden layer's inputs Triple desired outputs Triple system's outputs Triple unit Considering that the system at each calculation step can be identified as being linear or been linearized around an operation point, the relationship between the inputs and outputs of the system will be as follows: Since net 2 l is the l th input of the P-type neuron in the output layer, one has the following: where the relationship between the inputs and outputs in the output layer of the neural networks can be expressed as follows: As the hidden layer has clusters of P-type, I-type, and D-type neurons, the proportional, integral, and derivative operators (1, D −1 , and D) are considered, respectively, in the matrix form of the activation function. Thus, one has the following: where the inputs of the hidden layer are defined as the differences between the desired outputs and the actual outputs and are expressed as follows: By having and Y and using Equations (19)- (25), one obtains Hence, the system's outputs can be derived as follows: where one has where |G| = 0.
is a non-square matrix and P is symmetrical, from one derives where W is expressed as a function of the desired outputs and the actual outputs, and The system can then be identified as follows: where |W| = 0. It should be pointed out that, although Equations (19)- (32) are derived under the assumption that the system is linear or can be linearized around an operating point, they can potentially be used for nonlinear systems where the nonlinearities of the systems can be ap- proximated by piece-wise linear systems whose time-varying nature can account for the nonlinearities of the systems satisfactorily. It should also be pointed out that if any of the nonsingularity conditions for matrices I + GWPI (3) and (W) could not be met, the selected weights (matrix W) would not be acceptable and would be re-updated until all these matrices become non-singular.

Learning Algorithm
To achieve a precise control effect for a square MIMO system, the neural network weights of the MANNC are adjusted using the principle of the multi-step error backpropagation algorithm described in [69]. Back-propagation is one of the standard methods of training artificial neural networks. This method efficiently computes the weights of one layer at a time using the delta rule. It helps calculate the gradient of a loss function with respect to all the weights in the network. The algorithm is to find the set of weights that minimizes the error by the steepest descent direction calculated for the loss function versus the present weights. The weights will be updated along the steepest descent direction, and the error is reduced in every step [70,71]. The choice of this algorithm is based on the considerations that the system is treated as a "black-box" and the controller will be designed based on a model-free approach. In this study, instead of using merely the current gradient of the system error as the literature does for SISO systems [47,62,63], an accumulated gradient of the system error for the last m samples is proposed to be used to achieve a more precise control performance. The proposed method minimizes the sum of the square accumulated gradient of the error for each system output in each learning step, where the error is taken as the difference between the desired output r l (k) (i.e., the system setpoint) and the actual output y l (k). The Euclidean norm E is defined for calculating the quadratic cost function of the system for the system error. The power of two in this expression makes the error of each output positive, so that larger errors will be more significant than the smaller errors. The cost function for the l th S-MANNC in Figure 1b is then defined as follows: where E l (h) is the error of the l th output in the h th step number of the learning algorithm and m is the required number of discrete samples in the system output and the set-point. By increasing m, the system output will be compared more accurately with the setpoint. However, a large value of m may decrease the adjustment speed of the controller and become undesirable when the speed of the control system (often a critical requirement for a real-time industrial system) is of concern. Therefore, a reasonable value of m must be used to make a necessary trade-off between the desired accuracy and the required speed of the control system. The total cost function of the system (J), which is the sum of n errors by considering all outputs, is written as follows: Using the accumulated gradient of the system error, a learning algorithm must be designed to minimize the defined cost function and to bring the system outputs as close as possible to the desired outputs. According to the principle of the error back-propagation learning algorithm, the output layer's weights must be adjusted so that in each step they move slightly in the opposite direction of the gradient of the cost function. This is to ensure that the cost function will be decreasing step by step. The weights of the output layer will therefore be adjusted based on the following learning rule: where 1 ≤ x ≤ 3l and 1 ≤ l ≤ n, h is the step number of the learning algorithm, and w l,x (h) and w l,x (h + 1) are the weights of the output layer in the current and the following steps, respectively; λ l is the learning rate which decides how fast the cost is changing and, in particular, determines the weight adjustment speed. The gradient of the error subject to each weight is required to be calculated. Using partial derivatives, one has where Because the output neuron is a 'P-type' neuron, one writes Substituting Equations (37)-(41) into (36), one obtains (42) Defining γ l (k) as the output layer weight adjustment rule can thus be derived as The resulting weight adjustment algorithm is summarized in Table 2.
Using the described learning method, all weights are simultaneously tuned, and their values at the current step, together with all the current inputs and all the current outputs, are used to create the outputs for the weights' training at the next step. This online dynamic learning feature of the proposed method (i.e., applying the accumulated gradient and the accumulated errors) makes it more suitable for MIMO systems than its existing counterparts that are mainly applicable for SISO systems [61,62,72]. The neural network structure presented for the MANNC is designed for a general n-input n-output system with cross-couplings among all its inputs and outputs. This structure can be simplified for systems with less cross-coupling to reduce the number of the associated weights and, consequently, to increase the learning speed.

Stability Analysis
It is well known that when a new control method is proposed, it is necessary to investigate the stability condition of the resultant closed-loop system in order to ensure the achievement of the desired control outcomes. For an unconstrained control system, the system stability can be defined using Bounded-Input Bounded-Output (BIBO) stability criteria. While the eigenvalue analysis concept based on the BIBO stability criteria can be used to investigate the stability condition of a linear system, it can not be applied to nonlinear systems. Instead, the Lyapunov stability analysis concept becomes a useful tool for nonlinear systems. As the proposed model-free MANNC method will inherently result in a nonlinear closed-loop control system, its closed-loop stability investigation will need to be carried out using the Lyapunov stability analysis concept. Although, unlike a linear system, the stability of a nonlinear system may not need to be global as the system can have multiple equilibrium points and limit cycles, and global asymptotic stability is sought in this study for the proposed MANNC to ensure its satisfactory closed-loop performance over a wide range of operating points. This will make the controller more suitable for use in industrial applications. According to the Lyapunov global asymptotic stability theorem, for a defined function V(x), if: Then every trajectory of . X = f (X) will converge to zero as t→∞ and the system will be globally asymptotically stable.
Consider a model-free MANNC control system whose Lyapunov function for each of its outputs is defined as follows: where E l (h) is the cost function related to the h th step of the learning algorithm. One can write and: From Equation (46), one has where ∂J ∂w l,x Substitute Equation (49) into Equation (47), respectively, and one derives and Hence, Equation (46) can be expressed as Define The condition for ∆V(h) < 0 will yield the following constraint on the selection of the learning rate λ l defined in Equation (44): If the above constraint is satisfied at each training step, the system will be globally asymptotically stable during the entire training process. This indicates that Equation (54) must be checked in a real-time and simultaneous fashion at each training step during the operation of the weight adjustment algorithm. The flowchart of the whole real-time weight training process, including both the learning algorithm (Table 2) and the stability criteria check in Equation (54), is illustrated in Figure 1c.

Specifying MANNC to Control SISO Systems
The proposed MANNC can be used in a SISO environment where the number of inputs and outputs of the controller is chosen as one, i.e., n = 1. The resultant SISO closed-loop system is shown in Figure 1d. Considering Figure 1d and assuming a linear and time-invariant estimation for the system's SISO transfer function, one has where Then, and If w 1 , w 2 , and w 3 are taken as the coefficients of a classical proportional, integral, and derivative controller, i.e., K P , K I , and K D , respectively, the resultant control system will perform similar to an auto-tune SISO PID control system whose closed-loop transfer function is expressed as follows: The weight learning algorithm illustrated in Table 2 can be customized for SISO system applications and described in Table 3 where λ is the learning rate. Table 3. Specified weight learning algorithm for auto-tune classical PID controller.

Simulation Results
Over the recent years, various computational approaches, such as finite element, finite difference time domain, finite-difference frequency-domain, and Lyapunov stability analysis have been successfully applied to a variety of control systems, including photonic crystals [73][74][75][76][77][78], high-frequency passive components [79][80][81][82][83][84][85][86][87], electromagnetic devices [88][89][90][91][92][93][94], fluid mechanical engineering [95,96], and MIMO control systems [97,98]. Simulation studies using MATLAB are carried out to evaluate the performances of the proposed MANNC in tracking setpoints, reducing unwanted overshoots or undershoots, and securing the global stability of a closed-loop system during the system's entire control process. The structure of the MANNC proposed in Section 2, the dynamic neural network algorithm developed in Section 3, and the stability criteria checking condition discussed in Section 4 are used in three simulation cases, each presenting a type of square MIMO systems. They are a time-invariant nonlinear system, a time-variant nonlinear system, and a hybrid system.

Case 1: Application of MANNC on a Time-Invariant Nonlinear Square MIMO System
In this case, a drum-boiler plant (Figure 2a), which is a generic nonlinear time-invariant coupled two-input two-output system with heat flow rate and mass flow rate as inputs and pressure and level as outputs, is chosen. The nonlinearities of the plant cause the system dynamic characteristics to vary with operating conditions. In addition, cross-couplings and parameter variations of the plant makes it a challenging case to control. For years, constructing a nonlinear controller directly from the original nonlinear model of the drumboiler has been a general approach to use in order to improve the system performance in compensating the plant's nonlinearities. In this study, however, the proposed model-free MANNC method is used in which the nonlinear model of the drum-boiler is not required by the controller design process and only the inputs and outputs of the plant are used for the construction of the controller. The performances of the MANNC in improving the system setpoint tracking time and reducing undesirable overshoots are compared with those of the best and foremost existing neural network method reported in the literature. formance in compensating the plant's nonlinearities. In this study, however, the proposed model-free MANNC method is used in which the nonlinear model of the drum-boiler is not required by the controller design process and only the inputs and outputs of the plant are used for the construction of the controller. The performances of the MANNC in improving the system setpoint tracking time and reducing undesirable overshoots are compared with those of the best and foremost existing neural network method reported in the literature.  The nonlinear state equations describing the relationships between the inputs and outputs of the drum-boiler system of Figure 2a are written as follows: x 2 (t) = y 1 (t) + u 2 (t) (64) ..
x 2 (t) + 2x 2 (t) (65) where "dot" denotes time derivative, u 1 (t) and u 2 (t) are respectively the heat flow rate and mass flow rate as the system inputs, y 1 (t) and y 2 (t) are respectively the pressure and level as the system outputs, and x 1 (t) and x 2 (t) are the state variables. The simulation block diagram of the given nonlinear system is presented in Figure 2b, where box 'Fcn1' produces the highly nonlinear relationship between the inputs and outputs of the system. Due to the fact that Input 1 affects both Output 1 and Output 2, the system is also a cross-coupled MIMO system and, thus, will not be able to be controlled by multiple ANNC controllers introduced in [99], nor by any other SISO or non-coupled MIMO counterparts. Figure 2c demonstrates the implementation of the proposed MANNC in the two-input two-output system. In this neural network, 12 weights in the hidden layer must be trained. The following desired outputs are selected for the drum-boiler system. − r 1 (t) = 5.0u(t − 1) where u(t) is the standard unit step function. − r 2 (t) = 0.2r(t − 1) where r(t) is the standard unit ramp function.
These desired outputs represent a scenario in which the pressure will tend to reach 5 bars and the level will increase following a smooth ramp function. The ramp function is chosen to be the setpoint for Output 2 in order to make the MANNC control more challenging. The objective is to find suitable values for the weights of the output layer so as to force the outputs, y 1 and y 2 , to follow the desired setpoints, r 1 and r 2 , respectively.
To apply the MANNC to the drum-boiler system, all initial weights are set to 1, the learning rates are set to 0.1 (λ 1 = λ 2 = 0.1), and the number of samples is set to 40 (m = 40). After repeating, simultaneously, the online learning algorithm (Table 2) and the Lyapunov stability criteria check (Figure 1c, 20 times), the final weight values of the output layer of the MANNC neural network are obtained and reported in Table 4. During the running of the weight training algorithm, the control system remains stable all the time as λ 1 and λ 2 are kept unchanged. If the control system becomes unstable at a training step, the learning rates will be reduced, and the learning algorithm will be continued with a lower training speed that is dictated by the new learning rates. Applying the final adjusted weights (Table 4) to the control system, Figure 2d shows that Output 1 tracks the desired step output properly with a zero overshoot. This zero-overshoot effect is most desirable for many industrial control systems, as unwanted overshoots during setpoint changes can bring devastated results to the industrial plants. For example, when filling a hazardous liquid tank in a water plant, overshoots can result in overflows if the setpoint is close to the tank's height [99]. Figure 2e demonstrates that Output 2 tracks the desired ramp output properly, and in less than nine samples the output can reach the desired level with a less than 5% error.
To demonstrate the anticipated highly improved performance of the MANNC over its existing adaptive counterparts, a most recent neural network controller (named PIDNN) introduced in [61] is chosen for the drum-boiler system. The PIDNN uses a learning algorithm that is based on two consecutive time-samples. The weights of the PIDNN are set after running the learning algorithm 20 times-the same condition upon which the weights of the MANNC are obtained. The comparison results are given in Figure 2f,g. It is seen that using the PIDNN method, Output 1 presents a 22% undesirable overshoot, and Output 2 exhibits a slower setpoint tracking with larger fluctuations.
The comparison results between the MANNC and the PIDNN control effects with an equal number of trainings are given in Table 5. It is evident that, compared to the PIDNN control system, the MANNC control system can significantly reduce the required training time (by 59%), achieve a zero overshoot (100% reduction), and reach the 5% and 2% error bands in much shorter times (47% and 50% faster for Output 1, and 47% and 36% faster for Output 2, respectively). These results demonstrate a superior performance of the MANNC over its existing counterpart. In particular, Output 1 under MANNC control exhibits a deadbeat-like response with minimum rise time, minimum settling time, no overshoot, and no steady-state error, comparable with an optimal closed-loop response. This remarkable result is attributed to the MANNC strategy that uses the accumulated error and the response of the system in consecutive learning steps rather than in consecutive sample times.  Figure 3a,b represent, respectively, the accumulated error versus the iteration number of the MANNC weight learning algorithm for Output 1 and Output 2. The errors shown in these figures are the differences between the actual outputs and the desired outputs. It is observed that, with the MANNC, the magnitudes of the errors generally decrease as the number of iterations in the weight learning algorithm increases. This is evidence for the convergence of the proposed learning algorithm in Section 3 and is viewed as a significant result that demonstrates the suitable performance of the proposed MANNC for the considered coupled two-input two-output nonlinear system. As shown in these figures, with 35 trainings, the errors are reasonably low, and the values of the weights can be locked in at this point. By continuing the weight adjustment algorithm up to 50 times, the steady-state errors for both outputs become nearly zero. In general, choosing the optimal training number in this method depends on the particular application in which the controller is employed, and implies a trade-off between the control speed and the control performance of the closed-loop system. It is possible to pre-define a desired accumulated error, so that when the actual error reaches to that value, the training process stops and the weights become locked until the next change in the system happens (e.g., a change in the model of the system and/or a change in any of the setpoints).

Case 2: Application of MANNC on a Time-Variant Nonlinear MIMO System
In this case, a discrete time, highly nonlinear, time-variant two-input two-output coupled system is chosen to test the suitability and performance of the MANNC for timevariant MIMO systems. The chosen system is expressed as: where ( ) and ( ) are the system outputs, and ( ) and ( ) are the system inputs. The desire outputs are selected as ( ) = 0.6 and ( ) = 0. By applying, simultaneously, the online learning algorithm (Table 2) and the stability criteria check (Figure 1c)

Case 2: Application of MANNC on a Time-Variant Nonlinear MIMO System
In this case, a discrete time, highly nonlinear, time-variant two-input two-output coupled system is chosen to test the suitability and performance of the MANNC for timevariant MIMO systems. The chosen system is expressed as: where y 1 (k) and y 2 (k) are the system outputs, and v 1 (k) and v 2 (k) are the system inputs.
The desire outputs are selected as r 1 (k) = 0.6 and r 2 (k) = 0. By applying, simultaneously, the online learning algorithm (Table 2) and the stability criteria check (Figure 1c) 50 times, the final weight values of the output layer of the MANNC neural network are obtained and reported in Table 6. The simulation results of the final adjusted weights of the MANNC are shown in Figure 3c,d. In order to compare the MANNC results with those of a properly selected existing counterpart, the PIDNN introduced in [61] is applied to the same system. The system outputs under the PIDNN control are shown in Figure 3e,f. It is demonstrated that both outputs of the MANNC control system track the desired outputs faster than those of the PIDNN control system. In addition, a zero overshoot in Output 1 using the MANNC is achieved, which is a significant result as this is not achievable by using the PIDNN. Decreasing the accumulated error by increasing the number of iterations, as shown in Figure 4, demonstrates the convergence of the proposed learning algorithm for the MANNC evidently. Table 7 presents the performance comparison between the MANNC controller and the PIDNN controller with an equal number of trainings. As can be seen, the MANNC control results outperform the PIDNN control results in all aspects.
Sensors 2022, 22, x FOR PEER REVIEW is achieved, which is a significant result as this is not achievable by using the P Decreasing the accumulated error by increasing the number of iterations, as shown ure 4, demonstrates the convergence of the proposed learning algorithm for the MA evidently. Table 7 presents the performance comparison between the MANNC con and the PIDNN controller with an equal number of trainings. As can be seen, the MA control results outperform the PIDNN control results in all aspects.

Case 3: Application of MANNC on a Hybrid System
Since the MANNC has been designed as a universal controller for black-box MIMO systems, in this case, the performance of this controller is tested on a hybr tem. By definition, a hybrid system is a dynamic system that switches between cont states and, thus, involves both continuous and discrete behaviors. Due to sudden ch in system dynamics at the time of switching between two states, conventional c methods are usually unsuccessful for hybrid systems. In this study, the two-tank  Since the MANNC has been designed as a universal controller for black-box square MIMO systems, in this case, the performance of this controller is tested on a hybrid system. By definition, a hybrid system is a dynamic system that switches between continuous states and, thus, involves both continuous and discrete behaviors. Due to sudden changes in system dynamics at the time of switching between two states, conventional control methods are usually unsuccessful for hybrid systems. In this study, the two-tank plant shown in Figure 5a was selected to test the control performance of the MANNC. The plant consists of two tanks, where tank T1 is filled by flow F 1 through a fully open valve V 1 . The liquid is transferred from tank T1 into tank T2 via a connecting pipe. Valve V 2 is an on-off valve, which is either fully open or fully closed to adjust flow F 2 discretely. Similarly, flow F 3 is adjusted by another on-off valve V 3 . When the behavior of the given plant is modeled, it must be considered that the liquid levels, H 1 and H 2 , respectively, for both tanks will change separately when H 2 crosses level L. At H 2 = H 1 + L the direction of flow through the inter-connecting pipe is reversed. Hence, for F 2 , two dynamics must be modeled as: and . .
where k 1 , k 2 , k 3 , and k 4 are constants depending on characteristic coefficients of the pipes and the cross-section areas of the tanks, and V 2 and V 3 represent the Boolean values in which "1" and "0" signify, respectively, a fully open valve and a fully closed valve. It is evident that the given plant is a nonlinear hybrid system with two inputs ( and ) and two outputs ( and ). The control problem is defined as: using the onoff control valves and , the liquid heights ( and ) in tanks should be derived from an initial state of = (0.01,0.01) to a target area of with the following conditions: where represents the final desired heights located in the target area ( ). In addition, the forbidden areas, and , are considered as: The desired liquid heights that lead the actual liquid heights to the target area are defined as: where ( ) is a standard ramp function. The final desired heights for both tanks in this It is evident that the given plant is a nonlinear hybrid system with two inputs (V 2 and V 3 ) and two outputs (H 1 and H 2 ). The control problem is defined as: using the on-off control valves V 2 and V 3 , the liquid heights (H 1 and H 2 ) in tanks should be derived from an initial state of H 0 = (0.01, 0.01) to a target area of R T with the following conditions: where H f represents the final desired heights located in the target area (R T ). In addition, the forbidden areas, R F1 and R F2 , are considered as: The desired liquid heights that lead the actual liquid heights to the target area are defined as: R H1 i f R H1 < 3.5 3.5 i f 3.5 ≤ R H1 < 5.5 1.8R H1 − 6.4 i f 5.5 ≤ R H1 ≤ 8 (76) where r(t) is a standard ramp function. The final desired heights for both tanks in this simulation are selected as 8 meters i.e., H f = [8,8]. After repeating, simultaneously, the online learning algorithm (Table 2) and the stability criteria check 20 times, the state trajectories of the MANNC control system for the liquid heights were achieved and are shown in Figure 5b, where the forbidden areas and the desired track are also illustrated. It is clear that, by using the MANNC in this complex nonlinear hybrid control problem, the liquid height trajectory can pass the narrow zone between the forbidden areas successfully and eventually reach the target area. This is achieved due to the powerful and fast setpoint tracking property of the proposed method that can cope with changes in the system dynamics. In addition, the liquid heights of the two tanks versus time during this process are shown in Figure 6. The above results are achieved using the final weight values of the output layer of the MANNC neural network, shown in Table 8. Since the final desired liquid heights can be selected as any points in the target area, simulation studies are carried out for several points in this area and the accumulated errors are computed in a range of 285 to 310. Regardless of the location of the selected target point in the target area, the accumulated error is restricted, and the convergence is evidently achieved. This justifies the suitability and adequacy of the proposed MANNC in controlling the highly complex hybrid system.

Conclusions
A model-free MANNC capable of satisfactorily controlling nonlinear square systems with significant cross-couplings within a short period of time is presented paper. The MANNC uses a new auto-tune dynamic online learning algorithm wit mulated error back-propagation for the proposed neural network structure, an tively tunes its weights to achieve the desirable control outcomes. The learning alg is integrated with the Lyapunov stability criteria while running and applied to the system. The effectiveness of the proposed MANNC is validated via simulation stu typical time-invariant and time-variant square MIMO systems. When compared w best representative of existing counterparts (i.e., the PIDNN) for applications to bo invariant and time-variant systems, the MANNC in the time domain is seen to p less overshoot, less settling time, less accumulated errors, and faster setpoint tracki MANNC can be effectively used for several types of square MIMO control sys industrial applications by selecting an appropriate number of samples, especiall

Conclusions
A model-free MANNC capable of satisfactorily controlling nonlinear square MIMO systems with significant cross-couplings within a short period of time is presented in this paper. The MANNC uses a new auto-tune dynamic online learning algorithm with accumulated error back-propagation for the proposed neural network structure, and effectively tunes its weights to achieve the desirable control outcomes. The learning algorithm is integrated with the Lyapunov stability criteria while running and applied to the control system. The effectiveness of the proposed MANNC is validated via simulation studies on typical time-invariant and time-variant square MIMO systems. When compared with the best representative of existing counterparts (i.e., the PIDNN) for applications to both time-invariant and time-variant systems, the MANNC in the time domain is seen to provide less overshoot, less settling time, less accumulated errors, and faster setpoint tracking. The MANNC can be effectively used for several types of square MIMO control systems in industrial applications by selecting an appropriate number of samples, especially when overshoots in outputs are undesirable and fast setpoint tracking is critical. The simulation results for controlling a complex and challenging MIMO hybrid system demonstrate the superior performance of the MANNC when it deals with significant changes in the system dynamics. As a future study, adding more layers to the neural network structure of the MANNC can be considered in order to further improve the control performance, especially for highly nonlinear plants.