SRS - Revision 2

You might also like

Download as pdf or txt
Download as pdf or txt
You are on page 1of 31

Software Requirements Specification (SRS)

Assisted Direct Start
 

Authors:  Alec Dutch, Cameron Keif, Taylor Jones, Duncan Young

Customer: Ford Motor Company

Instructor: Dr. Betty Cheng

1 Introduction

The SRS document is divided into 7 subsections ­ Introduction, Overall Description,
Specific Requirements, Modeling Requirements, Prototype, References, and Point of Contact.
The bulk of the document is contained in the Overall Description section, which provides an
overview of the Assisted Direct Start (ADS) system and how it will integrate with existing
components; Specific Requirements, which provides an enumerated list of the system’s required
behavior; and Modeling Requirements, which contains class, state, and sequence UML
diagrams that describe the structure of the ADS system. The Prototype section includes
instructions on how to use the prototype, and describes how it functions, the References section
lays out all of the references used to create this document, and the Point of Contact section
includes contact information for those interested to find out more about this document.

1.1 Purpose

The purpose of the SRS document is to lay out the specifications of the project and
assure that the developer and the customer are in agreement about the project details. In this
case, the audience is the customer at Ford Motor Company.

1.2 Scope
Assisted Direct Start is the system to be developed. It is to be an embedded automotive
system with the end goal of reducing fuel usage by turning the engine off when it is not needed.
ADS will monitor inputs from necessary car systems and use that information in order to
determine if it is able to turn the engine off, and do so if possible. If the gathered data indicates
the engine needs to be on, the ADS will activate the Ford quick start technology that will allow
the engine to be restarted with no noticeable lag time for the driver.

Template based on IEEE Std 830­1998 for SRS. Modifications (content and ordering of information)  have
been made by Betty H.C. Cheng, Michigan State University (chengb at chengb.cse.msu.edu)
1
1.3 Definitions, acronyms, and abbreviations

ADS Assisted Direct Start

MPH Miles per Hour

GPS Global Positioning System

UML Unified Modeling Language

1.4 Organization

The next section of this document, titled Overall Description, will provide an overview
of how the ADS system will be integrated with existing vehicle components and how this system
will provide new functionality. This section will also discuss assumptions regarding the target
users and will summarize all constraints and assumptions used to create the technical
requirements further in the document.
The third section, titled Requirements Specification, provides an enumerated,
hierarchical list of all of the technical requirements of the system.
The fourth section, Model Requirements, will show the connection between the
application and machine domains. It will include several diagrams, including use­case diagrams,
a high­level class diagram, and state diagrams. The Model Requirements section will also
include several scenario descriptions to accompany each state diagram.
The fifth section, Prototype, will provide information regarding the existing prototypes of
the system, including instructions on how to access and run the prototypes and sample scenarios
of system use.
The sixth section will provide a list of all sources used in preparing this document, and
the seventh section will provide a point of contact for any further information regarding the
project.

2 Overall Description

This section gives an overview of how the ADS system fits with existing hardware and
software components found in a vehicle, as well as the functionality given by the ADS system.
Expected characteristics of the system’s users are provided, as well as information about known
constraints that could affect safety or system function.  In addition, this section gives all
important assumptions that were made in the creation of this system.

2.1 Product Perspective

Template based on IEEE Std 830­1998 for SRS. Modifications (content and ordering of information)  have
been made by Betty H.C. Cheng, Michigan State University (chengb at chengb.cse.msu.edu)
2
The ADS system will use readings from the user’s vehicle such as fuel levels, battery
levels, engine temperature,  and speedometer reading. These readings are already being
gathered by the vehicle’s system according to our Ford contact. The ADS system will monitor
these readings and use them to decide if the engine should be shut off or turned on in order to
save fuel.
The ADS system is a subsystem that fits in with the other software components in a
vehicle. It acts independently by monitoring various states of the vehicle and using that
information to preserve fuel by turning the engine on and off. The ADS receives information
about the states of other systems and components in the vehicle, and this information is used to
determine the ADS system’s behavior.
There are no strict memory or interface constraints for the system. It is pulling
information that is already being monitored by the vehicle and is using that information to turn off
the engine, if all the readings verify that the engine is not currently needed. Operationally, the
engine temperature needs to be above 200 degrees Fahrenheit in order for a quick engine start
to be performed by the ADS. The driver can choose to manually disable ADS via a button on
the dashboard. There are no plans for on­site customization. Figure 1 below shows a data flow
diagram of the ADS and the surrounding systems with which it interacts.

Figure 1. Data Flow Diagram
Template based on IEEE Std 830­1998 for SRS. Modifications (content and ordering of information)  have
been made by Betty H.C. Cheng, Michigan State University (chengb at chengb.cse.msu.edu)
3
This data flow diagram shows how the ADS system fits in with the rest of the systems in
the vehicle and indicates the flow of information to and from the ADS. Arrows from another
system to the ADS system indicate a flow of information into the ADS system, and arrows from
the ADS system to another system indicate a flow of information out of the ADS system.
The fuel tank provides the ADS system with the current remaining fuel, which becomes
important information as the fuel tank gets close to empty. In one mode of operation, the ADS
system will disable user comforts such as music and air conditioning in order to maximize fuel
economy.
 The engine provides the ADS system with the engine temperature so that the ADS can
decide whether the engine is warm enough to allow the quick start feature which is the primary
function of ADS. The engine and ADS system communicate about the state of the engine (on or
off) as ADS will turn the engine on and off depending on the information it is receiving from
other systems.
The vehicle’s ignition will have a key state that is provided to the ADS. The presence of
a key in the ignition will allow the ADS to be enabled if other conditions are met, such as the
engine temperature.
The battery provides the ADS the amount of remaining energy, in percentage of full, so
that the ADS can determine whether there is enough battery to turn the engine on or off while
sustaining battery­operated comforts such as windshield wipers, air conditioning, and power
operated windows.
The driver can choose to enable or disable the ADS system by pushing a button on the
dashboard. In this way, the driver sends information to the the ADS system.
The dashboard indicator receives information about the enabled/disabled state of the
ADS system and displays the current state for the driver.
The speedometer sends the ADS system information about the vehicle’s current speed,
which the ADS uses in order to determine whether the engine can be turned off.
The seat force monitor sends the ADS information about the amount of weight currently
in the driver seat. If there is not enough weight on the driver’s seat to verify that an adult is
seated, the ADS will not turn the engine on.

2.2 Product Functions

The main goal of the ADS system will be to turn off the engine when it is not needed in
order to save fuel. This function is utilized when the vehicle is approaching a stop, as in the case
of traffic or a red light. The ADS system will then restart the engine when it is needed to
accelerate the vehicle, provide heat to the cabin, or charge the battery. Because the ADS
system may remain enabled when the engine is turned off, there is a risk that the driver will leave
the vehicle while the ADS is still running. In order to prevent dangerous situations caused by this
confusion, the ADS system will disable itself when the car is switched into park gear. There will
also be a button on the dashboard that will allow the driver to manually enable and disable the
ADS system if desired.

The goals of the system are as follows:
Template based on IEEE Std 830­1998 for SRS. Modifications (content and ordering of information)  have
been made by Betty H.C. Cheng, Michigan State University (chengb at chengb.cse.msu.edu)
4
1) Increase fuel economy by minimizing unnecessary engine idle time (primary)
2) Ensure safety for the driver and passengers of the vehicle (primary)
3) Ensure that functionality of the vehicle is not hindered by the ADS (primary)
4) Allow driver input to maximize user comfort and convenience (secondary)

A primary goal is one that is crucial to the the operation of the system­ without it, the
ADS system would be pointless or counterproductive. A secondary goal is one which is a
convenient addition to the system’s design, but which is not essential to its functionality. Figure 2
below shows a goal diagram indicating the four goals and the most important ADS functions
which are used to achieve them.

Figure 2. Goal Diagram

2.3 User Characteristics

The user of our system will be a driver who is not expected to have any skill or
expertise related to control of the ADS system. Because the ADS system is able to function
without any direct input from the user, it is possible that the driver will actually be unaware that it
exists. Because users are untrained about the ADS system’s functionality, all user input will be
made as simple as possible.

Because constant stopping and starting of the engine may become annoying to the user
during heavy traffic or parking lot scenarios,  the user will be able to disable the ADS system,
meaning that the ADS system will no longer turn off and restart the engine. The user will also be
able to enable the system to resume its functionality.

The only user interface feature that will be necessary to control the ADS itself is a single
button located in the dashboard area that will allow the user to disable or enable the ADS
system. In addition to this button, the dashboard will contain a button which switches the mode
between “fuel economy” and “driver comfort.” Additional buttons will allow a temperature to be
set for climate control, and a final button will enable or disable a “customer annoyance
avoidance” system.

Template based on IEEE Std 830­1998 for SRS. Modifications (content and ordering of information)  have
been made by Betty H.C. Cheng, Michigan State University (chengb at chengb.cse.msu.edu)
5
2.4 Constraints

The ADS system will be integrated with existing hardware and software systems present
within Ford vehicles. The following information must be given to the ADS system by existing
vehicle features for proper functionality:

1) The state of the brake pedal and gas pedal will be provided by sensors or associated
software.
2) The current gas and battery levels will be provided by sensors or associated
software.
3) The current vehicle speed will be provided by either the speedometer or a GPS
system.
4) The engine temperature will be provided by the engine or associated software.
5) The key state of the vehicle’s ignition will be provided by the vehicle ignition system.
6) The force on the driver seat will be provided by a seat force sensor.

Because this system is only activated when the vehicle is at rest or is coming to a stop, it
has very few safety­critical properties. The main danger would involve a user mistakenly leaving
the vehicle at a time when the motor is shut off but the ADS system is still active. In this case, it
is possible that another driver or even a child could start the engine. In order to avoid this
scenario, the following features will be included:

1) When the car is shifted into the ‘park’ gear, the engine will be turned on to remind
the driver that the ADS system is still active.
2) A key will be used in the ignition to make it less likely that a user would forget to shut
off the car completely.
3) a seat force sensor will ensure that the engine will not restart when an adult is not in
the driver seat.

The ADS system should also be informed of failures in the following vehicle
components. These failures should be detected by existing hardware and software.

1) brake pedal
2) gas pedal

If the brake pedal is diagnosed as failed, the ADS system will continue unaffected under
our current design. If the gas pedal is diagnosed as failed then the engine will be turned on and
the ADS system will be disabled.

2.5 Assumptions and Dependencies

It is assumed that the ADS software will be added to a fully­functioning vehicle as an
enhancement, rather than as a necessary system. For a list of vehicle components that provide
input to the ADS system, see Section 2.4 above. The only vehicle component that must direct
Template based on IEEE Std 830­1998 for SRS. Modifications (content and ordering of information)  have
been made by Betty H.C. Cheng, Michigan State University (chengb at chengb.cse.msu.edu)
6
input from the ADS system is the engine.
In addition to the previously stated vehicle components, the ADS system depends on
proprietary Ford technology that allows the motor to be started more quickly than normal. The
known properties of this technology as provided by Ford are:

1) An engine temperature of at least 200 degrees Fahrenheit is necessary to start the
engine in this way.
2) The engine can be started in less than half a second.
3) Certain conditions, such as heavy cargo loads on the vehicle, may cause a more
noticeable delay when the engine starts (exact loads are unknown.) In this event, the
user may wish to disable the ADS system, and therefore a user interface should be
present.
4) The vehicle’s battery must have sufficient charge to restart the engine­ 5% of the
battery’s total charge is required.
5) No fuel is used in order to turn off or restart the engine.

2.6 Approportioning of Requirements

Currently there are no known requirements that are outside the scope of the project.
However, a possible enhancement to the system would involve the use of the vehicle’s GPS
system to predict times when the engine should be restarted after a stop. If the system is able to
predict times when the engine must be started in this way, it could eliminate all delay associated
with starting the engine. This may give a more seamless feel to the ADS operation and a more
pleasant experience for the driver.
Predicting the start of the engine could be accomplished by using the GPS to monitor
the surrounding traffic patterns while the user’s vehicle is stopped. For example, the engine
could be restarted when the vehicle directly in front of the user’s vehicle begins to accelerate
from a stop. It is likely that the user’s vehicle will need to accelerate as well.

3 Specific Requirements

This section lays out the exact requirements and functionality that the ADS system will
deliver.

1) The proposed system will include a software package referred to as the ADS system and a
hardware user interface which allows the driver to interact with the ADS system.

2) The ADS system may be either enabled or disabled. Enabled means that the ADS system
may turn the engine on and off. Disabled means that the ADS may not turn the engine on and
off.

3) The user interface will include the following features:
3.1) Displays the current state of the ADS system (enabled/disabled)
3.2) Includes a toggle button which the driver can press. This button will affect the
Template based on IEEE Std 830­1998 for SRS. Modifications (content and ordering of information)  have
been made by Betty H.C. Cheng, Michigan State University (chengb at chengb.cse.msu.edu)
7
enabled/disabled state of the ADS system.
3.3) Includes a climate control panel which allows the driver to interact with the
climate control subsystem, including changing the target temperature.

4) When the vehicle is started (when the key is inserted into the ignition) or when the vehicle is
in the park gear:
4.1) The engine will be turned on.
4.2) The ADS system will be disabled.

5) If the key is in the ignition and the car is in the drive, reverse, or neutral gear, the ADS
becomes enabled as follows:
5.1) If the following conditions are met and the ADS is currently disabled, an event may
trigger the ADS to become
enabled:
5.1.1) The engine temperature is greater than or equal to 200 degrees.
5.1.2) The user has not disabled the ADS system via the toggle button.
5.2) The following events will trigger the ADS system to become enabled:
5.2.1) The engine temperature reaches 200 degrees (heating up. This will occur
if the engine is turned on.)
5.2.2) The driver presses the toggle button.

6) If the key is in the ignition and the car is in the drive, reverse, or neutral gear, the ADS
becomes disabled as follows:
6.1) If the ADS system is enabled, it will become disabled if at least one of the following
conditions is true:
6.1.1) The engine temperature reaches 200 degrees (cooling down. This will
occur if the engine is turned off.)
6.1.2) The driver presses the toggle button.

7) While in the park gear, the ADS system will always be disabled.

8) If (and only if) the ADS system is enabled, it will interact with the engine according to the
following rules:
8.1) If the engine is currently on, it will be turned off if all of the following conditions are
true:
8.1.1) The accelerator pedal is not being pressed.
8.1.2) The vehicle speed is less than or equal to 2.5 mph.
8.1.3) The vehicle speed is greater than 0 mph (this ensures that the engine will
be unaffected if the ADS becomes enabled during a stop.)
8.1.4) The battery level is greater than 20% (this ensures that there is enough
battery power left to turn the engine back on.)
8.2) If the engine is currently off, it will be turned on if the key is in the ignition, the seat
force monitor in the driver’s seat reads at least 75 pounds, and one of the following
conditions is true:
8.2.1) The gas pedal is pressed.
Template based on IEEE Std 830­1998 for SRS. Modifications (content and ordering of information)  have
been made by Betty H.C. Cheng, Michigan State University (chengb at chengb.cse.msu.edu)
8
8.2.2) The battery level is less than or equal to 10% (any lower and the battery
may die when the engine is turned on.)
8.2.3) The ADS system becomes disabled.

9) When the key is removed from the ignition or the fuel level equals zero:
9.1) The engine will be turned off.
9.2) The ADS system will be disabled.

10) In the simulation only, the user may choose between driver comfort mode and fuel
economy mode.

11) If the driver comfort mode is selected in the simulation (this is the standard mode):
11.1) All electronic components will remain enabled when the engine is turned off.
11.2) If the current temperature in the vehicle is not within 2 degrees of the desired
temperature, the engine will restart (the engine must be turned on for air conditioning
and heat to function.)
11.3) If the battery level is less than or equal to 10%, the engine will restart.

12) If the fuel economy mode is selected in the simulation:
12.2) The engine will never restart as a result of the temperature in the vehicle.
12.3) If the battery level is less than or equal to 10%, the engine will restart.

13) The “customer annoyance avoidance” system will behave as follows:
13.1) If the engine is turned off by the ADS more than 3 times in a 20 second period,
the ADS system will be disabled.
13.2) At the time the ADS system is disabled, a tone will sound to alert the driver.

14) The ADS system will behave as follows with other system failures:
14.1) If the gear position sensor fails, ADS will be disabled.
14.2) If the seat sensor fails, ADS will be disabled.
14.3) If the battery sensor fails, ADS will be disabled.

4 Modeling Requirements

Use Case Diagram:

Use case diagrams are used to show the primary functions of the system, referred to as
use cases, and the external actors which affect them. The large box represents the bounds of the
system, and each oval inside the box represents a use case. The stick figures outside the box
represent external actors which provide input into the system. A line between an actor and a use
case indicates that the actor plays some role in that use case, and a line between two use cases
indicates that they affect each other.
A special type of connection that is shown is the dashed line labeled <<Include>>. The
include line goes from a use case to another use case which it will always trigger. As an
Template based on IEEE Std 830­1998 for SRS. Modifications (content and ordering of information)  have
been made by Betty H.C. Cheng, Michigan State University (chengb at chengb.cse.msu.edu)
9
example, the “turn engine on” use case is always triggered when the “disable system” use case is
run. Each use case accomplishes or assists in at least one of the goals of the system. Figure 3
below shows a use case diagram for the ADS system.

As shown in section 2.2, the goals of the ADS system are as follows:

1) Increase fuel economy by minimizing unnecessary engine idle time (primary)
2) Ensure safety for the driver and passengers of the vehicle (primary)
3) Ensure that functionality of the vehicle is not hindered by the ADS (primary)
4) Allow driver input to maximize user comfort and convenience (secondary)

Figure 3. Use case diagram

Use Case: Display ADS state

Actors: Dashboard Indicator

Description: The current state of the ADS system (enabled/disabled) will be
displayed for the driver. The state of the system is changed when
the system is either enabled or disabled.

Type: Secondary

Includes: None

Template based on IEEE Std 830­1998 for SRS. Modifications (content and ordering of information)  have
been made by Betty H.C. Cheng, Michigan State University (chengb at chengb.cse.msu.edu)
10
Extends: None

Cross­references: 1, 2, 3

Use Cases: enable system, disable system

Use Case: Enable System

Actors: Driver, Engine Temperature

Description: Enabling the ADS system will make it able to turn the engine off
and on. The ADS system will always be disabled when the car is
first turned on. The system will be enabled for the first time when
the engine temperature reaches a specified value necessary for
the ADS to stop or start the engine. If the temperature is
sufficient, the driver can disable and enable the ADS system by
pressing a button.

Type: Primary

Includes: Display ADS state

Extends: None

Cross­references: 1, 2, 3, 5, 8

Use Cases: turn engine on, turn engine off

Use Case: Disable System

Actors: Driver, Engine Temperature, Fuel

Description: Disabling the ADS system will make it unable to turn the engine
off and on. Before the ADS system is disabled, the engine must
be turned on or the driver will be unable to start the engine­ this
will be handled automatically. The system will be disabled if the
driver presses a button or if the fuel runs out, and also if the
engine temperature gets too low for an engine restart.

Type: Primary

Includes: Display Engine State, Turn Engine On

Template based on IEEE Std 830­1998 for SRS. Modifications (content and ordering of information)  have
been made by Betty H.C. Cheng, Michigan State University (chengb at chengb.cse.msu.edu)
11
Extends: None

Cross­references: 1, 2, 3, 4, 6, 7, 9, 13, 14

Use Cases: none

Use Case: Turn Engine On

Actors: Driver, Seat Force Monitor, Battery

Description: When the ADS system is enabled but the engine is off, the engine
will be turned on if the driver pushes the gas pedal or when the
battery gets dangerously low and must be recharged by the
engine. This event will also be triggered when the ADS system is
disabled. For safety, turning on the engine requires that the force
of an adult driver is in the seat.

Type: Primary

Includes: None

Extends: None

Cross­references: 4, 8, 11

Use Cases: Enable System, Disable System

Use Case: Turn Engine Off

Actors: Speedometer, Battery

Description: When the ADS system is enabled and the engine is on, the engine
will be turned off if the speed of the vehicle drops below 2.5 mph
and the vehicle is decelerating­ these conditions indicate that the
vehicle is about to stop. The engine will only be shut off if there is
at least 20% battery power remaining.

Type: Primary

Includes: None

Extends: None

Cross­references: 8, 9

Template based on IEEE Std 830­1998 for SRS. Modifications (content and ordering of information)  have
been made by Betty H.C. Cheng, Michigan State University (chengb at chengb.cse.msu.edu)
12
Use Cases: Enable System

Class Diagram:

A class diagram shows all classes within a system and the connections between them.
Each box represents a class, and the lines between classes indicate connections such that data
can be shared. An arrow head on a connection indicates that the class sending the arrow is
derived from the class which receives the arrow. The derived class has all the functionality of the
parent class, but also includes unique functionality. A diamond head on a connection indicates
composition, meaning that the class which receives the diamond is composed of the classes
which send the diamond. Each box also lists every attribute and every operation of the class.
Figure 4 below shows the class diagram for the ADS system.

Figure 4. Class diagram

Classes:
Element Description
Name
Pedal A foot pedal in the driver’s
seat
Attributes
isPressed : boolean value indicating if the pedal is pressed
Operations
getIsPressed() : boolean returns the value of isPressed

Template based on IEEE Std 830­1998 for SRS. Modifications (content and ordering of information)  have
been made by Betty H.C. Cheng, Michigan State University (chengb at chengb.cse.msu.edu)
13
Relationships Parent class to both Gas
Pedal and Brake Pedal

Element Description
Name
Brake Pedal The driver’s brake pedal
Attributes

Operations
Decelerate() : Reduces the speed of the car
Relationships Inherits from Pedal

Element Description
Name
Gas Pedal The driver’s gas pedal
Attributes

Operations
Accelerate() : Increases the speed of the car
Relationships Inherits from Pedal,
Association with ADS

Element Description
Name
Gas Tank The car’s gas tank.
Attributes
gasLevel : Integer The gas level in gallons
Operations
getGasLevel() : Integer Returns the value of gasLevel
Relationships Inherits from Pedal,
Association with ADS

Element Description
Name
Dashboard Container Class
Attributes

Operations

Template based on IEEE Std 830­1998 for SRS. Modifications (content and ordering of information)  have
been made by Betty H.C. Cheng, Michigan State University (chengb at chengb.cse.msu.edu)
14
Relationships Contains Dashboard
Indicators and Dashboard
Controls

Element Description
Name
Dashboard An Indicator light on the
Indicator dashboard
Attributes
isEnabled : Boolean Value indicating whether or not this
indicator is turned on
Operations
setIsEnabled() : Sets the value of isEnabled to parameter
enabled
Relationships Contained by Dashboard,
Association with ADS

Element Description
Name
Dashboard A control on the dashboard
Control
Attributes
isPressed : Boolean Value indicating whether or not this
control is pressed
Operations
Press() : Take action based on pressing this control
getIsPressed() : Boolean Returns the value of isPressed
Relationships Contained by Dashboard,
Association with ADS

Element Description
Name
Ignition The car’s ignition, where the
key is inserted or removed
Attributes
keyIsIn : Boolean Value indicating whether or not the key is
currently in the ignition.
Operations

Template based on IEEE Std 830­1998 for SRS. Modifications (content and ordering of information)  have
been made by Betty H.C. Cheng, Michigan State University (chengb at chengb.cse.msu.edu)
15
keyIn() : Called when the key is inserted into the
ignition. Turns on the engine.
keyOut() : Called when the key is removed from the
ignition. Turns off the engine and disables
ADS.
getKeyIsIn() : Boolean Returns the value of keyIsIn.
Relationships Association with ADS

Element Description
Name
Engine The car’s engine
Attributes
turnedOn : Boolean Value indicating if the engine is on.
temperatureFahrenheit : Temperature of the coolant in degrees
Integer Fahrenheit
Operations
getTurnedOn() : Boolean Returns the value of turnedOn.
getTemperatureFahrenheit() : Returns the value of
Integer temperatureFahrenheit.
setTurnedOn() : Sets the value of turnedOn to parameter
state.
Relationships Association with ADS

Element Description
Name
Gear Shift The engine’s gear shift
Attributes
currentGear :  Integer The gear the engine is currently set to :
“park”, “drive”, or “reverse.”
Operations
getCurrentGear() : Integer Returns the value of currentGear.
changeGear() : sets the value of currentGear to parameter
gear.
Relationships Association with ADS,
Association with engine.

Element Description
Name
Speedometer Measures the vehicle’s speed

Template based on IEEE Std 830­1998 for SRS. Modifications (content and ordering of information)  have
been made by Betty H.C. Cheng, Michigan State University (chengb at chengb.cse.msu.edu)
16
Attributes
milesPerHour : double The current speed of the vehicle in
miles per hour.
Operations
getMilesPerHour(): double Returns the value of milesPerHour.

Relationships Association with ADS.

Element Description
Name
GPS System The GPS system of the car
Attributes
longitute : Integer The longitude observed by the GPS
system
latitude : Integer the latitude observed by the GPS system
Operations
getLongitude() : Integer Returns the value of longitude
getLatitude() : Integer Returns the value of latitude
Relationships Association with ADS.

Element Description
Name
Battery The car’s battery
Attributes
percentCharged : Double Percentage of maximum charge currently
held by the battery in the range [0.0,
100.0] as a floating point number.
Operations
gePercentCharged() : Double Returns the value of getPercentCharged
Relationships Association with ADS.

Attributes: forcePounds: tOperations: getForcePounds: return the value of forcePounds

Element Description
Name
Seat Force The force monitor in each
Monitor seat.

Attributes
Template based on IEEE Std 830­1998 for SRS. Modifications (content and ordering of information)  have
been made by Betty H.C. Cheng, Michigan State University (chengb at chengb.cse.msu.edu)
17
forcePounds : double The force currently read by this seat force
monitor in pounds.
Operations
getForcePounds(): double Returns the value of forcePounds

Relationships Association with ADS.

Element Description
Name
Climate The car’s climate control
Control system.
Attributes
cabinTemperatureFahrenheit : The cabin temperature in Fahrenheit.
double
desiredCabinTemperatureFah The desired cabin temperature in
renheit : double Fahrenheit.
Operations
getCabinTemperatureFahrenh Returns the value of
eit() : double cabinTemperatureFahrenheit.
getDesiredCabinTemperature Returns the value of
Fahrenheit() : double desiredCabinTemperatureFahrenheit.
Relationships Association with ADS.

Element Description
Name
ADS The ADS system
Attributes
enabled : Boolean Value indicating if the ADS system is
currently enabled.
Operations
performReadings() : Reads the values of the other subsystems
(battery level, seat force, speed, etc.) and
enables/disables the ADS system based
on their values, based on the requirements
of the system.
TurnEngineOnOrOff() : Calls setTurnedOn in the engine class and
sets the engine on or off based on the
current values of the variables.

SetEnabled() : Sets the enabled state of the ADS to the
parameter state.
Template based on IEEE Std 830­1998 for SRS. Modifications (content and ordering of information)  have
been made by Betty H.C. Cheng, Michigan State University (chengb at chengb.cse.msu.edu)
18
Relationships Association with Climate
Control, Battery,
Speedometer, GPS System,
Gear Shift, Engine, Ignition,
Dashboard, Gas Tank, Gas
Pedal, Brake Pedal, Seat
Force Monitor.

System State Diagrams:

State diagrams show the transitions between states of the system. An example of a state
might be “engine on” or “engine off.” The black circle indicates the transition to the system’s
initial state. From there, there are arrows directing the transition to new states. The text above
the arrow indicates the condition that triggers the transition to the new state. Figure 5 below
shows an overall state diagram for the ADS system.

Figure 5. Overall state diagram

This diagram shows the state of the system in terms of the two key variables: the on/off
state of the engine and the enabled/disabled state of the ADS system. The system reaches its
initial state when the driver puts the key in the ignition­ this action turns the engine on, but does
not enable the ADS system. This is because the ADS system requires an engine temperature of
200 degrees Fahrenheit to trigger a quick stop or start of the engine.
When the engine temperature reaches 200 degrees Fahrenheit, the ADS system will be
enabled for the first time. From this state, the engine will be automatically turned off by the ADS
system if the speed of the vehicle drops below 2.5 mph while the vehicle is not accelerating. The
engine will only be turned off if there is sufficient battery power remaining to turn the motor back
on, and the motor will not turn off if the vehicle was already at a stop at the time the ADS
system was enabled.
Template based on IEEE Std 830­1998 for SRS. Modifications (content and ordering of information)  have
been made by Betty H.C. Cheng, Michigan State University (chengb at chengb.cse.msu.edu)
19
If the engine is off, it will be turned on if the driver presses the gas pedal or if the battery
power falls below 15%. If the engine temperature falls below 200 degrees while the engine is
turned off, the engine will be turned back on and the ADS system will be disabled so that the
engine will not turn off immediately. This allows the engine to warm up again.
When the ADS system is running, the driver can press a button located on the
dashboard to disable the ADS system (and turn the motor back on if it is currently off.) Pressing
the button again will enable the system once more.
If at any time the key is removed from the ignition or the gas level reaches zero gallons,
the engine will turn off and the ADS system will be disabled. The vehicle is completely shut off
at this point. Additionally if a signal is received indicating failure of the gear shift, battery, or seat
sensor subsystems, the ADS system will be disabled.
Figure 6 below shows a state diagram for the engine alone, and Figure 7 shows a state
diagram for the ADS alone.

Figure 6. Engine state diagram

This state diagram shows the transition between engine states. When the vehicle is
moving at a speed less than or equal to 2.5 miles per hour, if the battery is greater than or equal
to 20% charged, the engine will be turned off. The engine will also be turned off if the key is
removed from the ignition.
If the key is in the ignition, the engine will be turned back on if the gas pedal is engaged
or if the battery’s charge is less than 15%. The engine will also be turned on if the cabin
temperature is outside of the acceptable temperature range, which is defined as two degrees
Fahrenheit if customer comfort mode is enabled, or five degrees Fahrenheit if customer comfort
mode is disabled. If the key has been removed from the ignition, the engine can be turned back
on by reinserting the key into the ignition, as long as the seat force monitor in the driver’s seat is
currently reading more than 75 pounds.

Template based on IEEE Std 830­1998 for SRS. Modifications (content and ordering of information)  have
been made by Betty H.C. Cheng, Michigan State University (chengb at chengb.cse.msu.edu)
20
Figure 7. ADS state diagram

This state diagram shows the transition between the ADS system being enabled and
disabled. If the engine temperature is greater than or equal to 200 degrees, the seat force
monitor in the driver’s seat is reading at least 75 pounds, and the battery is more than 20%
charged, the ADS system will be enabled. If any of these conditions is false, the vehicle runs out
of fuel, or the key is removed from the ignition, the ADS system will be disabled. Additionally if
a signal is received indicating failure of the gear shift, battery, or seat sensor subsystems, the
ADS system will be disabled.

Sequence Diagrams:

Sequence diagrams are used to show interactions between objects in specific scenarios,
as well as the flow of program control in those scenarios. The stick figures, called “actors”
indicate a component of the system (ADS, engine, gas tank, etc.). Please note that there is one
actor labeled “Actor” which is the class that calls the function being focused on. The details of
who is calling these methods are not important in these diagrams; the focus is on the flow of
control for specific scenarios.
 There are two kinds of arrows.The solid black arrow indicates control transfer,
typically a function call. The dotted arrows indicate returning control. The label on the black
arrows is the name of the function being called, and the label on the dotted arrows indicates the
return value. An arrow pointing to its own actor means that the actor is performing some action
on itself, such as calling a function or updating a value.
Finally, there are boxes labeled as “alt.” These indicate an if­else relationship ­ that is, if
the condition in the square brackets is true, the calls and returns in that box would be executed.
If the condition is false, that portion of calls and returns would not be executed.
In order to explain the behavior of the system, several sequences of events are shown.
The first sequence shows the events called during the performReadings function in the ADS
class, and the second sequence shows the events called during the turnEngineOnOrOff function
in the ADS class.

Sequence 1

performReadings ­ This function will be called every 0.025 seconds to determine if the
ADS needs to be disabled/enabled. It gets the engine’s temperature (in degrees Fahrenheit), the
Template based on IEEE Std 830­1998 for SRS. Modifications (content and ordering of information)  have
been made by Betty H.C. Cheng, Michigan State University (chengb at chengb.cse.msu.edu)
21
gas tank level in gallons, and the battery’s charge percentage.
If the temperature is greater than 200 degrees Fahrenheit, the seat force sensor detects
a weight greater than or equal to 75 pounds, and the battery is greater than or equal to 20%
charged, ADS is enabled. If the temperature falls below 200 degrees Fahrenheit, the gas level
falls to 0, or the battery’s charge is less than or equal to 15%, ADS will be disabled . If ADS is
disabled, an indicator on the dashboard will be turned on to let the user know the ADS
functionality is not currently available. If ADS is enabled, the indicator will be turned off. This
sequence is shown in Figure 8 below.

Figure 8. Sequence 1: performReadings

Sequence 2

turnEngineOnOrOff ­ This function will be called every 0.025 seconds, if the ADS
system is enabled, to determine whether the engine should be turned on or off.  It will retrieve
the speed (in miles per hour) read by the speedometer, the battery’s charge percentage, the
weight (in pounds) from the seat force monitor in the driver’s seat, and detect whether or not
the gas pedal is engaged.
If the climate control system detects that the current cabin temperature is 5 degrees
Fahrenheit higher or lower than the desired temperature (or 2 degrees higher/lower if custom
comfort mode is enabled) the engine will be turned on, regardless of any other conditions.
Otherwise, If the gear shift is in park, the engine will be turned off regardless of any other
conditions (excluding the aforementioned climate control), because the vehicle cannot move.
Template based on IEEE Std 830­1998 for SRS. Modifications (content and ordering of information)  have
been made by Betty H.C. Cheng, Michigan State University (chengb at chengb.cse.msu.edu)
22
If the temperature is within the desired range, and the vehicle is not in park, then if the
gas pedal is engaged and the key is in the ignition, the engine will be turned on, as this indicates
that the driver is attempting to accelerate. Otherwise, the system will check the car’s current
speed, battery, and the force in the seat. If the vehicle is moving at a speed less than or equal to
2.5 miles per hour, and the battery has charge greater than or equal to 20%, the engine will be
turned off.
If the gas pedal is pressed, or the charge of the battery is less than or equal to 15%, and
the seat force monitor detects a weight greater than or equal to 75 pounds in the driver’s seat,
and the gear shift is not in park (indicated by the value 0 for currentGear),  the engine will be
turned on. This sequence is shown in Figure 9 below.

Figure 9. Sequence 2: turnEngineOnOrOff

Template based on IEEE Std 830­1998 for SRS. Modifications (content and ordering of information)  have
been made by Betty H.C. Cheng, Michigan State University (chengb at chengb.cse.msu.edu)
23
5 Prototype
Figure 10 below shows the layout of the prototype, version 1. The prototype was made
using Adobe Flash. It includes a two­dimensional driving simulation with buttons that allow user
interaction. The user is able to push the gas pedal to accelerate and the brake pedal to
decelerate, as well as enable or disable headlights and windshield wipers. An ADS user
interface panel allows enabling and disabling of the ADS system, and a climate control panel
allows a desired temperature to be set. Animated trees on the screen give visual feedback about
the current speed of the car, and a large panel on the right side of the screen displays the current
status and values of these variables:

1) fuel remaining in gallons

2) battery remaining as a percentage of maximum charge

3) velocity in miles per hour

4) engine temperature in degrees Fahrenheit

5) the status of the climate control subsystem­ active or inactive

5) the status of the engine­ on or off

6) the status of the ADS system­ on (enabled) or off (disabled)

Figure 10. Simulation Layout

Template based on IEEE Std 830­1998 for SRS. Modifications (content and ordering of information)  have
been made by Betty H.C. Cheng, Michigan State University (chengb at chengb.cse.msu.edu)
24
The prototype displays all aspects of the ADS system’s functionality. All requirements
specified in Section 3 above are carried out by the prototype so that they can be tested. The
colored boxes on the right are buttons that represent different settings and scenarios in order to
display the system’s performance. The bottom panel lists events and responses as they occur
and provides instructions.

The prototype is a Shockwave Flash video file, or an SWF. In order to run the
prototype, it is necessary to have Adobe Shockwave Player installed on your computer (any
version should work.)  Prototype version 1 can be found at the following URL:

http://www.cse.msu.edu/~cse435/Projects/F2013/Groups/ADS/web/prototype.html

5.1 How to Run Prototype

1. Move the mouse to insert the key into the ignition as indicated­ the engine will start.

2. The panel on the right­hand side displays variables associated with the vehicle, as well as the
state of the ADS system.

3. Press the gas and brake pedals to change the vehicle's speed (note: there is currently no
animation to show that the car is moving, although the velocity is displayed.)

4. The ADS system will be enabled when the engine temperature reaches 200 degrees F

5. The ADS system will turn the engine off when the vehicle speed gets under 2.5 mph

6. Explore the functionality of the simulation and have fun! Many more features will be added,
including more buttons/levers inside the car.

7. Hit refresh on your browser window to restart the simulation.

5.2 Sample Scenarios

In order to demonstrate the behavior of the system, several sample scenarios will be
described with screenshots and descriptions of how the prototype responds. The first scenario
will demonstrate the typical functionality of the ADS system during normal conditions.

Template based on IEEE Std 830­1998 for SRS. Modifications (content and ordering of information)  have
been made by Betty H.C. Cheng, Michigan State University (chengb at chengb.cse.msu.edu)
25
scenario 1­ standard operation

When the prototype is run, the car will begin with the engine turned off and the ADS
disabled. At this point, the temperature of the engine is stable at 60 degrees Fahrenheit­ the
temperature outside the vehicle. The gas starts at 10 gallons, and the battery is fully charged at
100 %. A key appears over the user’s mouse, and a flashing red light comes from the ignition
located on the side of the steering wheel. The flashing light indicates that the key should be
moved to this spot on the screen, as shown in Figure 11 below.

Figure 11. Starting the prototype

When the key is dragged over the ignition, the car will start­ this means that the engine
will switch to “on.” Immediately the engine temperature will begin to rise­ the engine
temperature will rise continuously while the engine is “on” until a temperature of 250 degrees is
reached. Turning the engine on also took a portion of the battery power­ 5% is removed, but
the battery will automatically recharge when the engine is turned on. Because the engine
temperature is not above the required 200 degrees yet, the ADS system remains off, as shown
in Figure 12.

Template based on IEEE Std 830­1998 for SRS. Modifications (content and ordering of information)  have
been made by Betty H.C. Cheng, Michigan State University (chengb at chengb.cse.msu.edu)
26
Figure 12. Immediately after the engine is started

For this scenario, we will first wait for the engine to warm up sufficiently. The fuel will
steadily decrease over time when the engine is turned on. When the engine temperature reaches
200 degrees, the ADS remains off because the vehicle is in Park gear. Holding space applies
the brake, and we are able to drag the gear shift lever into Drive. The ADS system turns on, as
shown below.

Figure 13. The ADS system is turned on

Template based on IEEE Std 830­1998 for SRS. Modifications (content and ordering of information)  have
been made by Betty H.C. Cheng, Michigan State University (chengb at chengb.cse.msu.edu)
27
If we now press the accelerator pedal inside the vehicle, the car’s velocity will increase­
the trees will begin to move past the vehicle. The fuel also drains faster during the acceleration.
We accelerate up to 10 mph and then release the accelerator pedal. The current state is shown
in Figure 14.

Figure 14. The car is accelerated up to 10 mph

The car’s velocity will naturally decrease when the accelerator pedal is not pressed.
When the velocity reaches 2.5 mph, the ADS system will cause the engine to turn off, as shown
in Figure 15. Turning off the engine requires 5% of the vehicle’s battery.

Figure 15. The car decelerates below 2.5 mph and the ADS system turns off the engine

Template based on IEEE Std 830­1998 for SRS. Modifications (content and ordering of information)  have
been made by Betty H.C. Cheng, Michigan State University (chengb at chengb.cse.msu.edu)
28
scenario 2­ climate control subsystem and driver comfort mode

The climate control box is located on the right hand side of the steering wheel. It has
buttons which allow the desired temperature to be set. By default, the simulation will prevent the
ADS system from turning the engine off while the climate control subsystem is attempting to heat
or cool the car’s interior (the engine must be on for the air conditioning to function.) This
functionality is meant to ensure that the driver remains comfortable. It is possible to switch
between this driver comfort mode and a fuel economy mode which ignores the interior
temperature in favor of more gas savings. Figure 16 shows the driver comfort mode preventing
the engine from turning off because the target interior temperature has not been matched.

Figure 16. The engine cannot be turned off because of the vehicle’s interior temperature

scenario 3­ running out of gas

One of the scenario boxes allows you to set the gas to just half a gallon. The vehicle
quickly runs out of fuel­ the engine turns off and the ADS system becomes disabled. This event
is shown in Figure 17 below.

Template based on IEEE Std 830­1998 for SRS. Modifications (content and ordering of information)  have
been made by Betty H.C. Cheng, Michigan State University (chengb at chengb.cse.msu.edu)
29
Figure 17. The vehicle runs out of fuel

scenario 4­ low battery

Another scenario box allows you to set the battery level to just 10%. If the battery is
below 20%, the ADS system will not turn off the engine. This is shown in Figure 18 below. The
battery will also drain faster if the headlights and windshield wipers are turned on.

Figure 18. Battery too low to turn off the engine

Template based on IEEE Std 830­1998 for SRS. Modifications (content and ordering of information)  have
been made by Betty H.C. Cheng, Michigan State University (chengb at chengb.cse.msu.edu)
30
scenario 5­ brake sensor failure

Another scenario box causes the brake sensor to fail. In the event that the status of the
break pedal is unknown, the ADS system will become disabled and cannot be reenabled. This
is shown in Figure 19 below.

Figure 19. Brake sensor failure prevents the ADS system from being enabled

6 References

ADS team website:
http://www.cse.msu.edu/~cse435/Projects/F2013/Groups/ADS/web/index.html

Assisted Direct Start Project description:
http://www.cse.msu.edu/~cse435/Projects/F2013/Groups/ADS/web/cse435/ads_2013.pdf

7 Point of Contact
For further information regarding this document and project, please contact Prof. Betty H.C.
Cheng at Michigan State University (chengb at cse.msu.edu). All materials in this document
have been sanitized for proprietary data. The students and the instructor gratefully acknowledge
the participation of our industrial collaborators.

Template based on IEEE Std 830­1998 for SRS. Modifications (content and ordering of information)  have
been made by Betty H.C. Cheng, Michigan State University (chengb at chengb.cse.msu.edu)
31

You might also like