0% found this document useful (0 votes)
30 views7 pages

Achintya Version

This document describes a project to develop an intelligent traffic light system using simulation and hardware. It presents two parts - a counter-based simulation and an FSM-based simulation with pedestrian button input. The FSM model is then implemented on an Arduino board with LEDs. Areas for improvement include supporting more complex traffic, adaptive timing, and integrated pedestrian sensors.

Uploaded by

Aalu Singh
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
30 views7 pages

Achintya Version

This document describes a project to develop an intelligent traffic light system using simulation and hardware. It presents two parts - a counter-based simulation and an FSM-based simulation with pedestrian button input. The FSM model is then implemented on an Arduino board with LEDs. Areas for improvement include supporting more complex traffic, adaptive timing, and integrated pedestrian sensors.

Uploaded by

Aalu Singh
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 7

Introduction

1.1. Problem Statement

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

1.2. Input/Output Descriptions

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:

Part 1: Counter-Based Simulation (Combinational Logic)

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. ⁤

(attach truth table)


Minimized Boolean Expressions:
We can use K-maps to simplify the logic for each light output. Analyzing the truth table,
we can derive the following minimized expressions:
(attach K-Maps)

Algorithmic State Diagram (not applicable for Part 1):


Part 1 uses a counter-based approach, not an FSM. Therefore, an algorithmic state
diagram is not applicable here.
Part 2: FSM-based Simulation with Pedestrian Button
State Transition Table: This table shows the conditions for transitioning between states
based on the current state and the pedestrian button press (Pushbutton).

Current State Pushbutton Next State


Algorithmic State Diagram:
(attach flowchart)

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.

Here's a breakdown of the lighting practices, for each state;

● State 1 (Traffic); The pedestrian lights show red signals.


● State 2 (Caution); Both the traffic light and pedestrian light display red signals.
● State 3 (Pedestrian); The traffic light shows red while the pedestrian light
displays green.

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.

Part 1: Counter-Based Simulation


Components
A maximum count of 15 is provided by the Counter block from the DSP System Toolbox
with a continuous counter to support the timing mechanism of the traffic light sequence.
Then, an Integer to Bit Converter converts the decimal output of the counter into single
bits, very helpful for further processing. A Demux block with four outputs takes the
counter bits, A, B, C, D, so that efficient manipulations take place and are allocated
appropriately to the different components. Simulink logic blocks and dashboard
components are used to control and display traffic and pedestrian lights in the simulated
environment.

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.

Part 2: FSM-based Simulation with Pedestrian Button

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.

Hardware Implementation (for both Parts)


After successful simulation of the Simulink models, the system will be converted to run
on an Arduino Uno board to enable deployments in the real world. The simulated lamps
are to be replaced with real-world red, yellow, and green LEDs that improve the
practicality and applicability of the system. The pushbutton will be replaced with a real
momentary switch on the breadboard; that is, simulating the pedestrian button. Active-
high logic will govern the system such that the LED will be turned on for a HIGH signal
and turned off for a LOW signal. An organized and wired breadboard configuration is
essential for a well-functioning and working hardware model.

(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:

1. Counter-based Model (Strength): Provided a straightforward foundation for


understanding basic traffic light sequencing.
2. FSM-based Model with Pedestrian Activation (Strength): Introduced dynamic
control, improving adaptability to real-time events like pedestrian button presses.

We then translated the FSM model to a functional Arduino system using LEDs,
demonstrating the feasibility of hardware implementation.

Areas for Improvement:


● Limited Traffic Complexity: The current model simulates a single intersection.
Future iterations could explore multi-lane scenarios and coordinated traffic flow
across networks.
● Static Timings: While FSMs offer flexibility, the timing within each state remains
fixed. Implementing timers or adaptive control algorithms could further optimize
traffic flow based on real-time data.
● Simplified Pedestrian Detection: The current model uses a button for
pedestrian activation. Future advancements could integrate real-world sensors
(e.g., pressure pads) for more accurate pedestrian detection.

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.

You might also like