Title: ReArchitecting System Science in Engineering Education
1Re-Architecting System Sciencein Engineering
Education
- Presented by
- Edward A. Lee
- Chess, UC Berkeley
- Curriculum Council Kickoff Meeting
- UC Berkeley, March 1, 2003
NSF
UC Berkeley Chess Vanderbilt University ISIS U
niversity of Memphis MSI
Foundations of Hybrid and Embedded Software
Systems
2Our Goals
- Curriculum Council
- Mold the new curriculum
- Spread the new curriculum
- Summer Institute
- How to facilitate change
- Recruit participants
- Curriculum Change
- Advocates of the new curriculum
- Critics of the new curriculum
- Draft Mission Statement
- The Curriculum Council of the Chess Center
provides strategic leadership and advocacy within
the community for curriculum modernization and
reform in engineering and computer science. It
serves as the principal liaison between the Chess
Center and education professionals, and will
strive to facilitate and promote improvements in
the way systems science is taught.
3Chess Center for Hybrid and Embedded Software
Systems
- Berkeley Component in the NSF/ITR project
- College of Engineering, University of California
at Berkeley
Board of Directors Tom Henzinger, tah_at_eecs.berkel
ey.edu Edward A. Lee, eal_at_eecs.berkeley.edu Albe
rto Sangiovanni-Vincentelli, alberto_at_eecs.berkeley
.edu Shankar Sastry, sastry_at_eecs.berkeley.edu
Other key faculty Alex Aiken, aiken_at_eecs.berkeley
.edu Dave Auslander, dma_at_me.berkeley.edu Karl He
drick, khedrick_at_me.berkeley.edu
Kurt Keutzer, keutzer_at_eecs.berkeley.edu
George Necula, necula_at_eecs.berkeley.edu
Masayoshi Tomizuka, tomizuka_at_me.berkeley.edu
Pravin Varaiya, varaiya_at_eecs.berkeley.edu
4Hybrid Embedded Software Systems
- Computational systems
- but not first-and-foremost a computer
- Integral with physical processes
- sensors, actuators
- Reactive
- at the speed of the environment
- Heterogeneous
- hardware/software, mixed architectures
- Networked
- adaptive software, shared data, resource discovery
5Mission of Chess
- To provide an environment for graduate research
on the design issues necessary for supporting
next-generation embedded software systems.
- Model-based design
- Tool-supported methodologies
- For
- Real-time
- Fault-tolerant
- Robust
- Secure
- Heterogeneous
- Distributed
- Software
The fate of computers lacking interaction with
physical processes.
6Current Software Engineering Methods are
Inadequate
- In software today
- Accidental complexity
- Unpredictability
- Uncomposability
- Brittleness
- Not good at interacting with the real world
- We are stuck in a lines of code view of SW
- Scaling this by putting more people onto it
- Lose understanding of the system as a whole
- Separation of specification from construction
7French Guyana, June 4, 1996
800 million embedded software failure
8Mars, December 3, 1999
Crashed due to uninitialized variable
94 billion development effort
40-50 system integration validation cost
10Embedded Software Architecture Today
11Embedded Software Architecture Tomorrow
12The Goal
- To create a modern computational systems theory
and systems design practice with
- Concurrency
- Composability
- Time
- Hierarchy
- Heterogeneity
- Resource constraints
- Verifiability
- Understandability
13(No Transcript)
14(No Transcript)
15(No Transcript)
16(No Transcript)
17How Safe is Our Real-Time Software?
18Another Traditional Systems Science -
Computation, Languages, and Semantics
Everything computable can be given by a
terminating sequential program.
Functions on bit patterns Time is irrelevant
Non-terminating programs are defective
sequence
f States ? States
States Bits
results state out
19Current fashion Pay Attention to
Non-functional properties
- Time
- Security
- Fault tolerance
- Power consumption
- Memory management
- But the formulation of the question is very
telling
20What about real time?
21Processes and Process Calculi
Infinite sequences of state transformations are
called processes or threads
Various messaging protocols lead to various
formalisms.
In prevailing software practice, processes are
sequences of external interactions (total
orders). And messaging protocols are combined i
n ad hoc ways.
incoming message
outgoing message
22Interacting Processes Concurrency as
Afterthought
Software realizing these interactions is written
at a very low level (semaphores and mutexes).
Very hard to get it right.
stalled by precedence
timing dependence
stalled for rendezvous
23Interacting Processes Not Compositional
An aggregation of processes is not a process (a
total order of external interactions). What is
it? Many software failures are due to this ill-
defined composition.
24Compositionality
Non-compositional formalisms lead to very awkward
architectures.
25Real-Time Multitasking?
26Promising Alternatives
- Synchronous languages (e.g. Esterel)
- Time-driven languages (e.g. Giotto)
- Hybrid systems
- Timed process networks
- Discrete-event formalisms
- Timed CSP
- We are working on interface theories and meta
models that express dynamic properties of
components, including timing.
27(No Transcript)
28Education Changes The Starting Point
Berkeley has a required sophomore course that
addresses mathematical modeling of signals and
systems from a computational perspective.
The web page at the right illustrates a broad
view of feedback, where the behavior is a fixed
point solution to a set of equations. This view
covers both traditional continuous feedback and
discrete-event systems.
29The Roots of Signals and Systems
- Circuit theory
- Continuous-time
- Calculus-based
Major models Frequency domain Linear time-invari
ant systems
Feedback
30Changes in Content
- Signal
- used to be voltage over time
- now may be discrete messages
- State
- used to be the variables of a differential
equation
- now may be a process continuation in a
transition system
- System
- used to be linear time invariant transfer
function
- now may be Turing-complete computation engine
31Changes in Intellectual Scaffolding
- Fundamental limits
- used to be thermal noise, the speed of light
- now may be chaos, computability, complexity
- Mathematics
- used to be calculus, differential equations
- now may be mathematical logic, topology, set
theory, partial orders
- Building blocks
- used to be capacitors, resistors, transistors,
gates, op amps
- now may be microcontrollers, DSP cores,
algorithms, software components
32Themes of the Course
- The connection between imperative and declarative
descriptions of signals and systems.
- The use of sets and functions as a universal
language for declarative descriptions of signals
and systems.
- State machines and frequency domain analysis as
complementary tools for designing and analyzing
signals and systems.
- Early and often discussion of applications.
Brain response when seeing a discrete Fourier
series.
33Outline
- 1. Signals
- 2. Systems
- 3. State
- 4. Determinism
- 5. Composition
- 6. Linearity
- 7. Hybrid Systems
- 8. Freq Domain
- 9. Freq Response
- 10. LTI Systems
- 11. Filtering
- 12. Transforms
- 13. Sampling
- 14. Review
- 15. Examples
34Outline
1. Signals 2. Systems 3. State 4. Determinism
5. Composition 6. Linearity 7. Hybrid Systems 8
. Freq Domain 9. Freq Response 10. LTI Systems
11. Filtering 12. Transforms 13. Sampling 14.
Review 15. Examples
35Outline
1. Signals 2. Systems 3. State 4. Determinism
5. Composition 6. Linearity 7. Hybrid Systems 8
. Freq Domain 9. Freq Response 10. LTI Systems
11. Filtering 12. Transforms 13. Sampling 14.
Review 15. Examples
36Outline
1. Signals 2. Systems 3. State 4. Determinism
5. Composition 6. Linearity 7. Hybrid Systems 8
. Freq Domain 9. Freq Response 10. LTI Systems
11. Filtering 12. Transforms 13. Sampling 14.
Review 15. Examples
37Outline
1. Signals 2. Systems 3. State 4. Determinism
5. Composition 6. Linearity 7. Hybrid Systems 8
. Freq Domain 9. Freq Response 10. LTI Systems
11. Filtering 12. Transforms 13. Sampling 14.
Review 15. Examples
38Outline
1. Signals 2. Systems 3. State 4. Determinism
5. Composition 6. Linearity 7. Hybrid Systems 8
. Freq Domain 9. Freq Response 10. LTI Systems
11. Filtering 12. Transforms 13. Sampling 14.
Review 15. Examples
39Outline
1. Signals 2. Systems 3. State 4. Determinism
5. Composition 6. Linearity 7. Hybrid Systems 8
. Freq Domain 9. Freq Response 10. LTI Systems
11. Filtering 12. Transforms 13. Sampling 14.
Review 15. Examples
40Outline
1. Signals 2. Systems 3. State 4. Determinism
5. Composition 6. Linearity 7. Hybrid Systems 8
. Freq Domain 9. Freq Response 10. LTI Systems
11. Filtering 12. Transforms 13. Sampling 14.
Review 15. Examples
41Outline
1. Signals 2. Systems 3. State 4. Determinism
5. Composition 6. Linearity 7. Hybrid Systems 8
. Freq Domain 9. Freq Response 10. LTI Systems
11. Filtering 12. Transforms 13. Sampling 14.
Review 15. Examples
42Outline
1. Signals 2. Systems 3. State 4. Determinism
5. Composition 6. Linearity 7. Hybrid Systems 8
. Freq Domain 9. Freq Response 10. LTI Systems
11. Filtering 12. Transforms 13. Sampling 14.
Review 15. Examples
43Outline
1. Signals 2. Systems 3. State 4. Determinism
5. Composition 6. Linearity 7. Hybrid Systems 8
. Freq Domain 9. Freq Response 10. LTI Systems
11. Filtering 12. Transforms 13. Sampling 14.
Review 15. Examples
44Outline
1. Signals 2. Systems 3. State 4. Determinism
5. Composition 6. Linearity 7. Hybrid Systems 8
. Freq Domain 9. Freq Response 10. LTI Systems
11. Filtering 12. Transforms 13. Sampling 14.
Review 15. Examples
45Outline
1. Signals 2. Systems 3. State 4. Determinism
5. Composition 6. Linearity 7. Hybrid Systems 8
. Freq Domain 9. Freq Response 10. LTI Systems
11. Filtering 12. Transforms 13. Sampling 14.
Review 15. Examples
46Outline
1. Signals 2. Systems 3. State 4. Determinism
5. Composition 6. Linearity 7. Hybrid Systems 8
. Freq Domain 9. Freq Response 10. LTI Systems
11. Filtering 12. Transforms 13. Sampling 14.
Review 15. Examples
47Outline
1. Signals 2. Systems 3. State 4. Determinism
5. Composition 6. Linearity 7. Hybrid Systems 8
. Freq Domain 9. Freq Response 10. LTI Systems
11. Filtering 12. Transforms 13. Sampling 14.
Review 15. Examples
48Lab Highlights
- Use Matlab and Simulink
- Tightly integrated
- Relating declarative imperative models
49Differences from Tradition
- No circuits
- More discrete-time, some continuous-time
- Broader than LTI systems
- Unifying sets-and-functions framework
- Emphasis on applications
- Many applets and demos
- Tightly integrated software lab
Text (Lee Varaiya) and website available.
50Bottom-Up or Top-Down?
Top-down - applications first - derive the foun
dations
Bottom-up - foundations first - derive the appl
ications
51Notation
- Sets and functions
- Sound Reals ? Reals
- DigitalSound Ints ? Reals
- Sampler Reals ? Reals ? Ints ? Reals
- Our notation unifies
- discrete and continuous time
- event sequences
- images and video, digital and analog
- spatiotemporal models
52Problems with Standard Notation
- The form of the argument defines the domain
- x(n) is discrete-time, x(t) is continuous-time.
- x(n) x(nT)? Yes, but
- X(jw) X(s) when jw s
- X(ejw) X(z) when z ejw
- X(ejw) X(jw) when ejw jw? No.
- x(n) is a function
- y(n) x(n) h(n)
- y(n-N) x(n-N)h(n-N)? No.
53Using the New Notation
- Discrete-time Convolution
- Shorthand
- Definition
54The Lab Component
- Introduce applications before the theory fully
supports them.
- Connection between a mathematical (declarative)
and a computational (imper-ative) view of
systems.
- Use of software to perform operations that could
not possibly be done by hand, operations on real
signals such as sounds and images.
55Technology
- Matlab
- imperative programming language
- finite signals (matrices and vectors)
- discrete signals
- Simulink
- block diagram language
- infinite signals
- continuous-time semantics
- We view these as complementary.
56Organization
- 3 hour scheduled sessions, once a week
- 11 labs in 15 week session
- 1 organizational, 1 technological, 2 review
sessions
- In-lab section
- takes about 1 hour, completed with signoff
- Independent section
- takes 1-6 hours, completed with a report
- Tightly synchronized with the lectures.
57Lab 1 (audio)
- Arrays and vectorization in Matlab
- Construct finite sound signals
58Lab 2 (images)
59Lab 2 (images)
60Lab 2 (images)
- Images
- blurring (averaging)
- edge detection (first-order differences)
61Lab 3 (state)
- State machines
- Tamagotchi virtual pet
62Lab4 (feedback control)
- Closed loop control of the virtual pet
63Lab 5 (difference equations)
64Lab 6 (differential equations)
65Lab 7 (spectrum)
66Lab 7 (spectrum)
67Lab 8 (comb filters)
68Lab 9 (plucked string model)
69Lab 10 (modulation/demodulation)
70Lab 10 (modulation/demodulation)
71Lab 10 (modulation/demodulation)
72Lab 10 (modulation/demodulation)
73Lab 10 (modulation/demodulation)
Note that the entire exercise remains in the
audio band.
74Lab 11 (sampling aliasing)
75Areas for Improvement
- Extensive capabilities of the tools can be
intimidating.
- Requires some programming background.
- On-line help for Matlab is much better than for
Simulink.
- Simulinks discrete-time models are
continuous-time models in disguise.
76Analysis of Spring 2000 Offering
- Class standing had little effect on performance.
- On average, the GPA of students was neither
lowered nor raised by this class.
- Students who attend lecture do better than those
that dont.
- Taking at least one of Math 53, 54, or 55 helps
by about ½ grade level.
- Taking Math 54 (linear algebra differential
eqs.) helps by about 1 grade level (e.g. B to
B).
- Computing classes have little effect on
performance.
77Distribution by Class Standing
78Effect of Class Standing
80 and above As 63 and above Bs 62 and below
Cs 176 of the 227 students responded (the b
etter ones).
79Effect of Showing Up
- Students who answered the survey were those that
showed up for the second to last lab.
- The mean for those who responded was 78, vs. 65
for those who did not respond (two grades, e.g. B
to A-).
- The standard deviation is much higher for those
who did not respond.
- A t-test on the means shows the data are
statistically very significant.
- We conclude that the respondents to the survey
do not represent a random sample from the class,
but rather represent the diligent subset.
80Attendance in Class vs. Score
Attendance is measured by presence for pop
quizzes, of which there were five.
81Effect on GPA
On average, students GPA was not affected by
this class.
82Student Opinion on Prerequisites
series
linear algebra
83Fundamental Change Requires Your Help
- Curriculum Council
- Mold the new curriculum
- Spread the new curriculum
- Summer Institute
- How to facilitate change
- Recruit participants
- Curriculum Change
- Advocates of the new curriculum
- Critics of the new curriculum
84Conclusion
- A new system science that is at once physical
and computational is emerging.
- It will form the foundation for our
understanding of computational systems that
engage the physical world.
- And it will change how we teach, research and
engineer systems.
- The engineering curriculum has to change