Intelligent control system and control method for valve

By introducing a dual-mode redundant intelligent control system into the heating/water supply system of a smart community, and using a cloud platform and LoRa communication to elect the master module, the problem of valve malfunction caused by a single mobile communication interruption was solved, thus achieving reliable valve regulation and stable power supply.

CN122239558APending Publication Date: 2026-06-19YANTAI DONGFANG INTELLIGENT TECH CO LTD
View PDF 0 Cites 0 Cited by

Patent Information

Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
YANTAI DONGFANG INTELLIGENT TECH CO LTD
Filing Date
2026-04-02
Publication Date
2026-06-19

AI Technical Summary

Technical Problem

In existing smart community and smart heating/water supply systems, valve control modules rely heavily on a single mobile communication method. This results in the inability to obtain real-time target values ​​when communication is interrupted, leading to valve malfunction or reduced regulation accuracy, and posing safety hazards.

Method used

The intelligent control system adopts dual-mode redundancy, which synchronously distributes the full target value table to the cloud platform, elects the master module in the IoT local area network, and uses LoRa communication to transmit the target value in the event of a communication failure. Combined with timestamp strategy and safety control logic, it ensures the reliability and accuracy of valve regulation.

Benefits of technology

Even with mobile communication interruptions, the system ensures continuous and reliable valve control, prevents valve malfunction, improves power supply stability and safety, and guarantees the system's adaptability and robustness in complex communication environments.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN122239558A_ABST
    Figure CN122239558A_ABST
Patent Text Reader

Abstract

This invention discloses an intelligent valve control system and method, relating to the field of control technology. The system includes a cloud platform and control modules for each building unit. The cloud platform synchronously distributes a full cloud-based target value table containing the identifiers, target values, and communication status of each module to all modules. Each control module includes a core control unit, a communication unit, and a valve drive unit. The communication unit functions as both a mobile communication module and an IoT communication module. When an offline module is detected in the cloud table, each online module elects a master module through an election module. The master module then broadcasts its latest cloud table to other modules via the IoT local area network. This control method operates based on this control system. This invention can reliably transmit target values ​​via the IoT local area network even in the event of a mobile communication failure, and incorporates multiple security protection logics, effectively improving the stability and safety of the heating system.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This invention relates to the field of control technology, specifically to an intelligent valve control system and control method. Background Technology

[0002] In the construction of smart communities and smart heating / water supply systems, valve control modules are typically deployed between the thermal dispatch cloud platform and each building unit to achieve refined regulation of fluid flow at the building unit level. For example... Figure 2 As shown, the control modules of each building unit receive control target values ​​(such as target temperature or target flow) from the thermal scheduling cloud platform in real time through the cellular network, and then automatically adjust the opening of the unit valve according to the target value to meet the heating and cooling needs of different buildings, aiming to improve the hydraulic balance and energy comfort of the entire community's secondary network system.

[0003] In existing control schemes, the cloud platform sends the corresponding target value to the control module of each building in a point-to-point manner. The control module then performs local closed-loop regulation based on this target value. However, due to its heavy reliance on a single cellular communication method, this approach is not only difficult to manage but also unreliable. When the mobile communication signal is interrupted or malfunctions, the module cannot establish a connection with the cloud platform and therefore cannot obtain the latest target value. In this state, the control module either relies on historical data stored before the power outage for control or is forced to switch to a preset default operating mode. However, neither of these methods can respond to real-time changes in energy demand, leading to uncontrolled building unit valves or decreased regulation accuracy. In severe cases, this can even cause safety hazards such as freezing and overheating, making it difficult to ensure stable heating and coordinated control throughout the entire community. Summary of the Invention

[0004] This invention proposes an intelligent valve control system and control method. Its purpose is to ensure that when mobile communication is interrupted, the control module can obtain the target value in real time and reliably, maintain the precise adjustment capability of the unit valve, thereby eliminating the hidden danger of valve malfunction caused by communication failure, and ensuring the stability of power supply to each building unit and the overall coordinated control effect of the community.

[0005] The technical solution of this invention is as follows:

[0006] A valve intelligent control system includes a cloud platform and control modules corresponding to each building unit. The cloud platform is used for global control, calculating and distributing target values ​​for each unit. The control module includes a core control unit and a communication unit, a data acquisition unit, and a valve drive unit connected to the core control unit. The communication unit includes a mobile communication module connected to the cloud platform. The data acquisition unit is used to collect data from heating instruments. The valve drive unit is used to control the unit valves.

[0007] The cloud platform synchronously distributes the full target value table to all control modules in the community via mobile communication. The full target value table includes data records that correspond one-to-one with each control module. Each data record includes at least the unique identifier of the control module, the target value, and the mobile communication status.

[0008] The core control unit includes an election module. When there is a control module whose mobile communication status is "offline" in the full target value table obtained from the cloud platform, the election module participates in the election of the main module of the Internet of Things local area network according to preset rules.

[0009] The communication unit also includes an IoT communication module, and all IoT communication modules in the community form the IoT local area network;

[0010] The master module elected in the IoT local area network broadcasts the latest cloud full target value table obtained by this control module to other control modules. The other control modules receive it and save it as the full target value table of the IoT terminal.

[0011] When the valve drive unit controls the unit valve, it extracts the target value corresponding to this control module from the full target value table as the control target.

[0012] As a further improvement to the valve intelligent control system, the control module also includes a target value management unit for storing the full target value table in the cloud and the full target value table in the Internet of Things, as well as the update time of both.

[0013] When the valve drive unit acquires the target value, it compares the update time of the full target value table in the cloud and the full target value table on the IoT terminal, and extracts the target value corresponding to this control module from the newer full target value table.

[0014] As a further improvement to the valve intelligent control system: when the valve drive unit acquires the target value, if the time interval between the update time of the selected full target value table and the current time is greater than the expiration time threshold, the opening value of the unit valve is fixed to the preset opening value.

[0015] As a further improvement to the aforementioned intelligent valve control system, the election module includes:

[0016] The sequence generation unit is used to read the full target value table obtained from the cloud, filter out the control modules whose mobile communication status is "online", and generate a candidate sequence with a sequential order according to preset rules.

[0017] The timing decision unit is used to determine a decision waiting period based on the position of this control module in the election sequence, and to listen for the main module announcement message in the IoT local area network during the decision waiting period;

[0018] The main module declaration unit is used to trigger this control module to broadcast the cloud full target value table obtained this time through the Internet of Things communication module when the timed decision unit does not detect the main module declaration message during the decision waiting period, so as to declare this control module as the main module.

[0019] As a further improvement to the intelligent valve control system, the communication unit also includes a communication status detection module for detecting the mobile communication network connection status. When the mobile communication network connection status of this control module is determined to be "interrupted", the valve drive unit limits the opening range of the unit valve.

[0020] As a further improvement to the aforementioned intelligent valve control system, the cloud platform includes a status monitoring module, which records whether the mobile communication status of each control module is normal based on the response status of each control module when the full target value table is sent to the cloud. If the mobile communication status of a certain control module is found to be abnormal for M consecutive times, the mobile communication status of that control module is marked as "offline" in the full target value table in the cloud.

[0021] The present invention also provides a valve intelligent control method, which is based on the above-mentioned valve intelligent control system and includes:

[0022] Cloud platform side:

[0023] The full target value table in the cloud is synchronously distributed to all control modules in the community via mobile communication. The full target value table in the cloud includes data records that correspond one-to-one with each unit. Each data record includes at least the unique identifier of the control module, the target value, and the mobile communication status monitored by the cloud platform.

[0024] Control module side:

[0025] The full target value table in the cloud is received by the mobile communication module and parsed by the core control unit. When there is a control module with a "offline" mobile communication status in the parsed full target value table in the cloud, it participates in the election of the main module of the Internet of Things local area network according to preset rules through the election module.

[0026] If this control module is elected as the master module, it will broadcast the full target value table obtained by this control module in the cloud to other control modules in the IoT local area network through the IoT communication module.

[0027] If this control module is not the main module, it receives the full target value table broadcast by the main module in the cloud through the IoT communication module and saves it as the full target value table of the IoT terminal.

[0028] When the valve drive unit controls the unit valve, it extracts the target value corresponding to this control module from the latest full target value table in the cloud and the full target value table on the Internet of Things terminal as the control target.

[0029] As a further improvement to the aforementioned intelligent valve control method, the election module participates in the election of the main module of the Internet of Things local area network according to preset rules, specifically including:

[0030] Step S1: Read the cloud full target value table obtained this time, filter out the control modules whose mobile communication status is "online", and sort them according to the preset serial number in the cloud full target value table to obtain the candidate sequence;

[0031] Step S2: Determine the position i of this control module in the election sequence, i=1,2,3,…, and calculate the decision waiting period of this control module: (i-1)*delta_T, where delta_T is a uniformly preset waiting period;

[0032] Step S3: The control module waits according to its own decision waiting period;

[0033] If the full cloud target value table broadcast by other control modules is not received through the IoT local area network during the adjudication waiting period, this control module is determined to be the main module and will distribute the full cloud target value table obtained this time through the IoT local area network.

[0034] If, during the adjudication waiting period, the IoT local area network receives a cloud-based full target value table broadcast by another control module, it is determined that the IoT local area network has completed the election and exited the election process.

[0035] As a further improvement to the aforementioned intelligent valve control method, a safety control step is also included:

[0036] The valve drive unit has built-in safety regulation logic, and the adjustment step of the unit valve opening does not exceed 2% each time;

[0037] When the communication status detection module of the communication unit determines that the mobile communication network connection status of this control module is "interrupted", the valve drive unit will limit the opening degree of the unit valve to a preset safety range of 20% to 80%.

[0038] When the communication status detection module of the communication unit determines that the mobile communication network connection status of this control module is "normal", the valve drive unit limits the opening of the unit valve to a preset normal range of 10% to 100%.

[0039] When the valve drive unit acquires the target value, if the time interval between the update time of the cloud-based full target value table or the IoT terminal full target value table and the current time exceeds the preset expiration time, the opening degree of the unit valve will be fixed at 50% of the preset safe opening degree.

[0040] As a further improvement to the aforementioned intelligent valve control method: the target value includes the target flow rate and the target temperature;

[0041] The data record in the full target value table also includes the control mode; when the control mode is flow control, the valve drive unit controls the unit valve according to the target flow rate; when the control mode is temperature control, the valve drive unit controls the unit valve according to the target temperature.

[0042] Compared with the prior art, the present invention has the following beneficial effects:

[0043] 1. This invention addresses the problem of existing building valve control systems in residential communities over-reliance on a single mobile communication network and their susceptibility to loss of control after network disconnection. It proposes a dual-mode redundancy intelligent control system and method. During operation, a cloud-based full target value table containing all building target values ​​is synchronously distributed to all control modules via a cloud platform. Upon receiving this table, if any module detects an "offline" communication status, it automatically elects a master module within the IoT local area network using a built-in election module. The successfully elected master module broadcasts its latest cloud-based full target value table to all other modules via the IoT local area network, enabling offline control modules to obtain a complete data table containing their own target values ​​in real time and perform precise valve control accordingly. This mechanism ensures that control target values ​​can still be effectively and indirectly transmitted via the IoT local area network even in mobile communication failure scenarios, guaranteeing the continuity and reliability of valve control and fundamentally solving the valve loss of control and power supply safety hazards caused by a single communication failure.

[0044] 2. The master module election mechanism proposed in this invention is highly rational and efficient. Specifically, the election module parses the full target value table in the cloud and selects only modules whose current communication status is "online" to form an election sequence, setting a staggered decision waiting period based on their position in the sequence. This distributed election method, based on preset rules and without the need for additional central node coordination, effectively avoids network conflicts caused by multiple online modules simultaneously declaring themselves as master modules, ensuring the rapid and unique establishment of the master module in the IoT local area network under disconnection scenarios, thereby guaranteeing that backup communication links can be quickly established and operate stably. Furthermore, the election procedures of each control module are triggered independently. For control modules that are shown as "online" in the full target value table in the cloud but are actually currently "interrupted" (the interruption duration has not yet triggered the "offline" judgment condition), these modules cannot trigger their own election procedures and will not actually participate in the election to become master modules. They can only passively wait for other modules to broadcast the full target value table through the IoT local area network, thus ensuring the correctness of the election results and master-slave relationship.

[0045] 3. This invention introduces a timestamp-based optimization strategy for the use and management of target values. The control module includes a target value management unit that stores a full target value table received directly from the cloud platform and a full target value table from the IoT terminal received from the IoT local area network, along with their update times. When executing control, the valve drive unit compares the update times of the two tables and automatically selects the table with the newer time as the control basis. This design cleverly integrates the advantages of dual-channel data sources, ensuring that even after mobile communication returns to normal, each module always adjusts based on the latest and most accurate target values. This not only improves the timeliness of control but also avoids control deviations that may be caused by data synchronization delays, further enhancing the system's adaptability in complex communication environments.

[0046] 4. This invention also incorporates multi-level safety control logic. On one hand, by setting a "duration" threshold for target values, when the full target value table selected by the module is too outdated, the valve will be forcibly fixed to a preset conservative opening degree to prevent the risk of overcooling or overheating due to a long-term lack of effective instructions. On the other hand, combined with the real-time judgment of the communication status detection module, if the module's own mobile communication is interrupted, the valve drive unit will automatically limit the opening degree to a safer operating range; at the same time, the adjustment step size is also strictly limited to avoid sudden changes in valve opening degree from impacting the pipeline network. The above measures together constitute a comprehensive protection system from the data source to the execution end, improving the robustness and security of the system in the face of abnormal operating conditions such as communication interruption and data expiration. Attached Figure Description

[0047] Figure 1 This is a structural block diagram of the valve intelligent control system in Example 1.

[0048] Figure 2 This is a diagram of the valve control system architecture for the residential community. Detailed Implementation

[0049] The technical solution of the present invention will now be described in detail with reference to the accompanying drawings. Obviously, the described embodiments are only some embodiments of the present invention, and not all embodiments.

[0050] Example 1

[0051] This embodiment provides a valve intelligent control system. For example... Figure 1 As shown, the control system includes a cloud platform and multiple control modules, each corresponding to a building unit within the community. Taking a typical community with 10 buildings as an example, MAX_BUILDING_NUM in the system can be set to 10, corresponding to 10 control modules. These control modules together form the community's valve control network.

[0052] The cloud platform is used for global control, calculating the target value for each building unit based on the total load of the community and the characteristics of the pipeline network, and distributing it uniformly.

[0053] like Figure 1 As shown, each control module includes a core control unit, as well as a communication unit, a data acquisition unit, and a valve drive unit, which are respectively connected to the core control unit.

[0054] The core control unit is the brain of the entire module, coordinating the collaborative work of all units. It can be implemented using an STM32G070CBT6 microcontroller.

[0055] The communication unit includes a mobile communication module and an IoT communication module. In this embodiment, the IoT communication module is a LoRa communication module, but it can also be a long-wave communication module, etc. The mobile communication module is used for remote data interaction with the cloud platform. It can be an Air724UG module, connected to the core control unit via the USART2 serial port (115200bps, 8N1). During initialization, it sends AT commands (AT, AT+CGATT=1, AT+CNACT=1,1) to complete 4G network attachment and PDP context activation. As an alternative, other 5G modules can also be selected. The LoRa communication module is used to build a LoRa network between control modules in the same cell to achieve local communication. Specifically, it can be an E32-433T30D module, connected to the core control unit via the USART3 serial port (9600bps, 8N1). During initialization, it is configured in transparent transmission mode, and its AUX pin (PB12) is used to detect the module status. This module has a communication distance of up to 3000 meters, and can also be replaced by other compatible LoRa modules such as SX1278. The communication unit also includes a communication status detection module, which determines the mobile communication status by detecting the received data of the mobile communication module. The preset disconnection determination time is 60 seconds. If no 4G / 5G communication data is received within 60 seconds, the mobile communication network connection status is determined to be "interrupted" locally.

[0056] The data acquisition unit is used to collect data from the building's heating instruments, typically including temperature sensors and flow meters. To ensure compatibility with instruments using different protocols, the data acquisition unit can include both an RS485 communication module and a Modbus communication module. The RS485 communication module connects to the core control unit via the USART1 serial port (9600bps, 8N1). The PB0 pin serves as the RS485 DE / RE control pin for switching between transmit and receive modes. It interacts with the heat meters via the Modbus protocol, for example, sending a command to read the supply water temperature: 0x01,0x03,0x00,0x00,0x00,0x01,0x84,0x0A, and a command to read the return water temperature: 0x01,0x03,0x00,0x01,0x00,0x01,0xD5,0xCA. The returned data is parsed to obtain the building's supply and return water temperatures. The data is amplified 10 times before transmission, and after parsing, divided by 10 to obtain the actual temperature. The MBus communication module connects to the core control unit via the USART4 serial port. It uses the TSS721 chip as the MBus master, sends MBus read flow command, parses the data returned by the heat meter or water meter, obtains the actual flow data of the fluid in the building, amplifies the data by 1000 times before transmission, and divides it by 1000 after parsing to obtain the actual flow rate.

[0057] The valve drive unit is used to adjust the opening of the unit valve installed at the building entrance. This unit includes a TIM1 timer and a PWM output module, generating a 1kHz PWM signal, which is output through the PA0 pin to adjust the valve opening (0-100%). The valve drive unit has built-in safety adjustment logic, with a maximum adjustment step of 2% to avoid sudden opening changes impacting the pipeline network. Simultaneously, the valve opening range is limited according to different communication states: when the communication status detection module determines that the mobile communication network connection status of this control module is "interrupted," the valve opening is limited to a safe range of 20% to 80% to achieve anti-freezing and overheat protection; when the communication status detection module determines that the mobile communication network connection status is "normal," the valve opening is limited to a normal range of 10% to 100%. The minimum valve opening VALVE_MIN_POS is set to 10, and the maximum opening VALVE_MAX_POS is set to 100. The valve opening is adjusted by calculating the PWM duty cycle ccr_val = pos * PWM_PERIOD / 100.

[0058] The cloud platform synchronously distributes a full target value table to all control modules in the community via mobile communication. This table contains data records corresponding to each control module. Each data record includes at least a unique identifier for the control module (such as a building address), the target value, and the mobile communication status of the module as monitored by the cloud platform. Specifically, a status monitoring module can be set up within the cloud platform. Each time the target value table is distributed, it records the communication status of each control module in real time based on their response to downlink commands. If a control module fails to respond or times out for M consecutive times (e.g., 3 consecutive times), the mobile communication status is marked as "offline" in the corresponding data record for that module; modules that respond normally are marked as "online." Target values ​​can include target flow rate and target temperature. The data record can also include a control mode field. When the control mode is flow control, the valve drive unit adjusts according to the target flow rate; when the control mode is temperature control, the valve drive unit adjusts according to the target temperature.

[0059] Each control module's core control unit integrates an election module. When a control module receives the full target value table from the cloud platform via its mobile communication module, the core control unit parses the table. If it finds a control module with an "offline" mobile communication status, it means that some building units have lost direct communication with the cloud platform. In this case, the LoRa network's redundant communication mechanism needs to be activated. The election module participates in the LoRa network's master module election according to preset rules to determine which control module, still online (i.e., with normal mobile communication), will be responsible for forwarding the target value table to the offline modules.

[0060] As a further specific implementation, the election module includes a sequence generation unit, a timing adjudication unit, and a main module announcement unit. The sequence generation unit reads the full target value table obtained from the cloud, filters out all control modules whose mobile communication status is "online," and generates an election sequence with a specific order according to preset rules (e.g., sorted by module unique identifier from smallest to largest, or sorted by a sequence number preset by the cloud platform). The timing adjudication unit determines an adjudication waiting period based on the position of the control module in the election sequence. The specific calculation formula is: adjudication waiting period = (i-1) * delta_T, where i is the sorting position of the control module in the election sequence (i=1,2,3,…), and delta_T is a uniformly preset waiting period (e.g., it can be set to 2 seconds). The master module declaration unit listens for master module declaration messages (i.e., the cloud-based full target value table broadcast by other modules) in the LoRa network during the adjudication waiting period. If no declaration message is heard during the adjudication waiting period, the control module is triggered to broadcast its newly acquired cloud-based full target value table to the entire network through its LoRa communication module, thereby declaring itself as the master module of the LoRa network. If a declaration message is heard during the adjudication waiting period, it means that another online module has already become the master module, and this module immediately exits the election process and enters the slave module state. This distributed election mechanism does not require an additional central coordinating node, effectively avoiding network conflicts caused by multiple online modules declaring simultaneously, and ensuring the rapid and unique establishment of the master module.

[0061] The selected master control module broadcasts its latest cloud-acquired full target value table to all other control modules via the LoRa network, including modules marked as "offline" on the cloud platform and other online slave modules. The LoRa communication frame format can be designed as: frame header 0xAA + master module address + instruction 0x02 (distribute target value table) + full cell target value table + checksum + frame trailer 0x55, where the checksum is the sum of bytes from the frame header to the target value table. Other control modules receive this broadcast data through their respective LoRa communication modules, verify the frame header, frame trailer, and checksum, and save it locally as the LoRa end's full target value table after successful verification. Based on this mechanism, even if the mobile communication of a control module is completely interrupted, it can still indirectly obtain a complete data table containing its own target values ​​through the LoRa network, thereby maintaining normal valve regulation function.

[0062] To make more efficient use of dual-channel data, each control module also includes a target value management unit. This unit, integrated into the core control unit, stores two sets of target value tables for the entire cell: one in the cloud and the other on the LoRa terminal, recording their respective last update times. The target value management unit handles target value updates, queries, synchronization, and expiration detection. Taking a cell with 10 buildings as an example, the target value table contains 10 single-building target value entries. Each entry includes the building address (MY_BUILDING_ADDR, 0x01-0x0A as unique identifiers), target flow rate, target temperature, control mode (0 for flow control, 1 for temperature control), and last update time. Each control module is configured with a unique building address; for example, the building address for control module 1 is 0x01, for building 2 it's 0x02, and so on. When executing valve control, the valve drive unit first reads these two tables from the target value management unit, compares their update times, and automatically selects the table with the newer time as the control basis. It then extracts the target value corresponding to the unique identifier of its control module, updates the local target parameters, and uses this information for adjustment. Based on this mechanism, once mobile communication returns to normal, each module can immediately switch to the latest cloud data, avoiding data delays or conflicts. During control, each module only extracts the target value corresponding to its own building, without interfering with other buildings.

[0063] Furthermore, to ensure system safety under extreme abnormal conditions, the valve drive unit incorporates multi-layered safety protection logic. On one hand, if the update time of the full target value table (whether cloud-based or LoRa-based) used by the valve drive unit exceeds a preset expiration time threshold (e.g., 2 hours), the table is considered invalid. In this case, the valve drive unit will forcibly fix the valve opening to a preset safe opening value (e.g., 50%) to prevent over-powering or overheating due to a prolonged lack of effective commands. Simultaneously, it records the abnormal information and reports it to the cloud platform after communication is restored. On the other hand, the communication status detection module monitors the mobile communication network connection status of this control module in real time. When a mobile communication interruption is detected (e.g., no 4G / 5G data received for 60 consecutive seconds), the valve drive unit automatically limits the adjustable opening range of the valve to a safe range of 20% to 80% to avoid excessive valve opening and the risk of freezing or overheating in the absence of cloud platform monitoring. Once communication is restored, the opening range returns to the normal range of 10% to 100%. Meanwhile, the adjustment step size is strictly limited to within 2%. Furthermore, if the RS485 or MBus communication module fails to collect valid data (e.g., temperature or flow data is 0 or an abnormal value), the core control unit maintains the valve's current opening without adjustment, and records the abnormal information for later reporting. If the core control unit detects a hardware fault in itself or another unit (e.g., abnormal PWM output or communication module failure), it triggers the Error_Handler function, controlling the valve drive unit to adjust the valve opening to 50%, disabling interrupts to prevent fault propagation, and recording the fault information.

[0064] Figure 2 The architecture of an existing community valve control system is shown, while the system in this embodiment... Figure 2 Building upon this foundation, by introducing a LoRa local network and the aforementioned election, synchronization, and multiple security mechanisms, the valve control failure problem caused by a single mobile communication failure is effectively overcome, significantly improving the system's reliability and robustness. The control module can adjust the value of MAX_BUILDING_NUM according to the actual number of buildings in the community, and can be expanded to 20 buildings or more; the building address of each module can be set through hardware DIP switches or software configuration to ensure uniqueness.

[0065] Example 2

[0066] This embodiment provides a valve intelligent control method, which is based on the valve intelligent control system described in Embodiment 1. The method will be described in detail below with reference to specific implementation steps.

[0067] First, during the system initialization phase, each control module, upon power-up, completes the initialization of the core control unit, communication unit, data acquisition unit, valve drive unit, and target value management unit. Each control module is assigned a unique building address via hardware DIP switches or software configuration (e.g., Building 1 is set to 0x01, Building 2 to 0x02, and so on). The target value management unit initializes the target value table for the entire community, pre-setting default target values ​​and safety parameters, such as a default target flow rate of 1.0 m³ / h, a target temperature of 50.0℃, and a control mode of flow control. The valve drive unit sets the initial valve opening to the minimum anti-freeze opening of 10%. The mobile communication module sends AT commands to complete network attachment and PDP context activation, and the LoRa communication module is set to listening mode, waiting for commands.

[0068] In normal communication mode, when all control modules have normal mobile communication, the system operates according to the following steps:

[0069] Every preset interval (e.g., 1 hour, with the backend setting parameter TARGET_UPDATE_INTERVAL=3600 seconds), the cloud platform synchronously distributes a full cloud-based target value table to all control modules via the mobile communication network. This table contains data records for all buildings within the community, with each record including building address, target traffic volume, target temperature, control mode, and last update time. Each control module receives this table via its mobile communication module, and the target value management unit immediately updates the locally stored cloud-based full target value table and records the last update time.

[0070] Each control module's data acquisition unit periodically collects the building's actual operating data: for example, it sends Modbus commands via RS485 bus to read the supply and return water temperatures, and sends commands via MBus bus to read the actual flow rate, which is then parsed and uploaded to the core control unit.

[0071] The core control unit extracts the corresponding target value and control mode from the latest cloud-based full target value table based on the building address of this module. If the control mode is flow control, it calculates the error between the target flow rate and the actual flow rate. For example, for Building 1, the target flow rate is 2.5 m³ / h, the actual flow rate is 2.4 m³ / h, and the error is 0.1 m³ / h. If it is temperature control, it calculates the error between the target temperature and the supply water temperature. Depending on the sign and magnitude of the error, when the absolute value of the error is less than 0.05, the valve is not adjusted; when the error is greater than 0, the valve opening increases by 2%; when the error is less than 0, the valve opening decreases by 2%. The valve drive unit performs the opening adjustment while ensuring that the opening is within the normal range of 10% to 100%.

[0072] Each control module also periodically (e.g., every 30 seconds) reports the building's operational data to the cloud platform. The reported data is in JSON format: {"dev_id":"UNIT_VALVE_001","flow":%.2f,"temp_supply":%.1f,"temp_return":%.1f,"valve_pos":%d,"mode":"%s"}, where dev_id is the unique identifier of the control module, flow is the actual flow rate, temp_supply is the supply water temperature, temp_return is the return water temperature, valve_pos is the valve opening, and mode is the control mode (flow indicates flow control, temp indicates temperature control).

[0073] When the cloud platform detects abnormal mobile communication status of one or more control modules (e.g., multiple consecutive unresponsive events), it will mark the communication status of these modules as "offline" in the next cloud-based full target value table. Once any control module receives a cloud-based full target value table containing the "offline" mark, it will trigger the "disconnection redundancy mode," initiating the LoRa network master module election and data synchronization process. The specific election steps are as follows:

[0074] Step S1: The election module of each online control module reads the cloud full target value table obtained this time, filters out all control modules whose mobile communication status is "online", and sorts them according to the preset serial number in the cloud full target value table to obtain the election sequence.

[0075] Step S2: Each online module determines its position i in the election sequence and calculates the decision waiting period for this module: (i-1) * delta_T, where delta_T is a uniformly preset waiting period (e.g., 2 seconds).

[0076] Step S3: The control module waits according to its own decision waiting period. If a module does not receive the full cloud target value table broadcast by other control modules through the LoRa network within the waiting period, it determines itself to be the master module and immediately sends the full cloud target value table it obtained this time through the LoRa network; if it receives broadcasts from other modules within the waiting period, it determines that the LoRa network has completed the master module election, and it withdraws from the election process as a slave module and receives the broadcast data from the master module.

[0077] The full target value table broadcast by the main module to the cloud is received by all other control modules in the LoRa network (including those with offline mobile communication) and stored as the LoRa end full target value table in their respective target value management units. Although offline control modules cannot communicate directly with the cloud platform, they obtain the latest target value data through the LoRa network, thus enabling them to continue performing precise valve adjustments. In disconnected redundancy mode, the main module (e.g., Building 3) broadcasts the full target value table of the entire cell every 30 seconds through the LoRa communication module. Each slave module (Buildings 1, 2, 4-10) receives the table and extracts only the target value corresponding to its own building to update its local target parameters.

[0078] In the disconnected redundancy mode, when the valve drive units of all control modules perform control, they compare the update times of the cloud-based full target value table and the LoRa-based full target value table from the target value management unit, automatically selecting the newer table and extracting their corresponding target value as the control basis. Simultaneously, safety control logic is activated: if the communication status detection module of this module determines that its mobile communication has been interrupted, the valve opening is limited to a preset safe range of 20% to 80%; each adjustment step still does not exceed 2%. If the update time of the selected target value table exceeds the expiration time threshold (e.g., 2 hours), the valve is forcibly fixed at a safe opening of 50%.

[0079] It is understandable that even if some control modules are listed as "online" in the full target value table in the cloud, but are actually disconnected, they will not trigger their own election process, nor will they interfere with the normal election of other control modules.

[0080] Once mobile communication is restored for all offline modules, the cloud-based full target value table will no longer contain the "offline" marker. Upon receiving this table, each control module, having no offline modules, will not trigger a new election process, and the previous master module will cease broadcasting. At this point, all modules will control the system based on the latest cloud-based full target value table, and the system will automatically switch from "disconnected redundancy mode" back to "normal mode." Each module will then receive the latest cloud-based full target value table from the cloud platform again via mobile communication. The target value management unit will update its local target value table, overwriting the target values ​​synchronized during the disconnection period. Subsequent control will automatically revert to using cloud data (with a more recent update time), and the valve adjustment logic will automatically revert to the normal communication mode's opening limit of 10% to 100%.

[0081] In addition, this method includes a comprehensive exception handling process:

[0082] (1) Data acquisition anomaly: If the RS485 communication module or MBus communication module fails to acquire valid data (such as temperature or flow data being 0 or abnormal values), the core control unit controls the valve to maintain the current opening degree and does not make any adjustments. At the same time, it records the abnormal information and reports it to the cloud platform after communication is restored.

[0083] (2) Hardware failure: If the core control unit detects a hardware failure of itself or other units (such as abnormal PWM output or communication module failure), it triggers the Error_Handler function, controls the valve drive unit to adjust the valve opening to 50%, disables the interrupt to prevent the fault from spreading, and records the fault information. Normal operation will resume after the fault is eliminated.

[0084] In the above method, the target values ​​can include target flow rate and target temperature, and the data records in the full target value table also include a control mode field. When the control mode is flow control, the valve drive unit adjusts according to the deviation between the target flow rate and the actual flow rate; when the control mode is temperature control, it adjusts according to the deviation between the target temperature and the supply water temperature. This dual-mode design can flexibly adapt to the energy needs of different seasons and different users.

[0085] It should be noted that the specific values ​​listed in this embodiment (such as a waiting period of 2 seconds, an expiration time of 2 hours, a safe opening degree of 50%, an adjustment step size of 2%, an opening degree range of 20% to 80%, and a disconnection determination time of 60 seconds) are all exemplary parameters. In actual applications, they can be adjusted according to the size of the community, the characteristics of the pipeline network, and safety requirements. The core control unit of the control module can use a microcontroller such as STM32G070CBT6, and the communication module can also be replaced with other models according to the site conditions, as long as it can achieve the same function.

[0086] The control method of this invention can be implemented using the STM32CubeIDE compilation environment. The code is developed based on the HAL library and can be directly compiled and downloaded to the control module. Only minor adjustments to the Modbus, MBus, and data parsing logic are needed based on the communication protocols of the actual temperature sensors, heat meters, and valves in the community to adapt to the hardware configurations of different communities, making it easy to implement and promote. Furthermore, for communities with more buildings, simply expanding the number of records in the full target value table and adjusting MAX_BUILDING_NUM to the actual number will maintain the core method of this invention.

[0087] In summary, this invention constructs a valve control system and method with dual-mode redundancy of mobile and local wireless communication by uniformly distributing a full target value table through a cloud platform and combining LoRa communication and a distributed election mechanism between control modules. This system can still ensure reliable transmission of target values ​​even in the event of mobile communication failure, and it also incorporates multiple safety protection logics, effectively improving the stability, security, and intelligence level of the community heating / cooling system.

[0088] It should be noted that, as will be apparent to those skilled in the art, the present invention is not limited to the details of the exemplary embodiments described above, and that the present invention can be implemented in other specific forms without departing from the spirit or essential characteristics thereof. The scope of the present invention is defined by the claims rather than the foregoing description.

Claims

1. A valve intelligent control system, comprising a cloud platform and control modules corresponding to each building unit; the cloud platform is used for global control, calculating and distributing target values ​​for each unit; the control module includes a core control unit and a communication unit, a data acquisition unit, and a valve drive unit respectively connected to the core control unit; the communication unit includes a mobile communication module connected to the cloud platform; the data acquisition unit is used to acquire data from heating instruments; the valve drive unit is used to control the unit valves, characterized in that: The cloud platform synchronously distributes the full target value table to all control modules in the community via mobile communication. The full target value table includes data records that correspond one-to-one with each control module. Each data record includes at least the unique identifier of the control module, the target value, and the mobile communication status. The core control unit includes an election module. When there is a control module whose mobile communication status is "offline" in the full target value table obtained from the cloud platform, the election module participates in the election of the main module of the Internet of Things local area network according to preset rules. The communication unit also includes an IoT communication module, and all IoT communication modules in the community form the IoT local area network; The master module elected in the IoT local area network broadcasts the latest cloud full target value table obtained by this control module to other control modules. After receiving it, the other control modules save it as the full target value table of the IoT terminal. When the valve drive unit controls the unit valve, it extracts the target value corresponding to this control module from the full target value table as the control target.

2. The intelligent valve control system as described in claim 1, characterized in that: The control module also includes a target value management unit for storing the full target value table in the cloud and the full target value table on the IoT terminal, as well as the update time of both. When the valve drive unit acquires the target value, it compares the update time of the full target value table in the cloud and the full target value table on the IoT terminal, and extracts the target value corresponding to this control module from the newer full target value table.

3. The intelligent valve control system as described in claim 2, characterized in that: When the valve drive unit acquires the target value, if the time interval between the update time of the selected full target value table and the current time is greater than the expiration time threshold, the opening value of the unit valve will be fixed to the preset opening value.

4. The intelligent valve control system as described in claim 1, characterized in that: The election module includes: The sequence generation unit is used to read the full target value table obtained from the cloud, filter out the control modules whose mobile communication status is "online", and generate a candidate sequence with a sequential order according to preset rules. The timing decision unit is used to determine a decision waiting period based on the position of this control module in the election sequence, and to listen for the main module announcement message in the IoT local area network during the decision waiting period; The main module declaration unit is used to trigger this control module to broadcast the cloud full target value table obtained this time through the Internet of Things communication module when the timed decision unit does not detect the main module declaration message during the decision waiting period, so as to declare this control module as the main module.

5. The intelligent valve control system as described in claim 1, characterized in that: The communication unit also includes a communication status detection module for detecting the mobile communication network connection status. When the mobile communication network connection status of this control module is determined to be "interrupted", the valve drive unit limits the opening range of the unit valve.

6. The intelligent valve control system as described in claim 1, characterized in that: The cloud platform includes a status monitoring module, which records whether the mobile communication status of each control module is normal based on the response status of each control module when the full target value table is distributed to the cloud. If the mobile communication status of a certain control module is found to be abnormal for M consecutive times, the mobile communication status of that control module is marked as "offline" in the full target value table in the cloud.

7. A valve intelligent control method, characterized in that: This control method is based on the intelligent valve control system as described in claim 1, and includes: Cloud platform side: The full target value table in the cloud is synchronously distributed to all control modules in the community via mobile communication. The full target value table in the cloud includes data records that correspond one-to-one with each unit. Each data record includes at least the unique identifier of the control module, the target value, and the mobile communication status monitored by the cloud platform. Control module side: The full target value table in the cloud is received by the mobile communication module and parsed by the core control unit. When there is a control module with a "offline" mobile communication status in the parsed full target value table in the cloud, it participates in the election of the main module of the Internet of Things local area network according to the preset rules through the election module. If this control module is elected as the master module, it will broadcast the full target value table obtained by this control module in the cloud to other control modules in the IoT local area network through the IoT communication module. If this control module is not the main module, it receives the full target value table broadcast by the main module in the cloud through the IoT communication module and saves it as the full target value table of the IoT terminal. When the valve drive unit controls the unit valve, it extracts the target value corresponding to this control module from the latest full target value table stored in the cloud and the full target value table on the Internet of Things terminal as the control target.

8. The intelligent valve control method as described in claim 7, characterized in that, The election module participates in the election of the IoT local area network main module according to preset rules, specifically including: Step S1: Read the cloud full target value table obtained this time, filter out the control modules whose mobile communication status is "online", and sort them according to the preset serial number in the cloud full target value table to obtain the candidate sequence; Step S2: Determine the position i of this control module in the election sequence, i=1,2,3,…, and calculate the decision waiting period of this control module: (i-1)*delta_T, where delta_T is a uniformly preset waiting period; Step S3: The control module waits according to its own decision waiting period; If the full cloud target value table broadcast by other control modules is not received through the IoT local area network during the adjudication waiting period, this control module is determined to be the main module and will distribute the full cloud target value table obtained this time through the IoT local area network. If, during the adjudication waiting period, the IoT local area network receives a cloud-based full target value table broadcast by another control module, it is determined that the IoT local area network has completed the election and exited the election process.

9. The intelligent valve control method as described in claim 7, characterized in that, It also includes safety control steps: The valve drive unit has built-in safety regulation logic, and the adjustment step of the unit valve opening does not exceed 2% each time; When the communication status detection module of the communication unit determines that the mobile communication network connection status of this control module is "interrupted", the valve drive unit limits the opening of the unit valve to a preset safety range of 20% to 80%. When the communication status detection module of the communication unit determines that the mobile communication network connection status of this control module is "normal", the valve drive unit limits the opening of the unit valve to a preset normal range of 10% to 100%. When the valve drive unit acquires the target value, if the time interval between the update time of the cloud-based full target value table or the IoT terminal full target value table and the current time exceeds the preset expiration time, the opening degree of the unit valve will be fixed at 50% of the preset safe opening degree.

10. The intelligent valve control method as described in claim 7, characterized in that: The target values ​​include the target flow rate and the target temperature; The data record in the full target value table also includes the control mode; when the control mode is flow control, the valve drive unit controls the unit valve according to the target flow rate; when the control mode is temperature control, the valve drive unit controls the unit valve according to the target temperature.