Hysteresis Compensation of Dynamic Systems Using Neural Networks

A neural networks(NN) hysteresis compensator is proposed for dynamic systems. The NN compensator uses the back-stepping scheme for inverting the hysteresis nonlinearity in the feed-forward path. This scheme provides a general step for using NN to determine the dynamic pre-inversion of the reversible dynamic system. A tuning algorithm is proposed for the NN hysteresis compensator which yields a stable closed-loop system. Nonlinear stability proofs are provided to reveal that the tracking error is small. By increasing the gain we can reduce the stability radius to some extent. PI control without hysteresis compensation requires much higher gains to achieve similar performance. It is not easy to guarantee the stability of such highly nonlinear dynamical system if only a PI controller is used. Initializing the NN weights is simple. The initial weights of hidden layer are randomly selected and initial weights of output layer are set to zero. A PI loop with integerted an unity gain feedforward path keeps the system stable until the NN starts learning. Simulation results show its efficacy of the NN hysteresis compensator on a system. This work is applicable to xy table-like precision control system and also shows neural network stability proofs. Moreover, the NN hysteresis compensation can be further extended and applied to dead-zone, backlash, and other actuator nonlinear compensation.


Introduction
Industrial dynamical control systems have generally the structure of a nonlinear system in front of some nonlinearity in the actuator, for example, dead-zone, backlash, and hysteresis, etc. Hysteresis phenomena caused by magnetism, stiction or gear with backlash generally exist in control system [1][2][3] and often severely reduce system performance such as giving rise to oscillations and/or undesirable inaccuracy, even leading to instability. Hysteresis characteristics are usually unknown and/or generally nondifferentiable nonlinearities. Most results of adaptive control system are for differentiable nonlinear or linear systems, and are not applicable to control systems with non-differentiable nonlinearities. Developing an adaptive control scheme for systems with unknown hysteresis is a challenge of practical primary concern. The controlled plant may or may not have been known and the hysteresis is considered unknown. The goal is to achieve tracking and stabilization under influence of unknown hysteresis.
In recent years, several rigorously guided adaptive schemes for compensation of actuator nonlinearities have been provided in detailed studies [4]. Backlash compensation with dynamic inversion is shown in [5,6], where NN is used to eliminate the inversion error. Adaptive control of plants with unknown hysteresis was developed using an adaptive inverse scheme [7]. In [8][9][10], NN compensation of gear backlash-like hysteresis in the position control mechanism was proposed.
In this paper, the author presents a NN hysteresis compensation design for a system. A rigorous design procedure with validation is provided to generate a PI tracking loop using an adaptive neural network system in a feed-forward loop for hysteresis compensation. The authors derive practical limits for tracking errors through tracking error dynamics analysis, and investigate the performance of NN hysteresis compensator in the system from computer simulations.

Neural Networks
NN has been used widely in feedback control systems [11][12][13][14]. Most applications are temporary, with no proven stability. The proof of stability that exists almost invariably relies on the property of a universal approximation to NN [15,16]. The three-layer NN in Fig. 1 is composed of an input, a hidden, and an output layer. There are L neurons in the hidden layer and m neurons in the output layer. Multilayer NN is a nonlinear function from input space R n to output space R m . The NN output y is a vector with m components determined by the equation as the n components of the input vector x.
where σ(•), the hyperbolic tangent functions, v kj the weight of the interconnection from the input layer to the hidden layer, and w ik the weight of the interconnection from the hidden layer to the output layer. The threshold offsets are described as v k0 , w i0 .
By gathering all the NN weights v kj , w ik into matrices V T , W T , we can write the NN equation as vector as follows: The threshold is placed as the first column of the weight matrix W T , V T . In other words, the vector x and σ(•) needs to be incremented by placing '1' as their first element. That is , x = [1 x 1 x 2 · · · x n ] T . To express (1) in this equation, there is sufficient generality σ(•) to take as a diagonal function from R L to R L , which is σ(z) = diag{σ(z k )} for a vector z = [z 1 z 2 · · · z L ] T ∈ R L . For the convenience of notation, the matrix of all weights is defined as follows.
According to many well-known results, a sufficiently smooth function" ycan be randomly approximated in a compact set with appropriate weights, i.e., using a three-layer NN " y ¼ W T rðV T xÞ þ EðxÞ: Here, it is the NN approximation error ε(x), and ||ε(x)|| ≤ ε N on a compact set S [17,18]. The approximating weights V and W are ideal target weights, and are assumed to be bounded, such that ||

Hysteresis Nonlinearity
In this section, the author presents a hysteresis model and a hysteresis inverse model. The implementation of hysteresis inverse is provided in the following sections to develop an NN hysteresis compensation scheme for unknown hysteresis systems. Hysteresis compensation is performed using dynamic inversion compensation, which uses NN for dynamic inversion compensation [19]. Other types of hysteresis models, including backlash and electronics, can be identified from references [1][2][3]. However, general history models will not be convenient because they are complex. Here, we will use a simplified hysteresis model with most hysteresis properties. and two line segments: T ðtÞ ¼ m r ðuðtÞ À c r Þ; u 2 uðtÞ , u 3 ¼ c t þ m r c r m r À m t (7) T ðtÞ ¼ m l ðuðtÞ À c l Þ; where u 1 , u 2 , u 3 , u 4 are the values of u(t) at the four opposite "conners" of the quadrilateral.
Along the segments, the time derivatives of T(t), u(t) are of constant sign, namely, _ TðtÞ . 0, _ uðtÞ . 0 for The hysteresis phenomena occur inside the loop formed by the half-lines (5) and (6) and the segments (7) and (8). Within the hysteresis loop, the relationship between T(t) and u(t) is where c d (t), c u (t)are partial constant function that depends on the point where _ uðtÞ changes the sign and the historical trajectories of (u(t), T(t)).
The motion of T(t) and u(t) inside the half-line (5) and (6) and the segments (7) and (8) and the hysteresis loop can be mathematically described as _ uðtÞ , 0: Fig. 2 shows a hysteresis model and two typical minor loops. To cancel the hysteresis effect in the system, the pre-compensator must generate the reciprocal of the hysteresis nonlinearity. Fig. 3 shows the hysteresis inverse function. The dynamics of the NN hysteresis compensator is as follows Also, Fig. 3 shows that hysteresis inverse properties can be decomposed into two functions. Fig. 4 shows the direct feed forward term and the further modified hysteresis inverse. This decomposition allows us to design compensator with better structure when NN is used in feed forward paths.

NN Hysteresis Nonlinearity Compensation of Dynamic Systems
In this section, the author shows how to design an NN hysteresis compensator using back-stepping techniques [20]. It also shows how to weight or learn NN online, with small tracking errors and boundaries for all internal states (such as NN weights). Assume that actuator output can be measured. The system dynamics without vibration mode can be describes as follows.
h is the motor velocity, J is the inertia, B is the viscous friction, T f is the nonlinear friction components, T d is the bounded unknown disturbance, and T is the control input. Supposed there is |T d | < τ M , with τ M , a known positive constant. When a reference signal _ h d is given, the tracking error is written Using (12) we can differentiate tracking errors and write the plant dynamics in terms of tracking errors as follows with the nonlinear plant function The term x includes all the time signals required for calculation f(•), for example it can be defined as Note that this function f(x) contains all potentially unknown functions without J, B as shown in (13) this latter term is revoked from the stability proof. The following tracking controller provides a robust compensation scheme for unknown terms in f(x): withf ðxÞ, an estimate for nonlinear terms f(x), v 1 (t) a robustifying term, and K f > 0. The following theorem is the first step in the backstepping design, which shows that the desired control law (15) keeps the tracking error small.
Theorem 1 : Under the system (12), use the tracking control law (15). Select the robustifying signal v 1 as follows the tracking error is then bounded and can be kept as desired by increasing the gains K f .
Proof : Choose the Layapnov function candidate Differentiating L 1 and using the assumption j _ J j ¼ 0 and Eq. (13) yields Using the tracking control law (15) one has Eq. (20) can be bounded as For as long as |e| ≠ 0, one can conclude that _ L 1 is guaranteed negative.
Theorem 1 demonstrates a control law that guarantees stability in terms of tracking errors. If there is unknown hysteresis nonlinearity, the desired control signal and the actual value are different. According to the dynamic inversion concept, NN is used to compensate for the inversion error originally provided by Calise et al. [19], the author gives a rigorous analysis of closed-loop system stability. The actuator output provided in (15) is a desirable signal. To find the overall system error dynamics, define the error between the desired actuator output and the actual actuator output as follows: which (13) and related (15) represent complete system error dynamics.
The dynamics of the hysteresis nonlinearity can be written as [19]. For known hysteresis, the ideal hysteresis inverse is given by Since hysteresis and thus its inverse are unknown, only the inverse of hysteresis can be approximated as We can now write the hysteresis dynamics as follows wheref ¼ĤðT;û; _ uÞ and therefore its inverse _ u ¼Ĥ À1 ðT;û; _ uÞ. The unknown functionHðT ;û; _ uÞ, that represent hysteresis inversion error are approximated using NN.

Introducing the NN approximation property, the hysteresis inversion error can be expressed as
HðT ;û; _ uÞ ¼ W T rðV T x nn Þ þ E: where the NN input vector is selected as x nn ¼ ½1 e _ h dT T T , and ε is the NN approximation error.
We defineV ,Ŵ as estimates of the ideal NN weights provided by NN tuning algorithms. Define the weight estimation error as and the hidden layer output error for a given x nn as To design the stable closed-loop system with hysteresis compensation, nominal hysteresis inverse _ u ¼f and pseudo-control inputf are selected aŝ where v 2 (t) is a robustifying term detailed later.
The closed loop system with NN hysteresis compensator is shown in Fig. 5. The proposed hysteresis compensation scheme follows the hysteresis inverse decomposition in Fig. 4. That is, the exact hysteresis inverse consists of a direct feed term and the error term in Fig. 4b estimated by NN. The propod controller (32) allows to write the error dynamics (23) as Taylor series expansions can be used to overcome the strong restriction of linearity in the tunable parameters. The weights V appear in nonlinear way. Applying the method developed in [15,16] yields the error dynamics where the disturbance term is given by Here, OðṼ T x nn Þ 2 represents a higher order terms in Taylor series expansion.
Assuming that the approximation property of the neural network are maintained, the norm of the disturbance term can be bounded as [15,16] where c 1 and c 2 are positive constants. The NN input is bounded by Combination of the inequalities (36) and (37) one has where C i are computable positive constants.
The following theorem explains how to adjust the neural network weights so the tracking error e(t) and T ðtÞ achieve small values, whereas the NN weightsV ,Ŵ are close to V, W. That is, the weight estimation errors (30) are bounded.
Theorem 2. Let the desired trjectories be restricted. Choose the control input as (27). Select the robustifying signal v 2 as where K Z 1 . maxðC 2 ; C 3 Þ, K Z 2 . 1, and K Z 3 . C 4 . Let the estimated NN weights be given by the NN tuning algorithm with any constant matrices S = S T > 0, Q = Q T > 0, and k > 0 small scalar deign parameter. The tracking error e(t), errorT ðtÞ and NN weight estimatesV ,Ŵ are then bounded by the limits given by Eqs. (57) and (58). Also, the errorTðtÞ can be made arbitrarily small by increasing the gain K b .
Proof : Select the Lyapnov function candidate which weights both errors e(t) andT ðtÞ, and NN weights estimation errors. Taking derivative and applying (13) and (34) one has Using (15) and tuning rules yields Applying the same inequality as for (20), expression (47) can be bounded as Intorducing (39) and applying some norm properties, one can has Taking Choosing K Z 1 . maxðC 2 ; C 3 Þ and K Z 3 . C 4 one has Completing the square yields Therefore, the _ L is negative as long as or

490
From the standard Layapnov theorem, the error,T , decrease if the error is greater than the right side of (55). Eq. (57) gives a practical bound on the error Similarly, Eq. (56) gives Notice that by increasing the gain K b we can reduce the stability radius to some extent. Also, note that PI control without hysteresis compensation requires much higher gains to achieve similar performance. Moreover, it is not easy to guarantee the stability of such highly nonlinear dynamical system if only a PI controller is used. NN hysteresis compensation demonstrates the stability of the system and can increase gain K b to keep the tracking error arbitrary small. The NN weight errors are essentially constrained in terms of V M , W M . Due to the form of the feedforward compensator with integreted an unity feedforward path and a NN parallel path, initializing the NN weights is simple. The initial weights Vare randomly selected and initial weights W are set to zero. Then, a PI loop with integerted an unity gain feedforward path keeps the system stable until the NN starts learning.

Simulation Results
In this section, the author described the effective of a NN hysteresis compensator through computer simulations. One consider a plant with linear parts [21]: The NN weight tuning parameters are chosen as S = 8I 9 , Q = 9I 4 , and k = 0.002, when I N is N × N identity matrix. The robustifying signal gains are K Z 1 ¼ 4, K Z 2 ¼ 2:5, and K Z 3 ¼ 6. The controller parameter K p = 4, K I = 2, and K b = 0.4. There are eight nodes in hidden layer in NN, i.e., L = 8. The input to hidden layer weights V is randomly initialized. Distributed uniformly between -1 and 1. The hidden to output layer weights W are initialized at 0. Because the weights W are initialized at zero, this weight initialization does not affect system stability, so initially there is no input to the system except for the PI loop. Filters that generates the signal _ T des is implemented as s sþ100 . Without the NN hysteresis compensation, the tracking performance of the closed-loop system is shown in Fig. 6. Hysteresis causes a loss of information about the signal each time u(t) change direction, indicating that system performance is degraded. Applying the NN hysteresis compensator significantly reduces the tracking error. Fig. 7 shows the velocity of a plant when a NN compensator is included. Fig. 8 shows the control signal u(t) in both cases when NN is applied and when NN is not present. In the simulation it is clear that the proposed NN hysteresis compensation is an efficient method to compensate for hysteresis nonlinearities.

Conclusion
A new technique for the hysteresis compensation has been proposed for systems. The compensator scheme has a dynamic inversion structure, and the NN of the feed-forward path approximating the hysteresis inversion error and filter dynamics required for back-stepping design. We show how to adjust the NN weights so that the hysteresis inversion error is learned on line. Using nonlinear stability techniques, the boundaries for tracking error are derived from the tracking error dynamics. Through simulation, we show the significant improvement in system performance by NN hysteresis compensation scheme.