Electronic plant air conditioner control method for setting PID parameters based on fuzzy algorithm

By using the MATLAB-based fuzzy algorithm to adjust PID parameters in the electronic factory air conditioning system, traditional PID control is solved to solve the problem of time-varying and nonlinearity, and more efficient temperature and humidity control and energy management are achieved, and operation and maintenance are improved. Efficiency and control accuracy.

CN119247753APending Publication Date: 2025-01-03SHANGHAI BAOYE GRP CORP
View PDF 0 Cites 3 Cited by

Patent Information

Application Number
CN202111443705.7
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2021-11-30
Publication Date
2025-01-03

AI Technical Summary

Technical Problem

The electronic factory air conditioning system has characteristics such as time-variability, nonlinearity, and large hysteresis in temperature and humidity control. Traditional PID control is difficult to achieve ideal control effects, and has poor anti-interference ability, making it difficult to adjust parameters online, affecting operation and maintenance efficiency and energy consumption.

Method used

The control method of tuning PID parameters using a fuzzy algorithm based on MATLAB is designed to design a univariate two-dimensional fuzzy controller. By fuzzing the input variables and PID parameters, the proportion, integral and differential parameters of the PID controller are adjusted online, and combined with PLC and Simulink tools Real-time control.

Benefits of technology

It improves the control accuracy and response speed of the air conditioning system, enhances the anti-interference ability, realizes stable control of complex processes, reduces energy consumption, and improves operation and maintenance efficiency.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN119247753A_ABST
    Figure CN119247753A_ABST
Patent Text Reader

Abstract

The invention discloses an electronic plant air conditioner control method for setting PID parameters based on a fuzzy algorithm. The method comprises the steps that a design scheme is preliminarily determined according to plant design indexes, and a schematic diagram of a control system is planned; establishing a mathematical model; carrying out PLC control program design and configuration programming; designing a fuzzy controller; fuzzy design of input and output variables; defining an input and output membership function; establishing a fuzzy control table and rules; designing a system fuzzy reasoning algorithm; setting defuzzification output; designing a Simulink system control block diagram, and establishing a real-time control working space; and the communication between the MATLAB and the PLC is realized. According to the method, the control experience of a person is summarized into a group of conditional statements described qualitatively by utilizing a fuzzy logic function of Matlab software, and the conditional statements are quantified by utilizing a fuzzy set theory, so that the controller can accept the experience of the person, simulate an operation strategy of the person and overcome uncertain factors of the person, and the system has higher reliability.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The invention relates to the field of control systems for electronic plants, and in particular to an electronic plant air conditioning control method based on fuzzy algorithm to adjust PID parameters. Background Art

[0002] Compared with general factories, the electromechanical equipment and production processes of electronic factories have higher requirements for environmental temperature, humidity and cleanliness. At present, most of the operation and maintenance systems and production equipment management systems of electronic factories in China are in a semi-intelligent state, which is a certain gap with foreign countries. The degree of intelligence of factories is not high, and the operation and maintenance efficiency needs to be improved. The air-conditioning system of the factory usually adopts the form of MAU+FFU+DCC. The temperature and humidity control often uses the more classic PID control method, which is one of the most widely used algorithms in industrial applications. In the control of closed-loop systems, the PID algorithm is a common "maintain stability" control algorithm that can automatically and accurately correct the control system. The PID controller is mainly composed of three parts, namely the proportional control module, the integral control module and the differential control module. The block diagram of the PID control system is shown below. Figure 1 shown. Figure 1 In the PID controller, the expected input setting value and the actual output value are compared to obtain the deviation e, and then the control system controls the system according to the size of the deviation. PID algorithm parameter debugging refers to adjusting the control parameters (proportional gain, integral gain / time, differential gain / time) to make the system achieve the best control effect. Although the PID algorithm has only three parameters, it is easy to explain in principle and has the advantages of reliable control, simple structure and high control accuracy. However, the PID algorithm parameters are basically set by experienced engineers during the system debugging stage. It is difficult to adjust online and difficult to control complex process such as strong time-varying and nonlinear. Stability is the primary condition in debugging. If the parameters of the PID algorithm controller are not set well, the controller output may be unstable and there may be oscillations during the process, especially for systems with long delay time for plant temperature changes. In addition, when the external environment changes, its anti-interference ability is poor and its parameters cannot be adjusted automatically. The air conditioning system of the electronic plant has the characteristics of time-varying, nonlinear, large hysteresis, and inaccurate object model. Therefore, it is difficult to achieve the ideal control effect with traditional PID. In addition, in the application of air conditioning, there are requirements for the effect of air conditioning control on the one hand, and there are also requirements for the energy consumption of the air conditioning control system. It is very meaningful and necessary to find an intelligent control method that can conveniently realize air conditioning temperature and humidity control and is environmentally friendly.

[0003] With the rapid development of intelligent control methods at home and abroad in recent years, fuzzy control technology has reached a relatively mature level and is widely used in daily life and industrial production. Fuzzy control belongs to intelligent control and is a nonlinear control. Compared with traditional PID control, fuzzy control has a fast response speed, small overshoot, and is insensitive to parameter changes. Due to these advantages, fuzzy control has received a lot of attention and has been proven to be more effective than traditional PID control. Therefore, the method of combining fuzzy control with PID control to form a fuzzy PID control method has the advantages of fuzzy control in that it can solve nonlinearity, uncertainty, and strong time-varying properties, while continuing the high control accuracy of traditional PID. The structure diagram of the fuzzy PID control system is shown below. Figure 2 As shown in the figure, the fuzzy controller uses a two-dimensional input controller, takes the deviation e between the indoor temperature and the set temperature and its rate of change ec as input, multiplies them by their respective quantization factors and performs fuzzy processing, and outputs the changes in the proportional factor, integral and differential time of the PID controller, which are used to adjust the three parameters P, I, and D of the controller. Finally, the three parameters Kp, Ki, and Kd are obtained by online correction, and then the PID controller outputs the control quantity to control the actuator. The change in the output control quantity is mainly determined by the three parameters kp, ki, and kd of the PID controller, and these three parameters of the PID are adjusted online by the fuzzy rules of fuzzy control. Therefore, the quality of the fuzzy rule design directly affects the control performance of the terminal controller.

[0004] At present, the commonly used MATLAB software is very effective in the design of intelligent control and can realize complex control algorithms. It provides a toolbox for fuzzy control simulation, in which many operations on the specific implementation of fuzzy control simulation can be performed. However, due to the inability to directly control on-site industrial control equipment, many advanced control algorithms are still only in the pure digital simulation stage. Common programmable logic controllers (DDC, PLC) often cannot run complex advanced control algorithms during the control process, or they can only run reluctantly, resulting in reduced real-time response of the controller, which restricts the application of advanced control algorithms on on-site industrial control equipment. Summary of the invention

[0005] The purpose of the present invention is to provide a control method for an electronic plant air conditioning system based on MATLAB adjusting a PID process.

[0006] In order to achieve the above object, the present invention is achieved as follows: An electronic plant air conditioning control method based on fuzzy algorithm to adjust PID parameters, including: Step 1: According to the plant design indicators, preliminarily determine the design plan, select the main components of the system, and draw up the schematic diagram of the control system; Step 2: Establish a mathematical model, conduct preliminary stability analysis and dynamic performance analysis, and make the system reach the given performance index; Step 2.1: Establishment of the air-conditioned room model. The function model is as follows: Where G(s) is the transfer function, K is the static amplification factor, and T is the time constant; Step 3: Air conditioning control system hardware configuration, PLC control program design, configuration programming; Step 4: Design of fuzzy controller: Use Simulink and Fuzzy Toolbox - FISEditor of MATLAB software to realize the design of fuzzy controller; Step 5, design the structure of the fuzzy controller, using the most common single-variable two-dimensional fuzzy controller structure. The two input variables of the two-dimensional fuzzy controller are the controlled variable and the input given deviation E and deviation change EC. Step 6: Fuzzy design of input and output variables. The fuzzy sets and domains of error E, error change EC and PID parameters are defined as follows: The fuzzy sets of E, EC and kp, ki, kd are: {NB, NM, NS, ZO, PS, PM, PB} The domains of E, EC, kp, ki, and kd are all: {-3, -2, -1, 0, 1, 2, 3} Step 7, define the input and output membership function; divide the deviations E and EC into 7 levels, negative large (NB), negative medium (NM), negative small (NS), zero (ZO), positive small (PS), positive medium (PM), and positive large (PB). E is negative, indicating that the current temperature is lower than the target setting value, and E is positive, indicating that the current temperature is higher than the target setting value; set the value range of E to [-3, 3], and use the MATLAB membership function editor "trimf" to establish the membership function of the variable; Step 8: Establish fuzzy control table and rules. Kp is used to improve accuracy and speed up response; ki is used to eliminate steady-state error; kd is used to improve dynamic characteristics. Therefore, for the same e and ec, the self-tuning of kp, ki, and kd of the controlled process should comply with the following rules: (1) When |e| is small, larger kp and ki should be used to ensure that the system has better steady-state characteristics. At the same time, in order to eliminate oscillation, the appropriate kd should be selected by judging the size of |ec|; (2) When |e| is medium, a moderate kd, a small kp, and a large ki should be selected to ensure the system's response speed while controlling the system's overshoot; (3) When |e| is large, a larger kp should be used to make the system respond faster, a smaller kd should be used to avoid |ec| being too large instantaneously, and a smaller ki should be used to control the system overshoot; Based on the above three empirical rules and combined with multiple experimental verifications, the fuzzy rules of the three parameters △kp, △ki, and △kd of the system PID controller are obtained in turn after summary: Divide the fuzzy variables E and EC into 7 levels, and the fuzzy subsets are all taken as: {NB, NM, NS, ZO, PS, PM, PB}, and the corresponding language descriptions are: negative large, negative medium, negative small, zero, positive small, positive medium, positive large. Use the MATLAB fuzzy rule editor, select the fuzzy control rule in the form of "If...and...Then...", and add the fuzzy rule to the editor; Step 9: Design of system fuzzy reasoning algorithm. According to the established fuzzy rules, the precise quantity of the input system can be converted into the corresponding fuzzy set. For the air-conditioning temperature control system, according to the given control rules, deriving △kp, △ki and △kd is the process of fuzzy reasoning. Step 10. Set the defuzzification output: (1) Maximum membership method; (2) Center of gravity method; (3) Weighted average method; Step 11: Design the Simulink system control block diagram and establish a real-time control workspace; Step 12: Realize the communication between MATLAB and PLC. PLC collects data on site, transmits it to the industrial computer through industrial Ethernet, and then transmits it to the MATLAB workspace through the OPC protocol inside the industrial computer. MATLAB obtains the optimal data through the algorithm, and then returns the data to the PLC through the OPC protocol and Ethernet.

[0007] The air conditioning control method proposed in the present invention uses the fuzzy logic function of Matlab software to summarize human control experience into a group of conditional statements described qualitatively, and then uses fuzzy set theory to quantify it, so that the controller can accept human experience and imitate human operating strategies, which can overcome human uncertainties and make the system more reliable. Therefore, the method proposed in the present invention can solve many control problems that are difficult to solve based on traditional linear system theory.

[0008] Furthermore, this solution uses network communication technology to realize data transmission between Matlab and PLC, and builds a simulation system model through Matlab's Simulink tool to adjust the three control parameters of proportion, integration and differentiation, and then connects the controlled object to realize real-time control of ambient temperature, so that PID control can achieve the corresponding control effect, and can make the output value of the system better track the given value, and has a good control effect for systems with hysteresis and random interference. BRIEF DESCRIPTION OF THE DRAWINGS

[0009] Figure 1 This is the block diagram of the PID control system.

[0010] Figure 2 This is the structure diagram of the fuzzy PID control system.

[0011] Figure 3 Diagram of the system built for fuzzy control simulation. Figure 4 This is a structural diagram of the fuzzy controller. Figure 5 It is the relationship diagram of input-output membership function. Figure 6 is the fuzzy rule table of △kp. Figure 7 is the fuzzy rule table of △ki. Figure 8 is the fuzzy rule table of △kd. DETAILED DESCRIPTION

[0012] The present invention is further described below by means of specific examples.

[0013] like Figure 3 As shown, a method for controlling air conditioning in an electronic plant based on fuzzy algorithm to adjust PID parameters includes: Step 1: Configure temperature and humidity sensors, PLC controllers, electric regulating valves, air valve actuators, frequency converters, host computers, etc. according to the plant design requirements. Use S7-200 (or smart series) PLC to configure EM235 to realize the input of real-time air conditioning temperature signals and the output of control signals.

[0014] Step 2: Install the equipment, connect the wires and perform power-on inspection.

[0015] Step 3: Prepare the PID control subroutine of the air conditioner. The steps are as follows: 1) Enter the set temperature 2) Import the set temperature, P value, I value, and D value into PID 3) The subroutine is interrupted every 100ms to perform PID calculation PID parameters are assigned by MD112, MD120, and MD124.

[0016] The memory address allocation is shown in the following table: address name illustrate VD100 Process variable (PVn) Must be between 0.0 and 1.0 VD104 Set value (SPn) Must be between 0.0 and 1.0 VD108 Output value (Mn) Must be between 0.0 and 1.0 VD112 Gain (Kc Proportional constant, can be positive or negative VD116 Sampling time (Ts) The unit is s, must be a positive number VD120 Sampling time (Ti) The unit is min, must be a positive number VD124 Derivative time (Td) The unit is min, must be a positive number VD128 Integral term previous value (MX) Must be between 0.0 and 1.0 VD132 Process variable previous value (PVn-1) Must be between 0.0 and 1.0 Step 4: Prepare the interrupt program for PID calculation. The steps are as follows: 1) Sampling and processing of analog signals, normalization and import into PID 2) PID program operation 3) Output PID operation results and reverse convert them into analog signals Step 5: PLC sets the communication mode and communication configuration. PC Access can be used to connect to Siemens or third-party upper software that supports OPC technology. Matlab integrates OPC Toolbox, which is an OPC client data access software. Through OPC Toolbox, you can connect to any OPC data server to read or write data from the connected server. Open S7-200 PC Access Smart and upload the PLC program variables to the OPC server. ("High-end PLC" Botu can configure the OPC server in the program). After completion, do not run PC Access and establish a connection with Matlab for the time being, because Matlab has not yet mapped the variables with the PLC. Open the OPC tool shortcut command window >> opctool in Matlab, add the client / server under MATLAB OPC Data Access Clients, and establish a connection.

[0017] Step 6: Create a fuzzy controller. Type 'fuzzy' in the MATLAB command window, then enter the fuzzy logic editing window. Select Edit in the fuzzy controller menu and select 'Add Variable Input'. You can see two inputs on the interface. Name the two input variables E and EC in the 'Name' field in the lower right corner. Keep the output as default, as shown in the attached figure. Figure 2 shown.

[0018] Step 7: Establish variable membership function. Select an input variable E and open its membership function editor. Select the triangle membership function trimf in the membership function type selection. Enter its range and display range as [-3,3]. Then, in the 'CurrentMembership Function' box, 'Name' edits the membership functions of the input variables and names them as NB, NM, NS, ZO, PS, PM, and PB. This completes the establishment of the membership function of the input variable E. Use the same method to establish the membership functions of the other input EC and output, as shown in the attached figure. Figure 3 shown.

[0019] Step 9: Edit fuzzy control rules. Open the fuzzy rule editor, select the fuzzy control rule in the form of "If...and...Then...", select the language value and output language value in E and EC according to the fuzzy rule table respectively. After editing each rule, click 'Add rule' at the bottom of the interface editor to add the fuzzy rule to the editor. After the fuzzy controller is edited, save it. Figure 4 shown.

[0020] Step 10: Build a simulation system model. Open the Simulink module library browser in MATLAB, you can see the Simulink public module library. After selecting the modules required to build the system model, correctly connect the system modules according to the signal flow of the system, and the creation of the system model is completed. The Fuzzy logic module in the system diagram is the fuzzy self-adjusting mechanism. The Simulink simulation parameters need to be set, and the simulation end time (stop time) is set to "inf" (set to make the system run without time restrictions). The Simulink simulation algorithm is set to Fix-step fixed step type, and the set value is 300. After simulation debugging, a set of relatively ideal PID parameters can be obtained. As shown in the attached figure Figure 5 shown.

[0021] Step 11: Set the defuzzification method to defuzzify the output fuzzy quantity. The output of the fuzzy controller is a fuzzy set. The defuzzification method is used to determine an exact and precise quantity. In Matlab, the defuzzification operation is performed through setfis(a,'DefuzzMethod',' '). Different defuzzification methods will result in different final output control quantities. There are many defuzzification methods, mainly: mom Maximum membership average method centroid area centroid method Bisector area division method som maximum membership degree minus method lom maximum membership degree method This time, select the center of gravity method, and then export to disk to get a fuzzy controller .fis file.

[0022] Step 12: The three parameters Kp, Ki, and Kd are obtained through online calibration and transmitted back to the three variables MD112, MD120, and MD124 in the on-site PLC through OPC communication to control the output of the PID module.

Claims

1. An electronic plant air conditioning control method based on fuzzy algorithm to adjust PID parameters, characterized by: include Step 1: According to the plant design indicators, preliminarily determine the design plan, select the main components of the system, and draw up the schematic diagram of the control system; Step 2: Establish a mathematical model, conduct preliminary stability analysis and dynamic performance analysis, and make the system reach the given performance index; Step 2.1: Establishment of the air-conditioned room model. The function model is as follows: Where G(s) is the transfer function, K is the static amplification factor, and T is the time constant; Step 3: Air conditioning control system hardware configuration, PLC control program design, configuration programming; Step 4: Design of fuzzy controller: Use Simulink and Fuzzy Toolbox - FISEditor of MATLAB software to realize the design of fuzzy controller; Step 5: Design the structure of the fuzzy controller, using the most common single-variable two-dimensional fuzzy controller structure. The two input variables of the two-dimensional fuzzy controller are the controlled variable and the input given deviation E and deviation change EC; the relationship is as follows: Step 6: Fuzzy design of input and output variables. The fuzzy sets and domains of error E, error change EC and PID parameters are defined as follows: The fuzzy sets of E, EC and kp, ki, kd are: {NB, NM, NS, ZO, PS, PM, PB} The domains of E, EC, kp, ki, and kd are all: {-3, -2, -1, 0, 1, 2, 3} Step 7, define the input and output membership function; divide the deviations E and EC into 7 levels, negative large (NB), negative medium (NM), negative small (NS), zero (ZO), positive small (PS), positive medium (PM), positive large (PB), E is negative, indicating that the current temperature is lower than the target setting value, and E is positive, indicating that the current temperature is higher than the target setting value; set the value range of E to [-3, 3], and use the MATLAB membership function editor "trimf" to establish the membership function of the variable; the relationship is as follows: Step 8: Establish fuzzy control table and rules. Kp is used to improve accuracy and speed up response; ki is used to eliminate steady-state error; kd is used to improve dynamic characteristics. Therefore, for the same e and ec, the self-tuning of kp, ki, and kd of the controlled process should comply with the following rules: (1) When |e| is small, larger kp and ki should be used to ensure that the system has better steady-state characteristics. At the same time, in order to eliminate oscillation, the appropriate kd should be selected by judging the size of |ec|; (2) When |e| is medium, a moderate kd, a small kp, and a large ki should be selected to ensure the system's response speed while controlling the system's overshoot; (3) When |e| is large, a larger kp should be used to make the system respond faster, a smaller kd should be used to avoid |ec| being too large instantaneously, and a smaller ki should be used to control the system overshoot; Based on the above three empirical rules and combined with multiple experimental verifications, the fuzzy rules of the three parameters △kp, △ki, and △kd of the system PID controller are obtained in turn after summary, as shown in Table 1, Table 2, and Table 3; Table 1 Fuzzy rule table of △kp: Table 2 Fuzzy rule table of △ki: Table 3 Fuzzy rules table of △kd: Divide the fuzzy variables E and EC into 7 levels, and the fuzzy subsets are all taken as: {NB, NM, NS, ZO, PS, PM, PB}, and the corresponding language descriptions are: negative large, negative medium, negative small, zero, positive small, positive medium, positive large. Use the MATLAB fuzzy rule editor, select the fuzzy control rule in the form of "If...and...Then...", and add the fuzzy rule to the editor; Step 9: Design of system fuzzy reasoning algorithm. According to the established fuzzy rules, the precise quantity of the input system can be converted into the corresponding fuzzy set. For the air-conditioning temperature control system, according to the given control rules, deriving △kp, △ki and △kd is the process of fuzzy reasoning. Step 10. Set the defuzzification output: (1) Maximum membership method; (2) Center of gravity method; (3) Weighted average method; Step 11: Design the Simulink system control block diagram and establish a real-time control workspace; Step 12: Realize the communication between MATLAB and PLC. PLC collects data on site, transmits it to the industrial computer through industrial Ethernet, and then transmits it to the MATLAB workspace through the OPC protocol inside the industrial computer. MATLAB obtains the optimal data through the algorithm, and then returns the data to the PLC through the OPC protocol and Ethernet.

Citation Information

Cited By

  • PLC control method and system based on fuzzy control

    CN119882584A

  • Frequency converter control method for photovoltaic MPPT panel, computer readable storage medium and air conditioner

    CN119995337A

  • A frequency converter control method, computer readable storage medium and air conditioner for photovoltaic MPPT panel

    CN119995337B