autonomous robotic boat platform - bradley university

99
Autonomous Robotic Boat Platform Team: Ryan Burke, Leah Cramer, Noah Dupes, & Darren McDannald February 24 th , 2015 Advisors:Mr. Nick Schmidt, Dr.José Sánchez, & Dr. Gary Dempsey Department of Electrical and Computer Engineering

Upload: others

Post on 04-Feb-2022

2 views

Category:

Documents


0 download

TRANSCRIPT

Page 1: Autonomous Robotic Boat Platform - Bradley University

Autonomous Robotic Boat Platform

Team: Ryan Burke, Leah Cramer, Noah Dupes, & Darren McDannald

February 24th, 2015

Advisors: Mr. Nick Schmidt, Dr. José Sánchez, & Dr. Gary Dempsey

Department of Electrical and

Computer Engineering

Page 2: Autonomous Robotic Boat Platform - Bradley University

Presentation outline

2

• Background– Objective

– Block diagram

– Division of labor

• R. Burke– GPS/compass finalization and navigation system

• L. Cramer– Detecting buoys with computer vision

• N. Dupes– Motor controller

• D. McDannald– Central processor

Page 3: Autonomous Robotic Boat Platform - Bradley University

Presentation outline

3

• Background– Objective

– Block diagram

– Division of labor

• R. Burke– GPS/compass finalization and navigation system

• L. Cramer– Detecting buoys with computer vision

• N. Dupes– Motor controller

• D. McDannald– Central processor

Page 4: Autonomous Robotic Boat Platform - Bradley University

Objective

• Design and build an autonomous boat platform

– Versatile

– Robust

• 8th annual RoboBoat competition

(Virginia Beach, VA)

• Competition time frame: July

4Images taken from [1].

Page 5: Autonomous Robotic Boat Platform - Bradley University

Catamaran Boat Design

5Image taken from [1].

Page 6: Autonomous Robotic Boat Platform - Bradley University

6

Page 7: Autonomous Robotic Boat Platform - Bradley University

Division of labor

7

Task Person assigned to task

Central processing Darren McDannald

Image processing Leah Cramer

GPS/compass interfacing Ryan Burke

Motor control Noah Dupes

Remote control Darren McDannald

Navigation Ryan Burke, Darren McDannald

Page 8: Autonomous Robotic Boat Platform - Bradley University

Presentation outline

8

• Background– Objective

– Block diagram

– Division of labor

• R. Burke– GPS/compass finalization and navigation system

• L. Cramer– Detecting buoys with computer vision

• N. Dupes– Motor controller

• D. McDannald– Central processor

Page 9: Autonomous Robotic Boat Platform - Bradley University

Gantt chart

9

Page 10: Autonomous Robotic Boat Platform - Bradley University

Gantt chart

10

Page 11: Autonomous Robotic Boat Platform - Bradley University

GPS/compass unit block diagram

11

Page 12: Autonomous Robotic Boat Platform - Bradley University

GPS/compass unit block diagram

12

Page 13: Autonomous Robotic Boat Platform - Bradley University

Acknowledge message GPS initialization

13

MCU GPS

Change baud rate to 115.2 kbaud

Page 14: Autonomous Robotic Boat Platform - Bradley University

Acknowledge message GPS initialization

14

MCU GPSBaud rate changed successfully

Page 15: Autonomous Robotic Boat Platform - Bradley University

GPS and compass data testing

15

GPS dataCompass data

Longitude Latitude

Standard deviation 2.48E-06 1.28E-05 0.2223

Variance 6.15E-12 1.65E-10 0.0494

Number of samples 202 202 226

Average value -89.6185 40.6981 181.4

Actual value -89.6184 40.6979 180

Page 16: Autonomous Robotic Boat Platform - Bradley University

Navigation system operation

16

Page 17: Autonomous Robotic Boat Platform - Bradley University

Navigation system operation

17

Page 18: Autonomous Robotic Boat Platform - Bradley University

Navigation system operation

18

Page 19: Autonomous Robotic Boat Platform - Bradley University

Navigation system operation

19

Page 20: Autonomous Robotic Boat Platform - Bradley University

Navigation system operation

20

Page 21: Autonomous Robotic Boat Platform - Bradley University

Navigation system operation

21

Page 22: Autonomous Robotic Boat Platform - Bradley University

Navigation system operation

22

Page 23: Autonomous Robotic Boat Platform - Bradley University

Navigation system operation

23

Page 24: Autonomous Robotic Boat Platform - Bradley University

Navigation system operation

24

Page 25: Autonomous Robotic Boat Platform - Bradley University

Navigation system operation

25

Page 26: Autonomous Robotic Boat Platform - Bradley University

Navigation system operation

26

Page 27: Autonomous Robotic Boat Platform - Bradley University

Navigation system operation

27

Page 28: Autonomous Robotic Boat Platform - Bradley University

Navigation system operation

28

Page 29: Autonomous Robotic Boat Platform - Bradley University

Navigation system operation

29

Page 30: Autonomous Robotic Boat Platform - Bradley University

Navigation system operation

30

Page 31: Autonomous Robotic Boat Platform - Bradley University

Navigation system operation

31

Page 32: Autonomous Robotic Boat Platform - Bradley University

Progress

32

Page 33: Autonomous Robotic Boat Platform - Bradley University

Progress

33

Page 34: Autonomous Robotic Boat Platform - Bradley University

Presentation outline

34

• Background– Objective

– Block diagram

– Division of labor

• R. Burke– GPS/compass finalization and navigation system

• L. Cramer– Detecting buoys with computer vision

• N. Dupes– Motor controller

• D. McDannald– Central processor

Page 35: Autonomous Robotic Boat Platform - Bradley University

35Amazon.com Bit-tech.net Willowgarage.comImages from:

C++

Page 36: Autonomous Robotic Boat Platform - Bradley University

36

Image from: http://www.auvsifoundation.org

Competition obstacles

Page 37: Autonomous Robotic Boat Platform - Bradley University

Buoy identification flowchart with circle detection

37

Page 38: Autonomous Robotic Boat Platform - Bradley University

Circle detection buoy identification results

38

Hough transform Percentage of frames

True positive (buoy detected) 80%

False positive (incorrect buoy detected) 13.5%

False negative (buoy not detected) 6.5%

Page 39: Autonomous Robotic Boat Platform - Bradley University

Buoy identification flowchart with blob detection

39

Page 40: Autonomous Robotic Boat Platform - Bradley University

Blob detection with buoy identification results

40

Blob detection Percentage of frames

True positive (buoy detected) 33%

False positive (incorrect buoy detected) 62%

False negative (buoy not detected) 5%

Page 41: Autonomous Robotic Boat Platform - Bradley University

Project task progress

41

Page 42: Autonomous Robotic Boat Platform - Bradley University

Presentation outline

42

• Background– Objective

– Block diagram

– Division of labor

• R. Burke– GPS/compass finalization and navigation system

• L. Cramer– Detecting buoys with computer vision

• N. Dupes– Motor controller

• D. McDannald– Central processor

Page 43: Autonomous Robotic Boat Platform - Bradley University

T100 thruster

• Brushless DC (BLDC)

• Provides 2.36 kgf ( 5.2 lbf ) of forward thrust

• Sensorless

T100 thruster size comparison

obtained from[1]

43

Page 44: Autonomous Robotic Boat Platform - Bradley University

A4960 pre-driver configuration

The Allegro pre-driver

A4960 motor controller with

MCU input. Image obtained

and modified from[5]

44

Pre-Driver

Page 45: Autonomous Robotic Boat Platform - Bradley University

A4960 pre-driver configuration

The Allegro pre-driver

A4960 motor controller with

MCU input. Image obtained

and modified from[5]

45

Pre-Driver

Page 46: Autonomous Robotic Boat Platform - Bradley University

Digital commutation for a brushless motor

• Utilize a three phase configuration

Figure 1: Y-configuration of a three phase

motor obtained from[2]

Figure 2: Three phase digital commutation obtained

from[3]

High Side

Off

Low Side

High Side

Off

Low Side

0 60 120 180 240 300 360 0 60

High Side

Off

Low Side

46

Rotor Position(°)

Page 47: Autonomous Robotic Boat Platform - Bradley University

MOSFET driver configuration

Legend

H- High Side Driver

L- Low Side Driver

A- A Phase

B- B Phase

C- C phase

H-A

L-A L-B

H-B H-C

L-C

A

CB

12V

47

Page 48: Autonomous Robotic Boat Platform - Bradley University

Legend

H- High Side Driver

L- Low Side Driver

A- A Phase

B- B Phase

C- C phase

High-Side Current Path

Low-Side Current Path

Current path for the driver configuration

Legend

H- High Side Driver

L- Low Side Driver

A- A Phase

B- B Phase

C- C phase

H-A

L-A L-B

H-B H-C

L-C

A

CB

12V

48

Page 49: Autonomous Robotic Boat Platform - Bradley University

Current path for the driver configuration

H-A

L-A L-B

H-B H-C

L-C

A

CB

12V

Legend

H- High Side Driver

L- Low Side Driver

A- A Phase

B- B Phase

C- C phase

High-Side Current Path

Low-Side Current Path

Legend

H- High Side Driver

L- Low Side Driver

A- A Phase

B- B Phase

C- C phase

49

Page 50: Autonomous Robotic Boat Platform - Bradley University

Current path for the driver configuration

H-A

L-A L-B

H-B H-C

L-C

A

CB

12V

Legend

H- High Side Driver

L- Low Side Driver

A- A Phase

B- B Phase

C- C phase

High-Side Current Path

Low-Side Current Path

Legend

H- High Side Driver

L- Low Side Driver

A- A Phase

B- B Phase

C- C phase

50

Page 51: Autonomous Robotic Boat Platform - Bradley University

Current path for the driver configuration

Legend

H- High Side Driver

L- Low Side Driver

A- A Phase

B- B Phase

C- C phase

High-Side Current Path

Low-Side Current Path

Coil Measuring BEMF

Legend

H- High Side Driver

L- Low Side Driver

A- A Phase

B- B Phase

C- C phase

H-A

L-A L-B

H-B H-C

L-C

A

CB

12V

51

Page 52: Autonomous Robotic Boat Platform - Bradley University

Utilizing back electro-magnetic force (BEMF)

• Measured at common terminal, S, between the high

and low side MOSFETS

• Used to determine the rotor position and speed of

the BLDC motor

• A4960 outputs a frequency varying TACHO signal

proportional to the rotors speed

S

52

Page 53: Autonomous Robotic Boat Platform - Bradley University

Latest progression of Gantt

Schedule Time Completed Milestone

53

ID Task nameDec Jan

2

Motor controller

circuit design and

testing

2014

3

Assembly of motor

configuration on boat

frame

1

Research motor

controller and

configuration

Nov

4 Progress presentation

2015

Feb Mar

1

Page 54: Autonomous Robotic Boat Platform - Bradley University

Slide 53

1 Continue designing and building the A4960 motor controller configuration

Expected delivery of T100: January 2015

Research and design the controls algorithm for the diamond thruster configuration

-ndupes,

Page 55: Autonomous Robotic Boat Platform - Bradley University

Presentation outline

54

• Background– Objective

– Block diagram

– Division of labor

• R. Burke– GPS/compass finalization and navigation system

• L. Cramer– Detecting buoys with computer vision

• N. Dupes– Motor controller

• D. McDannald– Central processor

Page 56: Autonomous Robotic Boat Platform - Bradley University

Serial communication

• A C++ class to access a subsystem

through serial

• Sets attributes and can have

multiple instances of each

connection

• Able to request and receive data

55

Page 57: Autonomous Robotic Boat Platform - Bradley University

Project filing system

• Easy compilation using a make

file

• Saves time by only compiling

when items have been changed

• Related files in single folder

56

Page 58: Autonomous Robotic Boat Platform - Bradley University

Project filing system

• Easy compilation using a make

file

• Saves time by only compiling

when items have been changed

• Related files in single folder

57

Page 59: Autonomous Robotic Boat Platform - Bradley University

Project filing system

• Easy compilation using a make

file

• Saves time by only compiling

when items have been changed

• Related files in single folder

58

Page 60: Autonomous Robotic Boat Platform - Bradley University

• Easy compilation using a make

file

• Saves time by only compiling

when items have been changed

• Related files in single folder

Project filing system

59

Page 61: Autonomous Robotic Boat Platform - Bradley University

Boat trial script

• A C++ class takes care of the

naming of each frame

• Script makes video automatically

at the end of each run

• Compresses the runs folder

• Script asks for a description of

the surroundings to help testing

60

Page 62: Autonomous Robotic Boat Platform - Bradley University

Used TinyXML to configure boat

• Use of xml files to make to boat

easily configurable and on the fly

• Used to keep compilation times

down

61

Page 63: Autonomous Robotic Boat Platform - Bradley University

GPS class

• Request data from GPS and

compass data

• Store the data

• Path planning

• Motor and speed commands

• Data will be used to navigate

between one location to another

62

Page 64: Autonomous Robotic Boat Platform - Bradley University

Motor class

• Takes in a speed, direction, and

amount of pivot

• Outputs a string that

corresponds to the four motors

on the boat

calculate(speed, direction, pivot);

Converts direction and pivot to a

vector for each motor

Outputs string over serial

*m1: 120 m2: 35 m3: 25 m4: 25

63

Page 65: Autonomous Robotic Boat Platform - Bradley University

Schedule

64

Page 66: Autonomous Robotic Boat Platform - Bradley University

Future Work

• Currently working on a

navigation system

• Finish making the motor class

and test its operation

• Implement an accurate time base

• Threading to process the

different systems

65

Page 67: Autonomous Robotic Boat Platform - Bradley University

Autonomous Robotic Boat Platform

Team: Ryan Burke, Leah Cramer, Noah Dupes, & Darren McDannald

February 24th, 2015

Advisors: Mr. Nick Schmidt, Dr. José Sánchez, & Dr. Gary Dempsey

Department of Electrical and

Computer Engineering

Page 68: Autonomous Robotic Boat Platform - Bradley University

Appendix

67

Page 69: Autonomous Robotic Boat Platform - Bradley University

Motor Configuration Selection

• Diamond configuration

• Consists of four motors

• Allows for strafing

• Allows for 360 rotaon

Diamond configuration on a catamaran platform

68

Page 70: Autonomous Robotic Boat Platform - Bradley University

Transistor Configuration For Three Phase Drive

Three phase drive circuit consisting of six transistors, six flyback diodes,

and a y-configuration three phase motor obtained from[4]

69

Page 71: Autonomous Robotic Boat Platform - Bradley University

Power Consumption Of Transistors

Type MOSFET BJT IGBT

Power consumption

calculation

Typical values

Power consumption of a

11.5 A drive using typical

transistor values

70

Page 72: Autonomous Robotic Boat Platform - Bradley University

References

[1] Blue Robotics. (2014). T100 Thruster [Online]. Available: http://www.bluerobotics.com/store/thrusters/t100-thruster/

[2] Global Spec. (2011). Synchronous Motor Grounding [Online]. Available: http://cr4.globalspec.com/thread/67306

[3] Embedded. (2008). Designing a MCU-driver permanent magnet BLDC motor controller: Part 1 [Online]. Available: http://www.embedded.com/print/4007628

[4] Analog Dialogue. (2008). High Current Sensing [Online]. Available: http://www.analog.com/library/analogdialogue/archives/42-01/high_side_current_sensing.html

[5] Allegro MicroSystems. (2014). A4933: Automotive 3-Phase MOSFET Driver [Online]. Available: http://www.allegromicro.com/en/Products/Motor-Driver-And-Interface-ICs/Brushless-DC-Motor-Drivers/A4933.aspx

[6] St. Cyprain’s Greek Orthodox Primary Academy. (2014). 29.9.14 [Online]. Available: http://www.stcypriansprimaryacademy.co.uk/29-9-14/

[7] SparkFun Electronics. (2014). Dual Full-Bridge Driver [Online]. Available: https://www.sparkfun.com/datasheets/Robotics/L298_H_Bridge.pdf

[8] Vishay. (2011). IRF520 Power MOSFET [Online]. Available: http://www.vishay.com/docs/91017/91017.pdf

71

Page 73: Autonomous Robotic Boat Platform - Bradley University

Image Processing-Rectangle Detection

• Purpose of Research and Testing: Determine How to Detect

Polygons Contained within an Image

• Research

• OpenCV Utilizes Contours For Detection Of Polygons

• Contours: Outline or Enclosed Border of a Shape or Form

• The Contour Detection Algorithm Used By OpenCV:

Topological Structural Analysis of Digitized Binary Images by Border Following by Satoshi Suzuki and Keiichi Abe[]

• MATLAB Testing

• Imcontour() Implementation

• Contour Algorithm Testing72

Page 74: Autonomous Robotic Boat Platform - Bradley University

MATLAB Imcontour()-Original Image

Image obtained from[6]73

Page 75: Autonomous Robotic Boat Platform - Bradley University

MATLAB Imcontour()-Contour Detection

74

Page 76: Autonomous Robotic Boat Platform - Bradley University

H-Bridges

• Purpose of Research and Testing:

Understand the Benefits and Drawbacks of Using H-Bridges

• Features

• Bi-Directional Motor Control

• Four Transistor Configuration

• Provides Dynamic Breaking Capabilities

• Allows For Current Sensing

75

Page 77: Autonomous Robotic Boat Platform - Bradley University

H-Bridge Testing

• L298 H-Bridge

• Contains Two Internal H-Bridge Configurations

• Two Enable Signals

• Allows for a 150w motor(50v, 3A Max Rating)

• Fly Back Diode: 1N4004

• Motor

• 12V

• >2A While In Air

76

Page 78: Autonomous Robotic Boat Platform - Bradley University

L298 H-Bridge Internal Configuration

Image obtained from[7]77

Page 79: Autonomous Robotic Boat Platform - Bradley University

H-Bridge Free Running Motor Stop

78

Page 80: Autonomous Robotic Boat Platform - Bradley University

H-Bridge Dynamic Motor Stop

79

Page 81: Autonomous Robotic Boat Platform - Bradley University

H-Bridge Conclusion

• Benefits:

• Simple Configuration

• Easily Controllable

• Provides Bi-Directional Control

• Drawbacks:

• Large Power Dissipation

• The Internal BJT Configuration Has Constant Power Dissipation

• Limits Design

80

Page 82: Autonomous Robotic Boat Platform - Bradley University

Choosing A Transistor Type

• There Are Two Primary Transistor Types: MOSFET and BJT

MOSFET BJT

Output Is Controlled By Gate Voltage Output Is Controlled By Base Current

Positive Temperature Coefficients Negative Temperature Coefficients

Power Dissipation Depends On Internal

Resistance

Power Dissipation Depends Terminal

Voltage Differentials

High Gate Capacitance Low Gate Capacitance

Higher Switching Frequencies Lower Switching Frequencies

81

Page 83: Autonomous Robotic Boat Platform - Bradley University

Choosing A MOSFET

• IPP040N06N

• RDS max=4 mΩ

• VDS max=60 V

• ID max= 80 A

• QG max= 44nC

• IPP060N06N

• RDS max=6 mΩ

• VDS max=60 V

• ID max= 40 A

• QG max= 32nC

• IRLB8721PbF

• RDS max=8.7 mΩ

• VDS max=30 V

• ID max= 44 A

• QG max= 13nC

• IRLB8748PbF * *

• RDS max=4.8 mΩ

• VDS max=30 V

• ID max= 44 A

• QG max= 23nC

* * Indicates the current choice for the MOSFET configuration 82

Page 84: Autonomous Robotic Boat Platform - Bradley University

PWM Driven Transistor Configuration

• Purpose of Research and Testing :

Design a Transistor Switch Configuration Driven by a Microcontroller Generated PWM Controlled by an Analog Input.

83

Page 85: Autonomous Robotic Boat Platform - Bradley University

Block Diagram For System

84

Page 86: Autonomous Robotic Boat Platform - Bradley University

Design And Testing

• IRF520

• VDS Max = 100V

• RDS(ON) Max = 0.27 Ω

• Max Gate Charge = 16 nC

• Atmega168 Microcontroller

• Minimum Pin Output Voltage = 4.2V

• Maximum Pin Output Current = 40mA

• 2N2222A

• Hfe(Gain) = 75

• Max VCE(Sat) = 1.6V

• Max VBE(Sat) = 2.6V

Output Characteristics of the IRF520 obtained from[8]

85

Page 87: Autonomous Robotic Boat Platform - Bradley University

Observations of the Gate Input for the IRF520

Gate input with Rc equal to 1.2KΩ Gate input with Rc equal to 10KΩ Gate input with Rc equal to 100KΩ

86

Page 88: Autonomous Robotic Boat Platform - Bradley University

A4960 Specs

• Absolute Ratings

• Max Load Supply Voltage: 50 V

• Max Logic Supply Voltage: 6 V

• Max Sink Current: 150 mA

• Max Gate Output Turn on/off: 20 ns

• Max System Clock Period: 57 ns (17.5 MHz)

• Minimum Input Pulse Filter Time: 500 us (2 KHz)

87

Page 89: Autonomous Robotic Boat Platform - Bradley University

Three Phase Back EMF Output

Image obtained from [5]88

Page 90: Autonomous Robotic Boat Platform - Bradley University

IRF520 Circuit Configuration

Circuit 1:Motor Drive IRF520

Configuration

Circuit 2:IRF520 Test

Configuration

89

Page 91: Autonomous Robotic Boat Platform - Bradley University

Circuit Design for the Transistor Switch Configuration

90

Page 92: Autonomous Robotic Boat Platform - Bradley University

91

[source: wikipedia]

http://en.wikipedia.org/wiki/Hough_transform

= −

+

= +

Page 93: Autonomous Robotic Boat Platform - Bradley University

92

[source: wikipedia]

http://en.wikipedia.org/wiki/Hough_transform

Page 94: Autonomous Robotic Boat Platform - Bradley University

93

[source: wikipedia]

http://en.wikipedia.org/wiki/Hough_transform

Page 95: Autonomous Robotic Boat Platform - Bradley University

94

= +

= +

Page 96: Autonomous Robotic Boat Platform - Bradley University

95

Page 97: Autonomous Robotic Boat Platform - Bradley University

96

21HT Hough Transform Method

• Reduces the amount of memory required.

• Uses edge direction

• Two step process

1.) The center of any given circle is the intersection point of all the normal

lines from the circle edge. A 2-dimensional array is used to record the "votes"

along the normal line of each detected edge point.

2.) "To identify the radius of circles, the distance of each point from

a candidate center is calculated and a radius histogram is produced."

PROS: This method is low on storage space. Only a 2-d array is used and a 1-d

histogram.

CONS: If the radius threshold is very low (i.e. The 21HT is being used to detect

very small circles) there is a risk of many false peaks occurring in step 1. This

can increase the amount of computational work necessary in step 2.

Page 98: Autonomous Robotic Boat Platform - Bradley University

Gaussian Filtering

97

, =1

2

Page 99: Autonomous Robotic Boat Platform - Bradley University

98

OpenCV Results using:

• RGB Colorspace

• Gaussian Filtering

• Canny Edge Detection

• Hough Transform