|
||||||||||||||||||||||||||
Design and Real Time Hardware Implementation of a Generic Fuzzy Logic Controller for a Transport/Diffusion System
by Sukrit Shankar from Conexant Systems India Pvt. Ltd. & Jaydev Sharma from IIT Roorkee & Shamim Akhtar from JIIT, Noida & Chetana Shanta Patsa from IBM, India
Abstract : The transport/diffusion system considering the control of tracer concentration in a tubular reactor with relevant transport delay is widely used in the area of environmental engineering. They are characterized by a combination of transport delay and diffusion. As a consequence of partial mixing, their dynamic behavior may be very difficult to model. A fuzzy controller design methodology for the control action in the transport/diffusion is presented here. The fuzzy control of the transport diffusion system is employed so that the predictive action taken as the fuzzy controller input provides benefits over the PID-controlled delay process. The efficient design of the controller according to the desired specifications using VHDL and its implementation on FPGA introduces a novel approach for realizing a generic prototype of the controller, applicable in real time systems. Furthermore, the design of the controller in VHDL using the state chart design methodology is comparatively new in the area of hardware description languages and helps to reduce the design time significantly. INTRODUCTION Tubular reactors and open channels are diffusive flow systems that are characterized by a combination of transport delay and diffusion, and are widely applicable in chemical and environmental engineering [1]. In such systems, both the process and control flow cause a nonlinear variability in the transport delay. As a consequence, the transport delay variability happens to be the major difficulty, and thus constitutes an obstacle in real-time controller implementation with conventional techniques [2]. This paper considers the generic design and real time hardware implementation of a fuzzy logic controller for a flow system (with transport and diffusion), where two streams (process and control) with differing tracer concentrations enter a long pipe after mixing at the upstream end. Two DC-powered centrifugal pumps deliver water with differing ion concentrations into the mixing point at the inlet of the tubular long pipe. Sodium Chloride (NaCl) is used as the tracer and its concentration in water is measured continuously at the outlet of the tubular pipe. The concentration of NaCl in water at the outlet is observed by measuring the conductivity of the solution, which is directly proportional to the amount of tracer present in water [2]. Our control objective is to keep the outlet concentration at prescribed value by sending the output of the designed fuzzy logic controller to the control stream, regardless of the characteristics of the process stream, which may vary in an unpredictable manner [2]. BASIC PROCESS SHEME The controller structure for which the design is carried out is not entirely based on the classical Mamdani inferential structure [3] that uses the current error and its derivative as the antecedent. Instead, a forecasting element is introduced here along with the current steady state error as the antecedent. This forecasting element is obtained through separate block that produces a prediction of the steady-state output concentration as a function of the process and control flows [4]. The importance of introducing the predictive element lies in the fact that the system has a relevant dead-time that requires the predictive range not to be limited. The derivative used in the classical inferential structure is useful in the systems with fast dynamics where a true prediction beyond a short limit is not required. As a result, the predictive part used in the present model adapts the control action to the different operating regions, accounting for the nonlinear nature of the process. It is now clear that the resulting controller structure is a combination of a system based on the inferential fuzzy logic, and a predictive algebraic part. FUZZY INFERENCE SYSTEMS The Fuzzy inference is the process of formulating the mapping from a given input to one or more outputs using fuzzy logic. The mapping then provides a basis from which decisions can be made. Fuzzy inference systems have been successfully applied in fields such as automatic control, data classification, decision analysis, expert systems, and computer vision [5]. The process of fuzzy inference involves Membership Functions, Logical Operations, and If-Then Rules. There are five parts of the fuzzy inference process.
The input is always a crisp numerical value limited to the universe of discourse of the input variable and the output is a fuzzy degree of membership in the qualifying linguistic set (always the interval between 0 and 1). As can be made out from the aforementioned theory, the fuzzy controller considered here takes the conductivity error e(k) and predicted error ep(k) as the two antecedents that determine the degree of activation of the consequent, represented by the incremental control action Äu(k), where k is the current sample. To obtain the actual control signal all the consequents are then composed with an OR connective and defuzzified. The membership functions for the two antecedents and one consequent are defined as usual for such systems, but their normalized support values (x-axis values) is a part of the design process according to the specifications of the system. Three qualifiers, in the form of triangular membership functions, labeled NC (Negative Conductivity Error), ZC (Zero Conductivity Error) and PC (Positive Conductivity Error), are used for the conductivity error. Three more, labeled NP (Negative Predicted Error) ZP (Zero Predicted Error) and PP (Positive Predicted Error), are used for the predicted steady-state conductivity error. For the incremental control action, five triangular members are selected labeled NM (Negative More), NL (Negative Less), ZE (Zero), PL (Positive Less), and PM (Positive More).
The fuzzy control rules can be best visualized as a 2-dimensional matrix structure where the two antecedents form input entries and the values in the matrix correspond to the output. According to the nature of the system, a control table is suggested by [1]. The design process also includes the concurrent up gradation of the control table (if required) along with the design of the normalized support values for the three variables considered in the Fuzzy Logic Controller (FLC). The entire design is carried out with the ultimate aim to meet the design specifications most accurately while minimizing the error at every step. DESIGN OF FLC IN VHDL VHDL-based logic synthesis is an efficient method for designing complex hardware. The existing full custom or semi-custom integrated fuzzy controllers are mostly assembled from standard cells at the gate level. The design approach presented is a high-level one. The usage of high-level modeling methodologies for modeling fuzzy controllers reduces development time significantly, making rapid design of custom fuzzy hardware possible. Field-programmable gate array (FPGA) is used as hardware platform, because they are complex enough to be used for rapid prototyping of complex systems, and for the final implementation of a chip, if only a small number of pieces are needed. FPGAs offer more flexibility than ASICs, as when a design is not needed any more; the chip can be reprogrammed for a new hardware. Thus, the FPGA based systems are flexible and can be reprogrammed unlimited number of times. Thus, to summarize, here we have presented a design procedure with self generated design tools so as to implement a generic set of specifications pertaining to a FLC for a transport/diffusion system as a dedicated fuzzy chip, capable of performing stand alone operations, rather then to extend some general purpose processor with fuzzy instructions. Our decision is beneficial in the sense that a dedicated chip offers the highest execution speed and the design time is short, due to the usage of synthesis and high-level design tools. The design is sped up basically by the use of manually generated graphical user interface (GUI) as statechart. For designing the rule base and the normalized support values for the three variables, we have used a high-level modeling approach instead of encoding it directly in VHDL. Translation of a high-level model into VHDL is supported, so that VHDL-based logic synthesis can be employed. With the help of the above choice, the design time is reduced, global design functionality is evaluated in a short time, different design choices are quickly explored, edit-compile-debug cycle is fastened and most importantly the design is represented graphically in a natural and understandable way. FPGA IMPLEMENTATION The final implementation of the fuzzy logic controller is done using FPGA reprogrammable chip, ADCs, LCD panel and DAC.
The two error inputs are given to the ADCs that convert then to the 8-bit format. The digital output is generated by the VHDL code programmed onto the FPGA that is displayed on the LCD panel. The digital 8-bit format on the LCD panel is given to DAC which converts it into the corresponding analog output to be fed to the chemical processing equipments. FLC DEISGN ENVIRONMENT A Matlab implementation of the fuzzy logic controller for the transport/diffusion process is developed (matlab_code.m).
Thus, every time the VHDL code gets modified and the results are compared to that desired.
IMPORTANT POINTS IN VHDL CODE
It is noteworthy that the entire designing is done in VHDL with a general purpose of implementing it on FPGA for prototyping. The designing for FPGA implementation could not have been done in MATLAB right from the outset as the amount of error introduced while designing in VHDL needs to be accounted for as an average amount of error to be used as the offset in the final output. The final offset equivalent to the average error due to the bit stream operation of the model throughout, is stated in results. We arrive at this average amount of error only after implementing our improved choices of designs on FPGA. The same cannot be achieved using MATLAB for FPGA implementation. RESULTS The offset in the output (equivalent to average error with improved designs due to entire processing of the model in bit stream format) = "01100011" From Table 1, it is observed that
Hence, the percentage error = 13/384 * 100 = 3.38 % (Acceptable for FPGA implementation)
Table 2. Synthesis Report of FLC CONCLUSIONS AND FUTURE WORK The design of the controller in VHDL using the state chart design methodology is comparatively new in the area of hardware description languages and helps to reduce the design time significantly. The manual coded generation of a GUI base serving as the state chart exploits the software development environment provided in Matlab. The fuzzy control of the transport diffusion system is employed so that the predictive action taken as the fuzzy controller input provides benefits over the PID-controlled delay process. The efficient design of the controller according to the desired specifications using VHDL and its implementation on FPGA introduces a novel approach for realizing a prototype of the controller, applicable in real time systems. A further progress in the design of the controller can be made in terms of the more generalized design of the controller with more number of inputs and more complex membership functions, generating a state chart model for the same and implementing the entire system on FPGA using VHDL. This shall also enable the researcher to come up with a concept of better hardware approaches for the design implementation and hence exploring the entire functionalities of the reprogrammable chip. REFERENCES [1] Levenspiel, O., 1972. Chemical ReactionEngineering. 2nd edition. Wiley & Sons, New York. [2] Stefano Marsili-Libelli, Alessio Colzi. Fuzzy control of a transport/diffusion system , Control Engineering Practice 6 (1998) 707–713 [3] King, P.J., Mamdani, E.H., 1977. The application of fuzzy control systems to industrial processes. Automatica 13, 235Ð242. [4] Seborg, D.E., Edgar, T.F., Mellichamp, D.A., 1989. Process dynamics and control, Wiley Series in Chemical Engineering. [5] Zadeh, L. A. (1975). The concept of a linguistic variable and its application to approximate reasoning, Information Sciences 8: 43–80 |
Home | Feedback | Register | Site Map |
All material on this site Copyright © 2017 Design And Reuse S.A. All rights reserved. |