Using DifferentialEquations.jl to solve a set of ODEsΒΆ

In this example we use two small packages along with DifferentialEquations.jl that can be downloaded by typing:

Pkg.clone("https://github.com/huckl3b3rry87/VehicleModels.jl")
Pkg.clone("https://github.com/huckl3b3rry87/PrettyPlots.jl")

Then, the example can be ran by going into the examples folder and typing:

include("test.jl")

This is a mock example, but it demonstrates the utility of DifferentialEquations.jl.

What we are doing is passing the control signals (optimized steering rate and longitudinal jerk) for a large-sized ground vehicle to a set of differential equations that describe the vehicle dynamics.

From the optimized data, we also have all of the states so we compare the results of the two models in this case. The two models should be very close, which they are for the most part, except where the optimized steering rate and longitudinal jerk are very jumpy.

_images/position.gif

For a closer look at the end (last optimization) of the static plots, look below.

Taking a look at the states:

_images/main.png

A closer look at the states and controls:

_images/longv.png _images/ax.png _images/jx.png _images/sa.png _images/sr.png _images/yaw.png _images/yr.png _images/latv.png _images/pp.png

The tire forces are:

_images/vt.png _images/lt.png