Chapter 3
Implementation of Vision Based Target Tracking
System
Implementation consists of design and construction of the Turret base and integrating it
with the machine vision system
-'
3.1 Design and Construction of Turret Base
-- .-
,_
·~;-_:t~
wide angle tracking Camera or Radar~
;' (n -----Tilt Motor
¥'~~
,~1,":1~
-_ I l~<i"~HU\
,r~n -·~
r~ - II 'L"Ig It
1 Mac h"me Gun or anti aircraft
1\ I , Artillary
Pan Moto
I
II
Fig 3. I Solid works impression of the final Gun turret system (laboratory model)
Fig 3.1 shows the envisioned gun turret system (laboratory model). According
to Hutchinson ( 1996) this configuration can be considered as a fixed camera
configuration. Wide angle camera is displayed which is used in the laboratory
model in place of the radar system. AAA is replaced on the model with a light
machine gun (LMG). Entire system is mounted on a metal stand which is of 3
feet in height The camera is situated at a distance from the gun turret and does
not have any mechanical link with the base.
11
II.
3.1.1 Rotation Base
Rotation base of the system is a commercially available base constructed around
stainless steel shaft of I 2 mm in diameter. The rotating part of the mechanism
rotates around this stationary shaft supported by two roller bearings. Mounting
for the whole mechanism is attached to the stationary Stainless Steel shaft from
the bottom ofthe mechanism.
Fig 3.2 Rotation base
The base came with a 2 pole stepper motor as the actuator, which was replaced
by the selected DC motor to achieve higher torque and to simplify driver
electronics design.
The actuator is connected to the base via a gear wheel system with a gears ratio
of 12. The motor it self has a gear box with a 5.9:1 gears ratio, which gives an
overall gears ratio of70.8:L
My contribution to this base is,
• Replacing the stepper motor a PM DC motor.
• Designing the mounting plate between the base and the DC motor
• Designing the mounting plate for the pan angle sensor.
fig3.3 fixing plate for the sensor potentiometer
• Attaching the 10 tum 1Ok potentiometer (pan angle sensor) to the motor
shaft.
12
3.1.2 Tilt Base
Tilt base was designed from scratch by the authoL It consists of a tilt Frame to
which tilt motor, Gear box and the payload (Gun or Anti aircraft artillery) is
connected. It is made out of steel and weighs approximately 7.8 kg
(a) (b)
Fig 3A(a) tilt base solid works model, 3.4(b) tilt base after construction
3.1.3 Mounting Plate
Mounting plate is a heavy steel plate with a bearing guide, for the pan rotation.
It acts as the mounting plate and as a stabilizing guide for pan rotation. It is
made with heavy gage steel to give more stability to the mechanism
Fig 3.5 Mounting plate
13
3.1.4 Tilt Movement Gear Box.
Tilt movement gear box is a commercially available gear box (procured from
ebay) with a turns ration of20:1
Fig 306 Tilt movement gear box with 20: I gears ratio
3.1.5 Complete System
Fig 307 shows the final product after mounting on a pedestaL
14
....
3.1.6 Design Specifications
Bandwidth of the system (from Chapter 4)
Pan mechanism Position loop= 2n rad/s
Pan mechanism Velocity loop = 141 ,6 rad/s
Tilt mechanism position loop = 2 n rad/s
Tilt mechanism velocity loop= 155 rad/s
3.1. 7 Selection of Motors -'
Selection of motors is an exercise of selecting the best out of available limited
options;
Since the tilt mechanism needs to operate against gravity it needs a higher
torque motor than the pan motor, therefore following motors are selected for the
pan and tilt mechanisms respectively.
Pan motor:
Manufacturer: Pittman
Operating voltage: 24V
Power: 18W
Peak Current 5A
Maximum rotational speed 2600 rpm
Armature resistance 6.1 Ohm
Torque: 0.33Nm
Armature inductance: 4.6mH
. 2
Rotor inertia: 0.00019 kg/m
Tilt motor:
Manufacturer: Toshhiba
Operating voltage: 24V
Power 50W
Peak Current SA
Maximum rotational speed 2600 rpm
Armature resistance 2.4 Ohm
Torque 0.99 Nm
Armature inductance 2.08 mH
Rotor inertia
15
llo..
3.1.8 Selection of Sensors
Since the selected motors did not come with built in tachometers or angular
sensors, several types of sensors were considered at the initial stage.
a. Quadrature encoders
b. Absolute digital encoders
c. Incremental encoders
d. Simple potentiometers
e. Absolute analog encoders (contact less type)
f Absolute analog encoders (contact type)
Following criteria were considered when selecting sensors
• Resolution -
• Conversion speed (in case of A to D conversion)
• Requirement of complex electronic circuits for filtering/decoding etc
• Mechanical resistance imposed on the system.
• Temperature sensitivity
• linearity
• Cost
a. Quadrature encoder: (Appendix F)
Quadrature encoders available in Sri lanka are of contact type encoders, While
these sensors are strong departments of cost and conversion time. They lack in
all other departments. It imposes considerable mechanical resistance due to
contact points
It requires complex circuitry
resolution is 3.75 degrees, which is rather low.
b. Absolute digital encoder
While these types of encoders were the best option in terms of considered
parameters, the cost was prohibitively high.
c. Incremental encoders
Incremental encoders (optical) were strong in features of resolution, Speed of
conversion, and it did required complex circuitry as contact bounce was not a
problem with these type of encoders. However it was again terribly expensive to
be competitive in the design of a prototype laboratory model. However this is as
good a option as the absolute digital encoder for the final product.
16
d. Simple potentiometers (Appendix G)
Simple potentiometers were strong in departments of cost and resolution
(determined by the A to D word length only) and it needed a simple low pass
filter to attenuate high frequency components generated by contact bounce. But
linearity was a concern for simple potentiometers. Conversion speed was
extremely good and was determined by the speed of the A to D converter.
But simple potentiometers also impose a mechanical resistance due to contact
friction.
e. Absolute analog encoders contact less type (Appendix H)
These are a type of RVDTs, it produces an analog output ({}-5V) depending on
the shaft angle ( 0-360)
This type of encoders eliminate excessive noise due to contact bounce, does not
impose mechanical friction due to slider contacts. But they are relatively
expensive.
f. Absolute analog encoders contact type: (Appendix I)
Absolute analog encoders offer a compromise between cost and mechanical
friction. Use of double ball bearing reduces the mechanical friction imposed on
the system and it is not as expensive as the contact less type
Therefore, taking into consideration all above aspects, multi turn wire wound
precision potentiometer (Fig 39b) was selected for the pan movement and a
single turn wire wound servo potentiometer (Fig 3.11) was selected for the tilt
movement.
17
3.1. 9 Calculating the moment of inertia seen by the
pan motor
-'
fig3.8 calculating moment of inertia around axis y
Density of steel =7 .85 g cm 3
Using 'solidworks', the moment of inertia around y axis is calculated at the
2
center of mass is 0.07kgm
Parallel axis theorem
Once the moment of inertia has been calculated for rotations about the center of
mass of a rigid body, one can conveniently recalculate the moment of inertia for
all parallel rotation axes as well, without having to resort to the formal
definition. If the axis of rotation is displaced by a distance r from the center of
mass axis of rotation (e.g., spinning a disc about a point on its periphery, rather
than through its center,) the displaced and center-moment of inertia are related
as follows:
I dtlp!aced -I
- center
+ mr 2 (3.1)
According to the solid works model the center of rotation is displaced from the
centre of mass by a distance of0.02 m and the weight ofthe system is 7.86 kg.
Therefore;
r = 0.02
m = 7.86
/Center = 0.07 kgm2
18
....
~-,~~~1~::::1-~,
:c~·~j
Jd 11pfaced = 0.07 + 0.003144
(3.2)
fdt,piaced = 0.073 I 44 kgm 2
This value should be divided by a factor of (70.8i which is the square of the
gears ratio
Reflected interia on the motor shaft = (0.073144 kg.m 2J; (70.8i
= 1.39 x 10 5 kg/m 2
Which is comparable with the rotor inertia of; 3.26 x 10 6 kg/m 2
Therefore the total inertia seen by the motor is its own inertia + load inertia
=0.00001716kg/m 2 _,
3.2 Vision System
The machine vision software used is called roborealm. Roborealm is a powerful
robotic vision software application for use in computer vision, image processing,
and robot vision tasks. Using an easy to use point and click interface complex
image analysis and robot control is achieved.
Roborealm interface screen consists of three main windows;
1. processing pipe line window
2. Current image window
3. Modules window
:;r; : ·\: ·:~;:. "1!1.;,. ~~a
... RaiD 111111111 ·~~'~x''4~· '*-*'~·
F'"-t.
»
"'t~ '~''\1f&c ~'*,,~?!!;
' ' ....·.··~::.~i;;;;:. ;;~'!.:l~
m
<< ~ '< 9 ' ,~•
.;. Recent Images
Recent Modules
Recent Programs
.;. EMamples
.;. Ad1ust
.;. Anal_ysrs
+ Anthmetrc
+Audio
+Blobs
+ Colors 1
.;. Control
.;. Dr~plc:~y
+ Edges
+ EMtens10ns
+Filters
.;. Hrstogram
+ Interface
+ loadrng/Saving
+ MQtchlnQ
+ MorpholoQY
.;. PointFeatures
.;. Shapes
~ Statements
+ Temporal
Fig 3.9 Roborealm Startup screen
9454" 19
Modules can be dragged and dropped from "modules" window to "processing
pipeline". When the program starts "roborealm" will carry out all the modules in
the processing pipeline in sequence.
3.2.1 Pipe Program
Flow diagram for the pipe program is given below.
Filter moving pixels from the
Step!.
background (non moving pixels)
.-- -·
~7
Step2. Calculate the center of gravity of the
moving pixels
~z
Step3. Carry out VB script commands
1. Recalculate Centre Of Gravity
wrt the center of screen
2. scale COG obtained in pixel
distances to real distances(for
this camera projection
characteristics should be
known)
3. Convert Cartesian COG
coordinates to polar COG
coordinates (Pan angle ant Tilt
angle)
4. Fom1at the parameters into
suitable format for transmission
over RS232
~7
Transmit over Rs 232 to pan tilt servo
Step4. controller
Fig 3.10 Flow diagram of the pipe program
VB scrip program (step 3) used to achieve components in step 3 is given in
Appendix E
20
...