Sei sulla pagina 1di 52

Rail Component Detection, Optimization, and

Assessment for Automatic Rail Track Inspection


Abstract:
In this paper, we present a real-time automatic vision-based rail inspection system, which
performs inspections at 16 km/h with a frame rate of 20 fps. The system robustly detects
important rail components such as ties, tie plates, and anchors, with high accuracy and efficiency.
To achieve this goal, we first develop a set of image and video analytics and then propose a novel
global optimization framework to combine evidence from multiple cameras, Global Positioning
System, and distance measurement instrument to further improve the detection performance.
Moreover, as the anchor is an important type of rail fastener, we have thus advanced the effort to
detect anchor exceptions, which includes assessing the anchor conditions at the tie level and
identifying anchor pattern exceptions at the compliance level.
Existing system

Proposed system

Now a days crack detection in the railway In the advanced system, the robot is designed
track work is done by mankind

to detect the fault of railway track components


in the railway track with the help web camera.
These fault information and fault location is
send to the control station using GSM and GPS
technology.

Drawbacks existing system:

Advantages existing system:

Chances of human error.

Point out the exact location

Possibilities for fail to spot the location.

Low cost

More time consumed for complete the

Easy to avoid major accident

work
Low accuracy

High accuracy
Reduced human interference
High efficiency

Working principle:
In this proposed system, we can use web camera to detect the crack in the Railway track.
Here Web camera, GSM, GPS, LCDand 2 AXIS robotsare interfaced with ARM7
microcontroller.The web camera is fixed in robot. The robot is automatically moved on the
railway track. The web camera continuously captures the Rail way track images and then the
captured images are processed using MATLAB process. If any railway track component fault is
captured by this camera, using MATLAB process microcontroller gets the crack information.
Immediately controller gets that crack location using GPS. Themicrocontroller sends this crack
and location information to the control station. The LCD is used to display the current status of
this system.

Block diagram:
Power Supply

Recognition

Authentication MAX 232

ARM7
LPC2129

MAX 232

GSM

GPS

Processing
LCD

Driver circuit 2 AxisRobots

Hardware Used:
2 axis Robot Mechanism
ARM7 LPC2129
Web camera
Driver circuit
LCD
GSM modem
GPS
MAX232

Software Used:
Keil compiler
Embedded C
Matlab

Application:
It can be used in railways.

CHAPTER-1

DESCRIPTION AND FABRICATION OF COMPONENT


POWER SUPPLY:
Power supply block consists of following units:
Step down transformer.
Bridge rectifier circuit.
Input filter.
Voltage regulators.
Output filter.
Indicator unit.

STEP DOWN TRANSFORMER:


The step-down transformer is used to step down the supply voltage of 230v ac from
mains to lower values, as the various ICs used in this project require reduced voltages. The
transformer consists of primary and secondary coils.
To reduce or step down the voltage, the transformer is designed to contain less number of
turns in its secondary core. The outputs from the secondary coil which is center tapped are the ac
values of 0v, 15v and 15v. The conversion of these ac values to dc values to dc values is done
using the full wave rectifier unit.

RECTIFIER UNIT:
A diode bridge is an arrangement of four diodes connected in a bridge circuit. That
provides the polarity of output voltage of any polarity of the input voltage. When used in its most
common application, for conversion of alternating current (A.C) input into direct current (D.C)
output, it is known as a bridge rectifier.
The diagram describes a diode-bridge design known as a full wave rectifier. This design
can be used to rectify single phase A.C. when no transformer center tap is available. A bridge
rectifier makes use of four diodes in a bridge arrangement to achieve full wave rectification. This

is a widely used configuration, both with individual diodes wired as shown and with single
component bridges where the diode bridge is wired internally.
For both positive and negative swings of the transformer, there is a forward path through
the diode bridge. Both conduction paths cause current to flow in the same direction through the
load resister, accomplishing full-wave rectification. While one set of diodes is forward biased,
the other set is reversing biased and effectively eliminated from the circuit.

INPUT FILTER:
Capacitors are used as filters. The ripples from the dc voltages are removed and pure dc
voltage is obtained. The primary action performed by capacitor is charging and discharging. It
charges in positive half cycle of the ac voltage and it will discharge in negative half cycle. So it
allows only ac voltage and does not allow the dc voltage. This filter is fixed before the regulator.
Capacitors used here are of the value 1000uF.

REGULATOR UNIT:
Regulator regulates the output voltage to a specific value.

The output voltage is

maintained irrespective of the fluctuations in the input dc voltage. Whenever there are any ac
voltage fluctuations, the dc voltage also changes, and to avoid this regulators are used.

REGULATORS CAN BE CLASSIFIED AS:


1. Positive regulator, which regulates the positive voltage(7805,7812)

1. > input pin


2. > ground pin
3. > output pin

2. Negative regulator, which regulates the negative voltage (7912).


1. > ground pin
2. > input pin
3. > output pin

Regulators used in this application are: 7805 which provides 5v dc


7812 which provides 12v dc
7912 which provides -121v dc

OUTPUT FILTER:
This filter is fixed after the Regulator circuit to filter any of the possibly found ripples in
the output received finally. Capacitors used here are of value 10F.

POWER SUPPLY CIRCUIT DIAGRAM:

CHAPTER-2

LPC2129 ARM CONTROLLER


The LPC2109/2119/2129 are based on a 16/32-bit ARM7TDMI-S CPU with real-time
emulation and embedded trace support, together with 64/128/256 kB of embedded high-speed
flash memory. A 128-bit wide memory interface and a unique accelerator architecture enable 32bit code execution at maximum clock rate. For critical code size applications, the alternative 16bit Thumb mode reduces code by more than 30 % with minimal performance penalty. With their
compact 64-pin package, low power consumption, various 32-bit timers, 4-channel 10-bit ADC,
two advanced CAN channels, PWM channels and 46 fast GPIO lines with up to nine external
interrupt pins these microcontrollers are particularly suitable for automotive and industrial
control applications, as well as medical systems and fault-tolerant maintenance buses. With a
wide range of additional serial communications interfaces, they are also suited for
communication gateways and protocol converters as well as many other general-purpose
applications.
Remark: Throughout the data sheet, the term LPC2109/2119/2129 will apply to devices with
and without the /00 or /01 suffixes. The /00 or the /01 suffix will be used to differentiate from
other devices only when necessary.

Key features brought by LPC2109/2119/2129/01 devices

Fast GPIO ports enable port pin toggling up to 3.5 times faster than the original device.

They also allow for a port pin to be read at any time regardless of its function.
Dedicated result registers for ADC(s) reduce interrupt overhead. The ADC pads are V5

V tolerant when configured for digital I/O function(s).


UART0/1 include fractional baud rate generator, auto-bauding capabilities and

handshake flow-control fully implemented in hardware.


Buffered SSP serial controller supporting SPI, 4-wire SSI, and Microwire formats.
SPI programmable data length and master mode enhancement.
Diversified Code Read Protection (CRP) enables different security levels to beV

implemented. This feature is available in LPC2109/2119/2129/00 devices as well.


General purpose timers can operate as external event counters.

2.2 Key features common for all devices

16/32-bit ARM7TDMI-S microcontroller in a tiny LQFP64 package. 8/16 kB on-chip


static RAM.

64/128/256 kB on-chip flash program memory. 128-bit wide interface/accelerator enables

high speed 60 MHz operation.


In-System Programming (ISP) and In-Application Programming (IAP) via on-chip
bootloader software. Flash programming takes 1 ms per 512 B line. Single sector or full

chip erase takes 400 ms.


EmbeddedICE-RT interface enables breakpoints and watch points. Interrupt service

routines can continue to execute while the foreground task is debugged with the
on-chip RealMonitor software.
Embedded Trace Macrocell (ETM) enables non-intrusive high speed real-time tracingof
instruction execution.
Two interconnected CAN interfaces (one for LPC2109) with advanced acceptance

filters.
Four-channel 10-bit A/D converter with conversion time as low as 2.44 ms.
Multiple serial interfaces including two UARTs (16C550), Fast I2C-bus (400 kbit/s)

andtwo SPIs.
60 MHz maximum CPU clock available from programmable on-chip Phase-Locked
Loop with settling time of 100 ms.
Vectored Interrupt Controller with configurable priorities and vector addresses.
Two 32-bit timers (with four capture and four compare channels), PWM unit (six

outputs), Real-Time Clock (RTC) and watchdog.

Up to forty-six 5 V tolerant general purpose I/O pins. Up to nine edge or level sensitive

external interrupt pins available.

On-chip crystal oscillator with an operating range of 1 MHz to 30 MHz.


Two low power modes, Idle and Power-down.
Processor wake-up from Power-down mode via external interrupt.
Individual enable/disable of peripheral functions for power optimization.
Dual power supply:
CPU operating voltage range of 1.65 V to 1.95 V (1.8 V 0.15 V).
I/O power supply range of 3.0 V to 3.6 V (3.3 V 10 %) with 5 V tolerant I/O pads.

PIN DIAGRAM

LPC2129 Memory
FLASH (kB)

256

RAM (kB)

16

LPC2129 Parameters
fmax (MHz)

60

I/Opins

46

UART

IC

SPI

SSP

ADC

DAC

Timers

PWM

I/O supply voltage (V)

3.3

CPU supply voltage (V)

1.8

LPC2129 Packages and Pinouts


LQFP64

CHAPTER-3

PCB FABRICATION
`

The PCB manufacturing process involves use of expensive equipments, but homebrew

PCB fabrication is less expensive .It requires Intel Pentium PC,600-1200dpi laser printer with
premium-quality paper or butter-paper and miscellaneous items like single side copper laminated
board, Lacquer thinner, sand paper and others. The various steps involves in PCB fabrication are
PC BASED ARTWORK
The PC based artwork consists of drawing the conductor pattern. For putting artwork on
the component side of the board, flip the whole image before or while taking the print. When the
pattern has been drawn, take the print out in 600 to 1200 dpi on a translucent or butter paper.
Keep the paper side on which the toner is deposited facing down over the copper laminated
boards copper side and then when the board is turned component side up, the pattern on the
conductor will be found properly aligned with the components. Finally we take the printout of
the PCB.

TAKING THE PCB LAYOUT PRINT USING A LASER PRINTER


Take the printout of the circuit layout from a laser printer. The idea is to use a coated
paper so that the toner comes loose when heated which would transfer a sharp black print on to
copper laminate. Print for each of the required layers should be taken on separate paper.
TRANSFER OF THE CONDUCTOR PATTERN
Scrub The Copper Side Of The Copper Clad Laminated Used For The PCB Board
With A Sponge. The Scrubbing Involves Removes Oxidation, Stains, Etc. And It Also Makes The
Copper Surface Some-What Rough Which Helps The Toner To Adhere To The Copper Surface.

The Next Step Is To Degrease The Board Thoroughly Using A Paper Towel Soaked With
Acetone Solvent. Keep Doing It Until No More Discoloration Is Seen On The Paper Towel. Rub
Hard And Keep Switching To Clean Parts Of Towel. Place And Align The Paper On The Copper
Side, Using An Iron Box To Maximum Setting On The Back Of The Paper For At Least Half A
Minute. If You Don't Apply Enough Heat, The Film Or Toner May No Stick Or Be Dark Enough.
The Removal Of Paper From PCB Is Done By Putting It Into Hot Water For 10 Or More
Minutes. Check Whether It Has Transferred Properly Onto Copper Plate.
Dig The Bristles On The Tip Of A Smooth Tooth Brush Into The Holes, Remove The Paper Part
From The Tight Areas Like Drill-Holes. Now Cut The PCB To Required Size By Using A
Hacksaw.
ETCHING
Etch the unwanted copper from the board using the ferric chloride solution for 20 or
more minutes. One pint can etch at least 3.6 sq. meters of the 28gm board. Heating the etchant
will speeds up the etching process. The PCB is attached to a wooden piece and dip in to the
solution. Lift the PCB up and Check whether all the unwanted copper is removed. Then it is
immersed in to cold water to clean. When etching is complete, board is removed from the
solution and rinse it under running tap water .Acetone or lacquer thinner is used to remove the
toner .Lacquer thinner is used as a solvent in painting industry. Wash the board in lacquer thinner
solvent, rubbing with a paper towel, to remove the toner instantly.
DRILLING AND CLEANING
In this we had used a PCB hand drill .Use 0.8mm PCB drill bit to drill out all of the
component holes. After drilling the holes scrub sponge is used to clean before soldering .After
drilling and cleaning, wash the board in cold water and then dry it.
CAUTION
Lacquer thinner is extremely volatile, inflammable and explosive. Acetone can irritate
eyes and respiratory system .Ferric chloride is corrosive, so avoid skin and eye contact.

PIC16F877A PCB DESIGN

SOLDERING
Soldering is the process of joining metals by using lower melting point metal to wet or
alloy with the joined surfaces. Solder is the joining material. It melts below 427C. Soldered
joints in electronic circuits will establish strong electrical connections between component leads.
The popularly used solders are alloys of tin and lead that melt below the melting point of tin.
In order to make the surfaces accept the solder readily, the component terminals should
be cleaned chemically or by abrasion using blades or knives. Small amount of lead coating can
be done on the cleaned portion of the leads using soldering iron. This process is called tinning.
Zinc chloride or ammonium chloride separately or in combination are the most commonly used
fluxes. These are available in petroleum jelly as paste flux. A solder joint can at first glance to be
okay, but under close examination it could be a Dry Joint. A dry joint is when either the circuit
board or the leg of the component has not been properly heated to allow the solder to flow

between the surfaces freely. This creates an intermittent or no electrical connection. This can also
be caused by a lack of flux or if you reuse old solder.
Quite often, reheating a bad join will cure the problem but in a lot of cases, the old solder
will need to be removed and some new solder applied. The residues, which remain after the
soldering, may be washed out with more water, accompanied by brushing.
Soldering iron is the tool used to melt the solder and apply at the joints in the circuit. It operates
in 230V mains supply. The iron bit at the tip of it gets heated up within a few minutes. 50W and
25W soldering irons are commonly used for soldering purposes.
PROCEDURE
Make a layout of the circuit.
Straighten and clean the component leads using blade or knife. Apply a little flux on
the leads. Take a little solder on soldering iron and apply the molten solder on the leads.
Mount the components on the PCB by bending the leads of the components using
nose-pliers.
Apply flux on the joints and solder the joints. Soldering must be done in minimum
time to avoid dry soldering and heating up of components. Wash the residue using water and
brush.

ADVANTAGES

Reduce the manual power

Low cost and Reliable

CHAPTER-4
LCD DISPLAY
LCD (Liquid Crystal Display) screen is an electronic display module and find a wide
range of applications. A 16x4 LCD display is very basic module and is very commonly used in
various devices and circuits. These modules are preferred over seven segments and other multi
segment LEDs. The reasons being: LCDs are economical; easily programmable; have no
limitation

of

displaying

special

&

even custom

characters (unlike

in

seven

segments), animations and so on.A 16x4 LCD means it can display 16 characters per line and
there are 2 such lines. In this LCD each character is displayed in 5x7 pixel matrix. This LCD has
two registers, namely, Command and Data.The command register stores the command
instructions given to the LCD. A command is an instruction given to LCD to do a predefined task
like initializing it, clearing its screen, setting the cursor position, controlling display etc. The data
register stores the data to be displayed on the LCD. The data is the ASCII value of the character
to be displayed on the LCD.

Pin Description:
Pin

Function

Name

No
1
2
3

Ground (0V)
Supply voltage; 5V (4.7V 5.3V)
Contrast
adjustment;
through

Selects command register when low; and data register when high

Register Select

5
6
7
8
9
10
11
12
13
14
15
16

Low to write to the register; High to read from the register


Sends data to data pins when a high to low pulse is given

Read/write
Enable
DB0
DB1
DB2
DB3
DB4
DB5
DB6
DB7
Led+
Led-

8-bit data pins

Backlight VCC (5V)


Backlight Ground (0V)

CHAPTER-5
GSM MODEM

variable

Ground
Vcc
resistor VEE

A GSM modem is a wireless modem that works with a GSM wireless network. A wireless
modem behaves like a dial-up modem. The main difference between them is that a dial-up
modem sends and receives data through a fixed telephone line while a wireless modem sends
and receives data through radio waves. The working of GSM modem is based on commands,
the commands always start with AT (which means ATtention) and finish with a <CR> character. For
example, the dialing command is ATD<number>; ATD3314629080; here the dialing command ends with
semicolon.

The AT commands are given to the GSM modem with the help of PC or controller. The GSM
modem is serially interfaced with the controller with the help of MAX 232. Here max 232 acts as driver
which converts TTL levels to the RS 232 levels. For serial interface GSM modem requires the signal
based on RS 232 levels. The T1_OUT and R1_IN pin of MAX 232 is connected to the TX and RX pin of
GSM modem

DEFINITION

Global system for mobile communication (GSM) is a globally accepted standard for digital cellular
communication. GSM is the name of a standardization group established in 1982 to create a common
European mobile telephone standard that would formulate specifications for a pan-European mobile
cellular radio system operating at 900 MHz.

GSM HISTORY

Today the GSM cell or mobile phone system is the most popular in the world. GSM handsets are
widely available at good prices and the networks are robust and reliable. The GSM system is also
feature-rich with applications such as SMS text messaging, international roaming, SIM cards and
the like. It is also being enhanced with technologies including GPRS and EDGE. To achieve this
level of success has taken many years and is the result of both technical development and
international cooperation. The GSM history can be seen to be a story of cooperation across
Europe, and one that nobody thought would lead to the success that GSM is today.
The first cell phone systems that were developed were analogue systems. Typically they used
frequency-modulated carriers for the voice channels and data was carried on a separate shared
control channel. When compared to the systems employed today these systems were
comparatively straightforward and as a result a vast number of systems appeared. Two of the
major systems that were in existence were the AMPS (Advanced Mobile Phone System) that was
used in the USA and many other countries and TACS (Total Access Communications System)
that was used in the UK as well as many other countries around the world.
Another system that was employed, and was in fact the first system to be commercially deployed
was the Nordic Mobile Telephone system (NMT). This was developed by a consortium of
companies in Scandinavia and proved that international cooperation was possible.
The success of these systems proved to be their downfall. The use of all the systems installed
around the globe increased dramatically and the effects of the limited frequency allocations were
soon noticed. To overcome these a number of actions were taken. A system known as E-TACS or
Extended-TACS was introduced giving the TACS system further channels. In the USA another
system known as Narrowband AMPS (NAMPS) was developed.

Frequencies

Originally it had been intended that GSM would operate on frequencies in the 900 MHz cellular
band. In September 1993, the British operator Mercury One-to-One launched a network. Termed
DCS 1800 it operated at frequencies in a new 1800 MHz band. By adopting new frequencies
new operators and further competition was introduced into the market apart from allowing
additional spectrum to be used and further increasing the overall capacity. This trend was
followed in many countries, and soon the term DCS 1800 was dropped in favour of calling it
GSM as it was purely the same cellular technology but operating on a different frequency band.
In view of the higher frequency used the distances the signals travelled was slightly shorter but
this was compensated for by additional base stations.
In the USA as well a portion of spectrum at 1900 MHz was allocated for cellular usage in 1994.
The licensing body, the FCC, did not legislate which technology should be used, and accordingly
this enabled GSM to gain a foothold in the US market. This system was known as PCS 1900
(Personal Communication System).

What is a GSM Modem?


A GSM modem is a wireless modem that works with a GSM wireless network. A
wireless modem behaves like a dial-up modem. The main difference between them is
that a dial-up modem sends and receives data through a fixed telephone line while a
wireless modem sends and receives data through radio waves.

A GSM modem can be an external device or a PC Card / PCMCIA Card. Typically, an


external GSM modem is connected to a computer through a serial cable or a USB
cable. A GSM modem in the form of a PC Card / PCMCIA Card is designed for use with
a laptop computer. It should be inserted into one of the PC Card / PCMCIA Card slots of
a laptop computer. Like a GSM mobile phone, a GSM modem requires a SIM card from
a wireless carrier in order to operate.

As mentioned in earlier sections of this SMS tutorial, computers use AT commands to


control modems. Both GSM modems and dial-up modems support a common set of
standard AT commands. You can use a GSM modem just like a dial-up modem.

In addition to the standard AT commands, GSM modems support an extended set of AT


commands. These extended AT commands are defined in the GSM standards. With the
extended AT commands, you can do things like:

Reading, writing and deleting SMS messages.

Sending SMS messages.

Monitoring the signal strength.

Monitoring the charging status and charge level of the battery.

Reading, writing and searching phone book entries.

The number of SMS messages that can be processed by a GSM modem per minute is
very low -- only about six to ten SMS messages per minute.

GSM Modem Application

THE GSM NETWORK

GSM provides recommendations, not requirements. The GSM specifications define the functions and
interface requirements in detail but do not address the hardware. The reason for this is to limit the
designers as little as possible but still to make it possible for the operators to buy equipment from

different suppliers. The GSM network is divided into three major systems: the switching system (SS), the
base station system (BSS), and the operation and support system (OSS).

GSM Network Elements


The Switching System
The switching system (SS) is responsible for performing call processing and subscriber-related functions.
The switching system includes the following functional units.

home location register (HLR)The HLR is a database used for storage and management of
subscriptions. The HLR is considered the most important database, as it stores permanent data about
subscribers, including a subscriber's service profile, location information, and activity status. When an

individual buys a subscription from one of the PCS operators, he or she is registered in the HLR of that
operator.

mobile services switching center (MSC)The MSC performs the telephony switching functions of the
system. It controls calls to and from other telephone and data systems. It also performs such functions as
toll ticketing, network interfacing, common channel signaling, and others.

visitor location register (VLR)The VLR is a database that contains temporary information about
subscribers that is needed by the MSC in order to service visiting subscribers. The VLR is always
integrated with the MSC. When a mobile station roams into a new MSC area, the VLR connected to that
MSC will request data about the mobile station from the HLR. Later, if the mobile station makes a call,
the VLR will have the information needed for call setup without having to interrogate the HLR each time.

authentication center (AUC)A unit called the AUC provides authentication and encryption parameters
that verify the user's identity and ensure the confidentiality of each call. The AUC protects network
operators from different types of fraud found in today's cellular world.

equipment identity register (EIR)The EIR is a database that contains information about the identity
of mobile equipment that prevents calls from stolen, unauthorized, or defective mobile stations. The AUC
and EIR are implemented as stand-alone nodes or as a combined AUC/EIR node.

CHAPTER-6

G.P.S RECIEVER
The Global Positioning System (GPS) is a Global Navigation Satellite
System (GNSS) developed by the United States Department of Defense. It is the
only fully functional GNSS in the world. It uses a constellation of between 24 and 32
Medium Earth Orbit satellites that transmit precise microwave signals, which enable
GPS receivers to determine their current location, the time, and their velocity. Its
official name is NAVSTAR GPS. Although NAVSTAR is not an acronym, a few
backronyms have been created for it. The GPS satellite constellation is managed by
the United States Air Force 50th Space Wing. GPS is often used by civilians as a
navigation system.
After Korean Air Lines Flight 007 was shot down in 1983 after straying into the
USSR's prohibited airspace, President Ronald Reagan issued a directive making GPS
freely available for civilian use as a common good. As suggested by physicist D.
Fanelli a few years before. Since then, GPS has become a widely used aid to
navigation worldwide, and a useful tool for map-making, land surveying, commerce,
scientific uses, and hobbies such as geocaching. Also, the precise time reference is
used in many applications including the scientific study of earthquakes. GPS is also
a required key synchronization resource of cellular networks, such as the Qualcomm
CDMA air interface used by many wireless carriers in a multitude of countries.

The first satellite navigation system, Transit, used by the United States Navy, was first
successfully tested in 1960. Using a constellation of five satellites, it could provide a
navigational fix approximately once per hour. In 1967, the U.S. Navy developed the Imation
satellite which proved the ability to place accurate clocks in space, a technology that GPS relies
upon. In the 1970s, the ground-based Omega Navigation System, based on signal phase
comparison, became the first worldwide radio navigation system.
The design of GPS is based partly on similar ground-based radio navigation systems, such
as LORAN and the Decca Navigator developed in the early 1940s, and used during World War
II. Additional inspiration for the GPS came when the Soviet Union launched the first Sputnik in
1957. A team of U.S. scientists led by Dr. Richard B. Kershner were monitoring Sputnik's radio

transmissions. They discovered that, because of the Doppler Effect, the frequency of the signal
being transmitted by Sputnik was higher as the satellite approached, and lower as it continued
away from them. They realized that since they knew their exact location on the globe, they could
pinpoint where the satellite was along its orbit by measuring the Doppler distortion.

3.4.2 Working and Operation


When people talk about "a GPS," they usually mean a GPS receiver. The Global
Positioning System (GPS) is actually a constellation of 27 Earth-orbiting satellites
(24 in operation and three extras in case one fails). The U.S. military developed and
implemented this satellite network as a military navigation system, but soon
opened it up to everybody else.

Each of these 3,000- to 4,000-pound solar-powered satellites circles the globe


at about 12,000 miles (19,300 km), making two complete rotations every day. The
orbits are arranged so that at any time, anywhere on Earth, there are at least four
satellites "visible" in the sky.

A GPS receiver's job is to locate four or more of these satellites, figure out the
distance to each, and use this information to deduce its own location. This operation
is based on a simple mathematical principle called trilateration.GPS receiver
calculates its position on earth based on the information it receives from four
located satellites. This system works pretty well, but inaccuracies do pop up. For
one thing, this method assumes the radio signals will make their way through the
atmosphere at a consistent speed (the speed of light). In fact, the Earth's
atmosphere slows the electromagnetic energy down somewhat, particularly as it
goes through the ionosphere and troposphere. The delay varies depending on where
you are on Earth, which means it's difficult to accurately factor this into the distance
calculations. Problems can also occur when radio signals bounce off large objects,
such as skyscrapers, giving a receiver the impression that a satellite is farther away
than it actually is. On top of all that, satellites sometimes just send out bad almanac
data, misreporting their own position.

Differential GPS (DGPS) helps correct these errors. The basic idea is to gauge GPS
inaccuracy at a stationary receiver station with a known location. Since the DGPS
hardware at the station already knows its own position, it can easily calculate its
receiver's inaccuracy. The station then broadcasts a radio signal to all DGPSequipped receivers in the area, providing signal correction information for that area.
In general, access to this correction information makes DGPS receivers much more
accurate than ordinary receivers.

3.18 G.P.S receiver communicating with the satellite and sending


information through the wireless mobile phone

G.P.S data decoding


G.P.S receiver continuously sends data and the microcontroller receives the data
when ever it requires. The data sent by the G.P.S is a string of characters which
should be decoded to the standard format. This is done by the program which we
implement in the controller.

FEATURE

Brand new and high quality.

Model: GY-GPS6MV2.

With ceramic antenna.

With LED signal indicator lamp.

Power supply: 3-5V.

The default baud rate: 9600.

Compatible with different flight controller module.

Size 1: 2.5cm x 3.5cm.

Size 2: 2.5cm x 2.5cm x 0.8cm.

SOFTWARE REQUIREMENTS

MATLAB 7.14 Version

MATLAB
MATLAB is a high-performance language for technical computing. It integrates
computation, visualization, and programming in an easy-to-use environment where problems and
solutions are expressed in familiar mathematical notation.
Typical uses include:

Math and computation


Algorithm development
Modeling, simulation, and prototyping
Data analysis, exploration, and visualization
Scientific and engineering graphics.
Application development, including Graphical User Interface building

MATLAB is an interactive system whose basic data element is an array that does not
require dimensioning. This allows you to solve many technical computing problems, especially
those with matrix and vector formulations, in a fraction of the time it would take to write a
program in a scalar non-interactive language such as C or FORTRAN

3.3 INTRODUCTION
MATLAB (matrix laboratory) is a numerical computing environment and fourthgeneration

programming

language.

Developed

by Math

Works,

MATLAB

allows matrix manipulations, plotting of functions and data, implementation of algorithms,


creation of user interfaces, and interfacing with programs written in other languages,
including C, C++, Java, and Fortran.
Although MATLAB is intended primarily for numerical computing, an optional
toolbox

uses

the MuPAD

symbolic

engine,

allowing

access

to symbolic

computing capabilities. An additional package, Simulink, adds graphical multi-domain


simulation and Model-Based Design for dynamic and embedded systems.
In 2004, MATLAB had around one million users across industry and
academia. MATLAB users come from various backgrounds of engineering, science,
and economics. MATLAB is widely used in academic and research institutions as well as
industrial enterprises.
MATLAB was first adopted by researchers and practitioners in control engineering,
Little's specialty, but quickly spread to many other domains. It is now also used in education,
in particular the teaching of linear algebra and numerical analysis, and is popular amongst

scientists involved in image processing. The MATLAB application is built around the
MATLAB language. The simplest way to execute MATLAB code is to type it in the
Command Window, which is one of the elements of the MATLAB Desktop. When code is
entered in the Command Window, MATLAB can be used as an interactive
mathematical shell. Sequences of commands can be saved in a text file, typically using the
MATLAB Editor, as a script or encapsulated into a function, extending the commands
available.
MATLAB provides a number of features for documenting and sharing your work.
You can integrate your MATLAB code with other languages and applications, and distribute
your MATLAB algorithms and applications.

3.4 FEATURES OF MATLAB

High-level language for technical computing.


Development environment for managing code, files, and data.
Interactive tools for iterative exploration, design, and problem solving.
Mathematical functions for linear algebra, statistics, Fourier

analysis,

filtering, optimization, and numerical integration.


2-D and 3-D graphics functions for visualizing data.
Tools for building custom graphical user interfaces.
Functions for integrating MATLAB based algorithms with external applications
and languages, such as C, C++, Fortran, Java, COM, and Microsoft Excel.
MATLAB is used in vast area, including signal and image processing,
communications, control design, test and measurement, financial modeling and analysis, and
computational. Add-on toolboxes (collections of special-purpose MATLAB functions) extend
the MATLAB environment to solve particular classes of problems in these application areas.
MATLAB can be used on personal computers and powerful server systems,
including the Cheaha compute cluster. With the addition of the Parallel Computing Toolbox,
the language can be extended with parallel implementations for common computational

functions, including for-loop unrolling. Additionally this toolbox supports offloading


computationally intensive workloads to Cheaha the campus compute cluster. MATLAB is
one of a few languages in which each variable is a matrix (broadly construed) and "knows"
how big it is. Moreover, the fundamental operators (e.g. addition, multiplication) are
programmed to deal with matrices when required. And the MATLAB environment handles
much of the bothersome housekeeping that makes all this possible. Since so many of the
procedures required for Macro-Investment Analysis involves matrices, MATLAB proves to
be an extremely efficient language for both communication and implementation.

3.4.1 INTERFACING WITH OTHER LANGUAGES


MATLAB can call functions and subroutines written in the C programming
language or FORTRAN. A wrapper function is created allowing MATLAB data types to be
passed and returned. The dynamically loadable object files created by compiling such
functions are termed "MEX-files" (for MATLAB executable).
Libraries written in Java, ActiveX or .NET can be directly called from MATLAB and
many MATLAB libraries (for example XML or SQL support) are implemented as wrappers
around Java or ActiveX libraries. Calling MATLAB from Java is more complicated, but can
be done with MATLAB extension, which is sold separately by Math Works, or using an
undocumented mechanism called JMI (Java-to-Mat lab Interface), which should not be
confused with the unrelated Java that is also called JMI.
As alternatives to the MuPAD based Symbolic Math Toolbox available from Math
Works, MATLAB can be connected to Maple or Mathematical.
Libraries also exist to import and export MathML.

Development Environment
Startup Accelerator for faster MATLAB startup on Windows, especially on Windows XP,
and for network installations.

Spreadsheet Import Tool that provides more options for selecting and loading mixed
textual and numeric data.
Readability and navigation improvements to warning and error messages in the
MATLAB command window.
Automatic variable and function renaming in the MATLAB Editor.
Developing Algorithms and Applications

MATLAB provides a high-level language and development tools that let you quickly
develop and analyze your algorithms and applications.

The MATLAB Language


The MATLAB language supports the vector and matrix operations that are
fundamental to engineering and scientific problems. It enables fast development and
execution. With the MATLAB language, you can program and develop algorithms faster than
with traditional languages because you do not need to perform low-level administrative tasks,
such as declaring variables, specifying data types, and allocating memory. In many cases,
MATLAB eliminates the need for for loops. As a result, one line of MATLAB code can
often replace several lines of C or C++ code.
At the same time, MATLAB provides all the features of a traditional programming
language, including arithmetic operators, flow control, data structures, data types, objectoriented programming (OOP), and debugging features.
MATLAB lets you execute commands or groups of commands one at a time,
without compiling and linking, enabling you to quickly iterate to the optimal solution. For
fast execution of heavy matrix and vector computations, MATLAB uses processor-optimized
libraries. For general-purpose scalar computations, MATLAB generates machine-code
instructions using its JIT (Just-In-Time) compilation technology.
This technology, which is available on most platforms, provides execution speeds
that rival those of traditional programming languages.

Development Tools
MATLAB includes development tools that help you implement your algorithm
efficiently. These include the following:

MATLAB Editor
Provides standard editing and debugging features, such as setting breakpoints and
single stepping

CODE ANALYZER
Checks your code for problems and recommends modifications to maximize
performance and maintainability

MATLAB PROFILER
Records the time spent executing each line of code

DIRECTORY REPORTS
Scan all the files in a directory and report on code efficiency, file differences, file
dependencies, and code coverage

DESIGNING GRAPHICAL USER INTERFACES

By using the interactive tool GUIDE (Graphical User Interface Development


Environment) to layout, design, and edit user interfaces. GUIDE lets you include list boxes,
pull-down menus, push buttons, radio buttons, and sliders, as well as MATLAB plots and
Microsoft ActiveX controls. Alternatively, you can create GUIs programmatically using
MATLAB functions.

3.5 THE MATLAB SYSTEM


The MATLAB system consists of five main parts:
Development Environment.
This is the set of tools and facilities that help you use MATLAB functions and
files. Many of these tools are graphical user interfaces. It includes the MATLAB desktop
and Command Window, a command history, and browsers for viewing help, the
workspace, files, and the search path.

The MATLAB Mathematical Function Library.


This is a vast collection of computational algorithms ranging from elementary
functions like sum, sine, cosine, and complex arithmetic, to more sophisticated functions
like matrix inverse, matrix eigenvalues, Bessel functions, and fast Fourier transforms.

The MATLAB Language.


This is a high-level matrix/array language with control flow statements, functions,
data structures, input/output, and object-oriented programming features. It allows both
"programming in the small" to rapidly create quick and dirty throw-away programs, and
"programming in the large" to create complete large and complex application programs.

Handle Graphics.

This is the MATLAB graphics system. It includes high-level commands for twodimensional and three-dimensional data visualization, image processing, animation, and
presentation graphics. It also includes low-level commands that allow you to fully
customize the appearance of graphics as well as to build complete graphical user
interfaces on your MATLAB applications.

The MATLAB Application Program Interface (API).


This is a library that allows you to write C and FORTRAN programs that interact
with MATLAB. It include facilities for calling routines from MATLAB (dynamic
linking), calling MATLAB as a computational engine, and for reading and writing MATfiles.

3.5.1 DESKTOP TOOLS


This section provides an introduction to MATLAB's desktop tools. You can also
use MATLAB functions to perform most of the features found in the desktop tools. The
tools are:

Current Directory Browser

Workspace Browser

Array Editor

Editor/Debugger

Command Window

Command History

Launch Pad

Help Browser

Command Window

Use the Command Window to enter variables and run functions and Mfiles.

Command History
Lines you enter in the Command Window are logged in the Command
History window. In the Command History, you can view previously used functions, and
copy and execute selected lines. To save the input and output from a MATLAB session to
a file, use the diary function.

Running External Programs


You can run external programs from the MATLAB Command Window. The
exclamation point character! is a shell escape and indicates that the rest of the input line
is a command to the operating system. This is useful for invoking utilities or running
other programs without quitting MATLAB. On Linux, for example,!emacs magik.m
invokes an editor called emacs for a file named magik.m. When you quit the external
program, the operating system returns control to MATLAB.

Launch Pad
MATLAB's Launch Pad provides easy access to tools, demos, and documentation.

Help Browser
Use the Help browser to search and view documentation for all your Math Works
products. The Help browser is a Web browser integrated into the MATLAB desktop that
displays HTML documents.

To open the Help browser, click the help button in the toolbar, or type
helpbrowser in the Command Window. The Help browser consists of two panes, the Help
Navigator, which you use to find information, and the display pane, where you view the
information.

Help Navigator
Use to Help Navigator to find information. It includes:

Product filter
Set the filter to show documentation only for the products you specify.

Contents tab
View the titles and tables of contents of documentation for your products.

Index tab
Find specific index entries (selected keywords) in the MathWorks documentation
for your products.
Search tab
Look for a specific phrase in the documentation. To get help for a specific
function, set the Search type to Function Name.
Favorites tab
View a list of documents you previously designated as favorites.
Display Pane
After finding documentation using the Help Navigator, view it in the display
pane. While viewing the documentation, you can:

Browse to other pages


Use the arrows at the tops and bottoms of the pages, or use the back and forward
buttons in the toolbar.
Bookmark pages
Click the Add to Favorites button in the toolbar.
Print pages
Click the print button in the toolbar.
Find a term in the page
Type a term in the Find in page field in the toolbar and click Go.
Other features available in the display pane are: copying information, evaluating a
selection, and viewing Web pages.

Current Directory Browser

MATLAB file operations use the current directory and the search path as
reference points. Any file you want to run must either be in the current directory or on the
search path.

Search Path
To determine how to execute functions you call, MATLAB uses a search
path to find M-files and other MATLAB-related files, which are organized in directories
on your file system. Any file you want to run in MATLAB must reside in the current
directory or in a directory that is on the search path. By default, the files supplied with
MATLAB and MathWorks toolboxes are included in the search path.

Workspace Browser
The MATLAB workspace consists of the set of variables (named arrays) built up
during a MATLAB session and stored in memory. You add variables to the workspace by
using functions, running M-files, and loading saved workspaces.
To view the workspace and information about each variable, use the Workspace
browser, or use the functions who and whos.
To delete variables from the workspace, select the variable and select Delete from
the Edit menu. Alternatively, use the clear function.
The workspace is not maintained after you end the MATLAB session. To save the
workspace to a file that can be read during a later MATLAB session, select Save
Workspace As from the File menu, or use the save function. This saves the workspace to
a binary file called a MAT-file, which has a .mat extension. There are options for saving
to different formats. To read in a MAT-file, select Import Data from the File menu, or use
the load function.

Array Editor
Double-click on a variable in the Workspace browser to see it in the Array
Editor. Use the Array Editor to view and edit a visual representation of one- or twodimensional numeric arrays, strings, and cell arrays of strings that are in the workspace.

Editor/Debugger
Use the Editor/Debugger to create and debug M-files, which are programs you
write to run MATLAB functions. The Editor/Debugger provides a graphical user
interface for basic text editing, as well as for M-file debugging.
You can use any text editor to create M-files, such as Emacs, and can use
preferences (accessible from the desktop File menu) to specify that editor as the default.
If you use another editor, you can still use the MATLAB Editor/Debugger for debugging,
or you can use debugging functions, such as dbstop, which sets a breakpoint.
If you just need to view the contents of an M-file, you can display it in the
Command Window by using the type function.

3.5.2 ANALYZING AND ACCESSING DATA


MATLAB supports the entire data analysis process, from acquiring data from external
devices and databases, through preprocessing, visualization, and numerical analysis, to
producing presentation-quality output.

DATA ANALYSIS
MATLAB provides interactive tools and command-line functions for data analysis
operations, including:

Interpolating and decimating


Extracting sections of data, scaling, and averaging
Thresholding and smoothing
Correlation, Fourier analysis, and filtering
1-D peak, valley, and zero finding
Basic statistics and curve fitting
Matrix analysis

DATA ACCESS
MATLAB is an efficient platform for accessing data from files, other applications,
databases, and external devices. You can read data from popular file formats, such as Microsoft
Excel; ASCII text or binary files; image, sound, and video files; and scientific files, such as
HDF and HDF5. Low-level binary file I/O functions let you work with data files in any format.
Additional functions let you read data from Web pages and XML.

VISUALIZING DATA
All the graphics features that are required to visualize engineering and scientific data are
available in MATLAB. These include 2-D and 3-D plotting functions, 3-D volume visualization
functions, tools for interactively creating plots, and the ability to export results to all popular
graphics formats. You can customize plots by adding multiple axes; changing line colors and
markers; adding annotation, Latex equations, and legends; and drawing shapes.

2-D PLOTTING
Visualizing vectors of data with 2-D plotting functions that create:

Line, area, bar, and pie charts.


Direction and velocity plots.
Histograms.
Polygons and surfaces.
Scatter/bubble plots.
Animations.

3-D PLOTTING AND VOLUME VISUALIZATION


MATLAB provides functions for visualizing 2-D matrices, 3-D scalar, and 3-D vector
data. You can use these functions to visualize and understand large, often complex,
multidimensional data. Specifying plot characteristics, such as camera viewing angle,
perspective, lighting effect, light source locations, and transparency.
3-D plotting functions include:
Surface, contour, and mesh.
Image plots.
Cone, slice, stream, and isosurface.

3.5.3 PERFORMING NUMERIC COMPUTATION


MATLAB contains mathematical, statistical, and engineering functions to support all
common engineering and science operations. These functions, developed by experts in
mathematics, are the foundation of the MATLAB language. The core math functions use the
LAPACK and BLAS linear algebra subroutine libraries and the FFTW Discrete Fourier
Transform library. Because these processor-dependent libraries are optimized to the different
platforms that MATLAB supports, they execute faster than the equivalent C or C++ code.
MATLAB provides the following types of functions for performing mathematical
operations and analyzing data:

Matrix manipulation and linear algebra.


Polynomials and interpolation.
Fourier analysis and filtering.
Data analysis and statistics.
Optimization and numerical integration.
Ordinary differential equations (ODEs).
Partial differential equations (PDEs).
Sparse matrix operations.

MATLAB can perform arithmetic on a wide range of data types, including doubles,
singles, and integers.

Potrebbero piacerti anche