Professional Documents
Culture Documents
2
Case Studies
Solution 1: Main Program/Subroutine with Shared Data
3
Main Program with Shared Data
Master Control
Subroutine Calls
Input Circular
Alphabetizes Output
Shift
DMA
Output
Input Characters Index Alphabetized Index Mediu
Mediu
m
m
• Disadvantages:
• Advantages:
–Change in data storage format
–Efficient Control Flow Mechanism affects all modules
–Efficient Data Representation – Ease of Upgrade to different
–Efficient Data Flow between algorithms?
modules – Reusable in different
domains?
4
Abstract Data Types
Master Control Subroutine Calls
Input
Word Output
Word
Setup
Input
Alpha
Char
Char
Char
Char
Output
Set
Set
Ith
Mediu
Mediu
m
m
Character
Circular Shift Alphabetic Shifts
s
•Data is no longer shared by the modules
– Each module provides an interface that permits other modules to access data only by invoking procedures in
its interface.
•Advantages:
– Both algorithms and data representations can be changed in each module without affecting the other
modules.
• Better reuse as the modules make few assumptions about the others in which they interact.
•Disadvantages:
– Adding new functions requires the other modules to be modify existing
modules or add new modules.
5
Implicit Invocation
Master Control Subroutine Calls
Input Circular
Alphabetizer Output
Shift
Outp
Delete
Delete
Insert
Insert
Inpu I th ut
I th
t Medi
Medi um
um
Lines Lines
Outp
Circular ut
Input Alphabetizer Output Medi
Inpu Shift um
t
Medi
um
•Advantages:
–Maintains the intuitive processing flow
–Each filter can function in isolation
–New functions easily added to the processing flow
–Filters are logically independent of one another
•Disadvantages:
–Impossible to modify the design for interaction
–Data design is inefficient as all data must be copied throughout the system.
Fall 2002 7
Comparisons
Shared Data Abstract Data Type Implicit Invocation Pipe & Filter
Algorithm Changes - - + +
Data Representation - + - -
Changes
Function Changes + - + +
Performance + + - -
Reuse - + - +
Control + + + -
Score 0 +2 0 0
8
Suggested Comparisons
The shared data solution is particularly weak in its support for changes in
The abstract data type solution allows changes to data representation and
9
Instrumentation Software
–Our second case study describes the industrial development of a
software architecture at Tektronix, Inc.
–This work was carried out as a collaborative effort between several
Tektronix product divisions and the Computer Research Laboratory.
–The purpose of the project was to develop a reusable system architecture
for oscilloscopes.
11
Instrumentation Software
–A layered model
–In this model the core layer represented the signal manipulation
functions that filter signals as they enter the oscilloscope.
–These functions are typically implemented in hardware. The next layer
represented waveform acquisition. Within this layer signals are digitized
and stored internally for later processing.
13
Instrumentation Software
– An OO Model
•How does the data and model fit together which led to issues on
partitioning and measuring.
•How does the user interact with it ?
–A Layered Model
•Nice at first thought, however the boundaries of abstraction enforced
by the layers, conflicted with the needs for interaction between the
wave form processing functions.
16
Mobile Robotics
Control Loop Approach
–(Book:) Note that feedback control loops assume changes in the environment are
continuous and require continuous reactions.
–(Note that this is Not necessarily true -> Some feedback systems (especially weather prediction
systems) can take months of sample and analysis before we are able to update predicted data.
– If the system is required to have an immediate reaction to an environment then we should consider this
approach.
– We will find that there are better architecture approaches (I.e. simplified BB) for control of this type of
problem, even for the control of real-time video.
17
Mobile Robotics
–Req. (2) Architecture must allow for Uncertainty
–In a control loop approach, the expected output signal is fed back to the input.
–The difference between the input signal and the predicted output signal
generates an error signal that drives the control loop algorithm.
–This is the only uncertainty allowed.
–If more detailed uncertainty in the observed sampled inputs are required to be used
in the control laws then we might go to an optimal estimator.
–However if “Uncertainty” implies that we want “Emergent” as of yet
undefined behavior from our system in response to unplanned or unforeseen
inputs, then a simple control loop architecture will not be able to handle the
requirement.
– “I.e I want the Mars Rover to “Investigate” any situation that appears “interesting”.
– (Dynamic task prioritization)
18
Mobile Robotics
•Control Loop Approach
–Req. (3) Architecture must account for dangers present in its environment or its operation
–Fault-tolerance and safety are supported by this architecture style to the extent that it is
“SIMPLE” and therefore reduces the errors that can enter the system.
– This is often not the case -> sensors fail, redundancy and voting logic must now be
incorporated into the system, adding weight, power, and cost.
–Conclusion:
–Control Loop Architecture appears to be the best for SIMPLE robotic systems that handle a few
number and types of inputs within a PREDICTABLE environment
19
Closed Loop robotic architecture
20