Smith-Fuzzy PID Control Method for Class B Foam Mixing System

By using the Smith-fuzzy PID control method in the foam mixing system, the problem of difficult control of the foam mixture ratio is solved, precise control of the foam mixture ratio is achieved, and the fire extinguishing effect and resource utilization requirements of the fire truck are met.

CN115586718BActive Publication Date: 2024-10-11SUIZHOU IND RES INST OF WUHAN UNIV OF TECH
View PDF 2 Cites 0 Cited by

Patent Information

Application Number
CN202211261608.0
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2022-10-14
Publication Date
2024-10-11
Estimated Expiration
2042-10-14

AI Technical Summary

Technical Problem

The existing foam fire extinguishing system cannot accurately control the proportion of foam mixture during use, resulting in poor fire extinguishing effect or waste of original foam solution. In addition, the foam mixing ratio in traditional fire trucks fluctuates with the change of fire pump speed, and a constant pressure difference cannot be maintained, resulting in The stability and accuracy of the mixing ratio are difficult to control.

Method used

The Smith-fuzzy PID control method of the Class B foam mixing system is used, including the hardware part and the software part. It is connected to various sensors and actuators through the MCU microprocessor module to establish a mathematical model of the foam mixing system, combining PID control and Smith prediction. Compensation and fuzzy PID control adjust the mixing ratio of foam solution and water in real time to achieve precise control of the foam mixing ratio.

Benefits of technology

It achieves precise control of the foam mixing ratio, can stably maintain the national standard Class B foam fire extinguishing requirements of 3% or 6%, meets the long-term needs of firefighting operations, and improves the fire extinguishing effect and resource utilization.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN115586718B_ABST
    Figure CN115586718B_ABST
Patent Text Reader

Abstract

The present invention relates to fire truck technology, and in particular to a Smith-fuzzy PID control method for a Class B foam mixing system, which uses a Smith-fuzzy PID control algorithm to adjust the valve opening of a regulating valve in real time to achieve a control target of a set mixing ratio of Class B foam. After the foam mixing controller is powered on and the system program is initialized, and the system detects that the sensor is working properly, the foam mixing controller reads the opening of the regulating valve, the foam liquid flow, the water flow, and the speed of the fire pump in real time, and calculates the current proportion of the foam solution in real time. If it is greater than the set value, the Smith-fuzzy PID algorithm is applied to reduce the valve opening of the foam solution; otherwise, the valve opening of the foam solution is increased until the user's selection of the foam ratio is met. The method can accurately control the foam mixing ratio of the Class B foam mixing system, and can stably and accurately output a foam solution ratio of 3% or 6%, meeting the national standard Class B foam fire extinguishing requirements.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The invention belongs to the technical field of fire trucks, and in particular relates to a Smith-fuzzy PID control method for a Class B foam mixing system. Background Art

[0002] Modern foam fire extinguishing systems have gradually begun to be widely tested and applied around the world, but the current foam fire extinguishing systems also need to rely on the user's experience when in use, and manually open each valve to produce a foam mixture. The output foam mixture cannot accurately reach the appropriate ratio. If the foam ratio is too small, the fire extinguishing effect will be relatively poor; on the contrary, it will cause a waste of foam stock, resulting in the inability to maintain firefighting operations for a long time. The mixing ratio of foam stock and water in the foam mixer of a traditional fire truck fluctuates with the speed of the fire pump. The main reason is that changing the speed of the fire pump will cause the outlet pressure of the water and the outlet pressure of the foam stock to change, and it is impossible to maintain a constant pressure difference. Therefore, the stability and accuracy of the foam solution mixing ratio cannot be controlled. Therefore, it is still difficult to control the foam mixture to automatically and real-time maintain the appropriate percentage target during operation. Summary of the invention

[0003] In view of the problems existing in the background technology, the present invention provides a Smith-fuzzy PID control method and a controller for a Class B foam mixing system.

[0004] To solve the above technical problems, the present invention adopts the following technical scheme: a Smith-fuzzy PID control method for a Class B foam mixing system, comprising a hardware part and a software part; the hardware part comprises an MCU microprocessor module, a power module, a GPIO module, a DAC output current module, an ADC analog signal acquisition module, a serial port data acquisition module, a timer pulse signal capture module, a key module and a watchdog module; the MCU microprocessor module is respectively connected to the power module, the GPIO module, the DAC output current module, the ADC analog signal acquisition module, the serial port data acquisition module and the timer pulse signal capture module; the MCU microprocessor module is used to receive, analyze and process all sensor data; the power module is used to provide a wide operating voltage of 9-32V; the GPIO module is used to drive external devices; the DAC output current module is used for the current interface, and at the same time controls the opening of the foam pipeline regulating valve size; the ADC analog signal acquisition module is used to collect 4-20Ma pressure sensor signals as a reserved interface for the system; the serial port data acquisition module is used to collect RS485 signal pressure sensor data; the timer capture pulse signal module is used to collect pipeline total water flow data and foam outlet pipeline flow data; the watchdog module is used to monitor the system operation status and reset the system software; the MCU microprocessor module uses STM32F407ZGT6; the software part uses the FreeRTOS operating system to implement multi-task management, and the tasks include regulating valve opening data reading, control instruction data receiving, pressure sensor data reading, data analysis and packet processing, watchdog monitoring system crash, foam ratio automatic control tasks, and obtain liquid level, foam liquid and water flow and fire pump speed data through DMA idle interrupts and timer interrupts; preemptive operation is adopted between each task and interrupt.

[0005] In the Smith-fuzzy PID control method of the Class B foam mixing system, the following steps are included:

[0006] Step 1, establishing a mathematical model of a Class B foam mixing system;

[0007] Step 2, developing a flow tracking control method for a Class B foam mixing system;

[0008] Aiming at the time lag and nonlinear characteristics of Class B foam mixing system, a flow tracking control method of Class B foam mixing system was developed based on the established mathematical model of Class B foam mixing system by combining PID control, Smith predictive compensation control and fuzzy PID control theory.

[0009] In the Smith-fuzzy PID control method for the Class B foam mixing system, the implementation of step 1 includes the following steps:

[0010] Step 1.1, obtain the inherent flow characteristics of the regulating valve through experiments, equate the water flow state inside the regulating valve to the flow state of water flowing through the throttling orifice plate, and establish a mathematical model of the parabolic characteristic opening of the regulating valve;

[0011] Step 1.2, using the principle of engineering fluid mechanics to generate pressure on the foam mixer, a branch pipeline fluid mechanics model is established to obtain the flow distribution relationship between the foam water diversion pipeline and the main pipeline, and the foam pipeline pressure and its corresponding total output flow data are measured experimentally;

[0012] Step 1.3, solve the control valve transfer function, and obtain the actual opening response model of the flow control valve by fitting the experimental data curve according to the offline identification theory:

[0013]

[0014] The fire pump speed n and the foam control ratio μ are used as input to calculate the open-loop control flow corresponding to the control valve opening balance working point x e ;

[0015] In the Smith-fuzzy PID control method for the Class B foam mixing system, the implementation of step 2 includes the following steps:

[0016] Step 2.1: First, based on the mathematical model of the Class B foam mixing system, the calculation modules of the fire pump speed n and outlet flow Q1, valve opening x and e The calculation module, foam stock output flow Q r The calculation module is used to calculate the opening of the control valve and use it as an open-loop signal to act on the control valve. The output flow rate of the foam stock solution under open-loop control is:

[0017] Q e (s) = g(Q r ,Q1)G(s)g -1 (x,Q1)

[0018] D(s) is the transfer function of the PID controller The PID parameters obtained by the empirical tuning method are: K p =22.5,K i =0.5,K d =17.4;

[0019] G(s) is the transfer function that controls the opening of the regulating valve:

[0020]

[0021] g -1 (x,Q1) is g(Q r ,Q1) About variable Qr and the inverse function of x, Q3 is the actual output foam stock flow of the system;

[0022] The opening input of the regulating valve under PID control is:

[0023]

[0024] Step 2.2, introduce the Smith predictive control algorithm to suppress the PID control lag time;

[0025] Smith predictor: G(s) = G p (s)e -τs

[0026] The inertia link with a larger time constant in G(s) is approximately decomposed into a pure time delay link using the Taylor series expansion method, and τ = 4.41 is obtained;

[0027] The opening input of the regulating valve under Smith predictive control is:

[0028]

[0029] Step 2.3, formulate fuzzy logic and rules to adjust and optimize the parameters of traditional PID in real time;

[0030] According to the input signal of the system, the error E and the error change rate EC are calculated, fuzzy rules are established for fuzzy reasoning, and then the parameters are defuzzified. Finally, the output parameters are applied to the controller to complete the control task.

[0031] Step 2.3.1, the error E and error change rate EC of the fuzzy controller are continuously changing quantities. These two physical quantities are discretized and divided into several levels;

[0032] Assume that the basic domain of error E, the basic domain of error change rate EC, and the basic domain of output variable u are [-x e ,x e ]、[-x ec ,x ec ] and [-y u ,y u ]; at the same time, the domain of the error fuzzy subset E is set to {-n,-n+1,…,n-1,n}, the domain of the error change rate fuzzy subset EC is set to {-m,-m+1,…,m-1,m}, and the domain of the fuzzy subset U taken by the control quantity is set to {-l,-l+1,…,l-1,l}; among them, the values ​​of the discrete domain form are n,m,l=6 or 7;

[0033] Step 2.3.2: Fuzzification of input parameters: Convert the input variables from the basic domain to the domain of fuzzy sets, and the quantization factor k of E e and the quantization factor k of EC ec The calculation formulas are:

[0034]

[0035]

[0036] Using the scaling factor k u The calculation formula is:

[0037]

[0038] The empirical values ​​of the deviation and deviation rate of the control valve opening response under the control command are 50% and 100%, respectively. The fuzzy domains of the two input quantities of the control system, the control valve opening deviation value E and the deviation change rate EC, are {-50, 50}, {-100, 100}, respectively. e =50,x ec =100; three outputs K p , K i and K d The fuzzy domain of is {0, 100};

[0039] The fuzzy subsets are all valued according to 7 variables, that is, n = m = l = 7, and are denoted by letters as {NB, NM, NS, ZO, PS, PM, PB};

[0040] The fuzzy domain of the linguistic variables of the fuzzy controller can be expressed as:

[0041]

[0042] The fuzzy control strategy is analyzed using the triangle membership function;

[0043] Step 2.3.2: Establish K in the control system p , K i and K d Rule base for fuzzy reasoning of three variables;

[0044] K p Fuzzy rule table

[0045]

[0046] K i Fuzzy rule table

[0047]

[0048] K dFuzzy rule table

[0049]

[0050]

[0051] Step 2.3.3, perform fuzzy PID defuzzification processing;

[0052] Obtain the corresponding K according to step 2.3.2 p , K i and K d The parameter value is combined with the triangular membership function and the quantized value is calculated using the centroid method:

[0053]

[0054] In the formula, K p , K i , K d is the parameter value of the traditional PID; is the proportional factor; ΔK p , ΔK i , ΔK d It is the output value that changes in real time according to fuzzy rules.

[0055] In the Smith-fuzzy PID control method for the Class B foam mixing system, the real-time control of the valve opening of the regulating valve by the control method includes the following steps:

[0056] S01, power on, system initialization; set liquid control ratio;

[0057] S02, reading the opening of the real-time regulating valve and the speed of the water pump;

[0058] S03, determine whether the user sets liquid proportion control, if not, the system does not control the regulating valve, continues sampling, and returns to S2; if yes, execute the next step;

[0059] S04, determine whether the sensor has a hardware failure, if not, proceed to the next step; if yes, end;

[0060] S05. Calculate the valve opening deviation value;

[0061] S06. Apply Smith-Fuzzy PID algorithm to control valve opening;

[0062] S07, judging whether the opening degree satisfies the liquid ratio set by the user, if not, returning to S5; if yes, ending.

[0063] In the Smith-fuzzy PID control method for the Class B foam mixing system, the control method uses the Smith-fuzzy PID algorithm to control the valve opening of the regulating valve, including the following steps:

[0064] S11, given the expected value of valve opening;

[0065] S12, calculating the error E and the error change rate EC;

[0066] S13, adjusting the quantization factors Ke and Kec;

[0067] S14, fuzzy Ke and Kec;

[0068] S15, defuzzify Ke and Kec;

[0069] S16, check the table to determine K p , K i , K d The fuzzy value of

[0070] S17. Determine K using the centroid method p , K i , K d Actual value;

[0071] S18, online adjustment of the proportional factor Ku;

[0072] S19, output K p , K i , K d ;

[0073] S20, position PID input controller;

[0074] S21, regulating valve opening control;

[0075] S22, output foam stock solution flow rate;

[0076] S23, controlling the valve opening by Smith predictive controller;

[0077] S24, collect the raw liquid flow data and return to S12.

[0078] Compared with the prior art, the present invention establishes a mathematical model of a Class B foam mixing system with the fire pump speed and foam control ratio as input and the valve opening as output. Simulink simulation analysis is performed for each control algorithm, and it is determined that Smith-fuzzy PID control is the optimal control algorithm, which can achieve accurate control of the foam mixing ratio of the Class B foam mixing system. A Class B foam mixing system has been developed and experimentally verified, which can achieve the foam solution output by the fire truck to be stably and accurately constant at 3% or 6% of the national standard Class B foam fire extinguishing requirements. The experimental results show that the Smith-fuzzy PID algorithm can meet the national standard control requirements for the Class B foam mixing ratio. BRIEF DESCRIPTION OF THE DRAWINGS

[0079] Figure 1 It is a hardware architecture diagram of an embodiment of the present invention;

[0080] Figure 2 is a flow chart of Class B foam mixing control according to an embodiment of the present invention;

[0081] Figure 3 is a flow chart of a Smith-fuzzy PID algorithm according to an embodiment of the present invention;

[0082] Figure 4 This is a diagram of a Smith-fuzzy PID simulation model of a Class B foam mixing system according to an embodiment of the present invention;

[0083] Figure 5 It is a Smith-fuzzy PID control block diagram of a control system according to an embodiment of the present invention. DETAILED DESCRIPTION

[0084] The technical solutions in the embodiments of the present invention will be described clearly and completely below in combination with the embodiments of the present invention. Obviously, the described embodiments are only part of the embodiments of the present invention, not all of the embodiments. Based on the embodiments of the present invention, all other embodiments obtained by ordinary technicians in this field without creative work are within the scope of protection of the present invention.

[0085] It should be noted that, in the absence of conflict, the embodiments of the present invention and the features in the embodiments may be combined with each other.

[0086] The present invention will be further described below in conjunction with specific embodiments, but the present invention is not limited thereto.

[0087] This embodiment provides a Smith-fuzzy PID control method and controller for a Class B foam mixing system to solve the problem of Class B foam mixing accuracy.

[0088] In the controller provided in this embodiment, an STM32 control unit, a foam regulating valve, a foam liquid outlet flow meter and a pipeline total water outlet flow meter are combined to form a foam proportion control system. The opening of the foam regulating valve is adjusted in real time by the ratio of the collected foam liquid outlet flow rate and the total water outlet flow rate of the pipeline. The designed Smith-fuzzy PID algorithm is applied to the control of the foam proportion, and the values ​​of the quantization factor and the proportional factor are adjusted. The system produces good control effects and achieves the control objectives during the control process.

[0089] This embodiment is implemented by the following technical solutions: Figure 1 The hardware architecture diagram of the Smith-fuzzy PID control system of the B-type foam mixing system is shown. The hardware part of this embodiment can be divided into the following modules, and each module handles different tasks: MCU microprocessor module, power module, GPIO module, DAC output current module, ADC analog signal acquisition module, serial port data acquisition module, timer pulse signal capture module and watchdog module. The MCU microprocessor is the core of the data acquisition device, responsible for receiving, analyzing and processing all sensor data; the power module is responsible for providing a wide working voltage of 9-32V; the GPIO module is responsible for driving external devices; the DAC current interface also controls the opening size of the foam pipeline regulating valve; the ADC analog signal acquisition module can collect 4-20Ma pressure sensor signals as a system reserved interface; the serial port data acquisition module can collect RS485 signal pressure sensor data; the timer pulse signal capture module collects the total water flow data of the pipeline and the foam liquid outlet pipeline flow data; the watchdog module monitors the operating status of the entire system. Once the system is found to be unexpectedly frozen, the system is immediately reset by software to restore the system to normal operation. The software part uses the FreeRTOS operating system to implement multi-task management. Seven tasks are created to work concurrently, namely, reading the valve opening data, receiving the control instruction data, reading the pressure sensor data, data analysis and packet processing, the watchdog monitoring system to see if it is dead, and the foam ratio automatic control task. In addition, the operating system also runs interrupt events such as timer capture interrupt, timer overflow interrupt, and DMA serial port idle interrupt concurrently, and each task and interrupt adopts preemptive operation.

[0090] The Smith-fuzzy PID control method for Class B foam mixing system includes establishing a mathematical model of the Class B foam mixing system, formulating a flow control strategy for the Class B foam mixing system, and designing and developing a foam mixing controller to achieve precise control of the foam mixing ratio.

[0091] 1. First, establish a mathematical model of the Class B foam mixing system. The water flow state inside the regulating valve is equivalent to the flow state of water flowing through the throttling orifice plate. The regulating valve is a parabolic characteristic opening mathematical model, and the inherent flow characteristics of the regulating valve are obtained by experiment; the principle of pressure generation of the foam mixer is mathematically modeled by engineering fluid mechanics, and the branch pipeline is fluid mechanics modeled to obtain the flow distribution relationship between the foam water supply pipeline and the main pipeline. The foam pipeline pressure (negative pressure) and its corresponding total output flow data are measured by experiment; the transfer function of the regulating valve is derived and solved, and according to the offline identification theory, the actual opening response model of the flow regulating valve is obtained by fitting the experimental data curve.

[0092]

[0093] ρ is the liquid density. When the system determines the value of the fire pump speed n, the balance operating point x of the regulating valve opening corresponding to the open-loop control flow can be calculated according to the foam ratio μ selected by the user as 3% or 6%. e , that is, the output value of the control system when it is in a normal and stable operating state.

[0094] 2. Formulate a flow control method for Class B foam mixing system. Based on the established mathematical model of Class B foam mixing system, a flow tracking control algorithm for Class B foam mixing system is designed by combining PID control, Smith predictive compensation control and fuzzy PID control theory, and a Simulink model simulation comparison and analysis is performed on the output flow of foam concentrate of the control algorithm. Figure 4 shown.

[0095] Firstly, based on the mathematical model of Class B foam mixing system, the calculation modules of fire pump speed n and outlet flow Q1, valve opening x and e The calculation module, foam stock output flow Q r The calculation module is used to calculate the opening of the control valve and use it as an open-loop signal to act on the control valve. The output flow rate of the foam stock solution under open-loop control is:

[0096] Q e (s) = g(Q r ,Q1)G(s)g -1 (x,Q1)

[0097] D(s) is the transfer function of the PID controller The PID parameters obtained by the empirical tuning method are: K p =22.5,K i =0.5,K d =17.4

[0098] G(s) is the transfer function that controls the opening of the regulating valve g -1 (x,Q1) is g(Q r ,Q1) About variable Q r and the inverse function of x, Q3 is the actual output foam stock flow of the system.

[0099] Therefore, the opening input of the regulating valve under PID control is:

[0100]

[0101] The Smith predictive control algorithm is introduced to suppress the PID control lag time and prevent the lag time from causing oscillation and reducing the steady-state accuracy of system control.

[0102] The Smith estimator is

[0103] G m (s) = G p (s)(1-e -τs )

[0104] The inertia link with a large time constant in G(s) can be approximately decomposed into a pure time delay link using the Taylor series expansion method, and we get τ = 4.41, that is, Then the opening input of the regulating valve under Smith predictive control is obtained.

[0105] Formulate fuzzy logic and rules to adjust and optimize the parameters of traditional PID in real time, thereby improving the control system's ability to adapt to external interference factors and enhancing the system's robustness. According to the system's input signal, calculate the deviation E and the deviation change rate EC, establish fuzzy rules for fuzzy reasoning, and then defuzzify the parameters. Finally, apply the output parameters to the controller to complete the control task. E and EC of the fuzzy controller are precise quantities that change continuously. Discretize these two physical quantities and divide them into several levels. Assume that the basic domain of E, the basic domain of EC, and the basic domain of the output variable u are represented by [-x e ,x e ]、[-x ec ,x ec ] and [-y u ,y u ] is used to represent it. At the same time, the domain of the error fuzzy subset E is set to {-n,-n+1,…,n-1,n}, the domain of the error change rate fuzzy subset EC is set to {-m,-m+1,…,m-1,m}, and the domain of the fuzzy subset U taken by the control quantity is {-l,-l+1,…,l-1,l}. Among them, in the engineering application of fuzzy PID, the general standardized discrete domain form has n,m,l=6 or 7.

[0106] Smith-fuzzy PID control of the control system Figure 5 As shown,

[0107] The first step is to fuzzify the input parameters.

[0108] Convert the input variables from the basic domain to the domain of fuzzy sets, the quantization factor k of E e and the quantization factor k of EC ec The calculation formulas are:

[0109]

[0110]

[0111] In order to obtain the basic domain of the fuzzy controller output, it is necessary to transform the fuzzy domain and use the proportional factor k u The calculation formula is:

[0112]

[0113] According to experimental measurements, the deviation and deviation rate of the control valve opening response under the control command are approximately 50% and 100%. Therefore, the fuzzy domains of the two input quantities of the control system, the control valve opening deviation value E and the deviation change rate EC, are {-50, 50}, {-100, 100}, that is, x e =50,x ec =100. Three outputs K p , K i and K d The fuzzy domain is {0, 100}.

[0114] The fuzzy subsets all take values ​​according to 7 variables, that is, n=m=l=7, and are expressed in letters as {NB, NM, NS, ZO, PS, PM, PB}.

[0115] Therefore, the fuzzy domain of the fuzzy controller language variables can be expressed as:

[0116]

[0117] In the process of converting fuzzy domain into language value function, membership function needs to be selected as the basis for operation. The triangular membership function is widely used because of its high resolution, strong stability and sensitive control. Therefore, the triangular membership function is used to analyze the fuzzy control strategy.

[0118] The second step is to establish the fuzzy rule table.

[0119] Establish control system K p , K i and Kd Rule base for fuzzy inference with three variables.

[0120] The larger K should be used in the initial stage of system adjustment. p ; In the middle of regulation, K p Take a smaller value to ensure that the system has a certain response speed and a smaller overshoot; in the later stage, K p Adjust to a larger value to reduce static error and improve control accuracy. p The fuzzy rule table.

[0121] K p Fuzzy rule table

[0122]

[0123] In system control, integral control is used to eliminate or reduce steady-state errors. Therefore, in the initial stage of regulation, K i The value of should be smaller; in the middle of the adjustment, the integral action can be moderate to avoid affecting the stability; in the late stage of the adjustment, in order to reduce the static error of the adjustment, the integral action can be strengthened, that is, increase K i According to the above analysis, K i Fuzzy rules table.

[0124] K i Fuzzy rule table

[0125]

[0126] The role of the differential link is to change the dynamic characteristics of the system. According to actual engineering experience, K should be increased in the initial stage of adjustment. d value to avoid overshoot; in the middle of regulation, K d The value should be appropriately reduced or kept fixed; in the later stage of adjustment, K d The value should be reduced to slow down the braking effect of the controlled process. d The fuzzy rule table.

[0127] K d Fuzzy rule table

[0128]

[0129] The third step is to perform fuzzy PID defuzzification.

[0130] According to the result of fuzzy reasoning in the previous step, the corresponding K p , K i and K d Parameter value. Combined with the triangular membership function, the centroid method is used to calculate the quantitative value

[0131]

[0132]

[0133] In the formula, K p , K i , K d is the parameter value of the traditional PID; is the proportional factor; ΔK p , ΔK i , ΔK d It is the output value that changes in real time according to fuzzy rules.

[0134] In the experiment, in the fire pump speed increase stage of 1600r / min, second speed increase stage of 2200r / min and speed reduction stage of 1600r / min, the maximum flow tracking error of Smith-fuzzy PID control was -0.7L / s, -1.1L / s, +0.7L / s respectively, and the maximum flow tracking error rate was -90%, -35%, +90%. The foam stock liquid flow had almost no oscillation during the tracking process and was more stable. The optimal control algorithm was determined to achieve precise control of the foam mixing ratio.

[0135] In the controller provided in this embodiment, an STM32 control unit, a foam regulating valve, a foam liquid outlet flow meter and a pipeline total water outlet flow meter are combined to form a foam proportion control system. The opening of the foam regulating valve is adjusted in real time by the ratio of the collected foam liquid outlet flow rate and the total water outlet flow rate of the pipeline. The designed Smith-fuzzy PID algorithm is applied to the control of the foam proportion, and the values ​​of the quantization factor and the proportional factor are adjusted. The system produces good control effects and achieves the control objectives during the control process.

[0136] like Figure 2 The figure shows a control flow chart of Class B foam mixing. This embodiment uses the Smith-fuzzy PID control algorithm to adjust the valve opening of the regulating valve in real time. After the foam mixing controller is powered on, the system program is initialized. After the system detects that the sensor is working normally, the foam mixing controller reads the opening of the regulating valve, the flow rate of foam liquid and water, and the speed of the fire pump in real time, and calculates the current ratio of the foam solution. If it is greater than the set value, the Smith-fuzzy PID algorithm is applied to reduce the valve opening of the foam solution; otherwise, the valve opening of the foam solution is increased until the user's requirements for the foam ratio are met.

[0137] like Figure 3The figure shows the flow chart of Smith-fuzzy PID algorithm. In this embodiment, the Smith-fuzzy PID algorithm is used to control the valve opening of the regulating valve so that the output foam mixing ratio meets the requirements of Class B foam under the national standard. The control algorithm is as follows: First, the parameters are fuzzified. According to the experiment, the deviation E and the deviation rate EC of the opening response of the regulating valve under the control instruction are approximately 50% and 100%, respectively. The three outputs K p , K i and K d The fuzzy domain of K is {0, 100}; secondly, the fuzzy rule table of parameters is established to determine K p , K i and K d Finally, the proportional factors of the fuzzy controller obtained by defuzzification, calculation and experiment are: The quantization factors are: k e =0.14, k ec =0.07, and these obtained parameters are used to control the regulating valve to output a foam mixture with stable and accurate proportion.

[0138] The above are only preferred embodiments of the present invention, and are not intended to limit the implementation methods and protection scope of the present invention. Those skilled in the art should be aware that all solutions obtained by equivalent substitutions and obvious changes made using the contents of the specification of the present invention should be included in the protection scope of the present invention.

Claims

1. Smith-fuzzy PID control method for Class B foam mixing system, Features: The following steps are involved: Step 1, establishing a mathematical model of a Class B foam mixing system; Step 2, developing a flow tracking control method for a Class B foam mixing system; The implementation of step 2 includes the following steps: Step 2.1: First, based on the established mathematical model of the Class B foam mixing system, establish the fire pump speed in Simulink. n and export flow Q 1 Calculation module, valve opening Calculation module, foam stock output flow Q r The calculation module is used to calculate the opening of the control valve and use it as an open-loop signal to act on the control valve. The output flow rate of the foam stock solution under open-loop control is: D ( s ) is the transfer function of the PID controller , the PID parameters obtained by the empirical tuning method are: ; is the transfer function that controls the opening of the regulating valve: for About variables and The inverse function of The actual output foam stock flow of the system; The opening input of the regulating valve under PID control is: Step 2.2, introduce the Smith predictive control algorithm to suppress the PID control lag time; Smith Estimator: The inertia link with a larger time constant is approximately decomposed into a pure time delay link using the Taylor series expansion method, and we get ; The opening input of the regulating valve under Smith predictive control is: ; Step 2.3, formulate fuzzy logic and rules to adjust and optimize the parameters of traditional PID in real time; Calculate the error generated based on the input signal of the system and the error rate of change , establish fuzzy rules for fuzzy reasoning, then defuzzify the parameters, and finally apply the output parameters to the controller to complete the control task; Step 2.3.

1. Fuzzy controller error and error rate of change It is a continuously changing quantity. These two physical quantities are discretized and divided into several levels. Set error The basic domain of error change rate The basic domain and output variables The basic domains are , and To represent; at the same time, set the error fuzzy subset The domain of , fuzzy subset of error change rate The domain of , the domain of the fuzzy subset U taken by the control quantity is ; Among them, for the discrete domain form, the value is =6 or 7; Step 2.3.2: Fuzzification of input parameters: Convert the input variables from the basic domain to the domain of fuzzy sets. The quantitative factor and The quantitative factor The calculation formulas are: Use scale factor The calculation formula is: The empirical values ​​of the deviation and deviation rate of the opening response of the control valve under the control command are 50% and 100%, respectively. The control system has two input quantities, the opening deviation value of the control valve Rate of change with deviation The fuzzy domains are {-50, 50}, {-100, 100}, that is, , ; Three outputs , and The fuzzy domain of is {0, 100}; The fuzzy subsets are all valued according to 7 variables, namely , using letters as ; The fuzzy domain of the linguistic variables of the fuzzy controller can be expressed as: The fuzzy control strategy is analyzed using the triangle membership function; Step 2.3.2: Establish control system , and Rule base for fuzzy reasoning of three variables; Fuzzy rule table Fuzzy rule table Fuzzy rule table Step 2.3.3, perform fuzzy PID defuzzification processing; According to step 2.3.2, obtain the corresponding , and The parameter value is combined with the triangular membership function and the quantized value is calculated using the centroid method: In the formula, , , is the parameter value of the traditional PID; , , is the scale factor; , , It is the output value that changes in real time according to the fuzzy rules. Aiming at the time lag and nonlinear characteristics of Class B foam mixing system, a flow tracking control method of Class B foam mixing system was developed based on the established mathematical model of Class B foam mixing system by combining PID control, Smith predictive compensation control and fuzzy PID control theory.

2. The Smith-fuzzy PID control method for the Class B foam mixing system according to claim 1, Features: The implementation of step 1 includes the following steps: Step 1.1, obtain the inherent flow characteristics of the regulating valve through experiments, equate the water flow state inside the regulating valve to the flow state of water flowing through the throttling orifice plate, and establish a mathematical model of the parabolic characteristic opening of the regulating valve; Step 1.2, using the principle of engineering fluid mechanics to generate pressure on the foam mixer, establish a branch pipeline fluid mechanics model, obtain the flow distribution relationship between the foam water diversion pipeline and the main pipeline, and experimentally measure the foam pipeline pressure and its corresponding total output flow data; Step 1.3, solve the control valve transfer function, and obtain the actual opening response model of the flow control valve by fitting the experimental data curve according to the offline identification theory: Fire pump speed And foam control ratio As input, calculate the balance working point of the regulating valve opening corresponding to the open-loop control flow .

3. The Smith-fuzzy PID control method for the Class B foam mixing system according to claim 1, Features: The control method for real-time control of the valve opening of the regulating valve comprises the following steps: S01, power on, system initialization; set liquid control ratio; S02, reading the opening of the real-time regulating valve and the speed of the water pump; S03, determine whether the user sets liquid proportion control, if not, the system does not control the regulating valve, continues sampling, and returns to S2; if yes, execute the next step; S04, determine whether the sensor has a hardware failure, if not, proceed to the next step; if yes, end; S05. Calculate the valve opening deviation value; S06. Apply Smith-Fuzzy PID algorithm to control valve opening; S07, judging whether the opening degree satisfies the liquid ratio set by the user, if not, returning to S5; if yes, ending.

4. The Smith-fuzzy PID control method for the Class B foam mixing system according to claim 1, Features: The control method adopts Smith-fuzzy PID algorithm to control the valve opening of the regulating valve, including the following steps: S11, given the expected value of valve opening; S12. Calculation error and error rate of change ; S13, adjusting the quantization factors Ke and Kec; S14, fuzzy Ke and Kec; S15, defuzzify Ke and Kec; S16, check the table to confirm The fuzzy value of S17, using the centroid method to determine Actual value; S18, online adjustment of the proportional factor Ku; S19, Output ; S20, position PID input controller; S21, regulating valve opening control; S22, output foam stock solution flow rate; S23, controlling the valve opening by Smith predictive controller; S24, collect the raw liquid flow data and return to S12.

5. A Smith-fuzzy PID control system for a Class B foam mixing system, It is characterized in that The system is used to implement the Smith-fuzzy PID control method of the Class B foam mixing system described in any one of claims 1 to 4, and the system includes a hardware part and a software part; the hardware part controller adopts STM32F407ZGT6 as the MCU microprocessor core, and is equipped with a power supply module with a wide working voltage of 9-32V that is adapted to the on-board power supply of a fire truck, a two-way DAC output current module interface that controls the opening size of the foam pipeline regulating valve by changing the output current size, a two-way ADC acquisition module for collecting 4-20mA analog opening signals of the regulating valve, a serial port data acquisition module, and a timer module for collecting pipeline total water flow data and foam outlet pipeline flow data; the software part adopts the FreeRTOS operating system to realize multi-task management, including regulating valve opening data reading, regulating valve control instruction data receiving, liquid level sensor data reading, data parsing and packet processing, watchdog monitoring system crash, foam ratio automatic control task, and DMA idle interrupt and timer interrupt events; preemptive operation is adopted between each task and interrupt.

Citation Information

Patent Citations

  • Temperature control method and device, electronic equipment and storage medium

    CN108790696A

  • Self-adjusting fuzzy Smith-PID temperature control system and method

    CN110824908A