Control method, controller, electronic equipment and storage medium
By adding an optimization module and a proportional integral differential control module to the PID controller, the measured values of the controlled object are obtained and optimized to obtain the operation values of the operating objects, the problems of hysteresis and slow response in the chlorammonia process are solved, and the regulation accuracy and stability are improved.
Patent Information
- Application Number
- CN202510216900.8
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2025-02-25
- Publication Date
- 2025-05-30
AI Technical Summary
The existing PID controllers cannot meet the requirements of precise regulation in the chlorammonia process, especially because the hydrogen and nitrogen ratio of the synthesis gas has a long lag time and slow response, which makes it difficult to respond in a timely manner to adjust the output, which easily causes fluctuations in the process.
By obtaining the current measured value of the controlled object, optimizing it according to the preset control parameters, obtaining the current optimized value, and then obtaining the current operation value of the operation object based on the current optimization value. This method adds an optimization module and a proportional integral differential control module to the classic PID controller to form an improved PID controller.
Even if the controlled object has the characteristics of hysteresis and slow response, this method can improve the control accuracy of the controlled object, reduce incorrect adjustment output, avoid causing greater impact on the system, and significantly improve the control effect of the chlorammonia process.
Smart Images

Figure CN120065739A_ABST
Abstract
Description
Technical Field
[0001] The embodiments of the present application relate to the technical field of DCS control, and particularly to a control method, a controller, an electronic device, and a storage medium. Background Art
[0002] Currently, green ammonia is a production process that is affected by the wind. During the green ammonia production process, there are some process objects with long lag times and slow dynamic responses. In order to regulate such objects in the green ammonia production process, in the related art, a conventional PID (Proportional Integral Derivative) controller is used for feedback regulation. The PID controller is a control module in a DCS (Distributed Control System).
[0003] However, the current feedback control method of the PID controller cannot meet the requirements of precise regulation of the current green ammonia process. Summary of the Invention
[0004] The purpose of the embodiments of the present application is to provide a control method, a controller, an electronic device, and a storage medium, so as to improve the accuracy of regulating a controlled object even if the controlled object has characteristics such as hysteresis and slow response.
[0005] To solve the above technical problems, an embodiment of the present application provides a control method, including: obtaining a current measurement value of a controlled object; optimizing the current measurement value according to preset control parameters to obtain a current optimized value of the controlled object; and obtaining a current operation value of an operation object according to the current optimized value.
[0006] An embodiment of the present application also provides a controller, including: an optimization module and a proportional integral derivative control module; the optimization module is configured to optimize the current measurement value according to preset control parameters after obtaining the current measurement value of the controlled object to obtain a current optimized value of the controlled object; the proportional integral derivative control module is configured to obtain a current operation value of the operation object according to the current optimized value after obtaining the current optimized value.
[0007] An embodiment of the present application also provides an electronic device, including: at least one processor; and a memory communicatively connected to the at least one processor; wherein, the memory stores instructions executable by the at least one processor, and the instructions are executed by the at least one processor so that the at least one processor can execute the control method as described above.
[0008] An embodiment of the present application further provides a computer storage medium, including: storing a computer program, which when executed by a processor implements the control method as described above.
[0009] The technical solution provided by the embodiment of the present application has at least the following advantages:
[0010] In the present application, the current measured value of the controlled object is obtained; the current measured value is optimized according to the preset control parameters to obtain the current optimized value of the controlled object; then, the current operation value of the operating object is obtained according to the current optimized value; that is, the current measured value is first optimized to obtain the current optimized value, and then the current operation value of the operating object is obtained according to the current optimized value, so that even if the controlled object has the characteristics of hysteresis and slow response, the accuracy of controlling the controlled object can be improved. BRIEF DESCRIPTION OF THE DRAWINGS
[0011] One or more embodiments are illustrated by way of example in the accompanying drawings, and these exemplary illustrations do not limit the embodiments. Elements with the same reference numerals in the drawings are represented as similar elements, unless otherwise stated, and the drawings in the figures do not constitute a proportional limitation.
[0012] Figure 1 is a schematic flow chart of a control method according to an embodiment of the present application;
[0013] Figure 2 is a schematic flow chart of the ammonia synthesis process of the green ammonia process according to an embodiment of the present application;
[0014] Figure 3 is a schematic structural diagram of an improved PID controller according to an embodiment of the present application;
[0015] Figure 4 is a schematic comparison diagram of the program flow of the classical PID controller and the program flow of the improved PID controller of the present embodiment;
[0016] Figure 5 is a schematic structural diagram of an optimization module according to an embodiment of the present application;
[0017] Figure 6 is a schematic flow chart of each sub-step of step 102 in the control method according to an embodiment of the present application;
[0018] Figure 7 is a schematic specific operation flow chart of the control method according to an embodiment of the present application;
[0019] Figure 8 is the control effect diagram of the classical PID controller for the hydrogen-nitrogen ratio of fresh gas and the hydrogen-nitrogen ratio of syngas;
[0020] Figure 9It is the control effect diagram of the improved PID controller in this embodiment for the hydrogen-nitrogen ratio of fresh gas and the hydrogen-nitrogen ratio of syngas;
[0021] Figure 10 It is a schematic structural diagram of an electronic device according to an embodiment of the present application. Detailed implementation manners
[0022] As can be seen from the background art, the feedback control method of the existing PID controller cannot meet the requirements of precise regulation of the current green ammonia process.
[0023] Through analysis and research, it is found that in the existing green ammonia process, the PID controller obtains the hydrogen-nitrogen ratio of syngas and the hydrogen-nitrogen ratio of fresh gas, takes the hydrogen-nitrogen ratio of syngas and the hydrogen-nitrogen ratio of fresh gas as the input of the PID controller, and after proportional-integral-derivative calculation, obtains the target hydrogen-nitrogen ratio of fresh gas; however, since the existing PID controller is a pure feedback control strategy, in the process of green ammonia production, after the target hydrogen-nitrogen ratio of fresh gas is adjusted, the hydrogen-nitrogen ratio of syngas will change after a period of time, that is, the hydrogen-nitrogen ratio of syngas has the characteristics of long lag time and slow response. Therefore, relying solely on the adjustment output of the feedback PID controller cannot respond to the controlled object in time, and the controller is prone to incorrect adjustment actions, making it difficult to achieve the ideal control effect, and even causing greater fluctuations in the process, resulting in poor accuracy of the green ammonia process regulation.
[0024] To solve the above technical problems, the present application obtains the current measured value (PV) of the controlled object; optimizes the current measured value according to the preset control parameters to obtain the current optimized value (PVCrt) of the controlled object; then, obtains the current operating value of the operating object according to the current optimized value (PVCrt); that is, first optimizes the current measured value to obtain the current optimized value, and then obtains the current operating value of the operating object according to the current optimized value (PVCrt), so as to improve the accuracy of regulating the controlled object even if the controlled object has the characteristics of lag and slow response.
[0025] To make the objectives, technical solutions, and advantages of the embodiments of the present application clearer, the embodiments of the present application will be described in detail below with reference to the accompanying drawings. However, those of ordinary skill in the art can understand that in the embodiments of the present application, many technical details are proposed for the convenience of readers to understand the present application. However, even without these technical details and various changes and modifications based on the following embodiments, the technical solutions required to be protected by the present application can still be realized. The following division of each embodiment is for the convenience of description and should not constitute any limitation to the specific implementation manner of the present application. Each embodiment can be combined and cross-referenced with each other on the premise of not conflicting.
[0026] An embodiment of the present application relates to a control method, and the specific process schematic diagram is asFigure 1 As shown in the figure, the control method of this embodiment includes the following steps:
[0027] Step 101: Obtain the current measured value of the controlled object.
[0028] Step 102: Optimize the current measured value according to the preset control parameters to obtain the current optimized value (PVCrt) of the controlled object.
[0029] Step 103: Obtain the current operation value of the operating object according to the current optimized value.
[0030] For the convenience of description, this embodiment takes the green ammonia process as an example. In actual applications, the control method of this embodiment can be applied to other processes, and this embodiment does not make specific limitations.
[0031] Taking the green ammonia process as an example, the controlled object is the hydrogen-nitrogen ratio of the syngas in the green ammonia process, and the operating object is the hydrogen-nitrogen ratio of the fresh gas in the green ammonia process. As Figure 2 shown, it is a schematic diagram of the ammonia synthesis process of the green ammonia process. The green ammonia process includes a fresh gas compression and buffer system and an ammonia synthesis system. The input end of the fresh gas compression and buffer system is the upstream. Nitrogen from the upstream nitrogen production process and hydrogen from the water electrolysis process are mixed in a certain ratio to form a fresh gas and input into the fresh gas compression and buffer system. The input end of the fresh gas compression and buffer system is A1. The fresh gas at A1 is used as the operating object, and AC101 represents the hydrogen-nitrogen ratio of the fresh gas, which is used as the current operation value of the operating object. After the fresh gas is compressed to the specified pressure by the fresh gas compression and buffer system, it is output. Its output end is mixed with the unreacted recycle gas in the ammonia synthesis system and enters the ammonia synthesis tower for reaction. The generated reaction gas is cooled and separated by the cooling system. After the gaseous ammonia is cooled into liquid ammonia products, it is output from the ammonia synthesis system. Among them, the mixing point of the fresh gas at the output end of the fresh gas compression and buffer system and the unreacted recycle gas is A2. The fresh gas and the unreacted recycle gas are mixed to form syngas. The syngas at A2 is the controlled object, and AC102 is the hydrogen-nitrogen ratio of the syngas, which is the current measured value of the controlled object.
[0032] Since the hydrogen required for synthesizing green ammonia comes from the electrolytic cell, and the power supply of the electrolytic cell comes from the fan and photovoltaic, due to the unstable and intermittent characteristics of the wind and solar energy, this causes the load of the green ammonia production process to change frequently. The measurement points of the hydrogen-nitrogen ratio of the fresh gas and the hydrogen-nitrogen ratio of the syngas are far apart, and the influence of the recycle gas makes the control of the hydrogen-nitrogen ratio of the syngas have the characteristics of large lag and slow dynamic response, and it is difficult to control by the conventional PID control loop.
[0033] Therefore, the execution entity of this embodiment is a controller, specifically an improved PID controller. As Figure 3As shown, it is a structural schematic diagram of the improved PID controller corresponding to the present embodiment. The improved PID controller comprises an optimization module 10 and a proportional-integral-differential control module 20. The optimization module 10 is used to obtain the current measurement value of the controlled object, and after obtaining the current measurement value PV of the controlled object, optimize the current measurement value according to preset control parameters to obtain the current optimized value PVCrt of the controlled object; the proportional-integral-differential control module 20 is used to obtain the current optimized value PVCrt of the controlled object, and after obtaining the current optimized value PVCrt of the controlled object, obtain the current operation value of the operation object according to the current optimized value PVCrt, so that the operation object operates according to the current operation value.
[0034] That is, the present application improves the classic PID controller by adding an optimization module 10 to the classic PID controller. The function of the proportional integral differential control module 20 is similar to that of the traditional PID controller, wherein the optimization module 10 is used to optimize the current measurement value according to the preset control parameters to obtain the current optimization value PVCrt of the controlled object. The current optimization value PVCrt is the predicted hydrogen-nitrogen ratio of the synthesis gas at A2 after a period of time, that is, the measurement value of the controlled object. The current optimization value PVCrt is input to the proportional integral differential control module 20, and the current operation value of the operation object, that is, the hydrogen-nitrogen ratio of the fresh gas at A1, is calculated by the preset proportional integral differential control algorithm. After that, the proportional integral differential control module outputs the current operation value, so that the hydrogen-nitrogen ratio of the fresh gas at A1 is updated to the current operation value. The current operation value also needs a period of time to control the hydrogen-nitrogen ratio of the synthesis gas at A2, so that the hydrogen-nitrogen ratio of the synthesis gas at A2 at this time just matches the previously predicted time point. Even if the distance between the measurement points of the fresh gas hydrogen-nitrogen ratio and the synthesis gas hydrogen-nitrogen ratio is far, the accuracy of the control of the controlled object can be improved.
[0035] like Figure 4 As shown, it is a schematic diagram comparing the program flow of the classic PID controller and the program flow of the improved PID controller of this embodiment. The program flow of the classic PID controller is to obtain the current measurement value of the controlled object, that is, the measurement transmission element, and the measurement transmission element and the current operation value, that is, the control target, are input into the PID controller together. The PID controller calculates the deviation between the control target and the current value, and performs proportional, integral, and differential calculations to obtain the final operation value, updates the operation value of the operation object, and controls the output to the controlled object, thereby adjusting the measurement value of the controlled object. However, the reference for calculating the adjustment output selection of the classic PID controller is the deviation between the current measurement value PV of the controlled object and a set value, which is a pure feedback adjustment process, and it is difficult to achieve an ideal control effect, and even cause greater fluctuations in the process.
[0036] In the improved PID controller program flow of this embodiment, a function of optimizing and calculating the current value is added. As shown by "1" marked in the figure, namely "optimizing and calculating the current value", it is equivalent to adding an optimization module in the PID controller. The functions of the original PID controller are retained, and the functions of the original PID controller are defined as a proportional-integral-derivative control module, which is used to calculate the current operation value of the operation object through the proportional-integral-derivative control algorithm. Specifically, the current operation value of the operation object is obtained through the set value SV and the current optimized value PVCrt of the proportional-integral-derivative control module. The optimization module records the historical output increments within a finite time domain in the past and the historical measurement values of the controlled object, and uses the optimization calculation to calculate the current optimized value according to the current measurement value and send it to the PID controller. The characteristics of fast adjustment of the PID controller are retained, while the accuracy of the feedback input of the PID controller is improved, the incorrect adjustment output is reduced, and a greater impact on the system is also avoided.
[0037] Specifically, the preset control parameters of this embodiment at least include: gain Gain, historical time domain length PT, weight Wt, optimization deviation MC; the gain Gain is the change amount of the measurement value of the controlled object from the change to the stable state when the operation object moves one unit; the historical time domain length PT is the time used for the measurement value of the controlled object to change from the change to the stable state when the operation object moves one unit; the weight Wt is the correction intensity of the influence of the operation object historical increment within the preset historical time domain length on the current measurement value of the controlled object; the optimization deviation MC is the maximum allowable deviation between the current optimized value and the current measurement value.
[0038] As Figure 5 shown, it is the structural schematic diagram of the optimization module of this embodiment. The optimization module includes multiple input terminals. Among them, four input terminals respectively correspond to the preset control parameters of gain Gain, historical time domain length PT, weight Wt, and optimization deviation MC. One input terminal is used to receive the current measurement value PV of the controlled object, and one input terminal is an initialization switch Init, which is the controller initialization switch and is used for initializing the optimization. The optimization module must be initialized before calculating the optimized current value. The purpose of initialization is to obtain some historical data, including multiple historical measurement values of the controlled object within a period of time and multiple historical output increments of the operation object, so as to generate an array PV[.] of historical measurement values of the controlled object and an array Move[.] of historical output increments stored inside the optimization module according to the historical time domain length PT after the historical time domain length PT is determined. Among them, without modifying the set historical time domain length PT, the initialization is only executed once.
[0039] The optimization module also has an input terminal for the controller switch SW, which is used to turn on or off the controller. The optimization module also includes two output terminals. One output terminal is used to output the initialization status IntSTS, indicating whether the current controller has successfully executed the initialization, and the other output terminal is used to output the current optimized value PVCrt after the optimization calculation.
[0040] Specifically, before the optimization module performs the optimization calculation, input checks are first performed on each input terminal. The purpose of the input check is to check whether the pin parameters of each input segment given by the user are reasonable. If they are not reasonable, the optimization module does not perform the control output calculation.
[0041] Specifically, the flow diagram of each sub-step of step 102 above is as Figure 6 shown. Step 102 is to optimize the current measured value according to the preset control parameters to obtain the current optimized value of the controlled object, including the following sub-steps:
[0042] Step 1021, initialize the historical output increment array of the operation object and the historical measured value array of the controlled object according to the historical time domain length.
[0043] Specifically, after the historical time domain length is determined, the optimization module of the controller initializes the historical output increment array Move[.] of the operation object and the historical measured value array PV[.] of the controlled object according to the historical time domain length. The historical output increment array Move[.] represents the historical output increment of the operation object within the historical time domain length, that is, an array with a length of the historical time domain length and storing the historical output increment of the operation object. The historical measured value array PV[.] represents the historical measured value of the controlled object within the historical time domain length, that is, an array with a length of the historical time domain length and storing the historical measured value of the controlled object. Among them, Move[.] = [M1, M2, M3,..., Mn], PV[.] = [P1, P2, P3,..., Pn], and M1, M2, M3,..., Mn respectively represent the output increment of the operation object in the nth period within the historical time domain length, and P1, P2, P3,..., Pn respectively represent the measured value of the controlled object in the nth period within the historical time domain length.
[0044] Step 1022, obtain the initial optimized value according to the gain, historical output increment array, historical measured value array, weight, and current measured value.
[0045] Specifically, after obtaining the historical output increment array Move[.] and the historical measured value array PV[.] stored in the optimization module, the initial optimized value PVbf of the current value is calculated in combination with the weight Wt and the current measured value PV of the controlled object. Then, according to the initial optimized value PVbf and the optimization deviation MC, the current optimized value PVCrt of the final optimization calculation is output.
[0046] Among them, the specific calculation formula for obtaining the initial optimization value PVbf is: PVbf = [P 1 +Gain*(M 1 +M 2 +M 3 +…+Mn)]*Wt+(1-Wt)*PV, that is, first calculate the product of the sum of all increments in the historical output increment array Move[.] and the gain Gain, add the first measurement value P 1 (i.e., the measurement value with the earliest time) in the historical measurement value array PV[.] to the product, then multiply by the weight Wt, and multiply the current measurement value PV by (1-Wt), and finally add them to obtain the current optimization value PVCrt.
[0047] Specifically, after obtaining the current operation value of the operation object in this embodiment, it further includes: obtaining the increment of the operation object according to the current operation value; and respectively saving the current measurement value PV and the increment to the historical measurement value array PV[.] and the historical output increment array Move[.] through array shift operations. That is, in this embodiment, after each acquisition of the current measurement value and the increment, the current measurement value and the increment of this time will be stored in the optimization module, and the current measurement value PV and the increment of the controlled object will be saved to the latest index respectively for being called in the next cycle. During the process of initializing the historical output increment array Move[.] and the historical measurement value array PV[.] of the controlled object according to the historical time domain length, shift operations are performed, so that the subsequent historical output increment array Move[.] and historical measurement value array PV[.] used are all the latest, further improving the accuracy of the regulation of the controlled object.
[0048] Step 1023, obtain the current optimization value according to the initial optimization value and the optimization deviation.
[0049] Specifically, in this embodiment, the current optimization value PVCrt of the final optimization calculation is output through the initial optimization value PVbf and the optimization deviation MC, and the specific calculation formula is as follows:
[0050]
[0051] That is, when the initial optimization value PVbf is greater than or equal to the current measurement value PV and the difference between the initial optimization value PVbf and the current measurement value PV is greater than the optimization deviation MC, the current optimization value PVCrt is the sum of the current measurement value PV and the optimization deviation MC; when the initial optimization value PVbf is less than the current measurement value PV and the difference between the current measurement value PV and the initial optimization value PVbf is greater than the optimization deviation MC, the current optimization value PVCrt is the difference between the current measurement value PV and the optimization deviation MC; when the absolute value of the difference between the initial optimization value PVbf and the current measurement value PV is less than or equal to the optimization deviation MC, the current optimization value PVCrt is the initial optimization value PVbf.
[0052] This application obtains the current measurement value PV of the controlled object; optimizes the current measurement value according to the preset control parameters to obtain the current optimization value PVCrt of the controlled object, which is equivalent to predicting in advance the measurement value of the controlled object after a period of time; then, obtains the current operation value of the operating object according to the current optimization value PVCrt, so that the operating object operates with the current operation value. The current operation value also takes a period of time to act on the measurement value of the controlled object, so that the measurement value of the controlled object at this time just matches the previously predicted time point. Even if the controlled object has the characteristics of hysteresis and slow response, the accuracy of controlling the controlled object can be improved.
[0053] As Figure 7 shown, it is the specific operation flow chart of the control method of this embodiment, and the specific steps are as follows:
[0054] S1, judgment of the switch state. That is, judge whether the switch is turned on. If it is turned on, enter S2; if it is turned off, enter step S6.
[0055] S2, judgment of the initialization state. That is, judge whether the initialization is completed. By judging IntSTS output from the output end of the optimization module, determine whether the current controller has successfully executed the initialization. If the initialization is completed, enter step S3; if the initialization is not completed, continue with step S4, that is, initialize the controller.
[0056] S3, input check. After S3, enter step S5, that is, judgment of the input state.
[0057] S4, initialize the controller.
[0058] S5, judgment of the input state. That is, check whether the input pin parameters given by the user are reasonable. If they are not reasonable, the optimization module does not perform the control output calculation, and the optimization calculation has no effect, and enter step S6, that is, obtain the current value; if they are reasonable, the optimization module performs the control output calculation, and enter step S7, that is, optimize the current value to obtain the current optimization value.
[0059] S6. Acquisition of the current value. That is, the current measured value is acquired and input into the input of the proportional integral derivative control module for subsequent calculations.
[0060] S7. Optimization of the current value. That is, the current optimized value is obtained through optimization calculations and input into the input of the proportional integral derivative control module for subsequent calculations.
[0061] S8. Historical update. After obtaining the current measured value in S6 or the current optimized value in S7, the corresponding data is stored for being called in the next cycle.
[0062] An embodiment of the present application relates to a controller. The structural schematic diagram of the controller in this embodiment is as Figure 2 shown. The controller includes: an optimization module 10 and a proportional integral derivative control module 20.
[0063] The optimization module 10 of this embodiment is used to acquire the current measured value of the controlled object, and after acquiring the current measured value PV of the controlled object, optimize the current measured value according to the preset control parameters to obtain the current optimized value PVCrt of the controlled object.
[0064] The proportional integral derivative control module 20 of this embodiment is used to acquire the current optimized value PVCrt of the controlled object, and after acquiring the current optimized value PVCrt of the controlled object, acquire the current operation value of the operating object according to the current optimized value PVCrt.
[0065] The controller of this embodiment is an improved PID controller. An optimization module 10 is added to the classical PID controller. The function of the proportional integral derivative control module 20 is similar to that of the traditional PID controller. Even if the controlled object has characteristics such as hysteresis and slow response, it can improve the accuracy of regulating the controlled object. It is not difficult to find that this embodiment is a controller embodiment corresponding to the above method embodiment. The relevant technical details mentioned in the above embodiment are still valid in this embodiment. Correspondingly, the relevant technical details mentioned in this embodiment can also be applied to the method embodiment. To avoid repetition, they are not elaborated here.
[0066] Specifically, the preset control parameters of this embodiment at least include: gain Gain, historical time domain length PT, weight Wt, and optimization deviation MC.
[0067] The method for obtaining the gain is as follows: perform a step test, obtain the change amount of the controlled object from the occurrence of the change to reaching the stable state, and divide the change amount by the step amplitude of the step test to obtain the gain. During the actual operation process, set the improved PID controller of this embodiment to the manual state, apply a step to the manually improved PID controller, wait for the controlled object to change and finally reach the stable state, and divide the change amount of the controlled object before and after applying the step by the step amount of the actuator to obtain the gain parameter. The historical time domain length PT is also obtained during the step test. The method for obtaining the historical time domain length PT is as follows: perform a step test, obtain the duration from the occurrence of the change of the controlled object to reaching the stable state, and the duration is the historical time domain length PT.
[0068] During the actual application process, after performing the step test, online debugging can also be carried out. Online debugging is a process of optimizing the internal parameters of the optimization module and the input debugging parameters. The engineer in charge of the controller implementation continuously optimizes parameters such as the gain Gain, weight Wt (between 0 and 1), historical time domain length PT, optimization deviation MC, and control period of the controller according to the actual control effect until the controller reaches the most ideal working state. When the online debugging ends, ideal parameters such as the gain Gain, weight Wt, historical time domain length PT, optimization deviation MC, and control period of the controller can be obtained for use in the subsequent optimization process.
[0069] To better verify the control effect of the improved PID controller of this embodiment, taking the application in the green ammonia process as an example, a comparison effect diagram of the classical PID controller and the improved PID controller of this embodiment is obtained through simulation, as Figure 8 shown, which is the control effect diagram of the classical PID controller for the hydrogen-nitrogen ratio of the fresh gas and the hydrogen-nitrogen ratio of the syngas, as Figure 9 shown, which is the control effect diagram of the improved PID controller of this embodiment for the hydrogen-nitrogen ratio of the fresh gas and the hydrogen-nitrogen ratio of the syngas. Among them, the abscissa represents time, the ordinate represents the value of the hydrogen-nitrogen ratio, the red line is the operating value AC101 of the operating object, and the black line is the current measured value AC102 of the controlled object.
[0070] The black line of the classical PID controller, which is the current measured value AC102 of the controlled object, fluctuates greatly, and the control is prone to divergence. Moreover, due to the large system fluctuations, the on-site operation needs to release the automatic mode and perform manual operation. However, for the controller proposed in this embodiment, by recording the adjustment history of the controller and using this history to correct the feedback input of the PID, precise adjustment is carried out, and the control target, that is, the current measured value AC102 of the controlled object, is more stable. In this embodiment, an optimized calculation of the current measured value is proposed, and the optimization module provides debugging parameters such as weights, historical time domain lengths, gains, and maximum deviations, which facilitates engineers to perform real-time debugging for the working conditions they face to achieve effective control and has wide applicability to the green hydrogen and green ammonia processes.
[0071] An embodiment of the present application relates to an electronic device, such as Figure 10 shown, including: at least one processor 201; and a memory 202 communicatively connected to the at least one processor 201; wherein, the memory stores instructions executable by the at least one processor 201, and the instructions are executed by the at least one processor 201 to enable the at least one processor 201 to execute the above control method.
[0072] Among them, the memory 202 and the processor 201 are connected by a bus. The bus can include any number of interconnected buses and bridges, and the bus connects various circuits of one or more processors 201 and the memory 202 together. The bus can also connect various other circuits such as peripheral devices, voltage regulators, and power management circuits, which are well known in the art, so they will not be further described herein. The bus interface provides an interface between the bus and the transceiver. The transceiver can be one component or multiple components, such as multiple receivers and transmitters, and provides a unit for communicating with various other devices on the transmission medium. The data processed by the processor 201 is transmitted on the wireless medium through the antenna. Further, the antenna also receives data and transmits the data to the processor 201.
[0073] The processor 201 is responsible for managing the bus and general processing, and can also provide various functions, including timing, peripheral interfaces, voltage regulation, power management, and other control functions. The memory 202 can be used to store the data used by the processor during operation.
[0074] An embodiment of the present application relates to a computer-readable storage medium storing a computer program. When the computer program is executed by a processor, the above method embodiment is implemented.
[0075] That is, those skilled in the art can understand that all or part of the steps in implementing the methods of the above embodiments can be completed by instructing relevant hardware through a program. The program is stored in a storage medium, including several instructions to enable a device (which can be a single-chip microcomputer, a chip, etc.) or a processor to execute all or part of the steps of the methods of various embodiments of the present application. The foregoing storage medium includes: various media that can store program codes, such as USB flash drives, mobile hard disks, read-only memories (ROMs), random access memories (RAMs), magnetic disks, or optical discs.
[0076] Those of ordinary skill in the art can understand that the above embodiments are specific embodiments for implementing the present application. In actual applications, various changes can be made to them in form and details without departing from the spirit and scope of the present application.
Claims
1. A control method, characterized in that: include: Get the current measurement value of the controlled object; Optimizing the current measured value according to preset control parameters to obtain a current optimized value of the controlled object; The current operation value of the operation object is obtained according to the current optimization value.
2. The control method according to claim 1, characterized in that: The preset control parameters include at least: gain, historical time domain length, weight, and optimization deviation; The gain is the amount of change in the measured value of the controlled object from when it changes to when it reaches a stable state after the operation object moves one unit; The historical time domain length is the time taken for the measured value of the controlled object to change and reach a stable state after the operation object moves one unit; The weight is the correction strength of the influence on the controlled object calculated by the historical increment of the operating object within the preset historical time domain length on the current measurement value; The optimization deviation is the maximum allowable deviation between the current optimization value and the current measured value.
3. The control method according to claim 2, characterized in that: The step of optimizing the current measured value according to the preset control parameter to obtain the current optimized value of the controlled object includes: Initialize the historical output increment array of the operation object and the historical measurement value array of the controlled object according to the historical time domain length; the historical output increment array represents an array having a length of the historical time domain length and storing the historical output increments of the operation object, and the historical measurement value array represents an array having a length of the historical time domain length and storing the historical measurement values of the controlled object; Obtaining an initial optimization value according to the gain, the historical output increment array, the historical measurement value array, the weight, and the current measurement value; Acquire the current optimization value according to the initial optimization value and the optimization deviation; After obtaining the current operation value of the operation object, the method further includes: The increment of the operation object is obtained according to the current operation value; and the current measurement value and the increment are respectively saved to the historical measurement value array and the historical output increment array through array shift operation.
4. The control method according to claim 3, characterized in that: The obtaining the current optimization value according to the initial optimization value and the optimization deviation includes: When the initial optimization value is greater than or equal to the current measurement value and the difference between the initial optimization value and the current measurement value is greater than the optimization deviation, the current optimization value is the sum of the current measurement value and the optimization deviation; In the case where the initial optimization value is smaller than the current measurement value and the difference between the current measurement value and the initial optimization value is larger than the optimization deviation, the current optimization value is the difference between the current measurement value and the optimization deviation; When the absolute value of the difference between the initial optimization value and the current measurement value is less than or equal to the optimization deviation, the current optimization value is the initial optimization value.
5. The control method according to claim 1, characterized in that: The acquiring the current operation value of the operation object according to the current optimization value includes: The current operation value of the operation object is obtained according to the set value and the current optimization value by using a preset proportional-integral-differential control algorithm.
6. The control method according to any one of claims 1 to 5, characterized in that: The controlled object is the hydrogen-nitrogen ratio of the synthesis gas in the green ammonia process, and the operating object is the hydrogen-nitrogen ratio of the fresh gas in the green ammonia process.
7. A controller, characterized in that: include: Optimization module, proportional integral derivative control module; The optimization module is used to optimize the current measured value according to the preset control parameters after obtaining the current measured value of the controlled object, so as to obtain the current optimized value of the controlled object; The proportional-integral-derivative control module is used to obtain the current operation value of the operation object according to the current optimization value after obtaining the current optimization value.
8. The controller according to claim 7, characterized in that: The preset control parameters include at least: gain, historical time domain length, weight, and optimization deviation; The gain is obtained by performing a step test to obtain the amount of change from when the controlled object changes to when it reaches a stable state, and dividing the amount of change by the step amplitude of the step test to obtain the gain; The historical time domain length is obtained by performing a step test to obtain the time length from when the controlled object changes to when it reaches a stable state, and the time length is the historical time domain length.
9. An electronic device, characterized in that: include: at least one processor; as well as, a memory communicatively connected to the at least one processor; wherein, The memory stores instructions that can be executed by the at least one processor, and the instructions are executed by the at least one processor to enable the at least one processor to perform the control method according to any one of claims 1 to 6.
10. A computer storage medium, characterized in that: include: A computer program is stored, wherein when the computer program is executed by a processor, the control method according to any one of claims 1 to 6 is implemented.