Maplesoft Engineering Solutions team helps FLSmidth develop revolutionary mining equipment - User Case Studies - Maplesoft
﻿

# Case Study: Simulating Clearpath Robots in MapleSim

## A model created using MapleSim and the MapleSim Battery Library provides accurate battery voltage and state of charge during robot operation

Key challenges in robotic systems are that robots are expensive and they usually depend on batteries. What if you want to run an experiment with 100 robots, running for 10 hours? Clearpath Robotics, a global leader in unmanned vehicle robotics for research and development, knows these questions all too well. To address such concerns, Clearpath’s Robot Operating System has built-in support for robot simulation. While this works quite well, it is currently unable to simulate physical properties like batteries, temperature, or surface roughness. “If your robotics research depends on accurate models, you may want to consider looking at MapleSim - a high performance physical modeling and simulation tool developed by Maplesoft,” noted Ilia Baranov, Senior Electrical Designer of Clearpath Robotics. “Using MapleSim, we created a video of the Grizzly Robotic Utility Vehicle taking an open loop control path around a surface. Elements like current and voltage provided by the batteries, surface slipperiness, and weight distribution play a role in where the Grizzly actually ends up. The graphical representation in MapleSim is easy to understand and quick to modify.” Watch the simulation video below:

The MapleSim model features a 200 Ah lead-acid battery pack with a nominal voltage of 48 V, similar to the Type B battery pack used in the robot, to provide electrical power to move the vehicle on an uneven terrain. The lead acid battery used in the model is part of MapleSim Battery Library. The physical behaviors of the battery are described by mathematical expressions, which are curve-fitted based on experiment measurements, to provide the accurate battery voltage and state of charge during the operations of the robot.

The interaction forces and moments at the tire-terrain contact points are generated based on a 3D tire model in MapleSim. A 3D mathematical expression is used to describe the terrain surface to allow the tire-terrain contact points to be calculated based on the position of the vehicle. This 3D function is also used to generate the STL graphics of the terrain for animation.
The model also outputs electric motor torques, speeds, and battery state of charge as shown below:

MapleSim and Maple provide a testing and analyses environment, based on the virtual prototypes of the model, to perform several analyses:

• Virtual testing and analysis: an engineer can easily test the operations of the robot for any design in a virtual environment through simulations in MapleSim. Using Maple, different terrain surface conditions and tire force models to fit different test scenarios can be generated. As an example, the plot below shows different battery energy consumption (state of charge) rates under different terrain conditions.
• Battery optimization: the developed MapleSim model can be coupled with Maple’s powerful optimization toolboxes to determine the optimal battery size, and to optimize the Battery Management System (BMS) in order to minimize energy consumption, reduce battery temperature, and increase battery service life.
• Motor sizing: the robot is equipped with four electric motors which are independently controlled to provide wheel torques and steering maneuvers. The seamless integration with Maple will allow the motor sizing optimization to be performed based on MapleSim simulations.
• Chassis design and payload distribution: the virtual prototype of the system will allow engineers to easily vary payload locations and distributions as well as analyze their effects, e.g., roll-over, stability, controllability, etc., on certain tasks.
• Path planning: using Maple, different terrain surface conditions and tire force models to fit different test scenarios can be generated for path planning.
• Model-based controller design: the MapleSim model will allow the control strategies to be designed and tested for accuracy before being deployed on a real vehicle.
• Localization and mapping: the high-fidelity dynamic model of the robot will allow state estimation algorithms, such as Kalman filter and other Bayesian-based filtering algorithms, to be performed at a high accuracy.
• Optimized code generation: optimized C code can be generated from the MapleSim model for the purpose of implementations of control, localization, and path planning strategies.