142 - DENSITY BASED TRAFFIC LIGHT - N - DC - Same PDF

Download as pdf or txt
Download as pdf or txt
You are on page 1of 7

ISSN (Print) : 2320 – 3765

ISSN (Online): 2278 – 8875

International Journal of Advanced Research in Electrical,


Electronics and Instrumentation Engineering
(An ISO 3297: 2007 Certified Organization)

Website: www.ijareeie.com

Vol. 6, Issue 3, March 2017

Density Based Traffic Light Control System


Using Image Processing
D.Prakash(1),B.Sandhya Devi(2) , R.Naveen Kumar(3), S.Thiyagarajan(4), P.Shabarinath(5)
Assistant Professor, Department of Electrical and Electronic Engineering, S.A. Engineering College, Chennai, India1
UG Scholar, Department of Electrical and Electronic Engineering, S.A. Engineering College, Chennai, India 2,3,4
Managing Director, Respro Labs, Chennai, India5

ABSTRACT: Nowadays, the number of road users constantly increases; vehicle population also increased to an extreme
level. So the traffic problem causes major time delay and more issues. So, we are in need to find better solution for traffic
control. There are several types of traffic control system; we focus on optimization of traffic light controller in a city using
image processing.
To overcome this problem, this proposed system contains camera and microcontroller to process image and measures
density of traffic and the traffic controller changes signal timing automatically based on the traffic density at junction and
the cameras are mounted on roadside respectively. This project is to design a density based dynamic traffic control system.
The number of vehicles passing on road is get counted by microcontroller. The microcontroller takes decision based on
different vehicles count, and updates the traffic light delays as a result. The traffic light is situated at a certain distance away
from the camera system. In the proposed system, we measure the traffic density using image processing by matlab and
ARM processor to control the traffic signal.

KEYWORDS: Matlab, ARM, HEX code, RISC, CISC, LPC, UND, ABT

I. INTRODUCTION

As the number of road users constantly uprighed, and resources provided by current infrastructures are not get satisfied,
intelligent control of traffic will become a very important research criteria in the future. However, some limitations to the
usage of intelligent traffic control exist. There are several models for traffic simulation; we focus on optimization of traffic
light controller using image processing and microcontroller. The traffic control system reduces possibilities of traffic
jamsbased on vehicle density calculation to an extent.

OBJECTIVE OF THE PROJECT


To successfully implement a responsive traffic signal control system prototypewhich in early stage used a beagle board and
ARM CORTEX8. In the proposed system, we measure the traffic density using image processing by matlab and ARM
processor to control the traffic signal.

Copyright to IJAREEIE DOI:10.15662/IJAREEIE.2017.0603142 1994


ISSN (Print) : 2320 – 3765
ISSN (Online): 2278 – 8875

International Journal of Advanced Research in Electrical,


Electronics and Instrumentation Engineering
(An ISO 3297: 2007 Certified Organization)

Website: www.ijareeie.com

Vol. 6, Issue 3, March 2017

II. GENERAL BLOCK DIAGRAM

OVERALL BLOCK DIAGRAM

Figure 1 Flow of operation

BLOCK DIAGRAMDESCRIPTION
The Figure 1 shows the flow of operation of vehicle detection and counting vehicles and vehicle density from an image
using matlab and ARM development board and LPC 2148 microcontroller pre-doctered images are processed in matlab and
its density is calculated. A microcontroller, LPC2148 ARM processor is used to control the traffic signal. The road density
data of four roads was sent to arm processor and corresponding road signal with highest road density signals green colour.

III.SIMULATION DESCRIPTION

MATLAB CODE
MATLAB is a software package for computation in engineering, science, and applied mathematics. It offers a powerful
programming language, with a wide range of expert knowledge and excellent graphics. MATLAB is published by and a
trademark of The Math WorksInc .The focus in MATLAB is on computation, not mathematics, Symbolic expressions and
manipulations are not possible.The pre-doctered image is fed to matlab and is converted into a readable matrix data using
“imread” command in Matlab
i.imread
Syntax

A = imread(filename, fmt)

The text string fmt specifies the format of the file by its standard file extension. . If imread cannot find a file named
filename, it looks for a file named filename.fmt.
To see a list of supported formats, with their file extensions, use the imformats function

Copyright to IJAREEIE DOI:10.15662/IJAREEIE.2017.0603142 1995


ISSN (Print) : 2320 – 3765
ISSN (Online): 2278 – 8875

International Journal of Advanced Research in Electrical,


Electronics and Instrumentation Engineering
(An ISO 3297: 2007 Certified Organization)

Website: www.ijareeie.com

Vol. 6, Issue 3, March 2017

Figure 2 RGB2gray

The Figure 2 shows the Conversion of RGB image or colourmap to Gray scale

IV. HARDWARE DESCRIPTION

POWER SUPPLY
There are many types of power supply. Probably most of them are designed to convert high voltage to low DC voltage
supply for electronic circuits. A power supply can by broken down into a series of blocks, each of which performs a
particular function.

Figure3Regulated power supply system

Each of the blocks in Figure 3 is described in more detail below:


Transformer - steps down high voltage AC mains to low voltage AC.
Rectifier - converts AC to DC, but the DC output is varying.
Smoothing - the DC from varying greatly to a small ripple gets smoothes.
Regulator - eliminates ripple by setting DC output to a fixed voltage.

Figure 4 Regulated D.C Supply

Copyright to IJAREEIE DOI:10.15662/IJAREEIE.2017.0603142 1996


ISSN (Print) : 2320 – 3765
ISSN (Online): 2278 – 8875

International Journal of Advanced Research in Electrical,


Electronics and Instrumentation Engineering
(An ISO 3297: 2007 Certified Organization)

Website: www.ijareeie.com

Vol. 6, Issue 3, March 2017

The secondary output of transformer is connected to regulator through full bridge rectifier and filtering capacitor. Diode is
used for convert the AC voltage to DC voltage with AC ripples; capacitor is used for remove the AC ripples. Regulator
output is regulating the DC output voltage. The Figure 3.2 gives the regulated supply.

THE ARM ARCHITECTURE


The ARM architecture is a 32-bit. Because of their power saving features, ARM CPUs are dominant in the mobile
electronics market, where low power consumption is a critical design goal.
ARM Limited has incorporated a novel mechanism, called the Thumb architecture. The Thumb instruction set is a 16-
bit compressed form of the original 32-bit ARM instruction set, and employs dynamic decompression hardware in the
instruction pipeline.

ARM Limited has incorporated a novel mechanism, called the Thumb architecture. The Thumb instruction set is a
16-bit compressed form of the original 32-bit ARM instruction set, and hardware in the instruction pipeline gets employs
dynamic decompression.

Figure 5 ARM development board

The ARM architecture is based on Reduced Instruction Set Computer (RISC) principles. The instruction set of RISC and
related decode mechanism are much simpler than those of Complex Instruction Set Computer (CISC) designs. 32-bit ARM
instruction set for maximum flexibilityand performance
16-bit Thumb instruction set for increased code density

Registers
ARM processors have 37 registers. The registers of ARM processor are arranged in a criteria of partially overlapping
banks. There is a different register bank for each processor mode.
i. 30 general-purpose, 32-bit registers (GPR)
ii. The program counter (PC)
iii. The Current Program Status Register (CPSR)
i.Five Saved Program Status Registers (SPSR).
The general-purpose registers R0 to R15 can be split into three groups.

ARM Processor Modes


User Mode, System Mode, Exception Mode, Fast Interrupt Mode (FIQ), Interrupt Mode (IRQ), Undefined Mode (UND),
Abort Mode (ABT):

Copyright to IJAREEIE DOI:10.15662/IJAREEIE.2017.0603142 1997


ISSN (Print) : 2320 – 3765
ISSN (Online): 2278 – 8875

International Journal of Advanced Research in Electrical,


Electronics and Instrumentation Engineering
(An ISO 3297: 2007 Certified Organization)

Website: www.ijareeie.com

Vol. 6, Issue 3, March 2017

Pipelining
Pipelining, a standard feature in RISC processors, is much like an assembly line. Because the processor workstart the same
time on different steps of the instruction, more instructions can be executed in a shorter period of time.
The original 3-stage ARM pipeline in Figure 3.4 is give that remained essentially unchanged from the first ARM
processor.It is a classical fetch-decode-execute pipeline, which completes one instruction per cycle. Instruction cycle
consists of the operations such as
1. Instruction fetched from memory
2. Decoding of registers used in instruction
Register(s) read from register bank, Shift and ALU operation, Write register(s) back to register bank

3-Stage
Pipelining

Figure 6 stage Pipelining

LPC2148 MICROCONTROLLER
Philips has developed a family of ARM-based Microcontrollers
For the purpose of low –cost high volume applications with
Embedded Flash and SRAM,
On-board AMBA-bus Peripherals (Advanced Microcontroller Bus Architecture)
Real-Time Deterministic behavior (no Cache required)
Full Debug, Real-time Monitoring and Trace facilities
The LPC2148 can count external events on one of the capture inputs if the minimum external pulse is equal orlonger than a
period of the PCLK. In this configuration, unused capture lines can be selected as regulator timer capture inputs

SPI serial I/O controller:


The LPC2148 contains one SPI controller. The SPI is a serial interface with full duplex, designed to handle multiple
masters and slaves connected to a given bus.

SSP serial I/O controller:


The LPC2148 contains one SSP.It can interact with multiple masters and slaves on the bus. However, during a given data
transfer only a single master and a single slave can communicate on the bus. The SSP supports full duplex transfers, with
data frames of 4 bits to 16 bits of data flowing from the slave to the master from the master to the slave and. Often only one
of these data flows carries meaningful data.

10-bit ADC:
The LPC2148 contains two analog to digital converters. While ADC0 has six channels, ADC1 has eight channels.
Therefore, total number of available ADC inputs for is 14.

10-bit DAC:
The maximum DAC output voltage is the VREF voltage. The features include 10-bit DAC,Buffered output.

Copyright to IJAREEIE DOI:10.15662/IJAREEIE.2017.0603142 1998


ISSN (Print) : 2320 – 3765
ISSN (Online): 2278 – 8875

International Journal of Advanced Research in Electrical,


Electronics and Instrumentation Engineering
(An ISO 3297: 2007 Certified Organization)

Website: www.ijareeie.com

Vol. 6, Issue 3, March 2017

Watchdog timer:
The purpose of the watchdog is to reset the microcontroller for a reasonable time if it enters an erroneous state. When
enabled, the system reset by watchdog will generate a if the user program fails to ‘feed’ (or reload) the watchdog within a
predetermined amount of time.

Real-time clock:
The RTC real time clock is well designed to provide a set of counters to measure time when normal or idle operating mode
is selected.

Memory Organization
The ARM7TDMI-S has Von Neumann architecture, carrying both instructions and data with a single 32-bit data bus. Only
load, store, and swap instructions can access data from memory. Data can be 8-bit bytes, 16-bit half words, or 32-bit words.
Words must be aligned to 4-byte boundaries. Half words must be aligned to 2-byte boundaries.
The LPC2148 incorporates several distinct memory regions, shown in the following figures. The basic concept on the
LPC2148 is that each memory area has a "natural" location in the memory map. The bulk of each memory space remains
permanently fixed in the same location, eliminating the need to have portions of the code designed to run in different
address ranges.

Serial communication
It is the way that enables the different equipments to communicate to the outside world. It is called Serial because
the data bits will be sent in a serial way over a single line

V. MODELLING OF THE PROTOTYPE

A Prototype Implementation
The prototype consist of several components such as the ARM development board, traffic signal, camera, sensors. The
ARMdevelopmentboard consist of LPC2148 microcontroller which plays a major role. The traffic signal has a junction with
the necessary component.
The first main component is the video camera sensor. It captures the images of traffic condition at every intersection of each
lane. The next component is the traffic engine.

Figure 8The Hardware Model

The Figure 8 shows the hardware prototype. The simulation is thus obtained from MATLAB. The LED’s in the traffic
signal glow according to the vehicles lined up in the intersection. The color image, gray scale image and the black and
white image is given in matrix form.

Copyright to IJAREEIE DOI:10.15662/IJAREEIE.2017.0603142 1999


ISSN (Print) : 2320 – 3765
ISSN (Online): 2278 – 8875

International Journal of Advanced Research in Electrical,


Electronics and Instrumentation Engineering
(An ISO 3297: 2007 Certified Organization)

Website: www.ijareeie.com

Vol. 6, Issue 3, March 2017

VI. SIMULATION RESULTS

IMAGE CONVERSION CHART.

Figure 9Vehicle object extraction

The image conversion chart is shown in figure 9.The color image is converted to the gray scale image,which is then
converted tothe black and white image.

VII.CONCLUSION

The method of vehicle detection and counting from an image has been implemented using matlab and ARM development
board and LPC 2148 microcontroller pre-doctored images were processed in matlab and its density was calculated.
A microcontroller, LPC2148 ARM processor was used to control the traffic signal. The road density data of four roads was
sent to arm processor and corresponding road signal with highest road density signals green colour. The accuracy of vehicle
detection depends on the weather conditions.
Further modification in the algorithm can improve the system accuracy.ARM7 TDMI processor is used because of its fast
processing power.so the hardware capability is enhanced.

FUTURE SCOPE

To realize the dream of developed India, we must have smart cities. To have smart cities, a smart commuting system must
be implemented. We look forward to develop and implement this in the near future.
The future scope of this project lies in successful implementation of real time control system with the help of guidance from
public transport authorities.System accuracy ispossible to be improved by further training or othermodification on the
algorithm.

REFERENCES

[1] CelilOzkurt “Automatic Traffic Density Estimation And Vehicle Classification For Traffic Surveillance Systems Using Neural Networks.
Mathematical and Computational Applications,” Vol. 14, No. 3, pp. 187- 196, 2009.
[2] Ronan O’Malley “Rear-Lamp Vehicle Detection and Tracking in Low- Exposure Color Video for Night Conditions”. IEEE Transactions on
Intelligent Transportation Systems, Vol. 11, No. 2, June 2010
[3] WisnuJatmiko,,“Detection and Counting of Vehicles Based on Video Processing In Distributed Traffic System”, International Conference on Advance
Computer Science and Information System 2010.
[4]EhsanAzimirad, NaserPariz, and M. BagherNaghibi Sistani.“A Novel Fuzzy Model and Control of Single Intersection at Urban Traffic Network”. IEEE
Systems Journal, VOL. 4, NO. 1, MARCH 2010.
[5]W. Jatmiko,Hariyadi, F., Krisnadhi, A. A., Takagawa, I., Sekiyama, K., &Fukuda,ng Self-Organizing Urban Traffic Control Architecture Signal
Control System And Simulator. “International Journal on Smart Sensing and Intelligent Systems” September 2010.
[6]WisnuJatmiko,Krisnadhi,A.A.,Takagawa,I.,“Enhanced Distributed Traffic Control with Swarm-Self Organizing Map in Jakarta based on Traffic Signal
Phasing”, International Conference on Advance Computer Science and Information System 2010.

Copyright to IJAREEIE DOI:10.15662/IJAREEIE.2017.0603142 2000

You might also like