Week 7 - Systems Engineering and Analysis Buede Chapter 12 – Graphical Modeling Techniques Left – Systems engineers us a lot of graphical models which look like state diagrams. If you have to predict how the pieces of a large system will interact, you need help visualizing that. This one is a “generative model for how to create generative models.” 1 Wasson also talks about modeling • Mostly scattered by topic – what you are modeling. • E.g., Sec 15.2 – System behavioral response model • Ch 17 – Use Cases & UML • Ch 20 – Modeling system and support operations • Ch 51 – System modeling and simulation 2 Data, Process, and Behavior Models • Data Models – relationships among input and outputs. • Process Models – define functional decomposition of the system function and flow of inputs and outputs for those functions. • Behavior Models – define the control, activation, and termination of of system functions needed to meet performance requirements. 3 Modeling Approaches & Methods Table 12.1 • Data Modeling • Process Modeling • Behavior Modeling • Object-oriented Modeling – Entity-relationship diagrams (ERDs) – Higraphs – Data flow diagrams (DFDs) – IDEF0 – N2 charts – – – – – – Function flow block diagrams (FFBDs) Behavior diagrams (BDs) State-transition diagrams (STDs) Statecharts Control flow diagrams (CFDs) Petri nets (PNs) – Object modeling technique (OMT) – Real-time object-oriented modeling (ROOM) 4 Data Flow Diagram Semantics Process Customer Banking Transactions Process Customer Banking Transactions Process Customer Banking Transactions These are three equally valid representations of a process. Note a process begins with a verb, just as functions or activities do in IDEF0. Customer Notice: Main Menu Selection Double-headed This is an example of a “data arcs signify dialog flow”. Note, it is a noun between functions phrase and attached to an arc. Figure 12.6 5 Context (External Systems) Diagram in DFD System Status Report BANK SERVICE PERSONNEL CUSTOMERS Completed Transaction Prodcuts Customer Notices (CN) Customer Inputs Employee ID Info PROVIDE AUTOMATED TELLER MACHINE SERVICES FOR CUSTOMERS Bank's Acct. Info Bank Supplies Completed Trans. Info. Account Transaction Data BANK COMPUTER Figure 12.9 6 N2 Charts – an SE favorite! Request for Elevator Service & Entry Support Request for Emergency Support Request for Floor & Exit Support 1.0 Modified Elevator Configuration & Expected Ussage Patterns Electric Power & Emergency Communication Response Government Regulations Passenger Characteristics Structural Support, Alarm Signals & Building Environment ·Digitized Passenger Requests Government Regulations Service, Tests & Repairs ·Sensed Malfunctions Accept Passenger Requests & Provide Feedback 2.0 ·Assignments for Elevator Cars Acknowledgment that Request Was Received & Status Information Emergency Support ·Sensed Malfunctions Control Elevator Cars ·Elevator Position & Direction ·Elevator Position & Direction 3.0 ·Sensed Malfunctions Move Passengers Between Floors ·Temporary Modification to Elevator Configuration 4.0 Elevator Entry Opportunity Elevator Exit Opportunity Passenger Environment Diagnostic & Status Messages Enable Effective Maintenance & Servicing Figure 12.10 7 Function Flow Block Diagrams • Basic – – – – 1 Ref. 2 Perform Integration Activities Perform Design Activities Series Concurrent Selection Multiple-exit function Series • Enhanced – Iteration – Looping – Replication Ref. Concurrent 1.1 Perform System Level Design Activities 1.2 Ref. AND Perform Subsystem Level Design ... 2 AND Perform Integration Activities 1.3 Perform Component Level Design ... Figure 12.11-12 8 Selection & Multiple-exit Functions, Iteration, Looping in FFBD for each subsystem if deficiency is fixed or redesigned 1 Perform Desig n Activities 2.3.1 IT LP cleared subsystem 2.3.6 Inspect & Test Subsystem OR deficient subsystem 2.3.2 Identify & Fix Correctable Deficiencies correctable def. 2.3.3 Assess Impact of Uncorrectable... 2.1 Perform Component Integration IT Modify Baseline acceptable impact OR 2.3.4 unacceptable impact Figure 12.13 Integrate with Next Subsystem 2.3.5 OR uncorrectable def LP Redesign Subsystem 9 FFBD for Elevator 1.0 Accept Passenger Requests & P... 2.0 Control Elevator Cars Ref. AND AND Ref. 3.0 Move Passengers Between Floors 4.0 Enable Effective Maintenance & Servicing 10 Elevator Functional Architecture USED AT: George Mason Univ. DATE: 09/29/1999 REV: AUTHOR: Dennis Buede PROJECT: Elevator Case Study x NOTES: 1 2 3 4 5 6 7 8 9 10 Up Service Request, Floor Request, Request to Extend Entry support Up Service Request, Floor Request Comm. about Emergency, Passenger Weight Characteristics, Sensed Passenger Heat Loss/Gain WORKING DRAFT RECOMMENDED PUBLICATION Fire Alarm Signal Signal for Partial Maint. Mode, Signal for Full Op'g Mode Request to Extend Entry support ACCEPT PASSENGER REQUESTS & PROVIDE FEEDBACK DATE Fire Alarm A1 CONTROL ELEVATOR CARS Operating Mode A2 Electric Power MOVE PASSENGERS BETWEEN FLOORS Relayed Info about Emergency, Electric Power, Sensed Building Heat Elevator Position & Direction Entry/Exit Opp'y Ending Signal; Capacity Exceeded Signal Maint. Action, Diagnosis Signals, Repairs, Test Signals NODE: A0 Sensed Malfunctions, Diagnosis & Test Responses Feedback: Service Request Recieved, Floor Request Received, Car On Way, Door Opening, Door Closing, Floor Where Stopped, About Emergency; Fire Alarm; Entry/Exit Opp'y Ending Signal; Capacity Exceeded Signal Elevator Entry/Exit Opportunity, Information about Emergency, Elevator Heat Loss/Gain Emergency Comm'n A3 Electric Power CONT EXT : A-0 Feedback: Service Request Recieved, Floor Request Received, Car On Way, Door Opening, Door Closing, Floor Where Stopped, About Emergency; Temporary Modificatin to Elevator Configuration Assignments for Elevator Cars Digitized Passenger Requests READER ENABLE EFFECTIVE MAINTENANCE & SERVICING A4 Malfunction Signal Diagnosis Response, Test Response Diagnosis Signals, Maint. Action, Repairs, Test Signals TITLE: PROVIDE ELEVATOR SERVICES NUMBER: P. 3 11 Behavior Diagrams Update Position Updated Track No Track Update Dropped Track Detections Depleted Update Display Updated Display Current Track @ Update Position Track Update Update Display Detection Data Update Position Updated Track Updated Display Current Track Detection Data Current Track Detection Data Looping Selection Sequence Remaining Detections G @ + Updated Track L All tracks Iteration @* Replication Concurrency All detections @* Current Track Detection Data All tracks Detection Data @* @* Figure 12.14 Updated Track Update Position Update Display Update Position All tracks @* Updated Track Current Track &* Current Track Update Position @* @* Updated Display & Detection Data Updated Track Update Display & &* Updated Display Updated Display Update Display @* 12 Finite State Machines • Finite state machines: discrete valued inputs, outputs and internal items – Sequential: past inputs impact current outputs (e.g., state-transition diagram) – Combinational: current outputs characterized only current inputs Machines Continuous or Analog Machines Finite State Machines (FSMs) Combinational FSM Sequential FSM • Continuous machines: continuous and discrete inputs, outputs and internal items Figure 12.16 13 State-transition Diagram for ATM IDLE Cust. ID Presented Process ID for Validity Event Output Unread Cust. ID CN:”ID Unreadable” WAITING FOR CUSTOMER IDENTIFICATION Cust. ID Read CN:”Enter Access Code” Invalid Access Code CN:”Please Re-enter” WAITING FOR CUSTOMER’S ACCESS CODE 3rd Invalid Access Code CN:”Transaction Terminated” Access Code Validated CN:”Main Menu Choices” WAITING FOR CUSTOMER’S CHOICE DEPOSIT Figure 12.17 WITHDRAWL TRANSFER ACCOUNT BALANCE 14 State-transition Diagram for an Elevator Elevator Idle, Door Open No Request Maintain Open Door Up Request Close Door Preparing To Move Up Down Request Close Door Up Request Close Door Door Closed Up Indicator Elevator Starting Preparing To Move Down Down Request Close Door Door Closed Down Indicator Acceleration > 0 Departed Floor Elevator Moving Near Requested Floor Slowing Door Opened Direction Indicator Elevator Enabling Entry/Exit Elevator Stopping Elevator Stopped Door Activated Elevator Door Opening Pause Timer Elapsed Destination Query Checking Next Destination Figure 12.18 15 Statechart SUPERSYSTEM CCS HUMAN w b OFF m External System Statechart For Cruise Control System b NOT OFF DRIVE b DRIVE w( b) AUTOMOBILE b ON OFF b ARC LABEL b b hat m w DEFINITION turn on car turn off car accident occurs depress on/off button X Figure 12.19 16 Statechart, cntd NOT OFF SYSTEM STATUS INDICATOR ON Decomposition of the “Not Off” State For Cruise Control System DEAD vs c ALIVE u STANDBY e f vr d ARC LABEL c d e f u vr vs Figure 12.20 DEFINITION circuit closed (good bulb or fuse) circuit open ( bad bulb or fuse) brake depressed clutch depressed wheel revolutions > 7920/ (pi*r) where r is the wheel radius in inches push button to resume / set push CCS button to standby 17 Statechart, cntd ALIVE OFF ON Decomposition of the “Alive” State for the Indicator of Cruise Control System w vs vr BLINK w w f e ARC LABEL e f vr vs w Figure 12.21 DEFINITION brake depressed clutch depressed push button to resume / set push CCS button to standby depress on/off button 18 Statechart, cntd ON MAINTAIN PULSE h h k DECELERATE j v v i ACCELERATE va vd k Decomposition of the “On” State for the Indicator of Cruise Control System vd H va vr ARC LABEL h h(hat) i j k v(hat) va vd vr Figure 12.22 DEFINITION non drive wheel RPM not equal to drive wheel RPM non drive wheel RPM equal to drive wheel RPM wheel RPM decrease from set speed wheel RPM increase from set speed wheel RPM match to set speed release the CCS button push CCS button to accelerate push CCS button to decelerate push button to resume / set 19 Statechart for Cruise Control System CCS w OFF NOT OFF b ON PULSE MAINTAIN h w h m v vd va DECELERATE j k v i INDICATOR k ACCELERATE ALIVE ON va f w vr e OFF H vd vs c DEAD vr u STANDBY BLINK d MEMORY SET e f vs MEMORY CLEAR va w v w Figure 12.23 20 Object-oriented Modeling – our favorite in software? • Object Modeling Technique (OMT) – Object model (ERD) – Dynamic model (STD & nested state diagrams) – Functional model (DFD) • Real-time Object-oriented Modeling (ROOM) – Objects = Actors – Actors communicate via messages – ROOMcharts • Combine functional and behavioral models • Generalization of Statecharts • Unified Modeling Language (UML) (SysML) 21