Safety scheduling method of real-time control system under burst computing task
By modeling the scheduling problem as a mixed integer programming problem, dynamically selecting resource allocation, and discarding tasks that have a small impact on the control system, the impact of sudden computing tasks on the security and performance of the industrial control system is solved, and the effective utilization of resources is achieved. efficient operation of the system.
Patent Information
- Application Number
- CN202410726933.2
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2024-06-05
- Publication Date
- 2024-09-03
AI Technical Summary
In an industrial environment, the random occurrence and high priority of sudden computing tasks lead to resource preemption of regular control tasks, which may lead to security issues in the control system. Existing technologies fail to effectively distinguish the priority differences of regular tasks, affecting the security and safety of the system. performance.
By modeling the scheduling problem as a mixed integer programming problem, the impact of each regular task on the safety and performance of the control system is analyzed, resource allocation is dynamically selected, tasks with low impact on safety and performance are discarded, and emergent tasks are ensured before the deadline. Complete, and optimize resource allocation through approximate dynamic programming.
It is possible to improve control system performance, ensure system security, optimize resource utilization, and reduce problem complexity and computing resource requirements on the premise of ensuring timely completion of emergency tasks.
Smart Images

Figure CN118585301A
Abstract
Description
Technical Field
[0001] The present invention relates to the industrial field, and in particular to a safe scheduling method for a real-time control system under a burst computing task. Background Art
[0002] Real-time control systems are key components of cyber-physical systems and are widely used in industrial fields such as smart grids and intelligent robots. The safety of real-time control systems depends on the timely and reliable processing of sensing, computing, and execution tasks. However, in industrial environments, emergencies may lead to higher priority burst computing tasks, which are characterized by random occurrence, high priority, and need to be completed within a limited time. Although reserved resources can ensure the timely processing of burst tasks, due to the low probability of these tasks, the reserved resources are unused most of the time, which leads to low overall resource utilization. Under limited computing resources, conventional control computing tasks have occupied most of the resources, resulting in burst computing tasks randomly preempting the resources of conventional control computing tasks, which in turn causes critical control computing tasks to miss their deadlines. Therefore, it is impossible to apply ideal control inputs, resulting in the deviation of the actual state trajectory from the nominal state trajectory. When this deviation exceeds the threshold, it will affect the safety of the control system. For example, an industrial robot that fails to perform tasks as expected may collide with other equipment, thereby damaging the robotic arm equipment.
[0003] At present, relevant research has been conducted to solve the above problems by designing scheduling algorithms. Among them, the safety-aware scheduling scheme limits the impact of control computing tasks missing the deadline by limiting the maximum deviation of the system state trajectory from the nominal trajectory. The scheduling scheme for mixed criticality systems ensures the completion of high-criticality tasks (such as sudden emergency tasks) by sacrificing low-criticality tasks. The stealing priority scheduling algorithm temporarily allocates resources originally allocated to regular tasks to emergency tasks to ensure the timely completion of emergency tasks, aiming to reduce the impact of emergency tasks by minimizing the number of resources mobilized. However, these methods usually fail to distinguish the priority differences between regular control computing tasks. Among them, the task criticality of mixed criticality systems is usually preset, and the impact of whether the control computing task is completed before the deadline on the system safety and performance is closely related to the current state of the control system. Therefore, different task combinations that release the same resources will also have different effects on the safety and performance of the control system. How to design a scheduling scheme to deal with sudden computing tasks in order to improve the performance of the control system while ensuring the timely completion of sudden computing tasks and the safety of the control system is a key issue that needs to be solved urgently.
[0004] After searching the existing literature, it is found that the most similar implementation scheme is: the Chinese patent application number is CN202210825304.6, and the name is: a task scheduling optimization method for industrial data, and its specific approach is: the fault handling industrial task is classified into the emergency priority ready queue, and other industrial tasks are classified into the ordinary priority ready queue. First, complete all emergency tasks. If there are sufficient resources, directly use the remaining resources to process the current task; if there are insufficient resources, seize the resources of the currently executing task to execute this pending emergency task. However, this scheme does not consider the impact of the untimely completion of ordinary tasks on the system, which may cause the control system to miss critical tasks and undermine its safety; the patent application number is 202210495292.5, and the name is a high-reliability satellite autonomous task planning method and system for emergency tasks. Its specific approach is to re-plan the emergency task with the unexecuted non-emergency tasks, and ensure the completion of the emergency task by deleting some non-emergency tasks. However, this scheme does not make any guarantees for non-emergency tasks. Summary of the invention
[0005] In view of the above-mentioned defects of the prior art, the technical problem to be solved by the present invention is how to design a scheduling scheme to cope with sudden computing tasks so as to improve the performance of the control system while ensuring that the sudden computing tasks are completed in time and the control system is safe.
[0006] To achieve the above-mentioned purpose, the present invention provides a safe scheduling method for real-time control systems under burst computing tasks, characterized in that the method analyzes the impact of different routine tasks on the safety and performance of the control system, designs a safety-aware scheduling method to optimize resource allocation; and ensures that burst tasks are completed before the deadline by discarding routine tasks that have a lower impact on the safety and performance of the control system.
[0007] Furthermore, the safety-aware scheduling method is to model the scheduling problem as a mixed integer programming problem, mathematically quantify the specific impact of the completion of each routine task on the safety and performance of the control system; define a set of binary variables, assign a variable to each routine task, where 1 indicates that the task is executed and 0 indicates that the task is abandoned; and use the control quadratic cost of the control system as the objective function to dynamically select the scheduling plan that makes the system control system optimal.
[0008] Furthermore, the mixed integer programming problem ensures the safety of the control system by limiting the deviation between the actual trajectory and the nominal trajectory; and constructs resource constraints for burst tasks and regular tasks to ensure that the resources released by abandoning regular tasks are sufficient to complete the burst computing tasks before the deadline.
[0009] Furthermore, the mixed integer programming problem first decouples the complex problem according to the different control systems to which the routine tasks belong, and divides the entire optimization problem into sub-problems corresponding to each control system, thereby reducing the problem scale and accelerating the solution; for each sub-problem, the original scheduling problem is transformed into a trade-off problem between resource cost and control performance, and is efficiently solved based on the idea of approximate dynamic programming.
[0010] Furthermore, the decoupling of the mixed integer programming problem is to transform the only coupling constraint in the original optimization problem - the resource constraint, into a penalty term in the objective function.
[0011] Furthermore, in the mixed integer programming problem, for each sub-problem, an approximate method is used to estimate the value function of each routine task; the value function reflects the system control performance and resource cost corresponding to whether the routine task is completed; based on the idea of dynamic programming, according to the time sequence of the execution of routine tasks, routine tasks that do not improve the control system performance much relative to the resource cost are abandoned in turn based on the value function, thereby providing sufficient resources for emergency tasks to ensure their timely completion.
[0012] Furthermore, the method comprises the following steps:
[0013] Step 1: Define the application scenario; the control computing tasks of n control systems are executed periodically on the edge server, which are regular tasks; at the same time, burst computing tasks are triggered randomly; calculate the nominal trajectory of each control system, that is, the system trajectory when all control computing tasks are completed before the deadline;
[0014] Step 2: Determine the regular control computing tasks between the triggering time of the burst task and the absolute deadline, and assign a 0 / 1 variable θ to each of these tasks i,j , when θ i,j =0, indicating that the task is abandoned, and the control system adopts the system input of the previous moment; when θ i,j =1, indicating that the task is executed normally, and the control system updates the input with the current state. Therefore, according to the influence of whether the above conventional control calculation task is completed on the system input, the iterative relationship constraint of the system state is constructed;
[0015] Step 3: Construct resource constraints based on the requirement that the sum of the execution time required for the burst task and the regular control computing task cannot exceed the deadline of the burst task;
[0016] Step 4: Construct a safety constraint based on the fact that the deviation between the actual trajectory and the nominal trajectory of the system cannot exceed the safety threshold;
[0017] Step 5: construct a cost function of the control system and establish the resource allocation optimization problem under the state iteration constraints, resource constraints and safety constraints;
[0018] Step 6: Solve the above scheduling problem according to the algorithm ADP-Opt;
[0019] Furthermore, in step 2, if there are regular tasks being executed at the triggering time or absolute deadline of the burst task, since only part of the resources can be used by the burst computing task if these tasks are abandoned, the retention or removal of these tasks is not considered; the time period considered by the actual scheduling algorithm is (t min , t max ).
[0020] Furthermore, the step 6 also includes the following steps:
[0021] Step 6.1, transform the optimization problem; since all conventional control computing tasks are considered at the same time, the problem scale is large and difficult to solve, so the original problem is decoupled and split into sub-problems corresponding to each control system; the only coupling constraint is the resource constraint, which means that the resources released by the abandoned subtasks of all control systems are not less than the resources required for the timely completion of the burst computing tasks; the resource constraint is transformed into the penalty term of the objective function and decomposed into each control system τ i The computational resource allocation optimization subproblem P i ;
[0022] Step 6.2: Solve subproblems P one by one based on the idea of approximate dynamic programming i .
[0023] Furthermore, the step 6.2 also includes the following steps:
[0024] Step 6.2.1. Write the iteration constraints as state transfer equations; construct a state containing the current state x of the system. i and the most recently successfully calculated system state d i The extended state y i , its state transfer equation is:
[0025]
[0026] in and is the control system dynamics, K i is the state feedback coefficient;
[0027] Step 6.2.2: Based on whether the control calculation subtask is completed or not, the control system will switch between the two state transfer equations; use the Bellman equation to solve the switching system; record Represents the control calculation subtask The corresponding optimal value function, that is, if all decisions are optimal in the remaining τ steps, the corresponding objective function value; according to Pi The objective function can be deduced that the iterative relationship between the optimal value functions is:
[0028]
[0029] in, Indicates the task The corresponding optimal decision is express The running cost includes the resource cost consumed and the control cost of the current sampling period J i [j](x i [j],θ i,j ), specifically expressed as:
[0030] U i (x i [j],θ i,j )=J i [j](x i [j],θ i,j )+α i θ i,j ,
[0031] where α i Representation Task The cost of consumed resources; According to the above iterative relationship and Bellman equation, it can be deduced:
[0032]
[0033] Among them, the terminal function ψ i (x,l i ) represents the long-term impact of the current scheduling decision on the control system;
[0034] Step 6.2.3: Randomly select the initial resource cost
[0035] Step 6.2.4: Use polynomial to fit the current The corresponding optimal value function, where the order of the polynomial can be selected by yourself; for each sub-problem, fit the optimal value function in reverse order;
[0036] Step 6.2.5: For each subproblem, sequentially calculate θ based on the fitted optimal value function i,j , j i ≤j≤l i ;
[0037] Specifically expressed as:
[0038]
[0039] where θ i,j ∈rsafe Indicates that the current decision is a feasible solution that satisfies the safety constraints of the system;
[0040] Step 6.2.6: Calculate the amount of resources released by the current decision And the amount of resources A released by regular tasks that must be abandoned to complete the burst task before the deadline need ;according to and A need Adjust the resource cost α based on the relative relationship; first determine whether the resource constraint is met: if so, jump to step 6.2.7, otherwise, jump to step 6.2.9;
[0041] Step 6.2.7: Determine whether the resources released by abandoning regular tasks exceed a certain threshold of resources required by burst computing tasks: if not, jump to step 6.2.8; otherwise, jump to step 6.2.13; this step is to prevent excessive abandonment of resources, resulting in resource waste;
[0042] Step 6.2.8, update the upper bound: Jump to step 6.2.11;
[0043] Step 6.2.9, update the lower bound:
[0044] Step 6.2.10: If If yes, skip to step 6.2.12; Does not exist, that is, there is no record currently, then:
[0045] α i =L*α i ,
[0046] Where L is based on and A need Calculate the relative relationship; then jump to step 6.2.4;
[0047] Step 6.2.11, if If it does not exist, If both are set to 0, jump to step 6.2.4, otherwise jump to step 6.2.12;
[0048] Step 6.2.12, according to and Estimate and update Then skip to step 6.2.4;
[0049] Step 6.2.13. Output decision θ i,j , i∈{i 1 ,i 2 , ..., i o}.
[0050] The present invention has the following technical effects:
[0051] (1) The present invention transforms the scheduling problem into a mathematical problem. The solution to the mathematical problem will directly guide how to schedule routine tasks to ensure the safety and optimal performance of the control system and achieve effective use of resources. The proposed safety-aware scheduling method can ensure that emergency tasks are completed before the deadline while achieving optimal control performance under the premise of ensuring the safety of the control system. It can not only handle emergency tasks in a timely and efficient manner, but also ensure the safety and performance of the control system corresponding to the original routine tasks to the greatest extent;
[0052] (2) The present invention overcomes the limitations of traditional solution methods in terms of computing resources, time efficiency, and solution quality by reducing the scale and complexity of the problem, optimizing the decision-making process, and effectively managing resource allocation. Decoupling and decomposing the original optimization problem according to the characteristics of the problem itself makes the problem relatively simple and can be processed in parallel; approximate dynamic programming provides an effective optimization framework to deal with large-scale decision-making problems; and the dynamic trade-off between resources and performance ensures that the system performance is maximized when resources are limited, thereby ultimately improving the feasibility and efficiency of solving large-scale mixed integer programming problems.
[0053] The concept, specific structure and technical effects of the present invention will be further described below in conjunction with the accompanying drawings to fully understand the purpose, characteristics and effects of the present invention. BRIEF DESCRIPTION OF THE DRAWINGS
[0054] Figure 1 It is a framework diagram of an information-physical system including conventional control computing tasks and sudden tasks in a preferred embodiment of the present invention;
[0055] Figure 2 It is a schematic diagram of an actual scheduling interval for a burst task in a preferred embodiment of the present invention;
[0056] Figure 3 It is an overall time flow chart of the scheduling algorithm of a preferred embodiment of the present invention;
[0057] Figure 4 is a flow chart of a security perception method of a preferred embodiment of the present invention;
[0058] Figure 5 It is a flow chart of a resource cost α adjustment algorithm according to a preferred embodiment of the present invention. DETAILED DESCRIPTION
[0059] The following describes several preferred embodiments of the present invention with reference to the drawings in the specification, so that the technical content is clearer and easier to understand. The present invention can be embodied in many different forms of embodiments, and the protection scope of the present invention is not limited to the embodiments mentioned in the text.
[0060] In the drawings, components with the same structure are indicated by the same numerical reference numerals, and components with similar structures or functions are indicated by similar numerical reference numerals. The size and thickness of each component shown in the drawings are arbitrarily shown, and the present invention does not limit the size and thickness of each component. In order to make the illustration clearer, the thickness of the components is appropriately exaggerated in some places in the drawings.
[0061] The framework diagram of the information-physical system in this embodiment, which includes conventional control computing tasks and emergency tasks, is shown in FIG. Figure 1 As shown in the figure, the actual scheduling interval diagram for burst tasks is as follows Figure 1 As shown, the overall time flow chart of the scheduling algorithm is as follows Figure 2 As shown in the flowchart of the security perception method, Figure 3 As shown, the resource cost α adjustment algorithm flow chart is as follows Figure 4 shown.
[0062] Step 1: Consider Figure 1 The control computing tasks of n control systems are executed periodically on the edge server and belong to regular tasks. At the same time, the burst computing tasks τ e Random trigger. Calculate the nominal trajectory of each control system in the time period [0, H], that is, the system trajectory when all control calculation tasks are completed before the deadline, denoted as r nom .
[0063] Step 2: Let the common multiple of the sampling periods of n control systems be P. If a burst task is triggered during [0, P], jump to step 3; otherwise, jump to step 8.
[0064] Step 3: Determine the triggering time t of the burst task e To the absolute deadline t e +D e The routine control calculation tasks between them are assigned a 0 / 1 variable θ i,j , when θ i,j =0, indicating that the task is abandoned. At this time, the control system adopts the input of the previous moment, that is: u i [j]=u i [j-1]; when θ i,j =1, indicating that the task is executed normally. At this time, the input of the control system is: u i [j] = K i x i [j], where K i represents the state feedback coefficient. If t e or e +D e There are regular tasks running at the moment, such as Figure 2As shown in , since only part of the resources can be used by burst computing tasks if these tasks are abandoned, the retention of these tasks is not considered. The time period considered by the actual scheduling algorithm is (t min , t max ).
[0065] Step 4: Control system τ i The control cost is defined as: Where Q i and R i is a constant matrix defined according to the control system requirements.
[0066] Step 5: Construct the following scheduling problem, specifically:
[0067] P o :min J o =∑ i w j J i
[0068] stC1:
[0069] C2:
[0070] C3:
[0071] C4: θ i,j ∈{0, 1},
[0072] C5:j i ≤j≤l i ,
[0073] C6:i∈{i 1 ,i 2 , ..., i o},
[0074] The objective function represents the weighted sum of the control costs of all control systems, w i Corresponding to τ i The weight of indicates the relative importance of the control system. Constraint C 1 The execution time Ce required for the burst task and the execution time required for the regular control computing task The sum cannot exceed the deadline of the burst task, that is, t max ; Constraint C2 represents the actual trajectory x of the system i With nominal trajectory The deviation cannot exceed the safety threshold d i ; Constraint C3 represents the iterative relationship between the control system states; Constraint C4 indicates that θ i,j is a binary integer variable representing τi The jth control calculation subtask of is completed before the deadline; the constraint C5 indicates whether the control application τ i In (t min , t max ) is the control calculation subtask from the jth i to the first i Constraint C6 indicates that it appears in (t min , t max ) belongs to the control application τ i , i∈{i 1 ,i 2 ,…,i o}.
[0075] Step 6: Solve the above scheduling problem according to the algorithm ADP-Opt, including the following steps:
[0076] Step 6.1: Split the scheduling problem P o . Since all conventional control computing tasks are considered at the same time, the problem scale is large and difficult to solve, so the original problem is decoupled and split into sub-problems corresponding to each control system. The only coupling constraint is C1, which means that the resources released by the abandoned subtasks of all control systems are not less than the resources required for the timely completion of the burst computing tasks. C1 is converted into the penalty term of the objective function, and the converted scheduling problem is:
[0077] P t :
[0078] stC2~C6
[0079] Among them, constraints C2~C5 are only related to their corresponding control systems. Therefore, the scheduling problem P t Split into o sub-problems. Control system τ i The corresponding sub-problems are:
[0080] P i :
[0081] stC2~C5
[0082] Step 6.2: Solve subproblems P one by one based on the idea of approximate dynamic programming i , including the following steps:
[0083] Step 6.2.1. Write constraint C3 as a state transition equation. i,j =0, the control input is u i [j]=u i[j-1], that is, only the control input obtained from the most recently completed control calculation task can be used as the current input, which is equivalent to: u i [j] = K i d i [j], where d i [j] represents the system state of the most recent successful calculation. Therefore, the update of the actual system state is not only related to the current real system state x i [j] is also related to d i [j], the specific input is related to θ i,j The overall state is defined as: i [j]:=[x i [j] T d i [j] T ] T , its state transfer equation is:
[0084]
[0085] Step 6.2.2: Based on whether the control calculation subtask is completed or not, the control system will switch between the two state transfer equations. Use the Bellman equation to solve the switching system. Represents the control calculation subtask The corresponding optimal value function, that is, if the remaining τ = l i +1-j steps (from current task to max The last task before ), all decisions are optimal, corresponding to the objective function value from the jth sampling period to the H moment. According to P i The objective function can be deduced that the iterative relationship between the optimal value functions is:
[0086]
[0087] in, Representation Task The corresponding optimal decision is express The running cost includes the resource cost consumed and the control cost of the current sampling period, which is specifically expressed as:
[0088] U i (x i [j],θ i,j )=w i (x i [j] T Q i x i [j]+u i [j]T R i u i [j])+α i θ i,j ,
[0089] in Representation Task The resource cost consumed is the product of its execution time and the resource cost per unit time. Based on the above iterative relationship and Bellman equation, we can deduce:
[0090]
[0091] in, Indicates that from t max The first sampling period after H to the last sampling period before H i The control cost of i (x,l i ) measures the long-term impact of the current scheduling decision on the control system. Therefore, assuming t max After that, no burst tasks are triggered and all control computing tasks are completed normally. i (x,l i ) is the first i +1 sampling period of system status x i [l i +1] function.
[0092] Step 6.2.3: Randomly select the initial resource cost
[0093] Step 6.2.4: Use polynomial to fit the current The corresponding optimal value function, where the order of the polynomial can be selected by yourself. For each sub-problem, fit the optimal value function in reverse order. First fit Randomly select enough sample points according to ψ i (x,l i ) is defined to calculate the corresponding function value, and then the corresponding polynomial coefficients are calculated according to the least squares method. According to the iterative relationship of the optimal value function, fit
[0094] Step 6.2.5: For each subproblem, calculate θ based on the fitted optimal value function i,j , j i ≤j≤l i . Specifically expressed as:
[0095]
[0096] in Ensure the safety constraint C2, Indicates the deviation between the actual state and the nominal state.
[0097] Step 6.2.6: Calculate the amount of resources released by the current decision And the amount of resources that must be abandoned to complete the burst task before the deadline Emergency tasks based on and A need The relative relationship between the resource cost α is adjusted. The specific algorithm is as follows: Figure 5 As shown. First, determine whether the resource constraint C1 is met, that is:
[0098]
[0099] The above formula indicates that the resources released by all control computing tasks exceed those required by burst tasks. If satisfied, jump to step 6.2.7, otherwise, jump to step 6.2.9.
[0100] Step 6.2.7: Determine whether the resources released by abandoning the regular tasks exceed a certain threshold of resources required by the burst computing tasks, that is:
[0101]
[0102] If not, jump to step 6.2.8, otherwise, jump to step 6.2.13. This step is to prevent too many resources from being discarded, resulting in resource waste.
[0103] Step 6.2.8, update the upper bound: Skip to step 6.2.11.
[0104] Step 6.2.9, update the lower bound:
[0105] Step 6.2.10: If If yes, skip to step 6.2.12. Does not exist, that is, there is no record currently, then:
[0106]
[0107] α i =L*α i , i∈{i 1 ,i 2 ,…,i o},
[0108] Among them, m, x, and y are adjustable parameters. Both x and y are positive numbers. m needs to ensure that no matter A need and How much to take (depending on the nature of the problem, L>1. Then skip to step 6.2.4.
[0109] Step 6.2.11, if If it does not exist, If both are set to 0, skip to step 6.2.4; otherwise, skip to step 6.2.12.
[0110] Step 6.2.12, Update
[0111]
[0112] Where z is an adjustable parameter representing α and decision θ i,j , i∈{i 1 ,i 2 , ..., i o}The amount of resources released is not linear. Then jump to step 6.2.4.
[0113] Step 6.2.13. Output decision θ i,j , i∈{i 1 ,i 2 , ..., i o}.
[0114] Step 7: Calculate [H, H+t e +D e ] time period, with the current time t e +D e As the new relative initial 0 moment, the nominal trajectory of the new [0, H] time period can be obtained, denoted as r nom At the same time, update the initial offset of the control calculation task relative to the new initial time 0:
[0115]
[0116] in They represent the control system τ i The control calculates the initial offset and period of the task. Then jump to step 2.
[0117] Step 8: Calculate the nominal trajectory of each control system in the [H, H+P] time period backwards, and take the current time P as the new relative initial time 0 to obtain the new nominal trajectory of the [0, H] time period, denoted as r nom . Skip to step 2.
[0118] The preferred specific embodiments of the present invention are described in detail above. It should be understood that ordinary technicians in the field can make many modifications and changes based on the concept of the present invention without creative work. Therefore, all technical solutions that can be obtained by technicians in the technical field based on the concept of the present invention through logical analysis, reasoning or limited experiments on the basis of the prior art should be within the scope of protection determined by the claims.
Claims
1. A secure scheduling method for real-time control systems under burst computing tasks, It is characterized in that This method analyzes the impact of different routine tasks on the safety and performance of the control system, designs a security-aware scheduling method to optimize resource allocation, and ensures that emergency tasks are completed before the deadline by discarding routine tasks that have less impact on the safety and performance of the control system.
2. The method for safely scheduling a real-time control system under a burst computing task as claimed in claim 1, It is characterized in that The safety-aware scheduling method is to model the scheduling problem as a mixed integer programming problem, mathematically quantify the specific impact of the completion of each routine task on the safety and performance of the control system; define a set of binary variables, assign a variable to each routine task, where 1 indicates that the task is executed and 0 indicates that the task is abandoned; and use the control quadratic cost of the control system as the objective function to dynamically select the scheduling plan that makes the system control system optimal.
3. The method for safely scheduling a real-time control system under a burst computing task as claimed in claim 2, It is characterized in that The mixed integer programming problem ensures the safety of the control system by limiting the deviation between the actual trajectory and the nominal trajectory; constructs resource constraints for burst tasks and regular tasks to ensure that the resources released by abandoning regular tasks are sufficient to complete the burst computing tasks before the deadline.
4. The method for safely scheduling a real-time control system under a burst computing task as claimed in claim 3, It is characterized in that The mixed integer programming problem first decouples the complex problem according to the different control systems to which the routine tasks belong, and divides the entire optimization problem into sub-problems corresponding to each control system, thereby reducing the problem scale and accelerating the solution; For each sub-problem, the original scheduling problem is transformed into a trade-off problem between resource cost and control performance, and is solved efficiently based on the idea of approximate dynamic programming.
5. The method for safely scheduling a real-time control system under a burst computing task as claimed in claim 4, It is characterized in that The decoupling of the mixed integer programming problem is to transform the only coupling constraint in the original optimization problem, i.e., the resource constraint, into a penalty term in the objective function.
6. The method for safely scheduling a real-time control system under a burst computing task as claimed in claim 5, It is characterized in that In the mixed integer programming problem, for each sub-problem, an approximate method is used to estimate the value function of each routine task; the value function reflects the system control performance and the resource cost consumed corresponding to whether the routine task is completed; Based on the idea of dynamic programming, in the time sequence of execution of routine tasks, routine tasks that do not improve the performance of the control system much relative to their resource costs are discarded based on the value function, thereby providing sufficient resources for emergency tasks to ensure their timely completion.
7. The method for safely scheduling a real-time control system under a burst computing task as claimed in claim 6, It is characterized in that The method comprises the following steps: Step 1: Define the application scenario; the control computing tasks of n control systems are executed periodically on the edge server, which are regular tasks; at the same time, burst computing tasks are triggered randomly; calculate the nominal trajectory of each control system, that is, the system trajectory when all control computing tasks are completed before the deadline; Step 2: Determine the regular control computing tasks between the triggering time of the burst task and the absolute deadline, and assign a 0 / 1 variable θ to each of these tasks i,j , when θ i,j =0, indicating that the task is abandoned, and the control system uses the system input of the previous moment; when θ i,j =1, indicating that the task is executed normally, and the control system updates the input with the current system state. Therefore, according to the influence of whether the above conventional control calculation task is completed on the system input, the iterative relationship constraint of the system state is constructed; Step 3: Construct resource constraints based on the requirement that the sum of the execution time required for the burst task and the regular control computing task cannot exceed the deadline of the burst task; Step 4: Construct a safety constraint based on the fact that the deviation between the actual trajectory and the nominal trajectory of the system cannot exceed the safety threshold; Step 5: construct a cost function of the control system and establish a resource allocation optimization problem under the state iteration constraints, resource constraints and safety constraints; Step 6: Solve the above optimization problem according to the algorithm ADP-Opt.
8. The method for safely scheduling a real-time control system under sudden computing tasks as claimed in claim 7, It is characterized in that In step 2, if there are regular tasks being executed at the triggering time or absolute deadline of the burst task, since only part of the resources can be used by the burst computing task if these tasks are abandoned, the retention or removal of these tasks is not considered; the time period considered by the actual scheduling algorithm is (t min ,t max ).
9. The method for safely scheduling a real-time control system under a burst computing task as claimed in claim 8, It is characterized in that The step 6 also includes the following steps: Step 6.1, transform the optimization problem; since all conventional control computing tasks are considered at the same time, the problem scale is large and difficult to solve, so the original problem is decoupled and split into sub-problems corresponding to each control system; the only coupling constraint is the resource constraint, which means that the resources released by the abandoned subtasks of all control systems are not less than the resources required for the timely completion of the burst computing tasks; the resource constraint is transformed into the penalty term of the objective function and decomposed into each control system τ i The computational resource allocation optimization subproblem P i ; Step 6.2: Solve subproblems P one by one based on the idea of approximate dynamic programming i .
10. The method for safely scheduling a real-time control system under a burst computing task as claimed in claim 9, It is characterized in that The step 6.2 also includes the following steps: Step 6.2.
1. Write the iteration constraints as state transfer equations; construct a state containing the current state x of the system. i and the most recently successfully calculated system state d i The augmented state y i , its state transfer equation is: in and is the control system dynamics, K i is the state feedback coefficient; Step 6.2.2: Based on whether the control calculation subtask is completed or not, the control system will switch between the two state transfer equations; use the Bellman equation to solve the switching system; record Represents the control calculation subtask The corresponding optimal value function, that is, if all decisions are optimal in the remaining τ steps, the corresponding objective function value; according to P i The objective function can be deduced that the iterative relationship between the optimal value functions is: in, Representation Task The corresponding optimal decision is express The running cost includes the resource cost consumed and the control cost of the current sampling period J i [j](x i [j],θ i,j ), specifically expressed as: U i (x i [j],θ i,j )=J i [j](x i [j],θ i,j )+a i i i,j , where α i Representation Task The cost of consumed resources; According to the above iterative relationship and Bellman equation, it can be deduced: Among them, the terminal function ψ i (x,l i ) represents the long-term impact of the current scheduling decision on the control system; Step 6.2.3: Randomly select the initial resource cost Step 6.2.4: Use polynomial to fit the current The corresponding optimal value function, where the order of the polynomial can be selected by yourself; for each sub-problem, fit the optimal value function in reverse order; Step 6.2.5: For each sub-problem, sequentially calculate the corresponding decision θ based on the fitted optimal value function i,j ; Specifically expressed as: where θ i,j ∈r safe Indicates that the current decision is a feasible solution that satisfies the safety constraints of the system; Step 6.2.6: Calculate the amount of resources released by the current decision And the amount of resources A released by regular tasks that must be abandoned to complete the burst task before the deadline need ;according to and A need Adjust the resource cost α based on the relative relationship; first determine whether the resource constraint is met: if so, jump to step 6.2.7, otherwise, jump to step 6.2.9; Step 6.2.7: Determine whether the resources released by abandoning regular tasks exceed a certain threshold of resources required by burst computing tasks: if not, jump to step 6.2.8; otherwise, jump to step 6.2.13; this step is to prevent excessive abandonment of resources, resulting in resource waste; Step 6.2.8, update the upper bound: Jump to step 6.2.11; Step 6.2.9, update the lower bound: Step 6.2.10: If If yes, skip to step 6.2.12; Does not exist, that is, there is no record currently, then: α i =L*α i , Where L is based on and A need Calculate the relative relationship; then jump to step 6.2.4; Step 6.2.11, if If it does not exist, If both are set to 0, jump to step 6.2.4, otherwise jump to step 6.2.12; Step 6.2.12, according to and Estimate and update Then skip to step 6.2.4; Step 6.2.
13. Output decision θ i,j ,i∈{i 1 ,i 2 ,…,i o }.
Citation Information
Cited By
Switching control method based on SPWM soft start and pulse type load LLC resonant converter
CN121124509A
