0% found this document useful (0 votes)
15 views8 pages

Assignment 4 Document

The document discusses the design and implementation of a traffic control system for ambulances at four-way intersections, utilizing VHDL and a Finite State Machine (FSM) model to prioritize emergency vehicles. By integrating radio frequency detection, the system dynamically adjusts traffic signals to allow ambulances safe passage while maintaining safety for other vehicles, potentially reducing delays by over 30%. The report outlines the methodology, simulation results, and future improvements for enhancing traffic management and emergency response times.

Uploaded by

lelethumanyanya
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)
15 views8 pages

Assignment 4 Document

The document discusses the design and implementation of a traffic control system for ambulances at four-way intersections, utilizing VHDL and a Finite State Machine (FSM) model to prioritize emergency vehicles. By integrating radio frequency detection, the system dynamically adjusts traffic signals to allow ambulances safe passage while maintaining safety for other vehicles, potentially reducing delays by over 30%. The report outlines the methodology, simulation results, and future improvements for enhancing traffic management and emergency response times.

Uploaded by

lelethumanyanya
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/ 8

Traffic Control System for an Ambulance at a four-way traffic light.

1st Mbalenhle Mahlangu 2nd Evans Dube 3rd Vuyolwethu Kanisi


Electrical engineering Electrical Engineering Electrical Engineering
Central University of Central University of Technology Central University of
Technology Rustenburg, South Africa Technology
Pretoria,SouthAfrica [email protected] Mthatha, South Africa
[email protected] [email protected]
5th Leletu Manyanya
th
4 Njabulo Madonsela Electrical Engineering 6th Victor Makgahlela
Electrical Engineering Central University of Technology Electrical Engineering
Central University of Technology Mthatha, South Africa Central University Of
Bergville, South Africa [email protected] Technology
[email protected] Polokwane, South Africa
8th Thato Sesing 222050985@ stud.cut.ac.za
7th Ntombikayise Makhubela Electrical Engineering
Electrical engineering Central University of Technology 9th Zinhle Shusha
Central University of Technology Botshabelo, South Africa Electrical Engineering
Joburg, South Africa [email protected] Central University of Technology
[email protected] Port Shepstone, South Africa
[email protected]
10th Moses Mtsweni
Electrical Engineering
Central University of Technology
Belfast, South Africa
[email protected]

Abstract-Traffic light control systems play a critical role in an ambulance, where every second can determine the
ensuring smooth and safe vehicular movement, particularly at outcome for a patient in need of urgent care.
intersections. With the increasing complexity of urban traffic, Traffic lights are widely used at road intersections to regulate
it is essential to incorporate emergency response features to vehicle and pedestrian movement using a standard colour
prioritize life-saving services such as ambulances. This study sequence—Red, Yellow, and Green. Traditional systems,
focuses on the design and implementation of a traffic light however, follow fixed timing patterns and are not equipped to
control system using VHDL (VHSIC Hardware Description prioritize emergency vehicles. This limitation can cause
Language), integrating an emergency state specifically severe delays for ambulances, risking lives and increasing the
triggered by the detection of an approaching ambulance. strain on emergency services. To address this, intelligent
A Finite State Machine (FSM) model was used to simulate the traffic systems using digital logic and hardware design
behaviour of traffic signals under normal and emergency methods are being explored.
conditions. The system was designed using VHDL and This project investigates the design and implementation of a
simulated using LabVIEW to validate its accuracy and smart traffic light control system using VHDL (VHSIC
functionality. Hardware Description Language) with an added emergency
mode that detects an ambulance and dynamically adjusts
Upon detecting an approaching ambulance, the FSM signal states to allow safe and quick passage. A Finite State
overrides the normal operation, granting green light priority Machine (FSM) approach is used to model the different signal
to the emergency vehicle while ensuring cross-traffic safety phases, including normal traffic flow and emergency override
through controlled signal transitions. Simulation results conditions.
demonstrate that this design can reduce ambulance delays by The implementation involves coding the FSM in VHDL,
more than 30%, enhancing overall traffic responsiveness. simulating the system using LabVIEW, and analysing the
The model ensures that upon ambulance detection, traffic behaviour of the signal states under different scenarios. This
signals switch to prioritize ambulance movement while approach not only improves traffic flow efficiency but also
maintaining safety for other vehicles. This approach enhances public safety by giving priority to emergency
demonstrates how digital design techniques can enhance vehicles when required.
existing traffic systems with smart, responsive, and critical The remainder of the report is structured as follows: Section
emergency-handling capabilities. II presents a literature review and theoretical background.
Section III details the design methodology and state diagrams.
I. INTRODUCTION Section IV covers simulation, implementation, and result
Modern cities face increasing challenges related to traffic analysis. Finally, Section V concludes the report and outlines
congestion, road safety, and the need for faster emergency future improvements.
response times. One of the major contributors to traffic
delays at intersections is the lack of intelligent traffic signal II. LITERATURE REVIEW
control systems that can adapt to dynamic road conditions
particularly during emergencies. The need for more Traffic management has been a problem in society. A well
responsive traffic management becomes crucial when planned and organized traffic management technique needs to
dealing with life-critical situations such as the approach of come to play, it is much needed to reduce not only accidents
but also the waiting and the travelling time on roads [1].
In this section we will further discuss the use of; Traffic lights consist normally of three signals, transmitting
a) Road Traffic Management Systems, meaningful information to drivers and riders through colors
b) Emergency Vehicle Detection Using Radio Signals, and symbols including arrows and bicycles. The regular
c) Finite State Machines (FSM), traffic light colors are red, yellow (also known as amber), and
d) FPGA-Based Traffic Light Controllers, as well as green arranged vertically or horizontally in that order.
e) VHDL for System Design. Although this is internationally standardized, variations exist
on national and local scales as to traffic light sequences and
A. Road Traffic Management Systems
laws [2].

Urbanization and increasing vehicle volumes have led to Traffic lights are used to control how quickly and safely
persistent traffic congestion, delays, and challenges in vehicles and passengers can move through an area. Drivers
emergency response times. Efficient road traffic management who disobey the laws and guidelines outlined by traffic lights
aims to optimize traffic flow, reduce accident rates, and ensure run a very high risk of getting into an accident. As a result,
faster travel for priority vehicles such as ambulances. traffic lights contribute to a decrease in vehicle collisions.
Conventional traffic control systems typically use pre- Traffic lights also aid in time savings because they coordinate
programmed, time-based sequences which do not adapt traffic flows and routes without causing congestion. It also
dynamically to real-time road conditions. To address this, contributes to establishing discipline in people's daily lives
modern systems incorporate traffic data collection and because those who disregard traffic regulations and warning
adaptive control to optimize signal timings and provide real- signs must pay fines to the authorities. Before traffic lights
time responses to changing traffic patterns. were installed, traffic was governed by the traffic police.
A critical advancement in this field is priority control for Traffic lights shield traffic police officers from roadside air
emergency vehicles, which allows traffic systems to detect pollution by reducing the amount of time they must stand on
approaching ambulances and modify signal behaviour to grant the road directing traffic [2].
them right-of-way. This function significantly reduces the
response time of emergency services and minimizes the risk
of intersection-related accidents during emergencies [1].

Traffic lights, traffic signals, or stoplights – also known as


robots in South Africa – are signaling devices positioned at
road intersections, pedestrian crossings, and other locations to
control flows of traffic [1].

Figure 3:Four-way traffic control[5].

W. L. Mitchell has designed a traffic light control system


which had overcome the traffic congestion problem and
provided an emergency path for the emergency vehicle where
the radio transmitter and antenna placed on the emergency
vehicle. The radio will transmit the signal to the other vehicle
that is nearby. The radio receiver had been placed at four
junction traffic light will receive the emergency signal from
emergency vehicle that passed by the junction. The first signal
Figure 1:Traffic signs with arrows [2]. code contains a frequency for emergency vehicles while the
second signal code contains a frequency for another vehicle.
The transmitted signals provide miscellaneous traffic light
pole in normal conditions or emergencies. When the receiver
receives the signal from an emergency vehicle transmitter,
traffic light system for emergency vehicles will be activated.
W. E. Brill introduced an emergency vehicle detection system
for alerting a driver of an approaching emergency vehicle
including a sound signal-producing unit mounted on an
emergency vehicle, a sound signal detection unit mounted on
a non-emergency vehicle, and a display unit remotely located
on the non-emergency vehicle. The sound signal-producing
unit has a sound generator for producing and transmitting a
sound signal. A switch is used for controlling the operation of
the sound generator in combination with a siren [3].
Figure 2: Traffic lights in their different states [3].
transitions to an emergency state where it overrides the
current light state and sets the signal to green in the
ambulance’s direction. After the ambulance passes, the FSM
reverts to its normal cycle. This modularity and predictability
make FSMs ideal for real-time traffic applications
implemented on hardware platforms like FPGAs [2].

There are four major families of automaton where FSM as one


of them:
• Finite-state machine
• Pushdown automata
• Linear-bounded automata
• Turing machine
Figure 4: Visual representation of emergency vehicle detection using
radio signals [5]. Many things in the real-world are FSMs, e.g., traffic lights
are an FSM with several (light) states which will change state
B. Emergency Vehicle Detection Using Radio Signals when it receives an input, typically just a fixed timer that
decides how much time the traffic lights should be green,
Among various detection techniques, radio-based detection yellow and red. Also, a turnstile is often referred to as an easy
offers a reliable, non-line-of-sight method for identifying example for FSM, where "locked" and "un-locked" are two
emergency vehicles approaching intersections. In this states, and arrows indicate transitions between states [1].
technique, ambulances are equipped with radio frequency
(RF) transmitters, and the traffic control units at intersections
are equipped with corresponding RF receivers. When an
ambulance comes within a certain range of the intersection,
the receiver identifies the specific RF signal and initiates a
pre-emption sequence—changing the traffic signal to green
for the ambulance’s path while halting cross traffic.
This method is advantageous over optical or acoustic
detection systems (e.g., infrared or siren-based) because it is
less susceptible to environmental noise, visibility issues, or
occlusion. Additionally, RF-based systems allow for secure,
encoded signals to prevent false detections or unauthorized
pre-emption. The integration of RF detection into digital
traffic light control can thus improve the reliability, safety, and
speed of emergency vehicle passage through intersections [4].

Figure 5: Emergency vehicle Pre-emption system[5]. Figure 6: Example of a simple finite – state machine. [6].

C. Finite State Machines (FSM)


D. FPGA-Based Traffic Light Controllers
The logic governing traffic signal transitions can be
effectively modelled using Finite State Machines (FSMs). Field Programmable Gate Arrays (FPGAs) are highly suitable
FSMs provide a structured way to represent a system that for implementing FSM-based traffic controllers due to their
transitions between different states (e.g., green, yellow, red) parallel processing capabilities and reconfigurability. An
based on defined conditions and inputs. In traffic systems, FPGA consists of programmable logic blocks connected via
FSMs control light cycles and can be extended to handle customizable routing, enabling developers to define precise
interrupt-driven events, such as the detection of an emergency hardware-level behaviour for applications like traffic light
vehicle via RF signal [5]. control.
For example, under normal operation, the FSM cycles through FPGAs are particularly beneficial in safety-critical
standard light sequences. Upon receiving an input from the applications such as emergency vehicle prioritization because
RF module indicating an approaching ambulance, the FSM they offer deterministic and fast response times. When
integrated with an RF receiver, the FPGA can instantly LabVIEW is a graphical programming environment designed
process detection signals, execute emergency routines, and for real-time monitoring, data acquisition, and industrial
manage multiple input conditions simultaneously. This automation.
ensures that traffic lights react in real-time to ambulance LabVIEW was developed in the 1980s by National
approach signals, reducing delay and enabling safe passage Instruments as a graphical programming language designed to
[6]. facilitate test, measurement, and automation applications.
Unlike traditional text-based programming, LabVIEW
Furthermore, FPGAs are cost-effective for prototyping and employs a dataflow paradigm, making it particularly effective
support updates or modifications to system behaviour via for sensor integration and control applications [8].
reprogramming. This makes them ideal for scalable smart city
applications where infrastructure may need periodic LabVIEW offers an alternative approach by providing a
upgrading [6]. graphical programming environment where engineers can
design control systems using block diagrams instead of text-
Programmability FPGAs are reprogrammable; nevertheless, based code. This visual programming approach makes
the customer or software engineer determines how useful they LabVIEW highly accessible, even for users with limited
are. FPGA can be used to carry out many tasks after coding experience [8].
production and can then be improved or rebuilt. A single
FPGA can be used to carry out many functions that the user
desires [6] [1].

- Cost-effectiveness
FPGAs are made viable by the fact that they can be
reprogrammed. Since FPGAs do not have repetitive
engineering expenditures like support fees, this lowers
costs for many markets. FPGAs have a lengthy useful
life [3] [2].

- Adaptability
FPGAs are capable of quickly adapting to variations
made by user’s software engineers, including upgrades,
modifications, and reprogramming. After modifications
and recreation, FPGAs function exactly how the client Figure 7: LabVIEW program [14].
desires [4] [1].

- Time to market Key features of LabVIEW in greenhouse automation include:


FPGAs can advertise more quickly because they don't
require advanced verification. The ease with which Seamless Sensor Integration: LabVIEW supports real-time
FPGA plans flow makes them malleable, and the data acquisition (DAQ) from multiple sensors, enabling
programming languages (Verilog and VHDL) used to efficient climate control.
program FPGAs speed up plan design since they make it Dynamic System Monitoring: Engineers can visualize
easy for software developers to spot errors. The greenhouse conditions through interactive dashboards,
reprogrammable feature of FPGAs makes it simple to ensuring immediate detection of anomalies. FPGA Module
test plans, which improves plan consistency and Support: LabVIEW extends its functionality to FPGA
efficiency and shortens time to market [4] [2]. programming, offering a simplified interface for digital logic
implementation [9].
E. VHDL for System Design
LabVIEW uses a visual programming interface to:
To implement FSMs and integrate ambulance detection in a. Display Real-Time Data
FPGA hardware, VHDL (VHSIC Hardware Description b. Enable Remote Access
Language) is widely used. VHDL enables the modelling,
simulation, and synthesis of digital systems at multiple levels While LabVIEW excels in flexibility and user-friendliness, it
of abstraction. Designers can define FSMs, input/output is less efficient for low-level hardware control compared to
interfaces (e.g., for RF modules), and time-sensitive logic VHDL. Processing delays may arise when handling multiple
behaviours using VHDL. high-speed sensor inputs, making it less suitable for
The modular nature of VHDL allows developers to construct applications requiring instantaneous response times [9] [8].
systems that include both normal signal cycling and
emergency handling modules. Simulation capabilities within III. METHODOLOGY
VHDL toolchains provide a robust framework for testing the
correctness and timing of the design before deployment. In the Designing an intelligent traffic light control system to
context of traffic control, this ensures that all FSM transitions prioritize emergency vehicles such as ambulances requires a
and input responses, such as radio signal detection from multi-faceted approach that integrates digital design, real-
ambulances, function as expected [7]. time processing, and responsive state management. The
methodology for this project consists of both software
F. LabView
simulation and hardware implementation phases, utilizing
Road Traffic Management principles, Finite State Machines
(FSM), VHDL design, FPGA deployment, and emergency defined. The code was saved with the correct file type to
detection through radio signals. ensure compatibility with FPGA toolchains.

1. System Design Overview:


The system was designed to detect ambulances via radio
signals and immediately adjust traffic light behaviour to
provide safe and uninterrupted passage.

Key elements of the system include:


• Radio-Based Emergency Detection: An ambulance
is equipped with an RF transmitter, and the
intersection uses a receiver to detect its presence.
• FSM-Based Logic Control: A Finite State Machine
governs normal and emergency traffic light
sequences.
• FPGA Hardware Implementation: The traffic
controller is built on an FPGA board for real-time
responsiveness.
• VHDL Modelling and Simulation: System logic is
written and tested in VHDL, allowing accurate
simulation of traffic signal behaviours.
2. Implementation Steps
a. Case Diagram Development
Using a case diagram, we identified two primary operational
states of the system: Normal Traffic Flow and Emergency
Mode. Transition between these states is triggered by the
detection of an ambulance via RF signals. The state transitions
were mapped to model logical behaviour and later translated
into VHDL code. Figure 9: A Section of the code showing the initialization of the code.

b. LabVIEW Simulation
LabVIEW was used to simulate and validate the logic design
before hardware implementation. This involved:
• Creating a Blank VI Project.
• Building the Front Panel with interactive controls
and indicators.
• Designing the Block Diagram for logic flow based
on FSM rules.
• Utilizing the LabVIEW MakerHub for community
support and testing with BeagleBone or similar
platforms.

Figure 8: State diagram for the traffic control system. Figure 10: A Section of the code showing one normal state of the
traffic lights.

3. VHDL Coding and Development


The FSM was coded using VHDL in Notepad++. Each state
(e.g., Green, Yellow, Red, and Emergency Green) and
transition condition (e.g., RF signal detection) was clearly
Key Outcomes:
- Under normal conditions, the FSM cycles through Red →
Green → Yellow in a timed sequence for each lane.
- Upon RF signal detection (simulating ambulance presence),
the system immediately switches to “Emergency Green” for
the ambulance direction, halting all other traffic.
- After a brief delay and once the RF signal is no longer
detected, the FSM safely returns to normal operation.

IV. RESULTS

This section presents the practical outcomes of simulating and


implementing the intelligent traffic light control system
designed to prioritize emergency vehicles such as
ambulances. Using VHDL and LabVIEW on an FPGA
platform, various traffic states were tested under both normal
and emergency scenarios.

A. VHDL Code Implementation

Below is a core portion of the VHDL code showing how the


system responds when an emergency vehicle is detected. The
state transition to the emergency mode (s4, s10) halts all other
lanes and prioritizes the ambulance direction:

Figure 11: A Section of the code for when an ambulance approaches.

4. FPGA-Based Testing and Deployment

The VHDL code was deployed on an FPGA (myRIO board)


using LabVIEW. The following steps were performed:
• A new LabVIEW project was created, and the FPGA
target was added.
• VHDL code was integrated using the IP Integration
Node.
• Onboard I/O was configured: LEDs for traffic lights
and a button to simulate RF signal input.
• The FPGA VI was connected to a Real-Time VI,
where logic blocks such as Open/Close FPGA VI
Reference and Read/Write Control were linked.
• A while loop was introduced to continuously monitor
inputs and update outputs based on FSM states.
• Compilation and testing confirmed that emergency Figure 12: Core potion of the VHDL code.
states override normal cycles upon signal detection
and revert safely afterward. This logic ensures that the ambulance lane (A4) receives a
green light while all other directions remain red, allowing
5.Key Considerations in System Design uninterrupted emergency vehicle passage.

B. LED Output Visualization


Several real-world traffic control elements were factored into
the system: To support the VHDL implementation, a series of images
• Dynamic Traffic Conditions: By simulating peak were captured to visually demonstrate the real-time behaviour
hour delays and emergency interruptions. of the traffic light system across various Finite State Machine
• Safety: Ensuring that transition from normal to (FSM) states. These results highlight the system’s ability to
emergency mode doesn't endanger cross traffic. dynamically transition through standard traffic signal phases
• Scalability: The modular VHDL approach supports while effectively responding to emergency signals, such as the
future upgrades or integration of additional sensors. detection of an approaching ambulance. The LED outputs
observed during simulation and hardware testing confirm the
The system was successfully designed and simulated using accurate execution of FSM logic, illustrating the system’s
LabVIEW and implemented on an FPGA board. The VHDL responsiveness and reliability under both normal and
code accurately modeled the FSM behavior, and the emergency conditions.
LabVIEW simulation confirmed correct transitions between
normal and emergency traffic light states. Each figure below illustrates a distinct FSM state:
These images validate that the system successfully reacts to
ambulance presence by interrupting standard light sequences
and resuming safely afterward. The FPGA board’s
responsiveness, paired with precise VHDL logic, ensures real-
time signal changes without conflict at the intersection.

Traffic Control System: Advantages


• Ensure deliberate development of traffic every which
way.
• Possible reduction in delays.
• Expected decrease of mishaps, clashes guaranteeing
security.
• Arrangements for the reformist progression of traffic in
Figure 13: Initial state during normal operation as states S0, S1 and a sign framework hallway.
S2 (Red for some lanes, Green for others).
Traffic Control System: Disadvantages
• Large stop time delay.
• Increment absolute crossing point delay particularly
during off top periods.

V. Ethical Consideration

In designing and implementing a traffic control system that


prioritizes ambulance movement, it is essential to consider the
ethical responsibility of ensuring public safety and equitable
road use. The system must function reliably to avoid
introducing risks to other road users while granting
emergency vehicles priority. Testing was conducted in a
simulated environment to prevent real-world harm, and future
Figure 14: Normal traffic sequence with green light shifting to deployments would require regulatory compliance and field
Yellow as state S3. validation. The ethical goal is to preserve human life by
minimizing ambulance delays without compromising the
safety of other commuters at intersections.

VI. Conclusion

The objective of this project was to develop an intelligent


traffic light control system using VHDL and FPGA
technology, capable of identifying approaching ambulances
and adjusting signal behaviour to ensure rapid and safe
passage. Through a well-structured FSM design, LabVIEW
simulation, and successful FPGA implementation, the system
demonstrated accurate performance in both normal and
emergency conditions. It highlighted the complexity behind
what may seem like simple traffic lights, emphasizing how
much engineering is involved in ensuring public safety and
Figure 15: Emergency detection triggers override—Green is granted
to the ambulance lane as state S4 or S10.
traffic efficiency. Although the system has not yet been tested
in a real-world intersection, its simulated performance
provides a strong foundation for future practical applications.
In summary, the traffic light system designed is recommended
for deployment after real-life testing, as it successfully meets
the requirements of emergency prioritization, reliability, and
adaptability using modern digital design techniques.

II. REFERENCES

[1] V. Z. BROWN S, FUNDAMENTRALS OF DIGITAL


LOGIC WITH VHDL DESIGN, 3RD ED., NEW
YORK: MCGRAW-HILL, 2009.
Figure 16: Post-emergency state returning to regular FSM cycling [2] S. N. PRAVEEN K, "FPGA BASED INTELLIGENT
as states S0 or S1. TRAFFIC LIGHT CONTROLLER,"
INTERNATIONAL JOURNAL OF ENGINEERING
RESEARCH AND APPLICATIONS, vol. 3, no. 5, pp.
292-296, 2013.
[3] S. N. KUMAR R, "INTELLIGENT TRAFFIC
MANAGEMENT SYSTEM FOR PRIOROTISING
EMERGENCY VEHICLES IN SMART CITIES,"
INTERNATIONAL JOURNAL OF COMPUTER
APPLICATIONS, vol. 167, no. 9, pp. 12-17, 2017.
[4] Y. R. ABDALLA A. H, "EMERGENCY VEHICLE
PRIORITY SYSTEM USING RADIO FREQUENCY
IDENTIFICATION TECHNOLOGY,"
INTERNATIONAL JOURNAL OF APPLIED
ENGINEERING RESEARCH, vol. 10, no. 19, pp.
39854-39858, 2015.
[5] C. M. D. MANO M. M, DIGITAL DESIGN; WITH AN
INTRODUCTION TO A VERILOG HDL, VHDL
AND SYSTEMVERILOG, 5TH ED, BOSTON:
PEARSON, 2012.
[6] W. W, FPGA BASED SYSTEM DESIGN, NEW
JERSEY: PRENTICE HALL, 2004.
[7] A. P.J, DESIGNER'S GUIDE TO VHDL 3RD ED, SAN
FRANSISCO: MORGAN KAUFFMANN, 2008.
[8] K. J. TRAVIS J, LABVIEW FOR EVERYONE:
GRAPHICAL PROGRAMMING MADE EASY AND
FUN, NEW JERSEY: PRENTICE HALL, 2007.
[9] W. L, LABVIEW STUDENT EDITION USER
MANUAL, BOSTON: PEARSON, 2017.

You might also like