Understanding Linear Algebra in Advanced Mobile Robotics
Delve into the fundamentals of linear algebra in the field of advanced mobile robotics with a focus on vectors, matrices, transformations, and operations. Explore topics such as vector addition, scalar products, dot products, linear dependence, and matrix transformations essential for autonomous vehicle technology. Learn from Dr. Carlotta A. Berry, a Ph.D. expert in mobile robotics, as you grasp the concepts crucial for path planning, localization, mapping, and sensor integration in robotics applications.
Download Presentation
Please find below an Image/Link to download the presentation.
The content on the website is provided AS IS for your information and personal use only. It may not be sold, licensed, or shared on other websites without obtaining consent from the author. Download presentation by click this link. If you encounter any issues during the download, it is possible that the publisher has removed the file from their server.
E N D
Presentation Transcript
Advanced Mobile Robotics Probabilistic Robotics Path Planning Localization Mapping Kinematics Sensors SLAM Advanced Mobile Robotics for Autonomous Vehicles Carlotta A. Berry, PhD
Lecture 1-1: Linear Algebra Learning Objectives Review vectors including scalar and dot products Review matrices, operations and properties Review matrix transformations including rotation and translation Advanced Mobile Robotics for Autonomous Vehicles Carlotta A. Berry, PhD
Vectors y a2 |a| q x a1
Scaling Vectors y b2 |b| a2 k |a| q x b1 a1
Adding Vectors Vector addition is commutative y ? = ? + ? = ? + ? Add vectors by drawing them head to tail ? ?2 ?1 ?2 +?1 ?1+ ?1 ?2+ ?2 ? = = = ?2 c = a + b x ? = ?1? + ?2? = ?1+ ?1? + ?2+ ?2? Advanced Mobile Robotics for Autonomous Vehicles Carlotta A. Berry, PhD
Dot Product of Vectors The inner product or dot product of vectors is a scalar ? ? = ? ? = ???? ? If the length or magnitude of vector a, |a| is one then the dot product of a and b returns the length of the projection of b along the direction of a. If the dot product of a and b is zero, ? ? = 0, the two vectors are orthogonal. Advanced Mobile Robotics for Autonomous Vehicles Carlotta A. Berry, PhD
Linear Dependence y a3 b a2 Vectors are linearly dependent if a vector can be obtained from the scale and sum of a other vectors. a1 x y ? = ???? ? k2a2 If there is no combination of gains, {??} , that creates b from the elements of a then it is independent from {??}. k1a1 k3a3 b x Advanced Mobile Robotics for Autonomous Vehicles Carlotta A. Berry, PhD
Lecture 1-1: Linear Algebra Learning Objectives Review vectors including scalar and dot products Review matrices, operations and properties Review matrix transformations including rotation and translation Advanced Mobile Robotics for Autonomous Vehicles Carlotta A. Berry, PhD
Matrices A matrix is a table of values ?11 ??1 ?1? ??? where the size n x m represents n rows and m A = columns A p-dimensional vector is the same as a p x 1 matrix Advanced Mobile Robotics for Autonomous Vehicles Carlotta A. Berry, PhD
Matrices and Column Vectors A matrix is a set of column vectors Advanced Mobile Robotics for Autonomous Vehicles Carlotta A. Berry, PhD
Matrices and Row Vectors A matrix is a set of row vectors Advanced Mobile Robotics for Autonomous Vehicles Carlotta A. Berry, PhD
The transpose of a matrix is when you swap the rows and columns Transpose of a Matrix ?11 ?1? ??1 ??? ??=
Matrix Scalar Multiplication For scalar multiplication, each element is multiplied by a scalar ??11 ???1 ??1? ???? ? = ?? = Advanced Mobile Robotics for Autonomous Vehicles Carlotta A. Berry, PhD
Matrix Addition The sum of two matrices is the piecewise sum of each element ?11+ ?11 ??1+??1 ?1?+ ?1? ???+??? ? = ? + ? = Advanced Mobile Robotics for Autonomous Vehicles Carlotta A. Berry, PhD
Matrix Vector Product The product of a matrix and a vector is the dot product of a row of the matrix and the vector b The vector Ab is a linearly dependent combination of the matrix A column vectors {a*i} with coefficients {bi} ?1 ?2 ?? ?1 ? ?2 ? ?? ? ?? = ? = = ?? ??? Advanced Mobile Robotics for Autonomous Vehicles Carlotta A. Berry, PhD
Matrix Vector Product ?1 ? ?2 ? ?3 ? 4 10 16 1 4 7 2 5 8 3 6 9 1 0 1 ?? = = = 4 2 5 8 3 6 9 1 4 7 = ?? ??? ?? = 1 + 0 + 1 = 10 16 Advanced Mobile Robotics for Autonomous Vehicles Carlotta A. Berry, PhD
Matrix Vector Product If the column vectors of A represent a reference system, then the product Ab computes the global transformation of the vector b according to column vectors, {a*i} Advanced Mobile Robotics for Autonomous Vehicles Carlotta A. Berry, PhD
Matrix Multiplication Matrix multiplication is the dot product of row and column vectors. It can also be defined as the linear combination of the columns of A scaled by the coefficients in the columns of B ?1 ? 1 ?2 ? 1 ?? ? 1 ?1 ? 2 ?2 ? 2 ?? ? 2 ?1 ? ? ?2 ? ? ?? ? ? ? = ?? = Advanced Mobile Robotics for Autonomous Vehicles Carlotta A. Berry, PhD
Matrix Multiplication Matrix multiplication is also the transformation of B s columns through matrix A ? = ?? = ?? 1 ?? 2 ?? ? 1 4 7 2 5 8 3 6 9 1 4 7 2 5 8 3 6 9 1 4 7 2 5 8 3 6 9 1 0 1 0 1 1 0 1 0 1 = 1 1 1 4 7 2 5 8 3 6 9 1 0 1 0 1 2 2 2 2 2 2 = 1 Advanced Mobile Robotics for Autonomous Vehicles Carlotta A. Berry, PhD
Lecture 1-1: Linear Algebra Learning Objectives Review vectors including scalar and dot products Review matrices, operations and properties Review matrix transformations including rotation and translation Advanced Mobile Robotics for Autonomous Vehicles Carlotta A. Berry, PhD
Matrix Rank The rank of a matrix is the maximum number of linearly independent rows(columns) The rank of an m x n matrix is greater than or equal to zero, ???? ? 0, where it is only zero for the null matrix The rank of an m x n matrix must be less than or equal to the minimum of m and n, ???? ? ??? ?,? To compute the rank of a matrix, use Gaussian elimination and count the number of non-zero rows Advanced Mobile Robotics for Autonomous Vehicles Carlotta A. Berry, PhD
Matrix Inverse Given ?? = ? If a matrix, A, has full rank ?? = ? has a unique solution, ? = ? 1 The ith row of A and the jth column of ? 1 are Orthogonal, their dot product is 0 if ? ? or their dot product is 1 if ? = ? Advanced Mobile Robotics for Autonomous Vehicles Carlotta A. Berry, PhD
Matrix Determinant The determinant is only defined for square matrices. The inverse of a matrix only exists if the matrix has full rank which means the ??? ? 0 The inverse of a matrix is defined as ?? 1= ? Advanced Mobile Robotics for Autonomous Vehicles Carlotta A. Berry, PhD
Matrix Determinant For a 2 x 2 matrix, the determinant is given by the following ?11 ?21 ?12 ?22 = ?11?22 ?12?21 1 3 2 4= 1 4 2 3 = 4 6 = 2 Advanced Mobile Robotics for Autonomous Vehicles Carlotta A. Berry, PhD
Matrix Determinant It gets more complicated for larger matrices The first step is to create the submatrix, Aij, by deleting the ith row and jth column of matrix A 1 4 7 2 5 8 3 6 9 ?21=2 3 9 ? = 8 Advanced Mobile Robotics for Autonomous Vehicles Carlotta A. Berry, PhD
Matrix Determinant ??? ? = ?11??? ??? ?11??? ??? + + 11+??1???? ??? ? 11+??1???? ??? ??? ? = ?=1 Where the cofactors of matrix A for (i,j) is ???= 11+???? ??? Where the cofactor expansion across the first row is given by ? ??? ? = ?11???+ ?12???+ + ?1????= ?1???? ?=1 Advanced Mobile Robotics for Autonomous Vehicles Carlotta A. Berry, PhD
Matrix Determinant For larger matrices, it is faster and easier to do Gaussian elimination first and then find the determine by using the triangular matrix. For a triangular matrix, the determinant is the product of the diagonal elements. ?1 0 0 0 ? ?2 0 0 ? = ??? ? = ?? ?3 0 ?=1 ?4 Advanced Mobile Robotics for Autonomous Vehicles Carlotta A. Berry, PhD
Properties of the Matrix Determinant Transpose:??? ? = ??? ?? Multiplication:??? ? ? = ??? ? ??? ? Row Operations: If B is the results of interchanging two rows in A then ??? ? = ??? ? If B is the product of a scaler c with matrix A then ??? ? = ? ??? ? If B is the result of adding a multiple of one row of matrix A to another row then ??? ? = ??? ? Advanced Mobile Robotics for Autonomous Vehicles Carlotta A. Berry, PhD
Orthogonal Matrix A matrix, Q, is orthogonal if and only if its column (row) vectors represent an orthonormal basis ? ? ?= 1 ?? ? = ? ?? ? ? ? ? 0 Some properties of an orthogonal matrix include the following: The transpose is the inverse ???= ??? = ? The determinant has a unity norm ??? ? = ??? ???= ??? ? ??? ??= ??? ?2= 1 Advanced Mobile Robotics for Autonomous Vehicles Carlotta A. Berry, PhD
Rotation Matrix A rotation matrix is an orthonormal matrix with determinant equal to 1 A 2D rotation matrix is given by ? ? =cos ? sin ? cos ? sin ? 3D rotations along the main axes are given by 1 0 0 cos ? 0 sin ? NOTE THAT ROTATIONS ARE NOT COMMUTATIVE 0 cos ? 0 sin ? 0 1 0 sin ? 0 cos ? sin ? cos ? ??? = ??? = Advanced Mobile Robotics for Autonomous Vehicles Carlotta A. Berry, PhD
Translation Matrix A matrix can be used to represent the rotation and translate in a 3D transformation This matrix takes into account the noncommutative property of transformations where R is the rotation matrix and t is the translation vector ? =? ? 1 ??? 1 0 ? 1=?? 0 ? 1 ? = Advanced Mobile Robotics for Autonomous Vehicles Carlotta A. Berry, PhD
Transformation Example 1 object y Matrix A represents the pose of a robot in space Matrix B represents the position of a sensor on the robot The sensor perceives an object at a given location, p. The sensor is in its own reference frame which means it has no context of its location in the global reference frame Where is the object in the global reference frame? Carlotta A. Berry, PhD p B A robot x Advanced Mobile Robotics for Autonomous Vehicles
Transformation Example 1 To solve for the location of the object in the global reference frame, chain the transformations together The pose of the object with respect to the robot reference frame is Bp y p B x Advanced Mobile Robotics for Autonomous Vehicles Carlotta A. Berry, PhD
Transformation Example 1 y A x
Transformation Example 2 y (x1, y1) x
Transformation Example 2 y If the robot moves from position ? = ?1,?1,?1 ? = ?2,?2,?2 the global reference frame, what is the new pose with respect to A? ? to position ?with respect to (x2, y2) x 1 ???= ??? ??? ???= ??? Advanced Mobile Robotics for Autonomous Vehicles Carlotta A. Berry, PhD