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 PDFInfo
- 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
- mrow
- msub
- module
- mtr
- mtd
- 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
Links
- 239000012530 fluid Substances 0.000 title claims abstract description 47
- XLYOFNOQVPJJNP-UHFFFAOYSA-N water Substances O XLYOFNOQVPJJNP-UHFFFAOYSA-N 0.000 claims description 32
- 238000012545 processing Methods 0.000 claims description 6
- 239000007788 liquid Substances 0.000 claims description 5
- 230000006870 function Effects 0.000 claims description 3
- 238000005070 sampling Methods 0.000 claims description 3
- 238000010586 diagram Methods 0.000 description 6
- 238000013461 design Methods 0.000 description 3
- 238000005259 measurement Methods 0.000 description 3
- 238000004364 calculation method Methods 0.000 description 2
- 230000008859 change Effects 0.000 description 2
- 238000001514 detection method Methods 0.000 description 2
- 230000009977 dual effect Effects 0.000 description 2
- 230000004044 response Effects 0.000 description 2
- 238000000034 method Methods 0.000 description 1
- 238000012986 modification Methods 0.000 description 1
- 230000004048 modification Effects 0.000 description 1
- 230000006641 stabilisation Effects 0.000 description 1
- 238000011105 stabilization Methods 0.000 description 1
- 238000012360 testing method Methods 0.000 description 1
Classifications
-
- G—PHYSICS
- G05—CONTROLLING; REGULATING
- G05B—CONTROL OR REGULATING SYSTEMS IN GENERAL; FUNCTIONAL ELEMENTS OF SUCH SYSTEMS; MONITORING OR TESTING ARRANGEMENTS FOR SUCH SYSTEMS OR ELEMENTS
- G05B11/00—Automatic controllers
- G05B11/01—Automatic controllers electric
- G05B11/36—Automatic controllers electric with provision for obtaining particular characteristics, e.g. proportional, integral, differential
- G05B11/42—Automatic 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
本发明公开了一种基于双闭环PID算法的流体混合控制系统,包括微控制器模块、电源管理模块、管理控制模块、输出驱动模块、输出反馈模块;所述微控制器模块分别连接电源管理模块、管理控制模块、输出驱动模块、输出反馈模块。本发明的基于双闭环PID算法的流体混合控制系统提出基于双闭环的PID算法,可解决因算法反馈的时效性较差,造成室内浴室温度难以控制恒温的问题。
The invention discloses a fluid mixing control system based on a double-closed-loop PID algorithm, which includes a microcontroller module, a power management module, a management control module, an output drive module, and an output feedback module; the microcontroller modules are respectively connected to the power management module , a management control module, an output drive module, and an output feedback module. The fluid mixing control system based on the double-closed-loop PID algorithm of the present invention proposes a double-closed-loop PID algorithm, which can solve the problem that it is difficult to control the temperature of the indoor bathroom due to poor timeliness of algorithm feedback.
Description
技术领域technical field
本发明涉及流体混合控制,具体涉及一种基于双闭环PID算法的流体混合控制系统。The invention relates to fluid mixing control, in particular to a fluid mixing control system based on a double-closed-loop PID algorithm.
背景技术Background technique
目前,传统的浴室控制使用手动比例混合或根据温度传感器测定混合前冷热水温度然后进行比例混合,两者均严重受混合前水温和水压的影响,即外界水温或水压发生变化,混合后水温很难自动恢复,必须重新调节,严重影响用户体验。At present, the traditional bathroom control uses manual proportional mixing or measures the temperature of cold and hot water before mixing according to the temperature sensor and then performs proportional mixing. Afterwards, the water temperature is difficult to recover automatically and must be readjusted, which seriously affects the user experience.
基于PID算法模型的负反馈混合控制系统在工业控制领域应用非常显著,但是由于算法模型复杂,算法模型复杂度较高且反馈的时效性较差,无法应用于家庭浴室控制领域。The negative feedback hybrid control system based on the PID algorithm model is very significant in the field of industrial control, but due to the complexity of the algorithm model, the complexity of the algorithm model is high and the timeliness of feedback is poor, it cannot be applied to the field of home bathroom control.
且传统的流体温度闭环PID算法只是检测流出流体的温度,根据实际输出温度和预设温度进行比较,然后使用PID算法进行负反馈调节。由于流体混合时有较明显的延迟,所以导致输出的温度时滞性严重。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 uses the PID algorithm for negative feedback adjustment. Due to the obvious delay when the fluid is mixed, the temperature time lag of the output is serious.
发明内容Contents of the invention
本发明针对上述问题,提供了一种基于双闭环PID算法的流体混合控制系统,包括微控制器模块、电源管理模块、管理控制模块、输出驱动模块、输出反馈模块;所述微控制器模块分别连接电源管理模块、管理控制模块、输出驱动模块、输出反馈模块;Aiming at the above problems, the present invention provides a fluid mixing control system based on a double-closed-loop PID algorithm, including a microcontroller module, a power management module, a management control module, an output drive module, and an output feedback module; the microcontroller modules are respectively Connect power management module, management control module, output driver module, output feedback module;
电源管理模块:主要为控制电路和驱动电路提供不同规格的电源,其中控制模块采用3.3V的高稳定度电源,驱动模块提供12V大功率电源;Power management module: It mainly provides power supplies of different specifications for the control circuit and drive circuit, among which the control module uses a 3.3V high-stable power supply, and the drive module provides a 12V high-power power supply;
管理控制模块:主要用于整个控制模块的具体操作,包括PID系数设置,驱动模块的启动/停止操作,控制数据上传;Management control module: mainly used for the specific operation of the entire control module, including PID coefficient setting, start/stop operation of the drive module, and control data upload;
微控制器模块:整合系统的核心,主要用于封装整个PID算法,控制整个驱动处理,传感器信号处理等功能;Microcontroller module: the core of the integrated system, mainly used to encapsulate the entire PID algorithm, control the entire drive processing, sensor signal processing and other functions;
输出驱动模块:主要提供大电流驱动控制模块,主要用于控制电磁阀,直流泵等液体流速装置;Output drive module: mainly provides high-current drive control module, which is mainly used to control liquid flow rate devices such as solenoid valves and DC pumps;
输出反馈模块:主要提供3组角动量传感器,3组单总线类型温度传感器接口,并在MCU中集成对应传感器的驱动,以及用户接入可以直接使用;Output feedback module: It mainly provides 3 sets of angular momentum sensors, 3 sets of single-bus type temperature sensor interfaces, and integrates the driver of the corresponding sensors in the MCU, and the user can directly use it;
所述PID算法包括:The PID algorithm includes:
闭环一:Closed loop one:
利用温度传感器测出实际输出水的温度,利用PID算法进行反馈调节,再根据用户的需求的水温计算出水的温度两端的电压值,将利用温度反馈将一定的电压只进行修订,即利用温度反馈修正水两端的电压的有效值;Use the temperature sensor to measure the actual temperature of the output water, use the PID algorithm for feedback adjustment, and then calculate the voltage value at both ends of the water temperature according to the water temperature required by the user, and use the temperature feedback to only revise a certain voltage, that is, use the temperature feedback Correct the effective value of the voltage across the water;
闭环二:Closed loop two:
根据流量传感器测得的数据,计算出通过水泵的流量以及水泵两端的电压,再利用流量传感器测出的实际值进行反馈,即修正输出热水流量的实际值。According to the data measured by the flow sensor, the flow through the water pump and the voltage across the pump are calculated, and then the actual value measured by the flow sensor is used for feedback, that is, the actual value of the output hot water flow is corrected.
进一步地,所述PID算法具体为:Further, the PID algorithm is specifically:
Q1T1+Q2T2=QTQ 1 T 1 +Q 2 T 2 =QT
由比例混合得:Mixed in proportions to get:
其中Q1为热水的流量,T1为热水温度,Q2为冷水流入流量,T2为冷水温度;Q为流出流量,T为流出温度;Among them, Q1 is the flow rate of hot water, T1 is the temperature of hot water, Q2 is the inflow flow of cold water, T2 is the temperature of cold water; Q is the outflow flow, and T is the outflow temperature;
即:which is:
假设通过水泵两端的电压与通过水泵的流量成正比,即:Assume that the voltage across the pump is proportional to the flow through the pump, ie:
其中K为比例系数;Where K is the proportional coefficient;
则有即:令M为定值;then there is which is: make M is a fixed value;
则有U(T1,T2,T)=MK(T1,T2,T),其中所以 Then there is U(T 1 ,T 2 ,T)=MK(T 1 ,T 2 ,T), where so
已知实际测出温度为T(t),根据PID原理得到的反馈量为:e(t)=Tr(t)-T(t)It is known that the actual measured temperature is T (t) , and the feedback value obtained according to the PID principle is: e(t)=T r (t)-T(t)
将上式的模糊化控制数字化处理之后可得:After digitizing the fuzzy control of the above formula, we can get:
ΔT(k)=kpt[e(k)-e(k-1)]+kite(k)+kdt[e(k)-2e(k-1)+e(k-2)]ΔT(k)=k pt [e(k)-e(k-1)]+k it e(k)+k dt [e(k)-2e(k-1)+e(k-2)]
式中:kit=kpt/Tpt;kdt=kpt/Tdt其中,T为采样周期,k为序列号In the formula: k it =k pt /T pt ; k dt =k pt /T dt Among them, T is the sampling period, k is the serial number
则输出修订后的理论温度值为:The revised theoretical temperature value is then output as:
推出理论温度值所计算出的理论电压值为:The theoretical voltage value calculated by deriving the theoretical temperature value is:
根据相同的原理,所得到实际控制输出的流量为:According to the same principle, the obtained flow rate of the actual control output is:
实际输出的流量为Q1(k)且得实际的电压值Ur为: The actual output flow is Q 1 (k) and The actual voltage value U r is obtained as:
经推导实际输出的控制电压为:The deduced actual output control voltage is:
本发明的优点:Advantages of the present invention:
本发明流体流出温度反馈时间延迟小(时滞小)。The present invention has a small feedback time delay (small time lag) of the fluid outflow temperature.
输出流体的温度波动范围小。在流体输出前已经完成对冷热两种流体的温度进行实时测量,并按照理论计算的流量输出,本设计并在流量流入端添加流量的PID闭环反馈系统,实时输出流体的问题已经非常接近预设温度。The temperature fluctuation range of the output fluid is small. Real-time measurement of the temperature of the hot and cold fluids has been completed before the fluid output, and the flow output according to the theoretical calculation, this design and the PID closed-loop feedback system of the flow rate is added at the flow inflow end, the problem of real-time output of the fluid is very close to the expected Set temperature.
预设温度改变时相应速度快。当检测到预设温度变化时,系统可实时调节冷热流体的混合比例,其相应速度远高于传统的相应速度。The response speed is fast when the preset temperature is changed. When a preset temperature change is detected, the system can adjust the mixing ratio of hot and cold fluids in real time, and the corresponding speed is much higher than the traditional corresponding speed.
同时可实现流体流量和温度双重控制输出的目的。系统可根据预设的输出流量和温度,在保证流入流体流量比例不变的情况下调节流体流量的大小(所有的流体混合仓大体积时一定的),可有效达到控制输出的流体的大小。At the same time, the purpose of dual control output of fluid flow and temperature can be realized. According to the preset output flow and temperature, the system can adjust the size of the fluid flow (all fluid mixing chambers have a certain volume when the volume is large) while ensuring that the flow ratio of the inflow fluid remains unchanged, which can effectively control the size of the output fluid.
本发明的基于双闭环PID算法的流体混合控制系统提出基于双闭环的PID算法,可解决因算法反馈的时效性较差,造成室内浴室温度难以控制恒温的问题。The fluid mixing control system based on the double-closed-loop PID algorithm of the present invention proposes a double-closed-loop PID algorithm, which can solve the problem that it is difficult to control the temperature of the indoor bathroom due to poor timeliness of algorithm feedback.
除了上面所描述的目的、特征和优点之外,本发明还有其它的目的、特征和优点。下面将参照图,对本发明作进一步详细的说明。In addition to the objects, features and advantages described above, the present invention has other objects, features and advantages. Hereinafter, the present invention will be described in further detail with reference to the drawings.
附图说明Description of drawings
构成本申请的一部分的附图用来提供对本发明的进一步理解,本发明的示意性实施例及其说明用于解释本发明,并不构成对本发明的不当限定。The accompanying drawings constituting a part of this application are used to provide further understanding of the present invention, and the schematic embodiments and descriptions of the present invention are used to explain the present invention, and do not constitute an improper limitation of the present invention.
图1是本发明的一种基于双闭环PID算法的流体混合控制系统结构框图;Fig. 1 is a kind of fluid mixing control system block diagram based on double closed-loop PID algorithm of the present invention;
图2是本发明的一种基于双闭环PID算法的流体混合控制系统的PID控制流程图。Fig. 2 is a PID control flow chart of a fluid mixing control system based on a double-closed-loop PID algorithm of the present invention.
图3是本发明的一种基于双闭环PID算法的流体混合控制系统的管理控制模块原理图;Fig. 3 is a kind of management control module schematic diagram of the fluid mixing control system based on double closed-loop PID algorithm of the present invention;
图4是本发明的一种基于双闭环PID算法的流体混合控制系统的输出反馈模块原理图;Fig. 4 is a kind of output feedback module schematic diagram of the fluid mixing control system based on double closed-loop PID algorithm of the present invention;
图5是本发明的一种基于双闭环PID算法的流体混合控制系统的输出驱动模块原理图;Fig. 5 is a schematic diagram of an output drive module of a fluid mixing control system based on a double-closed-loop PID algorithm of the present invention;
图6是本发明的一种基于双闭环PID算法的流体混合控制系统的电源管理模块原理图;Fig. 6 is a schematic diagram of a power management module of a fluid mixing control system based on a double closed-loop PID algorithm of the present invention;
图7是本发明的一种基于双闭环PID算法的流体混合控制系统的微控制器模块原理图。Fig. 7 is a schematic diagram of a micro-controller module of a fluid mixing control system based on a double closed-loop PID algorithm of the present invention.
具体实施方式detailed description
为了使本发明的目的、技术方案及优点更加清楚明白,以下结合附图及实施例,对本发明进行进一步详细说明。应当理解,此处所描述的具体实施例仅仅用以解释本发明,并不用于限定本发明。In order to make the object, technical solution and advantages of the present invention clearer, the present invention will be further described in detail below in conjunction with the accompanying drawings and embodiments. It should be understood that the specific embodiments described here are only used to explain the present invention, not to limit the present invention.
参考图1,如图1所示的一种基于双闭环PID算法的流体混合控制系统,包括微控制器模块、电源管理模块、管理控制模块、输出驱动模块、输出反馈模块;所述微控制器模块分别连接电源管理模块、管理控制模块、输出驱动模块、输出反馈模块;With reference to Fig. 1, a kind of fluid mixing control system based on double closed-loop PID algorithm as shown in Fig. 1, comprises microcontroller module, power management module, management control module, output driver module, output feedback module; Described microcontroller The modules are respectively connected to the power management module, the management control module, the output driver module, and the output feedback module;
参考图6,如图6所示,电源管理模块:主要为控制电路和驱动电路提供不同规格的电源,其中控制模块采用3.3V的高稳定度电源,驱动模块提供12V大功率电源。Referring to Figure 6, as shown in Figure 6, the power management module: mainly provides power supplies of different specifications for the control circuit and the drive circuit, wherein the control module uses a 3.3V high-stable power supply, and the drive module provides a 12V high-power power supply.
电源管理模块提供外部供电接口,控制电压支持3.3V到15V,驱动电压为12V-36V;控制电路采用宽电压模式,内部自带稳压电路,消除电路波动对控制电路的影响;驱动电路应接保护电阻;稳压芯片选用AMS1117-3.3,输入端应加防止回流的二极管。The power management module provides an external power supply interface, the control voltage supports 3.3V to 15V, and the driving voltage is 12V-36V; the control circuit adopts a wide voltage mode, and the internal voltage stabilization circuit eliminates the influence of circuit fluctuations on the control circuit; the drive circuit should be connected to Protection resistor; AMS1117-3.3 is selected as the voltage regulator chip, and a diode to prevent backflow should be added at the input end.
参考图3,如图3所示,管理控制模块:主要用于整个控制模块的具体操作,如PID系数设置,驱动模块的启动/停止操作,控制数据上传等。Referring to Figure 3, as shown in Figure 3, the management control module: mainly used for specific operations of the entire control module, such as PID coefficient setting, start/stop operation of the drive module, control data upload, etc.
包括最小系统工作模式选择模块、额外扩展接口、管理控制模块的数据接口。其中的SWDIO、SWCLK、NRST、BOOT0、USART1_RX、USART1_TX端口为程序下载端口。It includes a minimum system working mode selection module, an extra expansion interface, and a data interface of the management control module. The SWDIO, SWCLK, NRST, BOOT0, USART1_RX, and USART1_TX ports are program download ports.
参考图7,如图7所示,微控制器模块:整合系统的核心,主要用于封装整个PID算法控制整个驱动处理,传感器信号处理等功能。Referring to Figure 7, as shown in Figure 7, microcontroller module: the core of the integrated system, mainly used to encapsulate the entire PID algorithm to control the entire drive processing, sensor signal processing and other functions.
参考图5,如图5所示,输出驱动模块:主要提供大电流驱动控制模块,主要用于控制电磁阀,直流泵等液体流速装置。Referring to Figure 5, as shown in Figure 5, the output drive module: mainly provides a large current drive control module, mainly used to control liquid flow rate devices such as solenoid valves and DC pumps.
驱动电路和MCU之间用光耦进行隔离,以防止涡流电压对电路造成影响;驱动电路支持最高50V的电压,可提供50W的输出负载;输出端采用2510的接线端子,以便用户直接操作。The drive circuit and the MCU are isolated by optocouplers to prevent eddy current voltage from affecting the circuit; the drive circuit supports a voltage of up to 50V and can provide an output load of 50W; the output terminal uses 2510 terminals for direct operation by the user.
参考图4,如图4所示,输出反馈模块:主要提供3组角动量传感器,3组单总线类型温度传感器接口,并在MCU中集成对应传感器的驱动,如DS18B20,JR-A168等常用传感器驱动,及用户接入可以直接使用。Referring to Figure 4, as shown in Figure 4, the output feedback module: mainly provides 3 sets of angular momentum sensors, 3 sets of single-bus type temperature sensor interfaces, and integrates the corresponding sensor drivers in the MCU, such as DS18B20, JR-A168 and other commonly used sensors Drivers and user access can be used directly.
P4,P5,P6哪位ds18b20温度传感器接口,分别用于检测液体混合前,后的温度;P7,P8,P9分别用于检测于液体混合后的流量;温度传感器采用单总线协议,角动量传感器采用脉冲方式;接口均用2510的接线端子,方便用户使用。P4, P5, P6 which ds18b20 temperature sensor interface is used to detect the temperature before and after liquid mixing; P7, P8, P9 are respectively used to detect the flow rate after liquid mixing; the temperature sensor adopts single bus protocol, angular momentum sensor The pulse mode is adopted; the interface uses 2510 terminal blocks, which is convenient for users to use.
参考图2,如图2所示,所述PID算法包括:With reference to Fig. 2, as shown in Fig. 2, described PID algorithm comprises:
闭环一:Closed loop one:
利用温度传感器测出实际输出水的温度,利用PID算法进行反馈调节,再根据用户的需求的水温计算出水的温度两端的电压值,将利用温度反馈将一定的电压只进行修订,即利用温度反馈修正水两端的电压的有效值;Use the temperature sensor to measure the actual temperature of the output water, use the PID algorithm for feedback adjustment, and then calculate the voltage value at both ends of the water temperature according to the water temperature required by the user, and use the temperature feedback to only revise a certain voltage, that is, use the temperature feedback Correct the effective value of the voltage across the water;
闭环二:Closed loop two:
根据流量传感器测得的数据,计算出通过水泵的流量以及水泵两端的电压,再利用流量传感器测出的实际值进行反馈,即修正输出热水流量的实际值。According to the data measured by the flow sensor, the flow through the water pump and the voltage across the pump are calculated, and then the actual value measured by the flow sensor is used for feedback, that is, the actual value of the output hot water flow is corrected.
所述PID算法具体为:The PID algorithm is specifically:
Q1T1+Q2T2=QTQ 1 T 1 +Q 2 T 2 =QT
由比例混合得:Mixed in proportions to get:
其中Q1为热水的流量,T1为热水温度,Q2为冷水流入流量,T2为冷水温度;Q为流出流量,T为流出温度;Among them, Q1 is the flow rate of hot water, T1 is the temperature of hot water, Q2 is the inflow flow of cold water, T2 is the temperature of cold water; Q is the outflow flow, and T is the outflow temperature;
即:which is:
假设通过水泵两端的电压与通过水泵的流量成正比,即:Assume that the voltage across the pump is proportional to the flow through the pump, ie:
其中K为比例系数;Where K is the proportional coefficient;
则有即:令M为定值;then there is which is: make M is a fixed value;
则有U(T1,T2,T)=MK(T1,T2,T),其中所以 Then there is U(T 1 ,T 2 ,T)=MK(T 1 ,T 2 ,T), where so
已知实际测出温度为T(t),根据PID原理得到的反馈量为:e(t)=Tr(t)-T(t)It is known that the actual measured temperature is T (t) , and the feedback value obtained according to the PID principle is: e(t)=T r (t)-T(t)
将上式的模糊化控制数字化处理之后可得:After digitizing the fuzzy control of the above formula, we can get:
ΔT(k)=kpt[e(k)-e(k-1)]+kite(k)+kdt[e(k)-2e(k-1)+e(k-2)]ΔT(k)=k pt [e(k)-e(k-1)]+k it e(k)+k dt [e(k)-2e(k-1)+e(k-2)]
式中:kit=kpt/Tpt;kdt=kpt/Tdt其中,T为采样周期,k为序列号In the formula: k it =k pt /T pt ; k dt =k pt /T dt Among them, T is the sampling period, k is the serial number
则输出修订后的理论温度值为:The revised theoretical temperature value is then output as:
推出理论温度值所计算出的理论电压值为:The theoretical voltage value calculated by deriving the theoretical temperature value is:
根据相同的原理,所得到实际控制输出的流量为:According to the same principle, the obtained flow rate of the actual control output is:
实际输出的流量为Q1(k)且得实际的电压值Ur为: The actual output flow is Q 1 (k) and The actual voltage value U r is obtained as:
经推导实际输出的控制电压为:The deduced actual output control voltage is:
流体流量检测模型分析:Fluid flow detection model analysis:
在该系统中,使用的流量传感器是霍尔传感器的JR-A168流量传感器,其参数是:In this system, the flow sensor used is the JR-A168 flow sensor of Hall sensor, and its parameters are:
工作电压:DC=12V;工作电流:I=300mA;其检测信号输出的是脉冲电压,其高电平>=4.5V,低电平<=0.5V;占空比是50%±10%;脉冲特性是F=(q*Q),(F为输出脉冲频率,Q为流量),流量的测量范围是2-12L/min。Working voltage: DC=12V; working current: I=300mA; the detection signal output is pulse voltage, its high level>=4.5V, low level<=0.5V; the duty cycle is 50%±10%; The pulse characteristic is F=(q*Q), (F is the output pulse frequency, Q is the flow rate), and the measurement range of the flow rate is 2-12L/min.
在流量传感器的可测量范围之内,流量传感器的脉冲频率的变化范围为18HZ-108HZ,即每个脉冲周期最短的时间为0.009s-0.0555s,即9ms-55ms。Within the measurable range of the flow sensor, the range of the pulse frequency of the flow sensor is 18HZ-108HZ, that is, the shortest time of each pulse cycle is 0.009s-0.0555s, that is, 9ms-55ms.
本控制系统主要基于STM32F103单片机为核心控制单元,并根据角动量传感器(主要用于测试流体的流量),温度传感器(测量混合前后流体的温度)数据接口搭建控制电路设计控制电路模块,利用C语言搭建并实现算法模型,将整个算法封装到微控制器中,并以串口的形式向外部提供算法调节参数,已达到最小实现的目的。This control system is mainly based on the STM32F103 single-chip microcomputer as the core control unit, and according to the data interface of the angular momentum sensor (mainly used to test the flow of the fluid) and the temperature sensor (to measure the temperature of the fluid before and after mixing) to build a control circuit design control circuit module, using C language Build and implement the algorithm model, encapsulate the entire algorithm into a microcontroller, and provide algorithm adjustment parameters to the outside in the form of a serial port, which has achieved the goal of minimum realization.
本发明的基于双闭环PID算法的流体混合控制系统提出基于双闭环的PID算法,可解决因算法反馈的时效性较差,造成室内浴室温度难以控制恒温的问题。The fluid mixing control system based on the double-closed-loop PID algorithm of the present invention proposes a double-closed-loop PID algorithm, which can solve the problem that it is difficult to control the temperature of the indoor bathroom due to poor timeliness of algorithm feedback.
本发明流体流出温度反馈时间延迟小(时滞小)。The present invention has a small feedback time delay (small time lag) of the fluid outflow temperature.
输出流体的温度波动范围小。在流体输出前已经完成对冷热两种流体的温度进行实时测量,并按照理论计算的流量输出,本设计并在流量流入端添加流量的PID闭环反馈系统,实时输出流体的问题已经非常接近预设温度。The temperature fluctuation range of the output fluid is small. Real-time measurement of the temperature of the hot and cold fluids has been completed before the fluid output, and the flow output according to the theoretical calculation, this design and the PID closed-loop feedback system of the flow rate is added at the flow inflow end, the problem of real-time output of the fluid is very close to the expected Set temperature.
预设温度改变时相应速度快。当检测到预设温度变化时,系统可实时调节冷热流体的混合比例,其相应速度远高于传统的相应速度。The response speed is fast when the preset temperature is changed. When a preset temperature change is detected, the system can adjust the mixing ratio of hot and cold fluids in real time, and the corresponding speed is much higher than the traditional corresponding speed.
同时可实现流体流量和温度双重控制输出的目的。系统可根据预设的输出流量和温度,在保证流入流体流量比例不变的情况下调节流体流量的大小(所有的流体混合仓大体积时一定的),可有效达到控制输出的流体的大小。At the same time, the purpose of dual control output of fluid flow and temperature can be realized. According to the preset output flow and temperature, the system can adjust the size of the fluid flow (all fluid mixing chambers have a certain volume when the volume is large) while ensuring that the flow ratio of the inflow fluid remains unchanged, which can effectively control the size of the output fluid.
本发明的基于双闭环PID算法的流体混合控制系统提出基于双闭环的PID算法,可解决因算法反馈的时效性较差,造成室内浴室温度难以控制恒温的问题。The fluid mixing control system based on the double-closed-loop PID algorithm of the present invention proposes a double-closed-loop PID algorithm, which can solve the problem that it is difficult to control the temperature of the indoor bathroom due to poor timeliness of algorithm feedback.
以上所述仅为本发明的较佳实施例,并不用以限制本发明,凡在本发明的精神和原则之内,所作的任何修改、等同替换、改进等,均应包含在本发明的保护范围之内。The above descriptions are only preferred embodiments of the present invention, and are not intended to limit the present invention. Any modifications, equivalent replacements, improvements, etc. made within the spirit and principles of the present invention shall be included in the protection of the present invention. within range.
Claims (2)
Priority Applications (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN201710820194.3A CN107479364B (en) | 2017-09-13 | 2017-09-13 | A 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 | A 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 | A Fluid Mixing Control System Based on Double Closed-loop PID Algorithm |
Country Status (1)
Country | Link |
---|---|
CN (1) | CN107479364B (en) |
Citations (5)
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 |
-
2017
- 2017-09-13 CN CN201710820194.3A patent/CN107479364B/en active Active
Patent Citations (5)
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 |
---|---|---|
CN102679497B (en) | Improved self-calibration variable parameter fan coil temperature control method and special device | |
CN204708632U (en) | A kind of multifunction energy-saving water dispenser | |
CN204026839U (en) | A kind of indoor heat supply and temperature control system | |
CN104359193A (en) | Fan coil temperature controller adopting multiple energy saving models | |
CN109634319A (en) | Electric furnace intelligent temperature control system design method based on PID control | |
CN104534675A (en) | Water-saving water heater with intelligent shower head | |
CN103324163A (en) | Visible controllable wireless intelligent monitor | |
CN101907896B (en) | Multifunctional intelligent combined flow measuring and controlling instrument | |
CN105650304A (en) | Hybrid regulating constant temperature water valve installed outside storage electric water heater | |
CN102563197B (en) | Constant-temperature automatic control method and device for central heating flow valve | |
CN206708501U (en) | A kind of valve controling circuit of heating system and the control system using the circuit | |
CN107479364A (en) | A kind of fluid hybrid control system based on double closed-loop PID algorithm | |
CN104697198A (en) | Thermostatic water mixing control method for solar water heater | |
CN206330290U (en) | Heat pump water-heating machine water circuit system | |
CN105299929A (en) | Intelligent household solar energy water heater regulation and control system | |
CN201194024Y (en) | A battery power detection device | |
CN201986233U (en) | Phase-controlled constant-current and high-power LED (light-emitting diode) driving circuit | |
CN115468312A (en) | Thermostatic control device and instant water heater | |
CN104132468A (en) | Heating control device of domestic water heater | |
CN108762468A (en) | Low-power-consumptiocontrol control method and device | |
CN106200721A (en) | The adaptive temperature controller of feature based model | |
CN204239214U (en) | Micro-measurement pump flow control system | |
CN210222120U (en) | An Equal Precision Broadband Frequency Meter Based on STM32 | |
CN105737379A (en) | Control method of solar heat pump composite hot water system | |
CN201697238U (en) | Heat metering and energy saving device |
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 |