Achintya Version
Achintya Version
Traditional traffic lighting systems rely on fixed timing for state changes, which limits
flexibility and flexibility in traffic flow management. This project addresses this challenge
by developing and implementing an intelligent vehicle lighting system with two main
functions:
● Simulation of a basic traffic light sequence: This involves repeating a fixed cycle
of green, yellow and red lights to control traffic.
● Dynamic traffic lighting system development: Based on simulation incorporating
finite state machine (FSM) and pedestrian button activation. FSM allows real-
time adjustment of light sequences based on pedestrian button presses,
improving responsiveness and potentially increasing traffic efficiency
Inputs:
● Counter Block (Simulation Part 1): Generates a free-running counter to
determine the traffic light sequence timing.
● Pushbutton (Simulation Part 2 & Hardware): Simulates or acts as a
physical pedestrian button to initiate a state transition in the FSM.
Outputs:
● Dashboard Lamps (Simulation): Visually represent the state of the traffic
lights (red, yellow, green) and pedestrian lights (red, green).
● LEDs (Hardware): Replicate the functionality of the simulated traffic lights
using actual red, yellow, and green LEDs.
Algorithm Design:
Truth Table:
Based on the counter outputs (A, B, C, D) we will create a truth table to indicate the
state of each light (Red, Yellow, Green, Yellow Walking, Yellow Walking). Each
combination of A, B, C, and D represents a particular arithmetic value from the
arithmetic block.
In this scheme based on Finite State Machines (FSM) we don't use expressions directly
to control the light from incidents. Instead the active lights are determined by transitions,
between states according to the state.
The mechanism to activate these lights can be incorporated in the FSM block using
Simulink components.
Additional Notes:
In the state diagram of the algorithm timers are not explicitly displayed for simplicity.
However the durations of states (3 seconds, for Caution and 6 seconds for Pedestrian)
would be integrated within the FSM block to initiate state changes. Strategies such as
counters or timers within the FSM can be employed to manage these time intervals.
This method utilizing an FSM enables an adaptable traffic light system in contrast to the
counter based method discussed in Part 1. The FSM can be easily adjusted to include
features or accommodate shifting traffic patterns.
Functionality
The simulation models a basic traffic light cycle with timed intervals for each phase
defined. Such phases are a 7-second span for the green traffic signal, followed by a 3-
second interval for the yellow light, and finally a 6-second span in which the red traffic
signal turns on simultaneously with the green pedestrian signal. Truth tables and
Karnaugh maps are used to derive minimal Boolean expressions for each and every of
the lights, given the counter bits, with the goal of pure and optimized control logic.
Deliverables
In Part 1, deliverables would include a Simulink model capturing the sequence of the
traffic lights precisely and comprehensive documentation explaining truth tables and
Karnaugh maps used to formulate the Boolean expressions for each light.
Components
Part 2 extends the system by writing a Stateflow Chart Block within Simulink to create a
three-state Finite State Machine. Simulink logic blocks and dashboard elements are
also part of the equation to regulate and graphically illustrate the state of the traffic and
pedestrian lights. A pushbutton component, also added, simulates pedestrian button
activation and therefore adds an interaction aspect to the system.
Functionality
The three states involved are the FSM, which regulates the traffic light sequence by
transitioning into another state that will control either the flow of traffic or pedestrian
movement. The three states include State 1, which has the green traffic light and stays
in the active state until a pedestrian button press is applied, after which the system
transitions into State 2 and starts the yellow phase of traffic light, which lasts for 3
seconds. Following State 2, the system goes into State 3, where it sets both the red
traffic light and green pedestrian light for 6 seconds. From that point onwards, after
State 3, the system restarts from State 1 and awaits other input. The pedestrian button
press is the input that causes the system to transition from State 1 to State 2.
Design Methodology
Graphical representation of an algorithmic state diagram showing transitions between
the FSM states and an overview of how the system functions. A state transition table
summarizes the conditions requiring transitions between states to make the design
clear and readable.
Deliverables
Deliverables for part 2 are a Simulink model for the FSM-based traffic light sequence,
including the integration of activation from the pedestrian button. The documentation will
include an algorithmic state diagram and a table of state transitions for the explanation
of design rationale and how it all works.
(attach simulations)
Conclusion:
This project investigated the design and implementation of a smart traffic light system
using simulation and Arduino. We successfully built a two-part Simulink model:
We then translated the FSM model to a functional Arduino system using LEDs,
demonstrating the feasibility of hardware implementation.
Overall Significance:
To conclude, the current project can be regarded as a contribution to the development
of intelligent traffic management systems. The FSM-based approach proves the
possibility of developing adaptable traffic light control to better meet pedestrian
requirements and potentially view the entire traffic flow more operational. If the current
limitations are addressed, further versions may promote the development of a more
efficient and user-friendly transport system.