An Introduction to Real time Systems by Dr. Amin Danial Asham
References Real-time Systems Theory and Practice. By Rajib mall
Simplified Hardware Architecture
System Buses There are Three Buses: 1.Power Bus: This bus feeds the power to the different hardware components in the system 2.Address Bus: Is the media used to exchange the addresses of the memory. To read or write from or to a certain memory location, an address is used to refer to that location. This address is carried by the address bus. 3.Data Bus: The data is exchanged between the memory and CPU via the address bus. Note: When referring to the system bus, the address and data buses collectively are generally what are meant.
A Functional Model of A Real Time System
System Components A. Sensor: A sensor converts the physical characteristics of an influencer in its environment in to electrical signal. Examples: 1.Temperature sensors: such as Thermocouples (produces mV related the measured temperature), PT100 (the electrical resistance changes with the measured temperature) 2.Pressure Sensor 3.Magnetic Sensor: Used in Electronic Compass in many devices such as smart phones. 4.Accelerometer Sensor: Measures the acceleration, which used in many commercial systems as game console joysticks and smart phones. 5.Gyro sensors: Measures the angular velocity. Used in robotics, game console joysticks, smartphones……etc.
System Components (cont.) B. Actuator : Any device that tacks an electrical signal and converts it to a physical action. This physical action may be in the form of motion, thermal, or even the physical characteristics of an object. Examples: 1.Motor 2.Motorized Valve. 3.Electrical Solenoid 4.Heater 5.Hydraulic and Pneumatic actuators
System Components (cont.) C. Signal Conditioner Units: The electrical signals produced by computers are usually not suitable to directly drive actuators. Hence, output conditioning is needed to generate the proper signals to drive the actuators. Similarly, the level and type of electrical signal generated by sensors are usually different from the signals to the interface unit, especially for industrial applications where there may be a big distance between the sensor (on site) and the interface unit (in electrical stations). Hence input conditioning is needed. Example: the voltage generated by photo voltaic cell is in millivolts and hence need to be conditioned before it can be processed by a computer.
System Components (cont.) Some types of conditioning: 1.Voltage Amplifications: signals generated by the sensors may be in order of mV whereas the signals received by the interface units of order of volts. In this case amplification is needed. 2.Voltage Level Shifting: Shifting is needed to match the signal generated by a sensor with the range received by an interface unit. Ex. If the sensor generates signal in the range from -0.5Vdc to 0.5Vdc while the interface unit receives signal from 0Vdc to 1Vdc. 3.Frequency Range Shifting and Filtering: Frequency range shifting is used to reduce the noise. Many types of noise occur in narrow and the signal must be shifted from the noise bands, so that noise can be filtered out. 4.Signal mode conversion: the signal may be converted from direct current to alternating current and vise versa. Sometimes the analog signal is converted to a train of pulses with a rate or pulse width proportional to the signal value. Pulse train is usually used with transformer coupled circuits where direct current can not be used. Ex. In industrial fields signals are sent to the interface units (I/O modules) which are located far from the sensors as mA signals to avoid voltage drop in case of voltage signals
System Components (cont.) D. Interface unit: 1. Input Interface unit (Analog to Digital Converter) Analog- to-digital (A/D or ADC) conversion converts continuous (analog) signals from various transducers and devices into discrete (digital) ones. Conversion from analogue to digital binary value is carried out through sampling and quantization. Sampling Quantization Data Register n binary digits (bits) n-1
System Components (cont.) D. Interface unit (cont.): 2. Output Interface unit (Digital to Analogue Converter) Digital-to-analog (D/A or DAC) conversion performs the inverse function of A/D circuitry; that is, it converts a discrete quantity to a continuous one D/A devices are used to allow the computer to output analog voltages based on the digital version stored internally
System Components (cont.) E. Real-Time Computer: This is the processing unit which collects the data from the input interface units (input Modules digital or analog) and runs the control program to produce the outputs and send them to the output interface units (digital or analog). Ex. PLC CPU.
System Components (cont.) F. Human Computer Interface: It is called in the industrial field “Human Machine Interface” (HMI). HMI is the apparatus which presents process data to a human operator, and through which the human operator controls the process.
Characteristics of Real-Time Systems The following characteristics may not be applicable to every real time system 1.Time Constraint: the response of the system must meet the determined deadlines. That is the a certain task must be completed and produce the result before the deadline. Real Time Operating System (RTOS) is responsible of ensuring that all tasks meet the deadlines. 2.Correctness Criteria: A real-time system is one whose logical correctness is based on both the correctness of the outputs and their timeliness. 3.Embedded: An embedded computer system is physically embedded in its environment and often controls it. A vast Majority of real time systems are embedded systems, which are designed for specific control functions within a larger system often with real-time computing constraints. Ex. ABS, MPFI, Printers…….etc.
4.Safety-Criticality: A Safe system is the one that does not cause damage in case of failure. A reliable system is the one that can operate for long duration of time without any failures. For non-real time systems safety and reliability are independent issues. o A hand gun is an example of a reliable system but unsafe since in case of failure it can cause a severe injury. o On the other hand, Word processing program is not a reliable system but safe since in case of failure it does not usually cause any significant damage or financial loss.. A safety critical system is one whose failure can cause a severe damage. Therefore, a safety critical system requires to be reliable since any failure may cause severe damages. o An example of a safety-critical system is a the computer on-board of an aircraft. In case of the computer fails the aircraft fails. In Real time systems safety and reliability are strongly related. Characteristics of Real-Time Systems (cont.)
5.Concurrency: Real time systems usually respond to several events in a short time intervals according to time constraints. Ex. in industrial control, sensors generate data asynchronously at different rates. The real time system collects data from the different types of sensors concurrently since in case of data loss the system may malfunction. 6.Distributes and Feedback Structure: In many real time systems the different components are distributed over a large geographical area. Typical case is the DCS in Industrial plants
Characteristics of Real-Time Systems (cont.) 7. Task Criticality: is a measure of the cost of the failure of a task. Different tasks have different criticality based on the application and damage in a task failure. Task criticality is a different concept from task priority. Task priority is more related to its timing. 8.Custom Hardware: In real time systems usually depend on a customized hard ware specially design for a specific application. Ex. ABS, MPFI, Mobile phones….etc. 9. Reactive: Real time systems react continually according to time constraints imposed by the environment. 10. Stability: real time system need to meet the deadlines of the most critical tasks even under overload conditions. On the other hand the deadlines of non critical tasks may not be met. 11. Exception Handling: Many Real Time systems work round-the-clock without human operators. Any failure must be automatically detected and continue to operate in a gracefully degraded operated mode rather than shut off abruptly. Ex. Embedded automotive real time systems.
Thanks