Dynamic Task Priority Scheduling for Real-Time Control Cycles
Find Innovative SolutionsGenerate Solutions
Solution Overview
Problem
Existing control devices, such as PLCs, face challenges in executing non-control tasks related to real-time control without compromising the periodicity of real-time control tasks, particularly in scenarios like anomaly detection where processing needs to be completed within specific time frames.
Innovation Solution
A control device with a processor that executes both control and non-control tasks, utilizing a multitask execution mechanism with a scheduler that dynamically sets priorities, ensuring the control task has the highest priority and the non-control task's priority is adjusted based on execution time to maintain real-time control.
Engineering Contradictions & Design Principles
Engineering Contradiction Analysis
1Adaptability or versatility
If non-control tasks are executed in the next cycle when not completed in one cycle, then task execution flexibility is improved, but real-time control timing cannot be ensured
Solution Approach 1:
The patent implements dynamic priority adjustment for non-control tasks based on execution timing. The scheduler monitors whether a non-control task completes within the current control cycle and adjusts its priority for the next cycle accordingly: setting high priority if completion is achieved (to maintain responsiveness), and low priority if incomplete (to allow carryover execution). This dynamic adaptation resolves the contradiction by making the system flexible in task execution while ensuring real-time control timing requirements are met through priority-based scheduling.
2Productivity
If multiple PLC functions are operated in parallel, then processing capability is improved, but scheduling complexity increases
Solution Approach 1:
The patent segments PLC functions into distinct task types: control tasks (sequence control, motion control) and non-control tasks (anomaly detection, data processing). Each segment is assigned to specific processor cores and managed by dedicated scheduling mechanisms. This segmentation allows parallel execution of multiple functions while simplifying scheduling complexity through clear separation of concerns and specialized scheduling strategies for each task type.
Solution Approach 2:
The patent changes the scheduling parameter from static priority assignment to dynamic priority adjustment based on task completion status and timing requirements. The scheduler modifies task priorities in real-time according to whether non-control tasks completed within the current cycle, enabling efficient parallel processing while maintaining manageable scheduling complexity through adaptive parameter adjustment rather than complex fixed scheduling algorithms.
3Speed
If non-control task priority is kept high to ensure real-time processing, then processing speed is improved, but control task periodicity may be compromised
Solution Approach 1:
The patent implements a feedback mechanism where the scheduler monitors the completion status of non-control tasks within each control cycle and uses this information to adjust priorities for the next cycle. When a non-control task completes on time, its priority is set high to maintain processing speed. When it fails to complete, the priority is reduced to allow carryover execution, preventing interference with control task periodicity. This feedback-based priority adjustment resolves the contradiction by adapting processing speed to actual task completion needs while protecting control task periodicity.
Data Source
AI summary
A control device includes a processor that executes a plurality of tasks including a control task and a non-control task that performs related processing related to real-time control, a multitask execution part that causes the processor to execute the tasks in a sequence based on priorities of the respective tasks, and a scheduler. The control task is set to have a highest priority. The scheduler sets the priority of the non-control task to a first priority when an execution start condition of the non-control task has been satisfied, keep the priority of the non-control task at the first priority while the period of time from the execution start is less than or equal to a first time period for executing the related processing in real time, and thereafter reduces the priority to a second priority when the period of time has exceeded the first time period.


