An Intelligent Controller Based on LAMDA for Speed Control of a Three-Phase Inductor Motor

Three-phase induction motors are widely used in the industrial field due to their low cost and robustness; therefore, it is essential to continuously develop new proposals that improve their behavior and response in applications where speed control is required. This paper proposes the development of an intelligent controller programmed in a PLC and interconnected with a three-phase induction motor through a VFD. The novel intelligent controller bases its operation on the LAMDA algorithm, which acts as a decision-making system based on the state of the error with respect to the speed reference and its derivative, obtaining a closed-loop controller. In addition, the VFD receives commands from the PLC to operate the motor at a constant voltage-frequency ratio in which flux remains constant. The proposed controller has been validated in two study cases: i) reference changes and ii) rejection of disturbances. The results obtained are promising and show a good performance of the LAMDA controller when compared qualitatively and quantitatively with the controller most commonly used in industrial systems, such as PID, and controllers with similar characteristics, such as fuzzy, based on Mamdani and Takagi-Sugeno inference.

Control [13].On the other hand, FOC and DTC strategies are not embedded by default in all the VFD used in industries, especially in small or older ones, depending on the hardware capabilities.Therefore, it is important to analyze alternatives for control strategies with conventional VFD using elements like velocity sensors for motor feedback and a Programmable Logic Controller (PLC) for control algorithms.In this context, it is well known that closing the loop improves the system's transient and steady-state responses; decreasing the overshoot and the settling time, however, is necessary to get a feedback signal.In FOC and DTC, the motor's velocity is estimated by parameters based on current measurements without direct feedback from the axis of the motor.In this context, we can point out some keys to our approach:  Direct Measurement of the feedback variable (velocity) and not by an estimation;  Possibility of using low-cost or old VFDs;  Avoid problems due to failures in current sensors;  Avoid the implementation of complex methods for estimating the rotor speed (hardware processing capabilities).
To implement the proposed control algorithm, it is necessary a hardware that can run the instructions to be programmed.Gupta & Sharma (2005) [14] discussed the selection of three alternatives for implementing advanced control systems: Programmable Logic Controller (PLC), Distributed Control System (DCS), and PC-based systems, where some features such as cost, environment operation, I/O signals, and interfacing capabilities, among others, are presented.In the specific case of the PLC, its robustness, reliability, and cost-benefit ratio made it an ideal candidate to be used with complex control systems in a variety of applications [15].The PLC is commonly used with other industrial hardware like VFD, sensors, actuators, and Human Machine Interfaces (HMI) among others.However, the development, programming, and implementation of complex control algorithms inside it are limited.
One of the most common control algorithms used in the industry is the Proportional Integrative Derivative (PID) control, with its variants PI and PD.This algorithm is widely applied in the industry because of its simplicity and easy implementation in PLC-based control systems [14].Even though the PID algorithm is traditionally implemented in PLCs at the industrial level, the development and continuous growth of technology, and hence the PLC process capabilities, have allowed the user to be capable of implementing new control strategies that satisfy new demanding applications.
In this context, several investigations and real-field industrial applications that use control strategies implemented in PLC systems involve the use of Fuzzy control techniques, which are well documented in some works like [16][17][18][19][20]. On the other hand, the simplicity of fuzzy control logic implementation represents an opportunity to be used even at the microcontroller level [21].The use of fuzzy strategies as an expert system applied to PID constant regulation is an approach that must be considered when a PLC with a close loop system is going to be implemented to control complex and nonlinear plants [22].In the same way, some works present different perspectives on Fuzzy Logic Control (FLC) applied to induction motors based on PLC built-in implementation [23][24][25] or remotely via a PC and a network [26].
Nowadays, the industry is oriented principally towards the use of three-phase induction motors because of their versatility and performance; however, their control represents a challenge, especially due to the varying dynamics produced by the load behavior.Commonly at the industrial level, its control is performed by a VFD [27,28].However, to improve its performance response, it is necessary to use new algorithms along with signals and sensor feedback that close the loop and whose main controller is the PLC [29].
One of these algorithms, belonging to the field of Artificial Intelligence is the Learning Algorithm for Multivariate Data Analysis (LAMDA) [30], which has been used in several applications for classification and clustering.Some examples are the applications of Fault Detection and Isolation to detect the operational states (normal or abnormal) of systems with the data gathered from sensors [31,32].The performance of LAMDA in classification has been improved with two proposed methodologies, LAMDA-FAR [33] and LAMDA-HAD [34], and in the field of clustering, LAMDA-RD [35] and LAMDA Triple π Operator (LAMDA-TP) [36] have demonstrated that clustering can be improved using automatic merge algorithms.Recently, LAMDA has been proven to obtain a satisfactory model for control systems, by driving the plant from its current functional state to the desired state using an inference method that assigns a numerical value to the controller output.The operation of the LAMDA controller has been tested and validated through simulations in different systems such as HVAC (Heating -Ventilation -Air conditioning) humidity, and temperature control, which by its large number of parameters, are complex to model [37,38].
The LAMDA controller has also been combined with the SMC (Sliding-Mode Control) approach to obtain a control algorithm that does not require a detailed plant model and that turns out to be robust against system changes and disturbances [39].This proposal has been tested and validated in robotic systems and chemical processes.Additionally, we have proposed an Adaptive LAMDA [40] for modeling and control of systems, modifying the LAMDA structure by adding layers that operate like neural networks but with the benefit of having a fixed number of layers (five for the proposed model) whose calibration is not trivial.This approach has a training stage to establish initial values for the controller and an application stage with online learning to update the estimated model and compute the control action.This proposal has proven to be adequate for systems with uncertain dynamics.Based on the above, the LAMDA controller can be a great alternative in the industrial field for speed control of three-phase induction motors.
The main motivation in this paper is the development of a new proposal based on artificial intelligence for closedloop speed control of a three-phase induction motor in systems that do not have latest technology VDFs.This new approach does not require a detailed mathematical model of the plant; however, its design is simple and does not require complex mathematical calculations.This paper presents as the main contributions, the following:  The development and implementation of a controller based on LAMDA to be programmed in a commercial PLC of the model Modicon M580 which is widely used in industry.
 The experimental validation of the proposed LAMDA controller which has only been tested in simulations but not in real applications.
 A comparative qualitative and quantitative performance analysis with other well-known controllers such as PID, Fuzzy with inference of Mamdani and Fuzzy with inference of Takagi-Sugeno.
This paper is structured as follows.In Section II is presented the background of LAMDA and is fundamentals in the field of control.Section III details the implementation of the LAMDA controller for speed control of an induction motor in closed loop and the hardware used for the validation.Section IV presents the experiments and results of the proposed controller applied to the system and a comparative analysis with other controllers, and finally, Section V describes the conclusions of this paper.

2-LAMDA Controller
The Learning Algorithm for Multivariate Data Analysis (LAMDA) [30,41] is an algorithm from the Artificial Intelligence, initially developed for classification and clustering.The algorithm identifies functional states of a system through the adequacy degree concept.LAMDA takes as input the descriptors of an object  = [ 1 ; . . .;   ; . . .;   ], and performs a similarity analysis with the existing clusters/classes  = { 1 ; … ,   , . . .;   }.This similarity analysis is based on the calculation of membership degrees.
The descriptors of the object X must be normalized in a range between [0,1] since each of them can work in different dimensions.This normalization is done considering the maximum value of the descriptor   :   and the minimum value of the descriptor   :   using Equation 1: where ̅  is the normalized descriptor j of the object X.

2-1-Marginal Adequacy Degree (MAD)
The Marginal Adequacy Degree computes the similarity of a descriptor with the same descriptor in each class/cluster.A probability density function as the Gaussian is used to compute the MADs.This function uses the average value of the descriptor j belonging to the class  ( , ) and the standard deviation of the elements in the class/cluster  , [33]: where  , is the number of data of the descriptor j in the class k.
The values  , and  , are computed or established in the training stage based on the individuals in each class.Also, LAMDA has a Non-Informative Class (NIC) which is created with the values  , = 0.5 and  , = 0.25.The NIC is used to identify objects that do not belong to any pre-existing class or cluster.

2-2-Global Adequacy Degree (GAD)
The Global Adequacy Degrees are a combination of the MADs.The GADs are computed with fuzzy logic operators as the Dombi operator which measures the membership degree of one object to each class.The Dombi operator are linear interpolations between any of the T-norm "T(a,b)" and the S-norm "S(a,b)" presented by Morales et al. (2020) [34], and can be computed as: where ,  are the MADs in the class  to be operated with the T-norm and the S-norm, and  ≥ 1 is the sensitivity.
The GAD for the object  ̅ to each class  is computed by the combination of T-norm and the S-norm considering an exigency parameter  ∈ [0,1] as: In Equation 5, if α increases, then the algorithm is stricter [42], while if α decreases it becomes permissive.
Once GADs are computed, LAMDA is able to determine the system current state, however it is necessary that the algorithm takes it towards the desired state.
In previous works [38,43], an inference method has been proposed to make LAMDA work as a controller.The inference mechanism consists of defining rules based on the possible classes of the input descriptors to the system.The definition of rules requires the expert's knowledge of the system to be controlled to define the control action that makes the states of the system approach the desired value.
The expression based on fuzzy logic that establishes the behavior of the control action considering the LAMDA classes is: where  () is the rule , ̅  is the descriptor  of the object  that takes values of the universe of discourse   .The output   is defined on a universe of discourse .  = {   :  = 1,2, … , } is a fuzzy set on   with  the number of linguistic values, and   is a fuzzy set on .
The inference mechanism applied to the algorithm is based on the GADs of LAMDA.The first order Takagi-Sugeno inference method is used [44], where   is a weight assigned to each class.Equation 8 is proposed in order to calculate the crisp output (controller output): where u is the controller output, and ξ is the adjustment parameter for saturation of the output of the controller.The value of ξ is obtained by: Based on Equation 8, the controller output depends on the GADs and the centers of the classes  , defined in the training stage and remains fixed during the online operation of LAMDA as a controller [43,45].
The operating scheme of the LAMDA controller is shown in Figure 1 in which each of the stages is detailed from obtaining the normalized descriptors, to the calculation of the control action or through the defuzzification of the algorithm.
Finally, for the operation of the controller it is necessary to define which are the descriptors that will be used at the input of the LAMDA algorithm, in our case the error and the derivative of the error are required, therefore n=2:

3-LAMDA Controller for Speed Control of an Induction Motor
The system used to validate the operation of the controller consists of the hardware shown in Figure 2, in which the PLC Modicon M580, the VFD connected to the three-phase induction motor, the encoder coupled to the motor, and its signal conditioning circuit can be seen.

Figure 2. Hardware of the Implemented System
The complete system consists of closed-loop control for motor shaft speed.The LAMDA intelligent controller is programmed in the PLC Modicon M580 which sends a control signal between 0 to 10[V] so that the VFD changes the frequency applied to the motor through a V/f control in a range of 0 to 60 [Hz].The motor shaft is coupled to the OMROM E6C2-C encoder whose signal is conditioned to be read by the analog input of the PLC and close the loop.The designed and implemented algorithm in the Modicon M580 for the closed loop speed control of the motor shaft is the LAMDA intelligent controller.As described in Section III, the LAMDA controller analyzes the data to discover possible relations between inputs and outputs.These relationships are based on rules defined by an expert who knows the behavior of the plant.
To understand the behavior of the plant (VFD-Motor), an identification stage is required.The method consists of applying an input signal to the system and observing the behavior of the system output (speed of rotation of the motor shaft).A step signal of amplitude 10[V] (100% input change) has been applied to the input u(t), which starts at 2.7 [s] as shown in Figure 3, then the behavior of the system output is observed in response to that input, which is shown in Figure 4, this method is known as reaction curve [46].
Then the plant model considering Equation 12 is: Figure 5 shows the control scheme in which the system components can be seen.The approximate model presented in Equation 18is used for the design of model-based controllers, however for the design of the LAMDA controller it is only necessary to know the gain of the process to establish the rules and define the classes for the controller to operate as required.

Figure 5. Closed-loop control scheme and components of the system
The inputs of the controller are () and ().Where () is the error obtained from the difference between the reference and the system speed output, while () is its derivative.These variables are selected to take the system to the desired zero state, where the error and its derivative are zero.
The approximate model of the plant corresponds to a FOPTD (see Equation 18), thus a LAMDA-PID controller which has the proportional, derivative, and integral part is required to correct the output of the plant in a transient state and in a steady state.The inputs of the LAMDA controller block are the error () and its derivative () therefore the output corresponds to a proportional and derivative control action   ().If the control action   () is integrated and multiplied by   , an output of the type   () is obtained and finally the control action applied to the plant is computed as follows: Adding the two control actions: where [  +     ] is the proportional gain,     is the integral gain and   is the derivative gain, and ,  are transformation coefficients from the universe of real numbers to the fuzzy logic.Finally, the added blocks have scaling gains   ,   ,   for tuning the response of the controller.Finally, the centers considered for the different fuzzy classes   and their respective weight in the consequent   are presented in Figure 6, considering that they are the training data for LAMDA operation.25 classes are defined for each controller, setting the centers as a combination of the following sets:

4-Experimental and Results
The LAMDA control scheme discussed in Section IV is tested in two scenarios: reference changes and regulation with added disturbances to the motor shaft.These tests are performed separately to clearly visualize the behavior of the controller in terms of system output and control action.A qualitative and quantitative analysis is carried out comparing the performance of the LAMDA controller against other controllers with similar characteristics based on artificial intelligence, such as Fuzzy controller based on Mamdani inference, Fuzzy controller with Takagi-Sugeno inference, and the PID controller that is widely used in the industrial field for its ease of implementation and calibration.
The performance metrics to carry out the quantitative analysis are the Integral Square Error (ISE), an index that penalizes large errors, especially in the transitory stage, and the Integral Absolute Error (IAE), an index that eliminates small errors, that is, when the output of the system approaches the steady state.The indices are calculated using the Equations 25 and 26.
The calibration of the scaling gains of the PID controller is based on the Quarter Decay Ratio method proposed in Smith and Corripio [46], which gives the values   = 0.0042,   = 2.75 [],   = 0.687[], In the other hand, the fuzzy controllers and LAMDA have been calibrated with the same constant values to make a fair comparison, these values are   = 0.002,   = 7000 [],   = 0.5[], These values have been obtained empirically minimizing the Integral Square Error.

Figure 8. Comparative response of the output of the system (motor velocity) for reference changes
Figure 9 shows the control action produced by the controllers in response to these reference changes.Based on the results shown, from the qualitative point of view it is observed that the controller that reaches the speed references in the shortest time is the LAMDA, where it is evident that the overshoot (Mp) produced is lower in the face of all the applied step changes.

Figure 9. Comparative response of the control action for reference changes
The results of this test show that all the control strategies can bring the motor speed to the desired values.Sensormeasured velocity feedback allows system output to be monitored, allowing controllers to calculate the desired control action to reduce error.Figure 8 shows that the error decreases at all reference changes; however, there are some differences in the behavior of the controllers.In the zoom of Figure 8 it is observed that the performance of LAMDA in terms of overshoot is very similar to that of the Fuzzy based on Takagi-Sugeno (Fuzzy-TS), however, at the reference of 300[] it is observed that LAMDA reaches much faster the reference removing the steady state error during the time of the experiment.This behavior is achieved since LAMDA calculates the controller output using the GADs which smoothest the controller response.
The overshoot of the Fuzzy-Mamdani reaches 4% when a speed of 1500 [] is required and increases even more for the speed of 300 [RPM], that is, it is a more aggressive controller and takes longer to reach the reference.On the other hand, the control action of the PID converges to the reference asymptotically, so there is no overshoot, however, it requires more time to settle on the desired setpoint.
The control actions are seen in detail in Figure 9, in which similarity is observed between them, however, certain behavior that differs in each of the tested controllers is observed.For example, it is noted that the Fuzzy-TS is the most aggressive considering that its peak in the transient stage reaches up to 9.5[], therefore, if we compare it with the LAMDA controller, it shows that it has a maximum peak at 8.8[] (8% softer), which is convenient since this prolongs the life of the equipment (VFD).The control action of the Fuzzy-Mamdani is more aggressive than LAMDA, which produces higher magnitude overshoots, while the PID has an extremely smooth control action that delays the system to reach the reference.In general terms, LAMDA presents a balanced control action between response time and aggressiveness, which makes it possible to note that in the event of reference changes it would not produce excessive energy consumption to reach the reference and therefore reduce the error in steady state.
The quantitative analysis is performed based on the ISE and IAE whose results are shown in Figure 10 and as is shown in the qualitative analysis, the LAMDA controller has the best performance.The values obtained show that all the controllers present a similar performance in the transient stage, however, LAMDA stands out with its IAE because this is around 20% lower than other proposals, that is, in steady state has better behaviour.

4-2-SCENARIO 2: Regulation with Added Disturbance
In this scenario, the response of the system is evaluated considering the disturbance produced by applying a load to the motor shaft when it is working in a speed regulation task.The desired speed is 1000[RPM] and at the time t=10[s] a load is applied to the motor shaft which causes it to slow down the speed due to torque.Then, at the time t=30[s], the load is removed to observe the response of the controllers.With this added disturbance, it is possible to observe the behavior of the controllers, considering that they must quickly lead the system output to the desired reference.Figure 11 shows the system speed output and Figure 12 presents the control action obtained by each control proposal.The controllers used in this test have been able to reach the desired reference in the presence of disturbances, reducing the error that occurs when the motor shaft torque increases and therefore an increase in load.It should be noted that the same magnitude of the disturbance was added in each experiment.The graphs show that the Fuzzy-TS controller presents an output that quickly corrects the disturbance, causing the speed to drop only 16% and recovering to the reference with minimal overshoot but maintaining a slowly decreasing steady state error.The Fuzzy-Mamdani controller presents a smoother behaviour that causes the speed to decrease by 29.5% to recover and approach the reference, maintaining a similar behaviour to the PID that decrease the motor speed up to 37%, which is not convenient.On the other hand, the LAMDA controller allows the motor speed to decrease up to 21% and quickly establish itself at the desired reference.Once the load is removed, the controllers reduce the voltage applied to the load to reduce the speed, however, the one that corrects in less time and with a more adequate control action is the LAMDA controller.It can also be noted that LAMDA presents a peak that reaches 8[V], which causes the reference to be quickly reached.This voltage reached is the highest of all the controllers, but it allows it to stabilize at the desired value in less time.The control action obtained by each proposal makes it possible to reduce the error produced by the increase in load, however it is important to point out that the faster the reference is reached, the lower the energy consumption will be.This is an aspect of interest in the industrial field, demonstrating that the LAMDA proposal is viable in its implementation when it is required to have excellent disturbance rejection characteristics in real systems.
From the quantitative point of view, evaluating the performance indexes, it is evident that the LAMDA controller presents the best behaviour, which is reflected in lower IAE (22,4%), and the ISE (22,4%) (see Figure 13), compared to the Fuzzy-TS, which is the controller that follows it in performance terms.Obtaining a performance improvement of more than 20% in a controller which design is simple and easy implementation within a PLC is an advantage of our proposal, which means a significant improvement in terms of energy consumption.

5-Conclusion
This paper has presented a new proposal for the control of three-phase induction motors based on LAMDA.Through the development of the proposal, its easy design and implementation in a PLC has been demonstrated so that it can be used in industrial systems, validating its operation in speed control tests of an induction motor.In addition, in the experiments carried out, the behavior of the LAMDA controller has been compared with conventional fuzzy controllers such as Mamdani and Takagi-Sugeno and with the PID controller, which are the most used in industry and manufacturing processes.The results obtained show that our proposal presents a better response to disturbances, quickly correcting the system output and bringing it towards the reference with a smooth control action which is calculated through the LAMDA GADs.This characteristic in industrial systems is an advantage since the actuator is not forced to sudden actions.In experiments related to reference changes, it has also been observed that the LAMDA controller is better than the other proposals since it allows reaching the desired values quickly without considerable overshoots, which is required in precision speed control systems.As future work, it is proposed to implement a LAMDA controller based on Sliding-Mode Control to improve the response to disturbances of the system in general, and to carry out a comparative analysis with conventional methods based on fuzzy logic and Sliding-Mode Control.

6-2-Data Availability Statement
The data presented in this study are available on request from the corresponding author.

6-3-Funding
The authors received financial support for the publication of this article from the Universidad de Las Américas.

6-6-Conflicts of Interest
The authors declare that there is no conflict of interest regarding the publication of this manuscript.In addition, the ethical issues, including plagiarism, informed consent, misconduct, data fabrication and/or falsification, double publication and/or submission, and redundancies have been completely observed by the authors.

Figure 1 .
Figure 1.Functional blocks of the LAMDA working as controller

Figure 6 .Figure 7 .
Figure 6.Defined classes and outputs for the linear and angular velocitiesFigure7shows the methodology used in the development of this paper to summarize the stages of design, implementation and tests/results considering the hardware and software used to validate the controller and to clarify to the reader the system components and the interaction between them.

Figure 8
Figure 8 shows the behaviour of the system output before different reference changes, for which it starts with a speed of 0[RPM], at instant t=2 [s], the speed changes to 400[RPM], at time t=20[s] it changes to 900 [RPM], then at time t=40 [s] it reaches 1500 [RPM] and finally at time t=60 [s] settles at 300 [RPM].

Figure 10 .
Figure 10.Comparative response of the control action for reference changes

Figure 11 .Figure 12 .
Figure 11.Comparative response of the output of the system (motor velocity) for regulation with added disturbance

Figure 13 .
Figure 13.Comparative response of the control action for reference changes