Вы находитесь на странице: 1из 17

Introduction to Embedded Systems

Edward A. Lee
UC Berkeley EECS 149 Spring 2012 Copyright 2008-12, Edward A. Lee & Sanjit Seshia, All rights reserved

Lecture 0: Logistics

2001 National Research Council Report Embedded Everywhere


Information technology (IT) is on the verge of another revolution. Driven by the increasing capabilities and ever declining costs of computing and communications devices, IT is being embedded into a growing range of physical devices linked together through networks and will become ever more pervasive as the component technologies become smaller, faster, and cheaper... These networked systems of embedded computers ... have the potential to change radically the way people interact with their environment by linking together a range of devices and sensors that will allow information to be collected, shared, and processed in unprecedented ways. ... The use of [these embedded computers] throughout society could well dwarf previous milestones in the information revolution.

EECS 149, UC Berkeley: 2

l1

What this course is about


A principled, scientific approach to designing and implementing embedded systems
Not just hacking!! Hacking can be fun, but it can also be very painful when things go wrong Focus on model-based system design, and on embedded software
EECS 149, UC Berkeley: 3

Your textbook, written for this course, strives to identify and introduce the durable intellectual ideas of embedded systems as a technology and as a subject of study. The emphasis is on modeling, design, and analysis of cyberphysical systems, which integrate computing, networking, and physical processes. http://LeeSeshia.org
EECS 149, UC Berkeley: 4

l2

Publication strategy: Free PDF file designed for on-line reading: Extensive hyperlinks Color Text search Zoom Easily updated

http://LeeSeshia.org
EECS 149, UC Berkeley: 5

Publication strategy: Print-on-demand paperback: Extensive hyperlinks Extensive index Low cost Easily updated

http://LeeSeshia.org

EECS 149, UC Berkeley: 6

l3

Modeling, Design, Analysis


Modeling is the process of gaining a deeper understanding of a system through imitation. Models specify what a system does. Design is the structured creation of artifacts. It specifies how a system does what it does. Analysis is the process of gaining a deeper understanding of a system through dissection. It specifies why a system does what it does (or fails to do what a model says it should do).
EECS 149, UC Berkeley: 7

Book Map

The three threads are designed to be read concurrently and fit nicely within a 15week semester. EECS 149, UC Berkeley: 8

l4

Canonical Example of a CPS Application


Modeling: Flight dynamics (ch2) Modes of operation (ch3) Transitions between modes (ch4) Composition of behaviors (ch5) Multi-vehicle interaction (ch6) Design: Processors (ch7) Memory system (ch8) Sensor interfacing (ch9) Concurrent software (ch10) Real-time scheduling (ch11) Analysis Specifying safe behavior (ch12) Achieving safe behavior (ch13) Verifying safe behavior (ch14) Guaranteeing timeliness (ch15) EECS 149, UC Berkeley: 9

STARMAC quadrotor aircraft (Tomlin, et al.)

A Theme in our course: Model-based design


Models are abstractions of systems:

structural (e.g. OO design) ontological (e.g. type systems) imperative logic (procedural epistemology) functional logic actor-oriented (e.g. dataflow models)

All of these have their place


EECS 149, UC Berkeley: 10

l5

A Challenge
We typically learn to use modeling techniques, not to evaluate modeling techniques.
this is how computers work l this equation describes that feedback circuit
l

rather than
this is how Von Neumann proposed that we control automatic machines l ignoring the intrinsic randomness and latency in this circuit, Black proposed that we could idealize its behavior in this way
l

We need to think about meta-modeling, not just modeling. They must learn to think critically about modeling methods, not just about models.
EECS 149, UC Berkeley: 11

http://chess.eecs.berkeley.edu/eecs149/
The website is your key source of information. Check it often!

First homework assignment

EECS 149, UC Berkeley: 12

l6

Labs: Hill-Climbing Robot First 6 Weeks

EECS 149, UC Berkeley: 13

The LabManual is a work in progress. Please help us make it better by offering constructive suggestions and correction. Download package including lab manual and documents it links to from: http://LeeSeshia.org/lab

EECS 149, UC Berkeley: 14

l7

Course Project
A major component of the course You get to pick your course project (we suggest topics, but you can also develop your own) See past projects on the course website.

EECS 149, UC Berkeley: 15

Some Projects

Biomimemics

Face Tracking

Autonomous Flight

Distributed Music

Robot Train

Robot Swarm
EECS 149, UC Berkeley: 16

l8

Class Projects are Defined by the Students. Example:

May 16, 2008

One of the five project teams in 2008 developed a balancing robot inspired by the Segway. They used a Nintendo Wiimote as a controller communicating with a PC running LabVIEW, communicating with a Lego Mindstorm NXT, which they programmed in C.
EECS 149, UC Berkeley: 17

This Subject is Multidisciplinary

Computer Science: Carefully abstracts the physical world

System Theory: Deals directly with physical quantities

Cyber Physical Systems: Computational + Physical

EECS 149, UC Berkeley: 18

l9

A Challenge
Models for the physical world and for computation diverge.
physical: time continuum, ODEs, dynamics l computational: a procedural epistemology, logic
l

There is a huge cultural gap. Physical system models must be viewed as semantic frameworks, and theories of computation must be viewed as alternative ways of talking about dynamics.

EECS 149, UC Berkeley: 19

An Advantage: A Unified EECS Department

EECS 149, UC Berkeley: 20

l10

The Prerequisite Challenge Core course


Introduction to Embedded Systems

EECS 149, UC Berkeley: 21

Structure and Interpretation of Signals and Systems

The Prerequisite Challenge Core course Prerequisites

Machine Structures Discrete Mathematics and Probability Theory EECS 149, UC Berkeley: 22

l11

DSP Random processes Signals and Systems Robotics Control

The Prerequisite Challenge Core course Prerequisites Defensible prerequisites

Transducers Microcomputer interfacing

Digital Systems Operating Systems

Software Engineering Algorithms EECS 149, UC Berkeley: 23

DSP Random processes Signals and Systems Robotics Control

The Prerequisite Challenge Core course Prerequisites Defensible prerequisites Transitive closure

Transducers Microcomputer interfacing

Digital Systems Operating Systems

Software Engineering Algorithms EECS 149, UC Berkeley: 24

l12

Book Structure: Chapter 1: Introduction


This chapter explains the focus of this course on cyber-physical systems and the role of design, modeling, and analysis.

EECS 149, UC Berkeley: 25

Chapter 2: Modeling Physical Dynamics


This chapter describes two distinct modeling techniques that describe physical dynamics: ordinary differential equations and actor models. The chapter emphasizes the relationship between these models, and the relationship of those models to the systems being modeled. Our objective is to focus the attention of the reader on the fact that we may use multiple models for a system, and that models are distinct from the systems being modeled. The fidelity of a model (how well it approximates the system being modeled) is a strong factor in the success or failure of any engineering effort.
EECS 149, UC Berkeley: 26

l13

Chapter 3: Modeling Discrete Dynamics


This chapter gives an introduction to the use of state machines to model systems with discrete dynamics. It gives a graphical notation that is suitable for finite state machines, and an extended state machine notation that can compactly represent large numbers of states. It also gives a mathematical model that uses sets and functions rather than visual notations.

EECS 149, UC Berkeley: 27

Chapter 6: Concurrent Models of Computation


This chapter provides a whirlwind tour of a rather large topic. It begins with synchronous-reactive models, which are closest to the synchronous composition of state machines considered in the previous chapter. It then considers dataow models, where execution can be more loosely coordinated. Only data precedences impose constraints on the order of actor computations. The chapter then concludes with a quick view of a few models of computation that explicitly include a notion of time. Such MoCs are particularly useful for modeling cyber-physical systems.
EECS 149, UC Berkeley: 28

l14

Chapter 7: Processors
The choice of processor architecture for an embedded system has important consequences for the programmer. Programmers may need to use assembly language to take advantage of esoteric architectural features. For applications that require precise timing, it may be difficult to control the timing of a program because of techniques in the hardware for dealing with pipeline hazards and parallel resources.

EECS 149, UC Berkeley: 29

Chapter 9: I/O
This chapter reviews hardware and software mechanisms used to get sensor data into processors and commands from the processor to actuators. The emphasis is on understanding the principles behind the mechanisms, with a particular focus on the bridging between the sequential world of software and the parallel physical world. This chapter also covers the analog/digital interface from a signal processing perspective, emphasizing the artifacts that may be introduced by quantization, noise, and sampling. .
EECS 149, UC Berkeley: 30

l15

Chapter 10: Multitasking


This chapter focuses on mid-level abstractions for concurrent programs, above the level of interrupts and parallel hardware, but below the level of concurrent models of computation. Specifically, it explains threads, mutual exclusion, and semaphores. It shows that threads are fraught with peril, and that writing correct multithreaded programs is extremely difficult. Message passing schemes avoid some of the difficulties, but not all, at the expense of being somewhat more constraining. In the long run, designers will be better off using higher-levels of abstraction, as discussed in Chapter 6.
EECS 149, UC Berkeley: 31

Chapter 12: Temporal Logic


Dependability and correctness are central concerns in embedded systems design. Formal specifications, in turn, are central to achieving these goals. This chapter studies temporal logic, one of the main approaches for writing formal specifications. This chapter provides techniques for precisely stating properties that must hold over time for a system. It specifically focuses on linear temporal logic, which is able to express many safety and liveness properties of systems.

EECS 149, UC Berkeley: 32

l16

Chapter 13: Equivalence and Refinement


This chapter considers three increasingly strong abstractionrefinement relations for FSMs. These relations enable designers to determine when one design can safely replace another, or when one design correctly implements a specification. The relations are type refinement, language refinement, simulation (and bisimulation) relations.

EECS 149, UC Berkeley: 33

Chapter 15: Quantitative Analysis


Quantitative properties, involving physical parameters or specifying resource constraints, are central to embedded systems. This chapter gives an introduction to basic concepts in quantitative analysis. The chapter focuses on execution time analysis, considering loop bounds, path feasibility, path explosion, and cache effects.

EECS 149, UC Berkeley: 34

l17

Вам также может понравиться