Top Banner
Autonomous Surface Vehicle Simulation Midn 2/C Kelly Klettner, CDR Paul Frontera and Prof. Matthew Feemster Motivation Design Approach The military is progressing towards more autonomous systems. This project introduces a simulated boat model into classroom learning that students can use to test control systems for surface vehicles without needing the real hardware. This prevents excessive time spent debugging code when testing the real hardware. Conclusion The overall simulation correctly implements a simulated autonomous surface vehicle. This model can be used to replace the hardware to avoid time consuming hardware testing of a control algorithm. The system is also significantly modular in that the vessel’s dynamics, the environmental noise contributors, and the sensor readings can be altered. Follow on research would include validation of the simulation with real hardware trials and adjusting the dynamic boat model to include more than a catamaran. Furthermore, wireless communication between the controller and Matlab would be ideal. References Problem Statement Related Work [1] T. Perez and M. Blanke, “Mathematical Ship Modeling for Control Applications,” Technical University of Demark Publications, 2002. [2] J. Saunders and R. Beard, “UAS Flight Simulation with Hardware-in-the-loop Testing and Vision Generation,” Journal of Intelligent and Robotic Systems, 2010. [3] R.A. Yulnandi, C. Machbub, and A.S. Prihatmanto, “Design and Implementation of Hardware-in-the-loop Simulation for Electric Ducted Fan Rocket Control System Using 8-Bit Microcontroller,” Journal of Mechatronics, Electical Power, and Vehicular Technology, 2017. [4] Q. Al Azze and M.H. Ali, “Design and Implementation of Pulse Width Modulation with Low-Cost Hardware-in-the-loop,” International Journal of Power Electronics and Drive Systems, 2020. Hardware-in-the-loop testing has been developed for many systems. Saunders and Beard [2] developed a modular HWIL testing system for UAS that include vision control and obstacle avoidance. Multiple research projects [3], [4] used a pairing of the Arduino 8-bit microcontroller with Matlab and/or Simulink. Midshipmen test code on the Kingfisher autonomous surface vehicle in the Severn River. Boat Model Given: a pre-existing boat model Develop: 1) A MATLAB simulation code that replicates the motion and plots the location of an autonomous surface vehicle 2) An integrated control loop with a microcontroller in order to ease testing procedures 3) Simulated environmental factors to prove the validity of the control in the simulation Outcome: a closed loop control system that simulates an autonomous surface vehicle’s movement in response to an input from a control algorithm running on a microcontroller Controller Model Analysis The controller used in the loop is an Mbed Microcontroller Board. It runs on an ARM Cortex-M. The controller takes the input from the simulation (heading, latitude, and longitude) and adjusts the forces accordingly. The dynamic boat model is run on Simulink in Matlab. It takes the force inputs from the Mbed and calculates the position data of the boat. The boat model analysis is discussed in more depth below. Forces Position Data Mbed Microcontroller. Computer acting as Kingfisher Vessel. Hardware-in-the-Loop Trajectory of Boat Model Hardware-in-the-loop (HWIL) testing replaces the actual hardware (the Kingfisher) with a simulator. The simulator calculates sensor data and returns the data to the controller. HWIL eases the cost of rigorous testing procedures in early stages of development. Disturbance When the input forces (fL, fR) from the Mbed are passed to Matlab, they are deconstructed into local input forces (fu, fv, tau) based on a catamaran model that is representative of the Kingfisher. After deconstruction, the local input forces are passed into the dynamic boat model. The flow of the dynamic boat model is given in the figure. The local forces inputs are first converted to local velocities. Then, the local velocities are converted to the global domain. Positional data is computed from the integral of the global velocities. The result of the model is the x and y coordinates and velocities and the heading data. The x and y data is converted from the North-East-Down reference frame to latitude and longitude. The latitude and longitude is then plotted on a world map. Dynamic Boat Model In addition to the base model, it was important to introduce simulated environmental factors. The addition of noise to the system helps test controllers’ response for many different situations. In the trajectory depicted to the right, a due North bias of 2 N was added. The trajectory with no environmental disturbance is shown in black. The trajectory with disturbance is shown in magenta. The three waypoints programmed into the controller are marked in red. 2 N Black – without disturbance Magenta – with disturbance Red – waypoints Set-up of HWIL: computer connected to Mbed controller
1

Autonomous Surface Vehicle Simulation

Feb 22, 2022

Download

Documents

dariahiddleston
Welcome message from author
This document is posted to help you gain knowledge. Please leave a comment to let me know what you think about it! Share it to your friends and learn new things together.
Transcript
Page 1: Autonomous Surface Vehicle Simulation

Autonomous Surface Vehicle SimulationMidn 2/C Kelly Klettner, CDR Paul Frontera and Prof. Matthew Feemster

Motivation Design ApproachThe military is progressing towards more autonomous systems. This project introduces a simulated boat model into classroom learning that students can use to test control systems for surface vehicles without needing the real hardware. This prevents excessive time spent debugging code when testing the real hardware.

ConclusionThe overall simulation correctly implements a simulated autonomous surface vehicle. This model can be used to replace the hardware to avoid time consuming hardware testing of a control algorithm. The system is also significantly modular in that the vessel’s dynamics, the environmental noise contributors, and the sensor readings can be altered.

Follow on research would include validation of the simulation with real hardware trials and adjusting the dynamic boat model to include more than a catamaran. Furthermore, wireless communication between the controller and Matlab would be ideal.

References

Problem Statement

Related Work

[1] T. Perez and M. Blanke, “Mathematical Ship Modeling for Control Applications,” Technical University of Demark Publications, 2002.

[2] J. Saunders and R. Beard, “UAS Flight Simulation with Hardware-in-the-loop Testing and Vision Generation,” Journal of Intelligent and Robotic Systems, 2010.

[3] R.A. Yulnandi, C. Machbub, and A.S. Prihatmanto, “Design and Implementation of Hardware-in-the-loop Simulation for Electric Ducted Fan Rocket Control System Using 8-Bit Microcontroller,” Journal of Mechatronics, Electical Power, and Vehicular Technology, 2017.

[4] Q. Al Azze and M.H. Ali, “Design and Implementation of Pulse Width Modulation with Low-Cost Hardware-in-the-loop,” International Journal of Power Electronics and Drive Systems, 2020.

Hardware-in-the-loop testing has been developed for many systems. Saunders and Beard [2] developed a modular HWIL testing system for UAS that include vision control and obstacle avoidance. Multiple research projects [3], [4] used a pairing of the Arduino 8-bit microcontroller with Matlab and/or Simulink.

Midshipmen test code on the Kingfisher autonomous surface vehicle in the Severn River.

Boat Model

Given: a pre-existing boat model

Develop:

1) A MATLAB simulation code that replicates the motion and plots the location of an autonomous surface vehicle

2) An integrated control loop with a microcontroller in order to ease testing procedures

3) Simulated environmental factors to prove the validity of the control in the simulation

Outcome: a closed loop control system that simulates an autonomous surface vehicle’s movement in response to an input from a control algorithm running on a microcontroller

Controller

Model Analysis

The controller used in the loop is an Mbed Microcontroller Board. It runs on an ARM Cortex-M. The controller takes the input from the simulation (heading, latitude, and longitude) and adjusts the forces accordingly.

The dynamic boat model is run on Simulink in Matlab. It takes the force

inputs from the Mbed and calculates the position data of the boat. The boat model

analysis is discussed in more depth below.

Forces

Position DataMbed Microcontroller.

Computer acting as Kingfisher Vessel.

Hardware-in-the-Loop

Trajectory of Boat Model

Hardware-in-the-loop (HWIL) testing replaces the actual hardware (the Kingfisher) with a simulator. The simulator calculates sensor data and returns the data to the controller. HWIL eases the cost of rigorous testing procedures in early stages of development.

Disturbance

When the input forces (fL, fR) from the Mbed are passed to Matlab, they are deconstructed into local input forces (fu, fv, tau) based on a catamaran model that is representative of the Kingfisher. After deconstruction, the local input forces are passed into the dynamic boat model. The flow of the dynamic boat model is given in the figure. The local forces inputs are first converted to local velocities.

Then, the local velocities are converted to the global domain. Positional data is computed from the integral of the global velocities. The result of the model is the x and y coordinates and velocities and the heading data. The x and y data is converted from the North-East-Down reference frame to latitude and longitude. The latitude and longitude is then plotted on a world map.

Dynamic Boat Model

In addition to the base model, it was important to introduce simulated environmental factors. The addition of noise to the system helps test controllers’ response for many different situations. In the trajectory depicted to the right, a due North bias of 2 N was added.

The trajectory with no environmental disturbance is shown in black. The trajectory with disturbance is shown in magenta. The three waypoints programmed into the controller are marked in red. 2 N

Black – without disturbanceMagenta – with disturbanceRed – waypoints

Set-up of HWIL: computer connected to Mbed controller