18-649 Project 11
Due Thursday, April 9th, 2009 11:59 PM
Please submit all project-related correspondence to

Changelog:
- Dated entries will be added here if the project is modified after
it is released.
In this project, you will
complete your testing and develop a network schedule for your design.
In addition to these tasks, there is one more major change.
Consider this scenario: at your most recent project meeting your boss
informs you that the marketing department has decided to change the
target audience for your elevator product (didn't you get the
memo?). Now, the elevator not
only has to exhibit even better passenger delivery
performance, but it also has to be safe and deliver passengers when
some components fail. In order for you to meet your new
performance requirements, your boss has gotten approval to use new,
top-of-the-line drive motors which accelerate at the same rate, but
have a much higher to speed. Consult projects 12 and
13 (once they are posted) to review the new reliability requirements.
Assignment:
This assignment has three parts: upgrade for the high speed
drive, network scheduling, and complete testing of your design.
Before you begin, be sure you download the latest release of the
simulator from the download page.
The new release contains the drive modifications and some necessary
upgrades for the network schedule analysis.
1. High Speed Drive Modification
Modify your design to work with the new drive speed parameters:
- "Fast" speed is now 5 m/s.
- Acceleration remains 1.0 m/s/s.
- "Slow" speed remains 0.25 m/s.
Pay special attention to how this affects the stopping distance and
commit point computations. You may also want to consider if this
modification will impact your network schedule. You should
log the change to the design
requirements as an issue and record all related changes accordingly.
2. Network Schedule
Develop a network schedule using Rate
Monotonic Analysis (RMA) with harmonic periods and deadline =
period. Sometimes this is called Deadline Monotonic
Analysis or Deadline Monotonic Scheduling. For details, refer to
the lecture
material on
scheduling and the two CAN lectures.
2.1. Message Dictionary
You will start by constructing a message dictionary table. You
message IDs shall have a structure given here:
| Message ID Breakdown |
Size (bits) |
| Criticality (always 01) |
2 |
| Message ID |
11 |
| Source Node ID |
8 |
| Replication ID |
8 |
| Total # of bits |
29 |
Note that you may assign arbitrary values for the Message and Source
Node IDs within the constraints dictated by the RMA schedule.
Your message dictionary will be similar to the tables shown in the simulator development
overview, although all message IDs (even for the module messages)
should be contained in a single table. Each row of the table
shall describe a message
type, including
messages sent by the modules and smart sensors.
The message
dictionary table shall have the following columns (the columns must be in the order listed
below! The values in the underlined columns must be consistent
between the two
tables.):
- Sender Node Name
- the name of the node that sends the message
- Message Name -
the type of message (e.g. "mDesiredFloor")
- Deadline - the
deadline given in units of milliseconds
- Message ID - the message ID number (for message priority)
- Source Node Type - the type of the sending node (each type shall
have a unique value)
- Replication Type - the replication type, e.g. "none", "hall,
side", "floor, hall, direction"
- Base Can ID -
the base CAN ID according to the message ID breakdown table above
(before a replication ID is added). If the message is not
replicated, this value is just the CAN ID.
2.2. Network Schedule Analysis
Next, construct a network schedule analysis table. The table
shall have
a row corresponding to each row of the message dictionary table.
The table shall have the following columns (the columns must be in the order listed
below! The values in the underlined columns must be consistent
between the two
tables.):
- Sender Node Name
- Message Name
- Base CAN ID
- Replication Count - how many replications of this message are
there in this elevator. This value must be a positive integer
number.
- Deadline
- Field 1 description - description of the data in the first
message field
- Field 1 type - the data type, e.g. "boolean", "enum" or "int" and
any units associated with the data (e.g. "mm" or "m/s")
- Field 1 bit length - the number of bits in the data payload that
are required to send this message. Be sure you factor in the new
drive parameters!
- (Optional) additional sets of field columns (description, type,
bit length) as needed for messages that contain more than one type of
field.
- Total bit length - total number of bits needed to transmit the
message
- Total byte length - number of bytes needed to transmit the
message. This value must be a positive integer.
- Best-case message length - the total length of the CAN message,
including header and payload, but no bit-stuff overhead.
- Worse-case message length - the total length of the CAN message,
including header, payload, and
worst-case bit-stuff overhead.
- Best-case bandwidth* - compute the total number of bits per
second that will be used by all instances (replicas) of the message in
the best case.
- Worst-case bandwidth* - compute the total number of bits per
second that
will be used by all instances (replicas) of the message in the worst
case.
Columns marked with an asterisk (*) must contain an extra row at the
bottom that contains the total of all values in the column.
You can find a template for the two tables here: network-schedule-template.xls.
Consult the technical
notes page for some Excel
hints. If the Excel file you provide uses formulas in the network
analysis, then we will be able to follow your analysis and provide
partial credit if there are
errors.
A few more notes about scheduling and the tables:
- In your portfolio, the rows in both
tables
must be sorted so that messages with the shorter deadlines are shown
first.
- The purpose of "Field X bit length" column is to describe how
many bits are actually used to store the information. This
information must accurately
reflect the CAN translators that you have implemented in your
design (see below for details). You will need to analyze the
translators used the modules
(in the elevatormodules package) to determine the field sizes and
formats.
- The total worst-case bandwidth
required by your elevator must be less than 175,000 bits/second.
This means that beginning with this project, you must run your
acceptance tests with the additional flag "-b 175". You do NOT
need to execute unit or integration tests with this flag enabled.
- You may also combine some messages.
Messages may be combined if and only if the two messages 1) originate
from the same instance of the sending node and 2) have the same
deadline. Note that "the same instance of the sending node" means
you cannot combine the mDoorMotor commands from multiple DoorController
objects.
- You may remove any messages that are not required by your design.
- You may NOT add new messages to the schedule unless you obtain TA
approval.
- All data values must be transmitted in the payload
portion of the message. You may not
use
bits of the message ID to transmit data values.
Some further notes regarding adding, removing, and combining messages:
- If you combine messages, you should do so only in the network
schedule and implementation. Do NOT modify your design documents
with the combined message. Conceptually, combining messages is an
implementation issue. Essentially, you are saying,
"coincidentally, these messages are always sent at the same time."
- If you remove or add* messages, you MUST update the Message
Dictionary and Interfaces in the Requirements I and II documents.
You will also need to update any sequence diagrams and other artifacts
that may directly or indirectly refer to the message. This is
part of having a complete and consistent design.
- If you combine messages, then you should alias the constants in
the MessageDictionary class with the same value. For example,
suppose
you combine mDesiredFloor and mDesiredDwell into a single message with
ID 0x11111111. Then your MessageDictionary would look like this:
public final
static int DESIRED_DWELL_BASE_CAN_ID = 0x11111111;
public final
static int DESIRED_FLOOR_CAN_ID = 0x11111111;
You may define an additional
constant, e.g.
public final
static int DESIRED_FLOOR_AND_DWELL_CAN_ID = 0x11111111;
But you may NOT remove any of the
pre-defined constants (these are
necessary for fault injection). If you remove any of the existing
constant definitions and it results in a failure of code (such as the
fault injector), then you will be responsible for this (i.e. lose
points) as though you had submitted code that would not properly
compile.
*You may only add messages after
obtaining permission from a the course staff.
2.3 Network Translator Updates
In order to meet the bandwidth requirements of the system, you will
need to rewrite your message translators to match the reduced
the
size of the CAN payloads in your network schedule. At this point,
you will need to stop using the BooleanCanPayloadTranslator and
IntegerCanPayloadTranslator, which are very inefficient. You may
implement your new translators any way you want, but remember that all
your code must be included in the elevatorcontrol
package and that no modifications to the rest of the simulator
may be included in your submission.
You will also need to modify the elevatorcontrol.MessageDictionary
file with the CAN IDs required by your schedule.
Make sure your implementation matches the network schedule you have
defined in the previous step.
2.3. Compare your analysis with simulation results
Run one or more acceptance tests with the "-b 140" flag and record
the network utilization. Use this (with the bandwidth) to compute
the actual number of bits/s used by the controllers in your
design. Record the simulation results along with the total best-
and worst-case total bandwidth in the summary HTML file and include 1-2
paragraphs (no more than 500 words) of discussion that addresses the
following points:
- Is the theoretical analysis consistent with the simulation
results?
- What factors might cause the simulation results to differ?
- If the theoretical analysis is NOT consistent, explain why.
Notes:
- Our testing indicates that the utilization results produced by
the simulator are accurate. If you find significant
inconsistencies, the probably means you have an error in your
simulation or in your analysis. If you think you have found a bug
in the simulator framework, you should submit the details to the staff
list as soon as possible (per the bug
handling policy).
- Per the details below, you are not required to pass all tests,
but the theoretical analysis must be accurate (including the message
sizes and field formats matching the implementation) to receive full
credit for that part of the assignment.
- If you design is not passing any of the acceptance tests, you can
use the utilization verbose flag to obtain an intermediate result for
comparison.
3. Complete Testing of your Design
Modifications to your design may require modifications to your
tests. You should make all the changes necessary to have a
complete and consistent design package.
In particular, you will need to modify the unit and integration tests
to use the new CAN IDs. The technical
notes page contains a script that can replace the old CAN IDs with
the new ones in all your test files with one command.
Once you have made all necessary changes to your design, you should run
all tests, including:
- All unit tests
- All sequence diagram tests
- All acceptance tests
Because of the design changes in this project, you are not required to pass
all tests for Project 11. However, your test logs must be
complete and up-to-date. Any test that does not pass must have
the related faults documented in detail (as described in Project
10). Remember that
every time a failed test results in a change to the design, you must
document the fact that the test failed and record the
resulting changes in the issue log .
NOTE: You will be required
to pass all tests for Project 12. We strongly advise you NOT to put the
work off until next week!
Handing In Results
Each team shall submit exactly one copy of the assignment.
In addition to the rest of the design, you will complete the Network
Schedule page of the portfolio template. You must also include
the Excel file containing your network analysis and link it into the
Network Schedule page.
In addition, your submission shall follow format, directory, and
other aspects of
organization specified in previous projects. By this point in the
semester you know the drill...
Make sure everything in your project is updated and consistent
across the
entire design. Pay attention to what the course staff has told you in
the
lectures, recitations, office hours, and in the feedback from previous
projects, and address the issues they point out.
Grading Criteria:
This project counts as one team grade. Points are assigned as follows:
This project assignment is worth 105 points:
- 30 points for fast drive upgrade
- 10 points for the message dictionary table
- 20 points for the network schedule
- 10 points for comparison of theoretical / simulation results
- 10 points for successfully completing all unit diagram tests (or
properly documenting failures)
- 10 points for successfully completing all sequence diagram tests
(or properly documenting failures)
- 10 points for successfully completing all acceptance tests (or
properly documenting failures)
- 5 points for Improvements Log
Note: above points include relevant updates to traceability, change
log,
defect tracking, etc.
Note: we are no longer awarding points for having a complete and
consistent
design package, nor just for following instructions. Those should be a
given
at this point. However, TAs can deduct points from the project for
failing to
following turn-in directions or having an end-to-end design package
with
blatant gaps.
Back to course home page