Realization of Fuzzy Logic in Temperature Control System over PID

DOI : 10.17577/IJERTV3IS071275

Download Full-Text PDF Cite this Publication

Text Only Version

Realization of Fuzzy Logic in Temperature Control System over PID

Anil Kumar .K Jyoshna. P

PG Student, Dept. of EEE Asst. Professor, Dept. of EEE

Siddharth Institute Of Engg. & Technology, Puttur Siddharth Institute Of Engg. & Technology, Puttur Chittoor (Dt), Andhra Pradesh, India. Chittoor (Dt), Andhra Pradesh, India.

Seshadri .G

Associate professor, Dept. of EEE Siddharth Institute Of Engg. And Technology, Puttur

Chittoor (Dt), Andhra Pradesh, India.

AbstractThis paper proposed an artificial intelligent control method for temperature control system and is suitable for low temperature applications such as laboratory equipments (e.g. ovens and incubators).Since we had PID as existing system in temperature control equipment, we are going to the proposed design uses fuzzy logic as a control method that maintains the temperature of simulated heater to the desired point. In this Microcontroller based circuit is built to acquire data from sensor, actuate heat element and communicate with computer workstation. MATLAB fuzzy logic controller is designed, tested, and tuned to control the circuit. The Fuzzy Logic Controller(FLC) performance is evaluated in several situations by comparing it with conventional Proportional Integral Derivative (PID) controller in terms of speed of response to the desired setting value, overshoot in fixed set point and robustness against disturbance. FLC is fast in response to the setting with compare to PID, and more stable against external disturbance. Both of FLC and PID have neglected overshoot value and steady state error, but FLC has noticeable deviation in high set points

Key terms – proportional integral-derivative (PID). Fuzzy, Control, Temperature and performance.

  1. INTRODUCTION

    The technology of control continues to grow in both applications and complexity [1]. The evolutionary changes of control systems can be summarized in three stages: firstly, On/off control is a simple control system in which the control output is either full on if there is a deviation from set point, or completely off if you are at the set point or within the hysteresis. Secondly, PID control is a control method in which the value of the control output is a linear combination of the error signal, its integral, and its derivative. Provides precise control and is used for systems that have frequent disturbances. Finally, intelligent control has been rose as an alternative to a conventional control, in it the human mind abilities in problem solving, decisions

    making and learning new function is imitated. One of the most popular intelligent control methods is Fuzzy Logic Control (FLC) which utilizes fuzzy logic to convert the linguistic control strategy based on expert knowledge into an automatic control strategy.

    Now a days FLC has become more favourable than conventional PID control; because FLC simply represent the realization of human control strategy, where the PID control relies on the mathematical formulations. Fuzzy logic control algorithm solves problems that are difficult to address with traditional control techniques

    .There are two types of Fuzzy Logic Controller: Mamdani type controller and Takagi-Sugenos type controller.

    Temperature control is a process in which change of temperature of a space (and objects collectively there within) is measured or otherwise detected, and the passage of heat energy into or out of the space is adjusted to achieve a desired average temperature. Temperature is an essential physical quantity which is found in most application of home appliances, scientific laboratories equipments and industrial processes. Therefore the main issue in every temperature control strategy is to monitor and maintain temperature status of these facilities. In some industrial application the goal is not only precise temperature control, but also a fast heat-up and quick response to disturbances with minimal overshoot and undershoot when the set point changes. Also the chemical laboratories incubator which may contain Living creatures or Parts of organisms, so its crucial to tightly keep the temperature inside it at required set point. In addition its too important in rice cooker to make fine adjustments to temperature and heating time to cook perfect rice every time.

  2. SYSTEM OVERVIEW

    To present an intelligent controller approach providing best control of temperature process using fuzzy rule-based techniques and to show how FLC temperature controller can overcome the undesirable features of traditional PID controller, a simulated temperature control

    system consisting of a sensor; actuator and computer shown in fig. 1 should be realized as follows.

    The Hardware design is include the temperature sensor (LM35 Precision Celsius Temperature Sensors) to read an actual temperature of the heater to the microcontroller (C) ADC, in voltage form which is linearly proportional to the Celsius (Centigrade) temperature and does not require any external calibration or trimming to provide typical accuracies of ±14°C at room temperature and ±34°C over a full 55 to +150°C temperature range. Low power Ceramic resister is used to simulate the heater, because it can be simply driven by Microcontroller C output port using common power transistor.

    Fig. 1. Schematic diagram of PC Based FLC in Temperature control system

    Atmega32 microcontroller from Atmel is used to acquire temperature reading from sensor by its internal ADC and to provide actuating signal to the heater through its programmed PWM by varying on/off duration time and provide interface to computer workstation.

    Software is divided into two parts BASCOMAVR Microcontroller program to acquire a current temperature from sensor, calculate the error from stored set value, and output suitable signal to drive actuator and communicate with PC based system and FLC and PID MATLAB program using MATLAB Fuzzy Tool box to receive the temperature error signal as a crisp input, fuzzified it to simple triangular member ship function, Applying the fuzzy rule (if e is negative then decrease o/p ) on it and output the deffuzifed result. MATLAB PID controller will be implemented for performance evaluation purpose

  3. CIRCUIT DESIGN

    The microcontroller based circuit with three parts: heating element, sensing element and interfacing part is designed and tested. The circuit diagram is shown in Figure 2.The software has two parts: embedded program in microcontroller and the MATLAB program in the PC which is consist of fuzzy controller and control loop.

    Embedded program which is developed under BASCOM-AVR environment to acquires current temperature value from sensor, and transmit it to PC controller then receive actuating signal from PC and

    applying heating signal to actuator, the flowchart is shown in Figure 3.

    Fig. 2. Embedded program flowchart

  4. MATLAB FLC DESIGN

    Ceramic resistance heat transfer characteristic and circuit behaviour is obtained by applying full heat to the heater and the experiment result plotted in Figure 4. Figure illustrates that the heat element can be heat up from 25o C (room temperature) to 52 o C as maximum and it will take 200 second. According to this the membership function will be in the range 25o C – 52 o C. and the minimum period of time the controller can provide the required heat is 200 sec.

    The initial FLC design is implemented by MATLAB Fuzzy Logic Tool Box, then it is studied and many cycles of enhancement are carried out to reach the final design.

    Fuzzification is the first block in the controller, in which the input ata is converts to degrees of membership by a lookup in one or several membership functions. There is two inputs to this controller, an error which is represent "error=setting value current value" and the rate of change in error which given by " delta error = current error

    previous error ", and single output which represents the amount of PWM signal which is provide in percentage form.

    Where:

    • GU: controller gain.

    • GE: error gain.

    • GDE: change of error rate gain.

      Fig. 3. Heat up time response

      The maximum positive error expected is difference between lower and upper limits of range [52 25 = 27]. Initially and for simplicity random range of error and change of error, from -40 to +40 will be taken and divided to three fuzzy, also the triangular shape of membership function is selected and the percent of overlapping between the function is 50%percent.

      The output range is from 0 to 100%, it is divided also into three membership functions with triangular shape and 50 percent overlapping, and it illustrates MF of the output. The rule base is based on Mamdani type, using experience method. Its composed of nine rules obtained by intersection of two sets of three antecedents results in three consequents which is shown in Table I.

      Fuzzification centroid method is selected to generate the output of controller (crisp data). Control loop code is written to run the simulated circuit with this controller, as flowchart explained in the Figure 4. The flowing code lines represent the core of program:

      A = READFIS('wall); FUZZPWM

      =GU*EVALFIS([GE*ERRORGDE*DELERROR], A);

      These statements call fuzzy controller wall inside the control loop to process the new inputs and produce the PWM percentage as output. The multiply of the gain parameters GU, GE and GDE.

      Which represent Proportional derivative fuzzy controller

      PD-fuzzy. The experiment has been done with this initial design and results can be plotted as obtained. Figure 5 illustrates the poor performance of the simple designed FLC with proportional derivative gain. The desired point is 50oC, but the controller provides 45oC as maximum, taking 3:20 minutes with 10% error and this consider big steady state error, and long rising time. So some improvement to FLC is required. The previous FLC design drawbacks studied and some modification has been implemented to improvement controller performance including the following aspects:

      Fig. 4. FLC control loop flowchart

      1. Input and output membership function reclassified into small five sets NEGBIG, NEGSMALL, NULL, OSSMALL and POSBIG as shows on the Figure 5. The range for E is modify to (-4 to 4) and E to (-25 to 25). The membership shape is tuned and the overlap percentage between the sets is modified by trial and error.

        Fig. a. Initial design experiment result

      2. Rule base is modified and the number of rules is increase to 5×5 rules. Also it is tuned by trial and error as shown in table II

        Fig: b

        Fig: c

        Fig. 5 (a) Enhancement Membership Function and

        (b) delta error and error inputs (c) psm output

      3. Control loop program is modified to be PID fuzzy controller by adding an integral gain (Ki).

        Fig.6. Integral gain (Ki).

        Fig:7 MATLAB Design used Temperture Control System

        Fig:8 Fuzzy Logic Used in Temperature Control System

        Fig:9 Responses of FLC & PID for Temperature Control System

        PID controller:

        Proportional integral derivative PID controller has been designed, using MATLAB for performance evaluation with comparison to FLC:

        pid_integral= ki*(error+PreviousError)/2;

        pwm = kp*error + (pid_integral+ previous_Integral) + kd*(error – PreviousError);

        previous_Integral = pid_integral;

        The PID controller gains parameters Kp Proportional, Kd derivative and Ki integral are tuned by trial and error.

        Using trial and error and after doing many experiments to tune this parameter the following gains is obtained:

        ge = 1.75

        gde = 1.50

        gu = 1.75

        ki = 1.75

        The same steps applied to tune PID controller and getting fine parameters. Despite of many tries to adjust gains still there noticeable fixed steady state error, and continuous ripples, and this return to the surrounding weather effects. Plastic enclosure used to isolate circuit from outside undesirable effects, and then the results which are obtained for both controllers at particular set point.

        The Figure 5 reflects that response time is 1 minute and the steady state error is neglect able, so these results is enough to do performance evaluation to controllers. For the purpose of comparison three experiments in different set point in the range from 45oC to 53oC were done, the output of two controllers has been plotted in Figure 5.

        Fig: 10 Responses of FLC Vs PID for Temperature Control System

        The Figures illustrate the difference behaviour of two controllers under the same situation for the specific set points:

        • Overshoot: Both of controllers have neglect overshoot but FLC value is slightly high than PID and this due to the fast response.

        • Response time: Fuzzy controller appears to have fast response for various setting value in comparison with conventional controller. It is recorded less rise time than PID in all set points.

        • External disturbance: The Figures (11, 12) explain the behaviour of controllers upon the external disturbance which is made by putting wet piece of tissues for 5 seconds. As the Figure shows FLC is affected less and recover fast of disturbance than PID.

        • Steady state error: FLC and PID controller have slight error on steady state region for all setting points except in the highest setting value FLC has noticeable error.

    Lets see how would be the response of each controller with External disturbances.

    Fig. 11: Fuzzy response to disturbance

    Fig:12 PID response to disturbance

  5. CONCLUSIONS

FLC has fast response to the setting with compare to PID, and more stable against external disturbance. Both of FLC and PID have neglect overshoot value and steady state error, but FLC has noticeable deviation in high set points. The FLC is remarkably challenging to set up and tune. The challenge can be broken into the stages of learning the MATLAB toolkit for fuzzy logic, identifying the extensive tuning parameters. A great deal of time and effort has been spent in tuning the fuzzy controller. Debugging the controller is not easy due to the fact that the inner calculations of the fuzzy controller cannot be highlighted.

REFERENCES

    1. Srismrita Basu, Realization of Fuzzy Logic Temperature Controller, International Journal of Emerging Technology and Advanced Engineering Website: www.ijetae.com (ISSN 2250- 2459, Volume 2, Issue 6, June 2012)

    2. M D Hanamane, R R Mudholkar, B T Jadhav and S R Sawant, Implementation of Fuzzy Temperature Control Using Microprocessor, Scientific & Industrial Research, FEB 2006, pp.142-147.

    3. G.S. Nhivekar, S.S. Nirmale, R.R. Mudholker, Implementation of fuzzy logic control algorithm in embedded microcomputers for dedicated application, International Journal of Engineering,

      Science and Technology, Vol. 3, No. 4, 2011, pp. 276-283

    4. Lewis, Introduction to Modern Control Theory, in: F.L, Applied Optimal Control and Estimation, Prentice-Hall, 1992.

    5. Kevin M. Passino and Stephen Yurkovich, Fuzzy Control, Addison Wesley Longman, Inc., 1998,

    6. Ahmad M. Ibrahim, Fuzzy logic for Embedded Systems Applications, 0-7506-7699-X. 2004.

    7. Douglas S. Dewey, Fuzzy Logic, Company Tokyo-Japan, published at http://www.omega.com 2010-04-26.

    8. Amit Konar, Artificial intelligence and soft computing behavioral and cognitive modeling of the human brain, CRC Press LLC 2000.

    9. Lakhmi C. Jain; N.M. Martin, Fusion of neural networks, fuzzy systems and genetic algorithms: Industrial Applications, CRC Press LLC ISBN: 0849398045, 1998.

    10. Jan Jantzen, Tutorial on Fuzzy Logic, Technical University of Denmark, Department of Automation, Tech. report no 98-E 868.

    11. Zilouchian Mo Jamshidi, Intelligent control systems using soft computing methodologies, CRC Press LLC, 2001.

    12. Randy L. Haupt and Sue Ellen Haupt, Practical Genetic Algorithms, A John Wiley & Sons, Inc., 2004.

Leave a Reply