Intelligent water pressure optimization and adjustment method and system for water supply system and storage medium
By using the liquid level and pressure sensor in the water supply system, combined with the start and stop of the segmented PID algorithm control pump, the problem of low efficiency, high cost, and inability to monitor in real time in traditional water supply systems, realized the stability and efficiency of the water supply system manage.
Patent Information
- Application Number
- CN202411514290.1
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2024-10-28
- Publication Date
- 2025-01-24
AI Technical Summary
Traditional water supply systems have problems such as low efficiency, high cost and inability to monitor in real time, especially in the camp environment, which makes the water supply system unstable.
By using the liquid level transmitter and the pressure sensor to obtain the liquid level and water pressure data of the water supply system, compared with the adaptive threshold, and use the segmented PID algorithm to control the start and stop of the deep well pump and the booster pump to achieve the water supply system water Optimization adjustment of pressure.
The stability and continuity of the water supply system have been realized, and the problem of low operating efficiency, high management costs, and unable to monitor the traditional water supply system are suitable for the environment of camps.
Smart Images

Figure CN119352615A_ABST
Abstract
Description
Technical Field
[0006] The present invention belongs to the technical field of intelligent control of water supply systems, and in particular relates to a method, system and storage medium for intelligent optimization and adjustment of water pressure in a water supply system. Background Art
[0007] In some camping environments, it is necessary to provide camp personnel with accommodation, water supply, electricity supply and other supporting facilities so that camp personnel can carry out long-term activities in the camping environment.
[0008] Depending on the location of the campsite, areas with better living conditions such as those close to cities generally directly connect to the city tap water as the campsite water supply. However, for campsites that are far away from the city or have a harsh environment, an independent water supply system needs to be configured.
[0009] Traditional water supply systems rely on manual inspection and maintenance, which has problems such as low efficiency, high cost, and inability to monitor in real time. In camp environments, seasonal fluctuations in water resources exacerbate the instability of water supply systems. Summary of the invention
[0010] The purpose of the embodiments 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, aiming to solve the problems of low efficiency, high cost and inability to monitor in real time in traditional water supply systems.
[0011] To achieve the above object, the present invention provides the following technical solutions.
[0012] An embodiment of the present invention provides a method for intelligent optimization and adjustment of water pressure in a water supply system, the method comprising:
[0013] Use liquid level transmitters to obtain liquid level data of water tanks in water supply systems;
[0014] Use pressure sensors to obtain water pressure data of the water supply system;
[0015] The liquid level data and water pressure data are compared with the corresponding adaptive thresholds respectively, and the segmented PID algorithm is used to control the start and stop of the deep well pump and the booster pump to complete the optimization adjustment of the water pressure of the water supply system; wherein, the deep well pump is used to replenish water into the water tank; the booster pump is used to increase the water pressure of the water supply system.
[0016] Further, the step of obtaining liquid level data of a water tank in a water supply system by using a liquid level transmitter comprises:
[0017] The liquid level sensor of the liquid level transmitter converts the measured liquid level value into an electrical signal. The electrical signal is an analog signal with a signal range of 4-20mA, where 4mA corresponds to 0% liquid level and 20mA corresponds to 100% liquid level.
[0018] The analog signal of the liquid level sensor is transmitted to the PLC controller of the water supply system through the cable;
[0019] The PLC controller is equipped with an analog input module for receiving analog signals from the liquid level sensor;
[0020] The analog input module collects signals according to the preset signal range of 4-20mA. The analog input module has an internal integrated analog-to-digital converter to convert the received analog signal into a digital signal. Specifically, the analog-to-digital converter converts the 4-20mA analog signal into a corresponding digital quantity.
[0021] The converted digital signal is stored in the register of the PLC controller, and the digital signal is processed to obtain the liquid level data.
[0022] Furthermore, the step of processing the digital signal to obtain liquid level data includes:
[0023] The PLC controller converts the digital signal into the actual liquid level value according to the preset proportional relationship;
[0024] The PLC controller filters and calibrates the liquid level value to obtain liquid level data;
[0025] In the filtering process, a low-pass filtering algorithm is used to smooth the liquid level signal;
[0026] In the calibration process, the digital signal is converted into a corresponding physical quantity according to the calibration curve of the sensor.
[0027] Furthermore, in the step of smoothing the liquid level signal using a low-pass filtering algorithm, a sliding average filter is used to process the digital signal, which is expressed as follows:
[0028]
[0029] In the formula, n represents the order of the filter, and k represents the kth sampling point;
[0030] In the step of converting the digital signal into the corresponding physical quantity according to the calibration curve of the sensor, the calibration formula is expressed as:
[0031]
[0032] Among them, the 0-20mA signal corresponds to the 0-10 meter liquid level, and the ADC maximum value is 4095.
[0033] Furthermore, the adaptive threshold is determined by the following method:
[0034] Construct an adaptive threshold function, which includes a sliding window with the most recent five thresholds built in;
[0035] Every time an alarm occurs in the water supply system, the threshold value at the time of the alarm is placed in the sliding window, and the five threshold values in the sliding window are updated;
[0036] According to the data of the sliding window, a dynamic threshold J is generated using a confidence interval. The expression of the dynamic threshold J is:
[0037]
[0038] In the formula, μ h represents the mean of the threshold in the sliding window; σ h Represents the variance of the threshold in the sliding window.
[0039] Furthermore, the step of controlling the start and stop of the deep well pump and the booster pump using the segmented PID algorithm includes:
[0040] Get the current liquid level threshold and water pressure threshold;
[0041] The liquid level transmitter collects the real-time liquid level of the water tank through the liquid level sensor; and detects the real-time water pressure of the water supply system through the pressure sensor;
[0042] According to the liquid level threshold and the real-time liquid level, as well as the water pressure threshold and the real-time water pressure, the control circuit module of the PLC controller uses a segmented PID algorithm to adjust and control the pumping power of the deep well pump according to the liquid level threshold and the liquid level difference, and the control circuit module of the PLC controller uses a segmented PID algorithm to adjust and control the water delivery power of the booster pump according to the water pressure threshold and the water pressure difference.
[0043] Furthermore, the step of using the segmented PID algorithm to adjust and control the pumping power of the deep well pump includes: initializing the P parameter, I parameter and D parameter of the PID controller acting on the deep well pump in the control circuit module of the PLC controller; when the first error value between the liquid level threshold and the real-time liquid level exceeds the first set value, using PD control; when the first error value is less than the first set value, using PID control;
[0044] The step of regulating and controlling the water delivery power of the booster pump by using a segmented PID algorithm includes: initializing the P parameter, I parameter and D parameter of the PID controller acting on the booster pump in the control circuit module of the PLC controller; when the second error value between the water pressure threshold and the real-time water pressure exceeds the second set value, using PD control; when the second error value is less than the second set value, using PID control;
[0045] The expression of the segmented PID algorithm is:
[0046]
[0047] Among them, when e(k)>ε, β=0; when e(k)≤ε, β=1;
[0048] In the formula, k represents the sampling number, u k represents the output of the kth sampling; e(k) represents the set value input at the kth sampling time; e(k-1) represents the set value input at the k-1th sampling time; T represents the sampling period; K p Indicates the controller's gain factor; T I Represents the integral constant of the controller; T D Represents the derivative time constant of the controller.
[0049] Another embodiment of the present invention provides a water supply system water pressure intelligent optimization and adjustment system, the system comprising the following modules:
[0050] A liquid level acquisition module is used to obtain liquid level data of a water tank in a water supply system using a liquid level transmitter;
[0051] A water pressure acquisition module is used to obtain water pressure data of a water supply system using a pressure sensor;
[0052] The optimization and adjustment module is used to compare the liquid level data and the water pressure data with the corresponding adaptive thresholds respectively, and use the segmented PID algorithm to control the start and stop of the deep well pump and the booster pump to complete the optimization and adjustment of the water pressure of the water supply system; wherein the deep well pump is used to replenish water into the water tank; the booster pump is used to increase the water pressure of the water supply system.
[0053] Based on the above embodiments, another embodiment of the present invention provides a storage medium, which includes a stored computer program, wherein when the computer program is running, the device where the storage medium is located is controlled to execute the water supply system water pressure intelligent optimization and adjustment method described in the above invention embodiment.
[0054] Compared with the prior art, the embodiments of the present invention have the following beneficial effects:
[0055] First, the present invention can optimize and adjust the water pressure of the water supply system by comparing the liquid level data and the water pressure data with the corresponding adaptive thresholds respectively, and using the segmented PID algorithm to control the start and stop of the deep well pump and the booster pump; thus ensuring the stability and continuity of the water supply system;
[0056] Second, the present invention solves the problems of low operating efficiency, high management cost, and inability to monitor in real time in traditional water supply systems through automatic control technology, thereby realizing unmanned and efficient management of the water supply system. In response to the water demand of the camp, the present invention ensures the stability and continuity of the water supply system through reasonable configuration of deep well pumps, booster pumps and water supply pumps, and has broad application prospects. BRIEF DESCRIPTION OF THE DRAWINGS
[0057] Figure 1 A flowchart for implementing the method for intelligent optimization and adjustment of water pressure in a water supply system provided by an embodiment of the present invention;
[0058] Figure 2 A sub-flow chart of a method for intelligent optimization and adjustment of water pressure in a water supply system according to a first embodiment of the present invention;
[0059] Figure 3 It is another sub-flow chart of the method for intelligent optimization and adjustment of water pressure in a water supply system according to the first embodiment of the present invention;
[0060] Figure 4 A structural block diagram of a water supply system water pressure intelligent optimization and adjustment system provided in Embodiment 2 of the present invention;
[0061] Figure 5 This is a structural block diagram of a terminal device provided in Embodiment 3 of the present invention. DETAILED DESCRIPTION
[0062] In order to make the purpose, technical solution and advantages of the present invention more clearly understood, the present invention is further described in detail below in conjunction with the accompanying drawings and embodiments. It should be understood that the specific embodiments described herein are only used to explain the present invention and are not intended to limit the present invention.
[0063] The specific implementation of the present invention is described in detail below in conjunction with specific embodiments.
[0064] Embodiment 1
[0065] Please refer to Figure 1 In an embodiment of the present invention, a method for intelligent optimization and adjustment of water pressure in a water supply system is provided, comprising:
[0066] S11. Use a liquid level transmitter to obtain liquid level data of a water tank in a water supply system.
[0067] In step S1 of the embodiment of the present invention, the liquid level transmitter is installed in the water tank, which includes a raw water tank and a clean water tank. When the water in the raw water tank is sent to the clean water tank, the water body is filtered by a filtering device connected between the raw water tank and the clean water tank. The clean water tank and the raw water tank of the embodiment of the present invention are connected by a communicating vessel structure, and the water levels of the two are consistent. The liquid level transmitter can be installed in either the clean water tank or the raw water tank, and the liquid level transmitter has a built-in liquid level sensor for detecting the liquid level in the water tank.
[0068] For details, please refer to Figure 2 The embodiment of the present invention provides a specific implementation process of obtaining liquid level data of a water tank in a water supply system by using a liquid level transmitter, including:
[0069] S21, the liquid level sensor of the liquid level transmitter converts the measured liquid level value into an electrical signal, which is an analog signal with a signal range of 4-20mA, where 4mA corresponds to 0% liquid level and 20mA corresponds to 100% liquid level;
[0070] S22, the analog signal of the liquid level sensor is transmitted to the PLC controller of the water supply system through the cable;
[0071] S23, the PLC controller is equipped with an analog input module for receiving analog signals from the liquid level sensor;
[0072] S24, the analog input module collects signals according to the preset signal range of 4-20mA. The analog input module has an internal integrated analog-to-digital converter to convert the received analog signal into a digital signal. Specifically, the analog-to-digital converter converts the 4-20mA analog signal into a corresponding digital quantity;
[0073] S25. The converted digital signal is stored in the register of the PLC controller, and the digital signal is processed to obtain liquid level data.
[0074] In the embodiment of the present invention, the step of processing the digital signal to obtain the liquid level data includes:
[0075] The PLC controller converts the digital signal into the actual liquid level value according to the preset proportional relationship;
[0076] The PLC controller filters and calibrates the liquid level value to obtain liquid level data; in the filtering process, a low-pass filtering algorithm is used to smooth the liquid level signal; in the calibration process, the digital signal is converted into a corresponding physical quantity according to the calibration curve of the sensor.
[0077] Furthermore, in the step of smoothing the liquid level signal using a low-pass filtering algorithm, a sliding average filter is used to process the digital signal, which is expressed as follows:
[0078]
[0079] In the formula, n represents the order of the filter, and k represents the kth sampling point;
[0080] In addition, in the filtering process of the embodiment of the present invention, a first-order low-pass filter can also be used, and its expression is:
[0081] Filtered value (k) = α × original value (k) + (1-α) × filtered value (k-1)
[0082] Where α represents the filter coefficient, which ranges from 0 to 1.
[0083] Furthermore, in the step of converting the digital signal into a corresponding physical quantity according to the calibration curve of the sensor, the calibration formula of the embodiment of the present invention is expressed as:
[0084]
[0085] Among them, the 0-20mA signal corresponds to the 0-10 meter liquid level, and the ADC maximum value is 4095.
[0086] Furthermore, in the embodiment of the present invention, the number of deep well pumps is multiple groups, and the deep well pumps are started in sequence according to the set water level, and the faulty pumps are automatically skipped to avoid power surges and ensure the stability of the water supply system. When the booster pump is running, the deep well pump is automatically started to prevent the water level from being too low to affect the water supply.
[0087] Please continue to refer to Figure 1 The method for intelligent optimization and adjustment of water pressure in a water supply system according to an embodiment of the present invention further includes:
[0088] S12. Obtain water pressure data of the water supply system using a pressure sensor.
[0089] S13. Compare the liquid level data and water pressure data with the corresponding adaptive thresholds respectively, and use the segmented PID algorithm to control the start and stop of the deep well pump and the booster pump to complete the optimization and adjustment of the water pressure of the water supply system; wherein, the deep well pump is used to replenish water into the water tank; the booster pump is used to increase the water pressure of the water supply system.
[0090] It should be noted that all pump groups in the embodiments of the present invention are provided with a waterless protection function. If a pump fails or the water supply is abnormal, the system will automatically switch to the standby pump, detect water leakage, delay stopping the pump and issue an alarm.
[0091] In addition, the real-time status of the water supply system in the embodiment of the present invention is uploaded to the cloud server through the edge gateway, which is convenient for the staff to grasp the operating status of the water supply system in real time. The specific connection method between the edge gateway and the cloud server is: through the Internet connection, using a wired (Ethernet) or wireless (Wi-Fi / 4G / 5G) network 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) to ensure low-latency and high-reliability data transmission.
[0092] In step S3 of the embodiment of the present invention, the adaptive threshold is determined by the following method:
[0093] An adaptive threshold function is constructed, which includes a sliding window with the five most recent thresholds built in. Each time an alarm occurs in the water supply system, the threshold at the time of the alarm is placed in the sliding window, and the five thresholds in the sliding window are updated. Based on the data in the sliding window, a confidence interval is used to generate a dynamic threshold J, and the expression of the dynamic threshold J is:
[0094]
[0095] In the formula, μ h represents the mean of the threshold in the sliding window; σ h Represents the variance of the threshold in the sliding window.
[0096] For further information, please refer to Figure 3 In an embodiment of the present invention, the step of controlling the start and stop of the deep well pump and the booster pump by using a segmented PID algorithm includes:
[0097] S31, obtaining the current liquid level threshold and water pressure threshold;
[0098] S32, the liquid level transmitter collects the real-time liquid level of the water tank through the liquid level sensor; and detects the real-time water pressure of the water supply system through the pressure sensor;
[0099] S33. According to the liquid level threshold and the real-time liquid level, as well as the water pressure threshold and the real-time water pressure, the control circuit module of the PLC controller uses a segmented PID algorithm to adjust and control the pumping power of the deep well pump according to the liquid level threshold and the liquid level difference, and the control circuit module of the PLC controller uses a segmented PID algorithm to adjust and control the water delivery power of the booster pump according to the water pressure threshold and the water pressure difference.
[0100] Furthermore, the step of using the segmented PID algorithm to adjust and control the pumping power of the deep well pump includes: initializing the P parameter, I parameter and D parameter of the PID controller acting on the deep well pump in the control circuit module of the PLC controller; when the first error value between the liquid level threshold and the real-time liquid level exceeds the first set value, using PD control; when the first error value is less than the first set value, using PID control;
[0101] The step of regulating and controlling the water delivery power of the booster pump by using a segmented PID algorithm includes: initializing the P parameter, I parameter and D parameter of the PID controller acting on the booster pump in the control circuit module of the PLC controller; when the second error value between the water pressure threshold and the real-time water pressure exceeds the second set value, using PD control; when the second error value is less than the second set value, using PID control;
[0102] The expression of the segmented PID algorithm is:
[0103]
[0104] Among them, when e(k)>ε, β=0; when e(k)≤ε, β=1;
[0105] In the formula, k represents the sampling number, u k represents the output of the kth sampling; e(k) represents the set value input at the kth sampling time; e(k-1) represents the set value input at the k-1th sampling time; T represents the sampling period; K p Indicates the controller's gain factor; T I Represents the integral constant of the controller; T D Represents the derivative time constant of the controller.
[0106] Furthermore, the data of the water supply system of the embodiment of the present invention is uploaded to the cloud server through the edge gateway, and the cloud server stores the data and displays and analyzes it through the configuration software;
[0107] The PLC controller stores the processed liquid level data in the D200 register;
[0108] In the embodiment of the present invention, the Modbus RTU protocol is used through serial communication, and the edge gateway reads the data of the PLC through polling; the liquid level data read by the edge gateway from the PLC is packaged and uploaded to the cloud server. Data transmission protocol based on request / response mode;
[0109] The edge gateway acts as an HTTP client and sends data to the HTTP server on the cloud server through a POST request;
[0110] The edge gateway uploads the packaged data to the cloud server via the Internet;
[0111] The edge gateway is connected to the Internet via a wired (Ethernet) or wireless (Wi-Fi / 4G / 5G) network. The data is uploaded to the cloud server using the HTTP / HTTPS protocol. The liquid level data is published to the topic " / supply_system / level" via the MQTT protocol. The cloud server receives the data uploaded by the edge gateway and stores the received data in a NoSQL database (MongoDB).
[0112] Preferably, in the embodiment of the present invention, each liquid level data record includes a timestamp, a sensor ID and a liquid level value.
[0113] Embodiment 2
[0114] Please refer to Figure 4 In an embodiment of the present invention, a water supply system water pressure intelligent optimization and adjustment system is provided, and the system includes the following modules:
[0115] A liquid level acquisition module 41 is used to obtain liquid level data of a water tank in a water supply system using a liquid level transmitter;
[0116] A water pressure acquisition module 42 is used to obtain water pressure data of a water supply system using a pressure sensor;
[0117] The optimization and adjustment module 43 is used to compare the liquid level data and the water pressure data with the corresponding adaptive thresholds respectively, and use the segmented PID algorithm to control the start and stop of the deep well pump and the booster pump to complete the optimization and adjustment of the water pressure of the water supply system; wherein the deep well pump is used to replenish water into the water tank; the booster pump is used to increase the water pressure of the water supply system.
[0118] Based on the above embodiments, another embodiment of the present invention provides a storage medium, which includes a stored computer program, wherein when the computer program is running, the device where the storage medium is located is controlled to execute the water supply system water pressure intelligent optimization and adjustment method described in the above invention embodiment.
[0119] Compared with the prior art, the embodiments of the present invention have the following beneficial effects:
[0120] First, the present invention can optimize and adjust the water pressure of the water supply system by comparing the liquid level data and the water pressure data with the corresponding adaptive thresholds respectively, and using the segmented PID algorithm to control the start and stop of the deep well pump and the booster pump; thus ensuring the stability and continuity of the water supply system;
[0121] Second, through automatic control technology, the problems of low operating efficiency, high management costs, and inability to monitor in real time in traditional water supply systems have been solved, and unmanned and efficient management of the water supply system has been achieved. In response to the water needs of the camp, the stability and continuity of the water supply system are ensured through the reasonable configuration of deep well pumps, booster pumps and water supply pumps, which has broad application prospects.
[0122] Embodiment 3
[0123] Accordingly, please refer to Figure 4 An embodiment of the present invention provides a terminal device, 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, and when the processor executes the computer program, it implements the method for generating a digital twin of a power grid described in the above-mentioned embodiment of the invention.
[0124] Embodiment 4
[0125] Accordingly, an embodiment of the present invention provides a storage medium, which includes a stored computer program, wherein when the computer program is running, the device where the storage medium is located is controlled to execute the method for intelligent optimization and adjustment of water pressure of a water supply system described in the above-mentioned embodiment of the invention.
[0126] It should be noted that the device embodiments described above are merely schematic, wherein the units described as separate components may or may not be physically separated, and the components displayed as units may or may not be physical units, that is, they may be located in one place, or they may be distributed on multiple network units. Some or all of the modules may be selected according to actual needs to achieve the purpose of the scheme of this embodiment. In addition, in the accompanying drawings of the device embodiments provided by the present invention, the connection relationship between the modules indicates that there is a communication connection between them, which may be specifically implemented as one or more communication buses or signal lines. A person of ordinary skill in the art may understand and implement it without paying any creative effort.
[0127] Those skilled in the art can clearly understand that for the sake of convenience and brevity, the specific working process of the device described above can refer to the corresponding process in the aforementioned method embodiment, and will not be repeated here.
[0128] The terminal device may be a computing device such as a desktop computer, a notebook, a PDA, a cloud server, etc. The terminal device may include, but is not limited to, a processor and a memory.
[0129] The processor may be a central processing unit (CPU), or other general-purpose processors, digital signal processors (DSP), application-specific integrated circuits (ASIC), field-programmable gate arrays (FPGA) or other programmable logic devices, discrete gate or transistor logic devices, discrete hardware components, etc. A general-purpose processor may be a microprocessor or any conventional processor, etc. The processor is the control center of the device, and various interfaces and lines are used to connect various parts of the entire device.
[0130] The memory can be used to store the computer program, and the processor realizes various functions of the device by running or executing the computer program stored in the memory and calling the data stored in the memory. The memory can mainly include a program storage area and a data storage area, wherein the program storage area can store an operating system, at least one application required for a function, etc.; the data storage area can store data created according to the use of the mobile phone, etc. In addition, the memory can include a high-speed random access memory, and can also include a non-volatile memory, such as a hard disk, a memory, a plug-in hard disk, a smart memory card (Smart Media Card, SMC), a secure digital (Secure Digital, SD) card, a flash card (FlashCard), at least one disk storage device, a flash memory device, or other volatile solid-state storage devices.
[0131] The storage medium is a storage medium, and the computer program is stored in the storage medium. When the computer program is executed by the processor, the steps of each method embodiment described above can be implemented. Among them, the computer program includes computer program code, and the computer program code can be in source code form, object code form, executable file or some intermediate form, etc. The computer readable medium may include: any entity or device capable of carrying the computer program code, recording medium, USB flash drive, mobile hard disk, disk, optical disk, computer memory, read-only memory (ROM, Read-Only Memory), random access memory (RAM, Random Access Memory), electric carrier signal, telecommunication signal and software distribution medium, etc. It should be noted that the content contained in the computer readable medium can be appropriately increased or decreased according to the requirements of legislation and patent practice in the jurisdiction. For example, in some jurisdictions, according to legislation and patent practice, computer readable media do not include electric carrier signals and telecommunication signals.
[0132] The above is a preferred embodiment of the present invention. It should be pointed out that a person skilled in the art can make several improvements and modifications without departing from the principle of the present invention. These improvements and modifications are also considered to be within the scope of protection of the present invention.
Claims
1. A method for intelligent optimization and adjustment of water pressure in a water supply system, characterized in that: The method includes: Use liquid level transmitters to obtain liquid level data of water tanks in water supply systems; Use pressure sensors to obtain water pressure data of the water supply system; The liquid level data and water pressure data are compared with the corresponding adaptive thresholds respectively, and the segmented PID algorithm is used to control the start and stop of the deep well pump and the booster pump to complete the optimization adjustment of the water pressure of the water supply system; wherein, the deep well pump is used to replenish water into the water tank; the booster pump is used to increase the water pressure of 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 that: Said The steps to use a level transmitter to obtain the liquid level data of a water tank in a water supply system include: The liquid level sensor of the liquid level transmitter converts the measured liquid level value into an electrical signal. The electrical signal is an analog signal with a signal range of 4-20mA, where 4mA corresponds to 0% liquid level and 20mA corresponds to 100% liquid level. The analog signal of the liquid level sensor is transmitted to the PLC controller of the water supply system through the cable; The PLC controller is equipped with an analog input module for receiving analog signals from the liquid level sensor; The analog input module collects signals according to the preset signal range of 4-20mA. The analog input module has an internal integrated analog-to-digital converter to convert the received analog signal into a digital signal. Specifically, the analog-to-digital converter converts the 4-20mA analog signal into a corresponding digital quantity. The converted digital signal is stored in the register of the PLC controller, and the digital signal is processed to obtain the liquid level data.
3. The method for intelligent optimization and adjustment of water pressure in a water supply system according to claim 2, characterized in that: The step of processing the digital signal to obtain liquid level data comprises: The PLC controller converts the digital signal into the actual liquid level value according to the preset proportional relationship; The PLC controller filters and calibrates the liquid level value to obtain liquid level data; In the filtering process, a low-pass filtering algorithm is used to smooth the liquid level signal; In the calibration process, the digital signal is converted into a corresponding physical quantity according to the 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 the liquid level signal using a low-pass filtering algorithm, a sliding average filter is used to process the digital signal, which is expressed as follows: In the formula, n represents the order of the filter, and k represents the kth sampling point; In the step of converting the digital signal into the corresponding physical quantity according to the calibration curve of the sensor, the calibration formula is expressed as: Among them, the 0-20mA signal corresponds to the 0-10 meter liquid level, and the ADC maximum value 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 threshold is determined by the following method: Construct an adaptive threshold function, which includes a sliding window with the five most recent thresholds built in; Every time an alarm occurs in the water supply system, the threshold value at the time of the alarm is placed in the sliding window, and the five threshold values in the sliding window are updated; According to the data of the sliding window, a dynamic threshold J is generated using a confidence interval. The expression of the dynamic threshold J is: In the formula, μ h represents the mean of the threshold in the sliding window; σ h Represents the variance of the threshold 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 step of using the segmented PID algorithm to control the start and stop of the deep well pump and the booster pump includes: Get the current liquid level threshold and water pressure threshold; The liquid level transmitter collects the real-time liquid level of the water tank through the liquid level sensor; and detects the real-time water pressure of the water supply system through the pressure sensor; According to the liquid level threshold and the real-time liquid level, as well as the water pressure threshold and the real-time water pressure, the control circuit module of the PLC controller uses a segmented PID algorithm to adjust and control the pumping power of the deep well pump according to the liquid level threshold and the liquid level difference, and the control circuit module of the PLC controller uses a segmented PID algorithm to adjust and control the water delivery power of the booster pump according to the water pressure threshold and the 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 step of using the segmented PID algorithm to adjust and control the pumping power of the deep well pump includes: initializing the P parameter, I parameter and D parameter of the PID controller acting on the deep well pump in the control circuit module of the PLC controller; when the first error value between the liquid level threshold and the real-time liquid level exceeds the first set value, using PD control; when the first error value is less than the first set value, using PID control; The step of regulating and controlling the water delivery power of the booster pump by using a segmented PID algorithm includes: initializing the P parameter, I parameter and D parameter of the PID controller acting on the booster pump in the control circuit module of the PLC controller; when the second error value between the water pressure threshold and the real-time water pressure exceeds the second set value, using PD control; when the second error value is less than the second set value, using PID control; The expression of the segmented PID algorithm is: Among them, when e(k)>ε, β=0; when e(k)≤ε, β=1; In the formula, k represents the sampling number, u k represents the output of the kth sampling; e(k) represents the set value input at the kth sampling time; e(k-1) represents the set value input at the k-1th sampling time; T represents the sampling period; K p Indicates the controller's gain factor; T I Represents the integral constant of the controller; T D Represents the derivative 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 to 7, characterized in that: The system includes the following modules: A liquid level acquisition module is used to obtain liquid level data of a water tank in a water supply system using a liquid level transmitter; A water pressure acquisition module is used to obtain water pressure data of a water supply system using a pressure sensor; The optimization and adjustment module is used to compare the liquid level data and the water pressure data with the corresponding adaptive thresholds respectively, and use the segmented PID algorithm to control the start and stop of the deep well pump and the booster pump to complete the optimization and adjustment of the water pressure of the water supply system; wherein the deep well pump is used to replenish water into the water tank; the booster pump is used to increase the water pressure of the water supply system.
9. A storage medium, characterized in that: The storage medium includes a stored computer program, wherein when the computer program is running, the device where the storage medium is located is controlled to execute the method for intelligent optimization and adjustment of water pressure in a water supply system as described in any one of claims 1 to 7.