Force Modeling, Quaternion PID, and Optimization

Similar documents
A simple example. Assume we want to find the change in the rotation angles to get the end effector to G. Effect of changing s

Selection and Integration of Sensors Alex Spitzer 11/23/14

5. GENERALIZED INVERSE SOLUTIONS

A Simplified Vehicle and Driver Model for Vehicle Systems Development

3D Transformations. CS 4620 Lecture 10. Cornell CS4620 Fall 2014 Lecture Steve Marschner (with previous instructors James/Bala)

What Is SimMechanics?

Chapter 3: Kinematics Locomotion. Ross Hatton and Howie Choset

Virtual Environments

For each question, indicate whether the statement is true or false by circling T or F, respectively.

Design and Development of Unmanned Tilt T-Tri Rotor Aerial Vehicle

3D Transformations. CS 4620 Lecture Kavita Bala w/ prior instructor Steve Marschner. Cornell CS4620 Fall 2015 Lecture 11

Vector Algebra Transformations. Lecture 4

Lecture VI: Constraints and Controllers. Parts Based on Erin Catto s Box2D Tutorial

Answers. Chapter 2. 1) Give the coordinates of the following points:

CALCULATING TRANSFORMATIONS OF KINEMATIC CHAINS USING HOMOGENEOUS COORDINATES

MAT 003 Brian Killough s Instructor Notes Saint Leo University

THE VIEWING TRANSFORMATION

AUTONOMOUS PLANETARY ROVER CONTROL USING INVERSE SIMULATION

Centroid Principles. Object s center of gravity or center of mass. Graphically labeled as

Geometric Transformations

Quaternion Rotations AUI Course Denbigh Starkey

Computer Animation. Algorithms and Techniques. z< MORGAN KAUFMANN PUBLISHERS. Rick Parent Ohio State University AN IMPRINT OF ELSEVIER SCIENCE

Linear algebra deals with matrixes: two-dimensional arrays of values. Here s a matrix: [ x + 5y + 7z 9x + 3y + 11z

Zero Robotics Autonomous Space Capture Challenge Manual

a a= a a =a a 1 =1 Division turned out to be equivalent to multiplication: a b= a b =a 1 b

Basic Elements. Geometry is the study of the relationships among objects in an n-dimensional space

Therefore, after becoming familiar with the Matrix Method, you will be able to solve a system of two linear equations in four different ways.

Chapter 15 Introduction to Linear Programming

Graphics and Interaction Transformation geometry and homogeneous coordinates

COMP30019 Graphics and Interaction Transformation geometry and homogeneous coordinates

State Space System Modeling of a Quad Copter UAV

Keywords: UAV, Formation flight, Virtual Pursuit Point

ROBOTICS 01PEEQW. Basilio Bona DAUIN Politecnico di Torino

Robotics (Kinematics) Winter 1393 Bonab University

Written exams of Robotics 2

CS184: Using Quaternions to Represent Rotation

Cecilia Laschi The BioRobotics Institute Scuola Superiore Sant Anna, Pisa

Development of a Ground Based Cooperating Spacecraft Testbed for Research and Education

Autonomous Navigation for Flying Robots

Interlude: Solving systems of Equations

Estimation of Altitude and Vertical Velocity for Multirotor Aerial Vehicle using Kalman Filter

SUPPORTING LINEAR MOTION: A COMPLETE GUIDE TO IMPLEMENTING DYNAMIC LOAD SUPPORT FOR LINEAR MOTION SYSTEMS

Design of a dynamic simulation system for VR applications

Geometric transformations in 3D and coordinate frames. Computer Graphics CSE 167 Lecture 3

Basics of Computational Geometry

Vector Calculus: Understanding the Cross Product

Quaternions and Dual Coupled Orthogonal Rotations in Four-Space

MAT 090 Brian Killough s Instructor Notes Strayer University

2-9 Operations with Complex Numbers

Dynamical Modeling and Controlof Quadrotor

Haga's Origamics. Haga's Origamics are a series of activities designed to illustrate the science behind simple paper folding.

Lesson 1: Introduction to Pro/MECHANICA Motion

Interactive Math Glossary Terms and Definitions

Lesson #6: Basic Transformations with the Absolute Value Function

x = 12 x = 12 1x = 16

CS612 - Algorithms in Bioinformatics

Camera Drones Lecture 2 Control and Sensors

2D/3D Geometric Transformations and Scene Graphs

Proceedings of the 2013 SpaceVision Conference November 7-10 th, Tempe, AZ, USA ABSTRACT

PSE Game Physics. Session (3) Springs, Ropes, Linear Momentum and Rotations. Oliver Meister, Roland Wittmann

Automatic Control Industrial robotics

QUANSER Flight Control Systems Design. 2DOF Helicopter 3DOF Helicopter 3DOF Hover 3DOF Gyroscope. Quanser Education Solutions Powered by

Robust Controller Design for an Autonomous Underwater Vehicle

13. Learning Ballistic Movementsof a Robot Arm 212

Inverse Kinematics. Given a desired position (p) & orientation (R) of the end-effector

CMSC 425: Lecture 6 Affine Transformations and Rotations

navigation Isaac Skog

The goal is the definition of points with numbers and primitives with equations or functions. The definition of points with numbers requires a

SPARTAN ROBOTICS FRC 971

Vision-based Localization of an Underwater Robot in a Structured Environment

Robots are built to accomplish complex and difficult tasks that require highly non-linear motions.

Navigational Aids 1 st Semester/2007/TF 7:30 PM -9:00 PM

Cam makes a higher kinematic pair with follower. Cam mechanisms are widely used because with them, different types of motion can be possible.

CS354 Computer Graphics Rotations and Quaternions

Honors Precalculus: Solving equations and inequalities graphically and algebraically. Page 1

Using Adams/View to Develop a Real-Time ROV Simulator

Math background. 2D Geometric Transformations. Implicit representations. Explicit representations. Read: CS 4620 Lecture 6

AMSTERDAM BOSTON HEIDELBERG LONDON NEW YORK OXFORD PARIS SAN DIEGO SAN FRANCISCO SINGAPORE SYDNEY TOKYO F ^ k.^

Robot. A thesis presented to. the faculty of. In partial fulfillment. of the requirements for the degree. Master of Science. Zachary J.

Animation. Computer Graphics COMP 770 (236) Spring Instructor: Brandon Lloyd 4/23/07 1

Quaternions & Rotation in 3D Space

Introduction to Solid Modeling Using SolidWorks 2008 COSMOSMotion Tutorial Page 1

Animations in Creo 3.0

1 EquationsofLinesandPlanesin 3-D

1. INTRODUCTION. Constrained Control Allocation for Systems with Redundant Control Effectors

Quaternions and Euler Angles

Generalized Network Flow Programming

Carnegie LearningĂ’ Middle School Math Solution Correlations Course 3 NCSCoS: Grade 8

S U N G - E U I YO O N, K A I S T R E N D E R I N G F R E E LY A VA I L A B L E O N T H E I N T E R N E T

Structure and Synthesis of Robot Motion

Introduction to Homogeneous coordinates

Application of Hydrodynamics and Dynamics Models for Efficient Operation of Modular Mini-AUVs in Shallow and Very-Shallow Waters

ALGORITHMS FOR DETECTING DISORDERS OF THE BLDC MOTOR WITH DIRECT CONTROL

ME 115(b): Final Exam, Spring

BIG Data How to handle it. Mark Holton, College of Engineering, Swansea University,

Agile Mind Mathematics 6 Scope and Sequence, Indiana Academic Standards for Mathematics

Spatial Enhancement Definition

A-SSE.1.1, A-SSE.1.2-

Geometric transformations assign a point to a point, so it is a point valued function of points. Geometric transformation may destroy the equation

Chapter 3 Path Optimization

Transcription:

Cornell University Autonomous Underwater Vehicle Team Spring 2014 Force Modeling, Quaternion PID, and Optimization Technical Report Alex Spitzer (aes368) May 11, 2014

Contents 1 Abstract 2 2 Previous Designs 2 3 Design Requirements 2 4 High Level Description 3 5 Implementation 4 5.1 Buoyancy Force.......................... 4 5.2 Drag Forces............................ 4 5.3 Quaternion PID.......................... 6 5.4 Optimization........................... 6 6 Current Status 7 7 Known Issues and Future Improvements 7 1 Spring 2014

1 Abstract Our vehicle is designed to have passive pitch and roll control. To achieve this, Gemini has been mechanically designed to have its center of buoyancy above its center of mass. In order to accurately transition the vehicle from one state to the next, it is advantageous to be able to describe the forces acting on the vehicle in any given state. With this knowledge we can accurately impart a desired total force on the vehicle using the thrusters to pick up any slack left by the passive forces. In addition, a quaternion PD loop is presented that provides the desired angular acceleration needed to transition the vehicle from one orientation to another. Efficient optimization is performed by finding the least norm solution to an underdetermined linear system. 2 Previous Designs Previously, the PID loop outputs were interpreted as the forces and torques that the thrusters of the vehicle should provide. Since a PID loop is essentially a function of the error between a desired value and a measured value, it is difficult to utilize in a situaion where the output should depend on the absolute value of the quantity in question. Thus to make it work, we have resorted to integral term tricks that implicitly encode the underlying system behavior such as zeroing the integral term when the error changes sing or zeroing the integral term when the desired value is zero. For orientation control, the integral term is forced to encode complicated non linear behavior. Furthermore, the integral term takes time to build up and does not provide the quickest response. 3 Design Requirements One of the major motivations behind passive force modeling was to allow our PID loops to be able to provide a accurate and sharp response at any vehicle state. When the vehicle has a non trivial pitch and/or roll angle, there is a very strong buoyancy force that is torquing the vehicle. In order to steadily maintain such an orientation, that passive torque due to the buoyancy force must be compensated for. Another motivation was to be able to reduce the negative effects that drag 2 Spring 2014

has on vehicle control. Certain areas of the vehicle produce less drag than others and as such, the vehicle can torque in complicated ways when moving at speed. The ability to anticipate these torques will greatly improve the sub s maneuverability. 4 High Level Description The above flowchart illustrates the flow of information through every control step. First, the PID loops run and the resulting outputs are interpreted as desired vehicle accelerations. The accelerations are then used to calculate desired forces 1 with the help of mass or the inertia tensor. 2 After that, the passive forces on the vehicle are subtracted from the desired forces to obtain the forces 3 the thrusters must provide. This is motivated by the following equation: F d = F p + F t = F t = F d F p, where F d is the desired force on the vehicle, F p is the passive force on the vehicle, and F t is the force on the vehicle due to the thrusters. Once we have a desired thruster force, we can feed it into the optimizer to set the correct motor values. 1 We have both a desired linear acceleration and angular acceleration, and those are converted to a force and a torque respectively. 2 Only the inertia tensor is used. The mass scales irrespective of direction and as such, multiplying the accelerations by the mass will only change the magnitude of the optimal PID loop gains 3 Again, forces here is used to mean both a force and a torque 3 Spring 2014

5 Implementation 5.1 Buoyancy Force In order to calculate the forces and torques due to buoyancy, three things are needed: the center of buoyancy in relation to the center of mass, the mass of the vehicle, and the volume of the vehicle. The volume of the vehicle can be used to find the strength of the buoyancy force but in practice the strength of the buoyancy force and strength of the gravitational force are tunable parameters. The above diagram illustrates how the buoyancy force can induce a torque on the vehicle. Gravity acts through the center of mass, so it does not induce any torque. The torque on the vehicle is r F. The buoyancy torque calculation is done in world space. First, the center of buoyancy is rotated by the orientation of the vehicle. After that, the cross product of the center of buoyancy with the force vector (buoyancy always points up) will yield the torque on the vehicle. The force due to buoyancy is much simpler. It is simply the different in strength of the buoyancy force and the gravity force. The resulting force points either up or down, corresponding to the sub s positive or negative buoyancy respectively. 5.2 Drag Forces To calculate drag forces, a grossly simple model is assumed: the sub is composed of orthogonal flat planes, some larger than others. Here is an 4 Spring 2014

example of a drag plane initialization: # The fore sway plane, produces drag when swaying drag_planes.append(dragplane(pos=np.array((0.5, 0., 0.)), normal=np.array((0., 1., 0.)), cd=40.0, area=0.2)) The center of this plane is at the towards the front of the sub, and its normal vector is pointing to the side indicating that this plane produces drag when the vehicle is swaying. C d and area are two values that in the actual computation get multiplied together, so one can affect the strength of the drag by tweaking both of the variables, though I recommend playing with C d, as area can be computed exactly and it makes more sense when subdividing. There should be another sway drag plane accompanying the above, whose center is at (-0.5, 0, 0). By adjusting the difference in drag coefficients of the two planes, one can effecitvely model induced heading torque when swaying. For example, say that battery pods really drag the vehicle down. Then, the aft sway plane should have a C d higher than that of the fore sway plane and the controller will correctly calculate that the sub s orientation will tend to increase in heading when swaying to the right. Similar subdivisions can be done for other planes to simulate different induced torques. As far as implementation goes, the force and torque calculations are similar to those for the buoyancy force. The position and normal of each plane is first rotated by the orientation of the vehicle. Then the velocities of the vehicle, which are reported by the Kalman filter in the forward, sway, and depth directions are rotated by the heading of the vehicle to bring them to world space. The resulting velocity is then dotted with the normal of each plane to determine the strength of the drag force that plane is providing. Identically to the buouyancy torque calculations, to find the torque induced by a given plane, the plane s center is crossed with its normal and then multiplied by the strength of the force. An important aspect that is as of yet not implemented, is the drag forces and torques induced by the angular velocity of the vehicle. This will be important if effects such as rolling when quickly changing heading wish to be addressed. 5 Spring 2014

5.3 Quaternion PID With the aim of smooth transitions from one orientation to any other, a quaternion PD loop was implemented. This loop first creates two quaternions, one for the current orientation, and one for the desired orientation. The difference quaternion is then found by multiplying the desired quaternion by the conjugate (inverse) of the current quaternion. The resultant quaternion has the property that when multiplied by the current quaternion, will produce the desired quaternion. We can find the axis of rotation of this quaternion and that will be the direction of the outputted angular acceleration. The error of this PD loop, is then the angle of rotation the difference quaternion described about the axis of rotation. A large angle indicates that we are far from our desired orientation, while a small angle indicates that we are close. Derivative action is easily implemented by saving the previous angle and subtracting it from the current angle. The outputted angular acceleration needs to be in world coordinates so before returning the difference quaternion axis, we transform it into world coordinates by multiplying it by the current orientation quaternion. Integral action is not implemented in this control loop as there should not be any need for it (we are modeling passive forces) and will probably complicate things. 5.4 Optimization The task of picking the motor values the yield the desired force and torque on the vehicle is performed by the optimizer. The optimizer is equipped with a thrusts to output matrix, which when multiplied by a vector of motor thrusts, will produce the 6 dimensional vector of (force, torque) that those motor values produce on the sub. This is essentially your standard Ax = b linear algebra problem. However, A is not a square matrix. A is 6 n, where n is the number of thrusters on the vehicle. For Gemini, n = 8, implying that (since the thrusters are placed strategically on the vehicle) the system is underdetermined. You may recall that this means there an infinite number of solutions to Ax = b. In the interest of efficiency, we would like to find the solution that has the smallest absolute value. Here is the solution: x = A T (AA T ) 1 b See this scholarly presentation for an explanation. The resulting solution x always completely meets the desires, but it is not always within the allowed thruster bounds. If it is outside the thruster 6 Spring 2014

bounds, we rely on a blackbox optimization routine to find the minimum least squares error inside the allowed bounds. The follwing objective function is used for minimization: (W (Ax b)) 2, where W is a diagonal matrix of weights used to prioritize torques or other DOFs. Its derivative is used as an argument to the black box routine and greatly speeds up the convergence: 2(W (Ax b))(w A) T = 2A T W 2 (Ax b). 6 Current Status Currently, everything in this report is in use on the sub and has performed well at several pool tests. 7 Known Issues and Future Improvements There are no glaring issues but there are plenty of areas for improvement. Use angular velocities when calculating drag Use more drag planes for a more accurate drag force compensation Very dependent on correctness of model, it would be nice if this was more robust to changes in the vehicle s dynamics, pursuing a machine learning or adaptive approach might prove lucrative 7 Spring 2014