A liquid level control device, method, apparatus, and storage medium
By coordinating the start-stop module, switching module, rate control module, and PID controller, the problems of low accuracy and poor stability in the liquid level control system are solved, realizing automated and precise liquid level control, and adapting to a variety of application scenarios.
Patent Information
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- ZHEJIANG PETROLEUM&CHEM CO LTD
- Filing Date
- 2026-03-19
- Publication Date
- 2026-07-10
AI Technical Summary
Existing liquid level control systems rely on frequent manual adjustments of setpoints or valve positions, resulting in low accuracy and poor stability of liquid level control, making them unsuitable for various application scenarios.
Through the coordinated operation of the start-stop module, switching module, rate control module and PID controller, the liquid level control is automated and precise. The start-stop module sends start or stop commands, the switching module selects the control path, the rate control module generates a smooth target value, and the PID controller performs smooth control.
It achieves automated and precise liquid level control, avoids abrupt changes, ensures the smoothness and accuracy of liquid level adjustment, and is suitable for various application scenarios.
Smart Images

Figure CN122363375A_ABST
Abstract
Description
Technical Field
[0001] This disclosure relates to the field of automatic lifting technology, and in particular to a liquid level control device, method, apparatus and storage medium. Background Technology
[0002] Currently, most distributed control systems (DCS) rely on two methods for liquid level control: frequent manual adjustment of the setpoint or manual valve position adjustment. Frequent manual adjustment of the setpoint cannot achieve a smooth, uniform change, easily leading to abrupt changes in the setpoint and significant liquid level fluctuations. Manual valve position adjustment requires switching the control loop from automatic to manual mode, requiring operators to continuously monitor liquid level changes and fine-tune the valve opening to control fluid flow. This is cumbersome and prone to problems such as excessive liquid level due to inadequate monitoring or untimely adjustments. In summary, existing liquid level control methods have low accuracy, poor stability, and are difficult to adapt to various application scenarios. Summary of the Invention
[0003] This disclosure provides a liquid level control device, method, apparatus, and storage medium to address, to some extent, the shortcomings of existing liquid level control systems, such as low accuracy, poor stability, and difficulty in adapting to various application scenarios.
[0004] According to one aspect of this disclosure, a liquid level control device is provided, comprising: a start / stop module for sending a start command or a stop command to a switching module; a switching module for receiving the start command or the stop command and selecting different control paths based on the start command or the stop command; when the received command is a start command, sending an enable signal to a rate control module; the enable signal is used to transmit a smoothing target value output by the rate control module to a PID controller; when the received command is a stop command, sending a tracking signal to the PID controller; the tracking signal is used to determine the current liquid level measurement value as the smoothing target value; a rate control module for receiving the enable signal; determining the smoothing target value based on the enable signal, a preset rate limit value, and a preset liquid level target value, and sending the smoothing target value to the PID controller; and a PID controller for receiving the smoothing target value or the tracking signal and smoothly controlling the liquid level based on the smoothing target value or the tracking signal.
[0005] Furthermore, according to one aspect of the apparatus of this disclosure, the start-stop module acquires a start button signal and converts the start button signal into a first pulse signal; based on the first pulse signal, it sets the set-reset trigger SR in the start-stop module and generates a start command; or, the start-stop module acquires a stop button signal and / or an automatic stop signal and / or a manual switch signal determined when the current liquid level measurement value meets a preset liquid level target value, and converts the stop button signal and / or the automatic stop signal and / or the manual switch signal into a second pulse signal; based on the second pulse signal, it resets the SR and generates a stop command.
[0006] Furthermore, according to one aspect of the apparatus of this disclosure, a switching module is connected to a rate control module on one side and a PID controller on the other side; when the switching module receives a start command, it sends an enable signal to the rate control module and, based on a logic selection function block within the switching module, inputs the smoothing target value determined by the rate control module based on the enable signal to the PID controller; when the switching module receives a stop command, it inputs a tracking signal to the PID controller based on the logic selection function block.
[0007] Furthermore, according to one aspect of the apparatus of this disclosure, when the rate control module receives an enable signal, it acquires the current liquid level measurement value, the preset rate limit value, and the preset liquid level target value; based on the difference between the current liquid level measurement value and the preset liquid level target value, it generates a candidate target value using a gradient algorithm or a low-pass filtering algorithm; and it uses the preset rate limit value to perform slope gradient constraint correction on the candidate target value to obtain a smooth target value.
[0008] Furthermore, according to one aspect of the apparatus of this disclosure, the slope gradient constraint includes at least one of the following: an ascending slope constraint, a descending slope constraint, and a bidirectional slope constraint.
[0009] Furthermore, according to one aspect of the apparatus of this disclosure, a ramp-gradient constraint correction is applied to a candidate target value using a preset rate limit value to obtain a smooth target value, comprising: determining the maximum permissible change in liquid level per unit time based on the preset rate limit value; the maximum permissible change in liquid level includes: a maximum permissible change in rising liquid level, a maximum permissible change in falling liquid level, and a maximum permissible change in both directions; wherein, the maximum permissible change in rising liquid level is determined based on a rising ramp constraint; the maximum permissible change in falling liquid level is determined based on a falling ramp constraint; and the maximum permissible change in both directions is determined based on a two-way ramp constraint; determining a calculation period and calculating the actual change between the candidate target value at the current time and the candidate target value at the previous time period; when the actual change is less than or equal to the maximum permissible change, the current candidate target value is determined as the smooth target value; when the actual change is greater than the maximum permissible change, the maximum permissible change is determined as the smooth target value.
[0010] Furthermore, according to one aspect of the apparatus of this disclosure, the PID controller, based on a smoothing target value or a tracking signal, smooths the liquid level control by: when a smoothing target value is received, calculating the control deviation between the smoothing target value and the current liquid level measurement value; controlling the liquid level based on the control deviation; and when a tracking signal is received, maintaining the liquid level at the current liquid level measurement value.
[0011] According to another aspect of this disclosure, a liquid level control method is provided, the method comprising: sending a start command or a stop command to a switching module using a start / stop module; receiving the start command or stop command using the switching module, and selecting different control paths based on the start command or stop command; when the received command is a start command, sending an enable signal to a rate control module; the enable signal being used to transmit a smoothing target value output by the rate control module to a PID controller; when the received command is a stop command, sending a tracking signal to the PID controller; the tracking signal being used to determine the current liquid level measurement value as the smoothing target value; receiving the enable signal using the rate control module; determining the smoothing target value based on the enable signal, a preset rate limit value, and a preset liquid level target value, and sending the smoothing target value to the PID controller; and receiving the smoothing target value or the tracking signal using the PID controller, and smoothly controlling the liquid level based on the smoothing target value or the tracking signal.
[0012] According to another aspect of this disclosure, an electronic device is provided, comprising: a memory for storing computer-readable instructions; and a processor for executing the computer-readable instructions, causing the electronic device to perform the method as described in any embodiment of one aspect.
[0013] According to another aspect of this disclosure, a computer-readable storage medium is provided for storing computer-readable instructions that, when executed by a processor, cause the processor to perform the method as described in any embodiment of one aspect.
[0014] This disclosure provides a liquid level control device, method, apparatus, and storage medium. The disclosure includes a start / stop module for sending a start command or stop command to a switching module; a switching module for receiving the start command or stop command and selecting different control paths based on the start command or stop command; when the received command is a start command, an enable signal is sent to a rate control module; the enable signal is used to transmit the smoothing target value output by the rate control module to a PID controller; when the received command is a stop command, a tracking signal is sent to the PID controller; the tracking signal is used to determine the current liquid level measurement value as the smoothing target value; the rate control module is used to receive the enable signal; based on the enable signal, a preset rate limit value, and a preset liquid level target value, it determines the smoothing target value and sends the smoothing target value to the PID controller; the PID controller is used to receive the smoothing target value or the tracking signal and smoothly control the liquid level based on the smoothing target value or the tracking signal. In this way, compared to existing traditional DCS level control methods that rely on frequent manual adjustments of setpoints or manual valve regulation, this disclosure achieves automated and precise level control through the coordinated operation of a start / stop module, a switching module, a rate control module, and a PID controller, eliminating the need for frequent manual intervention. Specifically, this disclosure uses the start / stop module to send start or stop commands to the switching module. Upon receiving a start command, the switching module switches to the rate control path to control the rate control module. After receiving an enable signal, the rate control module uses the current level measurement as a basis, combined with a preset rate limit, to generate a continuous and stable smooth target value, avoiding abrupt changes and ensuring the smoothness of level adjustment. When a stop command is sent, the switching module uses the current level measurement as the setpoint, achieving seamless integration with subsequent control. Simultaneously, the PID controller outputs a stable adjustment signal based on the received smooth target value or tracking signal, maintaining a stable level. In summary, the technical solution provided by this disclosure offers high precision and stability in level control, adaptable to various application scenarios.
[0015] It should be understood that both the foregoing general description and the following detailed description are exemplary and intended to provide further illustration of the claimed technology. Attached Figure Description
[0016] The above and other objects, features, and advantages of this disclosure will become more apparent from the more detailed description of the embodiments thereof in conjunction with the accompanying drawings. The drawings are provided to further illustrate the embodiments of this disclosure and form part of the specification. They are used together with the embodiments of this disclosure to explain the disclosure and do not constitute a limitation thereof. In the drawings, the same reference numerals generally represent the same components or steps.
[0017] Figure 1 A structural block diagram of a liquid level control device provided in an embodiment of this disclosure; Figure 2 A schematic diagram illustrating the complete composition of the liquid level control device provided in the embodiments of this disclosure; Figure 3 A hardware block diagram of an electronic device provided in an embodiment of this disclosure; Figure 4 This is a schematic diagram of a computer-readable storage medium provided in an embodiment of this disclosure. Detailed Implementation
[0018] To make the objectives, technical solutions, and advantages of this disclosure more apparent, exemplary embodiments according to this disclosure will now be described in detail with reference to the accompanying drawings. Obviously, the described embodiments are merely some embodiments of this disclosure, and not all embodiments of this disclosure. It should be understood that this disclosure is not limited to the exemplary embodiments described herein.
[0019] Currently, most distributed control systems (DCS) rely on two methods for liquid level control: frequent manual adjustment of the setpoint or manual valve position adjustment. Frequent manual adjustment of the setpoint cannot achieve a smooth, uniform change, easily leading to abrupt changes in the setpoint and significant liquid level fluctuations. Manual valve position adjustment requires switching the control loop from automatic to manual mode, requiring operators to continuously monitor liquid level changes and fine-tune the valve opening to control fluid flow. This is cumbersome and prone to problems such as excessive liquid level due to inadequate monitoring or untimely adjustments. In summary, existing liquid level control methods have low accuracy, poor stability, and are difficult to adapt to various application scenarios.
[0020] Therefore, in response to the aforementioned problems, this disclosure provides a liquid level control device that, through the coordinated operation of a start / stop module, a switching module, a rate control module, and PID regulation, can achieve automated and precise liquid level control without the need for frequent manual intervention.
[0021] First, this disclosure provides a liquid level control device. Figure 1 A structural block diagram of a liquid level control device provided in an embodiment of this disclosure is shown below. Figure 1 As shown, the liquid level control device 100 includes: The start / stop module 101 is used to send start or stop commands to the switching module; The switching module 102 is used to receive start or stop commands and select different control paths based on the start or stop commands; when the received command is a start command, it sends an enable signal to the rate control module; the enable signal is used to transmit the smoothing target value output by the rate control module to the PID controller; when the received command is a stop command, it sends a tracking signal to the PID controller; the tracking signal is used to determine the current liquid level measurement value as the smoothing target value. The rate control module 103 is used to receive an enable signal; based on the enable signal, the preset rate limit value and the preset liquid level target value, it determines the smoothing target value and sends the smoothing target value to the PID controller. The PID controller 104 is used to receive a smoothing target value or a tracking signal, and to smoothly control the liquid level based on the smoothing target value or the tracking signal.
[0022] In this disclosure, the start / stop module can be understood as a control logic unit that generates and latches start / stop commands based on trigger conditions such as start button, stop button, liquid level reaching a set value, and switching to manual operation, through pulse signals, SR triggers, and logic OR operation mechanisms, and is responsible for the start / stop and status locking of the entire automatic liquid level raising and lowering function.
[0023] In this disclosure, the switching module can be understood as a control unit that implements path switching through a logic selection function block based on the instructions of the start / stop module: when a start instruction is received, the path between the rate control module and the PID regulator is opened, so that the smooth target value enters PID control; when a stop instruction is received, it switches to tracking the current liquid level measurement value to achieve bumpless switching and avoid step jumps in the liquid level setpoint.
[0024] In this disclosure, the rate control module can be understood as a control unit that takes the current liquid level measurement value as the initial value, combines the preset rate limit value and the target liquid level value, and generates a smooth target value with uniform and gradual change through data storage, division operation (time conversion) and rate limit algorithm. Its core function is to decompose the step target value into a slope change amount that meets the process requirements, so as to avoid drastic fluctuations in liquid level.
[0025] In this disclosure, the PID controller can be understood as a closed-loop control unit that receives a smoothing target value or a tracking signal, and outputs an adjustment signal based on the deviation between the set value and the current liquid level measurement value through proportional, integral, and derivative algorithms to control the action of the actuator. In automatic mode, it tracks the smoothing target value to achieve smooth adjustment, and in tracking mode, it maintains the current liquid level to ensure continuous control.
[0026] For example, Figure 2 A schematic diagram illustrating the complete liquid level control device provided in the embodiments of this disclosure. Figure 2 It can be seen that the whole consists of three parts: Start / Stop Module: Composed of start button pulse, stop button pulse, SR trigger, logic OR operation block, delay block and judgment block for liquid level equal to set value, it can realize dual trigger logic of one-key start / stop and automatic stop when liquid level reaches the target, and is also compatible with safe exit when switching between manual / automatic modes; Switching module: Through the logic selection function block, based on the status signal G of the start / stop module, it switches between the smooth target value output by the rate control module and the current liquid level measurement value, ensuring that the smooth rate path is followed when starting and the tracking path is followed when stopping, thus achieving seamless switching; Rate control module: The current liquid level and target value are cached in the data register block. The hourly rate is converted into the change at the system scan cycle level through division operation. The rate control module then constrains the rate and finally outputs a smooth target value that changes at a uniform and gradual speed, thus avoiding step changes in the set value from the root. The modules interact with each other through the current liquid level measurement value, pulse signal, status position, etc. Finally, the PID controller receives the smoothing target value or tracking signal to complete the precise and stable control of the liquid level.
[0027] The start / stop module of this disclosure will be described in detail below, including: The start / stop module acquires the start button signal and converts it into a first pulse signal; based on the first pulse signal, it sets the set / reset trigger SR in the start / stop module and generates a start command; or, The start / stop module acquires the stop button signal and / or the automatic stop signal and / or manual switch signal determined when the current liquid level measurement value meets the preset liquid level target value, and converts the stop button signal and / or automatic stop signal and / or manual switch signal into a second pulse signal; based on the second pulse signal, it resets SR and generates a stop command.
[0028] The start / stop module disclosed herein has a built-in pulse generation unit and a set-reset flip-flop (SR).
[0029] In one embodiment of this disclosure, when a first pulse signal generated by converting the start button signal is received, the SR flip-flop is triggered to set, and the start command state is locked at a high level. During the effective period of the start command, an enable signal is continuously output to the switching module, driving the rate control module to start operation, ensuring that the liquid level rise and fall process starts from the current measured value and smoothly approaches the target value at a preset rate until the liquid level stabilizes or a stop command is received.
[0030] In another embodiment of this disclosure, the start / stop module responds to any one of the following signals: a stop button signal, an automatic stop signal upon reaching the liquid level target, or a manual mode switching signal. It converts the signal into a second pulse signal and triggers the SR trigger to reset. Upon reset, the SR trigger immediately generates a stop command, cuts off the enable output to the rate control module, and sends a tracking switching signal to the switching module. This causes the PID controller to immediately switch to the mode that tracks the current liquid level measurement value, achieving seamless switching of the control loop and ensuring that the liquid level remains stable without overshoot.
[0031] For example, from Figure 2 As can be seen, the start / stop module is specifically composed of a universal / numerical (UTILITY) block, a logic (LOGIC) block, a pulse (PULSE) block, and a set / reset trigger (SR). The start button signal is processed by the PULSE block to generate an anti-bounce pulse, which is then sent to the LOGIC block for condition judgment, setting the SR trigger to generate a start command. The stop button signal, the liquid level equal to the target value signal, and the manual switch signal converge in a logic OR circuit, and after pulse conversion, the SR trigger is reset. Each signal terminal corresponds to the button input, the current measurement value input, and the mode status input, respectively. Through internal logic operations, the start / stop control command is accurately output, fully realizing multiple control logics for manual operation, automatic stop, and safe exit.
[0032] The following will describe in detail the switching module of this disclosure, including: The switching module is connected to the rate control module on one side and the PID controller on the other side. When the switching module receives a start command, it sends an enable signal to the rate control module and, based on the logic selection function block within the switching module, inputs the smooth target value determined by the rate control module based on the enable signal to the PID regulator. When the switching module receives a stop command, it selects a logic function block and inputs the tracking signal to the PID controller.
[0033] In one embodiment of this disclosure, when the switching module receives a start command sent by the start / stop module, the enable signal becomes valid, and the logic selection function block in the switching module switches the signal path to the output of the rate control module. The smooth target value obtained by the rate control module after processing by ramp constraint, gradient algorithm or low-pass filtering algorithm is connected to the PID controller, so that the PID controller performs closed-loop regulation with the smooth and gradual target value as the given signal, thereby avoiding step fluctuations in the liquid level.
[0034] In another embodiment of this disclosure, when the switching module receives a stop command sent by the start / stop module, the enable signal is disabled, and the logic selection function block in the switching module switches the signal path to the tracking signal terminal, directly inputting the current liquid level measurement value as the tracking signal into the PID controller, so that the PID controller uses the current actual liquid level as the setpoint to achieve disturbance-free switching and ensure the continuous and stable liquid level control process.
[0035] For example, as can be seen from Figure 2, the switching module is mainly composed of a logic selection function block. Its input terminal is connected to the output signal of the rate control module and the current liquid level measurement signal, respectively. The control terminal is connected to the start and stop command output by the start and stop module. The output terminal is directly connected to the given input terminal of the PID controller. According to the different states of the start and stop command, the path is selected between the smooth target value and the tracking signal, thereby realizing the reliable switching between the two control paths.
[0036] The rate control module of this disclosure will be described in detail below, including: When the rate control module receives the enable signal, it acquires the current liquid level measurement value, the preset rate limit value, and the preset liquid level target value. Based on the difference between the current liquid level measurement value and the preset liquid level target value, a candidate target value is generated using a gradient algorithm or a low-pass filtering algorithm. The candidate target value is corrected by slope gradient constraint using a preset rate limit value to obtain a smooth target value.
[0037] In this disclosure, the gradient algorithm or low-pass filtering algorithm can be understood as an algorithm for smoothing the target liquid level value, used to weaken the step characteristics caused by abrupt changes in the difference, making the change trend of the candidate target value more gradual, and avoiding a direct jump to the target value. Specific gradient algorithms or low-pass filtering algorithms can be found in existing technologies, and will not be elaborated here.
[0038] In this disclosure, the gradual slope constraint can be understood as a constraint rule that limits the change range of the candidate target value according to a preset rate upper limit, so that the target value gradually approaches the preset liquid level target value according to a uniform and gentle slope curve. The gradual slope constraint of this disclosure includes at least one of the following: rising slope constraint, falling slope constraint, and bidirectional slope constraint. Among them, the rising slope constraint is used to limit the rate of change during the liquid level rise process, the falling slope constraint is used to limit the rate of change during the liquid level fall process, and the bidirectional slope constraint simultaneously limits the rates of liquid level rise and fall.
[0039] Specifically, when the rate control module controls the rate, it may include: using the current liquid level measurement value as the initial reference, determining the target change direction and total change amplitude according to the preset liquid level target value, generating continuously changing candidate target values through gradient algorithm or low-pass filtering algorithm, and constraining the change of candidate target values according to the preset rate limit value in each control cycle to ensure that the target value change in each cycle does not exceed the allowable range, thereby forming a continuous, stable, and smooth target value sequence without sudden changes.
[0040] For example, as can be seen from Figure 2, the rate control module mainly consists of a numerical calculation unit, a rate of change limiting unit, and a cycle timing unit. It can receive the current liquid level measurement value, the preset rate limit value, and the preset liquid level target value. When the enable signal is valid, it can calculate and output a smooth target value step by step according to the control cycle, convert the step-like target value into a ramp-like gradual signal, and then output it to the switching module and the PID controller.
[0041] Furthermore, this disclosure also describes how to use a preset rate limit value to perform slope gradient constraint correction on candidate target values to obtain smooth target values, including: Based on a preset rate limit, the maximum permissible change in liquid level per unit time is determined. The maximum permissible change in liquid level includes: the maximum permissible change in rise, the maximum permissible change in fall, and the maximum permissible change in both directions. Among them, the maximum permissible change in rise is determined based on the rise slope constraint; the maximum permissible change in fall is determined based on the fall slope constraint; and the maximum permissible change in both directions is determined based on the two-way slope constraint. Determine the calculation period and calculate the actual change between the candidate target value at the current moment and the candidate target value at the previous moment; When the actual change is less than or equal to the maximum allowable change, the current candidate target value is determined as the smoothing target value; When the actual change exceeds the maximum permissible change, the maximum permissible change is determined as the smoothing target value.
[0042] In this disclosure, the maximum permissible change in liquid level can be understood as the maximum allowable adjustment of the target liquid level value within a single calculation cycle. It is a threshold calculated by combining a preset rate limit with the calculation cycle, used to ensure smooth liquid level changes without exceeding the process allowable range. Different slope constraints correspond to different maximum permissible changes in different directions, and the rate limits for rising, falling, or bidirectional changes can be configured according to actual process requirements, improving control flexibility.
[0043] In this disclosure, the actual change can be understood as the actual increase or decrease of the current period's candidate target value relative to the previous period's candidate target value, reflecting the natural degree of change of the target value when no constraints are applied.
[0044] Specifically, when determining the smoothing target value, the following can be included: in each calculation cycle, first calculate the actual change of the candidate target value, and then compare it with the maximum allowable change of liquid level in the corresponding direction. If the actual change does not exceed the limit, the current candidate target value is directly adopted. If the actual change exceeds the limit, the target value is limited and corrected according to the maximum allowable change, so that the final output smoothing target value always gradually approaches the preset liquid level target value in a uniform and smooth manner, avoiding step jumps and violent fluctuations.
[0045] The following section will elaborate on the PID controller, including: When a smoothing target value is received, the control deviation between the smoothing target value and the current liquid level measurement value is calculated; the liquid level is controlled based on the control deviation. When a tracking signal is received, maintain the liquid level at the current measured value.
[0046] In this disclosure, control deviation can be understood as the difference between the smoothing target value and the current liquid level measurement value. It is the basis for the PID controller to perform closed-loop regulation and is used to reflect the degree of deviation between the current liquid level and the target liquid level.
[0047] Specifically, when performing liquid level control, the PID controller can include: based on the calculated control deviation, outputting the corresponding control quantity through a proportional, integral, and derivative composite control algorithm to drive the actuator to reduce the deviation and make the current liquid level measurement value smoothly track the target value; when a tracking signal is received, directly using the current liquid level measurement value as the setpoint, so that the controller can quickly enter the non-disturbance tracking state, maintain the liquid level stability and prevent sudden changes.
[0048] This disclosure provides a liquid level control method, the method comprising: The start / stop module sends start or stop commands to the switching module. The switching module receives start or stop commands and selects different control paths based on these commands. When the received command is a start command, an enable signal is sent to the rate control module. The enable signal is used to transmit the smoothing target value output by the rate control module to the PID controller. When the received command is a stop command, a tracking signal is sent to the PID controller. The tracking signal is used to determine the current liquid level measurement value as the smoothing target value. The rate control module receives the enable signal; based on the enable signal, the preset rate limit value, and the preset liquid level target value, the smoothing target value is determined and sent to the PID controller; The PID controller receives a smoothing target value or a tracking signal, and controls the liquid level smoothly based on the smoothing target value or tracking signal.
[0049] Figure 3 This is a hardware block diagram of an electronic device provided according to an embodiment of the present disclosure. The electronic device 300 according to an embodiment of the present disclosure includes at least a processor and a memory for storing computer-readable instructions. When the computer-readable instructions are loaded and executed by the processor, the processor performs the liquid level control method described in any of the preceding embodiments of the present disclosure.
[0050] Figure 3The illustrated electronic device 300 specifically includes a central processing unit (CPU) 301, a graphics processing unit (GPU) 302, and a memory 303. These units are interconnected via a bus 304. The CPU 301 and / or GPU 302 can function as the aforementioned processor, and the memory 303 can function as the aforementioned memory storing computer-readable instructions. Furthermore, the electronic device 300 may also include a communication unit 305, a storage unit 306, an output unit 307, an input unit 308, and an external device 309, all of which are also connected to the bus 304.
[0051] Figure 4 This is a schematic diagram of a computer-readable storage medium provided in an embodiment of this disclosure. (As shown...) Figure 4 As shown, a computer-readable storage medium 400 according to an embodiment of the present disclosure stores computer-readable instructions 401 thereon. When the computer-readable instructions 401 are executed by a processor, the liquid level control method described with reference to the above figures according to any embodiment of the present disclosure is performed. The computer-readable storage medium includes, but is not limited to, volatile memory and / or non-volatile memory. Volatile memory may include, for example, random access memory (RAM) and / or cache memory. Non-volatile memory may include, for example, read-only memory (ROM), hard disk, flash memory, optical disk, magnetic disk, etc.
[0052] In summary, this disclosure provides a liquid level control device, method, apparatus, and storage medium. This disclosure includes a start / stop module for sending a start command or stop command to a switching module; a switching module for receiving the start command or stop command and selecting different control paths based on the start command or stop command; when the received command is a start command, an enable signal is sent to the rate control module; the enable signal is used to transmit the smoothing target value output by the rate control module to the PID controller; when the received command is a stop command, a tracking signal is sent to the PID controller; the tracking signal is used to determine the current liquid level measurement value as the smoothing target value; the rate control module is used to receive the enable signal; based on the enable signal, a preset rate limit value, and a preset liquid level target value, it determines the smoothing target value and sends the smoothing target value to the PID controller; the PID controller is used to receive the smoothing target value or the tracking signal and smoothly control the liquid level based on the smoothing target value or the tracking signal. In this way, compared to existing traditional DCS level control methods that rely on frequent manual adjustments of setpoints or manual valve regulation, this disclosure achieves automated and precise level control through the coordinated operation of a start / stop module, a switching module, a rate control module, and a PID controller, eliminating the need for frequent manual intervention. Specifically, this disclosure uses the start / stop module to send start or stop commands to the switching module. Upon receiving a start command, the switching module switches to the rate control path to control the rate control module. After receiving an enable signal, the rate control module uses the current level measurement as a basis, combined with a preset rate limit, to generate a continuous and stable smooth target value, avoiding abrupt changes and ensuring the smoothness of level adjustment. When a stop command is sent, the switching module uses the current level measurement as the setpoint, achieving seamless integration with subsequent control. Simultaneously, the PID controller outputs a stable adjustment signal based on the received smooth target value or tracking signal, maintaining a stable level. In summary, the technical solution provided by this disclosure offers high precision and stability in level control, adaptable to various application scenarios.
[0053] Those skilled in the art will recognize that the units and algorithm steps of the various examples described in conjunction with the embodiments disclosed herein can be implemented in electronic hardware, or a combination of computer software and electronic hardware. Whether these functions are implemented in hardware or software depends on the specific application and design constraints of the technical solution. Those skilled in the art can use different methods to implement the described functions for each specific application, but such implementation should not be considered beyond the scope of this disclosure.
[0054] The basic principles of this disclosure have been described above with reference to specific embodiments. However, it should be noted that the advantages, benefits, and effects mentioned in this disclosure are merely examples and not limitations, and should not be considered as essential features of each embodiment of this disclosure. Furthermore, the specific details disclosed above are for illustrative and facilitative purposes only, and are not limitations. These details do not limit the scope of this disclosure to the necessity of employing the aforementioned specific details for implementation.
[0055] The block diagrams of devices, apparatuses, devices, and systems disclosed herein are merely illustrative examples and are not intended to require or imply that they must be connected, arranged, or configured in the manner shown in the block diagrams. As those skilled in the art will recognize, these devices, apparatuses, devices, and systems can be connected, arranged, and configured in any manner. Words such as “comprising,” “including,” “having,” etc., are open-ended terms meaning “including but not limited to,” and are used interchangeably with them. The terms “or” and “and” as used herein refer to the terms “and / or,” and are used interchangeably with them unless the context clearly indicates otherwise. The term “such as” as used herein refers to the phrase “such as but not limited to,” and is used interchangeably with it.
[0056] Additionally, as used herein, the "or" used in a list of items beginning with "at least one" indicates a separate list, such that a list of, for example, "at least one of A, B, or C" means A or B or C, or AB or AC or BC, or ABC (i.e., A and B and C). Furthermore, the word "exemplary" does not imply that the described example is preferred or better than other examples.
[0057] It should also be noted that in the systems and methods of this disclosure, the components or steps can be decomposed and / or recombined. These decompositions and / or recombinations should be considered as equivalent solutions to this disclosure.
[0058] Various changes, substitutions, and modifications can be made to the technology described herein without departing from the teachings defined by the appended claims. Furthermore, the scope of the claims of this disclosure is not limited to the specific aspects of the processes, machines, manufactures, events, means, methods, and actions described above. Currently existing or later-developed processes, machines, manufactures, events, means, methods, or actions that perform substantially the same function or achieve substantially the same result as the corresponding aspects described herein can be utilized. Therefore, the appended claims include such processes, machines, manufactures, events, means, methods, or actions within their scope.
[0059] The above description of the disclosed aspects is provided to enable any person skilled in the art to make or use this disclosure. Various modifications to these aspects will be readily apparent to those skilled in the art, and the general principles defined herein may be applied to other aspects without departing from the scope of this disclosure. Therefore, this disclosure is not intended to be limited to the aspects shown herein, but rather to be carried out within the widest scope consistent with the principles and novel features disclosed herein.
[0060] The above description has been given for purposes of illustration and description. Furthermore, this description is not intended to limit the embodiments of this disclosure to the forms disclosed herein. Although numerous exemplary aspects and embodiments have been discussed above, those skilled in the art will recognize certain variations, modifications, alterations, additions, and sub-combinations therein.
Claims
1. A liquid level control device, characterized in that, The device includes: The start / stop module is used to send start or stop commands to the switching module; The switching module is used to receive the start command or stop command, and select different control paths based on the start command or stop command; when the received command is the start command, it sends an enable signal to the rate control module; the enable signal is used to transmit the smoothing target value output by the rate control module to the PID controller; when the received command is the stop command, it sends a tracking signal to the PID controller; the tracking signal is used to determine the current liquid level measurement value as the smoothing target value. The rate control module is used to receive the enable signal; determine the smoothing target value based on the enable signal, the preset rate limit value and the preset liquid level target value, and send the smoothing target value to the PID controller; The PID controller is used to receive the smoothing target value or the tracking signal, and to smoothly control the liquid level based on the smoothing target value or the tracking signal.
2. The apparatus according to claim 1, characterized in that, The start / stop module acquires the start button signal and converts the start button signal into a first pulse signal; based on the first pulse signal, it sets the set / reset trigger SR in the start / stop module to generate the start command; or, The start / stop module acquires the stop button signal and / or the automatic stop signal and / or manual switch signal determined when the current liquid level measurement value meets the preset liquid level target value, and converts the stop button signal and / or the automatic stop signal and / or manual switch signal into a second pulse signal; based on the second pulse signal, it resets the SR and generates the stop command.
3. The apparatus according to claim 1, characterized in that, The switching module is connected to the rate control module on one side and to the PID regulator on the other side. When the instruction received by the switching module is the start instruction, the enable signal is sent to the rate control module, and based on the logic selection function block in the switching module, the smoothing target value determined by the rate control module based on the enable signal is input to the PID regulator. When the switching module receives the stop instruction, it inputs the tracking signal to the PID controller based on the logic selection function block.
4. The apparatus according to claim 1, characterized in that, When the rate control module receives the enable signal, it acquires the current liquid level measurement value, the preset rate limit value, and the preset liquid level target value. Based on the difference between the current liquid level measurement value and the preset liquid level target value, a candidate target value is generated using a gradient algorithm or a low-pass filtering algorithm. The candidate target value is corrected by a slope gradient constraint using the preset rate limit value to obtain the smooth target value.
5. The apparatus according to claim 5, characterized in that, The slope gradient constraint includes at least one of the following: ascending slope constraint, descending slope constraint, and bidirectional slope constraint.
6. The apparatus according to claim 5, characterized in that, The step of applying the preset rate limit value to the candidate target value with a ramp gradient constraint to obtain the smooth target value includes: Based on the preset rate limit value, the maximum permissible change in liquid level per unit time is determined; the maximum permissible change in liquid level includes: the maximum permissible change in rise, the maximum permissible change in fall, and the maximum permissible change in both directions; wherein, the maximum permissible change in rise is determined based on the rise slope constraint; the maximum permissible change in fall is determined based on the fall slope constraint; and the maximum permissible change in both directions is determined based on the two-way slope constraint. Determine the calculation period and calculate the actual change between the candidate target value at the current moment and the candidate target value at the previous moment; When the actual change is less than or equal to the maximum allowable change, the current candidate target value is determined as the smoothing target value; When the actual change is greater than the maximum allowable change, the maximum allowable change is determined as the smoothing target value.
7. The apparatus according to claim 1, characterized in that, The PID controller, based on the smoothing target value or the tracking signal, smooths the liquid level control by including: When the smoothing target value is received, the control deviation between the smoothing target value and the current liquid level measurement value is calculated; the liquid level is controlled based on the control deviation. When the tracking signal is received, the liquid level is maintained at the current liquid level measurement value.
8. A liquid level control method, characterized in that, The method includes: The start / stop module sends start or stop commands to the switching module. The switching module receives the start command or stop command and selects different control paths based on the start command or stop command. When the received command is the start command, an enable signal is sent to the rate control module. The enable signal is used to transmit the smoothing target value output by the rate control module to the PID controller. When the received command is the stop command, a tracking signal is sent to the PID controller. The tracking signal is used to determine the current liquid level measurement value as the smoothing target value. The rate control module receives the enable signal; based on the enable signal, the preset rate limit value, and the preset liquid level target value, the smoothing target value is determined and sent to the PID controller; The PID controller receives the smoothing target value or the tracking signal, and controls the liquid level smoothly based on the smoothing target value or the tracking signal.
9. An electronic device, characterized in that, include: Memory, used to store computer-readable instructions; as well as A processor for executing the computer-readable instructions, causing the electronic device to perform the method as described in claim 8.
10. A computer-readable storage medium for storing computer-readable instructions, characterized in that, When the computer-readable instructions are executed by a processor, the processor performs the method as described in claim 8.