Using A PicoBlaze Processor To Traffic Light Control
Using A PicoBlaze Processor To Traffic Light Control
Abstract: This paper discusses the development of a complex device for Traffic
Light Control. The device is based on a PicoBlaze microprocessor embedded in
Spartan6 FPGA. Its benefits for the purposes of transport flows management are
discussed.
Keywords: Traffic Light Control, embedded microprocessors, FPGA.
1. Introduction
For each country the road transport plays a significant role. It performs
approximately 80% of the cargo and 75% of the passenger flow annually. The
organization and regulation based on the Traffic Light Control Systems (TLCS).
have played an important role for enhancing the efficiency of the traffic flows over
the street-road networks in the cities. This contributes to optimization of the road
transport, reducing the fuel consumption, the traffic incidents and the level of
harmful gases.
There are different kinds of TLCS. They can be classified by the size, shape,
number and parameters of the lights, by the technology for light generating, by the
place and manner of installation, the presence or not of additional
electromechanical signaling devices, types of users, to which they are related to,
behaviour of the traffic lights during the day and night, behaviour in case of central
power off and many other parameters. One of the most common TLCS intended for
non-rail vehicles, such as motorcycles, cars, buses, trucks, etc., have three vertical
131
sections. The red section is located at the top, the yellow is in the middle, and the
green section is located below.
The traffic lights for pedestrians usually have only two sections: red and green.
They can depict human figures or have luminous or mobile inscriptions like “Go”
(Walk) and “Stop” (Do not walk). Some of the modern pedestrian traffic lights can
be combined with electronic clocks showing in seconds the time remaining to
switch the signal off. The walkways are also labeled by three horizontal sections
with an yellow or orange light and depict the moving pedestrian crossing the road.
The trams of the public city transport have their own TLCS. They are
synchronized properly with the other traffic lights, but not regulated by
international agreements, and as a result, in different countries they vary
considerably.
There are also mobile TLCS, with their own battery and/or photovoltaic
power. They are used for temporary diversion of the traffic in cases when road
works might occur. Most of the TLCS use conventional or special incandescent
bulbs with power from 60 up to 100 W. Depending on the circumstances and
conditions they can be combined with reflectors, lenses, filters and hoods.
In order to achieve good performance of the light and energetic indicators, the
contemporary TLCS are designed on LED lamps. They guarantee at least ten times
energy saving, high brightness, smooth adjustment of its light intensity in a large
range, very good focusing of the emitted light and resistance to shocks and
vibrations. According to the manufacturers, the resource of 3-8 candela LED is not
less than 200 000 hours which means reliable operation for 20 years.
The LEDs are environmentally friendly, have high performance and small
dimensions. The absence of overheating allows constructing of matrix light sources
suitable for TLCS [6]. These kinds of light sources allow constant brightness
perceiving at large distances that cannot be said for TLCS with a central source [9].
As a common rule, the control of the contemporary TLCS is built on the base
of a microcontroller or microprocessor. A great disadvantage for most of them
becomes the impossibility to be modified on real time basis. This follows from the
use of pre-defined hardware and a hard written program. They have an apriori fixed
timing for green, yellow and red signals, which in practice means a longer waiting
time and more fuel uses by the vehicles [10].
To make the traffic light controlling more efficient, the TLCS must obtain
some elements of intelligence. Such kind of TLCS forms the class of the so called
Intelligent Traffic Light Control Systems (ITLCS). When ITLCS are applied for the
control of traffic light signals, they usually contain a set of controllers and sensors,
communication systems, adaptive control systems, traffic responsive, real-time data
collection and analysis, and maintenance management systems [11]. ITLCS have
the capability to share traffic signal and operational data with other systems.
The presence of an adaptive signal system is intended to improve the
responsiveness of the signal timing, when the traffic conditions are rapidly changed.
The communication and sensor networks enable the use of technologies that
allow the adaptive signal control to be realized.
132
Their use in traffic control systems permits the achievement of greater
efficiency of operation, improvement of the performance of the traffic flow systems
and enables the process of automated monitoring of the equipment failures. ITLCS
technology enables the process of traffic signal timing to be performed more
efficiently by enhancing the data collection and system monitoring capabilities.
ITLCS tools, such as automated traffic data collection, centrally controlled or
monitored traffic signal systems, closed loop signal systems, interconnected traffic
signals and traffic adaptive signal control, help to make the traffic signal timing
process more efficient, decrease the vehicle operating costs, provide motorists with
recognizable improvements in the travel time and reduce the vehicle emissions.
As pointed in [9], the use of ITLCS in Texas shows reductions of 24.6% in the
delay, 9.1% in the fuel consumption, and 14.2% in the stops. In California ITLCS
for Fuel Efficient Traffic Signal Management program showed reductions of 14%
in the delay, 8% in the fuel consumption, 13% in the stops, and 8% in the travel
time. Such a system used for improvements to an 11-intersection arterial in St.
Augustine, Florida, showed reductions of 36% in the arterial delay, 49% in the
arterial stops, and 10% in the travel time, resulting in an annual fuel savings of
26 000 gallons.
133
Fig. 1. Typical representation of a trivial cross road
134
Fig. 2. Block diagram of the developed SOA based ITLCS
The aim of SOA traffic queue devices is intended to look for the traffic queue
situations in 4 directions. Since the time interval of the traffic lights switching is
long enough, there are no problems to recognize and to classify any traffic
situations according to apriori given rules in several groups in real time.
The main role of the SOA communication device is focused to maintain the
data transmission and receiving to or from other neighborhoods of ITLCS, or with
the system forming a higher level of hierarchy. Here, the volume of information to
be exchanged does not overcome several Kbits, the baud rate of 115 k permits the
real time mode to take also place.
The information from both SOA is fed to the main one. Based on the supplied
information and in conjunction with the implemented algorithm, the main SOA
makes a decision for the order and time interval of switching of the traffic lights in
real time too.
As a basis for the development and physical realization of the different SOA
modules, the Xilinx Spartan6 FPGA devices are used. They are realized as
separated software generated embedded PicoBlaze based microprocessors, which
use a common 100 MHz clock, which allows the realization and achievement of
increased functionality of the traffic flows management.
The contemporary FPGA devices contain millions of logic cells and thousands
of bits of memory, which materialize their versatility [10]. They have high
performance and very low power consumption; allowed parallel task processing and
on the fly reconfiguration of the interior design of the system. They comply with the
international standards for military and aerospace systems, which define them as an
optimal element base for the development of fail-safe systems for any critical
application within a single crystal [5].
In order to create the modern ITLCS, the project been decrypted is based on a
high-performance software generated by 8-bit RISC PicoBlaze processor.
PicoBlaze uses the internal FPGA structure in the best way. Its core is considered as
one of the most successful answers of the modern trends in building the software
implemented embedded processors. It requires significantly less resources
compared to any other embedded microprocessors. The architecture of PicoBlaze
allows full access to all hardware features of the chip. It is also possible multiple
copies of the PicoBlaze architecture to be incorporated in the structure of a single
FPGA device. PicoBlaze appears to be the only processor whose use dominates in
the implementation of parallel algorithms within one FPGA device and the
development of SoC. Due to this it can be used as a basic building block in the
construction of multiprocessor systems.
135
PicoBlaze was developed by K e n C h a p m a n [2]. The structural diagram of
the processor is shown in Fig. 3 [3]. It contains two banks of 8 bit general-purpose
registers. The number of registers in each bank is 16 and they are fully equivalent.
None of them is devoted to special purposes and does not have priority over the
others. By default, the size of the program memory of the microprocessor is
consistent with the structure of the FPGA block memory device and does not
exceed 4k 18 bit words. PicoBlaze has a Scratchpad RAM, the size of which can
take values up to 256 bytes. PicoBlaze supports up to 256 input and 256 output
ports. By them it can be connected to a special interface or other logic inside or
outside the FPGA. PicoBlaze is distributed as a VHDL file free. Its core requires
the least resources for implementation (96 slices for mounting in Spartan-3 [4] and
26 slices for mounting in Spartan-6, Vertex, and 7 Series [3]). The performance of
PicoBlaze is within 44 MIPS and over 200 MIPS when it is built in Spartan-3 and
in Virtex and Seria 7 respectively. The reliability of PicoBlaze is determined by a
FPGA device [5]. This permits its use as the basis for information control system
development.
136
• Operation of the traffic lights in a flashing mode for a selected time
interval.
• Inclusion of the street lighting in the dark hours of the day.
• Manual control of traffic lights failures of its individual sections.
• Management movement and illumination of the walkway.
• Management System horn
Ability to exchange information to and from other devices at a higher
hierarchical level.
It has the ability to control up to 24 power output channels, support a
maintenance calendar and time. It has the ability for direct information exchange
with external PC.
The device is implemented based on FPGA device Spartan6XL4. The internal
structure of the developed SOA device is shown in Fig. 4.
The structural diagram of the developed SOA that performs the duties of a
communication device becomes also simple and classic. It consists of a control unit
and communication bridges. It uses two classical bridges UART and SPI. They are
intended to exchange information with other TLCS or with devices from higher
levels of hierarchy. By default, the UART baud rate is fixed at 115Kb/sec but in
general it can be set to any standard speed from 100 up to 900Kb/sec. The internal
structure of this SOA device is shown in Fig. 5.
Apart from the UART which becomes a hardware engine, the SPI bridge of
the communication SOA based device is realized in a software manner. In case of
the use of 100 MHz system clock, the SPI Bridge offers a speed of 3.5 Mb/s.
137
Fig. 5. Structure of the communication device
The structure of the last SOA module implemented in the design of this ITLCS
intended to look for the traffic queue is also simple and depends on the algorithm
used for recognition of the traffic situation. The flow of the information among
different modules is realized using a register file, mapped on the input/output
address map of the main SOA module.
The developed ITLCS device is designed for a 24/7 mode of work at a
temperature range from 0 up to 50 ºC. It is powered by 220 V AC main. To ensure
continuous operation, an opportunity to add a battery is provided.
4. Conclusion
The intensity of the traffic flows in the street-road networks of cities is constantly
amended, which requires their operational management through traffic and
information systems. In this aspect, the developed device management traffic flows
with increased functionality based on an embedded PicoBlaze microprocessor
helps to improve the conditions for movement of the vehicles, decrease of the fuel
consumption and the level of harmful gases. Device capabilities to manage the
traffic conditions on walkways minimize the probability for accidents occurring on
them. Its implementation within a FPGA device allows realizing of parallel control
algorithms. The use of embedded processors opens the way for information
exchange in various modes of transport and the formation of automated traffic
management in road and rail transport.
138
Acknowledgements: The paper is partially supported by FP7 Project 316087 ACOMIN-“Advance
Computing and Innovation” and COST TU1102.
References
1. M a n d l o i, A., et al. High Level Modelling of Realtime Traffic Light Controller. –
International Journal of Engineering Science and Technology (IJEST), Vol. 4, December
2012, No 12.
2. C h a p m a n, K. PicoBlaze 8-Bit Microcontroller for Virtex Devices. XAPP213, 2002.
3. C h a p m a n, K. KCPSM6 Relies 7.
www.xilinx.com
4. C h a p m a n, K. KCPSM3 for Spartan 3. Reference Design Xilinx Ltd, October 2003.
5. Device Reliability Report UG116, November 2013.
www.xilinx.com
6. L u i s o v, A.V. Eye and Light. Energoatomizdat, Leningrad, 1983 (In Russian).
7. F a i n, V. S. Pattern Recognition and Machine Understanding of Natural Language. Moscow,
Science, 1987 (In Russian).
8. S r i n i v a s, K. Implementation of FPGA in the Design of Embedded Systems Highway Traffic
Light Controller. National Institute of Technology, Rourkela, May 2007.
9. Physical Encyclopedia in 5 Volumes. Moscow, Soviet Encyclopedia, 1983 (In Russian).
10. R o y e r, M., M. Goode. FPGA to ASIC Migration. – Integrated Systems Design Magazine,
November, 2000.
11. S t o i l o v a, K., T. S t o i l o v. Traffic Noise and Traffic Light Control. – International Journal
of Transportation Research, Part D, Vol. 3, 1998, No 6, 399-417.
12. xilinx.com/t5/PicoBlaze/PicoBlaze.doc
13. www.microchip.com
14. www.analog.com
139