Thruster Control using LabVIEW Real-Time & FPGA Graphical ... · University of Limerick. Mobile &...
Transcript of Thruster Control using LabVIEW Real-Time & FPGA Graphical ... · University of Limerick. Mobile &...
Mobile & Marine Robotics
www.mmrrc.ul.ie
Edin OmerdicSenior Research Fellow
Mobile & Marine Robotics Research Centre
University of Limerick
Thruster Control using LabVIEWReal-Time & FPGA Graphical Programming
Contact:
Edin Omerdic
University of Limerick
Mobile & Marine Robotics
Outline
Introduction 15:00 – 15:30 (30 min)
RT&FPGA Tutorial: Motor Control with PWM Signal
Group 1 15:30 – 16:15 (45 min)Group 2 16:15 – 17:00 (45 min)Group 3 17:00 – 17:45 (45 min)
Mobile & Marine Robotics
Introduction
myRIO
• 40 DIO
• 6 AO
• 10 AI
• 2 UART
• Audio In
• Audio Out
• Accelerometer
Features:
Mobile & Marine Robotics
Introduction
Mobile & Marine Robotics
Introduction
Mobile & Marine Robotics
Introduction
Real-Time & FPGA cRIO Architecture
Mobile & Marine Robotics
Introduction
• USB
• WiFi 802.11b,g,n
• (Optional) USB 2.0 – Gigabit Network Adapter Sabrent USB-G1000
Connectivity:
Mobile & Marine Robotics
Introduction
What is inside FPGA?
Mobile & Marine Robotics
T200 Thruster
FPGA Tutorial
• Operating Voltage: 6-20V
• Max Current: 25A
• Max Power: 350W
• Max Forward Thrust (16V) 5.1kgf
• Max ReverseThrust (16V) 4.1kgf
• Max Forward Thrust (12V) 3.5kgf
• Max ReverseThrust (12V) 3.0kgf
Motor Control with PWM Signal
https://www.bluerobotics.com/store/thrusters/t200-thruster/
Mobile & Marine Robotics
ESC (AfroESC 30A)
FPGA Tutorial
Motor Control with PWM Signal
Mobile & Marine Robotics
FPGA Tutorial
Motor Control with PWM Signal
• Signal Voltage: 3.3-5V
• Max Update Rate: 400Hz
• Stopped: 1500ms
• Max Forward: 1900ms
• Max Reverse: 1100ms
PWM Signal:
TPWM = 1/400Hz = 2500ms
Stopped
TS = 1500ms
TPWM = 1/400Hz = 2500ms
Max Forward
TS = 1900ms
TPWM = 1/400Hz = 2500ms
Max Reverse
TS = 1100ms
Mobile & Marine Robotics
myRIO
FPGA Tutorial
Motor Control with PWM Signal
Mobile & Marine Robotics
myRIO-Oscilloscope Connection Diagram
FPGA Tutorial
Motor Control with PWM Signal
Connector A: DIO8/PWM0
Connector A: GND
Mobile & Marine Robotics
Solution 1: PWM Signal Generation with Express VI
FPGA Tutorial
Motor Control with PWM Signal
TPWM = 1/PWM Frequency (Hz)
Duty Cycle = Ts/TPWM
TPWM = 1/400 (Hz) = 2.5 (ms)
Ts(ms) Live Demo: RT_Main.vi
Mobile & Marine Robotics
Solution 1: PWM Signal Generation with Express VI
FPGA Tutorial
Motor Control with PWM Signal
TPWM = 2.5 (ms)
Stopped
TS = 1.5 (ms)
TPWM = 2.5 (ms)
Max Forward
TS = 1.9 (ms)
TPWM = 2.5 (ms)
Max Reverse
TS = 1.1 (ms)
Duty Cycle = 0.60
Duty Cycle = 0.76
Duty Cycle = 0.44
Stopped Max Forward
Max Reverse
+1000-100
nd (%)
Duty Cycle
0.44
0.60
0.76
Mobile & Marine Robotics
Solution 1: PWM Signal Generation with Express VI
FPGA Tutorial
Motor Control with PWM Signal
Stopped Max Forward
Max Reverse
+1000-100
nd (%)
Duty Cycle
0.44
0.60
0.76
11
12
12
12
12
1
1 yxxxx
yyy
xx
yy
xx
yy
x2x1
x
x
y1
y2
y
y
Note: Motor friction (Dead Zone problem) neglected!
Mobile & Marine Robotics
Solution 1: PWM Signal Generation with Express VI
FPGA Tutorial
Motor Control with PWM Signal
Live Demo: RT_Main2.vi
Mobile & Marine Robotics
Solution 1: PWM Signal Generation with Express VI
FPGA Tutorial
Motor Control with PWM Signal
Duty Cycle
Stopped Max Forward
Max Reverse
+1000-100
nd (%)
0.44
0.60
0.76
0.62
0.58
A+
B+
A-B-
Taking into account motor friction (Dead Zone)!
nd > 0
nd < 0
nd = 0
Mobile & Marine Robotics
Solution 1: PWM Signal Generation with Express VI
FPGA Tutorial
Motor Control with PWM Signal
Taking into account motor friction (Dead Zone)!
Live Demo: RT_Main3.vi
Mobile & Marine Robotics
Solution 1: PWM Signal Generation with Express VI
FPGA Tutorial
Motor Control with PWM Signal
myRIO – T200 Thruster Interconnection Diagram
Mobile & Marine Robotics
Solution 2: PWM Signal Generation with FPGA
FPGA Tutorial
Motor Control with PWM Signal
FPGA Clock Frequency: fFPGA = 40MHz
FPGA Tick Period: TFPGA = 1/40MHz = 25ns
TPWM = 1/400 (Hz) = 2.5 (ms)
CPWM (ticks) = TPWM / TFPGA = 100000 (ticks)
(Ts/TPWM) * CPWM (ticks)
TPWM = 2.5 (ms)
Ts(ms)
CPWM = 100000 (ticks)
TPWM = 2.5 (ms)
Stopped
TS = 1.5 (ms)
TPWM = 2.5 (ms)
Max Forward
TS = 1.9 (ms)
TPWM = 2.5 (ms)
Max Reverse
TS = 1.1 (ms)
CS = 60000 (ticks)
CS = 76000 (ticks)
CPWM = 100000 (ticks)
CS = 44000 (ticks)
Mobile & Marine Robotics
Solution 2: PWM Signal Generation with FPGA
FPGA Tutorial
Motor Control with PWM Signal
Mobile & Marine Robotics
Solution 2: PWM Signal Generation with FPGA
FPGA Tutorial
Motor Control with PWM Signal
Mobile & Marine Robotics
Solution 2: PWM Signal Generation with FPGA
FPGA Tutorial
Motor Control with PWM Signal
Mobile & Marine Robotics
Solution 2: PWM Signal Generation with FPGA
FPGA Tutorial
Motor Control with PWM Signal
Mobile & Marine Robotics
Next Steps
http://www.ni.com/compactrio/
http://www.ni.com/myrio/
https://www.ni.com/compactriodevguide/