Download presentation
Presentation is loading. Please wait.
Published byCandice Sutton Modified over 8 years ago
1
CSE 466 – Fall 2000 - Introduction - 1 Fuel Cell Power Plant A Control Dominated Example H2H2 Air H20H20 Heat controller sense: Temperature H 2 Output Current Output Voltage Fan Speed control H2 valves Output MOSFET Fan Speed Stack MOSFETS not showing power supply circuitry for the controller…runs off fuel cell w/ backup battery.
2
CSE 466 – Fall 2000 - Introduction - 2 System level Modes (Logical Structure) startup warmuponline offline shtdwn Self Check Fail Warm On Off+ V<min + I>max Self Check Pass Failure Failure = H2+TooHot+TooCold I>0+V<min off
3
CSE 466 – Fall 2000 - Introduction - 3 State Table (activities/error conditions are mode dependent) ModeOutputs Processes Events New Mode OffLoad Disabled Power Supply Off Gas Valves Closed Power Button Enabled nonePower Button PushStartup Load Disabled Power Supply On Gas Valves Closed Initialize Temp Control H2 Detection Load Monitor UI Running Initialize Complete Warm Up Error Condition Detected* or shutdown request Shutdown WarmupLoad Disabled Power Supply On Gas Valves Open Temp Control H2 Detection Load Monitor UI Running Operating Temp ReachedOff Line Error Condition Detected* or shutdown request Shutdown Off LineLoad Disabled Power Supply On Gas Valves Open Temp Control H2 Detection Load Monitor UI Running On-Line Command Received (UI) On Line Error Condition or Shutdown request Shutdown On LineLoad Enabled Power Supply On Gas Valves Open Temp Control H2 Detection Load Monitor UI Running Off Line CommandOff Line OverloadOff Line Error Condition* or Shutdown Request Shutdown Load Disabled Power Supply On Gas Valves Closed Fan On Temp Control Schedule transition to Off state TimeoutOff
4
CSE 466 – Fall 2000 - Introduction - 4 Examples of Mode Dependencies Fan Speed Control: In startup or shutdown mode always run minimum speed otherwise attempt to maintain temperature set point If fan doesn’t turn, issue shutdown event Hydrogen Detection: always close hydrogen valves and issue shutdown event if hydrogen detected, except in startup mode. Load Monitoring If not online and output current > 0 or output voltage < min, then issue shutdown event. If online and load current is > max allowed, or if output voltage is < min then turn on another stack. If all stacks are on, then issue overload event. UI Process If “line” button pushed and online issue offline event, If offline issue online event. If “power” button pushed and not in off mode, then issue shutdown event.
5
CSE 466 – Fall 2000 - Introduction - 5 Master Slave Architecture Master/Slave Architecture master process: determines what mode the system is in at any given time and synchronizes mode transitions. Process events and data. Slave processes: Perform mode-dependent activities, pass data and events back to master. Logical Decomposition Master (UI) Slave 1 (H2) Slave 2 (Load) Slave 3 (Temp) commands responses
6
CSE 466 – Fall 2000 - Introduction - 6 Sockets are a “logical” constructs Master slave socket == 2-way fifo Socket could be implemented in shared memory, internet, or anything in between. High level architecture can be independent of implementation choices. Synthesis Problem: Map processes and sockets to processors and networks Warning: usually not done this way for embedded systems…usually designer performs the physical decompositions
7
CSE 466 – Fall 2000 - Introduction - 7 COMMANDS RESPONSES Master/Slave Software Architecture Master void master() _task_ MAST{ Button(mode); // enq(cmd) checkDB(mode); // enq(cmd) } void comTop() _task_ COM{ wait(K_TMO, 1); if (!deq(cmd)) { cmd = pollCmd(next++); slave = next; } else slave = toWho(cmd); write(slave, cmd); read(response); signal(VERIFY); } void comBot() _task_ VERIFY{ // match up resp. and commds wait(K_SIG); verify(response); updateDB(response); } Slave void mainTask() _task_ SL{ manageLoad(mode); } void comTop() _task_ TOP{ read(master,cmd); write(master,response); //prev signal(DO); }// could be ISR void comBot() _task_ DO { wait(K_SIG); response = do(cmd); // set local mode } commands and responses are packets not single bytes responses are for previous command mode is NOT a global variable
8
CSE 466 – Fall 2000 - Introduction - 8 Distributed State Synchronization Master Button() {… if (LineButton && offline) { enq(OFF); offline = true; } checkDB() { if (offline && db[I]>0) enq(SHT); } manageLoad() { db[V] = readV(); db[I] = readI(); adjustStack(I,V); } do(cmd) { if (cmd=OFF) { out = 0; db[M] = offline; } if (cmd=ON) out = 1; db[M] = online; } return(makeR(db[i++])); } slave SHT, OFF, POLL, POLL I=10,V=15, M=ON, I=0 is there a problem here?
9
CSE 466 – Fall 2000 - Introduction - 9 Synchronous Systems warmup offline online offline need to identify mode transition periods, and identify data that is out of synch as a result of transition. Need also to know when it is valid again. propagation time
10
CSE 466 – Fall 2000 - Introduction - 10 Managing Distributed Transitions manageLoad() { db[V] = readV(); db[I] = readI(); adjustStack(I,V); } do(cmd) { if (cmd=OFF) { out = 0; db[M] = offline; } if (cmd=ON) out = 1; db[M] = online; } return(makeR(db[i++])); } POLL,POLL,POLL,POLL, OFF, POLL, POLL I=10,V=15, M=ON, I=5, V=20, M=OF, I=0 Master Button() {… if (LineButton && offline) { enq(OFF); offline = true; } checkDB() { if (offline&&VLD(db[I])&&db[I]>0) enq(SHT); } enq(cmd) { if (cmd=OFF) { db[I] = INVLD; db[V] = INVLD; db[M] = INVLD; q.data[q.head] = cmd; next(q); } updateDB(response) { ignore slave responses until correct mode is received from slave } ignored, transition period could improve transition speed by advancing i to M in do(). Also need to be concerned with physical time lag from !out db’s are not global either!
11
CSE 466 – Fall 2000 - Introduction - 11 Multiprocessor Implementation Bus Two main types of serial buses: master/slave (SPI,USB) and multi-master (I 2 C, CAN)
12
CSE 466 – Fall 2000 - Introduction - 12
13
CSE 466 – Fall 2000 - Introduction - 13 Physical Partition – the network
Similar presentations
© 2025 SlidePlayer.com. Inc.
All rights reserved.