A PID parameter setting method based on image recognition

By capturing images at the inspection terminal and processing them via image recognition on a cloud server, secure data acquisition and efficient PID parameter tuning without physical interaction are achieved. This solves the problems of data transmission security and manual dependence in existing technologies, and improves tuning efficiency and effectiveness.

CN114740708BActive Publication Date: 2025-11-11SUPCON TECH CO LTD
View PDF 1 Cites 0 Cited by

Patent Information

Application Number
CN202210441769.1
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2022-04-25
Publication Date
2025-11-11
Estimated Expiration
2042-04-25

AI Technical Summary

Technical Problem

Existing PID parameter tuning methods suffer from data transmission security risks and reliance on human experience, which affect tuning efficiency and effectiveness.

Method used

By capturing historical trend charts of the on-site control system through inspection terminals, and using image recognition technology to perform data analysis and PID parameter tuning on a cloud server, including empirical value methods, model identification methods, and machine learning methods, safe data acquisition and efficient parameter recommendation without physical interaction can be achieved.

Benefits of technology

It enables safe and convenient PID parameter tuning, reduces reliance on manual experience, improves tuning efficiency and effectiveness, and avoids safety risks to the control system.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN114740708B_ABST
    Figure CN114740708B_ABST
Patent Text Reader

Abstract

This invention discloses a PID parameter tuning method based on image recognition, comprising: image acquisition: in the absence of a data connection between the inspection terminal and the field control system, the historical trend map of the PID loop data to be tuned in the field control system is acquired through the inspection terminal; image processing: the cloud server receives the historical data trend map transmitted by the inspection terminal, extracts and parses the trend map using image recognition methods to obtain PID loop characteristics; parameter recommendation: based on the obtained PID loop characteristics, the cloud server tunes the PID parameters of the control loop using a preset PID parameter tuning method to obtain recommended PID parameter values. This invention acquires historical trends of data in the field control system by taking pictures with the inspection terminal and obtains key data through image processing technology. Data is safely acquired while isolated from the field control system, without posing any security risks to the control system.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This invention relates to the field of PID parameter tuning technology, and specifically to a PID parameter tuning method based on image recognition. Background Technology

[0002] In my country, a large number of loops in actual industrial sites are still manually controlled. Reducing the difficulty of tuning the PID parameters of the loops is an important way to improve the factory's automation rate.

[0003] Currently, common PID parameter tuning methods in actual field operations include manual experience-based tuning, system identification-based parameter tuning, and relay feedback methods. These data-driven methods inevitably require data from the field control system software. During data copying or communication, there is a potential risk of virus intrusion, leading to insecure data transmission. Some highly secure, closed environments may not even have the facilities for copying data, making it impossible to obtain data from the control system software. Furthermore, manual experience-based tuning relies heavily on human experience; more experience often results in higher tuning efficiency and better performance, but tuning slow-response loops is often time-consuming. System identification methods and relay feedback methods both require excitation experiments on the loop, affecting its normal operation. Summary of the Invention

[0004] To overcome the shortcomings of the above technologies, this invention provides a PID parameter tuning method based on image recognition.

[0005] Terminology Explanation:

[0006] 1. PID: A common closed-loop control method with three control parameters (proportional, integral, and derivative coefficients, i.e., k). p ,k i ,k d (Three parameters).

[0007] 2. PV: Process Variable, actual value.

[0008] 3. SV: Set Variable, set value.

[0009] 4. MV: Manipulated Variable, the output value after PID calculation in automatic mode.

[0010] 5. OCR: Optical Character Recognition, the process by which electronic devices (such as scanners or digital cameras) examine characters printed on paper and then translate the shapes into computer text using character recognition methods.

[0011] 6. Machine Learning: Machine learning is a branch of artificial intelligence. The main research object in this field is artificial intelligence, especially how to improve the performance of specific algorithms through experience learning.

[0012] 7. Reinforcement learning: also known as reward learning, evaluation learning, or reinforcement learning, is one of the paradigms and methodologies of machine learning. It is used to describe and solve the problem of how an agent learns strategies to maximize rewards or achieve specific goals during its interaction with the environment.

[0013] The technical solution adopted by this invention to overcome its technical problems is:

[0014] A PID parameter tuning method based on image recognition includes the following steps:

[0015] Image acquisition: When there is no data connection between the inspection terminal and the field control system, the historical trend chart of the PID loop data to be tuned in the field control system is obtained through the inspection terminal;

[0016] Image processing: The cloud server receives historical data trend charts transmitted by the inspection terminal, extracts and analyzes the trend charts using image recognition methods, and obtains the PID loop characteristics;

[0017] Parameter Recommendation: Based on the obtained PID loop characteristics, the cloud server tunes the PID parameters of the control loop using a preset PID parameter tuning method, thereby obtaining recommended PID parameter values.

[0018] Furthermore, the inspection terminal is configured as a device capable of capturing images, including but not limited to smartphones, tablets, smartwatches, and cameras.

[0019] Furthermore, the preset PID parameter tuning methods include, but are not limited to, empirical value methods, model identification methods, and machine learning methods.

[0020] Furthermore, PID parameter tuning using the empirical value method specifically includes:

[0021] The cloud server uses an OCR algorithm to extract and parse the text information in the trend chart obtained by the inspection terminal to obtain PID loop features, which include the text information of the PID loop.

[0022] The cloud server determines the current loop type based on the text information of the PID loop;

[0023] Based on the current loop type, the cloud server compares the values ​​with pre-stored and calibrated PID parameters, and selects at least one set of recommended PID parameter values ​​from the pre-stored and calibrated PID parameters.

[0024] Furthermore, PID parameter tuning using the model identification method specifically includes:

[0025] The cloud server uses an OCR algorithm to extract and parse the text information in the trend chart obtained by the inspection terminal to obtain PID loop features, which include at least the text information of the PID loop.

[0026] Identify the four vertices of the trend chart and correct the distortion of the trend chart.

[0027] Identify the axis scales in the trend chart;

[0028] The curves in the trend graph are extracted and parsed into time series data with timestamps. The PID loop features also include the time series data.

[0029] Based on time-series data, the cloud server identifies and tunes the control loop to derive a set of recommended PID parameter values.

[0030] Furthermore, the PID parameters are tuned using the machine learning method, specifically including:

[0031] The cloud server uses an OCR algorithm to extract and parse the text information in the trend chart obtained by the inspection terminal to obtain PID loop features, which include the text information of the PID loop.

[0032] Identify the four vertices of the trend chart and correct the distortion of the trend chart.

[0033] The cloud server trains the required parameters to tune the machine learning model based on the distortion-corrected image data;

[0034] The input parameters required for the parameter tuning machine learning model are extracted from the text information of the PID loop and the image data after distortion correction. The input parameters are then input into the parameter tuning machine learning model. After learning by the parameter tuning machine learning model, a set of recommended values ​​for PID parameters are output.

[0035] Furthermore, the textual information of the PID loop includes, but is not limited to, tag number, loop process characteristics, current loop parameters, time coordinates, and loop limiting characteristics.

[0036] Furthermore, the input parameters include at least the trend graph, current PID parameters, overshoot, whether the set value has been reached, whether there is oscillation, and the phase difference between the peaks and troughs of MV and PV.

[0037] Furthermore, following the parameter recommendation step, the method also includes determining whether the recommended PID parameter values ​​are valid, specifically including:

[0038] The cloud server sends the recommended PID parameter values ​​back to the inspection terminal, sets these recommended values ​​in the field control system, and determines whether the recommended PID parameter values ​​are valid.

[0039] If effective, the process ends; if ineffective, it returns to the image acquisition step and selects an unused PID parameter tuning method from the preset PID parameter tuning methods in the parameter recommendation step to perform PID parameter tuning again until the obtained recommended PID parameter value is effective.

[0040] The beneficial effects of this invention are:

[0041] This invention collects historical trends of data from the field control system by taking photos with an inspection terminal and obtains key data through image processing technology. Data is acquired securely while isolated from the field control system, without requiring physical information interaction and posing no safety risks. Furthermore, the PID parameter recommendation method of this invention is efficient and convenient, reducing the need for PID experts on-site and lowering the difficulty of PID parameter tuning. Attached Figure Description

[0042] Figure 1 This is a schematic diagram of a PID parameter tuning method based on image recognition according to an embodiment of the present invention.

[0043] Figure 2 This is a flowchart of a PID parameter tuning method based on image recognition, as described in an embodiment of the present invention.

[0044] Figure 3 This is a dynamic response diagram of the PV, SV, and MV curves of the control loop adjustment screen described in an embodiment of the present invention.

[0045] Figure 4 This is a PID parameter tuning screen after tuning using the image recognition-based PID parameter tuning method described in this embodiment of the invention. Detailed Implementation

[0046] To facilitate a better understanding of the present invention by those skilled in the art, the present invention will be further described in detail below with reference to the accompanying drawings and specific embodiments. The following are merely exemplary and do not limit the scope of protection of the present invention.

[0047] like Figure 1 and 2 As shown in this embodiment, a PID parameter tuning method based on image recognition mainly includes three steps: image acquisition, image processing, and parameter recommendation.

[0048] The image acquisition refers to: acquiring historical trend charts of the PID loop data to be tuned in the field control system through the inspection terminal when there is no data connection between the inspection terminal and the field control system, such as... Figure 3 The diagram shows the dynamic response of the PV, SV, and MV curves of the control loop adjustment screen. Curves A, B, and C represent the SV, MV, and PV curves, respectively. The inspection terminal is configured as an image-capturing device, typically a portable one, including but not limited to smartphones, tablets, smartwatches, and cameras. In this embodiment, a smartphone is preferred.

[0049] The image processing refers to: the cloud server receiving historical data trend charts transmitted by the inspection terminal, extracting and parsing the trend charts using image recognition methods to obtain PID loop characteristics, wherein different parameter tuning methods use different PID loop characteristics.

[0050] The parameter recommendation refers to the cloud server tuning the control loop based on the obtained PID loop characteristics and using a preset PID parameter tuning method to derive recommended PID parameter values, such as... Figure 4 The image shown is a schematic diagram of the PID parameter tuning screen after tuning using the image recognition-based PID parameter tuning method described in this invention. This diagram directly provides recommended PID parameter values ​​and adjustment suggestions. In this embodiment, the preset PID parameter tuning methods include, but are not limited to, empirical methods, model identification methods, and machine learning methods.

[0051] (I) PID parameter tuning using the aforementioned empirical value method specifically includes:

[0052] The cloud server uses an OCR algorithm to extract and parse the text information in the trend chart obtained by the inspection terminal to obtain PID loop features. The PID loop features include text information of the PID loop, including but not limited to tag number, loop process characteristics, current loop parameters, time coordinates, and loop limiting characteristics.

[0053] The cloud server determines the current loop type based on the text information of the PID loop, such as temperature, liquid level, flow rate, pressure, pH value, etc.

[0054] Based on the current loop type, the cloud server compares the data with pre-stored and calibrated PID parameters to match at least one set of recommended PID parameter values. In other words, one or more sets of recommended PID parameter values ​​can generally be matched using the empirical value method. The pre-stored and calibrated PID parameters are PID parameters that the cloud server has collected and calibrated in advance from a large number of devices and classified and labeled them to facilitate matching.

[0055] (II) PID parameter tuning using the aforementioned model identification method specifically includes:

[0056] The cloud server uses an OCR algorithm to extract and parse the text information in the trend chart obtained by the inspection terminal to obtain PID loop features. The PID loop features include at least the text information of the PID loop, including but not limited to tag number, loop process characteristics, current loop parameters, time coordinates, and loop limiting characteristics.

[0057] A contour detection algorithm is used to identify the four vertices of the trend chart, and perspective transformation is used to correct the distortion of the trend chart. Assuming that the coordinates of the four vertices of the trend chart before correction are (x1,y1), (x2,y2), (x3,y3), and (x4,y4), the coordinates of the four vertices of the trend chart after correction are (x1,y1), (x1,y1+h), (x1+w,y1), and (x1+w,y1+h), where w and h are the length and width of the rectangular trend chart, respectively.

[0058] A line detection algorithm is used to identify the grid on the vertical axis of the trend chart, and the correspondence between the grid line coordinates and the scale values ​​is matched based on the OCR results. That is, the discretized horizontal and vertical axes (time axes) in the trend chart are T={t1,t2,…,t m The corresponding pixel coordinates in the image are:

[0059] (X,Y)={(x,y|x=x1),(x,y|x=x2),(x,y|x=x3),…}

[0060] The discretized vertical axis values ​​are V = {v1, v2, ..., v n The corresponding pixel coordinates in the image are:

[0061] (X,Y)={(x,y|y=y1), (x,y|y=y2), (x,y|y=y3)…}.

[0062] A color extraction algorithm is used to extract the curves from the trend chart. Based on the identified time axis and the vertical axis scale values, the curves are parsed into time-series data with timestamps. The PID loop features also include this time-series data; that is, when the PID parameters are tuned using the model identification method, the PID loop features include the textual information and time-series data of the PID loop. Assume the pixel coordinates of the curves in the trend chart in the image are a sequence {(a1,b1),(a2,b2),…,(a…b2)}. k ,b kLinear interpolation is performed on the two dimensions of the curve coordinate sequence. Assuming the nearest coordinate axis scales to a1 are x1 and x2, and x1 < a1 < x2, then the timestamp corresponding to position a1 is:

[0063]

[0064] Similarly, the vertical axis scale value corresponding to position b1 is:

[0065]

[0066] Then, time series data {m1,m2,…,m3} can be obtained from the three trends: MV, PV, and SV. k},{p1,p2,…,p k},{s1,s2,…,s k} and time labels {t1,t2,…,t k (k represents the number of points in the trend chart).

[0067] Based on time series data, the cloud server identifies and tunes the control loop to obtain a set of recommended PID parameter values. Specifically, the control loop is identified using identification methods such as prediction error method and asymptotic identification method for MV, PV, and SV time series data, and then the parameters are tuned using tuning methods such as internal model method and amplitude and phase margin to obtain a set of recommended PID parameter values.

[0068] (III) PID parameter tuning using the aforementioned machine learning method, specifically including:

[0069] The cloud server uses an OCR algorithm to extract and parse the text information in the trend chart obtained by the inspection terminal to obtain PID loop features. The PID loop features include text information of the PID loop, including but not limited to tag number, loop process characteristics, current loop parameters, time coordinates, and loop limiting characteristics.

[0070] The four vertices of the trend graph are identified, and distortion correction is performed on the distorted trend graph. The distortion correction method is the same as the distortion correction method used in the model identification method mentioned above, and will not be repeated here.

[0071] The cloud server trains the required parameter tuning machine learning model based on the distortion-corrected image data using reinforcement learning algorithms such as Q-learning and DQN.

[0072] The input parameters required for the parameter tuning machine learning model are extracted from the text information of the PID loop and the image data after distortion correction. The input parameters include at least the trend image, the current PID parameters, the overshoot, whether the set value has been reached, whether there is oscillation, and the phase difference between the peaks and troughs of MV and PV. The input parameters are then input into the parameter tuning machine learning model. After learning by the parameter tuning machine learning model, a set of recommended values ​​for PID parameters is output.

[0073] Furthermore, following the parameter recommendation step, the method also includes determining whether the recommended PID parameter values ​​are valid, specifically including:

[0074] The cloud server sends the recommended PID parameter values ​​back to the inspection terminal, sets these recommended values ​​in the field control system, and determines whether the recommended PID parameter values ​​are valid.

[0075] If effective, the process ends; if ineffective, it returns to the image acquisition step and selects an unused PID parameter tuning method from the preset PID parameter tuning methods in the parameter recommendation step to perform PID parameter tuning again until the obtained recommended PID parameter value is effective.

[0076] In the third step, "Parameter Recommendation," of the image recognition-based PID parameter tuning method described in this embodiment, when tuning the control loop using a preset PID parameter tuning method, any one of the methods can be selected for tuning without any order. If the recommended PID parameter value obtained by the selected PID parameter tuning method is verified to be invalid, then any of the three unselected methods is selected for PID parameter tuning until the obtained recommended PID parameter value is valid.

[0077] Furthermore, while the empirical value method can generate one or more sets of recommended PID parameter values, the model identification method and machine learning method can only generate one set of recommended PID parameter values. It is important to note that when evaluating multiple sets of recommended PID parameter values ​​generated using the empirical value method, each set of recommended PID parameter values ​​must be verified individually.

[0078] The following specific example illustrates a PID parameter tuning method based on image recognition according to the present invention. Consider a water tank level control system whose transfer function can be expressed as:

[0079]

[0080] The historical trends of PV (real-time liquid level), SV (set liquid level), and MV (valve opening) of this field control system were retrieved from the monitoring software, and multiple historical trend charts were taken with a smartphone and uploaded to the cloud server.

[0081] (I) When the user selects the empirical value method for parameter tuning, the cloud service uses an OCR algorithm to identify that this is a liquid level control system, and therefore recommends two sets of PID parameter values:

[0082] (1) First-stage water tank parameters: k p =0.50,k i =0.0025,k d =0

[0083] (2) Second-stage water tank parameters: k p =2.83,k i =0.0043,k d =0

[0084] After the user selects the recommended values ​​for the second set of PID parameters and inputs them into the control system for verification, and finds that the parameters are valid, the parameter tuning is complete.

[0085] (II) When the user selects the model identification method for parameter tuning, the cloud service... Figure 2 The flowchart uses a series of OCR and image processing algorithms to convert historical data such as PV, SV, and MV into time series data. The cloud server then uses a prediction error algorithm to identify the control loop. The identification result is the expression for the transfer function mentioned above. Finally, the internal model method is used to provide a set of recommended values ​​for PID parameters: k p =0.573,k i =0.0046,k d =0. After the user inputs the recommended values ​​of this group of PID parameters into the field control system and verifies that the parameters are valid, the tuning process is complete.

[0086] (III) The cloud server uses the reinforcement learning DQN algorithm to train a machine learning model and provides parameter tuning suggestions for PID, for k p ,k i ,k d For each of the three parameters, the model will provide one of three adjustment directions and adjustment ranges: "increase", "remain unchanged", or "decrease". Therefore, the model defines a total of 3×3×3=27 parameter adjustment actions.

[0087] When the user selects a machine learning method for parameter tuning, the cloud service... Figure 2 The flowchart illustrates a series of OCR and image processing algorithms that yield corrected parameter state characteristics, including trend images, current PID parameters, overshoot, whether the set value has been reached, whether oscillation has occurred, and the phase difference between the peaks and troughs of MV and PV. The user inputs the initial PID parameters (k... p =1,k i=1,k d =1), after the above parameter state characteristics are input into the model, the parameter tuning machine learning model provides adjustment suggestions, namely, the recommended values ​​for PID parameters, k p =3.17,k i =0.037,k d =0. After the user inputs the recommended values ​​of this group of PID parameters into the field control system and verifies that the parameters are valid, the tuning process is complete.

[0088] It should be noted that the steps of the corresponding methods are not necessarily performed in the order shown and described in this specification in other embodiments. In some other embodiments, the methods may include more or fewer steps than described in this specification. Furthermore, a single step described in this specification may be broken down into multiple steps in other embodiments; and multiple steps described in this specification may be combined into a single step in other embodiments.

[0089] The above description only outlines the basic principles and preferred embodiments of the present invention. Those skilled in the art can make many changes and modifications based on the above description, and these changes and modifications should fall within the protection scope of the present invention.

Claims

1. A PID parameter tuning method based on image recognition, characterized in that, Includes the following steps: Image acquisition: When there is no data connection between the inspection terminal and the field control system, the historical trend chart of the PID loop data to be tuned in the field control system is obtained through the inspection terminal; Image processing: The cloud server receives historical data trend charts transmitted by the inspection terminal, extracts and analyzes the trend charts using image recognition methods, and obtains the PID loop characteristics; Parameter Recommendation: Based on the obtained PID loop characteristics, the cloud server tunes the PID parameters of the control loop using a preset PID parameter tuning method, thereby obtaining recommended PID parameter values. The inspection terminal is configured as a device capable of capturing images, including smartphones, tablets, and cameras; The preset PID parameter tuning methods include, but are not limited to, empirical value method, model identification method, and machine learning method; Specifically, PID parameter tuning using the model identification method includes: The cloud server uses an OCR algorithm to extract and parse the text information in the trend chart obtained by the inspection terminal to obtain PID loop features, which include at least the text information of the PID loop. Identify the four vertices of the trend chart and correct the distortion of the trend chart. Identify the axis scales in the trend chart; The curves in the trend graph are extracted and parsed into time series data with timestamps. The PID loop features also include the time series data. Based on time-series data, the cloud server identifies and tunes the control loop to derive a set of recommended PID parameter values.

2. The PID parameter tuning method based on image recognition according to claim 1, characterized in that, PID parameter tuning using the empirical value method specifically includes: The cloud server uses an OCR algorithm to extract and parse the text information in the trend chart obtained by the inspection terminal to obtain PID loop features, which include the text information of the PID loop. The cloud server determines the current loop type based on the text information of the PID loop; Based on the current loop type, the cloud server compares the values ​​with pre-stored and calibrated PID parameters, and selects at least one set of recommended PID parameter values ​​from the pre-stored and calibrated PID parameters.

3. The PID parameter tuning method based on image recognition according to claim 1, characterized in that, The PID parameter tuning using the machine learning method specifically includes: The cloud server uses an OCR algorithm to extract and parse the text information in the trend chart obtained by the inspection terminal to obtain PID loop features, which include the text information of the PID loop. Identify the four vertices of the trend chart and correct the distortion of the trend chart. The cloud server trains the required parameters to tune the machine learning model based on the distortion-corrected image data; The input parameters required for the parameter tuning machine learning model are extracted from the text information of the PID loop and the image data after distortion correction. The input parameters are then input into the parameter tuning machine learning model. After learning by the parameter tuning machine learning model, a set of recommended values ​​for PID parameters are output.

4. The PID parameter tuning method based on image recognition according to claim 1, 2, or 3, characterized in that, The textual information of a PID loop includes, but is not limited to, tag number, loop process characteristics, current loop parameters, time coordinates, and loop limiting characteristics.

5. The PID parameter tuning method based on image recognition according to claim 3, characterized in that, The input parameters include at least the trend graph, current PID parameters, overshoot, whether the set value has been reached, whether there is oscillation, and the phase difference between the peaks and troughs of MV and PV.

6. The PID parameter tuning method based on image recognition according to any one of claims 1-3 or 5, characterized in that, Following the parameter recommendation step, the process also includes determining whether the recommended PID parameter values ​​are valid, specifically including: The cloud server sends the recommended PID parameter values ​​back to the inspection terminal, sets these recommended values ​​in the field control system, and determines whether the recommended PID parameter values ​​are valid. If effective, the process ends; if ineffective, it returns to the image acquisition step and selects an unused PID parameter tuning method from the preset PID parameter tuning methods in the parameter recommendation step to perform PID parameter tuning again until the obtained recommended PID parameter value is effective.

Citation Information

Patent Citations

  • Machine-learning-based PID parameter self-tuning method and device

    CN107783423A