department of electrical & electronic...

31
Traffic Light Controller Department of Electrical & Department of Electrical & Electronic Engineering Electronic Engineering Tiong Tiong Bing Bing Yuhao Yuhao Huang Huang Supervisor: Dr. Waleed H. Abdulla Supervisor: Dr. Waleed H. Abdulla

Upload: others

Post on 21-Jul-2020

1 views

Category:

Documents


0 download

TRANSCRIPT

Traffic Light Controller

Department of Electrical & Department of Electrical & Electronic EngineeringElectronic Engineering

TiongTiong BingBing YuhaoYuhao HuangHuang

Supervisor: Dr. Waleed H. AbdullaSupervisor: Dr. Waleed H. Abdulla

Project Goals

Design an independent traffic light controller.Design an independent traffic light controller.

Implement network coordinationImplement network coordination

Design of central controllerDesign of central controller

System Overview

Local intersection controller 2

Local Transmit and Receive unit

Local intersection controller 1

Local Transmit and Receive unit

Central Transmit and Receive unitPC

Local intersection controller

Local Transmit and Receive unit

Traffic Control Schemes

PrePre--TimedTimed

Vehicle ActuatedVehicle Actuated

Coordinated NetworkCoordinated Network

Serial Communication

RS-232interface

Signaldrive

Signalinversionand pull

up

Transmittermodule

Receivermodule

+/- 5 V+/- 3.5 V

due to voltageswing +/- 5V

Signaldirve

Signalinversionand pull

up

MAX232 moduleMAX232 module

Central Transmit and Receive Unit

Serial interfaceSerial interface

Communication Communication devices. devices. (RF modules)(RF modules)

Communication Techniques

(a) ASK

(b) FSK

1 0 1

(c) Binary signal

Amplitude Shift KeyingAmplitude Shift Keying

Frequency Shift KeyingFrequency Shift Keying

ASK Scheme

Transmission

TWS-434Transmitter

Reception

RWS-434Receiver

TWSTWS--343 and RWS343 and RWS--434 434

Micro-processor M16

87 I/O ports87 I/O ports

5 UART channels for serial communication5 UART channels for serial communication

Technical supportTechnical support

Case Study

Phase DiagramPhase Group A B C D1 OFF GAN OFF OFF2 R R GAR R3 GAR R R R4 R R GAR R5 SGGA SGAR R R6 SOFF GAR R R7 SGAR OFF OFF OFF8 R/OFF R/OFF R/OFF GR

A preceding S means some form of special control of signal group.

GAR – Green Amber Red GAN – Green Amber OffR – Red R/OFF – Red or Off

Start Phase : APhase sequences: BACD

INTERSECTION LAYOUT

5

8

8 7

8

8

1

3

2

8

6

4

N

2

1

73

Layout Info:

Phase Groups: 2

1 73

5 6

4

4

Vehicle Sensors:

5 6

MT.

ED

EN

STOKES ROAD

ESSEX ROAD

1

5

2

6

3

7

4

8

8Pedestrian

Control Box

The Developed System

Master controllerMaster controller

Two local intersection Two local intersection controllerscontrollers

Software Interface

Traffic control Traffic control schemes.schemes.

Intersection Intersection feedbacks.feedbacks.

Communication Protocol Between GUI – Local Controllers

Error control (maintain data integrity)Error control (maintain data integrity)

Access control (eliminates data collision)Access control (eliminates data collision)

Protocol Basics

Error Control : Checking digits on data Error Control : Checking digits on data packet.packet.

Parity bit & block sum check : Can only Parity bit & block sum check : Can only detect single bit errors.detect single bit errors.

CRC : Cyclic Redundancy check, capable CRC : Cyclic Redundancy check, capable of detecting burst errors.of detecting burst errors.

Protocol Basics (continue..)

Access Control : Allocate link usage to the Access Control : Allocate link usage to the communicating parties.communicating parties.

Token access control : Circulate data Token access control : Circulate data transmission token to eliminate data transmission token to eliminate data collisionscollisions

Token passing: operation principles

Data Transmission Equipment A

Token

Data Transmission Equipment B

DTE A wishes to send a data to the DTE B, it must first wait for the receipt of the control token.

Token passing: operation principles

Data Transmission Equipment A

Data Transmission Equipment B

Token

On receipt of the token, DTE A initiated transmission of the frame and then passes the token to DTE B.

Token passedwith data-frame

Token

Token passing: operation principles

Data Transmission Equipment A

Data Transmission Equipment B

Token

DTE B has the token and therefore able to reply to DTE A.

Token passing: operation principles

Data Transmission Equipment A

Data Transmission Equipment B

Token

Token passedback to DTE A

Token

On receipt of the token, DTE B initiated transmission of the frame and then passes the token to DTE A.

Token passing: operation principles

Data Transmission Equipment A

Data Transmission Equipment B

The process repeats itself whenever a data frame is successfully passed between the two communicating parties.

Token

GUI-Local Controllers Protocol

Idle RQ ( idle repeat request )Idle RQ ( idle repeat request )Wait for acknowledgements from last Wait for acknowledgements from last transmissions before sending another transmissions before sending another frame.frame.

Token access controlToken access controlEnforce one party transmission rule.Enforce one party transmission rule.

Protocols Data FormatSender

End of message

Sender address

Receiver identification

number

Action/Data

Error control message

Receiver

Start of message

Sender

End of message

Sender address

Receiver identification

number

ACK

Error control message

Receiver

Start of message

Sender

End of message

Sender address

Receiver identification

number

NAK

Error control message

Receiver

Start of message

Data_FlowFrame_size

a) Data frame b) acknowledgementframe

c) negativeacknowledgement frame

The Local Controller

Local transmit and receive Local transmit and receive unit,unit,

I/O ports and,I/O ports and,

MCU (microMCU (micro--controller.controller.

MCU software implementation

Recognizing control commands.Recognizing control commands.

Manages control of traffic signal. Manages control of traffic signal.

Reporting intersection status.Reporting intersection status.

Program Hierarchy

Data transmission.Data reception.

CommunicationInterrupts Modules

Vehicle sensors.Pedestrian button.

SensorInterrupts Modules

Countdown periodfor red, amber and green.

TimerInterrupts Modules

Main ProgramSignal control schemes

Data transmission.Data reception.

CommunicationInterrupts Modules

Vehicle sensors.Pedestrian button.

SensorInterrupts Modules

Countdown periodfor red, amber and green.

TimerInterrupts Modules

Main ProgramSignal control schemes

Signal Control Method

Phase Dpedestrian

Phase B

Phase A

Phase C

Phase Time Expired

Phase Time Expired

Phase Time ExpiredPhase Time Expired

Walk Requested

Starts control

Phas

e Ti

me

Expi

red

Wal

k N

ot R

eque

sted

GroupSignalGreen

Phase Begin

GroupSignalAmber

Green Time Expired

Amber Time ExpiredGroupSignalRed

Phase Terminate

Red

Tim

e Ex

pire

d

Testing of the system

Communication range 45cm, with the miniature Communication range 45cm, with the miniature model intersection.model intersection.

Reliable data communication between the local Reliable data communication between the local controllers and the GUI master modules. controllers and the GUI master modules.

Limitations

Operating range and, (1Operating range and, (1--3 meters with line 3 meters with line of sight)of sight)

Speed of the communication devices. (3000 Speed of the communication devices. (3000 bits per second or 300 bytes per seconds)bits per second or 300 bytes per seconds)

Future Improvements

Network class protocols.Network class protocols.

Better data transmission devices.Better data transmission devices.

Sophisticated software interface for the Sophisticated software interface for the local controllers.local controllers.

Conclusions

An independent Traffic light controller An independent Traffic light controller based on the case study.based on the case study.

Final traffic control system is fully Final traffic control system is fully operational.operational.

Main project objectives are achieved.Main project objectives are achieved.