Genetic Algorithm and Particle Swarm Optimization Based Cascade Interval Type 2 Fuzzy PD Controller for Rotary Inverted Pendulum System

This paper presents the design of an optimized Interval Type 2 Fuzzy Proportional Derivative Controller (IT2F-PDC) in cascade form for Rotary Inverted Pendulum (RIP) system.Theparameters of the IT2F-PDC are optimised by usingGenetic Algorithm (GA) and Particle Swarm Optimization (PSO). The goal is to balance the pendulum in upright unstable equilibrium position. The IT2FPDCwhich is the extended version of conventional type 1 fuzzy logic controller, improves the control strategy by using the advantage of its footprint of uncertainty for the fuzzy membership function.The performance characteristics considered for the controller are steady state error, settling time, rise time, maximum overshoot, and control energy. Experimental and simulation results indicated that the effectiveness and robustness of the proposed GAand PSO-based controllers on the RIP with respect to load disturbances, parameter variation, and noise effects have been improved over state-of-the-art method. However, the comparative results for simulation and experiment based on cascade IT2F-PDC indicate that GA-based IT2F-PDC has lower steady state error while PSObased IT2F-PDC has lower overshoot, settling time, and control energy, but both have almost the same rise time. The proposed control strategy can be regarded as a promising strategy for controlling different unstable and nonlinear systems.


Introduction
Most real industrial systems are nonlinear in nature and exhibit some level of uncertainty [1,2].In the past decade, some modern controls such as nonlinear control, adaptive control, variable structure control and optimal control were used [3][4][5].Although these control strategies exhibit a very good performance, they are also complex and difficult to implement [6].The conventional proportional integral derivative (PID) controller exhibits good performance for linear system and it is widely employed in industry due to its simple structure and robustness in different operation conditions.However, the tuning of the parameters of PID accurately becomes difficult because most of industrial plants are highly complex and have some issues such as nonlinearities, time delay, and higher order [7].Due to the complexity of most industrial plants and the limitation of PID controller, an unprecedented interest was diverted to the applications of the fuzzy logic controller (FLC).This is because it uses the expert knowledge and its control action is described by linguistic rules.Also, the FLC does not require the complete mathematical model of the system to be controlled and it can work properly with nonlinearities and uncertainties [1,2,[8][9][10][11][12][13].FLC are of two types, namely, type 1 fuzzy logic controller (T1FLC) and type 2 fuzzy logic controller (T2FLC).In T1FLC, the uncertainty is represented by a precise number in a range of (0, 1) interpreted as a degree of membership functions (MF).In view of the fact that it is too difficult to know a precise value for uncertainty, working with type 1 model is more reasonable.However, some researchers argued that, in case where there is high level of uncertainty, T1FLC has limited ability to handle it because its membership degree for each input is a crisp number [14].The T2FLC which uses type 2 fuzzy set (T2FS) was introduced to circumvent the limitations of the T1FLC.The main characteristic of T2FLC is that its MFs are fuzzy.Therefore, it has more degree of freedom in designing varieties of systems with uncertainties [1,2,8].The control performance of T1FLC can be improved by T2FLC because it has the advantage of footprint of uncertainty (FOU) that can be used to improve the corresponding MF [15].
The major disadvantage of T2FLC is that the process of tuning becomes more difficult and much time consuming for increasing number of inputs and outputs of the controller [16].This problem of tuning can be solved by using optimization methods [15,16].
Looking at Rotary Inverted Pendulum (RIP) from the control point of view, the RIP exhibits many interesting and challenging properties, such as nonlinearities and instability.The RIP is in the class of underactuated mechanical systems.These features make RIP become known widely as experimental setup for testing linear and nonlinear control algorithms [11].RIP consists of a rotational servomotor system which drives the output gear, rotational arm, and a pendulum.It has many important real applications like robotics, aerospace vehicles, pointing control, and marine vehicles [15].
Four control objectives of RIP as found in the literature are categorized as follows [17,18]: (1) swing-up control: controlling the pendulum from downward (stable position) to upward (unstable position); (2) stabilization control, that is, regulating the pendulum to remain at the unstable position; (3) switching control, that is, the switching between swingup control and stabilization control; (4) trajectory control, that is, to control the RIP in such a way that the arm tracks a desired time varying trajectory while the pendulum remains at unstable position.
Recently, a lot of research regarding the control of RIP has been published.For example, energy based compensation, PD cascade scheme, edge trigger counter, sliding mode control, type 1 fuzzy control, and adaptive control have been used for swing-up control of RIP [18][19][20][21][22][23][24].To solve the stabilization control problem on RIP, multiobjective integral sliding mode controller, microcontrollers, fuzzy logic regulator, pole placement technique, optimized PID controller, and Linear Quadratic Regulator (LQR) have been applied [7,18,20,23,[25][26][27][28].Energy was considered for switching control in [18,29], and mode controller was used for the same purpose in [20].For trajectory control, adaptive PID with sliding mode control, linear active disturbance rejection control, hybrid of linear fusion function based on LQR mapping and adaptive control with ANFIS tuning, feedback linearization based controller, and energy based compensation controller was used [17,[30][31][32].Optimized cascade type 1 fuzzy logic controller was used in [33] for controls of pendulum angle and arm angles of RIP.
To the best of the author's knowledge, at this moment there is not any kind of GA and PSO optimised type 2 fuzzy logic control applied to RIP.A cascade control method is effective for a system with high level of disturbances and large time error such as the RIP [24].Also, as mentioned earlier type 2 fuzzy control strategy is effective and gives robust control response for systems with high level of uncertainty and/or inaccurate model.Putting type 2 fuzzy in cascade topology will have the advantages of type 2 fuzzy, and cascade structure which will eventually give more robust controller for system with uncertainties and large time error [33].
In this paper, the IT2F-PDC is designed in cascaded form for RIP.The parameters of the IT2F-PDC are optimised using Genetic Algorithm (GA) and Particle Swarm Optimization (PSO).The GA and PSO were chosen in this research in view of the fact that these algorithms are more established in the literature than other evolutionary algorithms [34,35].In addition, the GA and PSO have proven to improve performance over other algorithms in solving optimization problems [36,37].The goal is to balance the pendulum in upright position.The servo behaviour (reference tracking) of RIP is analysed.Disturbances rejection of the proposed controller is analysed by adding the internal noise and external disturbance to the system.Also, the controller is applied on the real RIP to validate the simulation results.The performances of GA and PSO for the optimization of the parameters of IT2F-PDC were compared.Also, the designing of IT2F-PDC as an optimization dilemma that slightly altered five performance indices was formulated which includes steady state error, settling time, rise time, maximum overshoot of the response, and control energy of the system.
The organisation of the paper is as follows.Section 2 introduces the RIP, Section 3 gives brief on fuzzy logic system, IT2FL-PDC, and the design of cascade IT2-PDC, and Section 4 defines optimization method and gives some basics on GA and PSO.The formulation of the problem is discussed in Section 5.Sections 6 and 7 present the simulation and experimental results, respectively.Finally, Section 8 presents conclusions.

RIP
The RIP is in the class of underactuated mechanical system, consisting of a servomotor system that drives the output gear.The rotational arm is attached to the output gear and a pendulum is attached at one end of the rotating arm as shown in Figure 1(a).The arm is driven by the gear with the aim of balancing the pendulum in an upright position.The angle () is the angle of the arm and its direction depends on the direction of the control voltage (  ) (voltage applied to the servomotor).In this study, the counterclockwise direction is considered as positive direction for the arm and the clockwise direction is the positive direction for the pendulum.The servomotor drives the rotating arm to move in horizontal plane  in such a way that it sets the pendulum to the inverted position in the  direction, perpendicular to the arm.() is the pendulum angle.Figure 1(b) shows the picture of the experimental setup using Quanser RIP.

Nonlinear and Linear Dynamics Model of RIP.
The dynamic equations that describe the motion of rotary arm and the pendulum with respect to the servomotor voltage were obtained using Euler-Lagrange equation, which is the systematic way of obtaining the equation of motion [38].Once the kinetic and potential energy are obtained and the Lagrangian is found.Subsequently, the task is to compute various derivatives to get the equations of motion of the system.After going through the process, the nonlinear equations of motion for the RIP can be found [38].Considering the total length of the pendulum (  ), viscous damping coefficient is seen at the pivot axis for arm and pendulum (  ) and (  ), respectively, and moment of inertia about the centre of mass for arm and pendulum (  ) and (  ), respectively.The nonlinear equations of motions of RIP are found as follows: Let (1) be called nonlinear 1. Alternatively the nonlinear equation of RIP can be found in (2) when the length of the pendulum from its centre of mass (  ), equivalent moment of inertia as seen at the load ( eq ), and equivalent viscous damping coefficient as seen at the load ( eq ) are considered.Let (2) be called nonlinear 2. Consider The torque () at the load gear is generated by servomotor and is described by The linearized model of the nonlinear equations of RIP can be found by substituting sin() =  and cos() = 1 in nonlinear equation [33] and presented in matrix form in ( 4)- (7).The summary descriptions of the parameters and their values are given in Table 1.Consider where The open loop poles for the proposed RIP system are  = [0, 7.491, −18.04, −5.6596].The system has one pole at the right hand side of -plane which confirms that the proposed RIP system is unstable.Therefore, before continuing with any control action, the test for controllability of the system has to be done, in order to check for the rank of the matrix  in (8).
If  has full rank then the system is controllable [39]: The matrix  has full rank; then the system is controllable, meaning that the RIP system has complete state controllability.Initially the pendulum is positioned in an inverted position with very small displacement (0.005 ∘ ), and then it is allowed to fall by applying a pulse signal to the model.The simulation results show that nonlinear 1 and nonlinear 2 are similar and their behaviours are the same for both pendulum angle and arm angle.This shows that nonlinear 1 and nonlinear 2 can be considered as nonlinear model of the RIP because nonlinear 1 has already been proved and used in [33].The linear model depicts the nonlinear pendulum motion for the first 1.3 seconds, until it attains 21∘; then it began to deviate from the actual motion.The response shows that the whole system is nonlinear and unstable.

Fuzzy Logic Controller
A concise overview of FLC was presented in this section with the intention of providing the basic knowledge needed to understand the basic idea and formulation of interval type 2 fuzzy logic controller.

Interval Type 2 Fuzzy Logic System (IT2FLS).
The idea of fuzzy logic systems and T2FS was pioneered by Zadeh in 1965 and1975, respectively [40,41].The uncertain knowledge is used to build the fuzzy logic rules which leads to uncertain antecedents and consequents of the rule to be uncertain, which can not be handled by conventional type 1 fuzzy set MF.This leads to the introduction of type 2 fuzzy logic which can handle the issue of uncertainty by using the advantage of FOU [2,12].All the secondary grades of the IT2FS are equal to 1, and it is completely described by upper MF and lower MF (UMF and LMF).IT2FLS and its associated quantities.Also the corresponding secondary MF is shown in Figures 3(b) and 3(c).
T2FLS and T1FLS are similar in terms of their normal architecture.The main difference between them is in their structure.The defuzzifier block in type 1 fuzzy is substituted with the output processing in type 2 fuzzy comprised of type reduction and defuzzifier blocks [15].The block diagram of T2FLS is shown in Figure 4.

Inference.
The inference mechanism in T2FLS is like the one in type 1 fuzzy.It is a rule combination to produce a mapping from input T2FSs to output T2FSs.It is necessary to calculate the intersection, union, and composition of type 2 relations in order to realise this mapping [15].The T2FS Ã whose MF is  Ã = ∩  =1    (  ), where   ( = 1, . . ., ) are level of fuzzy sets describing the input.The result of type 2 input and antecedent process which are in the firing set ∩  =1     (   ≡   (  )) is an interval type 1 fuzzy set as in ( 11)-( 12) [9]: where 3.5.Output Processing.The output processing constitutes the type reduction that generates type 1 fuzzy set and defuzzifier that converts the generated type 1 fuzzy set to the crisp output [15].In this paper, the Wu-Mendel uncertainty bound method was used to approximate the type-reduced set, and LFM  Ã (x 1 ) (a)
Karnik and Mendel (KM) algorithm was used for calculating the two end points of centroids of   and   [14] presented in Once  1 and   are found then the average of  1 and   is taken so that the output of the defuzzifier of an interval singleton type 2 fuzzy is as follows: 3.6.Cascade Interval Type 2 Fuzzy Logic PD Controller.In this paper, the cascade controller was designed for RIP.The RIP is a single input multiple output (SIMO) system.In SIMO systems, change of one output by some disturbances affects the control of the other output [33].Considering nonlinearities behaviour of RIP system, it is difficult to achieve the past settling time.Also it has high level of disturbances and large time constant.For system like this the best control strategy is cascade because it has the advantage of attenuating the effect of disturbances and improving the dynamics of entire control loop [24].The structure of the cascade interval type 2 fuzzy logic PD controller is shown in Figure 5.Both controllers have two inputs and one output.
The overall architecture comprises the outer and the inner controllers.The input of the inner controller is the error  2 () and change in error Δ 2 (), its output is the control voltage to the servomotor   (), and three gains  4 ,  5 , and  6 are used to scale  2 (), Δ 2 (), and V  (), respectively, as shown in where  is the instance sampling, () is the control signal from the outer loop, and () is the arm angle.The input of the   outer controller is the error  1 () and change in error Δ 1 (), its output is the control signal to the inner loop (), and three gains  1 ,  2 , and  3 are used to scale  1 (), Δ 1 (), and (), respectively, as shown in where   and  are reference pendulum angle and pendulum angle, respectively.These scaling gains ( 1 ,  2 , . . .,  6 ) are adjustable parameters just like in any PID controller, and they are used to calibrate input and output [11].The excellent performance of the controller depends on the values of these gains [16].The trial-and-error approach can be used to find appropriate values of the gains but it is not feasible, so there is a need of using a systematic procedure which is easier for finding the optimised values of these gains.In this paper GA and PSO are used (Table 3).The triangular MF of T2FS was used and it is defined in the input and output spaces as shown in Figures 6(a) and 6(b).These MFs are the same for both two input variables ( and Δ) and they are applied to both controllers (inner and outer).The fuzzy rules of IT2F-PDC are shown in Table 2.Where NL, NS, ZO, PS, and PL are negative large, negative small, zero, positive small, and positive large respectively.

Optimization Method
Optimization refers to a class of soft computing techniques that relate to obtaining the optimal or satisfactory or best solution for a particular problem, and the solution may be absolutely best out of some other possible solution [42].GA and PSO are stochastic global optimization techniques.Over the past years GA has received a considerable attention and it is applied for searching the optimal fuzzy parameters which lead to the genetic fuzzy system [9,10].Although GA is successful in so many applications, sometimes it has a problem of getting trapped before it reaches the optimal region of the search space, especially for multimodal and highly dimensional problems [43,44].The advantages that make PSO attract more attention are as follows: the particles in PSO have memory, all the particles retained the knowledge of good solution so far, and there is a constructive cooperation among the particles, meaning the particles in the swarm share the information among themselves [45].[46].It is based on Darwin's ideas.Darwin's stated that, in a competing environment, the stronger individuals are more likely to be the winners [47].GA is a metaheuristic search algorithm based on natural selection and genetic process [46,47].In GA, the potential solution to a problem is an individual which can be represented by the set of parameters.These parameters are just like a gene of a chromosome and can be represented by the string of values in binary form [46].The fitness value is used to test the degree of goodness of the chromosome for solving a problem that is directly related to the objective value.The operators employed in a simple GA include selection, crossover, and mutation [46].GAs are often regarded as function optimizers and they have been applied in many optimization problems such as energy consumption [48].In particular, the use of GAs for fuzzy systems design equips them with the adaptation and learning capabilities which bring about genetic fuzzy systems [10].

Particle Swarm Optimization.
The PSO was introduced in 1995 by Eberhart and Kennedy [49].PSO is metaheuristic search algorithm based on social and population behaviour, just like flocking of bird or fish schooling.The population in PSO is called swarm that can contain many particles.Each particle in PSO updates its velocity based on (17) [49,50].Consider where  best is the best position attained for the individual particle and  best is the best position attained for the particle among all the population.  is the position of particle ,  1 and  2 are random numbers between 0 and 1,  1 and  2 are position constants learning rate, and  is the constriction factor.Each particle changes its position toward the  best and  best based on the updated velocity as given in ( 18) [51].Consider The velocity is restricted within [− max , + max ].If the velocity deviates from this range it has to be forced to be within the range [50,51].
The following steps are used for the implementation of PSO algorithm.
Step 1. Specify the upper and lower bounds of the controller parameter and generate the particles randomly; the values of the performance criteria in time domain are calculated iteratively by sending each controller parameter (particle) to Matlab Simulink; after that, the cost function is evaluated for each particle according to these performance criteria.Then evaluate each particle in the initial population using the objective function and search for  best and  best .
Step 2. Calculate the velocity and the constriction factor for the particles and check for the maximum velocity; then update the velocity and position of each particle.
Step 3.For each particle,  best is reset in comparison with the previous  best through fitness of objective function; then  best is updated in comparison with best  best .
Step 4. If one of the terminating conditions is satisfied, then stop; else go to Step 2.
Step 5.The particle that has the latest  best is an optimal parameter.
The trial-and-error method commonly used in the literature [52] was used for the selection of PSO and GA parameters: For PSO method, number of particles = 25; position constant learning rate  1 =  2 = 2; maximum iteration = 150; and constriction factor = 0.4.For GA method, number of individuals = 25; crossover rate = 0.5; mutation rate = 0.1; maximum generation = 150; also the type of operators used for each population in GA is linear ranking selection algorithm, simple crossover, and uniform mutation.Both algorithms are implemented in Matlab and each of the methods is tested in 60 independent runs with 60 distinct initial trial solutions.All these were conducted in Matlab R2013a, 2.4 GHz processor with 8 GB RAM.

Problem Formulation
In this research, the performance index which consists of control energy (  ), steady state error ( ss ), settling time (  ), rise time (  ), and overshoot (  ) was considered.The appropriate IT2FL-PDC parameters that minimize the performance index were searched, and the cost function proposed is given in In this study, the weighing factor () was considered to be equal to 1.The standard deviation () and the mean value () of cost value of each individual were examined in order to measure the dynamic and convergence characteristic of the proposed methods.The standard deviation is used to measure the convergence speed while the mean value is used to measure the accuracy of the algorithm.Equations ( 20) and (21) show the formula for calculating  and , respectively [53].Consider where  is the population size and cost   is the individual cost value.

Results and Discussion
For us to see the convergence characteristics of the controllers, two simulations are performed (mean and standard deviation).Figure 7(a) shows that both controllers (GAbased and PSO-based) secure stable mean cost value, using the same simulation conditions and cost function.simulations, but the rise time is almost the same for both PSO and GA in all simulations.
6.1.Reference Tracking.In this section, the servo behaviour (reference tracking) has been analysed by using two different values of reference pendulum angle (  ).First   was set to be equal to zero; that is, the pendulum is at equilibrium upright unstable position and we want to control it to go to a stable position, Figures 8(a), 8(b), 8(c), and 8(d) show the best results of the pendulum angle, arm angle, output of outer controller, and the control voltage to the servomotor, respectively.Second   was set to be equal to  (180 ∘ ); that is, the pendulum is at stable position and we want to control it to go equilibrium upright unstable position.Figures 9(a), 9(b), 9(c), and 9(d) show the best results of the pendulum angle, arm angle, output of outer controller, and the control voltage to the servomotor, respectively.

Disturbances Rejection Analysis.
The internal noise and external disturbance was added to the system in order to test for the robustness of the proposed controllers as follows: A load of 0.052 m height and 0.045 kg mass was added to the end of the pendulum, also, the white noise of 0.00634 power and 5% parameter value changes was added to the process output as shown in Figure 10.The simulation results shown in Figure 11 indicate the effectiveness and robustness of the proposed controllers.

Validation and Comparison
The experiments were performed on Quanser SRV02 RIP setup.The US Digital S1 single-ended optical shaft encoder that can offer a high resolution of 1024 lines per revolution (4096 counts per revolution in quadrature mode) was used for measuring the pendulum angle and arm angle.The power amplifier used was VoltPAQ-X1.The data acquisition device used was Quanser Q2-USB.The experimental results that compared the proposed controllers and the conventional energy based controller for pendulum angle, arm angle, and control voltage to the servomotor are shown in Figures 12(a), 12(b), and 12(c), respectively.The time starts from zero in order to show the performances from the swing-up to the balance mode.Looking at the real plant's results, some initial oscillations were noticed due to the swing motion needed to bring the pendulum from stable position to the vertical unstable position.Also the two controllers (PSO-based and GA-based) manifest the considerable level of robustness.On the other hand, the conventional energy based controller manifests a lot of oscillations before it becomes stable.The time taken to reach the steady state is higher for conventional energy based compared to type 2 fuzzy (for both PSO-and GA-based) controllers.The experimental results agreed with the simulation results as shown in Figures 8, 9, and 10 which justifies the availability of the system models and conforms the performance of the proposed methods.Experimental and simulation results indicated that the effectiveness and robustness of the proposed controllers with respect to load disturbances, parameter variation, and noise effects have been improved over state-of-the-art method.In summary, it can be concluded based on the evidence emanated from the experiment results that the GA-and PSO-based controllers have advanced the performance of the conventional energy based controller on the RIP.

Conclusions
In this study, a cascade type 2 fuzzy logic PD controller was designed with the aid of optimization methods realised by GA and PSO.The application of the proposed controller was tested for controlling the pendulum angle and arm angle of RIP system which is highly nonlinear and unstable.The  model of the RIP was also realised in two different ways, and the architecture of type 2 fuzzy PD controller was discussed.
The comparative analysis was done in order to test the performance of the proposed controllers in terms of reference tracking and the disturbances rejection.Both the simulations and experimental results show that both PSO and GA can be used effectively for optimization of parameters of the proposed controller.Moreover, based on this study, PSO and GA optimized cascade type 2 fuzzy PD controllers show some certain level of robustness when subjected to noise and disturbances; also they outperformed the conventional energy based controller in terms of the performance criteria such as steady state error, settling time, rise time, and maximum overshoot.However, in case of GA and PSO in some performance criteria PSO is better than GA, for example, maximum overshoot (PSO has some improvement over GA, which is between 18.0% and 22.75%), settling time (PSO has lower settling time between 1.31 sec and 2.34 sec), and control energy (PSO requires a low control energy between 17.094 J and 20.995 J).For other performance criteria, GA is better than PSO, for example, steady state error (GA has steady state error between 0.0009 and 0.0028 while PSO has steady state error between 0.0029 and 0.0099).In case of rise time both GA and PSO have almost the same rise time of 0.0089 sec in all the simulation.In summary, it can be concluded based on the evidence emanated from the experiment results that the GA-and PSO-based controllers have advanced the performance of the conventional energy based controller on the RIP.The proposed control strategy can be regarded as a promising strategy for controlling different complex systems which are unstable and nonlinear.
General type 2 fuzzy logic controller which has more degree of freedom than interval type 2 fuzzy logic controller is recommended for future work on RIP control.Also, more powerful evolutionary optimization algorithms like hybrid
Model of RIP.The open loop responses for nonlinear 1, nonlinear 2, and linear dynamic of RIP are shown in Figures 2(a) and 2(b).

Figure 3 :
Figure 3: (a) FOU of Triangular MF of type 2 fuzzy logic and its associated quantities (b) and (c) the corresponding secondary MF.

Figure 7 :
Figure 7: Tendency of convergence of (a) mean value of cost function, (b) standard deviation of cost function.

Figure 8 :
Figure 8: Simulated results for   equal to zero: (a) pendulum angle, (b) arm angle, (c) output of the outer controller, and (d) output of inner controller (control voltage to the servomotor).

Figure 9 :
Figure 9: Simulated results for   equal to : (a) pendulum angle, (b) arm angle, (c) output of the outer controller, and (d) output of inner controller (control voltage to the servomotor).

Figure 10 :
Figure 10: Cascaded type 2 fuzzy PD controller with source of noise.

Figure 11 :
Figure 11: Simulated results for system with disturbances: (a) pendulum angle, (b) arm angle, (c) output of the outer controller, and (d) output of inner controller (control voltage to the servomotor).

Figure 12 :
Figure 12: Experimental results comparing the conventional energy based controller and IT2F-PD controller (PSO-based and GA-based): (a) pendulum angle, (b) arm angle, and (c) control voltage to the servomotor.

Table 1 :
The summary of the parameters values of RIP.

Table 4 :
Best results of the cascade IT2FL-PDC for RIP system obtained by GA and PSO in 60 runs.

Table 4 .
It can be observed that the percentage overshoot is lower for PSO-based method compared to each correspondent GA-based method.The improvements in overshoot are 22.75% (for   = 0, no disturbances), 20.1% (for   = 0, with disturbances), 22.2% (for   = 180, no disturbances), and 18.0% (for   = 0, with disturbances).The settling time is smaller in GA-based method in all the Mathematical Problems in Engineering