CN115586718A - Smith-fuzzy PID control method of B-type foam mixing system - Google Patents

Smith-fuzzy PID control method of B-type foam mixing system Download PDF

Info

Publication number
CN115586718A
CN115586718A CN202211261608.0A CN202211261608A CN115586718A CN 115586718 A CN115586718 A CN 115586718A CN 202211261608 A CN202211261608 A CN 202211261608A CN 115586718 A CN115586718 A CN 115586718A
Authority
CN
China
Prior art keywords
foam
fuzzy
control
smith
opening
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Pending
Application number
CN202211261608.0A
Other languages
Chinese (zh)
Inventor
丁毓峰
刘铮儒
汪延鑫
周遵波
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Wuhan University of Technology WUT
Original Assignee
Wuhan University of Technology WUT
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Wuhan University of Technology WUT filed Critical Wuhan University of Technology WUT
Priority to CN202211261608.0A priority Critical patent/CN115586718A/en
Publication of CN115586718A publication Critical patent/CN115586718A/en
Pending legal-status Critical Current

Links

Images

Classifications

    • GPHYSICS
    • G05CONTROLLING; REGULATING
    • G05BCONTROL OR REGULATING SYSTEMS IN GENERAL; FUNCTIONAL ELEMENTS OF SUCH SYSTEMS; MONITORING OR TESTING ARRANGEMENTS FOR SUCH SYSTEMS OR ELEMENTS
    • G05B11/00Automatic controllers
    • G05B11/01Automatic controllers electric
    • G05B11/36Automatic controllers electric with provision for obtaining particular characteristics, e.g. proportional, integral, differential
    • G05B11/42Automatic controllers electric with provision for obtaining particular characteristics, e.g. proportional, integral, differential for obtaining a characteristic which is both proportional and time-dependent, e.g. P.I., P.I.D.

Abstract

The invention relates to the technology of fire fighting trucks, in particular to a Smith-fuzzy PID control method of a B-type foam mixing system. Electrifying the foam mixing controller, initializing a system program, reading the opening of the regulating valve, the foam liquid flow, the water flow and the rotating speed of the fire pump in real time by the foam mixing controller after the system detection sensor works normally, calculating the proportion of the current foam solution in real time, and applying a Smith-fuzzy PID algorithm to reduce the valve opening of the foam solution if the proportion is larger than a set value; otherwise, the valve opening of the foam solution is increased until the requirement of the user for selecting the foam ratio is met. The method can accurately control the foam mixing ratio of the B-type foam mixing system, can stably and accurately output the foam solution proportion of 3 percent or 6 percent, and meets the national standard B-type foam fire extinguishing requirement.

Description

Smith-fuzzy PID control method of B-type foam mixing system
Technical Field
The invention belongs to the technical field of fire trucks, and particularly relates to a Smith-fuzzy PID control method of a B-type foam mixing system.
Background
Modern foam fire extinguishing systems are gradually widely tested and applied worldwide, but the currently equipped foam fire extinguishing systems also need to be used depending on the experience of users, and each valve is manually opened to generate foam mixed liquid. The output foam mixed liquid can not accurately reach a proper proportion, and if the foam proportion is too small, the fire extinguishing effect is poor; on the contrary, the foam stock solution is wasted, and the fire fighting operation cannot be maintained for a long time. The mixing ratio of the foam stock solution and the water in the foam mixer of the traditional fire engine fluctuates along with the change of the rotating speed of the fire pump, and the main reason is that the change of the rotating speed of the fire pump causes the change of the outlet pressure of the water and the outlet pressure of the foam stock solution, and the constant differential pressure cannot be maintained, so the stability and the accuracy of the mixing ratio of the foam solution cannot be controlled. Therefore, the control difficulty of the foam mixed liquid is still large to ensure that the foam mixed liquid can automatically maintain the proper percentage target in real time all the time during the working period.
Disclosure of Invention
Aiming at the problems in the background art, the invention provides a Smith-fuzzy PID control method and a controller of a B-type foam mixing system.
In order to solve the technical problems, the invention adopts the following technical scheme: the Smith-fuzzy PID control method of the B-type foam mixing system comprises a hardware part and a software part; the hardware part comprises an MCU microprocessor module, a power supply module, a GPIO module, a DAC output current module, an ADC analog quantity signal acquisition module, a serial port data acquisition module, a timer pulse signal acquisition module, a key module and a watchdog module; the MCU microprocessor module is respectively connected with the power supply module, the GPIO module, the DAC output current module, the ADC analog quantity signal acquisition module, the serial port data acquisition module and the timer pulse signal acquisition module; the MCU microprocessor module is used for receiving, analyzing and processing all sensor data; the power supply module is used for providing a wide working voltage of 9-32V; the GPIO module is used for driving the plug-in device; the DAC output current module is used for a current interface and controlling the opening of the foam pipeline regulating valve; the ADC acquisition analog quantity signal module is used for acquiring pressure sensor signals of 4-20Ma and is used as a system reserved interface; the serial port data acquisition module is used for acquiring pressure sensor data of RS485 signals; the timer capturing pulse signal module is used for acquiring total water flow data of the pipeline and foam liquid outlet pipeline flow data; the watchdog module is used for monitoring the running state of the system and resetting system software; the MCU microprocessor module adopts STM32F407ZGT6; the software part adopts a FreeRTOS operating system to realize multi-task management, and the tasks comprise the tasks of reading opening data of an adjusting valve, receiving control instruction data, reading data of a pressure sensor, analyzing and packaging the data, monitoring whether a watchdog system is halted or not, automatically controlling the foam proportion, and acquiring data of liquid level, foam liquid, water flow and the rotating speed of a fire pump through DMA idle interruption and timer interruption; and preemptive operation is adopted between each task and the interrupt.
In the Smith-fuzzy PID control method of the B-type foam mixing system, the method comprises the following steps:
step 1, establishing a mathematical model of a B-type foam mixing system;
step 2, formulating a flow tracking control method of the B-type foam mixing system;
and aiming at the time lag characteristics and the nonlinear characteristics of the B-type foam mixing system, and combining PID control, smith estimation compensation control and a fuzzy PID control theory, a flow tracking control method of the B-type foam mixing system is formulated on the basis of the established mathematical model of the B-type foam mixing system.
In the Smith-fuzzy PID control method of the B-type foam mixing system, the step 1 is realized by the following steps:
step 1.1, obtaining the inherent flow characteristic of the regulating valve through experiments, enabling the water flowing state inside the regulating valve to be equivalent to the flowing state of water flowing through the orifice plate, and establishing a mathematical model of the parabolic characteristic opening of the regulating valve;
step 1.2, establishing a branch pipeline fluid mechanics model by utilizing the principle of pressure intensity generated by engineering fluid mechanics on a foam mixer to obtain the flow distribution relation between a foam drainage pipeline and a main pipeline, and measuring the pressure of the foam pipeline and the data of the corresponding total output flow of the foam pipeline through experiments;
step 1.3, solving a transfer function of the regulating valve, and obtaining an actual opening response model of the flow regulating valve through an experimental data fitting curve according to an off-line identification theory:
Figure BDA0003891275460000021
calculating the opening balance working point x of the regulating valve corresponding to the open-loop control flow by taking the rotation speed n and the foam control ratio mu of the fire pump as inputs e
In the Smith-fuzzy PID control method of the B-type foam mixing system, the step 2 is implemented by the following steps:
step 2.1, firstly, on the basis of the established mathematical model of the B-type foam mixing system, the rotating speed n and the outlet flow Q of the fire pump are established on Simulink 1 Calculating module and valve opening x e Computing module and foam stock solution output flow Q r The calculation module to calculate the aperture of governing valve to act on the governing valve as open-loop signal with it, then foam stoste output flow is under open-loop control:
Q e (s)=g(Q r ,Q 1 )G(s)g -1 (x,Q 1 )
d(s) is the transfer function of the PID controller
Figure BDA0003891275460000022
The PID parameters obtained by the empirical method are respectively: k p =22.5,K i =0.5,K d =17.4;
G(s) is a transfer function controlling the opening of the regulating valve:
Figure BDA0003891275460000031
g -1 (x,Q 1 ) Is g (Q) r ,Q 1 ) With respect to variable Q r And the inverse function of x, Q 3 Actually outputting the flow of the foam stock solution for the system;
the opening input of the regulating valve under PID control is as follows:
Figure BDA0003891275460000032
step 2.2, introducing a Smith estimation control algorithm to inhibit PID control lag time;
smith predictor: g(s) = G p (s)e -τs
An inertia link with a larger time constant in G(s) is approximately decomposed into a pure time delay link by using a Taylor series expansion method, and tau =4.41 is obtained;
the opening input of the regulating valve under Smith estimation control is as follows:
Figure BDA0003891275460000033
2.3, making fuzzy logic and rules to adjust and optimize the parameters of the traditional PID in real time;
calculating the generated error E and the error change rate EC according to the input signal of the system, establishing a fuzzy rule to carry out fuzzification reasoning, then carrying out deblurring processing on the parameters, and finally applying the output parameters to a controller to complete a control task;
step 2.3.1, the error E and the error change rate EC of the fuzzy controller are continuously changed quantities, and the two physical quantities are subjected to discretization treatment and are divided into a plurality of levels;
the basic discourse domain of the error E, the basic discourse domain of the error change rate EC and the basic discourse domain of the output variable u are respectively [ -x ] e ,x e ]、[-x ec ,x ec ]And [ -y ] u ,y u ]To represent; meanwhile, the domain of discourse of the error fuzzy subset E is { -n, -n +1, …, n-1,n }, the domain of discourse of the error change rate fuzzy subset EC is { -m, -m +1, …, m-1,m }, and the domain of discourse of the fuzzy subset U taken by the control quantity is { -l, -l +1, …, l-1,l }; wherein, for the discrete domain form, the value is n, m, l =6 or 7;
step 2.3.2, fuzzification of input parameters; conversion of input variables from the fundamental discourse domain to the discourse domain of the fuzzy set, quantization factor k of E e And the quantization factor k of EC ec The calculation formulas are respectively as follows:
Figure BDA0003891275460000034
Figure BDA0003891275460000035
using a scale factor k u The formula for the calculation is:
Figure BDA0003891275460000041
the deviation and deviation rate empirical values of the opening response of the regulating valve under the action of the control command are 50% and 100%, and the fuzzy domains of the opening deviation value E of the two input quantity regulating valves of the control system and the change rate EC of the deviation are respectively-50, 50 ', -100, 100', namely x e =50,x ec =100; three outputs K p 、K i And K d The ambiguity fields of (a) are all 0, 100};
the fuzzy subsets are valued in accordance with 7 variables, namely n = m = l =7, and are denoted by the letters { NB, NM, NS, ZO, PS, PM, PB };
the universe of ambiguity for the fuzzy controller linguistic variable may be expressed as:
Figure BDA0003891275460000042
analyzing the fuzzy control strategy by adopting a triangular membership function;
step 2.3.2, establishing K in the control system p 、K i And K d A rule base of three variable fuzzy inference;
K p fuzzy rule table of
Figure BDA0003891275460000043
K i Fuzzy rule table
Figure BDA0003891275460000044
K d Fuzzy rule table of
Figure BDA0003891275460000045
Figure BDA0003891275460000051
Step 2.3.3, carrying out fuzzy PID deblurring processing;
obtaining corresponding K according to step 2.3.2 p 、K i And K d And (3) calculating a quantized value by using a gravity center method by combining the parameter value with the triangular membership function:
Figure BDA0003891275460000052
in the formula, K p 、K i 、K d Parameter values for a conventional PID;
Figure BDA0003891275460000053
is a scale factor; Δ K p 、ΔK i 、ΔK d Is an output value that changes in real time according to the fuzzy rule.
In the Smith-fuzzy PID control method of the B-type foam mixing system, the real-time control of the opening degree of the regulating valve by the control method comprises the following steps:
s01, electrifying and initializing a system; setting a liquid control proportion;
s02, reading the opening of the real-time regulating valve and the rotating speed of the water pump;
s03, judging whether the user sets liquid proportion control or not, if not, the system does not control the regulating valve, continues sampling, and returns to S2; if yes, executing the next step;
s04, judging whether the sensor has a hardware fault, and if not, carrying out the next step; if yes, ending;
s05, calculating a valve opening deviation value;
s06, controlling the opening degree of the valve by applying a Smith-fuzzy PID algorithm;
s07, judging whether the opening degree meets the liquid proportion set by a user, and returning to S5 if the opening degree does not meet the liquid proportion set by the user; if so, the process is ended.
In the Smith-fuzzy PID control method of the B-type foam mixing system, the control method adopts a Smith-fuzzy PID algorithm to control the opening of the valve of the regulating valve, and comprises the following steps:
s11, setting a valve opening expected value;
s12, calculating an error E and an error change rate EC;
s13, adjusting quantization factors Ke and Kec;
s14, fuzzification Ke and Kec;
s15, deblurring Ke and Kec;
s16, determining K by looking up a table p 、K i 、K d The blur value of (a);
s17, determining K by using gravity center method p 、K i 、K d An actual value;
s18, adjusting a scale factor Ku on line;
s19, output K p 、K i 、K d
S20, inputting a position PID into a controller;
s21, controlling the opening degree of a valve of the regulating valve;
s22, outputting the flow of the foam stock solution;
s23, the opening of the valve is controlled through a Smith pre-estimation controller;
and S24, collecting the flow data of the stock solution and returning to S12.
Compared with the prior art, the invention establishes a B-type foam mixing system mathematical model taking the rotation speed of the fire pump and the foam control ratio as input and the opening of the valve as output. Simulink simulation analysis is carried out on each control algorithm, so that the control algorithm that Smith-fuzzy PID control is optimal is determined, and the accurate control of the foam mixing ratio of the B-type foam mixing system can be realized. A B-type foam mixing system is developed and experimental verification is carried out, the national standard B-type foam fire extinguishing requirement that the foam solution output by the fire engine is stably and accurately constant at 3% or 6% can be realized, and the experimental result shows that the Smith-fuzzy PID algorithm can meet the national standard control requirement of the B-type foam mixing ratio.
Drawings
FIG. 1 is a diagram of the hardware architecture of one embodiment of the present invention;
FIG. 2 is a flow chart of a class B foam mixing control according to an embodiment of the present invention;
FIG. 3 is a flow chart of the Smith-fuzzy PID algorithm according to one embodiment of the invention;
FIG. 4 is a diagram of a Smith-fuzzy PID simulation model of a class B foam mixing system according to one embodiment of the present invention;
FIG. 5 is a block diagram of the Smith-fuzzy PID control of the control system according to one embodiment of the invention.
Detailed Description
The technical solutions in the embodiments of the present invention will be described clearly and completely with reference to the following embodiments of the present invention, and it is obvious that the described embodiments are only a part of the embodiments of the present invention, and not all of the embodiments. All other embodiments, which can be obtained by a person skilled in the art without inventive efforts based on the embodiments of the present invention, shall fall within the scope of protection of the present invention.
It should be noted that the embodiments and features of the embodiments may be combined with each other without conflict.
The present invention is further illustrated by the following examples, which are not to be construed as limiting the invention.
The embodiment provides a Smith-fuzzy PID control method and a controller of a B-type foam mixing system, so as to solve the problem of B-type foam mixing precision.
In the controller provided by the embodiment, the STM32 control unit, the foam regulating valve, the foam liquid outlet flow meter and the pipeline total water outlet flow meter form a foam proportion control system, the opening size of the foam regulating valve is adjusted in real time according to the ratio of the collected foam liquid outlet flow and the collected pipeline total water outlet flow data, the designed Smith-fuzzy PID algorithm is applied to the control of the foam proportion, the values of the quantization factor and the scaling factor are adjusted, and the system generates a good control effect in the control process and completes a control target.
The embodiment is realized by the following technical scheme, as shown in fig. 1, a Smith-fuzzy PID control system hardware architecture diagram of a B-type foam mixing system is shown, and the hardware part of the embodiment can be divided into the following modules and respectively process different tasks: the device comprises an MCU (microprogrammed control unit) microprocessor module, a power supply module, a GPIO (general purpose input/output) module, a DAC (digital-to-analog converter) output current module, an ADC (analog-to-digital converter) analog quantity signal acquisition module, a serial port data acquisition module, a timer pulse signal capturing module and a watchdog module. The MCU microprocessor is the core of the data acquisition unit and is responsible for receiving, analyzing and processing all sensor data; the power supply module is responsible for providing a wide working voltage of 9-32V; the GPIO module is responsible for driving the plug-in device; the DAC current interface controls the opening size of the foam pipeline regulating valve; the ADC analog quantity signal acquisition module can acquire pressure sensor signals of 4-20Ma and is used as a system reserved interface; the serial port data acquisition module can acquire pressure sensor data of RS485 signals; the timer captures pulse signal data and collects total water flow data of the pipeline and foam water outlet pipeline flow data; the watchdog module monitors the running state of the whole system, and once the system is found to be crashed accidentally, the watchdog module immediately resets the software of the system to enable the system to recover the normal running state. The software part adopts a FreeRTOS operating system to realize multitask management. Seven tasks are created and work concurrently, and the tasks are respectively the tasks of reading the opening data of the regulating valve, receiving control instruction data, reading the data of the pressure sensor, analyzing the data and processing packets, monitoring whether the system is halted by the watchdog and automatically controlling the foam proportion. In addition, the operating system also runs the timer to capture interrupt events such as interrupt, timer overflow interrupt and DMA serial port idle interrupt, and the like, and each task and interrupt run in a preemptive mode.
The Smith-fuzzy PID control method of the B-type foam mixing system comprises the steps of establishing a mathematical model of the B-type foam mixing system, formulating a flow control strategy of the B-type foam mixing system, and designing and developing a foam mixing controller to realize accurate control of a foam mixing ratio.
1. Firstly, establishing a mathematical model of a B-type foam mixing system. The water flowing state in the regulating valve is equivalent to the flowing state of water flowing through the throttling orifice plate, the regulating valve is a mathematical model with parabolic characteristic opening, and the inherent flow characteristic of the regulating valve is obtained by adopting an experiment; performing mathematical modeling on the principle of pressure intensity generated by the foam mixer by utilizing engineering hydrodynamics, performing hydrodynamics modeling on branch pipelines to obtain the flow distribution relation between a foam drainage pipeline and a main pipeline, and measuring the pressure (negative pressure) of the foam pipeline and the data of the corresponding total output flow of the foam pipeline by experiments; deducing and solving a transfer function of the regulating valve, obtaining an actual opening response model of the flow regulating valve through an experimental data fitting curve according to an off-line identification theory,
Figure BDA0003891275460000071
rho is the liquid density, and when the system determines the value of the rotating speed n of the fire pump and the foam proportion mu selected by a user is 3% or 6%, the opening balance working point x of the regulating valve corresponding to the open-loop control flow can be calculated e I.e. the output value of the control system in a normal and steady operation state.
2. And formulating a flow control method of the B-type foam mixing system. Aiming at the time lag characteristic and the nonlinear characteristic of a B-type foam mixing system, on the basis of an established B-type foam mixing system mathematical model, a flow tracking control algorithm of the B-type foam mixing system is designed by combining PID control, smith pre-estimation compensation control and a fuzzy PID control theory, and Simulink model simulation comparative analysis is carried out on the foam stock solution output flow of the control algorithm. As shown in fig. 4.
Firstly, on the basis of an established mathematical model of a B-type foam mixing system, the rotating speed n and the outlet flow Q of a fire pump are established on Simulink 1 Calculating module and valve opening x e Calculating module and foam stock solution output flow Q r The calculation module is used for calculating the opening degree of the regulating valve and acting the opening degree on the regulating valve as an open-loop signal, and the output flow of the foam stock solution is controlled by an open loopComprises the following steps:
Q e (s)=g(Q r ,Q 1 )G(s)g -1 (x,Q 1 )
d(s) is the transfer function of the PID controller
Figure BDA0003891275460000081
PID parameters obtained by an empirical calibration method are respectively as follows: k p =22.5,K i =0.5,K d =17.4
G(s) is a transfer function for controlling the opening of the regulating valve
Figure BDA0003891275460000082
g -1 (x,Q 1 ) Is g (Q) r ,Q 1 ) With respect to variable Q r And the inverse function of x, Q 3 And the flow of the foam stock solution is actually output to the system.
Therefore, the opening degree input of the regulating valve under PID control is:
Figure BDA0003891275460000083
a Smith predictive control algorithm is introduced to inhibit PID control lag time, and the lag time is prevented from generating oscillation to reduce the steady-state precision of system control.
The Smith predictor is
G m (s)=G p (s)(1-e -τs )
An inertial link with a large time constant in G(s) can be approximately decomposed into a pure time delay link by using a Taylor series expansion method to obtain tau =4.41, namely
Figure BDA0003891275460000084
And further obtaining the opening input of the regulating valve under Smith estimation control.
And formulating fuzzy logic and rules to adjust and optimize the parameters of the traditional PID in real time, thereby improving the adaptability of the control system to external interference factors and enhancing the robustness of the system. Calculating the deviation E and the deviation change rate EC according to the input signal of the system, and establishing a fuzzy ruleAnd (4) fuzzification reasoning, then carrying out deblurring processing on the parameters, and finally applying the output parameters to a controller to complete a control task. The E and EC of the fuzzy controller are continuously varying precise quantities. These two physical quantities are discretized and classified into several levels. The basic discourse domain of E, the basic discourse domain of EC and the basic discourse domain of output variable u are respectively [ -x [ ] e ,x e ]、[-x ec ,x ec ]And [ -y ] u ,y u ]To indicate. Meanwhile, the domain of argument of the error fuzzy subset E is set to be { -n, -n +1, …, n-1,n }, the domain of argument of the error change rate fuzzy subset EC is { -m, -m +1, …, m-1,m }, and the domain of argument of the fuzzy subset U taken by the control quantity is { -l, -l +1, …, l-1,l }. In the engineering application of the fuzzy PID, n, m, l =6 or 7 exists for the value of a general normalized discrete domain form.
Smith-fuzzy PID control of the control system as shown in figure 5,
the first step is the obfuscation of the input parameters.
Conversion of input variables from the fundamental discourse domain to the discourse domain of the fuzzy set, quantization factor k of E e And the quantization factor k of EC ec The calculation formulas are respectively as follows:
Figure BDA0003891275460000091
Figure BDA0003891275460000092
in order to obtain the basic universe of argumentation of fuzzy controller output, it needs to convert the argumentation universe, and uses the scale factor k u The formula for the calculation is:
Figure BDA0003891275460000093
through experimental measurement, the deviation and deviation rate of the opening response of the regulating valve under the action of the control command are about 50% and 100%. Thus, the control system has two input regulating valvesThe fuzzy domain of the opening degree deviation value E and the change rate EC of the deviation are respectively-50, -100, namely x e =50,x ec =100. Three outputs K p 、K i And K d The ambiguity fields of (a) are all {0, 100}.
The fuzzy subsets are valued in terms of 7 variables, namely n = m = l =7, and are denoted by the letter { NB, NM, NS, ZO, PS, PM, PB }.
Thus, the universe of ambiguity for the fuzzy controller linguistic variable may be expressed as:
Figure BDA0003891275460000094
in the process of converting the fuzzy domain into the language value function, a membership function is required to be selected as an operation basis. The triangular membership function in the membership function is widely used due to high resolution, strong stability and sensitive control, so that the triangular membership function is adopted to analyze the fuzzy control strategy.
And secondly, establishing a fuzzy rule table.
Establishing K in a control System p 、K i And K d Three variable fuzzy inference rule base.
The system should get larger K at the initial stage of regulation p (ii) a In the middle of regulation, K p Then, a smaller value is selected, so that the system ensures a certain response speed and has smaller overshoot; at later stage, K should be added p Adjusted to a larger value to reduce the static error and improve the control accuracy. K deduced from the above analysis p Fuzzy rule table (iv).
K p Fuzzy rule table of
Figure BDA0003891275460000101
In system control, integral control is used to eliminate or reduce steady-state errors. Thus, at the beginning of the regulation, K i Should be smaller; in the middle of the conditioning, the integration effect can be moderate to avoid affecting stability; after adjustmentIn order to reduce the adjustment static difference, the integral action can be intensified, i.e. K is increased i . K established from the above analysis i A fuzzy rule table.
K i Fuzzy rule table
Figure BDA0003891275460000102
The effect of the differential element is to change the dynamic characteristics of the system. According to the practical engineering experience, K should be increased at the initial stage of adjustment d Value to avoid overshoot; in the middle of regulation, K d The value should be reduced appropriately or remain fixed; at the later stage of regulation, K d The value should be reduced to slow down the braking action of the controlled process. Formulating K from the above analysis d Fuzzy rule table (iv).
K d Fuzzy rule table of
Figure BDA0003891275460000103
And thirdly, carrying out fuzzy PID deblurring processing.
Obtaining corresponding K according to the fuzzy inference result in the last step p 、K i And K d The parameter values. Combining the triangular membership function, and calculating the quantized value by using the gravity center method
Figure BDA0003891275460000111
Figure BDA0003891275460000112
In the formula, K p 、K i 、K d Is the parameter value of the traditional PID;
Figure BDA0003891275460000113
is a scale factor; Δ K p 、ΔK i 、ΔK d Is root ofAnd carrying out real-time changing output values according to the fuzzy rule.
In the experiment, in the stages of primary speed increase 1600r/min, secondary speed increase 2200r/min and speed decrease 1600r/min of the fire pump rotating speed, the maximum flow tracking errors of Smith-fuzzy PID control are-0.7L/s, -1.1L/s and +0.7L/s respectively, the maximum flow tracking error rate is-90%, -35% +90%, the flow of the foam stock solution hardly generates oscillation in the tracking process, the stability is stronger, and the optimal control algorithm is determined to realize the accurate control of the foam mixing ratio.
In the controller provided by the embodiment, the STM32 control unit, the foam regulating valve, the foam liquid outlet flow meter and the pipeline total water outlet flow meter form a foam proportion control system, the opening size of the foam regulating valve is adjusted in real time according to the ratio of the collected foam liquid outlet flow and the collected pipeline total water outlet flow data, the designed Smith-fuzzy PID algorithm is applied to the control of the foam proportion, the values of the quantization factor and the scaling factor are adjusted, and the system generates a good control effect in the control process and completes a control target.
As shown in fig. 2, a flow chart of B-type foam mixing control is shown, and the present embodiment adopts a Smith-fuzzy PID control algorithm to perform a control flow of adjusting the opening degree of the regulating valve in real time. After the foam mixing controller is powered on, initializing a system program, after a system detection sensor works normally, reading the opening of an adjusting valve, the foam liquid and water flow and the rotating speed of a fire pump in real time by the foam mixing controller, calculating the proportion of the current foam solution, and if the proportion is larger than a set value, reducing the valve opening of the foam solution by applying a Smith-fuzzy PID algorithm; otherwise, the valve opening of the foam solution is increased until the requirement of the user for selecting the foam ratio is met.
As shown in fig. 3, which is a flow chart of a Smith-fuzzy PID algorithm, in this embodiment, the Smith-fuzzy PID algorithm is used to control the opening of the valve of the regulating valve, so that the mixing ratio of the output foam meets the requirement of B-type foam under the national standard, and the control algorithm is as follows: firstly, the parameters are fuzzified, the deviation E and the deviation rate EC of the opening response of the experimental regulating valve under the action of a control command are about 50 percent and 100 percent, and three outputs K are obtained p 、K i And K d All fuzzy domain of (1) {0,100}; secondly, establishing a fuzzy rule table of parameters to determine K p 、K i And K d A value of (d); finally, the scale factors of the fuzzy controller obtained by the fuzzy processing, calculation and experiment are respectively as follows:
Figure BDA0003891275460000114
the quantization factors are respectively: k is a radical of e =0.14,k ec =0.07 and these parameters obtained are used in the control of the regulating valve, so as to output a foam mixture with a stable and accurate ratio.
While the invention has been described with reference to a preferred embodiment, it will be understood by those skilled in the art that various changes in form and detail may be made therein without departing from the spirit and scope of the invention.

Claims (6)

  1. 5363A Smith-fuzzy PID control method of 1.B foam mixing system comprises a hardware part and a software part; the method is characterized in that: the hardware part controller adopts STM32F407ZGT6 as an MCU microprocessor core, and is respectively provided with a power supply module which is adapted to the 9-32V wide working voltage of the vehicle-mounted power supply of a fire engine, two DAC output current module interfaces for controlling the opening degree of the foam pipeline regulating valve by changing the output current, two ADC acquisition modules for acquiring 4-20mA analog quantity opening degree signals of the regulating valve, a serial port acquisition data module and a timer module for acquiring total water flow data of the pipeline and foam liquid outlet pipeline flow data; the software part adopts a FreeRTOS operating system to realize multi-task management, and comprises the steps of reading opening data of an adjusting valve, receiving control instruction data of the adjusting valve, reading data of a liquid level sensor, analyzing the data and processing packets, monitoring whether a watchdog system is halted or not, automatically controlling a foam proportion task, and performing DMA idle interruption and timer interruption events; and preemptive operation is adopted between each task and the interrupt.
  2. 2. The Smith-fuzzy PID control method of the class B foam mixing system as claimed in claim 1, wherein: the method comprises the following steps:
    step 1, establishing a mathematical model of a B-type foam mixing system;
    step 2, formulating a flow tracking control method of the B-type foam mixing system;
    and aiming at the time lag characteristics and the nonlinear characteristics of the B-type foam mixing system, and combining PID control, smith estimation compensation control and a fuzzy PID control theory, a flow tracking control method of the B-type foam mixing system is formulated on the basis of the established mathematical model of the B-type foam mixing system.
  3. 3. The Smith-fuzzy PID control method of the class B foam mixing system of claim 2, wherein: the implementation of step 1 comprises the following steps:
    step 1.1, obtaining the inherent flow characteristic of the regulating valve through experiments, enabling the water flowing state inside the regulating valve to be equivalent to the flowing state of water flowing through the orifice plate, and establishing a mathematical model of the parabolic characteristic opening of the regulating valve;
    step 1.2, establishing a branch pipeline fluid mechanics model by utilizing the principle of pressure intensity generated by engineering fluid mechanics on a foam mixer to obtain the flow distribution relation between a foam drainage pipeline and a main pipeline, and measuring the pressure of the foam pipeline and the data of the corresponding total output flow of the foam pipeline through experiments;
    step 1.3, solving a transfer function of the regulating valve, and obtaining an actual opening response model of the flow regulating valve through an experimental data fitting curve according to an off-line identification theory:
    Figure FDA0003891275450000011
    the rotation speed n of the fire pump and the foam control ratio mu are used as input, and the opening balance working point x of the regulating valve corresponding to the open-loop control flow is calculated e
  4. 4. The Smith-fuzzy PID control method of the class B foam mixing system of claim 2, wherein: the implementation of step 2 comprises the following steps:
    step 2.1, firstly, on the basis of the established mathematical model of the B-type foam mixing system, the rotating speed n and the outlet flow Q of the fire pump are established on Simulink 1 Calculating module and valve opening x e Computing module and foam stock solution output flow Q r The calculation module to calculate the aperture of governing valve to act on the governing valve as open-loop signal with it, then foam stoste output flow is under open-loop control:
    Q e (s)=g(Q r ,Q 1 )G(s)g -1 (x,Q 1 )
    d(s) is the transfer function of the PID controller
    Figure FDA0003891275450000021
    The PID parameters obtained by the empirical method are respectively: k p =22.5,K i =0.5,K d =17.4;
    G(s) is a transfer function controlling the opening of the regulating valve:
    Figure FDA0003891275450000022
    g -1 (x,Q 1 ) Is g (Q) r ,Q 1 ) With respect to variable Q r And the inverse function of x, Q 3 Actually outputting the flow of the foam stock solution for the system;
    the opening input of the regulating valve under PID control is as follows:
    Figure FDA0003891275450000023
    step 2.2, introducing a Smith estimation control algorithm to inhibit PID control lag time;
    smith predictor: g(s) = G p (s)e -τs
    An inertia link with a larger time constant in G(s) is approximately decomposed into a pure time delay link by using a Taylor series expansion method, and tau =4.41 is obtained;
    the opening input of the regulating valve under Smith estimation control is as follows:
    Figure FDA0003891275450000024
    2.3, making fuzzy logic and rules to adjust and optimize the parameters of the traditional PID in real time;
    calculating the generated error E and the error change rate EC according to the input signal of the system, establishing a fuzzy rule to carry out fuzzification reasoning, then carrying out deblurring processing on the parameters, and finally applying the output parameters to a controller to complete a control task;
    step 2.3.1, the error E and the error change rate EC of the fuzzy controller are continuously changed quantities, and the two physical quantities are subjected to discretization treatment and are divided into a plurality of levels;
    the basic discourse domain of the error E, the basic discourse domain of the error change rate EC and the basic discourse domain of the output variable u are respectively [ -x ] e ,x e ]、[-x ec ,x ec ]And [ -y [ - ] u ,y u ]To represent; meanwhile, the domain of discourse of the error fuzzy subset E is { -n, -n +1, …, n-1,n }, the domain of discourse of the error change rate fuzzy subset EC is { -m, -m +1, …, m-1,m }, and the domain of discourse of the fuzzy subset U taken by the control quantity is { -l, -l +1, …, l-1,l }; wherein, for the discrete discourse domain form, the value is n, m, l =6 or 7;
    step 2.3.2, fuzzification of input parameters; conversion of input variables from the fundamental discourse domain to the discourse domain of the fuzzy set, quantization factor k of E e And the quantization factor k of EC ec The calculation formulas are respectively as follows:
    Figure FDA0003891275450000031
    Figure FDA0003891275450000032
    using a scale factor k u The formula for the calculation is:
    Figure FDA0003891275450000033
    the deviation and deviation rate empirical values of the opening response of the regulating valve under the action of the control command are 50% and 100%, and the fuzzy domains of the opening deviation value E of the two input quantity regulating valves of the control system and the change rate EC of the deviation are respectively-50, 50 ', -100, 100', namely x e =50,x ec =100; three outputs K p 、K i And K d The ambiguity fields of (a) are all 0, 100};
    the fuzzy subsets are valued according to 7 variables, namely n = m = l =7, and are denoted by letters { NB, NM, NS, ZO, PS, PM, PB };
    the universe of ambiguity for a fuzzy controller linguistic variable may be expressed as:
    Figure FDA0003891275450000034
    analyzing the fuzzy control strategy by adopting a triangular membership function;
    step 2.3.2, establishing K in the control system p 、K i And K d A rule base of three variable fuzzy reasoning;
    K p fuzzy rule table of
    Figure FDA0003891275450000035
    Figure FDA0003891275450000041
    K i Fuzzy rule table
    Figure FDA0003891275450000042
    K d Fuzzy rule table of
    Figure FDA0003891275450000043
    Step 2.3.3, carrying out fuzzy PID deblurring processing;
    obtaining corresponding K according to step 2.3.2 p 、K i And K d And (3) calculating a quantized value by using a gravity center method by combining the parameter values with the triangular membership function:
    Figure FDA0003891275450000044
    in the formula, K p 、K i 、K d Is the parameter value of the traditional PID;
    Figure FDA0003891275450000045
    is a scale factor; Δ K p 、ΔK i 、ΔK d Is an output value that changes in real time according to the fuzzy rule.
  5. 5. A Smith-fuzzy PID control method of a class B foam mixing system as claimed in claim 2, characterized in that: the control method for controlling the opening of the regulating valve in real time comprises the following steps:
    s01, electrifying and initializing a system; setting a liquid control proportion;
    s02, reading the opening of the real-time regulating valve and the rotating speed of the water pump;
    s03, judging whether the user sets liquid proportion control or not, if not, continuing sampling by the system without controlling the regulating valve, and returning to S2; if yes, executing the next step;
    s04, judging whether the sensor has a hardware fault, and if not, carrying out the next step; if yes, ending;
    s05, calculating a valve opening deviation value;
    s06, controlling the opening degree of the valve by applying a Smith-fuzzy PID algorithm;
    s07, judging whether the opening degree meets the liquid proportion set by a user, and returning to S5 if the opening degree does not meet the liquid proportion set by the user; if so, the process is ended.
  6. 6. The Smith-fuzzy PID control method of the class B foam mixing system of claim 2, wherein: the control method for controlling the opening degree of the regulating valve by adopting a Smith-fuzzy PID algorithm comprises the following steps:
    s11, setting a valve opening expected value;
    s12, calculating an error E and an error change rate EC;
    s13, adjusting quantization factors Ke and Kec;
    s14, fuzzification Ke and Kec;
    s15, deblurring Ke and Kec;
    s16, determining K by looking up a table p 、K i 、K d A blur value of;
    s17, determining K by using gravity center method p 、K i 、K d An actual value;
    s18, adjusting a scale factor Ku on line;
    s19, output K p 、K i 、K d
    S20, inputting a position PID into a controller;
    s21, controlling the opening degree of a valve of the regulating valve;
    s22, outputting the flow of the foam stock solution;
    s23, controlling the opening of the valve by using a Smith pre-estimation controller;
    and S24, collecting the flow data of the stock solution and returning to S12.
CN202211261608.0A 2022-10-14 2022-10-14 Smith-fuzzy PID control method of B-type foam mixing system Pending CN115586718A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202211261608.0A CN115586718A (en) 2022-10-14 2022-10-14 Smith-fuzzy PID control method of B-type foam mixing system

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202211261608.0A CN115586718A (en) 2022-10-14 2022-10-14 Smith-fuzzy PID control method of B-type foam mixing system

Publications (1)

Publication Number Publication Date
CN115586718A true CN115586718A (en) 2023-01-10

Family

ID=84779052

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202211261608.0A Pending CN115586718A (en) 2022-10-14 2022-10-14 Smith-fuzzy PID control method of B-type foam mixing system

Country Status (1)

Country Link
CN (1) CN115586718A (en)

Cited By (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN114653485A (en) * 2022-03-18 2022-06-24 云南华迅达智能科技有限公司 Flotation process fuzzy control method based on foam flow velocity

Cited By (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN114653485A (en) * 2022-03-18 2022-06-24 云南华迅达智能科技有限公司 Flotation process fuzzy control method based on foam flow velocity

Similar Documents

Publication Publication Date Title
Kumbasar et al. Interval type-2 fuzzy inverse controller design in nonlinear IMC structure
Kumar et al. Real-time performance evaluation of a fuzzy PI+ fuzzy PD controller for liquid-level process
CN106227042A (en) Dissolved oxygen control method based on fuzzy neural network
CN115586718A (en) Smith-fuzzy PID control method of B-type foam mixing system
Chen et al. H/sub/spl infin//output feedback control of discrete-time fuzzy systems with application to chaos control
McAvoy Time optimal and Ziegler-Nichols control. Experimental and theoretical results
AU2021100130A4 (en) Intelligent control method and system for sewage treatment aeration based on deep learning
Gao et al. Design of PID controller for greenhouse temperature based on Kalman
Merino et al. Knowledge based recursive non-linear partial least squares (RNPLS)
King et al. Koopman-based differentiable predictive control for the dynamics-aware economic dispatch problem
Sakthivel et al. Design of fuzzy logic controller for a spherical tank system and its real time implementation
Mendes et al. Adaptive fuzzy generalized predictive control based on Discrete-Time TS fuzzy model
CN107247994B (en) Fuzzy modeling method for desulfurization efficiency of tray tower desulfurization device
Chen Principle and Simulation PID Controller of Liquid Level System
Huang et al. A self-organising fuzzy logic controller for a coordinate machine
Chadli et al. Stability Analysis and Design for Continuous-Time Takagi-Sugeno Control Systems.
Bello et al. Control of a coagulation chemical dosing unit for water treatment plants using MMPC based on fuzzy weighting
Caia et al. A real-time expert control system
Yordanova et al. Design of supervisor-based adaptive process fuzzy logic control
Lin et al. Prediction of effluent from WWTPS using differential evolutionary extreme learning machines
JPH05317643A (en) Method for controlling circulating flow rate of liquid absorbent for wet flue gas desulfurizer and device therefor
Lopatin et al. An adaptive control system of a polymerizer based on fuzzy supervisor
Venkataraman Design and implementation of adaptive PID and adaptive fuzzy controllers for a level process station
Basaran et al. Model-free fuzzy control of CPU utilization for unpredictable workloads
Zárate et al. Fuzzy sliding mode controller for a pH process in stirred tanks

Legal Events

Date Code Title Description
PB01 Publication
PB01 Publication
SE01 Entry into force of request for substantive examination
SE01 Entry into force of request for substantive examination