Method, system and storage medium for intelligent optimization and adjustment of water pressure in water supply system
A data-driven method using liquid level and pressure sensors with a segmented PID algorithm optimizes water pressure in camping systems, addressing inefficiencies and costs, and ensuring continuous water supply through adaptive pump control.
Patent Information
- Authority / Receiving Office
- GB · GB
- Patent Type
- Applications
- Current Assignee / Owner
- YUNNAN SOUTHEAST ASIA ECONOMY AND TECHNOLOGY INVESTMENT INDUSTRIAL CO LTD
- Filing Date
- 2024-12-06
- Publication Date
- 2026-05-20
AI Technical Summary
Traditional water supply systems in camping environments suffer from low efficiency, high costs, and lack of real-time monitoring, exacerbated by seasonal fluctuations in water resources, leading to instability.
Implementing a method that uses a liquid level transmitter and pressure sensor to acquire data, compares it with adaptive thresholds, and employs a segmented PID algorithm to control deep-well and booster pumps for intelligent optimization and adjustment of water pressure, ensuring stability and continuity through automatic control.
The system achieves efficient, unattended management of water supply systems by optimizing water pressure, overcoming inefficiencies and high costs, and ensuring continuous water supply through adaptive threshold-based pump control.
Smart Images

Figure 00000000_0000_ABST
Abstract
Description
[0001] The present invention belongs to the technical field of intelligent control for water supply systems, and particularly relates to a method, system and storage medium for intelligent optimization and adjustment of water pressure in a water supply system. BACKGROUND
[0002] In certain camping scenarios, it is required to provide campers with supporting services such as accommodation, water supply and power supply, to facilitate their long-term activities in camping environments.
[0003] Camp sites close to urban areas and other areas with better living conditions generally have direct access to urban tap water, while camp sites far from urban areas or in harsher environments need to install independent water supply systems accordingly.
[0004] Traditional water supply systems rely on manual inspection and maintenance, having the defects such as low efficiency, high costs, failure of real-time monitoring and the like. Seasonal fluctuations in water resources further exacerbate instability of water supply systems in camp environments. SUMMARY
[0005] An objective of the examples of the present invention is to provide a method, system and storage medium for intelligent optimization and adjustment of water pressure in a water supply system, so as to overcome the defects of traditional water supply systems including low efficiency, high costs, failure of real-time monitoring and the like.
[0006] In order to achieve the above objective, the present invention provides the following technical solution.
[0007] In an example of the present invention, a method for intelligent optimization and adjustment of water pressure in a water supply system is provided, including the following steps:
[0008] using a liquid level transmitter to acquire liquid level data of a water tank in a water supply system;
[0009] using a pressure sensor to acquire water pressure data from the water supply system; and
[0010] comparing the liquid level data and the water pressure data with corresponding adaptive thresholds respectively, and using a segmented PID algorithm to control start and stop of deep-well pumps and a booster pump, to complete the optimization and adjustment of water pressure in the water supply system, where the deep-well pumps are configured for replenishing water into the water tank, and the booster pump is configured for increasing the water pressure in the water supply system.
[0011] Further, the using a liquid level transmitter to acquire liquid level data of a water tank in a water supply system includes:
[0012] converting a liquid level value measured through a liquid level sensor of the liquid level transmitter into an electrical signal, where the electrical signal is an analog signal with a signal range of 4-20 mA, 4 mA corresponds to a 0% liquid level, and 20 mA corresponds to a 100% liquid level;
[0013] transmitting an analog signal from the liquid level sensor to a PLC controller of the water supply system via a cable;
[0014] receiving the analog signal from the liquid level sensor through an analog input module of the PLC controller;
[0015] acquiring a signal through the analog input module according to the preset signal range of 4-20 mA, converting the received analog signal into a digital signal through an analog-to-digital converter integrated in the analog input module, and specifically converting the 4-20 mA analog signal into a corresponding digital signal through the analog-to-digital converter; and
[0016] storing the converted digital signal in a register of the PLC controller and processing the digital signal to obtain the liquid level data.
[0017] Further, the processing the digital signal to obtain the liquid level data includes:
[0018] convert the digital signal into an actual liquid level value through the PLC controller according to a preset proportional relationship; and
[0019] filtering and calibrating the liquid level value through the PLC controller to obtain the liquid level data;
[0020] during the filtering, smoothing a liquid level signal through a low-pass filtering algorithm; and
[0021] during the calibrating, converting the digital signal into a corresponding physical signal according to a calibration curve of the sensor.
[0022] Further, in the step of smoothing a liquid level signal through a low-pass filtering algorithm, the digital signal is processed through moving average filtering, which is expressed as follows: 1 Filtered value (k) = original value (k ~l)
[0023]
[0024] in the formula, n represents an order of the filter, and k represents a kth sampling point; and
[0025] in the step of converting the digital signal into a corresponding physical signal according to a calibration curve of the sensor, a calibration formula is expressed as follows: , ,,, .,, , Digital value X Liquid level ranee Actual hqutd level = — ----■--------—;:~
[0026] Maximum value of ADC
[0027] in the formula, a 0-20 mA signal corresponds to a liquid level of 0-10 m, and a maximum value of ADC is 4095.
[0028] Further, the adaptive thresholds are determined through the following method:
[0029] constructing an adaptive threshold function, where the adaptive threshold function includes a sliding window, and the sliding window contains last five thresholds;
[0030] whenever the water supply system triggers an alarm, adding a threshold at the time of the alarm to the sliding window to update the five thresholds in the sliding window; and
[0031] according to data in the sliding window, generating a dynamic threshold J based on a confidence interval, where the dynamic threshold J is expressed as follows:
[0032] J ™ h i 1-96 CT
[0033] in the formula, 51 represents a mean of the thresholds in the sliding window; and ^.represents a variance of the thresholds in the sliding window.
[0034] Further, the using a segmented PID algorithm to control start and stop of the deep-well pumps and the booster pump includes: [003 5] acquiring a current liquid level threshold and a water pressure threshold; [003 6] acquiring a real-time liquid level of the water tank by the liquid level transmitter through the liquid level sensor; detecting a real-time water pressure of the water supply system through the pressure sensor; and [003 7] using the segmented PID algorithm to adjust and control pumping power of the deep-well pumps by means of a control circuit module of the PLC controller according to the liquid level threshold and a liquid level difference, and using the segmented PID algorithm to adjust and control water delivery power of the booster pump by means of the control circuit module of the PLC controller according to the water pressure threshold and a water pressure difference.
[0038] Further, the using the segmented PID algorithm to adjust and control pumping power of the deep-well pumps includes: initializing a P parameter, an I parameter, and a D parameter acting on the PID controller of the deep-well pumps in the control circuit module of the PLC controller; performing PD control when a first error between the liquid level threshold and the real-time liquid level is greater than a first set value; and performing PID control when the first error is less than the first set value;
[0039] the using the segmented PID algorithm to adjust and control water delivery power of the booster pump includes: initializing the P parameter, the I parameter, and the D parameter acting on the PID controller of the booster pump in the control circuit module of the PLC controller; performing PD control when a second error between the water pressure threshold and the real-time water pressure is greater than a second set value; and performing PID control when the second error is less than the second set value;
[0040] the segmented PID algorithm is expressed as follows: ( k A uk ~ | e(fc) + e(0 + [e( / c) - e(k - 1)] I
[0041] V '"° 7
[0042] where when ” 0; and when £, = 1;
[0043] in the formula, k represents a sampling No., and represents an output of kth sampling; e(K) represents a set value input at a moment of the kth sampling;e(k-l) represents a set value input at a moment of k-1th sampling; T represents a sampling period; represents an amplification coefficient of the controller; I represents an integral constant of the controller; and $ D represents a differential time constant of the controller.
[0044] In another example of the present invention, a system for intelligent optimization and adjustment of water pressure in a water supply system is provided, including the following modules:
[0045] a liquid level acquisition module, configured for using a liquid level transmitter to acquire liquid level data of a water tank in a water supply system;
[0046] a water pressure acquisition module, configured for using a pressure sensor to acquire water pressure data from the water supply system; and
[0047] an optimization and adjustment module, configured for comparing the liquid level data and the water pressure data with corresponding adaptive thresholds respectively, and using a segmented PID algorithm to control start and stop of the deepwell pumps and the booster pump, to complete the optimization and adjustment of water pressure in the water supply system, where the deep-well pumps are configured for replenishing water into the water tank, and the booster pump is configured for increasing the water pressure in the water supply system.
[0048] Based on the above examples, in another example of the present invention, a storage medium is provided, and the storage medium includes a stored computer program, where when the computer program is executed, the device where the storage medium is located is controlled to implement the method for intelligent optimization and adjustment of water pressure in a water supply system according to the above examples of the present invention.
[0049] Compared with the prior art, the present invention has the following beneficial effects:
[0050] First, the present invention, by comparing the liquid level data and the water pressure data with corresponding adaptive thresholds respectively, and using a segmented PID algorithm to control start and stop of the deep-well pumps and the booster pump, is capable of completing the optimization and adjustment of water pressure in the water supply system, and ensuring stability and continuity of the water supply system; and
[0051] secondly, through automatic control technology, the present invention overcomes the defects of traditional water supply systems including low operational efficiency, high management costs, failure of real-time monitoring and the like, and achieves unattended and efficient management of the water supply system; and in response to water demand of camps, the present invention, by rationally configuring the deep-well pumps, the booster pump and water supply pumps, ensures the stability and continuity of the water supply system, and has broad application prospects. BRIEF DESCRIPTION OF DRAWINGS
[0052] FIG. 1 is a flowchart illustrating implementation of a method for intelligent optimization and adjustment of water pressure in a water supply system provided in an example of the present invention;
[0053] FIG. 2 is a sub-flowchart of a method for intelligent optimization and adjustment of water pressure in a water supply system provided in Example 1 of the present invention;
[0054] FIG. 3 is another sub-flowchart of a method for intelligent optimization and adjustment of water pressure in a water supply system provided in Example 1 of the present invention;
[0055] FIG. 4 is a structural block diagram of a system for intelligent optimization and adjustment of water pressure in a water supply system provided in Example 2 of the present invention; and
[0056] FIG. 5 is a structural block diagram of a terminal device provided in Example 3 of the present invention. DETAILED DESCRIPTION OF THE EMBODIMENTS
[0057] To make objectives, technical solutions and advantages of the present invention clearer, the present invention will be further described in detail with reference to accompanying drawings and in conjunction with embodiments. It should be understood that specific embodiments described herein are merely used to explain the present invention, and are not used to limit the present invention. The specific implementation of the present invention is described in detail below in conjunction with the particular embodiments. [005 8] Example 1
[0059] With reference to FIG. 1, in an example of the present invention, a method for intelligent optimization and adjustment of water pressure in a water supply system is provided, including the following steps:
[0060] SI 1, use a liquid level transmitter to acquire liquid level data of a water tank in a water supply system.
[0061] In SI of an example of the present invention, the liquid level transmitter is mounted in the water tank, the water tank includes a raw water tank and a purified water tank, and when water from the raw water tank is sent into the purified water tank, water is filtered through a filtering device connected between the raw water tank and the purified water tank; the purified water tank and the raw water tank in an example of the present invention are connected through a communicating vessel structure to ensure their water levels are consistent; the liquid level transmitter can be mounted in either the purified water tank or the raw water tank, and the liquid level transmitter is provided with a built-in liquid level sensor for detecting a liquid level in the water tank;
[0062] Specifically, with reference to FIG. 2, in an example of the present invention, a specific implementation process of acquiring the liquid level data of the water tank in the water supply system by using the liquid level transmitter is disclosed, including:
[0063] S21, convert a liquid level value measured through the liquid level sensor of the liquid level transmitter into an electrical signal, where the electrical signal is an analog signal with a signal range of 4-20 mA, 4 mA corresponds to a 0% liquid level, and 20 mA corresponds to a 100% liquid level;
[0064] S22, transmit an analog signal from the liquid level sensor to a PLC controller of the water supply system via a cable;
[0065] S23, receive the analog signal from the liquid level sensor through an analog input module of the PLC controller;
[0066] S24, acquire a signal through the analog input module according to the preset signal range of 4-20 mA, convert the received analog signal into a digital signal through an analog-to-digital converter integrated in the analog input module, and specifically convert the 4-20 mA analog signal into a corresponding digital signal through the analog-to-digital converter; and
[0067] S25, store the converted digital signal in a register of the PLC controller and process the digital signal to obtain the liquid level data.
[0068] In an example of the present invention, the processing the digital signal to obtain the liquid level data includes:
[0069] convert the digital signal into an actual liquid level value through the PLC controller according to a preset proportional relationship; and
[0070] filter and calibrate the liquid level value through the PLC controller to obtain the liquid level data; during the filtering, smooth a liquid level signal through a low-pass filtering algorithm; and during the calibrating, convert the digital signal into a corresponding physical signal according to a calibration curve of the sensor.
[0071] Further, in the step of smoothing smooth a liquid level signal through a low-pass filtering algorithm, the digital signal is processed through moving average filtering, which is expressed as follows: Filtered value (k) — - >original vdu e (k ~ I)
[0072] nXuk-o
[0073] in the formula, n represents an order of the filter, and k represents a kth sampling point; and
[0074] further, in a filtering process according to an example of the present invention, a first-order low-pass filter can also be adopted, with an expression as follows:
[0075] f iltered value (k) ::::a X original value (k) + (l-a) X Filtered value (k-1)
[0076] in the formula, a represents a filtering coefficient with a value ranging from 0 to 1.
[0077] Further, in the step of converting the digital signal into a corresponding physical signal according to a calibration curve of the sensor according to an example of the present invention, a calibration formula is expressed as follows: . ,,.. . Digital value X Liquid level ranee Actual liquid level = —=™ [QQ78j Maximum value of ADC
[0079] in the formula, a 0-20 mA signal corresponds to a liquid level of 0-10 m, and a maximum value of ADC is 4095.
[0080] Further, in an example of the present invention, a plurality of deep-well pumps are arranged, the deep-well pumps are activated sequentially based on preset water levels, and faulty pumps are automatically bypassed to avoid power surges and ensure stability of the water supply system. When a booster pump starts working, the deepwell pumps are automatically activated in conjunction to prevent a low water level from affecting water supply.
[0081] With reference to FIG. 1, in an example of the present invention, the method for intelligent optimization and adjustment of water pressure in a water supply system further includes the following steps:
[0082] S12, use a pressure sensor to acquire water pressure data from the water supply system.
[0083] S13, compare the liquid level data and the water pressure data with corresponding adaptive thresholds respectively, and use a segmented PID algorithm to control start and stop of the deep-well pumps and the booster pump, to complete the optimization and adjustment of water pressure in the water supply system, where the deep-well pumps are configured for replenishing water into the water tank, and the booster pump is configured for increasing the water pressure in the water supply system.
[0084] It should be noted that all the pumps in an example of the present invention have a dry-run protection function, that is, when a pump fails or the water supply is abnormal, the system will automatically switch to a standby pump, detect any water leakage, delay pump shutdown, and sound an alarm.
[0085] Moreover, a real-time status of the water supply system in an example of the present invention is uploaded to a cloud server through an edge gateway, which helps staff to grasp an operating status of the water supply system in real time, where the edge gateway and the cloud server is connected via the Internet, and a wired (Ethernet) or wireless (Wi-Fi / 4G / 5G) network is used to upload data to the cloud server. Local network connection: The edge gateway is connected to the PLC controller through a local area network (LAN), thereby ensuring low-latency and high-reliability data transmission.
[0086] In S3 of an example of the present invention, the adaptive thresholds are determined through the following method:
[0087] Construct an adaptive threshold function, where the adaptive threshold function includes a sliding window, and the sliding window contains last five thresholds; whenever the water supply system triggers an alarm, add a threshold at the time of the alarm to the sliding window to update the five thresholds in the sliding window; and according to data in the sliding window, generate a dynamic threshold J based on a confidence interval, where the dynamic threshold J is expressed as follows:
[0088] J “* h i 1*96 O
[0089] in the formula, represents a mean of the thresholds in the sliding window; and $ ^represents a variance of the thresholds in the sliding window.
[0090] Further, with reference to FIG. 3, in an example of the present invention, the using a segmented PID algorithm to control start and stop of the deep-well pumps and the booster pump includes:
[0091] S31, acquire a current liquid level threshold and a water pressure threshold;
[0092] S32, acquire a real-time liquid level of the water tank by the liquid level transmitter through the liquid level sensor; detect a real-time water pressure of the water supply system through the pressure sensor; and
[0093] S33, using the segmented PID algorithm to adjust and control pumping power of the deep-well pumps by means of a control circuit module of the PLC controller according to the liquid level threshold and a liquid level difference, and using the segmented PID algorithm to adjust and control water delivery power of the booster pump by means of the control circuit module of the PLC controller according to the water pressure threshold and a water pressure difference.
[0094] Further, the using the segmented PID algorithm to adjust and control pumping power of the deep-well pumps includes: initializing a P parameter, an I parameter, and a D parameter acting on the PID controller of the deep-well pumps in the control circuit module of the PLC controller; adopting a PD controller when a first error between the liquid level threshold and the real-time liquid level is greater than a first set value; and adopting the PID controller when the first error is less than the first set value;
[0095] the using the segmented PID algorithm to adjust and control water delivery power of the booster pump includes: initializing the P parameter, the I parameter, and the D parameter acting on the PID controller of the booster pump in the control circuit module of the PLC controller; performing PD control when a second error between the water pressure threshold and the real-time water pressure is greater than a second set value; and performing PID control when the second error is less than the second set value;
[0096] the segmented PID algorithm is expressed as follows: ( 7’ | 4“ ~~ y ¢(0 4" [c'(70 — ¢0^ — .1)] ( 7 z 7 ' ' i-O )
[0098] where when e(K) >E — 0; and when e(k) <£, / 1 = 1;
[0099] in the formula, k represents a sampling No., and uk represents an output of kth sampling; e(k) represents a set value input at a moment of the kth sampling; e(k - 1) represents a set value input at a moment of k-1th sampling; T represents a sampling K T period; P represents an amplification coefficient of the controller; 1 i represents an integral constant of the controller; and represents a differential time constant of the controller.
[00100] Further, in an example of the present invention, data of the water supply system is uploaded to the cloud server through the edge gateway, and the cloud server stores the data and displays and analyzes the data through configuration software;
[00101] the PLC controller stores the processed liquid level data in a D200 register; and
[00102] in an example of the present invention, based on serial communication and a Modbus RTU protocol, the edge gateway reads data from the PLC controller through polling; and the edge gateway encapsulates the liquid level data read from the PLC controller and uploads the data to the cloud server. Based on a data transmission protocol in a request / response mode,
[00103] the edge gateway, as an HTTP client, sends data to a HTTP server on the cloud server via a POST request;
[00104] the edge gateway uploads encapsulated data to the cloud server through the Internet; and
[00105] the edge gateway is connected to the Internet through the wired (Ethernet) or wireless (Wi-Fi / 4G / 5G) network. The data is uploaded to the cloud server through a HTTP / HTTPS protocol. The liquid level data is published to a topic of " / supply system / level" through a MQTT protocol. The cloud server stores received data uploaded by the edge gateway in a NoSQL database (MongoDB).
[00106] Preferably, in an example of the present invention, each piece of the liquid level data records a timestamp, a sensor ID, and a liquid level value.
[00107] Example 2
[00108] With reference to FIG. 4, in an example of the present invention, a system for intelligent optimization and adjustment of water pressure in a water supply system is provided, including the following modules:
[00109] a liquid level acquisition module 41, configured for using a liquid level transmitter to acquire liquid level data of a water tank in a water supply system;
[00110] a water pressure acquisition module 42, configured for using a pressure sensor to acquire water pressure data from the water supply system; and
[00111] an optimization and adjustment module 43, configured for comparing the liquid level data and the water pressure data with corresponding adaptive thresholds respectively, and using a segmented PID algorithm to control start and stop of the deepwell pumps and the booster pump, to complete the optimization and adjustment of water pressure in the water supply system, where the deep-well pumps are configured for replenishing water into the water tank, and the booster pump is configured for increasing the water pressure in the water supply system.
[00112] Based on the above examples, in another example of the present invention, a storage medium is provided, and the storage medium includes a stored computer program, where when the computer program is executed, the device where the storage medium is located is controlled to implement the method for intelligent optimization and adjustment of water pressure in a water supply system according to the above examples of the present invention.
[00113] Compared with the prior art, the present invention has the following beneficial effects:
[00114] First, the present invention, by comparing the liquid level data and the water pressure data with corresponding adaptive thresholds respectively, and using a segmented PID algorithm to control start and stop of the deep-well pumps and the booster pump, is capable of completing the optimization and adjustment of water pressure in the water supply system, and ensuring stability and continuity of the water supply system; and
[00115] secondly, through automatic control technology, the present invention overcomes the defects of traditional water supply systems including low operational efficiency, high management costs, failure of real-time monitoring and the like, and achieves unattended and efficient management of the water supply system; and in response to water demand of camps, the present invention, by rationally configuring the deep-well pumps, the booster pump and water supply pumps, ensures the stability and continuity of the water supply system, and has broad application prospects.
[00116] Examples
[00117] Correspondingly, with reference to FIG. 4, in an example of the present invention, a terminal device 50 is provided, and the terminal device 50 includes a processor, a memory, and a computer program stored in the memory and configured to be executed by the processor, where when the computer program is executed by the processor, the digital twin generation method of power grid according to the examples of the present invention is implemented.
[00118] Example 4
[00119] Correspondingly, in an example of the present invention, there is provided a storage medium, and the storage medium includes a stored computer program, where when the computer program is executed, the device where the storage medium is located is controlled to implement the method for intelligent optimization and adjustment of water pressure in a water supply system according to the above examples of the present invention.
[00120] It should be noted that the device examples described above are merely schematic, the unit described as a separable component may be physically separated or not, and a component shown as a unit may be a physical unit or not, that is, may be located at one place or may also be distributed on a plurality of network units. Part or all of the modules may be selected according to actual needs to achieve the objective of the solution of the examples of the present invention. Moreover, in the drawings of the device examples provided by the present invention, the connection relationships between modules indicate that they are in communication connections, which can be specifically implemented through one or a plurality of communication buses or signal lines. Those skilled in the art can understand and implement the present invention without making creative efforts.
[00121] Those skilled in the art can clearly understand that, for convenience and brevity of description, specific working processes of the above-described device may refer to corresponding processes in the foregoing method examples, and are not repeated herein.
[00122] The terminal device can be a desktop computer, a laptop, a handheld computer, a cloud server or any other computing device. The terminal device can include, but is not limited to, a processor and a memory.
[00123] The processor can be a central processing unit (CPU), a microprocessor unit (MPU), any other general-purpose processor, a digital signal processor (DSP), an application specific integrated circuit (ASIC), a field-programmable gate array (FPGA), or any other programmable logic device (PLD), a discrete gate or a transistor logic device, or a discrete hardware component, etc. The general-purpose processor can be a microprocessor, or the processor may also be any conventional processor. The processor is a control center of the computer device and connects various parts of the computer device through various interfaces and circuits.
[00124] The memory can be used to store the computer program, and the processor achieves various functions of the device by running or executing the computer program stored in the memory and calling data stored in the memory. The memory mainly includes a program storage area and a data storage area, where an operating system, at least one application program required for function realization, and the like are stored in the program storage area, and data created for the use of mobile phones may be stored in the data storage area. Further, the memory can be a high-speed random access memory or a non-volatile memory, such as a hard disk, a memory, a plug-in hard drive, a smart media card (SMC), a secure digital (SD) card, a flash card, at least one disk storage device, a flash memory device, or any other volatile solid-state storage device.
[00125] The storage medium is a storage medium, and the computer program is stored in the storage medium, where when the computer program is executed by the processor, the steps of the above various method examples can be implemented. The computer program includes computer program codes, and the computer program codes may exist in the form of source code, object code or executable files, or in some intermediate forms. The computer-readable medium may include any entity or device capable of carrying the computer program code, a recording medium, a USB flash drive, a mobile hard disk drive, a magnetic disk, an optical disk, a computer memory, a read-only memory (ROM), a random access memories (RAM), an electrical carrier signal, a telecommunication signal, a software distribution medium, and the like. It should be noted that the content contained in the computer-readable medium can be appropriately added or deleted according to requirements of legislation and patent practices in a jurisdiction. For example, in some jurisdictions, the computer-readable medium does not include electrical carrier signals and telecommunication signals according to the requirements of legislation and patent practices.
[00126] The above are the preferred embodiments of the present invention. It should be pointed out that for those skilled in the art, without departing from the principles of the present invention, several improvements and modifications can be made, which should also be considered as falling within the protection scope of the present invention.
Claims
1. A method for intelligent optimization and adjustment of water pressure in a water supply system, characterized by comprising the following steps:using a liquid level transmitter to acquire liquid level data of a water tank in a water supply system;using a pressure sensor to acquire water pressure data from the water supply system; andcomparing the liquid level data and the water pressure data with corresponding adaptive thresholds respectively, and using a segmented PID algorithm to control start and stop of deep-well pumps and a booster pump, to complete the optimization and adjustment of water pressure in the water supply system, wherein the deep-well pumps are configured for replenishing water into the water tank, and the booster pump is configured for increasing the water pressure in the water supply system.
2. The method for intelligent optimization and adjustment of water pressure in a water supply system according to claim 1, characterized in thatthe using a liquid level transmitter to acquire liquid level data of a water tank in a water supply system comprises:converting a liquid level value measured through a liquid level sensor of the liquid level transmitter into an electrical signal, wherein the electrical signal is an analog signal with a signal range of 4-20 mA, 4 mA corresponds to a 0% liquid level, and 20 mA corresponds to a 100% liquid level;transmitting an analog signal from the liquid level sensor to a PLC controller of the water supply system via a cable;receiving the analog signal from the liquid level sensor through an analog input module of the PLC controller;acquiring a signal through the analog input module according to the preset signal range of 4-20 mA, converting the received analog signal into a digital signal through an analog-to-digitai converter integrated in the analog input module, and specifically converting the 4-20 mA analog signal into a corresponding digital signal through the analog-to-digital converter; andstoring the converted digital signal in a register of the PLC controller and processing the digital signal to obtain the liquid level data.3.The method for intelligent optimization and adjustment of water pressure in awater supply system according to claim 2, characterized in that the processing the digital signal to obtain the liquid level data comprises:converting the digital signal into an actual liquid level value through the PLC controller according to a preset proportional relationship;filtering and calibrating the liquid level value through the PLC controller to obtain the liquid level data;during the filtering, smoothing a liquid level signal through a low-pass filtering algorithm; andduring the calibrating, converting the digital signal into a corresponding physical signal according to a calibration curve of the sensor.
4. The method for intelligent optimization and adjustment of water pressure in a water supply system according to claim 3, characterized in that in the step of smoothing a liquid level signal through a low-pass filtering algorithm, the digital signal is processed through moving average filtering, which is expressed as follows:I 1Filtered value (k) = -} 'origm^lvatee (k — 1)in the formula, n represents an order of the filter, and k represents a kth sampling point; andin the step of converting the digital signal into a corresponding physical signal according to a calibration curve of the sensor, a calibration formula is expressed as follows:. ... .,, , Digital value X Liquid levelrangeActual liquid level ~ —----.-------’—.---.—Maximum value of ADCin the formula, a 0-20 mA signal corresponds to a liquid level of 0-10 m, and a maximum value of ADC is 4095.
5. The method for intelligent optimization and adjustment of water pressure in a water supply system according to claim 4, characterized in that the adaptive thresholds are determined through the following method:constructing an adaptive threshold function, wherein the adaptive threshold function comprises a sliding window, and the sliding window contains last five thresholds;whenever the water supply system triggers an alarm, adding a threshold at the time of the alarm to the sliding window to update the five thresholds in the sliding window; andaccording to data in the sliding window, generating a dynamic threshold J based on a confidence interval, wherein the dynamic threshold J is expressed as follows:J = Ph ± 1-96 ahin the formula, represents a mean of the thresholds in the sliding window; rrand v h represents a variance of the thresholds in the sliding window.
6. The method for intelligent optimization and adjustment of water pressure in a water supply system according to claim 5, characterized in that the using a segmented PID algorithm to control start and stop of the deep-well pumps and the booster pump comprises:acquiring a current liquid level threshold and a water pressure threshold;acquiring a real-time liquid level of the water tank by the liquid level transmitter through the liquid level sensor; detecting a real-time water pressure of the water supply system through the pressure sensor; andusing the segmented PID algorithm to adjust and control pumping power of the deep-well pumps by means of a control circuit module of the PLC controller according to the liquid level threshold and a liquid level difference, and using the segmented PID algorithm to adjust and control water delivery power of the booster pump by means of the control circuit module of the PLC controller according to the water pressure threshold and a water pressure difference.
7. The method for intelligent optimization and adjustment of water pressure in a water supply system according to claim 6, characterized in that the using the segmented PID algorithm to adjust and control pumping power of the deep-well pumps comprises: initializing a P parameter, an I parameter, and a D parameter acting on the PID controller of the deep-well pumps in the control circuit module of the PLC controller; performing PD control when a first error between the liquid level threshold and the realtime liquid level is greater than a first set value; and performing PID control when the first error is less than the first set value;the using the segmented PID algorithm to adjust and control water delivery power of the booster pump comprises: initializing the P parameter, the I parameter, and the D parameter acting on the PID controller of the booster pump in the control circuit module of the PLC controller; performing PD control when a second error between the water pressure threshold and the real-time water pressure is greater than a second set value;and performing PID control when the second error is less than the second set value;the segmented PID algorithm is expressed as follows:{& A+ e(l) + k(&) — ^(k 1)] ? / 1 i ti^O )wherein when «’; «) >= 8; and when ~ 1;in the formula, k represents a sampling No., and uk represents an output of kth sampling; e00 represents a set value input at a moment of the kth sampling; e(k - 1) represents a set value input at a moment of k-lth sampling; T represents a sampling period; represents an amplification coefficient of the controller; i i represents an integral constant of the controller; and represents a differential time constant of the controller.
8. A system for implementing the method for intelligent optimization and adjustment of water pressure in a water supply system according to any one of claims 1-7, characterized in that the system comprises the following modules:a liquid level acquisition module, being configured for using a liquid level transmitter to acquire liquid level data of a water tank in a water supply system;a water pressure acquisition module, being configured for using a pressure sensor to acquire water pressure data from the water supply system; andan optimization and adjustment module, being configured for comparing the liquid level data and the water pressure data with corresponding adaptive thresholds respectively, and using a segmented PID algorithm to control start and stop of the deepwell pumps and the booster pump, to complete the optimization and adjustment of water pressure in the water supply system, wherein the deep-well pumps are configured for replenishing water into the water tank, and the booster pump is configured for increasing the water pressure in the water supply system.
9. A storage medium, characterized in that the storage medium comprises a stored computer program, wherein when the computer program is executed, the device where the storage medium is located is controlled to implement the method for intelligent optimization and adjustment of water pressure in a water supply system according to any one of claims 1-7.