Question

In: Electrical Engineering

What would be the state diagram of the following: The traffic light cycle will have 5...

What would be the state diagram of the following:

The traffic light cycle will have 5 states:

State 1: Transition into Major (NS) traffic, All lights red

State 2: Left turn signals Major are on

State 3: Major roadway straight green lights on

State 4: Transition into Country (EW) traffic, All lights red

State 5: Country roadway straight green lights on

* In-state only light are listed are not red others are red.

*Major straight-lane is green for 10 sec.

* The transition states (1 and 5) shall be activated for 0.67 sec for the next traffic.

*The country street is green for 6 sec.

*The major road left signals will on by switches which determine if a car is present either the major left-turn lane.

Solutions

Expert Solution

The signal of the switch on the Major lane is called "left". Unless mentioned otherwise, a light is assumed to be red. The two transition states (1 and 4) will be on for 0.67 sec. It is assumed that the right of way is given to left going traffic.

We must start by listing out all the states and their outputs:

State 1: Transition into Major traffic, all lights red

State 2: Major roadway time slot, major left turn green lights on

State 3: Major roadway time slot, major straight green lights on

State 4: Transition into Country traffic, all lights red

State 5: Country roadway time slot, country straight green lights on

Next we must connect states that can transition:

Next we must write down the conditions for transition:

S1 -> S2 : "(0.67 sec elapsed) and (left switch on)"
S1 -> S3 : "(0.67 sec elapsed) and (left switch off)"
S2 -> S3 : "left switch off"
S3 -> S4 : "10 sec elapsed"
S4 -> S5 : "0.67 sec elapsed"
S5 -> S1 : "6 sec elapsed"

And incorporate them into the state diagram:

Below is the program code (in Graphviz) used to draw the above diagram:

digraph finite_state_machine {
   rankdir=LR;
   size="8,5"

   S1 [ label = "S1\nAll Red" ];
   S2 [ label = "S2\nMajor Left Green" ];
   S3 [ label = "S3\nMajor Straight Green" ];
   S4 [ label = "S4\nAll Red" ];
   S5 [ label = "S5\nCountry Straight Green" ];

   node [shape = circle];
   S1 -> S2 [ label = "(0.67 sec) and left" ];
   S1 -> S3 [ label = "(0.67 sec) and !left" ];
   S2 -> S3 [ label = "!left" ];
   S3 -> S4 [ label = "10 sec" ];
   S4 -> S5 [ label = "0.67 sec" ];
   S5 -> S1 [ label = "6 sec" ];
}


Related Solutions

design a four way traffic light system. with state diagram, truth table, jk flip flop, kmap...
design a four way traffic light system. with state diagram, truth table, jk flip flop, kmap and final circuit
Write a truth table for Moore finite state machine modeling a traffic light.
Write a truth table for Moore finite state machine modeling a traffic light.
Verilog code for Traffic light controller. Need a block diagram, Verilog codes used with testbench, and...
Verilog code for Traffic light controller. Need a block diagram, Verilog codes used with testbench, and the waveforms screen-prints.
In what respects does a UML state diagram differ from a state transition diagram?
In what respects does a UML state diagram differ from a state transition diagram?
What is a business cycle? Explain it using a diagram.
What is a business cycle? Explain it using a diagram.
What is meant by the "business cycle"? What are the four stages of this cycle? What is the Trend? Show a diagram.
 What is meant by the "business cycle"? What are the four stages of this cycle? What is the Trend? Show a diagram. Based on the stages of a business cycle, what is meant by "pro-cyclical"? What is meant by "counter-cyclical"? Suppose that a business cycle trend line begins with real GDP at $5255 and ends with real GDP at $7357 over 4 years. What is the average annual real rate of growth? Show your calculations. Suppose that a business cycle trend line begins...
5. A driver encounters two traffic lights on the way to work each morning. Each light...
5. A driver encounters two traffic lights on the way to work each morning. Each light is either red, yellow, or green. The probabilities of the various combinations of colors is given in the following table: Second Light First Light R Y G R 0.31 0.02 0.18 Y 0.02 0.03 0.03 G 0.14 0.04 0.23 a) What is the probability that the first light is red? b) What is the probability that the second light is green? c) Find the...
5. a) Draw a state diagram for a sequential circuit that outputs a 1 if and...
5. a) Draw a state diagram for a sequential circuit that outputs a 1 if and only if its single       input has completed the sequence 1111. b) Then build the circuit using D flip-flops and any necessary gates. NO Overlap is       Allowed. 6. Repeat question 5 but this time OVERLAP IS ALLOWED:
Ethics in Engineering For each of the following five (5) scenarios, state briefly ‘what you would...
Ethics in Engineering For each of the following five (5) scenarios, state briefly ‘what you would have done’ from an ethics perspective: d) Dissent about quality Discuss the ethical issue this case raises. Dissent about quality I A recent graduate of Engineering Tech, Bernie Reston has been employed in the Research and Development (R&D) Chemical Engineering Division of Larom, Inc. for the past several months. Bernie was recommended to Larom as the top Engineering Tech graduate in chemical engineering. Alex...
what is the nuclear gas cycle in detail. make a diagram of nuclear gas cycle integrated...
what is the nuclear gas cycle in detail. make a diagram of nuclear gas cycle integrated with Multi-effect distillation with detailed explanation
ADVERTISEMENT
ADVERTISEMENT
ADVERTISEMENT