CPSC 875

31
CPSC 875 John D. McGregor C10 – Error architecture

description

CPSC 875. John D. McGregor C10 – Error Design. Integrated model . Find the integrated model at: http:// www.aadl.info/aadl/currentsite/examplemodel.html We will create an outline. Error design. Exception handling. Always clean up after yourself Never use exceptions for flow control - PowerPoint PPT Presentation

Transcript of CPSC 875

Page 1: CPSC 875

CPSC 875

John D. McGregorC10 – Error architecture

Page 2: CPSC 875

• http://www.mdpi.com/14248220/14/1/1629/htm

Page 3: CPSC 875

Smart Home architecture

Page 4: CPSC 875

Communication diagram for context interaction in the Smart Kitchen.

Page 5: CPSC 875

E-servant architecture

Page 6: CPSC 875

Context manager

Page 7: CPSC 875

Use case

Page 8: CPSC 875

To illustrate the interaction of the various blocks of the architecture, consider the use case drawn in Figure 7, in the event of smoke detection. The ZigBee smoke sensor (1) warns to the CM (2) that there is smoke in the kitchen. LU (3) is notified and decides to launch a user-scenario to warn to the user. UIC (4) commands the interfaces (5) in order to warn the user about the situation. After a timeout, the interfaces (6) notify to the UIC (7) that the user does not interact with them and the LU (3) decides to turn off the PLC hob and the oven (10) through the CM (9).

Page 9: CPSC 875
Page 10: CPSC 875

Architecture and process

Page 11: CPSC 875

Architecture and process - 2

Page 12: CPSC 875

Architecture and process - 3

Page 13: CPSC 875

Architecture and process - 4

ADDTSP (Team software process)Using an agile processQualities determined up frontArchitecture developedjust in time

Page 14: CPSC 875

Error propagation

Execution of a fault results in an error

The error value may be returned as a resultOR it might be passed as a parameter to a subcomponent

Page 15: CPSC 875
Page 16: CPSC 875

Nominal

Error

Page 17: CPSC 875

Nominal

Error

Page 18: CPSC 875

Nominal behaviorannex behavior_annex {**states

off:initial state;on:state;on_not_engaged: state;on_engaged: state;on_engaged_steady: state;on_engaged_slowing: state;on_engaged_accelerating: state;

transitionsoff->[]->on;on-[]->off;on-[]->on_not_engaged;on_not_engaged-[]->on_engaged;on_engaged-[]->on_not_engaged;on_not_engaged-[]->on;on_engaged-[]->on_engaged_steady;on_engaged_steady-[]->on_engaged_slowing;on_engaged_steady-[]->on_engaged_accelerating;on_engaged_accelerating-[]->on_engaged_steady;on_engaged_slowing-[]->on_engaged_steady;

**};

Page 19: CPSC 875

Component Error behaviorannex EMV2 {**use types error_library; use behavior error_library::stateMachine;error propagations

logger_out: out propagation {BadValue, LateValue};sensor_data_in : in propagation {NoValue, BadValue};sensor_data_out : out propagation {NoValue, BadValue,LateValue};

flowsef0 : error source logger_out{BadValue, LateValue};ef1 : error source sensor_data_out{LateValue};ef2 : error path sensor_data_in{NoValue, BadValue}->sensor_data_out{LateValue};

end propagations;component error behaviorevents

BadRead : error event;RecoverEvent: recover event;

transitionst0 : Operational -[sensor_data_in{NoValue, BadValue}]-> Failed;t1 : Operational -[BadRead]-> Failed;t2 : Failed -[RecoverEvent]-> Operational;

end component;**};

Page 20: CPSC 875

Composite error annex EMV2 {**use types error_library; use behavior error_library::stateMachine;

composite error behaviorstates[radar_handler.Failed and camera_handler.Failed and gps_handler.Failed and speedometer_handler.Failed]-> Failed;[radar_handler.Failed and camera_handler.Failed]-> Failed;[radar_handler.Failed or camera_handler.Failed]-> Operational;[radar_handler.Operational and camera_handler.Operational and gps_handler.Operational and speedometer_handler.Operational]-> Operational;end composite;**};

Page 21: CPSC 875

• Error vs uncertainty– Uncertainty in every measurement– Represent 1/3 – Eyeball a ruler

Page 22: CPSC 875

Mitigation

• For hardware, redundancy is the primary mitigation for faults

• Want more reliability add copies• For software, functional redundancy is

workable but the implementations must be developed independently and this sharply increases cost

Page 23: CPSC 875

Refinement hierarchy

Page 24: CPSC 875

Active mode

Page 25: CPSC 875

Degraded mode

Page 26: CPSC 875
Page 27: CPSC 875
Page 28: CPSC 875
Page 29: CPSC 875

Here’s what you are going to do:

• Identify a system to model• Identify system modes and model them in the

AADL model. • Use the “applies to” to simplify the dynamic

structure.• Include error and nominal behavior.

Page 30: CPSC 875

• Go to the NEST website• https://

developer.nest.com/documentation/cloud/get-started

• Model the NEST Cloud API, the NEST Learning Thermostat, and the pieces that handle their interaction