Controlling Speed of DC Motor with Fuzzy Controller in Comparison with ANFIS Controller

Machines have served the humanity starting from a simple ceiling fan to higher industrial applications such as lathe drives and conveyor belts. This research work aims at providing an appropriate software based control system because it provides computer featured applications, prevents rapid signal loss, reduces noise while also significantly improves the steady state and dynamic response of the motor. In this research paper, we have worked on DC motors due to its significant advantages over other types of machine drives. We have first individually studied Fuzzy and ANFIS (Adaptive Neuro-Fuzzy Interference System) controller in controlling speed for a separately excited DC motor. Afterwards, we have analyzed both results to conclude that which technique is better to be adopted for precisely controlling the speed of DC motor. Outcomes from MATLAB fuzzy logic toolbox for simulation of our schematic has been provided in this research work. Our study parameters include input voltage of DC motor, its speed, percentage overshoot and rising time of the output signal. Our proposed research has interpreted the outcomes that ANFIS controller is better than Fuzzy controller because it produces less percentage overshoot and causes less distortion of the output signal as the overshoot percentage of ANFIS controller is 8.2% while that of Fuzzy controller is 14.4%.

sirable output in industries.Although there are two types of motor drives currently being used in every industry but DC motors can be considered much better than AC motors especially when considering transportation equipment because of their maximum torque producing quality at stalls which is very poor in AC motors.Also energy recovery mechanism observed in DC motors is much better than in AC motors [1].Moreover dc motors provide a low horsepower rating at a much cheaper rate than AC drives [2].To achieve maximum productivity, every single thing of a machine should be taken into account and analyzed accordingly.In motor control systems, hundreds of problems are faced such as change in load dynamics.The most important affecting factor will be noise parameter which is too much various and unpredictable affecting the functioning of the machine [3].Similarly, another main factor is speed which should be monitored constantly according to the requirement for a desirable and reliable output.
A DC motor as the name indicates is a motor initiated usually by direct current and is converted into mechanical energy according to the requirement.DC motors are ruling the world due to their extensive use in modern technologies and in almost every industry such as to operate steel rolling mills, electric screw drivers, sewing machines, hard disk drives, air compressors, reciprocating machine etc. [4].
DC motors are generally classified into two types:  Self-excited DC motor;  Separately excited DC motor.
The basic difference between the two types is that self-excited DC motor is initiated by its own field circuit while separately excited DC motor is initiated by an external input supply.
Our research work aims at speed controlling of separately excited DC motor rather than self-excited DC motor.We need variable speed drives in our everyday industries such as automotive, petrochemical, food and beverage etc.However, position control of machine drive is also important but once a position is adjusted by some mechanism then its need not to be changed accordingly again and again.However, speed of an object needs to be changed as required such as of motor used in blender.Sometimes it is required to blend the mixture at high speed and sometimes at medium or low speed.Therefore, a technique should be devised for variable speed control rather than variable position control.The major reason of working on separately excited DC motor is that initiation of the motor is independent of internal circuitry of the machine.This gives us an advantage of generating output as desired by varying input supplied voltage with accurate and better speed control as compared to self-excited DC motors.Separately excited DC motors are now extensively ruling the industries due to their marvelous inventions such as OEM battery-powered applications separately excited electric golf car dc motor etc.
When considering hardware of a separately excited DC motor, speed can be controlled by following methods:  By controlling Armature voltage of the machine [5];  By adding variable resistance to armature circuit resistance [6].
Research studies have been done on using different controllers to control speed of separately excited DC motor.Several mathematical models have been used to control speed of drive as discussed in [7] [8].Different types of controllers used are Proportional Integral Controller (PI), Proportional Integral Derivative Controller (PID) etc.
The speed of motor is usually dependent on the type of motor used.Usually when a motor starts, it draws a higher current than an expected value due to a static friction associated with the motor.The higher current will always remain proportional to the input voltage.The input voltage verses speed of a specified machine drive has been analyzed carefully and corresponding outputs have been studied.Results are then analyzed to conclude that which controller is better.Fuzzy and ANFIS controller are monitored so as to give less percentage overshoot and less rising time to make an efficient system and to minimize distortion.
Our research work has aimed on achieving precise and accurate speed control of separately excited DC motor by using Fuzzy Controller and ANFIS Controller.The purpose is to provide a better speed control method by comparative study of two controllers.

Background
Machines have successfully replaced uncountable human efforts into efficient and reliable output.Both DC and AC machines are equally important suiting to the required application.Several researches have been done on improving reliability and efficiency in machines.They have not discussed that despite of so many advantages of AC machines for why only DC motors speed should be precisely and accurately controlled and how are they better than AC machines [9]- [11].Similarly, no comparison of separately excited DC motor and self-excited DC motor is shown [12]- [15].All parameters of DC motors are correlated such as load dynamics, angular machines, speed of drive etc. Angular position can be affected by changes in load and speed until and unless ideal case is assumed.Publication such as [16] has not focused on how angular position will be affected with variable speed of the drive.DC motors speed can be controlled by various methods of which most commonly used is fuzzy controller based on Mamdani and Sugeno systems.[17] [18] have not discussed the reason of using Mamdani system rather than preferring Sugeno system.
A feasible, proficient, workable and ultra-efficient system should always be designed for negligible percentage overshoot and minimum rising time.However, lowering of percentage overshoot and minimizing rise time often contradict and is not possible at one time.Publications like [19]- [21] have not shown any conclusion for controlling speed of DC drives by considering percentage overshoot and rising time.
To incorporate any method in a practical and systematic way for efficacious, operative and dynamic performance, results should be analyzed on the basis of comparison to conclude which method is better to be implemented.[22] does not contain any comparative technique.

Methodology
In this research work, MATLAB Simulink has been used to implement working of controllers.Speed is monitored by using following two types of controllers and then their comparison on various factors is taken into account. Fuzzy Controller;  ANFIS Controller.

Implementation of Fuzzy Controller
A Fuzzy Logic Controller (FLC) is formed by interpreting the analog or continuous values of 0 and 1 despite analyzing the digital values.FLC basically controls a process by assimilation of expert human knowledge into a pattern containing a relationship between inputs and outputs.Fuzzy control rules (mostly conditional rules) are then applied on the pattern of input and output.

MATLAB Fuzzy Controller Implementation Process
First of all type "fuzzy" in command window or have to click on "start" menu and open the "fuzzy editor" from "toolboxes".Now click "Edit" and add an input from "Add variable".Now you can select the "sugeno" FIS from "File".There are two types of Fuzzy logic systems which can be used in control systems:  Mamdani;  Sugeno.
Here, we have used Sugeno system in our research work because output membership functions of sugeno shows us either constant or linear result, which is not possible when using mamdani systems.
Fuzzification converts our measured data (e.g.speed of car is 15 mph) into rhetorical data (car is moving too slow).Fuzzy base rules define some rules on the information provided by fuzzification.The interference engine provides us appropriate coherence and analysis for an output simulation.Defuzzification gives us an output on the basis of defined set of membership function and rules.The complete process is shown in Figure 1.
Following graphical tools are used to create, analyze and view output of Fuzzy logic Controller:  Fuzzy Inference System (FIS) Editor: It has a command on handling basic issues of the control system such as defining of input and output variables.Fuzzy logic toolbox can hold unlimited amount of inputs but corresponding there will be a huge number of membership functions which will become difficult for us to handle. Membership Function Editor: It defines the appearance and shape of membership function as per input.This is shown in Figure 2 and Figure 3.  Rule Editor: It builds and edits the set of rules which is associated with the behavior of the system.Afterwards, a rule viewer for DC motor can be seen in Fuzzy editor, which defines set of rules for Input: 1 ANDed with Input: 2.

Implementation of ANFIS Controller
ANFIS is a hybrid network which consists of a combination of two controllers; Fuzzy logic and neural network.These both controllers result in a single entity which enhances the features of controlling machine than using a single controller alone.

MATLAB ANFIS Controller Simulation Process
ANFIS editor window opens by typing "anfisedit" in MATLAB command window.The complete process is shown in Figure 5.
ANFIS GUI involves the following steps:  Load Data: This will load our previously saved data from .datextension file.After loading the data, ANFIS editor will be displayed as shown in Figure 6.

MATLAB Simulink
Separate responses of DC motor for Fuzzy and ANFIS are then analyzed on MATLAB Simulink as shown in Figure 10 and Figure 11 respectively.Then their comparative interpretations are done.
In the circuit shown in Figure 11 the ANFIS file is loaded in ANFIS block which was saved earlier.In ANFIS circuit, system is initialized by taking step input.The circuit has been made steady and stabilized through Gain6 and Gain7.Also specific oscillations during simulation have been adjusted successfully through these gains.The specified blocks of Tapped delay and Gain are employed as the differential circuit.Gain1 and Gain3 will amplify the signal.In Transfer Function block we can insert the transfer function of DC machine.Each Gain is calculated through specified transfer functions which are selected on the basis of technique used.That's why the value of certain gains is different in both the circuits.
The comparison of both of these circuits is shown in Figure 12.Tabular analysis of rising time and percentage overshoot is calculated from graphical response of Fuzzy and ANFIS controller.This is shown in Table 1.
Fuzzy Controller output response has given us the percentage overshoot of 14.4% which is 6.2% greater than that of ANFIS controller.However, it gives a rising time of 0.072 sec less than that of ANFIS controller which can be counted as a drawback of ANFIS controller.

Conclusions
Machine drives work when their speed is controlled precisely.For analysis a lot of issues come across such as changes in load dynamics, variable inputs, noise propagation and certain unknown parameters which result in unpredictable output of machines.Moreover, a reliable load regulating response with low and almost negligible noise propagation is necessary for a proficient system.Our research work has first analyzed Fuzzy and ANFIS controller separately and then we have interpreted both outcomes to show a comparison that which technique should be used in controlling speed of DC motor.A system should always be designed for less percentage overshoot and less rising time.Often there is a contradiction when adjusting percentage overshoot for minimum rising time.Different research work has been done for lessening percentage overshoot and minimizing rising time.[23] has controlled the speed of DC motor by giving a less percentage overshoot of 10.1% and 2.1% at two different reference speeds.The comparative study in this research paper has shown that ANFIS controller is much better than Fuzzy controller as it gives a percentage overshoot of 8.2% than that of fuzzy controller which is 14.4%.Percentage overshoot indicates an outcome when a signal surpasses its steady-state value.ANFIS technique gives a lower percentage overshoot because of phases such as epoch and training involved in its simulation.Training phase repeats itself until and unless minimum error is reached.This minimum error limit reached is synchronized with given value of epoch which gives a low percentage overshoot then Fuzzy technique.However, a minimum adjustment of 0.072 sec rising time has to be made with ANFIS controller but due to less percentage overshoot, it should be considered a more adoptable technique.

Figure 1 .
Figure 1.Flow chart of fuzzy controller simulation process.

Figure 3 .
Figure 3. Overlapping of Input: 2 of DC motor. Rule Viewer: It is used to examine and view the controller output on the basis of defined rules.This is shown in Figure 4.  Surface Viewer: It generates a 3-D linkage of output associated with the particular number of inputs.Afterwards, a rule viewer for DC motor can be seen in Fuzzy editor, which defines set of rules for Input: 1 ANDed with Input: 2.

Figure 4 .
Figure 4. Rule viewer for DC motor.

Figure 6 . 1 ) 2 )
Figure 6.ANFIS Editor for DC motor. Generate FIS: FIS model can be generated by using any one of the following techniques.1) Grid partition: It generates data via grid portioning.2) Sub clustering: It generates data by analyzing the number of clusters in the given set of data.ANFIS structure can be observed clicking option of "Structure" as shown in Figure 7.  Training and validation of FIS: This process trains the FIS model generated, repeats itself until and unless required number of epoch is reached and goal of training error is attained.Put epochs = 25 as given in load data, then "Train now"."Train now" shows the value of "Epochs error".This is shown in Figure 8. Testing of the FIS is carried out by clicking "Test now"."Test now" shows the value of "Average testing error".This is shown in Figure 9.

Figure 8 .
Figure 8. Train output for DC motor.

Figure 9 .
Figure 9. Test output for DC motor.

Figure 10 .
Figure 10.Fuzzy model of DC motor.

Figure 12 .
Figure 12.Output response of fuzzy and ANFIS performance.

Table 1 .
Comparison between Fuzzy and ANFIS performance.