You are on page 1of 35

ACS6110 - Part 1

EMBEDDED CONTROL
SYSTEMS
Dr Simon A Pope
s.a.pope@sheffield.ac.uk
AJB room C07d

Module Aim
To demonstrate how the desired functionality of a
system, for example; a control system, fault
detection system, health monitoring system, etc.,
can be developed and implemented using a CPU
and external devices into an embedded system
application/device to perform the desired tasks in
the real world:
Interfacing hardware associated with
embedded systems
Realising the desired functionality of an
embedded system through software

Module Timetable week 1

Module Timetable week 2

Structure
The module contains substantial inquiry based
learning using take home lab kit:
Lectures cover general concepts and background.
Demos show the implementation of some of the concepts
on a real system.
Additional reading covers additional concepts and more
detail on those covered in the lectures.
Labs provide further information on the concepts covered in
this module and allow you to gain experience implementing
them.

Assessment

All assessed work is to be conducted


individually
2 x Labs following a structured lab sheet (12.5%
each)
These will be available on MOLE 48 hours before the start of
the related assessed lab session and you can work through
these in your own time. However you will need to attend
the correct assessed lab sessions indicated in the
timetable to get your work marked (e.g. work for Lab 1
will not be marked in the Lab 2 session).
1 x Assignment (25%)
The assignment will be released on MOLE immediately after
Lecture 4 on the Friday week 1. It will describe a problem
that needs to be solved using the STM Discovery kit and
you will need to design a solution. The deadline for

Further Reading
Details about all additional recommended sources
of information are available on MOLE:
The additional reading sheets
A link to a folder containing the data sheets
and support material for the STM Discovery
board you will need to download this to be
able to use the equipment.
A list of books and external sources.

Feedback

Questions answered by me during and after the lectures.


Verbal and general written feedback on the board from me
during in class tasks.
Verbal and general written feedback during the lab support
sessions.
Verbal feedback on your solutions during the assessed lab.
Written feedback on MOLE for your submitted assignment
(within 3 weeks)
General feedback to the whole class on module
performance.

Lecture 1
Introduction to Embedded
Systems
What is an embedded system?

Examples of embedded systems


Characteristics of embedded systems
Embedded systems case study

Introduction
How do you realise a design?
Theoretical idea/design
Model and
simulate design
Rapid control
prototyping
Embedded
system

Introduction
What is an Embedded System?
An embedded computer system is
any device that includes a
programmable computer but is not
itself intended to be a generalpurpose computer

MP3 Player

Engine management unit

Wireless router

Generalisation

Digital/
Analog

Microprocessor/
Input Microcontroller Output
MEM

Storage of code
and data

Other
hardware

Digital/
Analog

Generalisation

Controller
1

Controller
2

Embedded Control System


Controller
3
Embedded Control
System

Plant

Engine management unit


What are its functions?

Sample the sensor signals (fuel/air


flow rate, valve positions, throttle
position, emissions, etc.).

Determine how to vary the output


signals such as the various valve
positions.

Output the determined voltages to


adjust the desired output signals
(valve positions, etc.) to provide
the desired engine response.

Characteristics of Embedded Systems


Embedded systems constitute the widest possible use of
computer systems
Fastest growing market of microprocessors
Widest range of hardware (power and cost)
Usually designed to perform selected functions at low-cost
Potentially high volume manufacture.
Price of an embedded system is a key factor in the
design

Hardware specification
Speed and cost requirements are different for each
application
Can require some form of user interface
Embedded systems often use custom hardware (e.g. DSP)
to perform computationally intensive functions combined
with lower power CPU.
Power consumption affects cost of hardware, battery life
and also weight
Minimise memory (code and data size)
Minimise processor speed

Microprocessors / Microcontrollers

Processors are the hub of embedded systems:


Microprocessor general purpose chip
Microcontroller Designed with specialist
functionality in mind. Microcontrollers can contain
memory, A/D, UARTS, DSPs all within the same
integrated circuit.
Microprocessors are a very efficient way to implement
digital systems and vastly reduce the complexity of digital
circuits

Canon IXUS
130

Both use the


same digital
image processor

Canon IXUS
105

Linksys WRT 54G


series of wireless
routers
Broadcom microprocessor updated
over several versions (125MHz
increased up to 216MHz), while case
and other components such as
memory remained the same

Software specification
The program and data which enables most of the functions
of embedded systems, particularly basic functions, is often
called firmware. Usually it cannot be altered by the user.
In some cases additional software can be used to add more
user functionality.
Firmware/Software on embedded systems often run with
real-time constraints and limited hardware resources.

Reliability
Embedded systems often run continuously for years without
errors and may be outside the reach of humans:
Often avoid moving parts (rotating disk drives) in
favour of solid state devices (flash memory)
Firmware developed and tested more rigorously than
software for PCs

Hard and Soft Real-Time Embedded Systems


Many embedded systems have a real-time constraint
Actions/Outputs must occur in a timely fashion (e.g.
valve timing in an engine)
Software routines / calculations may be time bound (e.g.
data transfer between devices must occur before a
deadline)
There is a distinction between hard real-time systems and
soft real-time systems:
Hard real-time: the response time is critical. Otherwise
catastrophic! (e.g. valve timing in an engine)
Soft real-time: delays can be tolerated - system
behaviour is still acceptable (e.g. data transfer between
devices on a network often fall into this category. Equally
in some industrial situations they could be hard)

Periodic and Aperiodic Real-Time Tasks


Many real-time systems are composed of multiple tasks
periodic or aperiodic
Periodic tasks have a continuous and deterministic pattern
of time intervals between requests of a resource. (e.g.
sampling a sensor output). Can be characterised by a tuple:
the request period
the service time
Aperiodic tasks request resources at non-deterministic
periods (e.g. read/write to a data port such as the WAN port
on a network)
Real-time tasks must be scheduled to be completed before
a deadline Scheduling algorithms

In class task
In groups (or on your own) select an example of
an embedded system.
Determine what the expected tasks of the system
are by consideration of its main functions.
Are these tasks hard or soft?
Which would you expect to be periodic and which
aperiodic?

Who designs embedded


systems?
Application/Systems design engineers
Hardware engineers
Software engineers

One of the first recognisably modern embedded systems:


Apollo Guidance Computer

Ran the inertial guidance system of both the command


module and Lunar Module (LEM)

Case Study Apollo Guidance Computer


Each of the moon bound Apollo missions (except Apollo 8)
carried two AGCs, one in the Command Module (Guidance &
Navigation System) and one in the Lunar Module (Primary
Guidance, Navigation and Control System).
CPU: 2.048 MHz crystal clock
Central Registers: Four 16-bit registers for general
computational use, including an accumulator and program
counter.
Other Registers: Used internally during operation,
including sequence register, memory buffer, ADDER
register, pre-fetch register and four 16-bit input and four
16-bit output registers.

Memory: ROM (Block I: 24Kb words, Block II: 32 Kb words),


RAM (Block II: 4Kb words)
Data Bus: 16-bit read/write
Device Control: 5 vectored interrupts
Software: Written in AGC Assembly Language. It included
a real time operating system with an executive to schedule
tasks allowing multitasking (running up to 8 tasks
simultaneously)

All of these concepts will be covered later in the course and


it will become evident that even the earliest embedded
system contains components that are still widely used
today.

Summary
Module Timetable and Structure
Module Assessment
What is an embedded system?
Characteristics of embedded systems
Examples of embedded systems
Some brief definitions:
Hard and soft real-time systems
Periodic and aperiodic tasks
Additional reading document Bits, bytes and bitwise logic
operations.

Demo 1
Introduction to the individual lab
kit
Introduction to the STM32F4Discovery
Introduction to the Keil Vision
programming environment
Developing your first basic program

The STM32F4 Discovery


board

Processor
ARM
- An
embedded
Cortex
M-4

system for teaching and learning

32-bit and clocked up to 168MHz


1 MB Flash
ADC, DAC, SPI, I2S, UART, etc.
STM32F4Discov
ery

Peripherals
Accelerometer
(LIS3DSH)
Base
boardaudio driver
Microphone and

Keil Vision
- The programme development environment
Supports the STM32F4 Discovery
Contains peripheral drivers and a Real-Time Operating System

Program development and debugging interface


Compiler and Simulator

Using the STM32F4 Discovery and


Keil Vision
The Introductory lab sheet is a self-contained
introduction to the STM32F4 Discovery and using
Keil Vision to develop a project.
You will use the STM32F4 Discovery and Keil Vision
for all of the embedded systems labs and the
assignment.
The code that you will write will use the C
programming language.
This demonstration will go through the steps in the
Introductory lab that are required to setup a project
with the STM32F4 Discovery and Keil Vision.

You might also like