Disclosure of Invention
The embodiment of the invention provides an automatic constant pressure method, a device, equipment and a storage medium, which aim to solve the problems of low adjustment efficiency and low production efficiency caused by long pressure adjustment time and incapability of quickly and accurately reaching a set pressure value due to the fact that PID control is complicated to debug, an operator needs to set PID parameters by experience and adjusts for multiple times. And (4) a problem.
The present application provides an automatic constant pressure method, the method comprising:
acquiring a target pressure value through a man-machine interface, and acquiring an actual pressure value through a pressure sensor;
carrying out self-adaptive learning on PID algorithm parameters based on an actual pressure value to obtain a first analog voltage for controlling the frequency of the frequency converter;
controlling the rotating speed of the water pump according to the first analog voltage so as to enable the water pump to reach a first pressure value;
if the first pressure value does not meet the target pressure value, the steps of obtaining an actual pressure value through the pressure sensor until the actual pressure value is based on the actual pressure value, carrying out self-adaptive learning on PID algorithm parameters, and obtaining a first analog voltage for controlling the frequency of the frequency converter are repeatedly executed until the first pressure value meets the target pressure value.
The present application provides an automatic constant pressure device, the device includes:
the actual pressure value acquisition module is used for acquiring a target pressure value through a man-machine interface and acquiring an actual pressure value through the pressure sensor;
the adaptive learning module is used for carrying out adaptive learning on PID algorithm parameters based on an actual pressure value to obtain a first analog voltage for controlling the frequency of the frequency converter;
the water pump rotating speed control module is used for controlling the rotating speed of the water pump according to the first analog voltage so that the actual pressure value reaches a first pressure value;
and the repeated execution module is used for repeatedly executing the steps of acquiring the actual pressure value through the pressure sensor until the actual pressure value is based on the actual pressure value, carrying out self-adaptive learning on the PID algorithm parameter and acquiring the first analog voltage for controlling the frequency of the frequency converter until the first pressure value meets the target pressure value.
In some embodiments, the adaptive learning module is further configured to: acquiring actual algorithm parameters of a PID algorithm in real time; and carrying out self-adaptive learning on the PID algorithm based on the initial algorithm parameter and the actual algorithm parameter so as to generate a first analog voltage of the frequency converter frequency.
In some embodiments, the adaptive learning module is further configured to: acquiring deviation and a deviation change rate based on the initial algorithm parameter and the actual algorithm parameter; setting a rule base based on the deviation, the deviation change rate and the parameter relation of the PID algorithm parameters; repeatedly executing a PID algorithm for correcting the detection deviation and the deviation change rate so that the detection deviation and the deviation change rate activate the parameter relation rules in the rule base; and outputting a first analog voltage based on the parameter relation rule.
In some embodiments, the apparatus is further configured to: acquiring image information of a spraying object in real time; and adjusting the value of the spraying parameter of the spray head based on the image information.
In some embodiments, the apparatus is further configured to: acquiring an optimal pressure value and target parameters in a solution tank; acquiring a first pressure value based on the target parameter; and comparing and analyzing the optimal pressure value and the first pressure value to obtain the optimal target parameter.
In some embodiments, the apparatus is further configured to: inputting parameters of the model by using the optimal pressure value, the first pressure value and the target parameters, training a deep learning model, and outputting the optimal target parameters; adjusting the target parameter based on the optimal target parameter; based on the optimal pressure value and the optimal target parameter, an optimal pressure value-optimal target parameter data table is generated.
In some embodiments, the apparatus is further configured to: detecting the change of the first pressure value in real time, and determining whether abnormal data is output or not; if yes, based on the abnormal data, acquiring an abnormal data report and sending an alarm signal.
The present application provides an electronic device comprising a memory, a processor and a computer program stored in the memory and executable on the processor, the processor implementing the above automatic constant pressure method when executing the computer program.
The present application provides a computer-readable storage medium having stored thereon a computer program which, when executed by a processor, implements the above-described automatic constant pressure method.
According to the automatic constant pressure method, the device, the equipment and the storage medium, the target pressure value and the actual pressure value are obtained, the pressure is constant when the actual pressure value as the first pressure value approaches and meets the target pressure value through PID algorithm parameter self-adaptive learning, in this way, the target pressure value is automatically acquired, the self-learning algorithm is automatically adjusted, the set target pressure value can be quickly and accurately reached, the pressure adjusting time is short, and the working intensity of workers is reduced.
Detailed Description
The technical solutions in the embodiments of the present invention will be clearly and completely described below with reference to the drawings in the embodiments of the present invention, and it is obvious that the described embodiments are some, not all, embodiments of the present invention. All other embodiments, which can be derived by a person skilled in the art from the embodiments given herein without making any creative effort, shall fall within the protection scope of the present invention.
In one embodiment, as shown in fig. 1, an automatic constant pressure method is provided, which specifically includes the following steps:
s10, acquiring a target pressure value through a man-machine interface, and acquiring an actual pressure value through a pressure sensor.
In this embodiment, a Human Machine Interface (HMI) may be an Interface of an input/output device that establishes a connection between a Human and a computer and exchanges information. The control center of the method can be a Programmable Logic Controller (PLC), and the human-computer interface, the pressure sensor and the PLC are electrically connected. The programmable controller comprises an analog input module and an analog output module, and is used for inputting and outputting data. The human interface may be made by the software GP-prox.
Specifically, in the wet process of the circuit board by a developing machine or an etching machine, the circuit board is soaked in a solution tank of the developing machine or the circuit board, and unnecessary impurities and the like on the circuit board are etched or eroded by applying pressure to a spray head on a pipeline and spraying the circuit board. Different products have different values of the bearing pressure. The actual pressure value is acquired by acquiring the target pressure value and acquiring the actual pressure value by a sensor through an analog input module by a Programmable Logic Controller (PLC). The etched products of the method include, but are not limited to, circuit board products.
S20, carrying out self-adaptive learning on the PID algorithm parameters based on the actual pressure value to obtain a first analog voltage for controlling the frequency of the frequency converter.
In this embodiment, the PID (proportional Integral Differential) algorithm may perform an operation according to a function relationship of Proportion, integral and Differential according to the input deviation value, and the operation result is used to control the output. The programmable controller is electrically connected with the frequency converter. The first analog voltage is output through an analog quantity output module of the programmable controller.
Specifically, the PID algorithm is input into the programmable controller, parameters of the PID algorithm are controlled to carry out self-adaptive learning through an actual pressure value, and a first analog voltage is obtained and used for controlling the frequency of the frequency converter. The first analog voltage may have an output range of 0 to 10 volts, each volt corresponding to a different frequency of the frequency converter.
And S30, controlling the rotating speed of the water pump according to the first analog voltage so that the actual pressure value reaches a first pressure value.
In this embodiment, the frequency converter is electrically connected to the water pump.
Specifically, the frequency of the first analog voltage control frequency converter is changed, the frequency converter controls the rotating speed of a motor on the water pump, the actual pressure value is changed, and the middle changed process pressure value is called as a first pressure value. The method process is mostly a process in which the first pressure value is continuously increased.
And S40, if the first pressure value does not meet the target pressure value, the step of carrying out self-adaptive learning on the PID algorithm parameters based on the actual pressure value and obtaining a first analog voltage for controlling the frequency of the frequency converter is repeatedly executed until the first pressure value meets the target pressure value.
Specifically, in this embodiment, the first pressure value is compared with the target pressure value, and if the first pressure value is not equal to the target pressure value, the first pressure value (actual pressure value) is obtained and fed back to the programmable controller in real time through the pressure sensor, and the programmable controller performs adaptive learning on the PID algorithm parameter again, obtains the first analog voltage for controlling the frequency of the frequency converter, and repeatedly executes the first analog voltage until the first pressure value is equal to the target pressure value, where the pressure is constant. The process does not require an operator to make multiple adjustments to the PID algorithm parameters, and the multiple adjustments take a long time.
According to the automatic constant pressure method, the target pressure value and the actual pressure value are obtained, and the pressure is constant when the actual pressure value as the first pressure value approaches and meets the target pressure value through PID algorithm parameter self-adaptive learning, so that the target pressure value is automatically acquired, the self-learning algorithm is automatically adjusted, the set target pressure value can be quickly and accurately reached, the pressure adjusting time is short, and the working intensity of workers is reduced.
In some embodiments, as shown in fig. 2, in step S20, that is, performing adaptive learning on the PID algorithm parameters to obtain the first analog voltage for controlling the frequency of the frequency converter, the method specifically includes the following steps:
s201, acquiring actual algorithm parameters of the PID algorithm in real time.
S202, carrying out self-adaptive learning on the PID algorithm based on the initial algorithm parameters and the actual algorithm parameters to generate a first analog voltage of the frequency converter.
Specifically, an initial PID algorithm parameter is obtained, which includes a proportional parameter, an integral parameter and a differential parameter, and is used for performing closed-loop adjustment on the PID. And the programmable controller collects the actual algorithm parameters of the PID algorithm, performs adaptive learning on the PID algorithm, and autonomously gives the optimal proportional parameter, the optimal integral parameter and the optimal differential parameter at the current moment. And outputting a first analog voltage through the optimal proportional parameter, the optimal integral parameter and the optimal differential parameter, wherein the first analog voltage is used for controlling the frequency of the frequency converter.
The steps S201 to S202 have the effect that the initial algorithm parameter and the actual algorithm parameter perform adaptive learning on the PID algorithm, so that the output result is more accurate and faster, and the parameters do not need to be adjusted manually.
In some embodiments, as shown in fig. 2, in step S202, that is, based on the initial algorithm parameter and the actual algorithm parameter, the adaptive learning of the PID algorithm is performed to generate the first analog voltage of the frequency converter frequency, which specifically includes the following steps:
s2021, acquiring deviation and a deviation change rate based on the initial algorithm parameters and the actual algorithm parameters.
S2022, setting a rule base based on the deviation, the deviation change rate and the parameter relation of the PID algorithm parameters; and repeatedly executing the PID algorithm to correct the detection deviation and the deviation change rate so that the detection deviation and the deviation change rate activate the parameter relation rule in the rule base.
S2023, outputting a first analog voltage based on the parameter relation rule.
In particular, adaptive learning is used for the adjustment of PID algorithm parameters in a programmable controller. And formulating a rule base according to the algorithm relation of the deviation and the deviation change rate and the three parameters. In the automatic constant-pressure operation, the detection deviation and the deviation change rate are corrected, reasoning is carried out, corresponding parameter relation rules are activated, then a model and an output control quantity Kp/Ki/Kd are solved, and the control quantity respectively corresponds to an optimal proportional parameter, an optimal integral parameter and an optimal differential parameter. As shown in fig. 3.
In addition, the essence of PID self-learning is that the characteristics of the object are corrected by the characteristics of the controller, so that the roots of the characteristic equation of the whole control system all fall in a certain range of a root plane, and the requirements on stability, rapidity and accuracy are met.
The steps from S2021 to S2023 are effective in that, aiming at the defect of high difficulty in adjusting PID parameters in automatic constant pressure, the method can enable PID algorithm parameters to be easily adjusted, has good control effect, and has universality and strong adaptability.
In some embodiments, as shown in fig. 2, an automatic constant pressure method specifically includes the following steps:
and S50, acquiring image information of the spraying object in real time.
And S60, carrying out numerical value adjustment on the spraying parameters of the spray head based on the image information.
The image information may include the shape, impurity thickness, color, texture, and the like of the spraying object. The spraying parameters comprise spraying pressure, spraying amount, the number of spray heads and the like.
Specifically, in the process of spraying the spraying object, the image information of the spraying object is acquired through the camera, and the etching degree on the spraying object is analyzed. Based on the degree of etching, the spray parameters are numerically adjusted. For example: and if the etching in a certain area on the spraying object is finished but the etching in other areas is not finished, the programmable controller controls to close the corresponding spray head area of which the etching is finished.
The steps S50 to S60 have an effect of acquiring image information in real time, which is convenient to save resources and cost.
In some embodiments, as shown in fig. 2, an automatic constant pressure method specifically further comprises the steps of:
s70, obtaining the optimal pressure value and the target parameters in the solution tank.
And S80, acquiring a first pressure value based on the target parameter.
And S90, comparing and analyzing the optimal pressure value and the first pressure value to obtain an optimal target parameter.
Wherein, the optimal pressure value may be a set target pressure value. The target parameters include the temperature in the solution tank, the solution content concentration, the solution volume and the like.
Specifically, the solution in the surrounding solution tank is sensed by other sensors, and the temperature, the solution content concentration, the solution volume and the like in the solution tank are obtained. Meanwhile, a first pressure value can be obtained through the pressure sensor, the target parameter corresponds to the first pressure value at the moment, the optimal target parameter corresponds to the optimal pressure value, and the corresponding optimal target parameter is obtained when the optimal pressure value is obtained. And storing and updating the optimal target parameters.
Steps S70 to S90 have an effect of reducing the influence of the external environment on the automatic constant function, and based on the influence, the optimum target parameter is acquired.
In some embodiments, as shown in fig. 2, in step S90, namely, comparing and analyzing the optimal pressure value and the first pressure value to obtain the optimal target parameter, the method specifically includes the following steps:
and S901, inputting parameters of the model by using the optimal pressure value, the first pressure value and the target parameters, training the deep learning model, and outputting the optimal target parameters.
And S902, adjusting the target parameters based on the optimal target parameters.
And S903, generating an optimal pressure value-optimal target parameter data table based on the optimal pressure value and the optimal target parameter.
The deep learning is to learn the internal rules and the expression levels of sample data, and the information obtained in the learning process is data such as characters, images and sounds, so that the machine can have the analysis and learning capability like a human, and can recognize and analyze the data such as the characters, the images and the sounds. The spraying pattern information can be images and image data information with good spraying effect of the spraying robot.
Specifically, a large number of optimal pressure values, first pressure values and target parameters are obtained from a database to perform a model, the first pressure values and the target parameters are trained, intermediate target parameters are updated in an iterative manner, and error loss values of the intermediate target parameters and the corresponding optimal target parameters are obtained. And when the error loss value converges to a certain degree, namely the intermediate target parameter is approximately the same as or the same as the corresponding optimal target parameter, acquiring the corresponding optimal target parameter. And generating a target parameter-optimal target parameter data table for subsequent data acquisition and storage according to the target parameters and the optimal target parameters. By acquiring the data in the target parameter-optimal spraying parameter data table and subsequently adjusting the target parameters, the spraying effect is better and the influence of the external environment is avoided.
The steps S901 to S903 have the effects of reducing the influence of the target parameter on the spraying effect, and learning through the deep learning model, so that the spraying effect is better, the spraying time is reduced, and the resource cost is saved.
In some embodiments, as shown in fig. 2, an automatic constant pressure method specifically includes the following steps:
s91, detecting the change of the first pressure value in real time, and determining whether abnormal data is output.
And S92, if yes, acquiring an abnormal data report based on the abnormal data, and sending an alarm signal.
The abnormal data includes sudden drop, sudden rise, and slow or fast pressure slope.
Specifically, the method detects the change of the first pressure value in real time, determines the output abnormal data and the abnormal data type, outputs the abnormal data and the abnormal data type to the man-machine interface for the abnormal data report, and can obtain the specific error position based on the abnormal data report. Such as: unstable spraying pressure control at the spraying position, abnormal structural performance of a water pump and the like. And stopping working after the abnormal data report is obtained, and sending an alarm signal for subsequent operation.
The steps S91 to S92 have the effects that the method can find abnormal data in time, and acquire the corresponding abnormal position through the abnormal data report, so that the loophole can be found quickly.
According to the automatic constant pressure method, the target pressure value and the actual pressure value are obtained, and the PID algorithm parameter self-adaptive learning is adopted, so that the pressure is constant when the actual pressure value as the first pressure value approaches and meets the target pressure value, in this way, the target pressure value is automatically acquired, the self-learning algorithm is automatically adjusted, the set target pressure value can be quickly and accurately reached, the pressure adjusting time is short, and the working intensity of workers is reduced.
It should be understood that, the sequence numbers of the steps in the foregoing embodiments do not imply an execution sequence, and the execution sequence of each process should be determined by its function and inherent logic, and should not constitute any limitation to the implementation process of the embodiments of the present invention.
In one embodiment, an automatic constant pressure device is provided, which corresponds to the automatic constant pressure method in the above embodiments one to one. As shown in fig. 4, the automatic constant pressure device includes an actual pressure value acquisition module 10, an adaptive learning module 20, a control water pump rotation speed module 30, and a repeat execution module 40. The detailed description of each functional module is as follows:
the actual pressure value acquisition module 10 is used for acquiring a target pressure value through a human-computer interface and acquiring an actual pressure value through a pressure sensor;
the adaptive learning module 20 is used for performing adaptive learning on the PID algorithm parameters based on the actual pressure value to obtain a first analog voltage for controlling the frequency of the frequency converter;
the water pump rotating speed control module 30 is used for controlling the rotating speed of the water pump according to the first analog voltage so as to enable the water pump to reach a first pressure value;
and the repeated execution module 40 is used for repeatedly executing the steps of acquiring the actual pressure value through the pressure sensor until the actual pressure value is based on the actual pressure value, performing adaptive learning on the PID algorithm parameter, and acquiring the first analog voltage for controlling the frequency of the frequency converter until the first pressure value meets the target pressure value.
For specific limitations of the automatic constant pressure device, reference may be made to the above limitations of the automatic constant pressure method, which are not described in detail herein. The various modules in the automatic constant pressure device described above may be implemented in whole or in part by software, hardware, and combinations thereof. The modules may be embedded in a hardware form or may be independent of a processor in the electronic device, or may be stored in a memory in the electronic device in a software form, so that the processor calls and executes operations corresponding to the modules.
In one embodiment, an electronic device is provided, which may be a server, and its internal structure diagram may be as shown in fig. 5. The electronic device includes a processor, a memory, a network interface, and a database connected by a system bus. Wherein the processor of the electronic device is configured to provide computing and control capabilities. The memory of the electronic equipment comprises a nonvolatile storage medium and an internal memory. The non-volatile storage medium stores an operating system, a computer program, and a database. The internal memory provides an environment for the operation of an operating system and computer programs in the non-volatile storage medium. The database of the electronic device is used for data related to the automatic constant pressure method. The network interface of the electronic device is used for connecting and communicating with an external terminal through a network. The computer program is executed by a processor to implement an automatic constant pressure method.
In one embodiment, an electronic device is provided, which includes a memory, a processor, and a computer program stored in the memory and executable on the processor, and when the processor executes the computer program, the processor implements the automatic constant pressure method of the above embodiment, for example, steps S10 to S40 shown in fig. 1. Alternatively, the processor, when executing the computer program, implements the functions of the respective modules/units of the automatic constant pressure device in the above-described embodiment, for example, the functions of the modules 10 to 40 shown in fig. 4. To avoid repetition, the description is omitted here.
In one embodiment, a computer-readable storage medium is provided, on which a computer program is stored, which when executed by a processor implements the automatic constant pressure method of the above-described embodiments, such as S10 to S40 shown in fig. 1. Alternatively, the computer program, when executed by the processor, implements the functions of the modules/units in the automatic constant pressure device in the above-described device embodiment, such as the functions of the modules 10 to 40 shown in fig. 4. To avoid repetition, the description is omitted here.
It will be understood by those skilled in the art that all or part of the processes of the methods of the embodiments described above can be implemented by hardware instructions of a computer program, which can be stored in a non-volatile computer-readable storage medium, and when executed, can include the processes of the embodiments of the methods described above. Any reference to memory, storage, database, or other medium used in the embodiments of the present application may include non-volatile and/or volatile memory, among others. Non-volatile memory can include read-only memory (ROM), programmable ROM (PROM), electrically Programmable ROM (EPROM), electrically Erasable Programmable ROM (EEPROM), or flash memory. Volatile memory can include Random Access Memory (RAM) or external cache memory. By way of illustration and not limitation, RAM is available in a variety of forms such as Static RAM (SRAM), dynamic RAM (DRAM), synchronous DRAM (SDRAM), double Data Rate SDRAM (DDRSDRAM), enhanced SDRAM (ESDRAM), synchronous Link DRAM (SLDRAM), rambus (Rambus) direct RAM (RDRAM), direct Rambus Dynamic RAM (DRDRAM), and Rambus Dynamic RAM (RDRAM), among others.
It will be apparent to those skilled in the art that, for convenience and brevity of description, only the above-mentioned division of the functional units and modules is illustrated, and in practical applications, the above-mentioned function distribution may be performed by different functional units and modules according to needs, that is, the internal structure of the apparatus is divided into different functional units or modules to perform all or part of the above-mentioned functions.
The above examples are only intended to illustrate the technical solution of the present invention, and not to limit it; although the present invention has been described in detail with reference to the foregoing embodiments, it will be understood by those of ordinary skill in the art that: the technical solutions described in the foregoing embodiments may still be modified, or some technical features may be equivalently replaced; such modifications and substitutions do not depart from the spirit and scope of the embodiments of the present invention, and they should be construed as being included therein.