Rover Suspension Simulation

I created this simulation in Matlab as my final project for Dynamics II. It is a simulation of one half of the current rover's suspension, including the two sliding joints and the springs and dampers. This simulation uses Matlab's ODE45 solver to integrate states forward in time. I used the differentiated constraint approach to find the equations of motion for the system.

Simulation Matlab Newtonian Mechanics ODE45
Suspension Simulation

CAD Model

Figure 1: State Vector.

State Vector

The equations of motion are derived using the differentiated constraint approach. Because of this, the unknowns include xdd, ydd, and thdd for each body. The state vector then contains x, y, th, xd, yd, and thd for each body. The state contains 18 numbers at every time step.

CAD Model

Figure 2: Setup and Integration.

Integration

The equations were set up and solved symbolically once before integration. The ground is modeled as a very stiff spring-damper system, so the normal force changes from 0 if the wheel is in the air to the spring-damper equation if the wheel is on the ground. The results were saved to a matlab file, which is required due to the conditional logic in these normal force equations. The integration runs for 4 seconds, with a reasonable tolerance of 1E-5. This ensures that the constraint equations are satisfied while keeping the code running quickly. ODE15s is the chosen integration solver because of the springs in the system. I chose a stiff integrator to maintain numerical stability.

Video 1: Rover Suspension Sim Visualization.

Simulation Results

The simulation animation is shown on the left, and the results of the simulation are included below in three plots. The total system energy was also checked to verify validity of the simulation.