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.
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.
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.
Project Gallery
Figure 5: ፀ of System w/ 10N Applied Force and ፀi=12॰
Figure 6: X Positions of System w/ 10N Applied Force and ፀi=12॰
Figure 7: Y Positions of System w/ 10N Applied Force and ፀi=12॰