1 RTSys SS2024 Chapter 1 Examples Application Areas Defs 240220 w Notes 240319

You might also like

Download as pdf or txt
Download as pdf or txt
You are on page 1of 26

Real-Time Systems

1 Introduction

Real-Time Systems - 1.1 - © Prof. B. Mysliwetz 2024


Rosenheim Technical University of Applied Sciences
Real-Time Systems
Contents

0 STARTUP - Course Objectives & Overview, Organizational Issues


1 INTRODUCTION - Examples & Application Areas of Real-Time Systems
Technical Terms and Definitions; Hard vs. Soft Real-Time Requirements
2 OPERATING SYSTEMS FUNDAMENTALS - Architecture & Working Principles;
Processes, Threads, Tasks; Scheduling Principles and Variants
3 REAL-TIME SYSTEMS CONCEPTS - Real-Time Software Design; Rate Monotonic
Approach (RMA) for Priority Assignment; Reentrant Functions; Semaphores
Mutual Exclusion; Shared Resources; Synchronization; Deadlock; Priority Inversion
4 RTOS OVERVIEW - Categories & Features; Commercial RTOS & RT-Kernels
5 INTRODUCTION TO MicroC/OS-II - Key Features; System Calls; Task Structure;
Application Structure; System Specific Special Tasks; Configuration
6 SPECIAL TOPICS - Software Metrics & Uncertainty; Testing & Debugging; Buffer
Size Calculation; Performance Optimization Techniques

Real-Time Systems - 1.2 - © Prof. B. Mysliwetz 2024


Rosenheim Technical University of Applied Sciences
1 INTRODUCTION

Learning Objectives

What are typical application fields of real-time software ?

What are key concepts and technical terms in the context of


real-time applications ?

Real-Time Systems - 1.3 - © Prof. B. Mysliwetz 2024


Rosenheim Technical University of Applied Sciences
1 INTRODUCTION
1.1 Application Areas of Real-Time Systems (i)

Consumer Electronics Devices


Camcorder, Camera, VCR, Set-Top Box ...

Computer Peripherals
Printer, Scanner, Modem

Office Equipment
Fax Machines, Copiers ...

Industrial Automation & Process Control


Car Assembly Lines, Welding Robots, Chemical Plants, Power Plants

Automotive Electronics
Engine Control, Nav-System, Airbags, Anti-Skid System, Active Roll-Stability ...

Real-Time Systems - 1.4 - © Prof. B. Mysliwetz 2024


Rosenheim Technical University of Applied Sciences
1.1 Application Areas of Real-Time Systems (ii)

Telecommunication Equipment
Switches, Routers ...

Electronic Measurement & Diagnostic Instruments

Aerospace & Military Equipment


Mars-Rover Control, Airbus A-3xx Digital Flight Control System ...

Medical Instruments

Domestic Applications
Kitchen Oven, Microwave ...

Real-Time Systems - 1.5 - © Prof. B. Mysliwetz 2024


Rosenheim Technical University of Applied Sciences
1.2 Examples of Real-Time Systems (i)

Example A Low-Cost Controller/Inverter for Sensorless BLDC Motor

Real-Time Systems - 1.6 - © Prof. B. Mysliwetz 2024


Rosenheim Technical University of Applied Sciences
1.2 Examples of Real-Time Systems (ii)

Example A Low-Cost Controller Electronics for Sensorless BLDC Motor

Input Passive coil induction voltage measurements

Output PWM (pulse width modulated) transistor switching signals

Processor e.g. Atmel AT89C2051-24 (8051 family, 8 Bit, 24 MHz)


e.g. STM32F100 (ARM Cortex-M, 32 Bit, 72 MHz)

Real-Time Systems - 1.7 - © Prof. B. Mysliwetz 2024


Rosenheim Technical University of Applied Sciences
1.2 Examples of Real-Time Systems (iii)

Example B Automotive Electronics


Bosch / VDO Car Dashboard Display Unit for BMW, Mercedes

Processor(s) e.g. Siemens 80C167 (16-Bit RISC, 40 MHz, CAN-Interface)


Processor(s) e.g. TI TMS570xxx (ARM Cortex-M), Freescale MPC 55xx …

Real-Time Systems - 1.8 - © Prof. B. Mysliwetz 2024


Rosenheim Technical University of Applied Sciences
1.2 Examples of Real-Time Systems (iv)

Example B Automotive Electronics


Bosch / VDO Car Dashboard Display Unit for BMW, Mercedes

Processor(s) e.g. Siemens 80C167 (16-Bit RISC, 40 MHz, CAN-Interface)


Processor(s) e.g. TI TMS570xxx (ARM Cortex-M), Freescale MPC 55xx …

Real-Time Systems - 1.9 - © Prof. B. Mysliwetz 2024


Rosenheim Technical University of Applied Sciences
1.2 Examples of Real-Time Systems (v)

Example B Automotive Electronics


Bosch / VDO Car Dashboard Display Unit for BMW, Mercedes

Processor(s) e.g. Siemens 80C167 (16-Bit RISC, 40 MHz, CAN-Interface)


Processor(s) e.g. TI TMS570xxx (ARM Cortex-M), Freescale MPC 55xx …

Real-Time Systems - 1.10 - © Prof. B. Mysliwetz 2024


Rosenheim Technical University of Applied Sciences
1.2 Examples of Real-Time Systems (vi)

Example B Automotive Electronics


Bosch / VDO Car Dashboard Display Unit for BMW, Mercedes

Processor(s) e.g. Siemens 80C167 (16-Bit RISC, 40 MHz, CAN-Interface)


Processor(s) e.g. TI TMS570xxx (ARM Cortex-M), Freescale MPC 55xx …

Real-Time Systems - 1.11 - © Prof. B. Mysliwetz 2024


Rosenheim Technical University of Applied Sciences
1.2 Examples of Real-Time Systems (vii)

CAN-Protocol Specification for Bosch/BMW E46 Dashboard Display Unit


(‘Kombiinstrument’) includes explicit timing (range) requirements

Real-Time Systems - 1.12 - © Prof. B. Mysliwetz 2024


Rosenheim Technical University of Applied Sciences
1.2 Examples of Real-Time Systems (viii)

Example C

Airbus A-320
Digital Flight Control
System

Real-Time Systems - 1.13 - © Prof. B. Mysliwetz 2024


Rosenheim Technical University of Applied Sciences
1.2 Examples of Real-Time Systems (ix)

Example C Airbus A-320 Digital Flight Control System / Autopilot

Input x-, y-, z-accelerometer signals


Attitude/rate gyroscope signals
GPS position measurements

User input (e.g. panel switch/push button)

Output Actuator control signals


Cockpit displays update

Warning messages (e.g. voice output)

Processor(s) e.g. redundant / multiple [ 80186, 68000 ] ...


e.g. Freescale MPC 5xxx ‘lock-step’ multicores

Real-Time Systems - 1.14 - © Prof. B. Mysliwetz 2024


Rosenheim Technical University of Applied Sciences
1.2 Examples of Real-Time Systems (x)

Example D EAGLE Engine Control Unit

https://www.th-rosenheim.de/forschung-entwicklung/kompetenzfelder-und-
projekte/technologien-der-digitalisierung/eagle/

https://bc.pressmatrix.com/de/profiles/56a5af20946e/editions/ab65d2a8434cc8de7607/
pages/page/28

Real-Time Systems - 1.15 - © Prof. B. Mysliwetz 2024


Rosenheim Technical University of Applied Sciences
Student Development Project
Electric Auxiliary Propulsion for a Glider
1.2 Examples of Real-Time Systems (xi)

Example D EAGLE Engine Control Unit

Real-Time Systems - 1.17 - © Prof. B. Mysliwetz 2024


Rosenheim Technical University of Applied Sciences
1.2 Examples of Real-Time Systems (xii)

Example D EAGLE Engine Control Unit (Task-Cycletimes)

/**
* *******************************************************************
* @file AppTasks.c
* @author Daniel Beck, EEIT-Master Project WS2015/2016
* Markus Frejek, EEIT-Master Project SS2017
* @date 24.03.2017
* @brief ECU Application Task Definitions for uC/OS-III
*
* TCYCLE_STATEMACHINE_TASK 50ms == 20Hz exec. rate
* TCYCLE_MOTCON_TASK 100ms == 10Hz exec. rate
* TCYCLE_BMS_TASK 100ms == 10Hz exec. rate
* TCYCLE_LCDOUT_TASK 200ms == 5Hz exec. rate
* TCYCLE_DATALOG_TASK 1000ms == 1Hz exec. rate
* TCYCLE_TERMINALIO_TASK 1000ms == 1Hz exec. rate
*
* Changes:
* 11.06.2016 d.beck flash file logging added
Real-Time Systems - 1.18 - © Prof. B. Mysliwetz 2024
Rosenheim Technical University of Applied Sciences
1.3 Technical Terms and Definitions (i)

Real-Time [Computer] System

A computer running programs that have explicit timing constraints or deadlines,


i.e. maximum allowed reaction/latency times after an event and/or maximum
period times per processing cycle. Such programs must be not only logically
correct but also correct with respect to timing.

Real-time does not refer to any absolute reaction time values. It just means 'fast
enough‘ relative to the technical process being controlled/monitored, e.g.

• Car engine control system (e.g. for ignition/fuel injection) 


• Chemical process control system (e.g. for oil refinery plant) 

Real-Time Systems - 1.19 - © Prof. B. Mysliwetz 2024


Rosenheim Technical University of Applied Sciences
1.3 Technical Terms and Definitions (ii)

Hard vs. Soft Real-Time Requirements

Hard real-time requirements: timing constraints are explicitly defined (in


requirements specification) and must be strictly met under any circumstances,
i.e. even under worst case load conditions. Otherwise the system will not work
properly any more (or will not get certification  i.e. it is illegal to operate it). In
safety critical systems severe damage or even loss of lives may occur.

Soft real-time system: exceeding 'regular' time limits has no severe consequen-
ces - at most a certain degradation in quality of service, e.g.
• reaction time of a bank machine
• response time of a text editor after a keyboard input
• transmission rate of audio/video streaming data via internet

Real-Time Systems - 1.20 - © Prof. B. Mysliwetz 2024


Rosenheim Technical University of Applied Sciences
1.3 Technical Terms and Definitions (iii)

Typically real-time systems have a combination of hard and soft timing


requirements.

Quality of Service = Usefulness of Results in Hard vs. Soft Real-Time Systems

Real-Time Systems - 1.21 - © Prof. B. Mysliwetz 2024


Rosenheim Technical University of Applied Sciences
1.3 Technical Terms and Definitions (iv)

Jitter
Deviation from true periodicity of an assumed periodic signal or event; here
a task’s starting (or completion) time fluctuations vs. an ideal periodic
timing.

Atomic Operation
An atomic operation refers to one or a group of operations/instructions that
can not or must not be interrupted (related to -> mutual exclusion).

Critical Section [of Code]


A critical section (or region) of code is a piece of a program during which no
interrupt or task switch may occur. In case the execution time of a critical
section is short (compared to system wide timing) the standard approach is
to disable interrupts before executing the critical code and re-enabling them
again afterwards (related to -> shared resources & mutual exclusion).
Real-Time Systems - 1.22 - © Prof. B. Mysliwetz 2024
Rosenheim Technical University of Applied Sciences
1.3 Technical Terms and Definitions (v)

Embedded [Computer] System


A computer is integral part of = is embedded into a machine or technical system and
as such does not appear externally (often it has no user interface at all !).
Frequently real-time systems are also embedded systems, e.g. the engine
management (ignition / fuel injection control) system of a car.

There is a wide range in performance and variety of hardware platforms for real-
time embedded systems, e.g.:

• 8-Bit CPU, 10-20 MHz, 128-1024 Byte SRAM, 2-8 kByte ROM/FLASH,
application software implemented ‘bare-metal’ = without OS (e.g. ATmega8
family or 80x51 architecture, as in Example A)

• 32-Bit Singlecore-Microcontroller, ~50..200 MHz, 16..64 kByte SRAM, 32..256


kByte FLASH (e.g. ARM Cortex-M4, as in Example D)

• 64-Bit RISC MultiCore-CPU Cavium OCTEON III CN7xxx: up to 48 x MIPS64


cores under LINUX (e.g. mobile phone network processing in base station)

Real-Time Systems - 1.23 - © Prof. B. Mysliwetz 2024


Rosenheim Technical University of Applied Sciences
1.3 Technical Terms and Definitions (vi)

Embedded [Computer] System


Usually embedded real-time systems interact directly with a technical system
via so called process interfaces, i.e. specific digital and/or analog IO signals or
standardized network/field bus links (e.g. Ethernet, CAN-Bus, FlexRay).

Determinism / Deterministic Timing Behaviour


If a system's logic & timing is predictable under all conceivable, i.e. also worst
case, load conditions it is called deterministic.

Real-time [operating] systems / software for hard real-time applications must


have deterministic timing behaviour.

Resources [Hardware-, or OS-]


All entities a program needs when executing, i.e. the CPU, memory, IO devices,
or also OS managed objects like files, windows on display, semaphores ...

Real-Time Systems - 1.24 - © Prof. B. Mysliwetz 2024


Rosenheim Technical University of Applied Sciences
1.3 Technical Terms and Definitions (vii)

Target, Target System, Target Hardware

The hardware-environment for which a program or an OS is designed.

Target Architecture

The underlying processor / core architecture == CPU family, e.g.

• x51

• Intel 80x86 (x86)

• Freescale (Motorola/IBM) PowerPC == MPC 55xx, MPC 7xx, MPC 8xx …

• ARM Cortex-M, ARM Cortex-R, ARM Cortex-A …

Real-Time Systems - 1.25 - © Prof. B. Mysliwetz 2024


Rosenheim Technical University of Applied Sciences
1.4 Review Questions

What is the difference between hard and soft real-time systems


response requirements ?

When is a system called deterministic with respect to timing ?

Real-Time Systems - 1.26 - © Prof. B. Mysliwetz 2024


Rosenheim Technical University of Applied Sciences

You might also like