CN107479364A - A kind of fluid hybrid control system based on double closed-loop PID algorithm - Google Patents

A kind of fluid hybrid control system based on double closed-loop PID algorithm Download PDF

Info

Publication number
CN107479364A
CN107479364A CN201710820194.3A CN201710820194A CN107479364A CN 107479364 A CN107479364 A CN 107479364A CN 201710820194 A CN201710820194 A CN 201710820194A CN 107479364 A CN107479364 A CN 107479364A
Authority
CN
China
Prior art keywords
module
temperature
output
pid algorithm
control
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.)
Granted
Application number
CN201710820194.3A
Other languages
Chinese (zh)
Other versions
CN107479364B (en
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.)
Xian University of Science and Technology
Original Assignee
Xian University of Science and Technology
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 Xian University of Science and Technology filed Critical Xian University of Science and Technology
Priority to CN201710820194.3A priority Critical patent/CN107479364B/en
Publication of CN107479364A publication Critical patent/CN107479364A/en
Application granted granted Critical
Publication of CN107479364B publication Critical patent/CN107479364B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

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.

Landscapes

  • Physics & Mathematics (AREA)
  • General Physics & Mathematics (AREA)
  • Engineering & Computer Science (AREA)
  • Automation & Control Theory (AREA)
  • Feedback Control In General (AREA)

Abstract

The invention discloses a kind of fluid hybrid control system based on double closed-loop PID algorithm, including micro controller module, power management module, management control module, output driving module, output feedback module;The micro controller module connects power management module, management control module, output driving module, output feedback module respectively.The fluid hybrid control system based on double closed-loop PID algorithm of the present invention proposes the pid algorithm based on two close cycles, can solve the problem of ageing poor because of algorithm feedback, to cause indoor bath temperature to be difficult to control constant temperature.

Description

Fluid mixing control system based on double closed-loop PID algorithm
Technical Field
The invention relates to fluid mixing control, in particular to a fluid mixing control system based on a double closed-loop PID algorithm.
Background
At present, traditional bathroom control uses manual proportion to mix or survey according to temperature sensor and mix preceding cold and hot water temperature then carry out the proportion and mix, and both all seriously receive the influence of temperature and hydraulic before mixing, and external temperature or water pressure change promptly, and the difficult automatic recovery of post-mixing temperature must readjust, seriously influences user experience.
The negative feedback hybrid control system based on the PID algorithm model is very obvious in application in the field of industrial control, but cannot be applied to the field of household bathroom control due to the fact that the algorithm model is complex, the complexity of the algorithm model is high, and the feedback timeliness is poor.
And the traditional fluid temperature closed-loop PID algorithm only detects the temperature of the outflow fluid, compares the actual output temperature with the preset temperature, and then carries out negative feedback regulation by using the PID algorithm. The temperature lag of the output is severe due to the significant delay in mixing the fluids.
Disclosure of Invention
Aiming at the problems, the invention provides a fluid mixing control system based on a double closed-loop PID algorithm, which comprises a microcontroller module, a power supply management module, a management control module, an output driving module and an output feedback module; the microcontroller module is respectively connected with the power supply management module, the management control module, the output driving module and the output feedback module;
a power management module: the power supply with different specifications is mainly provided for a control circuit and a driving circuit, wherein the control module adopts a 3.3V high-stability power supply, and the driving module provides a 12V high-power supply;
the management control module: the method is mainly used for the specific operations of the whole control module, including PID coefficient setting, starting/stopping operation of a driving module and control data uploading;
a microcontroller module: the core of the integrated system is mainly used for packaging the whole PID algorithm, controlling the functions of the whole drive processing, sensor signal processing and the like;
an output drive module: the method mainly provides a large-current driving control module which is mainly used for controlling liquid flow velocity devices such as an electromagnetic valve, a direct-current pump and the like;
an output feedback module: mainly provides 3 groups of angular momentum sensors and 3 groups of single bus type temperature sensor interfaces, integrates the drive of the corresponding sensor in the MCU, and can be directly used by user access;
the PID algorithm comprises:
a first closed loop:
measuring the temperature of the actual output water by using a temperature sensor, performing feedback regulation by using a PID algorithm, calculating voltage values at two ends of the temperature of the water according to the water temperature required by a user, and only revising a certain voltage by using temperature feedback, namely revising effective values of the voltages at two ends of the water by using the temperature feedback;
and (2) closed loop II:
and calculating the flow passing through the water pump and the voltage at two ends of the water pump according to the data measured by the flow sensor, and feeding back by using an actual value measured by the flow sensor, namely correcting the actual value of the output hot water flow.
Further, the PID algorithm specifically includes:
Q 1 T 1 +Q 2 T 2 =QT
mixing the following components in proportion:
wherein Q1 is the flow rate of hot water, T1 is the temperature of hot water, Q2 is the inflow flow rate of cold water, and T2 is the temperature of cold water; q is the outflow rate, T is the outflow temperature;
namely:
assuming that the voltage across the water pump is proportional to the flow through the water pump, i.e.:
wherein K is a proportionality coefficient;
then there isNamely:order toM is a constant value;
then there is U (T) 1 ,T 2 ,T)=MK(T 1 ,T 2 T) of whichTherefore, it is not only easy to use
The actual measured temperature is known as T (t) The feedback quantity obtained according to the PID principle is: e (T) = T r (t)-T(t)
The fuzzification control of the above formula is digitized to obtain:
ΔT(k)=k pt [e(k)-e(k-1)]+k it e(k)+k dt [e(k)-2e(k-1)+e(k-2)]
in the formula: k is a radical of it =k pt /T pt ;k dt =k pt /T dt Wherein T is sampling period, k is serial number
The revised theoretical temperature value is output as:
the theoretical voltage value calculated by deducing the theoretical temperature value is as follows:
according to the same principle, the obtained actual control output flow is:
the actual output flow rate is Q 1 (k) And is provided withObtaining the actual voltage value U r Comprises the following steps:
the control voltage derived for the actual output is:
the invention has the advantages that:
the feedback time delay of the fluid outflow temperature is small (the time lag is small).
The temperature fluctuation range of the output fluid is small. The real-time measurement of the temperature of cold and hot fluids is completed before the fluids are output, and the flow output is calculated according to the theory.
The corresponding speed is fast when the preset temperature is changed. When the preset temperature change is detected, the system can adjust the mixing ratio of cold fluid and hot fluid in real time, and the corresponding speed of the system is far higher than the traditional corresponding speed.
Meanwhile, the purpose of dual control output of fluid flow and temperature can be realized. The system can adjust the flow of the fluid (when all the fluid mixing chambers are large in volume, the flow is constant) under the condition of ensuring that the flow proportion of the inflow fluid is not changed according to the preset output flow and temperature, and the size of the output fluid can be effectively controlled.
The fluid mixing control system based on the double-closed-loop PID algorithm provided by the invention provides the PID algorithm based on the double-closed-loop, and can solve the problem that the constant temperature of an indoor bathroom is difficult to control due to poor timeliness of algorithm feedback.
In addition to the objects, features and advantages described above, other objects, features and advantages of the present invention are also provided. The present invention will be described in further detail below with reference to the drawings.
Drawings
The accompanying drawings, which are incorporated in and constitute a part of this application, illustrate embodiments of the invention and, together with the description, serve to explain the invention and not to limit the invention.
FIG. 1 is a block diagram of a fluid mixing control system based on a dual closed-loop PID algorithm according to the present invention;
FIG. 2 is a flow chart of the PID control of the fluid mixing control system based on the double closed loop PID algorithm.
FIG. 3 is a schematic diagram of a supervisory control module for a dual closed-loop PID algorithm based fluid hybrid control system of the present invention;
FIG. 4 is a schematic diagram of an output feedback module of a dual closed loop PID algorithm based fluid hybrid control system of the present invention;
FIG. 5 is a schematic diagram of an output drive module of a dual closed-loop PID algorithm based fluid hybrid control system of the present invention;
FIG. 6 is a schematic diagram of a power management module of a dual closed-loop PID algorithm based fluid hybrid control system of the present invention;
FIG. 7 is a schematic diagram of the microcontroller module of a dual closed loop PID algorithm based fluid hybrid control system of the present invention.
Detailed Description
In order to make the objects, technical solutions and advantages of the present invention more apparent, the present invention is described in further detail below with reference to the accompanying drawings and embodiments. It should be understood that the specific embodiments described herein are merely illustrative of the invention and are not intended to limit the invention.
Referring to fig. 1, a fluid mixing control system based on a dual closed-loop PID algorithm as shown in fig. 1 includes a microcontroller module, a power management module, a management control module, an output driving module, and an output feedback module; the microcontroller module is respectively connected with the power supply management module, the management control module, the output driving module and the output feedback module;
referring to fig. 6, as shown in fig. 6, the power management module: the power supply with different specifications is mainly provided for the control circuit and the driving circuit, wherein the control module adopts a 3.3V high-stability power supply, and the driving module provides a 12V high-power supply.
The power management module provides an external power supply interface, the control voltage is 3.3V to 15V, and the driving voltage is 12V-36V; the control circuit adopts a wide voltage mode, and is internally provided with a voltage stabilizing circuit, so that the influence of circuit fluctuation on the control circuit is eliminated; the drive circuit is connected with a protective resistor; AMS1117-3.3 is selected as the voltage stabilizing chip, and a diode for preventing backflow is added at the input end.
Referring to fig. 3, as shown in fig. 3, the management control module: the method is mainly used for specific operations of the whole control module, such as PID coefficient setting, starting/stopping operation of a driving module, control data uploading and the like.
The system comprises a minimum system working mode selection module, an additional expansion interface and a data interface of a management control module. Among them, the SWDIO, SWCLK, NRST, BOOT0, USART1_ RX, USART1_ TX ports are program download ports.
Referring to fig. 7, as shown in fig. 7, the microcontroller module: the core of the integrated system is mainly used for packaging the whole PID algorithm to control the whole drive processing, sensor signal processing and other functions.
Referring to fig. 5, as shown in fig. 5, the output driving module: the large-current driving control module is mainly used for controlling liquid flow velocity devices such as an electromagnetic valve, a direct-current pump and the like.
The drive circuit and the MCU are isolated by an optocoupler to prevent the eddy current voltage from influencing the circuit; the driving circuit supports the voltage of 50V at most and can provide an output load of 50W; the output end adopts a 2510 connection terminal so as to be directly operated by a user.
Referring to fig. 4, as shown in fig. 4, the output feedback module: the system mainly provides 3 groups of angular momentum sensors and 3 groups of single-bus type temperature sensor interfaces, and integrates the drive of corresponding sensors in the MCU, such as the drive of common sensors such as DS18B20, JR-A168 and the like, and the user access can be directly used.
The interfaces of the P4, P5 and P6 which are the ds18b20 temperature sensors are respectively used for detecting the temperature of the liquid before and after mixing; p7, P8 and P9 are respectively used for detecting the flow rate of the mixed liquid; the temperature sensor adopts a single bus protocol, and the angular momentum sensor adopts a pulse mode; the 2510 connecting terminal is used for the interfaces, so that the use by users is facilitated.
Referring to fig. 2, as shown in fig. 2, the PID algorithm includes:
a closed loop I:
measuring the temperature of the actual output water by using a temperature sensor, performing feedback regulation by using a PID algorithm, calculating voltage values at two ends of the temperature of the water according to the water temperature required by a user, and only revising a certain voltage by using temperature feedback, namely revising effective values of the voltages at two ends of the water by using the temperature feedback;
and (2) closed loop II:
and calculating the flow passing through the water pump and the voltage at two ends of the water pump according to the data measured by the flow sensor, and feeding back the actual value measured by the flow sensor, namely correcting the actual value of the output hot water flow.
The PID algorithm is specifically as follows:
Q 1 T 1 +Q 2 T 2 =QT
mixing the following components in proportion:
wherein Q1 is the flow rate of hot water, T1 is the temperature of hot water, Q2 is the inflow flow rate of cold water, and T2 is the temperature of cold water; q is the outflow flow rate, T is the outflow temperature;
namely:
assuming that the voltage across the water pump is proportional to the flow through the water pump, i.e.:
wherein K is a proportionality coefficient;
then there isNamely:order toM is a constant value;
then there is U (T) 1 ,T 2 ,T)=MK(T 1 ,T 2 T), whereinTherefore, it is not only easy to use
The actual measured temperature is known as T (t) The feedback quantity obtained according to the PID principle is as follows: e (T) = T r (t)-T(t)
The fuzzification control of the above formula is digitized to obtain:
ΔT(k)=k pt [e(k)-e(k-1)]+k it e(k)+k dt [e(k)-2e(k-1)+e(k-2)]
in the formula: k is a radical of it =k pt /T pt ;k dt =k pt /T dt Wherein T is a sampling period, and k is a sequence number
The revised theoretical temperature value is output as:
the theoretical voltage value calculated by deducing the theoretical temperature value is as follows:
according to the same principle, the obtained actual control output flow is:
the actual output flow rate is Q 1 (k) And isObtaining the actual voltage value U r Comprises the following steps:
the control voltage derived for the actual output is:
analyzing a fluid flow detection model:
in this system, the flow sensor used is a hall sensor JR-a168 flow sensor, whose parameters are:
working voltage: DC =12V; working current: i =300mA; the detection signal outputs a pulse voltage, the high level > =4.5V, and the low level < =0.5V; duty cycle is 50% ± 10%; the pulse characteristics are F = (Q × Q), (F is the output pulse frequency, Q is the flow rate), and the flow rate measurement range is 2-12L/min.
The pulse frequency of the flow sensor varies from 18HZ to 108HZ, i.e. the shortest time per pulse period is from 0.009s to 0.0555s, i.e. from 9ms to 55ms, within the measurable range of the flow sensor.
The control system is mainly based on an STM32F103 single chip microcomputer as a core control unit, a control circuit design control circuit module is built according to an angular momentum sensor (mainly used for testing the flow of fluid) and a temperature sensor (used for measuring the temperature of the fluid before and after mixing) data interface, an algorithm model is built and realized by using C language, the whole algorithm is packaged into a microcontroller, algorithm adjusting parameters are provided to the outside in a serial port mode, and the purpose of minimum realization is achieved.
The fluid mixing control system based on the double-closed-loop PID algorithm provided by the invention provides the PID algorithm based on the double-closed loop, and can solve the problem that the constant temperature of an indoor bathroom is difficult to control due to poor timeliness of algorithm feedback.
The feedback time delay of the fluid outflow temperature is small (the time lag is small).
The temperature fluctuation range of the output fluid is small. The real-time measurement of the temperature of cold and hot fluids is completed before the fluids are output, and the flow output is calculated according to the theory.
The corresponding speed is fast when the preset temperature is changed. When the preset temperature change is detected, the system can adjust the mixing proportion of cold and hot fluids in real time, and the corresponding speed of the system is far higher than the traditional corresponding speed.
Meanwhile, the purpose of dual control output of fluid flow and temperature can be realized. The system can adjust the flow of the fluid (when all the fluid mixing chambers are large in volume, the flow is constant) under the condition of ensuring that the flow proportion of the inflow fluid is not changed according to the preset output flow and temperature, and the size of the output fluid can be effectively controlled.
The fluid mixing control system based on the double-closed-loop PID algorithm provided by the invention provides the PID algorithm based on the double-closed-loop, and can solve the problem that the constant temperature of an indoor bathroom is difficult to control due to poor timeliness of algorithm feedback.
The above description is only for the purpose of illustrating the preferred embodiments of the present invention and is not to be construed as limiting the invention, and any modifications, equivalents, improvements and the like that fall within the spirit and principle of the present invention are intended to be included therein.

Claims (2)

1. A fluid mixing control system based on a double closed-loop PID algorithm is characterized by comprising a microcontroller module, a power supply management module, a management control module, an output driving module and an output feedback module; the microcontroller module is respectively connected with the power supply management module, the management control module, the output driving module and the output feedback module;
a power management module: the power supply with different specifications is mainly provided for a control circuit and a driving circuit, wherein the control module adopts a 3.3V high-stability power supply, and the driving module provides a 12V high-power supply;
the management control module: the method is mainly used for the specific operations of the whole control module, including PID coefficient setting, starting/stopping operation of a driving module and control data uploading;
a microcontroller module: the core of the integrated system is mainly used for packaging the whole PID algorithm, controlling the functions of the whole drive processing, sensor signal processing and the like;
an output drive module: the large-current driving control module is mainly provided and is mainly used for controlling liquid flow rate devices such as an electromagnetic valve, a direct-current pump and the like;
an output feedback module: mainly provides 3 groups of angular momentum sensors and 3 groups of single bus type temperature sensor interfaces, integrates the drive of the corresponding sensor in the MCU, and can be directly used by user access;
the PID algorithm comprises:
a closed loop I:
measuring the temperature of the actual output water by using a temperature sensor, performing feedback regulation by using a PID algorithm, calculating voltage values at two ends of the temperature of the water according to the water temperature required by a user, and only revising a certain voltage by using temperature feedback, namely revising effective values of the voltages at two ends of the water by using the temperature feedback;
and (2) closed loop II:
and calculating the flow passing through the water pump and the voltage at two ends of the water pump according to the data measured by the flow sensor, and feeding back the actual value measured by the flow sensor, namely correcting the actual value of the output hot water flow.
2. The fluid mixing control system based on the dual closed-loop PID algorithm as claimed in claim 1, characterized in that the PID algorithm is specifically:
Q 1 T 1 +Q 2 T 2 =QT
mixing the following components in proportion:
wherein Q1 is the flow rate of hot water, T1 is the temperature of hot water, Q2 is the inflow flow rate of cold water, and T2 is the temperature of cold water; q is the outflow flow rate, T is the outflow temperature;
namely:
assuming that the voltage across the water pump is proportional to the flow through the water pump, i.e.: Q 1 =K u U
wherein K is a proportionality coefficient;
then there isNamely:order toM is a constant value;
then there is U (T) 1 ,T 2 ,T)=MK(T 1 ,T 2 T) of whichTherefore, it is possible to
Knowing the actual measured temperature T (t) The feedback quantity obtained according to the PID principle is as follows:
e(t)=T r (t)-T(t)
the fuzzification control of the above formula is digitized to obtain:
ΔT(k)=k pt [e(k)-e(k-1)]+k it e(k)+k dt [e(k)-2e(k-1)+e(k-2)]
in the formula: k is a radical of formula it =k pt /T pt ;k dt =k pt /T dt Wherein T is a sampling period, and k is a sequence number
The revised theoretical temperature value is output as:
the theoretical voltage value calculated by deducing the theoretical temperature value is as follows:
according to the same principle, the obtained actual control output flow is:
the actual output flow rate is Q 1 (k) And isObtaining the actual voltage value U r Comprises the following steps:
the control voltage derived for the actual output is:
2
CN201710820194.3A 2017-09-13 2017-09-13 Fluid mixing control system based on double closed-loop PID algorithm Active CN107479364B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201710820194.3A CN107479364B (en) 2017-09-13 2017-09-13 Fluid mixing control system based on double closed-loop PID algorithm

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201710820194.3A CN107479364B (en) 2017-09-13 2017-09-13 Fluid mixing control system based on double closed-loop PID algorithm

Publications (2)

Publication Number Publication Date
CN107479364A true CN107479364A (en) 2017-12-15
CN107479364B CN107479364B (en) 2021-08-31

Family

ID=60583849

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201710820194.3A Active CN107479364B (en) 2017-09-13 2017-09-13 Fluid mixing control system based on double closed-loop PID algorithm

Country Status (1)

Country Link
CN (1) CN107479364B (en)

Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JPH01118034A (en) * 1987-10-30 1989-05-10 Toto Ltd Mixer for hot water and water
CN103047768A (en) * 2013-01-11 2013-04-17 江苏长乐纤维科技有限公司 Method for controlling temperature of heat-transfer medium (HTM) furnace evaporator
CN103970166A (en) * 2013-02-02 2014-08-06 成都达创科技有限责任公司 Intelligent water temperature and quantity control device
CN105299929A (en) * 2015-11-10 2016-02-03 苏州美达瑞电子有限公司 Intelligent household solar energy water heater regulation and control system
CN105630033A (en) * 2016-02-29 2016-06-01 西南大学 Water temperature control method and control system thereof based on adaptable fuzzy PID

Patent Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JPH01118034A (en) * 1987-10-30 1989-05-10 Toto Ltd Mixer for hot water and water
CN103047768A (en) * 2013-01-11 2013-04-17 江苏长乐纤维科技有限公司 Method for controlling temperature of heat-transfer medium (HTM) furnace evaporator
CN103970166A (en) * 2013-02-02 2014-08-06 成都达创科技有限责任公司 Intelligent water temperature and quantity control device
CN105299929A (en) * 2015-11-10 2016-02-03 苏州美达瑞电子有限公司 Intelligent household solar energy water heater regulation and control system
CN105630033A (en) * 2016-02-29 2016-06-01 西南大学 Water temperature control method and control system thereof based on adaptable fuzzy PID

Also Published As

Publication number Publication date
CN107479364B (en) 2021-08-31

Similar Documents

Publication Publication Date Title
US9631831B2 (en) Method for controlling the opening of an HVAC valve based on the energy-per-flow gradient
CN105757851B (en) A kind of chilled water variable-flow energy-saving control method and control system
CN102679497B (en) Improved self-correcting variable parameter fan coil temperature control method and special equipment
TW200728670A (en) Constant-temperature liquid circulating device and temperature control method for the device
CN205742364U (en) A kind of constant temperature and pressure water system
RU2532856C2 (en) Temperature control system and method of temperature control in premise
CN205481502U (en) Refrigerated water unsteady flow volume energy -saving control system based on coefficient of resistance is optimized
CN104748411A (en) Solar water heater thermostatic water mixing device
CN103134145A (en) Control method of water-cooling water chilling unit and water-cooling water chilling unit
CN110017604A (en) A kind of water heater working control method and device
CN104765289B (en) Control system of magnetorheological fluid load simulator and control method thereof
CN211551977U (en) Intelligent control variable frequency regulating system for air conditioner circulating water pump
Ketonen et al. High flowrate digital hydraulic valve system
CN107479364B (en) Fluid mixing control system based on double closed-loop PID algorithm
CN104697198A (en) Thermostatic water mixing control method for solar water heater
CN102563197A (en) Constant-temperature automatic control method and device for central heating flow valve
CN101387438A (en) Electric water heater, electric supply control device thereof and heating method
CN105299929A (en) Intelligent household solar energy water heater regulation and control system
US11815921B2 (en) Automated swimming pool heat pump flow rate controller
CN206330290U (en) Heat pump water-heating machine water circuit system
CN206347696U (en) chilled water secondary pump energy-saving control system
CN205664911U (en) System for be used for calibration of ultrasonic water meter precision
CN109185212A (en) A kind of DC fan alignment circuit
CN104848395A (en) Family splitting heat metering energy-saving control system of heating heat exchange unit
CN205448401U (en) High accuracy temperature control water tank

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
GR01 Patent grant
GR01 Patent grant