In recent years, considerable efforts are being made to automate functions in agricultural machinery and production machines that are still carried out by humans, through the use of self-learning controllers and continuously adapt the machine settings to the crop/animal variability and the environmental conditions.
Agricultural production machines with higher efficiencies will be very important in the future because of the limited agricultural areas in the world and constantly rising energy and labor costs. One way to offset the rising labor costs may be to increase the capacity by increasing the size of the machines. However, the limits in this direction will soon be reached as there is a maximum size that will still permit road transportation. On the other hand, the requirement for the minimization of the energy costs may make the multi-objective optimization problem in hand a difficult one to solve. A different approach to increase effectiveness would be to increase the operational efficiency by the use of advanced learning algorithms, which can learn the operational dynamics online and adjust the operational parameters accordingly. The motivation behind the use of self-learning controllers instead of conventional controllers for the control of agricultural production machines is that there are different subsystems interacting with each other in these machines, and well tuning of the controller coefficients simultaneously is a difficult task. Even if the operator becomes proficient in proper adjustment of the different controller coefficients, crop/animal variability and the environmental conditions force the operator to change the machine settings continuously resulting in the fact that adaptability is a must. In this study, the trajectory control of an autonomous tractor is considered and, for the provision of such adaptability, a Takagi-Sugeno-Kang (TSK) type-2 fuzzy neural network (T2FNN) with a sliding mode control (SMC) theory-based learning algorithm is proposed. Various uncertainties, disturbances and nonlinearities that would inherently exist in such a system are thus handled.
As for the structure, the combination of a conventional controller and an intelligent controller is chosen. The former is a proportional-derivative (PD) controller and the latter is a T2FNN in this study. Such a structure is called feedback error learning (FEL) in literature; it was originally proposed in  for robot control in which a neural network based controller works with a PD controller. In this approach, the output of the conventional controller is used as the learning error signal to train the intelligent controller. A recent extension of this approach to fuzzy neural networks (FNNs) can be seen in . This study, presents a further extension by using SMC theory to train T2FNNs. The novelty of the approach is that instead of trying to minimize an error function, the learning parameters are tuned by the proposed algorithm in a way to enforce the error to satisfy a stable equation. The parameter update rules of T2FNNs are derived and the stability of the learning algorithm in the Lyapunov sense is proved.
For the training of a FNN or a T2FNN, two methods are widely used in literature. One of them is gradient-descent-based  and therefore requires the computation of partial derivatives or sensitivity functions. It can be considered as an extension of the commonly used learning algorithm with back propagation of the error. There are some drawbacks of this method such as slow speed of learning, long computational time, and difficulties are met in determining the convergence and the stability of the learning scheme in an analytical way. What is more, as is the case with all repetitive algorithms, a number of numerical robustness issues may emerge when the algorithm is run over a long period of time . In addition to these drawbacks, the tuning process can easily be trapped into a local minimum 6, 20]. Since genetic algorithms-based methods basically do a random search, they are slower than gradient-descent algorithms and computationally more intensive. Moreover, the stability of such approaches is questionable and the optimal values for the stochastic operators are difficult to derive. In order to overcome these difficulties, SMC theory-based algorithms have been proposed in [21, 25] for the parameter update rules of artificial neural networks (ANNs) and FNNs as robust learning algorithms. Even though the main strength of SMC is its robustness, there are some disadvantages of it as well. For instance, when the system dynamics are close to the sliding surface, high frequency oscillations in the control input, also known as chattering, occur. One of the most common methods to eliminate the chattering is inserting a boundary layer to replace the corrective control by an equivalent one when the system is inside this layer .
SMC is an approach that guarantees the robustness of a system in the case of external disturbances, parameter variations and uncertainties and as such has attracted the attention of many researchers to guarantee robustness in computationally intelligent architectures [32, 15]. The main idea behind this control scheme is to restrict the motion of the system in a plane referred to as the sliding surface, where the predefined function of the error is zero . SMC-based learning algorithms can, not only make the overall system more robust, but also ensure faster convergence than the traditional learning techniques in online tuning of ANNs and type-1 fuzzy neural networks (T1FNNs). There are various studies in literature that aim to use the robustness property of SMC in the learning process of ANNs and T1FNNs . Conversely, the robustness and the stability properties of soft computing-based control strategies can also be analyzed through the use of SMC theory .
The most common tools used in the literature to implement model free designs are ANNs and fuzzy logic systems (FLSs). On the fuzzy logic theory, Zadeh argues that ”fuzzy logic is a precise conceptual system of reasoning, deduction and computation in which the objects of discourse and analysis are, or are allowed to be, associated with imperfect information. Imperfect information is information which in one or more respects is imprecise, uncertain, incomplete, unreliable, vague or partially true” . ANNs are well known for their representation capability, even in the case of highly nonlinear systems. FNNs combine the advantages of both techniques, i.e. the fuzzy reasoning ability of FLSs and the learning ability of ANNs.
The use of type-2 fuzzy sets has an advantage when it is difficult to determine the place of the membership functions (MFs) precisely . Since there are infinite number of type-1 MFs within an interval in a type-2 MF, type-2 fuzzy logic systems (T2FLSs) appear to be a more promising method than their type-1 counterparts for handling uncertainties such as noisy data and changing environments [10, 9]. In [24, 23], the effects of the measurement noise in type-1 and type-2 fuzzy logic controllers and identifiers were simulated to perform a comparative analysis. It was concluded that the use of a type-2 fuzzy logic controller can be a better option than the use of its type-1 counterpart. These claims have been verified in a real-time application in . Even if there exists a number of papers in literature that claim that the performance of T2FLSs is better than T1FLSs under noisy conditions, this claim is tried to be justified by simulation or real-time studies only for some specific systems. However, in , a simpler T2FLS is considered with a novel MF in which the effect of input noise in the rule base is shown numerically in a general way, and it is concluded that T2FLSs should be used when needed, i.e. in the presence of noise and uncertainties in the system.
Whereas the secondary MFs can take values in the interval of [0,1] in generalized T2FLSs, they are uniform functions that only take on values of 1 in interval T2FLSs. Since the general T2FLSs are computationally very demanding (this is because the type-reduction is computationally expensive), the use of interval T2FLSs is more commonly seen in literature. In an interval TSK T2FLS, there exists a design parameter that weights the sharing of lower and upper firing levels of each fired rule. That parameter can either be fixed or optimized online. While the least mean square method is generally used to find the optimal value of this parameter, an SMC theory-based learning algorithm is proposed for tuning it in .
The contributions of this paper are as follows:
An SMC theory-based learning algorithm is proposed for the parameter tuning of T2FNNs, including the design parameter that weights the sharing of the lower and the upper firing levels of each fired rule, and its stability in the Lyapunov sense is proved.
The proposed learning algorithm is tested on the trajectory tracking problem of an autonomous agricultural tractor in the presence of various nonlinearities and uncertainties in real-time.
A practical mechatronic system, illustrating how control, sensing and actuation can be integrated to achieve an intelligent system, is designed and presented.
The body of the paper contains five sections: In Section II, the dynamic equations of the autonomous tractor are presented. In Section III, the overall control is scheme is given. The proposed sliding mode FEL approach is presented and the parameter update rules for T2FNNs are proposed for the case of triangular MFs in Section IV. In Section V, real-time results are given. Finally, conclusions are presented in Section VI.
Ii Mathematical Description of the Tractor
Ii-a Kinematic Model
The schematic diagram of the autonomous tractor is presented in Fig. 1.
The linear velocities , and the yaw rate at the point are written as follows:
where , , and represent the longitudinal velocity, the yaw angle defined on the point on the tractor, the steering angle of the front wheel, the distance between the front and the rear axles of the tractor, respectively.
Considering the center of gravity (CG) shown in Fig. 1, the linear velocities , and the yaw rate of CG can be written as follows:
where equals to the multiplication of and .
Ii-B The Yaw Dynamics Model
The lateral dynamics of the tractor can be written as follows:
where , , , , , , and represent the mass of the tractor, the lateral velocity of the CG, the longitudinal velocity of the CG, the yaw rate, the traction and the lateral forces on the front wheel, the lateral force on the rear wheel and the steering angle of the front wheel, respectively.
The yaw dynamics of the tractor are written as follows:
respectively represent the distance between the front axle and the CG of the tractor, the distance between the rear axle and the CG of the tractor, and the inertial moment of the tractor.
The tire side-slip angles must be calculated in order to determine the forces caused by the slip. It is assumed that the steering angle of the front wheel is small, and this allows to make the following approximations: and . The side-slip angles of the front () and the rear tires () are written as follows:
To determine the lateral force on the tire, there are many different approaches in literature. In this study, the lateral tire forces are calculated using a linear model which assumes these to be proportional to the side-slip angles in [11, 22, 8]
where , , represents the cornering stiffness of the tires of the tractor. The tire cornering stiffness parameters are the averaged slopes of the lateral force characteristics in this method.
Iii Overall Control Scheme
Iii-a Kinematic Controller
The kinematic model is re-written in a state-space as follows:
where lateral velocity equals to .
An inverse kinematic model is needed to calculate the reference speed and the yaw rate for the tractor. It is written as follows:
and the kinematic control law proposed in  to be applied to the tractor for trajectory tracking control is written as:
where and are the current position errors in the axes and , respectively. The parameter is the gain of the controller and is the saturation constant. The coordinates and are the current and the desired coordinates, respectively. The parameters and are the generated references for the speed and the yaw rate controllers.
Iii-B Dynamic Controllers
The proposed control scheme used in this study is illustrated in Fig. 4. The arrow in Fig. 4 indicates that the output of the PD controller is used to tune the parameters of the T2FNN. The output of the PD+T2FNN controller is the steering angle of the front wheel. A low level controller is used to control the steering mechanism. A proportional-integral-derivative (PID) controller is used for the control of longitudinal velocity. For the control of yaw dynamics, a conventional controller (such as a PD controller) works in parallel with an intelligent controller. One of the main concerns of this study is to implement a novel learning algorithm for T2FNNs by using some novel SMC theory-based learning rules to a real time system. As a testing environment, the yaw dynamics of the tractor in our laboratory has been chosen. On the other hand, the longitudinal dynamics could, of course, be selected. Moreover, there could be two T2FNNs running on the control of the two subsystems (yaw dynamics and longitudinal dynamics) simultaneously. The reason for such a selection in this study is that the yaw dynamics control of the tractor is more common in agricultural machines. Even if a time-based trajectory (both the yaw angle and the longitudinal speed of the tractor are controlled simultaneously) is given to the system in this study, a space-based trajectory (the longitudinal speed is fixed and only the yaw dynamics is controlled) is also very common in agricultural applications. Based-on these concerns, the yaw dynamics of the tractor has been chosen for the implementation for the novel learning algorithm proposed in this study.
Iv Type-2 Fuzzy-Neuro Control Approach
Iv-a Type-2 Fuzzy Triangular Membership Functions
The mathematical expression for a type-1 fuzzy triangular MF can be written as:
where and are the center and the width of the MF and
is the input vector. On the other hand, type-2 fuzzy triangular MFs with uncertain width and uncertain center are shown in Figs.3(a) and 3(b), respectively. In this paper, MFs with uncertain width are preferred in the antecedent parts of the fuzzy if-then rules.
Each MF in the antecedent part is represented by an upper (red line in Fig. 3) and a lower (blue line in Fig. 3) MF. The membership values for the upper and the lower MFs are denoted as respectively. The strength of the rule is calculated as a T-norm of the MFs in the premise part by using a multiplication operator:
The type-2 fuzzy triangular membership values , , , and of the inputs and in the above expression have the following appearance:
Iv-B Interval Type-2 A2-CO TSK Model
The interval T2FLS considered in this paper uses type-2 triangular MFs in the premise part and crisp numbers in the consequent part. This structure is called A2-C0 fuzzy system , and it is shown in Fig. 5. The fuzzy If-Then rule of a -order type-2 TSK model with two input variables in which the consequent part is a crisp number can be defined as follows:
The followings are the operations in each Layer in Fig. 5: In Layer 1, the input signals feed the system. The related figure shows the system for two inputs which are the error and the time derivative of the error. In Layer 2, the membership degrees and are determined for each input signal entering the system. Layer 3 calculates the firing strengths of the rules which are realized using the prod t-norm operator using (13). Layer 4 determines the outputs of the linear functions and , in the consequent parts for the two inputs case.
Layer 5 computes the product of the membership degrees and linear functions . Two summation blocks are in Layer 6. One of these blocks computes the sum of the output signals from Layer 5 (the numerator part of (17)) and the other block computes the sum of the output signal of Layer 3 (the denominator part of (17)). Finally, Layer 7 calculates the output of the network using (18).
The output of the network is calculated as follows:
where is given by the If-Then rule. The inference engine used in this paper replaces the type-reduction which is given as:
The design parameter , weights the sharing of the lower and the upper firing levels of each fired rule . This parameter can be a constant (equal to in most cases) or a time varying parameter. In this paper, the latter is preferred. In other words, the parameter update rules and the proof of the stability of the learning process are given for the case of a time varying .
After the normalization of (18), the output signal of the T2FNN will obtain the following form:
are the normalized values of the lower and the upper output signals of the neuronfrom the second hidden layer of the network:
The following vectors can be specified:
The following assumptions have been used in this investigation: Both the input signals and , and their time derivatives can be considered bounded:
where and are assumed to be some known positive constants. It is obvious that and . In addition, it can be easily seen that and . It is also considered that, and will be bounded signals too, i.e.
where and are some known positive constants.
Iv-C The SMC Theory-based Learning Algorithm
Using the principles of SMC theory  the zero value of the learning error coordinate can be defined as a time-varying sliding surface, i.e.,
which is the condition that the T2FNN is trained to become a nonlinear regulator to obtain the desired response during the tracking-error convergence movement by compensating the nonlinearity of the controlled plant.
The sliding surface for the nonlinear system under control is defined as:
with being a positive constant determining the slope of the sliding surface.
Definition: A sliding motion will appear on the sliding manifold after a time , if the condition is satisfied for all in some nontrivial semi-open subinterval of time of the form .
It is desired to devise a dynamical feedback adaptation mechanism, or an online learning algorithm for the parameters of the T2FNN considered, such that the sliding mode condition of the above definition is enforced.
Iv-D The Proposed Parameter Update Rules for the T2FNN
The parameter update rules for the T2FNN proposed in this paper which has two inputs are given by the following theorem.
Theorem 1: If the adaptation laws for the parameters of the considered T2FNN are chosen as:
where is a sufficiently large positive design constant satisfying the inequality below:
Then, given an arbitrary initial condition , the learning error will converge to zero within a finite time .
Proof: The reader is referred to Appendix A.
In order to avoid division by zero in the adaptation laws of (27)-(32) an instruction is included in the algorithm to make the denominator equal to when its calculated value is smaller than this threshold.
It is well-known that sliding mode control suffers from high-frequency oscillations in the control input, which are called chattering. The following are the two common methods used to eliminate chattering :
Using a saturation function to replace the signum function.
Inserting a boundary layer so that an equivalent control replaces the corrective one when the system is inside this layer.
The relation between the sliding line and the zero adaptive learning error level is determined by the following equation:
The tracking performance of the feedback control system can be analyzed by introducing the following Lyapunov function candidate:
Theorem 2: If the adaptation strategy for the adjustable parameters of the T2FNN is chosen as in (25)-(32), then the negative definiteness of the time derivative of the Lyapunov function in (36) is ensured.
Proof: The reader is referred to Appendix B.
V Experimental Setup
The global objective in the following real-time experiments is to track a time-based trajectory with the Case New Holland TZ25DA tractor shown in Fig. 6.
V-a Global Positioning System
A global positioning system (GPS) antenna is located straight up the center of the tractor rear axle to provide highly accurate positional information for the autonomous tractor. The height of the antenna is 2m above ground level. It is connected to a Septentrio AsteRx2eH RTK-DGPS receiver (Septentrio Satellite Navigation NV, Belgium) with a specified position accuracy of 2cm at a 20-Hz sampling frequency (sampling period s). The RTK correction signals are obtained from the Flepos network through a wireless internet connection established with a Digi Connect WAN 3G modem.
V-B Hardware, Software and Sensors
The block diagram of hardware is shown in Fig. 7. The GPS receiver and the internet modem are connected to a real time operating system (PXI platform, National Instrument Corporation, USA) via a RS232 serial communication. The PXI system gathers the steering angles and the GPS data, and it controls the tractor by sending signals to the actuators. A laptop connected via a wireless network to the PXI system functions as the user interface of the autonomous tractor. The control algorithms are implemented in version 2011, National Instrument, USA. They are executed in real time on the PXI and updated at a rate of 20-Hz.
The PD+T2FNN control algorithm calculates the desired steering angle for the front wheels. In the inner closed loop, the steering mechanism is controlled by using an electro-hydraulic valve from Sauer Danfoss with a flow of 12 liter/min. The electro-hydraulic valve characteristics are highly nonlinear and include a saturation and a dead-band region. The voltage, limited between volt and the steering angle, limited between constitute the input and the output for the steering system, respectively. The position of the front wheels is measured using a potentiometer mounted on the front axle, yielding a position measurement with a resolution of . The position of the front wheel is measured 100 times at every 50 ms. The data are filtered by using a Savitzky-Golay filter which tends to preserve features of the distribution such as relative maxima, minima and width. After filtering process, the steering angle is found by taking the mean value of the filtered data. This procedure is repeated every 50 ms.
The speed of the tractor is controlled by using an electro-mechanic valve. Two PID type controllers are used in cascade fashion. The one in the outer loop generations the desired pedal position with respect to the speed of the tractor and the one in the inner loop generates the voltage value for the electro-mechanic valve with respect to the pedal position. Like in the measuring of the steering angle, the pedal position is measured 100 times at every 50 ms and the data are filtered by using a Savitzky-Golay filter and taking the mean value of the filtered data. Since the measured speed signal coming from the GPS is noisy, a discrete Kalman filter (KF) is used to reduce noise. A position-velocity model described in is used where vehicle velocity is assumed as a random-walk process. The KF assumes that the vehicle moves with a constant velocity between discrete-time steps. The state vector of the model used in the KF and the state transition matrix are as follows:
where , and are the state transition matrix, easting and northing velocities coming from the GPS, respectively.
V-C State Estimation
Some states of the autonomous tractor cannot be measured. Even when the states can be measured directly, the measurements will contain delay and noise. Moreover, at some time steps, no useful position data are obtained from the GPS receiver.
An extended Kalman filter (EKF) is used for state estimation. Since the GPS antenna is located at the R point on the tractor, the kinematic model in (1) is used. The discrete-time kinematic model used by the EKF is written with a sampling interval as follows:
The general form of the estimated system model is:
where is the estimation model for the system and is the measurement function. The differences between the kinematic model and the estimation model are the process noise and the observation noise both in the state and the measurement equations. They are both assumed to be independent with zero mean multivariate Gaussian noises with covariance matrices and , respectively:
Since only one GPS antenna was mounted on the tractor, the yaw angle of the tractor was not measured directly. It is to be noted that the knowledge of the yaw angle of the tractor plays a very important role in the accuracy of trajectory tracking control. The estimated value of the yaw angle is used in the inverse kinematic model to generate the desired speed and the desired yaw rate for the system. The inputs of the EKF are the position and the velocity, the velocity values from GPS and the steering angle value from the potentiometer in the front wheels. The outputs of the EKF are the position of the tractor in the x- and the y-coordinates system and the yaw angle. These estimated values are then used in the trajectory control.
V-D Experimental Results
An 8-shaped reference trajectory is applied to the system. The reference and the actual trajectories of the system, both the longitudinal and the lateral error values on the related trajectory are shown in Fig. 8, Fig. 9 and Fig. 10 for two different controllers, respectively. The results show that the control scheme consisting of a T2FNN working in parallel with a PD controller gives a better trajectory following accuracy than the one where only a PD controller acts alone. It can here be argued that the performance of the conventional controller acting alone can be improved by better tuning, but as it has already been stated that in real life, this is a challenging task; because in addition to the interactions of the subsystems, there exist unmodeled dynamics and uncertainties in real world applications. Thus, the proposed control structure, consisting of an intelligent controller and a conventional controller would be preferable in real life.
In Fig. 8, while the dotted lines show the first turns, the solid lines represent the second turns. The control accuracy for the PD controller is the same for the first and second turn which is the expected case. However, the control accuracy for the T2FNN working in parallel with a PD controller is better for the second turn. We can observe similar behaviour in Fig. 9 and Fig. 10. The mean square of the lateral error in Fig. 10 is equal to 0.2575 and 0.1803 for the case of the PD controller working alone and the case of the PD controller working in parallel with the T2FNN, respectively. The results show a performance improvement of 30% in the latter case.
Figure 11 shows the control signals coming from the conventional PD controller and T2FNN when the PD controller works in parallel with the T2FNN. As can be seen from Fig. 11, at the beginning (in the first turn), the dominating control signal is the one coming from the PD controller. After the first turn (starting from second), the T2FNN is able to take over the control, thus becoming the leading controller. Moreover, when the reference signal changes, the output of the PD controller increases. However, after a finite time, the output of the PD controller again comes back to approximately zero.
Although there exist two independent subsystem controllers in the autonomous tractor control system, the T2FNN works in parallel with a PD controller only for the control of the yaw rate of the system. Thus, the error signals for both PD controller acting alone and in parallel with the T2FNN are shown in Fig. 12. As can be seen from Fig. 12, the T2FNN significantly increases the control accuracy of the yaw dynamics of the system.
Figure 13 represents the online tuning of the parameter in (19) which weights the sharing of the lower and the upper firing levels of each fired rule. The learning algorithms derived in this paper includes a parameter adaptation rule for too and we can see the effect of this on this figure when the reference trajectory changes abruptly. It can also be observed that the change in this parameter is not very big in the second turn when compared to the first turn. During the training of the parameter q, a constraint is put to the parameter in which it is bounded between 0 and 1. When it reaches its limits, the tuning is turned off for that parameter.
In an interval TSK T2FLS, there exists a design parameter that balances the sharing of the lower and the upper firing levels of each fired rule, and this parameter can be tuned during the real-time control of the system. One novelty of this paper is that an SMC theory-based learning algorithm is proposed for the tuning of that parameter, the effect of which is evaluated in real-time for the control of the yaw dynamics of an autonomous tractor. Instead of forcing the designer to choose a fixed value for the above mentioned parameter, this study allows the system to tune it online providing an additional degree of freedom for the overall controller. The real-time results show that when the T2FNN is used in parallel with a conventional PD controller, the overall system learns the system dynamics to perform a better performance in terms of a smaller settling time and near zero steady state error. The use of the combination of fuzzy logic control, artificial neural networks and sliding mode control theory harmoniously allows us to better handle the interactions in the subsystems, uncertainties and lack of modeling information. In addition to its well-known robustness property, another prominent feature of the proposed approach is its computational simplicity.
This work has been carried out within the framework of projects IWT-SBO 80032 (LeCoPro) of the Institute for the Promotion of Innovation through Science and Technology in Flanders (IWT-Vlaanderen). We would like to thank Mr. Soner Akpinar for his technical support for the preparation of the experimental set up.
Appendix A Proof of Theorem 1
The time derivatives of (14) are as follows:
The time derivative of the strength of the rule for the lower MF in (13) is as follows:
If the parameter update rules in Theorem 1 are used, (46) is achieved:
Similarly, it can easily be shown that:
By using the following Lyapunov function, the stability condition is checked as follows: