December 23, 2024

The Implementation of Fuzzy Control in SIEMENS PLC System

In a broad sense, the computer distributed control system (DCS) has three types: instrument type, PLC type, and PC type. Among them, PLC has been widely used due to its high industrial reliability. Especially since the 1990s, PLCs of many well-known manufacturers have added analog processing and PID control functions. Therefore, it makes it more competitive. According to the DMF recovery process for industrial synthetic leather production, a computer-based distributed control system based on PLC-IPC structure is designed and developed, and it has achieved good results in practical applications. However, due to the particularity of the DMF recovery process, the control effects of some key process parameters based on PID control algorithms are not ideal. The implementation of fuzzy control on PLC is basically divided into two types: First, it is achieved through dedicated hardware, but Its expensive, and the need to use dedicated programming equipment, the other one is actually used more through software, the fuzzy control program as a subroutine of the entire PLC control program, including data read, fuzzy reasoning and control signal output , Through the interrupt call subroutine to complete the fuzzy control.

In this paper, a fuzzy controller is used to control the instability of evaporation tank liquid level during DMF recovery process. A general-purpose fuzzy controller is designed. Using STEP7 software, a modular programming method is used to realize ladder diagram and statement table programming program. The fuzzy control algorithm makes the fuzzy control strategy better implemented on s7-300 PLC.

1. DMF recovery process The DMF recovery process is a typical chemical distillation process. Generally, double column distillation is used, including dehydration towers, evaporation tanks, and distillation towers. The process of raw material preheating, atmospheric dehydration, one-stage condensation, vapor phase feeding and vacuum distillation are adopted.

From the point of view of the process, the evaporation tank is located between two towers, and its internal state is greatly affected by the two towers. The flaw is that the process parameters are highly correlated and have a high degree of nonlinearity. For the liquid level control of the evaporation tank, from the current situation, the conventional PID control is difficult to achieve real-time effective monitoring, and often there is the situation of unstable control and excessive components. For this situation, a fuzzy control scheme was designed to improve the control effect.

Second, PLC-IPC control system DMF recovery process computer control system SiemensS7-300PLC as a control station, to achieve the process parameters of data acquisition and control algorithm implementation, the use of IPC (industrial control computer) as a host computer, in the industrial configuration system Under the environment to achieve the control system monitoring operations. The system consists of four parts: a central processing unit (CPU), a signal module (SM), a communication processor (CP), and a function module (FM). The system structure is shown in Figure 1.

SM334 is an analog input/output module that implements data acquisition and output of analog parameters. SM321 is a digital input module that collects field switch parameter data. FM355C is an intelligent control module that implements PID control of parameters.

Third, the fuzzy controller design DMF recovery process Evaporation tank liquid level fuzzy controller is mainly composed of fuzzy interface, knowledge base, fuzzy reasoning, clear interface 4 parts, evaporation tank level fuzzy controller to liquid level deviation E and The rate of change of deviation EC is used as an input variable. They can more strictly reflect the dynamic characteristics of the input variables in the controlled process. At the same time, the controller design is simple and the rules are easy to understand. The output control quantity is U (valve opening) and an incremental algorithm is used.

The fuzzy interface transforms the input parameters into their respective domain ranges through a scale transformation, and then performs fuzzification processing. Based on the analysis of field data and the control experience of the liquid level, the universe of E and EC is designed as [-6]. , -5, ..., +5, +6], U's domain is [-7,..., +7] and is divided into 7 levels [NB, NM, NS, O, PS, PM, PB]. The membership function of fuzzy linguistic variables is determined by using a triangle function as a membership function. The membership assignment tables of fuzzy variables E, EC, and U can be obtained respectively.

The clear interface transforms the fuzzy quantity into the precise amount that can be executed by the implementing agency. The maximum membership degree method is μ(u*)≥μ(u), u∈U, μ is the membership function of u, and u* is The maximum degree of membership corresponds to the value of the fuzzy control quantity.

The knowledge base consists of a database and a rule base. The control rules are based on the IF-THEN (condition-result) production rule. Its structure is simple, easy to modify and grasp, more suitable for PLC programming, such as: ifE=NBandEC=NBthenU=PB is expressed as: R1=NBE×NBEc×PBu .

Summing up the liquid level control experience, we got 7×7=49 control rules.

The overall fuzzy relationship is: R=R1∪R2∪...∪R49, R is the fuzzy relation matrix, and “∪” means to take the bigger one. Using synthetic reasoning U = (E × EC) oR, "x" indicates the evaluation product, "0" is the composition operator, and the maximum-minimum combination method is used here. The entire fuzzy inference process is computationally intensive, relatively cumbersome, and is completed by a computer. Finally, a fuzzy control quantity lookup table is obtained, as shown in Table 1.

Fourth, STEP7 realizes the fuzzy control algorithm Siemenss7-300PLC programming system STEP7 has provided the abundant function module, has provided the convenience for the fuzzy control algorithm realization. In order to simplify the amount of program preparation, improve the versatility of the program and facilitate debugging, PLC program design adopts a modular programming method. The programming language uses a combination of Ladder Diagram (LAD) and Statement List (STL). The main module OB1 implements the call to the subroutine block and the transfer of data. The 0B35 is an interrupt service routine module. The FBl module is a fuzzy controller and completes the entire fuzzy control function. It consists of FCl ~ FC44 subroutine blocks. Among them, FCl completes calculation of e (liquid level deviation) and ec (deviation rate of change); FC2 performs fuzzification process, ie completes the conversion of precise quantities e, ec to fuzzy quantities E, EC; FC3 completes the query function of the control scale; FC4 completes the conversion of the fuzzy control quantity U to the accurate quantity u, and outputs u. FBl in turn calls four sub-modules to complete the functions of the fuzzy control parts and achieve data transfer between them. After the FB1 fuzzy controller is completed, it is saved in the STEP 7 standard library. It has a lot of flexibility and versatility, just like the PID controller (FB41) in STFP7. For different controlled variables, fuzzy control of the variables can be performed as long as the correct configuration of the FB1 input and output ends. The data block DB2 serves as the background data block of the FB1 and stores quantization factors Ke, Kec, Ku, and other parameters.

The key to the entire program design is the query part of the fuzzy control scale, namely the FC3 subroutine block. Prior to programming, the value of U in the fuzzy control table is placed from top to bottom and from left to right in the data block DB1. The data type is WORD. The first address is DBWO, followed by DBW2, DBW4,..., DBW336 (the number of U is 13×13). Pointer addressing table lookup method. In order to simplify the design, the elements [1-6,...,+6] of the input fuzzy universe are converted to [0,...,12]. The base value of the control amount is 0, the offset address is 2×(l3×EC+E), and the absolute address of the control amount can be determined by EC and E as 0+2×(13×EC+E).

The fuzzy value of U stored in the address is obtained by the pointer variable.

The following is an example of the main program section:

OB1 main loop program:

LPIW256// reads the level data from SM334, the peripheral address is PIW256//

TMD0// stores the acquired level data in the M memory area.

LDB2.DBD14 // Puts the quantization factor Ke in DB2 into the M storage area //

TMD8

LDB2.DBD18// stores the quantization factor Kec in DB2 into the M memory area //

TMD12

LDB2.DBD22//puts the quantization factor Ku in DB2 into the M memory area //

TMD16

......

OB35 interrupt subroutine: call FB1 to achieve fuzzy control CALLFB1, DB2// call FB1//

Fuzzy_On:=1

DB_No:=DB1

N:=6

PV:=MD0

SP:=MD4

Ke:=MD8

Kec:=MD12

Ku:=MD16

HLM_e:=1.000000e+001//error upper limit//

LLM_e:=-1.000000e+001//error upper limit value //

......

e:= MD20// level error value stored in M ​​memory area //

Ec:=MD24//Change rate of liquid level error is stored in M ​​memory area //

u:=PQW258//Output the value of control quantity to SM334, address is PQW258//

......

FC3 subroutine: Implementing fuzzy control scale query function LP#0.0//using pointer addressing //

L#q4//q4 stores the absolute address of the control //

SLD3

+D

T#P1

LDBW[#P1]

TMW10// stores the value of control U into MW10//

Finally, the FC4 functional block realizes the conversion of the control quantity U from the fuzzy quantity to the precise quantity, that is, U multiplies the quantization factor Ku and then passes the limiting, and sends the final calculation result to the analog output module to achieve the control function.

With the application of PLC-based fuzzy controller, the effect of evaporation tank liquid level control has been greatly improved compared with before, the setting time is shortened, the overshoot is reduced, and the control is stable. The comparison results are shown in Figure 2 and Figure 3.
V. CONCLUSIONS Based on SIEMENS PLC's implementation of fuzzy control algorithms, it not only retains the reliability and flexibility of PLC control, but also improves the intelligence of the control system. The offline calculation online query method fuses complex fuzzy control calculations into the look-up table, which saves calculation time in actual control and makes the control algorithm simple and straightforward. For those control systems with nonlinear, large delay and difficult to establish mathematical models, PLC-based fuzzy control is an ideal alternative.

Flat Bag On Roll

Flat Bags on Roll is commonly used in every industry, such as electronically products, accessories,household, cosmetic, commodity, stationery, toy, fruits,vegetable and food products etc. Specially in packing of fresh fruits, fresh vegetables, meat, seafood, cakes,chocolates, candy, cookies,biscuits and so on.

The bags could be in big roll for industry and supermarket or in small or for household.

Flat Bag on roll

Flat Poly Bags,Flat Plastic Bags,Flat Polypropylene Bags,Flat Poly Bags On Rolls,Roll Bags,Plastic Roll Bags,Freezer Bag Rolls

BILLION PLASTIC MANUFACTURING CO.,LTD, JIANGMEN , https://www.jmtrashbag.com