Symbolic and User-friendly Geometric Algebra Routines (SUGAR) for Computations in Matlab
Manel Velasco, Isiah Zaplana, Arnau Dória-Cerezo, Pau Martí
TL;DR
The paper addresses the barrier to adoption of geometric algebra in engineering by delivering SUGAR, a MATLAB toolbox that enables both symbolic and numerical GA, PGA, and CGA computations with high-dimensional support. It introduces a matrix-based MV representation and constructors (e.g., $\text{GA}(\text{signature})$, $\text{CGA}(\text{signature})$) that facilitate overloading of standard MATLAB operations, as well as functions for nontrivial multivector operations like $\exp$, $\log$, $\sin$, and $\cos$. Key contributions include a versatile MV class, symbolic-coefficient support, arrays/matrices of multivectors, and visualization tools, plus utilities for push/pull mappings between GA and CGA. The toolbox is validated through robotics-forward/inverse kinematics and power-system examples, demonstrating practical applicability in applied mathematics and engineering, with open-source availability under MIT license and potential for closed-form inverses and exponentials in broader GA contexts.
Abstract
Geometric algebra (GA) is a mathematical tool for geometric computing, providing a framework that allows a unified and compact approach to geometric relations which in other mathematical systems are typically described using different more complicated elements. This fact has led to an increasing adoption of GA in applied mathematics and engineering problems. However, the scarcity of symbolic implementations of GA and its inherent complexity, requiring a specific mathematical background, make it challenging and less intuitive for engineers to work with. This prevents wider adoption among more applied professionals. To address this challenge, this paper introduces SUGAR (Symbolic and User-friendly Geometric Algebra Routines), an open-source toolbox designed for Matlab and licensed under the MIT License. SUGAR facilitates the translation of GA concepts into Matlab and provides a collection of user-friendly functions tailored for GA computations, including support for symbolic operations. It supports both numeric and symbolic computations in high-dimensional GAs. Specifically tailored for applied mathematics and engineering applications, SUGAR has been meticulously engineered to represent geometric elements and transformations within two and three-dimensional projective and conformal geometric algebras, aligning with established computational methodologies in the literature. Furthermore, SUGAR efficiently handles functions of multivectors, such as exponential, logarithmic, sinusoidal, and cosine functions, enhancing its applicability across various engineering domains, including robotics, control systems, and power electronics. Finally, this work includes four distinct validation examples, demonstrating SUGAR's capabilities across the above-mentioned fields and its practical utility in addressing real-world applied mathematics and engineering problems.
