Tool Usage
Detailed guide on how to use Enterprise Architect for statemachine modeling: Statemachine modeling
Modeling Exercises
Refine the behavior of the ACC Function with Statemachine Diagrams.
-
Download the initial model of the ACC with the system context, interfaces, and use cases here.
-
Model the behavior of the ACC Function:
- Create a Statemachine Diagram under the ACC Function block.
- At first the ACC Function is in the Off state. The user can turn on the ACC Function, then the statemachine transitions to the On state. In the On state the ACC Function performes the following functions concurrently1:
- Controls the Engine based on the set speed limit and the measured actual speed (KeepSpeed). The ACC Function can either be in the MaintainSpeed, Accelerate or Decelerate state, after turns on the ACC Function it is maintaning the current speed.
- The user can set the speed limit (SetSpeedLimit).
-
The transitions are defined in the following table2:
Source state Trigger3 Guard4 Effect Target state Off The user sends a signal through the HMI. The message contains the On command. On On The user sends a signal through the HMI. The message contains the Off command. Off SetSpeedLimit The user sends a signal through the HMI. The message contains the Set command. The speed limit is changed to the value set by the user. SetSpeedLimit MaintainSpeed The measured speed is registered through the SpeedPort. The measured speed equals the set speed limit. The ACC sends MaintainSpeed signal to the Engine MaintainSpeed MaintainSpeed The measured speed is registered through the SpeedPort. The measured speed is less then set speed limit. The ACC sends Accelarate signal to the Engine Accelerate MaintainSpeed The measured speed is registered through the SpeedPort. The measured speed is more then set speed limit. The ACC sends Decelerate signal to the Engine Decelerate Accelerate The measured speed is registered through the SpeedPort. The measured speed equals the set speed limit. The ACC sends MaintainSpeed signal to the Engine MaintainSpeed Accelerate The measured speed is registered through the SpeedPort. The measured speed is less then set speed limit. The ACC sends Accelarate signal to the Engine Accelerate Accelerate The measured speed is registered through the SpeedPort. The measured speed is more then set speed limit. The ACC sends Decelerate signal to the Engine Decelerate Decelerate The measured speed is registered through the SpeedPort. The measured speed equals the set speed limit. The ACC sends MaintainSpeed signal to the Engine MaintainSpeed Decelerate The measured speed is registered through the SpeedPort. The measured speed is less then set speed limit. The ACC sends Accelarate signal to the Engine Accelerate Decelerate The measured speed is registered through the SpeedPort. The measured speed is more then set speed limit. The ACC sends Decelerate signal to the Engine Decelerate -
Set the necessary references in the model:
- Set the newly defined statemachine as the behavior of the ACC Function.
- Set the ports of the triggers5.
- Set the appropriate signal as the effects of the transitions where applicable, use clear, easy to follow expressions elsewhere.
-
Which modeling construct can be used to model paralell behavior? ↩
-
Is region defining the engine control (KeepState) complete? ↩
-
You cannot reference ports and signals as triggers, thus use clear, easy to follow trigger names! ↩
-
The transition guard are simple string expression, thus use clear, easy to follow guard expressions! ↩
-
The current version of the EA does not display the port of the trigger. ↩