Download presentation
2
Real Time Process Control (Introduction)
Tono Riesco Electronics Engineer CERN
3
Agenda Introduction Control systems Basic concepts Real-Time
Task Scheduling Real-Time in Linux
4
Control System In all the control systems, we found 3 basic components: System to be controlled With sensors, actuators, cables…etc. Controller Send orders to the system according a predetermined control objective. Environment Where the control system operates.
5
Typical Control System
Controller Feedback Environment System
6
Control System Details
Controller System Actuators Environment Data Process Data Filters Sensors
7
Types of Control Systems
Depending of the interactions with the environment we distinguish 3 types of control systems: Monitoring Systems Do not modify the environment Open-loop control systems Loosely modify the environment Closed-loop control systems Tight interaction between perception and action
8
Monitoring Systems Do not modify the environment Sensor 1 Environment
Data Process Data Filters Sensor 2 Sensor n Display Examples: surveillance systems, air traffic control
9
Open-Loop Control Systems
Sensing and control are loosely coupled Controller System Actuators Environment Planning Data Process Sensors Examples: assembly robots, industrial chains, access systems
10
Closed-Loop Control Systems
Sensing and control are tightly coupled Controller System Actuators Environment Planning Data Process Sensors Examples: humans, flight control systems, safety systems
11
Conclusions If we have a tight interaction with the environment, the system has to react to events within precise timing constrains. Timing constrains are imposed by the environment. The control system must to be able to execute tasks within time constraints.
12
What’s a Real Time System? I
“A real-time system is one in which the correctness of the computations not only depends upon the logical correctness of the computation but also upon the time at which the result is produced. If the timing constraints of the system are not met, system failure is said to have occurred” Donald Gillies.
13
What’s a Real Time System? II
System capable of guaranteeing timing requirements of the processes under its control. It is essential that the timing constraints of the system are guaranteed to be met. Guaranteeing timing behavior requires that the system be predictable. It is also desirable that the system attain a high degree of utilization while satisfying the timing constraints of the system. Late or early answer → Wrong answer Guarantee worst case vs. best effort Real time controlled machine on the production line at a bottling plant. The machine's function is simply to cap each bottle as it passes within the machine's field of motion on a continuously moving conveyor belt. If the machine operates too quickly, the bottle won't be there yet. If the machine operates too slowly, the bottle will be too far along for the machine to reach it. Stopping the conveyor belt is a costly operation, because the entire production line must correspondingly be stopped. Therefore, the range of motion of the machine coupled with the speed of the conveyor belt establishes a window of opportunity for the machine to put the cap on the bottle.
14
What’s not a Real-Time System? I
A real-time system is not a fast system. AFAP systems Speed is always relative to a specific environment. Running faster is good, but does not guarantee a correct behavior. Real-time systems is not on-line systems or "an interactive system with better response time than we had".
15
Real-Time examples Bottling plant
Servo loops in an airplane when on auto-pilot Real time controlled machine on the production line at a bottling plant. The machine's function is simply to cap each bottle as it passes within the machine's field of motion on a continuously moving conveyor belt. If the machine operates too quickly, the bottle won't be there yet. If the machine operates too slowly, the bottle will be too far along for the machine to reach it. Stopping the conveyor belt is a costly operation, because the entire production line must correspondingly be stopped. Therefore, the range of motion of the machine coupled with the speed of the conveyor belt establishes a window of opportunity for the machine to put the cap on the bottle.
16
How has to be a real time system?
Fast Predictable Deterministic Fast means that it has a low latency, i.e. it responds to external, asynchronous events in a short time. Predictable means that it is able to determine task's completion time with certainty. predictable refers to a system whose timing behavior is always within an acceptable range. The behavior is specified on a system-wide basis, such as "all tasks will meet all deadlines. A deterministic system is a special case of a predictable system. Not only is the timing behavior within a certain range, but that timing behavior can be pre-determined. For example, a system can be designed with pre-allocated time slots for each task. Execution for each task occurs only during those time slots. Such a system must have execution time for every task known, as well as no anomalies that might cause deviation from the pre-determined behavior. That is, of course, difficult to achieve. Fortunately, determinism is not essential to build predictable real-time systems.
17
Fast meaning in Real Time
Fast means that it has a low latency It responds to external, asynchronous events in a short time. The lower the latency, the better the system will respond to events which require immediate attention
18
Predictable Predictable means that it is able to determine task's completion time with certainty. Predictable refers to a system whose timing behavior is always within an acceptable range. The behavior is specified on a system-wide basis, such as “all tasks will meet all deadlines”.
19
Deterministic Special case of a predictable system.
Not only is the timing behavior within a certain range, but that timing behavior can be pre-determined. Pre-allocated time slots for each task. Execution for each task occurs only during those time slots. Determinism is not essential to build predictable real-time systems.
20
Real Time Systems Real Time System Event Action Real Time: System able to respond to events within precise timing constraints.
21
Real Time Systems Real Time System t x (t) Environment y (t +Δ) It is a system in which the correctness depends not only on the output values, but also on the time at which results are produced.
22
Real-Time classification
23
Definitions Task is a sequence of instructions that in the absence of other activities is continuously executed by the system until completion. t ai si fi
24
Definitions Real-Time Task τi Di Li Ci Lai τi t ri si fi di
ri Request time (arrival time) si Start Time fi Finish Time di Absolute Deadline Di Relative deadline Ci Worst Case execution time (wcet) Li Latency Lai Lateness (fi - di) Ti Tardiness (max (0, Lai))
25
Definitions Lateness Tardiness Latency Jitter
Quality of coming late or later in time Tardiness Quality of not adhering to a correct or usual or expected time Latency The time that elapses between a stimulus and the response to it Jitter Random variation in the timing of a signal, especially a clock
26
Task status
27
Queue Ready Tasks The ready tasks go to the “waiting queue” the ready queue The strategy of choosing which task go before is known schedule algorithm Not a FIFO Queue!!! Dispatching τ3 τ2 τ1 CPU Activation
28
Task Status Transitions
Finished Running Wait Dispatching Blocked Preemption Ready Activation Signal
Similar presentations
© 2024 SlidePlayer.com. Inc.
All rights reserved.