An automated computer control method based on artificial intelligence
Patent Information
- Application Number
- CN202611087754.4
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2026-07-22
- Publication Date
- 2026-08-18
AI Technical Summary
[0005]因此,本发明提供了一种基于人工智能的自动化计算机控制方法解决复杂扰动因果作用下控制策略安全可信筛选精度不足的问题
[0016] The beneficial effects of this invention are as follows: by constructing virtual scenarios with and without disturbances for each candidate control strategy, and by combining the safety boundary difference with the reliable control barrier, the joint evaluation of the safety margin of the same strategy under both disturbance persistence and disturbance disappearance states is realized. This enables the control system to identify the impact of compensation strategies on the safe operating boundary before execution, and can be used for strategy pre-screening in automated equipment, industrial processes and computer closed-loop control scenarios, thereby improving the safety reliability and execution stability of the target control strategy.
Smart Images

Figure CN122592913A_ABST
Abstract
Description
Technical Field
[0001] This invention relates to the field of intelligent control technology, and in particular to an automated computer control method based on artificial intelligence. Background Technology
[0002] With the development of industrial automation, intelligent manufacturing, and networked control systems, automated computer control methods based on model predictive control, reinforcement learning control, and data-driven optimization have been widely applied in scenarios such as continuous production processes, equipment operation adjustment, environmental parameter control, and multi-actuator collaborative control. These technologies typically collect state data, operating data, and target setpoints to establish a predictive model or strategy model of the controlled object, and generate control quantities based on target deviations within the control cycle to achieve dynamic adjustment and closed-loop control of the controlled object's state.
[0003] In the aforementioned related technologies, to improve the stability of control response, environmental changes, load fluctuations, or operational disturbances are usually used as model input parameters for filtering, normalization, and predictive compensation. However, in scenarios where multiple sources of disturbances act simultaneously and the disturbances have hysteresis propagation characteristics, existing solutions tend to focus on correcting the control output based on the overall deviation or empirical weights, failing to fully distinguish the true causal effect of the disturbance on the state deviation and its contribution to the safety boundary. Therefore, after the candidate control strategy is generated, there may be a problem where the compensation amount meets the amplitude limit, but the safety margin evaluation is inconsistent in the two operating conditions of disturbance persistence or disturbance dissipation. The reason for this is that there is a lack of a linkage evaluation mechanism oriented towards the same causal chain of disturbance between disturbance identification, compensation generation, and safety screening. Summary of the Invention
[0004] In view of the aforementioned existing problems, the present invention is proposed.
[0005] Therefore, this invention provides an automated computer control method based on artificial intelligence to solve the problem of insufficient accuracy in the safety and reliability screening of control strategies under complex causal disturbances.
[0006] To solve the above-mentioned technical problems, the present invention provides the following technical solution: This invention provides an automated computer control method based on artificial intelligence, comprising: acquiring object detection data of the controlled object, performing filtering and normalization processing to generate a basic dataset; performing target value difference operation on the basic dataset to generate state feature quantities; then performing causal disturbance discrimination operation on the state feature quantities to calculate the disturbance causality strength and disturbance contribution weight to generate disturbance state quantities; inputting the disturbance state quantities into a two-layer artificial intelligence model, wherein the predictive control layer sets the prediction time domain and control time domain, continuously solves the basic control sequence and extracts the first and second control quantities to form a basic control strategy, and then the reinforcement compensation layer determines the basic control strategy based on the disturbance causality strength. The compensation increment is calculated based on the disturbance contribution weights to perform amplitude-limited compensation on the basic control strategy, generating a candidate control strategy set. For each candidate control strategy in the candidate control strategy set, a virtual scenario with disturbance retention and a virtual scenario without disturbance are constructed, and pre-execution simulation calculations are performed to generate two types of predicted state variables. The safety boundary difference is calculated through a trusted control barrier, and candidate control strategies with safety boundary differences less than a preset boundary threshold are eliminated. The target control strategy is selected from the remaining candidate control strategies. The target control strategy is converted into a control instruction packet, and the rollback instruction packet is generated in reverse from the control instruction packet. After execution, a feedback data packet is obtained.
[0007] As a preferred embodiment of the artificial intelligence-based automated computer control method of the present invention, the object detection data includes the state data, operation data, environmental data and target value of the controlled object; The filtering process refers to performing a moving average filter on the object detection data according to a time window to remove abnormal jump values and generate smooth detection data. The normalization process refers to linearly mapping the smoothed detection data to a uniform numerical range according to the maximum and minimum values.
[0008] As a preferred embodiment of the artificial intelligence-based automated computer control method of the present invention, the state feature quantity is generated by performing differential processing on the normalized state data and normalized target value within the same control cycle to form a target deviation sequence, and generating a deviation change trend based on the target deviation sequence of the current control cycle and the previous control cycle, and then associating the target deviation sequence with the deviation change trend.
[0009] As a preferred embodiment of the artificial intelligence-based automated computer control method of the present invention, the specific steps of performing causal disturbance discrimination operation on the state feature quantities, calculating the disturbance causal strength and disturbance contribution weight, and generating disturbance state quantities are as follows: Normalized operational data and normalized environmental data within the same time window are used as candidate disturbance sequences. After time-series alignment with state feature quantities, change response pairs are formed within a preset lag time window. The time-delay decay correlation degree and amplitude matching degree of the change response pairs are jointly measured, and the mean of the joint measurement results is used as the disturbance causal strength. The perturbation contribution is calculated based on the perturbation causal strength and candidate perturbation amplitude. The perturbation contribution is then weighted to generate perturbation contribution weights, which are then associated and encapsulated with state feature quantities and perturbation causal strength to generate perturbation state quantities.
[0010] As a preferred embodiment of the artificial intelligence-based automated computer control method of the present invention, the two-layer artificial intelligence model includes a predictive control layer and a reinforcement compensation layer connected in series. The predictive control layer takes state characteristic quantities, normalized target values and preset control constraints as inputs and outputs a basic control strategy. The reinforcement compensation layer takes the basic control strategy, disturbance state quantities, disturbance causality strength and disturbance contribution weights as inputs and outputs a control strategy after limited compensation.
[0011] As a preferred embodiment of the artificial intelligence-based automated computer control method of the present invention, the steps of inputting the disturbance state quantity into a two-layer artificial intelligence model, setting the prediction time domain and control time domain by the predictive control layer, and solving the basic control sequence in a rolling manner and extracting the first and second control quantities to form a basic control strategy are as follows: The disturbance state variables are input into a two-layer artificial intelligence model and analyzed hierarchically. The predictive control layer determines the main disturbance object based on the disturbance contribution weight, and the disturbance causal intensity corresponding to the main disturbance object is smoothed by adjacent control cycles. Then, the prediction range is determined by combining the deviation change trend in the state characteristic variables, and the prediction time domain of the current control cycle is generated. The prediction time domain is converted into the number of cycles according to a preset ratio and rounded up to determine the initial control time domain. The minimum and maximum number of cycles are then imposed on the initial control time domain to generate the control time domain. Based on the basic control sequence of the previous control cycle, the initial control sequence of the current control cycle is constructed, and the state changes of the controlled object are recursively predicted in the prediction time domain. The control quantity is adjusted in the control time domain to generate a constrained basic control sequence. Extract the first control variable from the constrained basic control sequence and use it as the basic control output for the current control cycle to generate the basic control strategy.
[0012] As a preferred embodiment of the artificial intelligence-based automated computer control method of the present invention, the step of further strengthening the compensation layer to calculate the compensation increment based on the disturbance causality strength and disturbance contribution weight, and to perform amplitude-limited compensation on the basic control strategy to generate a candidate control strategy set, is as follows: The enhanced compensation layer determines the main compensation disturbance based on the disturbance causality intensity and disturbance contribution weight, and integrates the disturbance impact information corresponding to the main compensation disturbance with the basic control strategy to generate the compensation input. The compensation increment is calculated based on the compensation input, and the compensation increment is truncated and the rate of change is limited according to the control amplitude limit and control change rate limit of the controlled object to generate a restricted compensation increment. The limited compensation increment is applied to the basic control strategy, and multiple executable candidate control variables are formed according to the preset compensation ratio. Each executable candidate control variable is determined as a candidate control strategy under the corresponding compensation intensity, and a candidate control strategy set is generated.
[0013] As a preferred embodiment of the AI-based automated computer control method of the present invention, the steps are as follows: For each candidate control strategy in the candidate control strategy set, a virtual scenario retaining the disturbance and a virtual scenario removing the disturbance are constructed respectively, and pre-execution simulation calculations are performed to generate two types of predicted state variables. The candidate control strategies in the candidate control strategy set are read sequentially, and the control output and current state of the current candidate control strategy are used as the starting conditions for pre-execution simulation to generate the basic quantities of the pre-execution scenario. The main disturbance corresponding to the current candidate control strategy is determined according to the disturbance contribution weight, the disturbance effect of the main disturbance in the current control cycle is retained, and the main disturbance retention object is generated. The median extension processing is performed on the disturbance change of the main disturbance retention object in adjacent control cycles, and the extended main disturbance is used in the prediction time domain to generate a virtual scene of retained disturbance. Under the same pre-execution simulation start conditions, the main disturbance is replaced with a stable baseline disturbance within the stability detection window, and disturbance transition smoothing is performed within the first two simulation steps to generate a disturbance-free virtual scene; The current candidate control strategy is input into the virtual scenario with retained disturbances, and the state changes of the controlled object are simulated recursively according to the prediction time domain to generate the retained disturbance prediction state quantity. The same current candidate control strategy is input into the virtual scenario without disturbances, and the state changes of the controlled object are simulated recursively according to the same prediction time domain to generate the without disturbance prediction state quantity.
[0014] As a preferred embodiment of the artificial intelligence-based automated computer control method of the present invention, the specific steps of calculating the safety boundary difference through a trusted control barrier, eliminating candidate control strategies whose safety boundary difference is less than a preset boundary threshold, and selecting the target control strategy from the remaining candidate control strategies are as follows: The safety margins of the retained disturbance prediction state quantity and the removed disturbance prediction state quantity relative to the safe operating boundary are calculated using a trusted control barrier, and the safety boundary difference is generated based on the two types of safety margins and the state deviation between the two types of prediction state quantities. The safety boundary difference is compared with a preset boundary threshold. Candidate control strategies with a safety boundary difference less than the preset boundary threshold are eliminated. If all candidate control strategies are eliminated, the candidate control strategy with the largest safety boundary difference is retained to generate a set of remaining candidate control strategies. The candidate control strategy with the largest safety boundary difference is selected from the remaining candidate control strategy set as the target control strategy. If there are multiple candidate control strategies with the same safety boundary difference, the candidate control strategy with the smaller compensation strength is selected as the target control strategy.
[0015] As a preferred embodiment of the artificial intelligence-based automated computer control method of the present invention, the specific steps of converting the target control strategy into a control instruction packet, generating a rollback instruction packet from the control instruction packet, and obtaining a feedback data packet after execution are as follows: Based on the target control strategy matching strategy mapping table, the target control output is converted into the actual control value, and step quantization is performed according to the minimum control resolution of the actuator to generate a control instruction package; Before the control instruction packet is issued, the baseline control state before execution is read, and based on the execution channel and encoding rules of the control instruction packet, the actual control value is replaced with the rollback baseline value to generate the rollback instruction packet. After caching the rollback instruction packet, execute the control instruction packet, and after execution, read the actual execution status and control response results to generate a feedback data packet.
[0016] The beneficial effects of this invention are as follows: by constructing virtual scenarios with and without disturbances for each candidate control strategy, and by combining the safety boundary difference with the reliable control barrier, the joint evaluation of the safety margin of the same strategy under both disturbance persistence and disturbance disappearance states is realized. This enables the control system to identify the impact of compensation strategies on the safe operating boundary before execution, and can be used for strategy pre-screening in automated equipment, industrial processes and computer closed-loop control scenarios, thereby improving the safety reliability and execution stability of the target control strategy. Attached Figure Description
[0017] To more clearly illustrate the technical solutions of the embodiments of the present invention, the drawings used in the following description of the embodiments will be briefly introduced. Obviously, the drawings described below are only some embodiments of the present invention. For those skilled in the art, other drawings can be obtained based on these drawings without creative effort.
[0018] Figure 1 This is a flowchart of an automated computer control method based on artificial intelligence.
[0019] Figure 2 A flowchart for generating perturbation state variables.
[0020] Figure 3 This is a schematic diagram of a two-layer artificial intelligence model control structure.
[0021] Figure 4 The flowchart shows the pre-execution simulation and security screening process for candidate control strategies.
[0022] Figure 5 This diagram illustrates the screening of safety boundary differences for candidate control strategies.
[0023] Figure 6 This is a comparison chart showing the state tracking error and a magnified view of a specific area. Detailed Implementation
[0024] To make the above-mentioned objects, features and advantages of the present invention more apparent and understandable, the specific embodiments of the present invention will be described in detail below with reference to the accompanying drawings.
[0025] Many specific details are set forth in the following description in order to provide a full understanding of the invention. However, the invention may also be practiced in other ways different from those described herein, and those skilled in the art can make similar extensions without departing from the spirit of the invention. Therefore, the invention is not limited to the specific embodiments disclosed below.
[0026] Secondly, the term "one embodiment" or "embodiment" as used herein refers to a specific feature, structure, or characteristic that may be included in at least one implementation of the present invention. The phrase "in one embodiment" appearing in different places in this specification does not necessarily refer to the same embodiment, nor is it a single or selective embodiment that is mutually exclusive with other embodiments.
[0027] Reference Figures 1-6 This is one embodiment of the present invention, which provides an automated computer control method based on artificial intelligence, comprising the following steps: S1. Collect object detection data of the controlled object, perform filtering and normalization processing to generate a basic dataset, perform target value difference operation on the basic dataset to generate state feature quantities, and then perform causal disturbance discrimination operation on the state feature quantities to calculate the disturbance causal strength and disturbance contribution weight to generate disturbance state quantities.
[0028] The object detection data includes the status data of the controlled object (temperature, pressure, position, speed and rotation speed, etc.), operating data (load, torque, power and execution frequency, etc.), environmental data (ambient temperature, humidity, external load disturbances or operating parameters) and target values.
[0029] S1.1 Perform a moving average filter on the object detection data according to the time window to remove abnormal jump values and generate smooth detection data.
[0030] Furthermore, the object detection data is arranged in timestamp order and then slid along the time axis with time windows. Within each time window, the moving average of the object detection data is calculated. Object detection data that deviates from the moving average and does not conform to the overall trend of the object detection data within the time window are identified as abnormal jump values, and the moving average of normal object detection data in adjacent time ranges is used to replace the abnormal jump values. After completing the filtering process for all time windows, the smoothed detection data is output in timestamp order.
[0031] S1.2. Smooth the detection data linearly to a uniform numerical range according to the maximum and minimum values to obtain the basic dataset.
[0032] Furthermore, the smoothing detection data is read in timestamp order. First, the maximum and minimum values of the smoothing detection data are determined from all the smoothing detection data. Then, the proportional position of each smoothing detection data relative to the minimum and maximum values of the smoothing detection data is calculated. Subsequently, the proportional position is mapped to the lower limit and upper limit of a unified numerical range to obtain smoothing detection data with consistent numerical ranges. The smoothing detection data with consistent numerical ranges are then organized into the basic dataset in timestamp order.
[0033] S1.3. Perform differential processing on the normalized state data and normalized target value within the same control cycle to form a target deviation sequence. Generate a deviation change trend based on the target deviation sequence of the current control cycle and the previous control cycle. Associate the target deviation sequence with the deviation change trend to generate state characteristic quantities.
[0034] Furthermore, within the same control cycle, the normalized state data and the normalized target value are aligned according to the sampling time order, and the difference between the normalized state data value corresponding to each sampling time and the normalized target value corresponding to the same sampling time is calculated to obtain the target deviation sequence of the current control cycle. Then calculate the target deviation value corresponding to each sampling time in the target deviation sequence of the current control cycle, and the difference between it and the target deviation value at the same sampling time position in the target deviation sequence of the previous control cycle, to obtain the deviation change trend; According to the sampling time sequence, the target deviation sequence and deviation change trend of the current control cycle are arranged one by one to generate state feature quantities.
[0035] S1.4. Normalized operational data and normalized environmental data within the same time window are used as candidate disturbance sequences. After time-series alignment with state feature quantities, change response pairs are formed within a preset lag time window. The time-delay decay correlation degree and amplitude matching degree of the change response pairs are jointly measured, and the mean of the joint measurement results is used as the disturbance causal strength.
[0036] Furthermore, normalized running data and normalized environmental data are read within the same time window and organized into candidate perturbation sequences according to the sampling time order; the candidate perturbation sequences are matched point by point with state feature quantities according to the sampling time, so that each sampling point in the candidate perturbation sequence matches the corresponding sampling point in the state feature quantity. Within the lag time window, starting from the change time position of the candidate disturbance sequence, the corresponding change time positions of the state characteristic quantity within the lag time window are found, and candidate disturbance sequence changes and state characteristic quantity changes that can form a response correspondence are combined into change-response pairs. For each change-response pair, the time-delay decay correlation is obtained by using the exponential decay result of the time interval between the change time position of the candidate disturbance sequence and the change time position of the state characteristic quantity relative to the length of the lag time window. The amplitude matching degree is obtained by using the ratio of the smaller and larger amplitudes between the amplitude of the candidate disturbance sequence change and the amplitude of the state characteristic quantity response. Then, the time-delay decay correlation and amplitude matching degree of each change-response pair are multiplied, and the mean of the product results of all change-response pairs is taken to obtain the disturbance causality strength, expressed as: ; in: It is the causal strength of the disturbance; This refers to the total number of change response pairs that complete matching within the lag time window. Then the perturbation causality strength of the corresponding candidate perturbation sequence will be determined. Set it to 0, or take a low intensity value, and do not identify the candidate disturbance sequence as the main disturbance object; It is the first The sequence number of each change response pair; It is the first The time position of the change in state characteristic quantities in each change response pair; It is the first The temporal position of the candidate perturbation sequence in each change response pair; It is the length of the lag time window; It is the minimum value between the change amplitude of the candidate perturbation sequence and the response amplitude of the state characteristic quantity; It is the maximum value among the change amplitude of the candidate perturbation sequence and the response amplitude of the state characteristic quantity; It is to avoid dimensionless minimal positive numbers with a denominator of zero. and If all are dimensionless values after normalization, then The dimensionless minimum positive number represents the perturbation causality strength. It is also a dimensionless value; It is the identifier corresponding to the state feature quantity; It is the identifier corresponding to the candidate perturbation sequence; It is the first The magnitude of the change in the candidate perturbation sequence in each change response pair; It is the first The response amplitude of the state characteristic quantity in each change response pair.
[0037] It should also be noted that the change response pairs are selected only if they satisfy... and The changes in candidate perturbation sequences and state characteristic quantities; simultaneously. and They need to be on the same normalization scale.
[0038] The lag time window is set based on the historical response time required from the change of the candidate disturbance sequence to the appearance of the corresponding response in the state characteristic quantity, and covers the shortest effective response interval to the longest effective response interval.
[0039] S1.5 Calculate the degree of disturbance contribution based on the causal intensity of the disturbance and the amplitude of the candidate disturbance, and perform weighting processing on the degree of disturbance contribution to generate disturbance contribution weights, which are then associated and encapsulated with state feature quantities and disturbance causal intensity to generate disturbance state quantities.
[0040] Furthermore, after the candidate perturbation sequence and state feature quantity are aligned in time, continuously changing segments are first identified in the candidate perturbation sequence according to the sampling time. The absolute difference between the candidate perturbation sequence value corresponding to the end sampling time of the continuously changing segment and the candidate perturbation sequence value corresponding to the start sampling time of the continuously changing segment is calculated to obtain the candidate perturbation amplitude. Candidate perturbation amplitudes and perturbation causal strengths are matched one by one according to the same sampling time position, so that each candidate perturbation amplitude has a corresponding perturbation causal strength; then the candidate perturbation amplitude reflects the magnitude of the perturbation change, and the perturbation causal strength reflects the strength of the correlation between the perturbation change and the response of the state characteristic quantity. The product of the candidate perturbation amplitude and the perturbation causal strength is used as the degree of perturbation contribution. After the total disturbance contribution level is formed, the sum of all disturbance contribution levels and values is summarized, and each disturbance contribution level is converted into a proportional result relative to the total disturbance contribution level and value to obtain the disturbance contribution weight. If the total disturbance contribution level and value is 0, the disturbance contribution weight is set to 0, or it is allocated according to the preset uniform weight, and it is prohibited to identify the disturbance object with a disturbance contribution weight of 0 as the main disturbance object. According to the sampling time correspondence, the disturbance contribution weight, state characteristic quantity and disturbance causal strength are arranged into the same disturbance state record, so that the disturbance state record simultaneously contains the disturbance impact ratio, state response content and causal correlation strength, thereby generating a disturbance state quantity, which is used to represent the disturbance impact ratio of each disturbance object in the current control cycle, the corresponding state response content and the causal correlation strength between the disturbance change and the state response.
[0041] It should also be noted that the disturbance state quantity can transform the disturbance changes in the candidate disturbance sequence from simple amplitude information into a disturbance impact representation that can be used for control decision-making. This enables the subsequent predictive control layer to determine the main disturbance object based on the disturbance contribution weight, and enables the reinforcement compensation layer to determine the main compensation disturbance, compensation direction, and compensation magnitude based on the disturbance causality intensity and disturbance contribution weight, thereby improving the adaptability of the basic control strategy and the constrained compensation process to the actual disturbance impact.
[0042] S2. Input the disturbance state variables into the two-layer artificial intelligence model. The predictive control layer sets the prediction time domain and control time domain, solves the basic control sequence in a rolling manner, and extracts the first and second control variables to form the basic control strategy. Then, the reinforcement compensation layer calculates the compensation increment based on the disturbance causality intensity and disturbance contribution weight, performs amplitude-limited compensation on the basic control strategy, and generates a set of candidate control strategies.
[0043] S2.1 The two-layer artificial intelligence model includes a predictive control layer and a reinforcement compensation layer connected in series. The predictive control layer takes state characteristic quantities, normalized target values and preset control constraints as inputs and outputs a basic control strategy. The reinforcement compensation layer takes the basic control strategy, disturbance state quantities, disturbance causality strength and disturbance contribution weights as inputs and outputs a control strategy after limited compensation.
[0044] Furthermore, the predictive control layer is constructed by using the state feature input, the normalized target value input, and the preset control constraint input as the front-end input structure, the predictive time domain configuration part, the candidate control quantity formation part, and the predictive state deviation result filtering part as the internal execution structure, and the basic control strategy output as the back-end output structure. The predictive time domain configuration part is used to limit the prediction scope of the basic control strategy, the candidate control quantity formation part is used to form selectable control quantities within the prediction scope, and the predictive state deviation result filtering part is used to determine the basic control strategy from the candidate control quantities according to the normalized target value and the preset control constraint. The basic control strategy input, disturbance state quantity input, disturbance causality strength input, and disturbance contribution weight input are used as the front-end input structure of the enhanced compensation layer. The compensation direction determination part, compensation magnitude determination part, and limited compensation constraint part are used as the internal execution structure of the enhanced compensation layer. The control strategy output after limited compensation is used as the back-end output structure of the enhanced compensation layer. The enhanced compensation layer is constructed by using the compensation direction determination part to determine the correction direction of the basic control strategy based on the disturbance state quantity and disturbance causality strength, the compensation magnitude determination part to determine the correction magnitude of the basic control strategy based on the disturbance contribution weight, and the limited compensation constraint part to limit the correction magnitude within the range allowed by the preset control constraints. The basic control strategy output of the predictive control layer is sequentially connected to the basic control strategy input of the reinforcement compensation layer, allowing the basic control strategy generated by the predictive control layer to directly enter the reinforcement compensation layer. Then, the disturbance state variables, disturbance causality strength, and disturbance contribution weights are used as parallel inputs to the reinforcement compensation layer, enabling it to determine the limited compensation amount based on the basic control strategy and output the limited-compensation control strategy. The predictive control layer is located at the front stage, and the reinforcement compensation layer is located at the back stage. The control flow follows the sequence of "state characteristic variables, normalized target values, and preset control constraints enter the predictive control layer, the basic control strategy enters the reinforcement compensation layer, and the limited-compensation control strategy is output by the reinforcement compensation layer." The unidirectional sequential connection between the predictive control layer, the reinforcement compensation layer, and the predictive control layer and the reinforcement compensation layer forms a series control structure, resulting in a two-layer artificial intelligence model.
[0045] It should also be noted that the training process of the two-layer artificial intelligence model is as follows: The training samples are sourced from state characteristics, disturbance state quantities, disturbance causality strength, disturbance contribution weights, normalized target values, and actual control results in historical control cycles. The actual control results that satisfy control constraints and reduce the target deviation sequence are used as training labels for the predictive control layer. The mean square error between the basic control strategy and the predictive control layer training labels, along with the penalty term for control constraint violation, are used as the training loss function for the predictive control layer. Then, the difference between the actual control results and the basic control strategy, constrained by the control amplitude and rate of change of the controlled object, is used as the training label for the reinforcement compensation layer. The mean square error between the limited compensation amount and the reinforcement compensation layer training labels, the penalty term for insufficient improvement of the target deviation sequence, and the penalty term for control constraint violation are used as the training loss function for the reinforcement compensation layer. Training stops when the continuous change amplitude of the predictive control layer training loss function and the reinforcement compensation layer training loss function is less than the convergence amplitude, and the limited compensation control strategy in the verification samples satisfies the control constraints.
[0046] It should be noted that the convergence range is determined based on the magnitude of the decrease in the loss function during the initial training phase and the magnitude of the change in the control effect of the validation samples. It is usually taken as the range of loss changes when the change in the loss function has tended to stabilize within consecutive training rounds and the control effect of the validation samples no longer improves significantly.
[0047] Control constraints are determined based on the safe range of control values for the controlled object, the allowable range of changes in adjacent control cycles, and historical stable operation records. They are used to limit the basic control strategy and the control strategy after limitation and compensation from exceeding the safe control range.
[0048] S2.2 Input the disturbance state variables into the two-layer artificial intelligence model and perform hierarchical analysis. The predictive control layer determines the main disturbance object based on the disturbance contribution weight, performs adjacent control cycle smoothing on the disturbance causal intensity corresponding to the main disturbance object, and then determines the prediction range by combining the deviation change trend in the state characteristic variables, and generates the prediction time domain of the current control cycle.
[0049] Furthermore, after inputting the disturbance state quantity into the two-layer artificial intelligence model, the disturbance contribution weight is read and the disturbance objects are arranged according to the size of the disturbance contribution weight. Then, the state feature quantity and disturbance causal strength corresponding to the disturbance object are read, so that each disturbance object corresponds to a clear state response content and causal correlation strength. The predictive control layer selects the disturbance object with the highest disturbance contribution weight from the disturbance objects as the main disturbance object based on the disturbance contribution weight, and extracts the disturbance causality intensity corresponding to the main disturbance object. Then, it reads the disturbance causality intensity corresponding to the main disturbance object in the previous control period, the current control period, and adjacent historical control periods, and calculates the average result or weighted average result in chronological order to obtain the smoothed disturbance causality intensity, which is used to reduce the impact of random fluctuations on the prediction range within a single control period. Then read the deviation change trend in the state feature quantity, and determine the prediction range according to the continuous direction and change magnitude of the deviation change trend. Expand the prediction range when the deviation change trend continues to increase, maintain the prediction range when the deviation change trend tends to stabilize, and shrink the prediction range when the deviation change trend decreases. Convert the prediction range into the time length or sampling steps of the current control cycle, and generate the prediction time domain of the current control cycle.
[0050] S2.3. The prediction time domain is converted into the number of cycles according to a preset ratio and rounded up to determine the initial control time domain. The minimum and maximum number of cycles are then imposed on the initial control time domain to generate the control time domain.
[0051] Furthermore, the predicted time domain length is read according to the predicted time domain of the current control cycle. The predicted time domain length is then converted into the number of control cycles by the preset control ratio to obtain the number of control cycles corresponding to the predicted time domain. When the conversion result has a non-integer part, the conversion result is rounded up to ensure that the initial control time domain covers the complete control cycle. Subsequently, the initial control time domain is compared with the minimum number of cycles and the maximum number of cycles respectively. If the initial control time domain is lower than the minimum number of cycles, the minimum number of cycles is used as the control time domain. If the initial control time domain is higher than the maximum number of cycles, the maximum number of cycles is used as the control time domain. If the initial control time domain is between the minimum number of cycles and the maximum number of cycles, the initial control time domain is retained as the control time domain.
[0052] It should also be noted that the control ratio is set according to the effective control range that the control time domain needs to cover in the prediction time domain. It is usually determined by the ratio between the number of cycles required for the control strategy to take effect in the historical control cycle and the total number of cycles in the prediction time domain.
[0053] The minimum number of cycles is determined based on the shortest number of continuous control cycles required to complete one effective adjustment according to the control strategy.
[0054] The maximum number of cycles is determined based on the longest number of continuous control cycles that the control strategy can operate continuously in the prediction time domain without causing over-adjustment.
[0055] S2.4 Construct the initial control sequence for the current control cycle based on the basic control sequence of the previous control cycle, and recursively predict the state changes of the controlled object in the prediction time domain, and adjust the control quantity in the control time domain to generate a constrained basic control sequence.
[0056] Furthermore, the first control quantity already executed in the basic control sequence of the previous control cycle is removed, and the remaining control quantities are shifted forward in chronological order. The control quantity at the end of the basic control sequence of the previous control cycle is then added to the end of the initial control sequence of the current control cycle, so that the length of the initial control sequence of the current control cycle is consistent with the control time domain. Subsequently, in the prediction time domain, the state characteristic quantity of the current control cycle is used as the starting state, and the state change of the controlled object corresponding to each prediction step is gradually deduced according to the initial control sequence of the current control cycle. The predicted state of each prediction step is compared with the normalized target value to determine the degree of deviation. Within the control time domain, the control quantities in the initial control sequence of the current control cycle are rolled over based on the deviation comparison results. When the deviation increases, the correction magnitude of the corresponding control quantity is increased, and when the deviation decreases, the correction magnitude of the corresponding control quantity is decreased. The rolled-over control quantities are compared with the control constraints one by one. Control quantities that exceed the control constraint range are restricted to the control constraint boundary, while control quantities that are within the control constraint range remain unchanged, thus generating a restricted basic control sequence.
[0057] It should also be noted that control constraints are formulated based on the allowable range of control values, the range of control change rates, and the operational safety boundaries of the controlled object. They are used to limit the magnitude of the control quantity and the magnitude of control change within adjacent control cycles. The range of control constraints is determined based on the rated operating parameters of the controlled object's equipment, the allowable output range of the actuator, the process safety boundaries, and historical stable operating records (including status data generated by the controlled object within control cycles in which safety boundaries are not triggered and execution abnormalities do not occur).
[0058] S2.5 Extract the first and first control variables from the restricted basic control sequence, and use the first and first control variables as the basic control output of the current control cycle to generate the basic control strategy.
[0059] Furthermore, the restricted basic control sequence is read in chronological order, the first and second control values corresponding to the execution position of the current control cycle are extracted from the restricted basic control sequence, and it is verified whether the first and second control values are within the control constraint range. If the first control quantity is within the control constraint range, then the first control quantity is used as the basic control output of the current control cycle; if the first control quantity exceeds the preset control constraint range, then the first control quantity is limited to the control constraint boundary and used as the basic control output of the current control cycle; the basic control output of the current control cycle is recorded as the basic control strategy.
[0060] S2.6 The enhanced compensation layer determines the main compensation disturbance based on the disturbance causality intensity and disturbance contribution weight, and integrates the disturbance impact information corresponding to the main compensation disturbance with the basic control strategy to generate the compensation input.
[0061] Furthermore, the enhanced compensation layer first reads the disturbance causality strength and disturbance contribution weight corresponding to each disturbance object in the disturbance state variables. The disturbance causality strength is used to represent the strength of the correlation between the disturbance object and the response of the state characteristic variable, and the disturbance contribution weight is used to represent the proportion of the disturbance object in the total disturbance impact. The disturbance objects are sorted according to the product of the disturbance causality strength and the disturbance contribution weight, and the disturbance object with the highest product result is selected as the main compensation disturbance. Extract the disturbance impact information corresponding to the main compensation disturbance. The disturbance impact information includes the disturbance causality strength, disturbance contribution weight, candidate disturbance amplitude, and corresponding state characteristic quantity corresponding to the main compensation disturbance. Concatenate and arrange the basic control strategy and the disturbance impact information corresponding to the main compensation disturbance according to the same control period, so that the basic control strategy represents the original control direction of the current control period, and the disturbance impact information corresponding to the main compensation disturbance represents the disturbance source and disturbance intensity that need to be compensated in the current control period, and generate the compensation input quantity used to determine the limited compensation quantity of the enhanced compensation layer.
[0062] S2.7 Calculate the compensation increment based on the compensation input, and truncate the compensation increment and limit the rate of change according to the control amplitude limit and control change rate limit of the controlled object to generate a restricted compensation increment.
[0063] Furthermore, the original control direction is determined based on the basic control strategy, and then the correction direction and magnitude are calculated based on the disturbance impact information corresponding to the main compensation disturbance, generating the compensation increment for the current control cycle, expressed as: ; in: It is the compensation increment for the current control cycle; This is the correction direction for the current control cycle. When the main compensation disturbance causes the deviation of the state characteristic quantity relative to the target value to change in an increasing direction, Choose the direction that reduces the deviation; when the main compensation disturbance causes the deviation to change along the decreasing direction... Take the opposite direction; It is the benchmark for the compensation range allowed in the current control cycle, and the unit is consistent with the control quantity unit of the basic control strategy; It is the causal intensity of the disturbance corresponding to the main compensation disturbance in the current control cycle; It is the disturbance contribution weight corresponding to the main compensation disturbance in the current control cycle; It is the candidate disturbance magnitude corresponding to the main compensation disturbance in the current control cycle; It is the average magnitude of the candidate disturbances within the current control cycle; It is the current control cycle number; The upper and lower limits of the allowable compensation increment are determined based on the control amplitude limit of the controlled object. The compensation increment of the current control period is compared with the upper and lower limits of the allowable compensation increment respectively. When the compensation increment of the current control period is higher than the upper limit of the allowable compensation increment, the upper limit of the allowable compensation increment is used as the compensation increment after amplitude truncation. When the compensation increment of the current control period is lower than the lower limit of the allowable compensation increment, the lower limit of the allowable compensation increment is used as the compensation increment after amplitude truncation. When the compensation increment of the current control period is between the lower and upper limits of the allowable compensation increment, the compensation increment of the current control period is retained as the compensation increment after amplitude truncation. Based on the control change rate limit of the controlled object, determine the allowable range and allowable boundary of the control change rate. Compare the change magnitude between the compensation increment after amplitude truncation in the current control cycle and the limited compensation increment in the previous control cycle. When the change magnitude exceeds the allowable range of the control change rate, limit the compensation increment after amplitude truncation in the current control cycle to within the allowable boundary of the control change rate along the change direction. When the change magnitude does not exceed the allowable range of the control change rate, retain the compensation increment after amplitude truncation in the current control cycle, and use the compensation increment after amplitude truncation and change rate limiting as the limited compensation increment.
[0064] It should also be noted that the allowable compensation range benchmark for the current control cycle is determined based on the control range limit of the controlled object within the current control cycle, and is usually taken as the available range between the upper limit and the lower limit of the allowable compensation increment. The control amplitude limit and control change rate limit of the controlled object are obtained through the rated operating parameters of the controlled object, the rated output parameters of the actuator, the process safety boundary, and historical stable operation records.
[0065] S2.8 Apply the limited compensation increment to the basic control strategy and form multiple executable candidate control quantities according to the preset compensation ratio. Determine each executable candidate control quantity as a candidate control strategy under the corresponding compensation intensity and generate a candidate control strategy set.
[0066] Furthermore, the basic control strategy is first used as the benchmark control variable for the current control cycle. Then, the limited compensation increment is scaled proportionally according to the compensation ratio to obtain the limited compensation increment ratio results corresponding to different compensation intensities. Each limited compensation increment ratio result is synthesized with the basic control strategy to form multiple executable candidate control variables. Each executable candidate control variable is checked to see if it is within the control amplitude limit range of the controlled object. Executable candidate control variables within the control amplitude limit range of the controlled object are directly used as candidate control strategies under the corresponding compensation intensities. Executable candidate control variables exceeding the control amplitude limit range of the controlled object are limited to the control amplitude limit boundary of the controlled object and then used as candidate control strategies under the corresponding compensation intensities. All candidate control strategies are organized in order of compensation intensity to generate a candidate control strategy set.
[0067] It should also be noted that the compensation ratio is set according to the range of intensity in which the limited compensation increment is allowed to participate in the correction in the basic control strategy, and is usually determined by the range of the effective proportion of the compensation increment in the basic control strategy during historical stable control cycles.
[0068] S3. For each candidate control strategy in the candidate control strategy set, construct virtual scenarios with and without disturbances, and perform pre-execution simulation calculations to generate two types of predicted state variables. Calculate the safety boundary difference through a trusted control barrier, eliminate candidate control strategies with safety boundary differences less than a preset boundary threshold, and select the target control strategy from the remaining candidate control strategies.
[0069] S3.1. Read the candidate control strategies in the candidate control strategy set in sequence, and use the control output and current state of the current candidate control strategy as the starting conditions for pre-execution simulation to generate the basic quantities of the pre-execution scenario. Determine the main disturbance corresponding to the current candidate control strategy according to the disturbance contribution weight, retain the disturbance effect of the main disturbance in the current control cycle, and generate the main disturbance retention object.
[0070] Furthermore, the candidate control strategies are read one by one according to the order of the candidate control strategy set. The control output corresponding to the current candidate control strategy is recorded in pairs with the current state as the pre-execution simulation start condition. The pre-execution simulation start condition forms the basic quantity of the pre-execution scenario, so that each candidate control strategy can be pre-executed under the same current state. Read the disturbance contribution weight of each disturbance object from the disturbance state variables of the current control cycle, arrange the disturbance objects in descending order of disturbance contribution weight, and select the disturbance object with the highest disturbance contribution weight that is in the same control cycle as the current candidate control strategy as the main disturbance. Extract the disturbance direction, candidate disturbance amplitude, and disturbance causal intensity corresponding to the main disturbance, and retain the disturbance direction, candidate disturbance amplitude, and disturbance causal intensity corresponding to the main disturbance in the pre-execution scenario basic quantities to form a main disturbance retention object used to represent the main disturbance effect of the current control cycle.
[0071] S3.2 Perform median extension processing on the disturbance change of the main disturbance retention object in adjacent control cycles, and apply the extended main disturbance to the prediction time domain to generate a virtual scene of retained disturbance.
[0072] Furthermore, the disturbance change amounts of the current control cycle, the previous control cycle, and the next adjacent control cycle predicted based on historical disturbance trends are read in the order of control cycles. The disturbance change amounts within adjacent control cycles are sorted according to their numerical values, and the median disturbance change amount is taken as the median disturbance change amount. If there are two median disturbance change amounts, the average of the two median disturbance change amounts is taken as the median disturbance change amount. The abrupt change in the main disturbance retained object in the prediction time domain is replaced with the change in median disturbance, so that the main disturbance retained object remains smooth and continuous in the prediction time domain. The extended main disturbance is applied to the basic quantity of the pre-execution scenario in the time order of the prediction time domain, forming a retained disturbance virtual scenario that includes the current candidate control strategy, the current state, and the influence of the extended main disturbance. This is used to simulate the influence of the current candidate control strategy on the state change of the controlled object when the main disturbance continues to exist in the pre-execution simulation, thereby providing a basis for the subsequent selection of candidate control strategies.
[0073] S3.3 Under the same pre-execution simulation start conditions, the main disturbance is replaced with the stable baseline disturbance within the stability detection window, and disturbance transition smoothing is performed within the first two simulation steps to generate a disturbance-free virtual scene.
[0074] Furthermore, under the same pre-execution simulation start conditions, the current candidate control strategy and current state in the basic quantities of the pre-execution scenario are retained first, so that the virtual scenario with the disturbance removed and the virtual scenario with the disturbance retained have the same start conditions; within the stability detection window, the candidate disturbance sequence values corresponding to the main disturbance are extracted according to the sampling time, and the median or average result of the candidate disturbance sequence values corresponding to the main disturbance is taken as the stable baseline disturbance, which is used to represent the normal disturbance level when the main disturbance is in a stable state, and the main disturbance effect in the main disturbance retention object is replaced by the stable baseline disturbance; Within the first simulation step, the active disturbance is gradually transitioned to the stable baseline disturbance to avoid a sudden disappearance of the disturbance and a jump in the simulation. Within the second simulation step, the residual impact of the active disturbance is further reduced and the participation ratio of the stable baseline disturbance is increased until the disturbance smoothly transitions to the stable baseline disturbance. Starting from the third simulation step, the stable baseline disturbance is continuously used in the prediction time domain to pre-execute the basic quantity of the scenario, generating a virtual scenario with the disturbance removed. This is used to simulate the state change of the controlled object after the active disturbance is replaced by the stable baseline disturbance, thus providing a benchmark for judging the compensation effect of the current candidate control strategy on the active disturbance.
[0075] It should also be noted that the stability detection window is the range of continuous control cycles used to extract stable baseline disturbances. The stability detection window is determined based on continuous control cycles with small fluctuations in state characteristic quantities, no abnormal jumps in candidate disturbance sequences, and gradual changes in the basic control strategy.
[0076] The first simulation step size is the first discrete simulation time position after the start of the prediction time domain, and the second simulation step size is the next discrete simulation time position adjacent to the first simulation step size. The two are determined by the prediction time domain after being discretely divided according to the control period sampling interval and then in chronological order.
[0077] S3.4 Input the current candidate control strategy into the retained disturbance virtual scenario, recursively simulate the state change of the controlled object according to the prediction time domain, and generate the retained disturbance prediction state quantity. Input the same current candidate control strategy into the removed disturbance virtual scenario, recursively simulate the state change of the controlled object according to the same prediction time domain, and generate the removed disturbance prediction state quantity.
[0078] Furthermore, in the virtual scenario with preserved disturbances, the current state in the pre-execution simulation start conditions is used as the starting state of the controlled object for the first prediction step; the control output of the current candidate control strategy at the current prediction step is read, and the disturbance effect of the main disturbance at the current prediction step is read; based on the offset direction and offset magnitude of the control output relative to the basic control strategy, the state change component caused by the control output is obtained, and based on the offset direction and offset magnitude of the main disturbance relative to the stable baseline disturbance, the state change component caused by the main disturbance is obtained. Then, the state change components caused by the control output and the state change components caused by the main disturbance are synthesized with the initial state of the controlled object in the current prediction step to obtain the state change result of the controlled object in the current prediction step. When entering the next prediction step, the state change result of the controlled object obtained in the previous prediction step is used as the new initial state of the controlled object, and the process of reading the control output, reading the main disturbance, synthesizing the state change components and updating the state of the controlled object is repeated until all prediction steps cover the complete prediction time domain, and the preserved disturbance prediction state quantity is generated. In the disturbance-free virtual scenario, the same pre-execution simulation start conditions and the same current candidate control strategy are still used as the simulation start point. The main disturbance is replaced with a stable baseline disturbance, and the state change of the controlled object is gradually deduced according to the same prediction time domain to obtain the state change result of the controlled object corresponding to each prediction step. The disturbance-free predicted state quantities are then generated according to the prediction step order.
[0079] It should also be noted that the state change result of the controlled object refers to the change result of the state characteristic quantity formed by the controlled object under the combined influence of the control output and disturbance of the current candidate control strategy within each prediction step, which is used to represent the prediction deviation of the controlled object relative to the normalized target value.
[0080] S3.5 Calculate the safety margins of the retained disturbance prediction state quantity and the removed disturbance prediction state quantity relative to the safe operating boundary through the trusted control barrier, and generate the safety boundary difference based on the two types of safety margins and the state deviation between the two types of prediction state quantities.
[0081] Furthermore, the preserved disturbance prediction state and the removed disturbance prediction state are input into the trusted control barrier. The trusted control barrier calculates the boundary distance for the controlled object state corresponding to each prediction step according to the safe operating boundary, obtaining the safety margins of the preserved disturbance prediction state and the removed disturbance prediction state relative to the safe operating boundary. Subsequently, at the same prediction step, the difference between the safety margins corresponding to the preserved disturbance prediction state and the removed disturbance prediction state is calculated, and the state deviation between the preserved disturbance prediction state and the removed disturbance prediction state is simultaneously calculated. The safety margins for each prediction step are then... The quantity difference and state deviation are normalized and then weighted and summed according to the preset safety boundary fusion weights, or the minimum safety margin improvement value is taken to obtain the safety boundary difference corresponding to the current candidate control strategy. This value is used to characterize the difference in the impact of the current candidate control strategy on the safe operating boundary between the main disturbance retention state and the main disturbance removal state. The larger the safety boundary difference, the more the current candidate control strategy can maintain a large safety margin improvement effect when the main disturbance exists, and the state deviation between the retained disturbance prediction state quantity and the removed disturbance prediction state quantity is within a distinguishable range. Therefore, the safety boundary difference can be used as the basis for subsequent elimination of candidate control strategies with low safety improvement and screening of target control strategies.
[0082] It should also be noted that the credible control barrier is determined based on the allowable operating range of the controlled object, the process safety boundary, and historical stable operating records. The safe operating boundary is then converted into a computable boundary constraint relationship, so that the predicted state quantity of the controlled object corresponding to each prediction step can be obtained by comparing the distance with the safe operating boundary. When the safe operating boundary is an upper and lower limit interval, the safety margin is taken as the minimum distance from the predicted state quantity to the upper and lower limit boundaries. When the state quantity is a multi-dimensional vector, the minimum value or weighted sum of the normalized safety margins of each dimension is taken as the safety margin for that prediction step.
[0083] A trusted control barrier is a safety judgment structure used to constrain the predicted state quantity of a controlled object from exceeding the safe operating boundary. The trusted control barrier outputs a safety margin based on the distance relationship between the predicted state quantity with or without disturbance and the safe operating boundary. This margin represents the remaining safety space of the predicted state quantity of the controlled object from the risk boundary.
[0084] The safe operating boundary is determined based on the permissible operating range of the controlled object, the process safety boundary, and historical stable operating records. It is used to limit the safe range that the predicted state variables of the controlled object can reach.
[0085] The safety margin is obtained by calculating the boundary distance between the predicted state quantity of the controlled object and the safe operating boundary, and is used to represent the remaining safety space of the predicted state quantity of the controlled object from the safe operating boundary.
[0086] The safety boundary fusion weight is usually set according to the contribution ratio of the safety margin improvement effect and the state deviation change effect to the candidate control strategy screening results in the historical stable control cycle. It is used to allocate the influence ratio of safety margin difference and state deviation in the safety boundary difference generation process.
[0087] S3.6. Compare the safety boundary difference with the preset boundary threshold, and eliminate candidate control strategies whose safety boundary difference is less than the preset boundary threshold. If all candidate control strategies are eliminated, retain the candidate control strategy with the largest safety boundary difference to generate a set of remaining candidate control strategies.
[0088] Furthermore, the safety boundary difference value corresponding to each candidate control strategy is read in the order of the candidate control strategies in the candidate control strategy set, and the safety boundary difference value is compared with the boundary threshold item by item. When the safety boundary difference value is less than the boundary threshold, it means that the change in safety margin before and after the main disturbance is insufficient, and the improvement effect of the current candidate control strategy on the safe operating boundary does not meet the screening requirements, so the current candidate control strategy is eliminated. When the safety boundary difference value is greater than or equal to the boundary threshold, it means that the current candidate control strategy has an effective improvement effect on the safe operating boundary, so the current candidate control strategy is retained. If all candidate control strategies in the candidate control strategy set are eliminated, the candidate control strategy with the largest safety boundary difference value is selected as the backup candidate control strategy, and the backup candidate control strategy is written separately into the remaining candidate control strategy set to avoid the remaining candidate control strategy set being empty. After the screening of all candidate control strategies is completed, the retained candidate control strategies are organized to generate the remaining candidate control strategy set. It should also be noted that the boundary threshold is set based on the normal fluctuation range of the safety boundary difference within the historical stable control cycle and the minimum amount of safety improvement required to be retained at the safe operating boundary. The boundary threshold value ranges from zero to the maximum allowable value of the safety boundary difference; when the safety boundary difference is normalized, the boundary threshold value ranges from 0 to 1. The range of boundary threshold values is based on the dimensional range of the safety boundary difference, the range of safety margin variation, and the range of boundary differences in which candidate control strategies can bring about effective safety improvements in historical stable operation records.
[0089] S3.7 Select the candidate control strategy with the largest safety boundary difference from the remaining candidate control strategy set as the target control strategy. If there are multiple candidate control strategies with the same safety boundary difference, select the candidate control strategy with the smaller compensation strength as the target control strategy.
[0090] Furthermore, the safety boundary difference corresponding to each candidate control strategy is read in the order of the remaining candidate control strategy set, and the safety boundary difference is sorted from largest to smallest. The candidate control strategy with the largest safety boundary difference is selected as the target control strategy, which is used to prioritize the control result that has the greatest effect on improving the safety operating boundary. If there are multiple candidate control strategies with the same safety boundary difference, the compensation intensity corresponding to the multiple candidate control strategies is compared, and the candidate control strategy with the smaller compensation intensity is selected as the target control strategy, which is used to reduce the control compensation magnitude when the safety boundary improvement effect is the same.
[0091] like Figure 5As shown, there are significant differences in the safety boundary difference values corresponding to different candidate control strategies. Candidate control strategies with safety boundary differences below a preset boundary threshold are eliminated, while those with safety boundary differences reaching or exceeding the preset boundary threshold are retained. The figure shows that candidate control strategy C3 has a safety boundary difference value higher than the preset boundary threshold and exhibits a better safety boundary improvement effect compared to other candidate control strategies; therefore, it is selected as the target control strategy. This result demonstrates that the present invention does not simply select the control strategy with the highest compensation strength, but rather jointly evaluates the safety margin under both the retained and removed perturbation virtual scenarios through a trusted control barrier, and performs pre-screening of candidate control strategies based on the safety boundary difference, thereby improving the safety and trustworthiness of the target control strategy.
[0092] S4. Convert the target control policy into a control instruction packet, and generate a rollback instruction packet from the control instruction packet. After execution, obtain a feedback data packet.
[0093] S4.1. Based on the target control strategy matching strategy mapping table, convert the target control output into the actual control value, and perform step quantization according to the minimum control resolution of the actuator to generate a control instruction package.
[0094] Furthermore, the target control output is read according to the target control strategy, and the corresponding mapping interval or mapping entry is found in the strategy mapping table. If the target control output falls into the mapping interval in the strategy mapping table, the target control output is converted into an actual control value that the actuator can recognize according to the proportional relationship corresponding to the mapping interval. If the target control output is consistent with the mapping entry in the strategy mapping table, the actual control value corresponding to the mapping entry is directly taken. The actual control value is quantized stepwise according to the minimum control resolution of the actuator. The adjacent executable step values to which the actual control value falls are compared, and the executable step value that is closest to the actual control value and meets the control range of the actuator is selected as the quantized control value. The quantized control value, the current control cycle identifier, and the actuator identifier are written into the same control record to generate a control instruction package.
[0095] It should also be noted that the minimum control resolution of the actuator is determined based on the actuator's rated output parameters, minimum responsive control variation, and historical stable execution records.
[0096] The strategy mapping table is derived from the calibration results of the actuator and historical stable execution records. It extracts the correspondence between the target control output and the actual control value, forms a mapping interval or mapping entry, and is generated after being verified by the actuator control range and minimum control resolution.
[0097] S4.2 Before the control instruction package is issued, read the baseline control state before execution, and based on the execution channel and encoding rules of the control instruction package, replace the actual control value with the rollback baseline value to generate the rollback instruction package.
[0098] Furthermore, before issuing the control instruction package, the pre-execution baseline control state is read first, and the current control quantity of the actuator corresponding to the control instruction package is extracted from the pre-execution baseline control state as the rollback baseline quantity. Then, the execution channel, actuator identifier, encoding rule, and actual control value fields in the control instruction package are read. The execution channel, actuator identifier, and encoding rule remain unchanged, and only the actual control value field is replaced with the rollback baseline quantity. After the replacement is completed, the issueable instruction content is re-formed according to the encoding rule, which is consistent with the format of the control instruction package, so that the rollback instruction package can restore the actuator to the pre-execution baseline control state through the same execution channel. The rollback baseline quantity, execution channel, actuator identifier, current control cycle identifier, and rollback identifier are written into the same instruction record to generate the rollback instruction package.
[0099] It should also be noted that the execution channel of the control instruction package is determined by the actuator identifier, the connection address of the controlled object, and the control instruction distribution path, so that the control instruction package can be sent to the actuator corresponding to the target control strategy and ensure that the actual control value in the control instruction package acts on the correct controlled object.
[0100] The encoding rules of the control instruction package are determined by the instruction format that the actuator can recognize. Specifically, these include the position of the actual control value field, the length of the actual control value field, the numerical unit conversion relationship, the instruction verification method, and the field arrangement order, so that the actual control value can be converted into instruction content that the actuator can read and execute.
[0101] S4.3 After caching the rollback instruction packet, execute the control instruction packet, and after execution, read the actual execution status and control response results to generate a feedback data packet.
[0102] Furthermore, the rollback instruction package is written to the rollback instruction package buffer, and the rollback instruction package is recorded in correspondence with the current control cycle and control instruction package. Then, control instruction packages are issued according to the execution channel in the control instruction package, so that the actuator completes the control action according to the quantized control value in the control instruction package. After the control instruction package is executed, the actual execution status returned by the actuator is read, and the status change of the controlled object in the current control cycle is read as the control response result. The correspondence between the control instruction package and the rollback instruction package, the actual execution status, and the control response result are organized into a feedback data package according to the current control cycle.
[0103] It should also be noted that the control response result refers to the state change result of the controlled object in the current control cycle after the control instruction package is executed, which is used to characterize the actual impact of the quantified control value on the operating state of the controlled object.
[0104] like Figure 6 As shown, the state tracking errors of the conventional closed-loop control method, the scenario-selection strategy without dual scenarios, and the method of this invention differ significantly under the same main disturbance conditions. In the overview figure, the conventional closed-loop control method exhibits large state tracking errors during the enhancement and persistence phases of the main disturbance, indicating its weak adaptability to disturbance changes. While the scenario-selection strategy without dual scenarios can reduce errors in some phases, it still shows significant error rebound during the disturbance decay phase. The method of this invention constructs virtual scenarios with and without disturbances for candidate control strategies, and then uses a trusted control barrier to calculate the safety boundary difference before selecting the target control strategy, thus keeping the overall state tracking error within a low and relatively stable range. A closer look at the partial enlarged figure further shows that within the control period range where the error difference is most significant, the method of this invention has a lower state tracking error than the scenario-selection strategy without dual scenarios, indicating that this invention can improve the execution stability of the target control strategy.
[0105] Conventional closed-loop control methods refer to conventional control approaches that generate control variables solely based on the deviation between the current actual state and the target state. While this method can provide basic feedback regulation, it lacks the ability to construct virtual scenarios that retain or remove disturbances for candidate control strategies, and it also fails to calculate the safety boundary difference through a reliable control barrier. Therefore, when the main disturbance intensifies or persists, this method struggles to determine whether the future state is approaching or exceeding the safety operating boundary before the control strategy is executed, easily leading to increased state tracking errors and decreased control stability.
[0106] The dual-scenario selection strategy refers to selecting a control strategy based solely on the predicted effect or control error under a single disturbance state after generating candidate control strategies, without simultaneously constructing and jointly evaluating virtual scenarios that retain and remove disturbances. Compared to ordinary closed-loop control methods, this method has certain predictive and compensation capabilities, thus reducing state tracking errors in some control cycles. However, because it lacks evaluation of the safety margin under the disturbance fading state and does not incorporate a credible control barrier to calculate the safety boundary difference, it is prone to selecting candidate control strategies with excessive compensation or insufficient safety margin when the main disturbance changes from a persistent state to a fading state, thereby causing error rebound or potential safety boundary risks.
[0107] In summary, this invention achieves joint evaluation of the safety margin of the same strategy under both the persistent and fading disturbance states by constructing virtual scenarios with and without disturbance for each candidate control strategy and calculating the safety boundary difference in conjunction with a reliable control barrier. This enables the control system to identify the impact of compensation strategies on the safe operating boundary before execution, and can be used for strategy pre-screening in automated equipment, industrial processes, and computer closed-loop control scenarios, thereby improving the safety reliability and execution stability of the target control strategy.
[0108] It should be noted that the above embodiments are only used to illustrate the technical solutions of the present invention and are not intended to limit it. Although the present invention has been described in detail with reference to preferred embodiments, those skilled in the art should understand that modifications or equivalent substitutions can be made to the technical solutions of the present invention without departing from the spirit and scope of the technical solutions of the present invention, and all such modifications or substitutions should be covered within the scope of the claims of the present invention.
Claims
1. An automated computer control method based on artificial intelligence, characterized in that, include: Collect object detection data of the controlled object, perform filtering and normalization processing to generate a basic dataset, perform target value difference operation on the basic dataset to generate state feature quantities, and then perform causal disturbance discrimination operation on the state feature quantities to calculate the disturbance causal strength and disturbance contribution weight to generate disturbance state quantities. The disturbance state variables are input into the two-layer artificial intelligence model. The predictive control layer sets the prediction time domain and control time domain, solves the basic control sequence in a rolling manner, and extracts the first and second control variables to form the basic control strategy. Then, the reinforcement compensation layer calculates the compensation increment based on the disturbance causality intensity and disturbance contribution weight, performs amplitude-limited compensation on the basic control strategy, and generates a set of candidate control strategies. For each candidate control strategy in the candidate control strategy set, a virtual scenario with and without disturbance is constructed, and a pre-execution simulation is performed to generate two types of predicted state variables. The safety boundary difference is calculated through a trusted control barrier, and candidate control strategies with safety boundary differences less than a preset boundary threshold are eliminated. The target control strategy is selected from the remaining candidate control strategies. The target control policy is converted into a control instruction packet, and the rollback instruction packet is generated from the control instruction packet. After execution, a feedback data packet is obtained.
2. The automated computer control method based on artificial intelligence as described in claim 1, characterized in that, The object detection data includes the controlled object's status data, operational data, environmental data, and target value; The filtering process refers to performing a moving average filter on the object detection data according to a time window to remove abnormal jump values and generate smooth detection data. The normalization process refers to linearly mapping the smoothed detection data to a uniform numerical range according to the maximum and minimum values.
3. The automated computer control method based on artificial intelligence as described in claim 2, characterized in that, The state feature quantity is generated by performing differential processing on the normalized state data and normalized target value within the same control cycle to form a target deviation sequence, and generating a deviation change trend based on the target deviation sequence of the current control cycle and the previous control cycle, and then associating the target deviation sequence with the deviation change trend.
4. The automated computer control method based on artificial intelligence as described in claim 3, characterized in that, The specific steps for performing causal perturbation discrimination on the state feature quantities, calculating the perturbation causal strength and perturbation contribution weight, and generating perturbation state quantities are as follows: Normalized operational data and normalized environmental data within the same time window are used as candidate disturbance sequences. After time-series alignment with state feature quantities, change response pairs are formed within a preset lag time window. The time-delay decay correlation degree and amplitude matching degree of the change response pairs are jointly measured, and the mean of the joint measurement results is used as the disturbance causal strength. The perturbation contribution is calculated based on the perturbation causal strength and candidate perturbation amplitude. The perturbation contribution is then weighted to generate perturbation contribution weights, which are then associated and encapsulated with state feature quantities and perturbation causal strength to generate perturbation state quantities.
5. The automated computer control method based on artificial intelligence as described in claim 1, characterized in that, The two-layer artificial intelligence model includes a predictive control layer and a reinforcement compensation layer connected in series. The predictive control layer takes state feature quantities, normalized target values and preset control constraints as inputs and outputs a basic control strategy. The reinforcement compensation layer takes the basic control strategy, disturbance state quantities, disturbance causality strength and disturbance contribution weights as inputs and outputs a control strategy after limited compensation.
6. The automated computer control method based on artificial intelligence as described in claim 5, characterized in that, The process involves inputting the disturbance state variables into a two-layer artificial intelligence model, where the predictive control layer sets the prediction and control time domains, and the basic control sequence is solved in a rolling manner, with the first and second control variables extracted to form the basic control strategy. The specific steps are as follows: The disturbance state variables are input into a two-layer artificial intelligence model and analyzed hierarchically. The predictive control layer determines the main disturbance object based on the disturbance contribution weight, and the disturbance causal intensity corresponding to the main disturbance object is smoothed by adjacent control cycles. Then, the prediction range is determined by combining the deviation change trend in the state characteristic variables, and the prediction time domain of the current control cycle is generated. The prediction time domain is converted into the number of cycles according to a preset ratio and rounded up to determine the initial control time domain. The minimum and maximum number of cycles are then imposed on the initial control time domain to generate the control time domain. Based on the basic control sequence of the previous control cycle, the initial control sequence of the current control cycle is constructed, and the state changes of the controlled object are recursively predicted in the prediction time domain. The control quantity is adjusted in the control time domain to generate a constrained basic control sequence. Extract the first control variable from the constrained basic control sequence and use it as the basic control output for the current control cycle to generate the basic control strategy.
7. The automated computer control method based on artificial intelligence as described in claim 1 or 5, characterized in that, The next step involves the reinforcement compensation layer calculating the compensation increment based on the disturbance causality strength and disturbance contribution weight, applying amplitude-limited compensation to the basic control strategy, and generating a candidate control strategy set. The specific steps are as follows: The enhanced compensation layer determines the main compensation disturbance based on the disturbance causality intensity and disturbance contribution weight, and integrates the disturbance impact information corresponding to the main compensation disturbance with the basic control strategy to generate the compensation input. The compensation increment is calculated based on the compensation input, and the compensation increment is truncated and the rate of change is limited according to the control amplitude limit and control change rate limit of the controlled object to generate a restricted compensation increment. The limited compensation increment is applied to the basic control strategy, and multiple executable candidate control variables are formed according to the preset compensation ratio. Each executable candidate control variable is determined as a candidate control strategy under the corresponding compensation intensity, and a candidate control strategy set is generated.
8. The automated computer control method based on artificial intelligence as described in claim 7, characterized in that, For each candidate control strategy in the candidate control strategy set, a virtual scenario with and without disturbance is constructed, and pre-execution simulation calculations are performed to generate two types of predicted state variables. The specific steps are as follows: The candidate control strategies in the candidate control strategy set are read sequentially, and the control output and current state of the current candidate control strategy are used as the starting conditions for pre-execution simulation to generate the basic quantities of the pre-execution scenario. The main disturbance corresponding to the current candidate control strategy is determined according to the disturbance contribution weight, the disturbance effect of the main disturbance in the current control cycle is retained, and the main disturbance retention object is generated. The median extension processing is performed on the disturbance change of the main disturbance retention object in adjacent control cycles, and the extended main disturbance is used in the prediction time domain to generate a virtual scene of retained disturbance. Under the same pre-execution simulation start conditions, the main disturbance is replaced with a stable baseline disturbance within the stability detection window, and disturbance transition smoothing is performed within the first two simulation steps to generate a disturbance-free virtual scene; The current candidate control strategy is input into the virtual scenario with retained disturbances, and the state changes of the controlled object are simulated recursively according to the prediction time domain to generate the retained disturbance prediction state quantity. The same current candidate control strategy is input into the virtual scenario without disturbances, and the state changes of the controlled object are simulated recursively according to the same prediction time domain to generate the without disturbance prediction state quantity.
9. The automated computer control method based on artificial intelligence as described in claim 8, characterized in that, The specific steps for calculating the security boundary difference through a trusted control barrier, eliminating candidate control strategies whose security boundary difference is less than a preset boundary threshold, and selecting the target control strategy from the remaining candidate control strategies are as follows: The safety margins of the retained disturbance prediction state quantity and the removed disturbance prediction state quantity relative to the safe operating boundary are calculated using a trusted control barrier, and the safety boundary difference is generated based on the two types of safety margins and the state deviation between the two types of prediction state quantities. The safety boundary difference is compared with a preset boundary threshold. Candidate control strategies with a safety boundary difference less than the preset boundary threshold are eliminated. If all candidate control strategies are eliminated, the candidate control strategy with the largest safety boundary difference is retained to generate a set of remaining candidate control strategies. The candidate control strategy with the largest safety boundary difference is selected from the remaining candidate control strategy set as the target control strategy. If there are multiple candidate control strategies with the same safety boundary difference, the candidate control strategy with the smaller compensation strength is selected as the target control strategy.
10. The automated computer control method based on artificial intelligence as described in claim 9, characterized in that, The specific steps for converting the target control strategy into control command packets, generating rollback command packets from the control command packets, and obtaining feedback data packets after execution are as follows: Based on the target control strategy matching strategy mapping table, the target control output is converted into the actual control value, and step quantization is performed according to the minimum control resolution of the actuator to generate a control instruction package; Before the control instruction packet is issued, the baseline control state before execution is read, and based on the execution channel and encoding rules of the control instruction packet, the actual control value is replaced with the rollback baseline value to generate the rollback instruction packet. After caching the rollback instruction packet, execute the control instruction packet, and after execution, read the actual execution status and control response results to generate a feedback data packet.