LabVIEW FPGA Programming BRUSHLESS DC MOTOR CONTROL · LabVIEW FPGA Programming BRUSHLESS DC MOTOR...
Transcript of LabVIEW FPGA Programming BRUSHLESS DC MOTOR CONTROL · LabVIEW FPGA Programming BRUSHLESS DC MOTOR...
LabVIEW FPGA Programming
BRUSHLESS DC MOTOR CONTROLEdin OmerdicSenior Research FellowMobile & Marine Robotics Research CentreUniversity of Limerick
Mobile & Marine Robotics Research Centre
University of Limerick
Outline
Brushless DC Motor ControlIntroduction
myRIO
T200 Thruster
Motor Control with PWM SignalIntroduction
Solution 1: PWM Signal Generation with Express VI
Solution 2: PWM Signal Generation with FPGA
Next Steps
Mobile & Marine Robotics Research Centre
University of Limerick
GNC Signal Flow
GNC Signal Flow
Weather routing
program
Trajectory
Generator
Motion Control
System
Control
Allocation
Fusion Marine Craft INS (GNSS + AHRS)
OA Sensors
(Radar, Cameras, etc.)
Observer
Weather
data
Waypoints
Guidance
System
Control
System
Obstacle
Avoidance
Module
Estimated
positions and
velocities Navigation
System
Waves, wind
and ocean
currents
Mobile & Marine Robotics Research Centre
University of Limerick
Brushless DC Motor ControlIntroductionmyRIO
myRIO
• 40 DIO
• 6 AO
• 10 AI
• 2 UART
•Audio In
•Audio Out
•Accelerometer
Features:
Mobile & Marine Robotics Research Centre
University of Limerick
Brushless DC Motor ControlIntroductionmyRIO
Mobile & Marine Robotics Research Centre
University of Limerick
Brushless DC Motor ControlIntroductionmyRIO
Mobile & Marine Robotics Research Centre
University of Limerick
Brushless DC Motor ControlIntroductionmyRIO
Real-Time & FPGA cRIO Architecture
Mobile & Marine Robotics Research Centre
University of Limerick
Brushless DC Motor ControlIntroductionmyRIO
Connectivity
•USB
•WiFi 802.11b,g,n
• (Optional) USB 2.0 – Gigabit Network Adapter Sabrent USB-G1000
Mobile & Marine Robotics Research Centre
University of Limerick
Brushless DC Motor ControlIntroductionmyRIO
What is inside FPGA?
Mobile & Marine Robotics Research Centre
University of Limerick
Brushless DC Motor ControlIntroductionT200 Thruster
T200 Thruster
•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
https://www.bluerobotics.com/store/thrusters/t200-thruster/
Mobile & Marine Robotics Research Centre
University of Limerick
Brushless DC Motor ControlIntroductionT200 Thruster
ESC (AfroESC 30A)
Motor Control with PWM Signal
Mobile & Marine Robotics Research Centre
University of Limerick
Brushless DC Motor ControlMotor Control with PWM SignalIntroduction
• 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 Research Centre
University of Limerick
Brushless DC Motor ControlMotor Control with PWM SignalIntroduction
myRIO
Mobile & Marine Robotics Research Centre
University of Limerick
Brushless DC Motor ControlMotor Control with PWM SignalIntroduction
myRIO-Oscilloscope Connection Diagram
Connector A: DIO8/PWM0
Connector A: GND
Mobile & Marine Robotics Research Centre
University of Limerick
Brushless DC Motor ControlMotor Control with PWM SignalSolution 1: PWM Signal Generation with Express VI
Motor Control with PWM Signal
Solution 1: PWM Signal Generation with Express VI
TPWM = 1/PWM Frequency (Hz)
Duty Cycle = Ts/TPWM
TPWM = 1/400 (Hz) = 2.5 (ms)
Ts(ms)
Mobile & Marine Robotics Research Centre
University of Limerick
Brushless DC Motor ControlMotor Control with PWM SignalSolution 1: PWM Signal Generation with Express VI
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 Research Centre
University of Limerick
Brushless DC Motor ControlMotor Control with PWM SignalSolution 1: PWM Signal Generation with Express VI
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 Research Centre
University of Limerick
Brushless DC Motor ControlMotor Control with PWM SignalSolution 1: PWM Signal Generation with Express VI
Mobile & Marine Robotics Research Centre
University of Limerick
Brushless DC Motor ControlMotor Control with PWM SignalSolution 1: PWM Signal Generation with Express VI
Taking into account motor friction (Dead Zone)!
nd > 0
nd < 0
nd = 0
Duty Cycle
Stopped Max Forward
Max Reverse
+1000-100
nd (%)
0.44
0.60
0.76
0.62
0.58
A+
B+
A-B-
Mobile & Marine Robotics Research Centre
University of Limerick
Brushless DC Motor ControlMotor Control with PWM SignalSolution 1: PWM Signal Generation with Express VI
Mobile & Marine Robotics Research Centre
University of Limerick
Solution 1: PWM Signal Generation with Express VI
myRIO – T200 Thruster Interconnection Diagram
Brushless DC Motor ControlMotor Control with PWM SignalSolution 1: PWM Signal Generation with Express VI
Mobile & Marine Robotics Research Centre
University of Limerick
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)
Brushless DC Motor ControlMotor Control with PWM SignalSolution 2: PWM Signal Generation with FPGA
Mobile & Marine Robotics Research Centre
University of Limerick
Brushless DC Motor ControlMotor Control with PWM SignalSolution 2: PWM Signal Generation with FPGA
Mobile & Marine Robotics Research Centre
University of Limerick
Brushless DC Motor ControlMotor Control with PWM SignalSolution 2: PWM Signal Generation with FPGA
Mobile & Marine Robotics Research Centre
University of Limerick
Brushless DC Motor ControlMotor Control with PWM SignalSolution 2: PWM Signal Generation with FPGA
Mobile & Marine Robotics Research Centre
University of Limerick
Brushless DC Motor ControlMotor Control with PWM SignalSolution 2: PWM Signal Generation with FPGA
Mobile & Marine Robotics Research Centre
University of Limerick
Brushless DC Motor ControlNext Steps
http://www.ni.com/compactrio/
http://www.ni.com/myrio/
https://www.ni.com/compactriodevguide/