The GUI based simulation was written in Matlab 2011a. A number of animated GIF files were made. In the table below, clicking on any image will start a gif animation in your browser. The animation will only run once. To run it again, please reload the web page using the reload button on the browser.
These are relatively large animation GIF files and might take 1-2 seconds to load depending on network bandwidth. To run them locally, they can be downloaded as well.
The following is the overall diagram of the half car model showing the body fixed speeds and coordinates in relation to the inertial frame of reference \(X,Y\).
The half car simulation mathematical model equations of motion will now be derived from first principles. The first step is to obtain an expression for the slip angle in terms of the speed of the center of mass of the car in body fixed coordinates. Once the slip angles expression are obtain, then forces are expressed in terms of these angles using the cornering coefficient.
Once the force on each tire is found, then \(F=ma\) is applied and hence the equation of motion of the center of mass of the car is obtained.
The slip angle is defined such that it opposes the force from the ground on the tire. Here we have the forces as positive in the vertical direction. Hence the slip angles will grow in the clockwise direction as shown below.
The following diagram shows the derivation of the expressions for slip angles \(\alpha _{f}\) and \(\alpha _{r}\) for the front and rear tires
Hence from the above diagram we have the following 2 equations\begin{align*} \alpha _f(t) &= \delta (t) - \tan ^{-1} \left ( \frac{V(t) + a r(t) }{U} \right ) \\ \alpha _r(t) &= \tan ^{-1} \left ( \frac{br(t) - V(t)}{U} \right ) \end{align*}
Now, we apply the cornering formula. This formula relates the force on the tire to the slip angles. Hence\begin{align*} Y_{f}(t) & =C_{f}\alpha _{f}(t) \\ Y_{r}(t) & =C_{r}\alpha _{r}(t) \end{align*}
The formula \(Y=C\alpha \) is similar to the relation between the force and displacement in the spring \(F=k\Delta \). Hence \(C_{r}\) and \(C_{f}\) are like stiffness parameters for the tire. The larger these parameters are, the larger the force on the tire will have to be to generate the same slip angle. The units of \(C_{r}\) and \(C_{f}\) are \(N/rad.\)
Now we apply \(F=ma\) to the lateral direction only, since we assume speed \(U\) is constant and hence no force in the longitudinal direction. We also apply moment equation around the c.g. of the car.
This results in the following 2 equations\[ m \left ( \dot{V} + r U \right ) = Y_r + Y_f \cos \delta (t) \] And the moment equation gives\[ I_z \dot{r} = Y_f \cos \delta - b Y_r\] By solving for \(\dot{V}\) and \(\dot{r}\) from the above we obtain
\begin{align*} \dot{V} &= \frac{ Y_f \cos \delta (t) }{m} + \frac{Y_r}{m} - r U\\ \dot{r} &= \frac{ Y_f \cos \delta (t) }{I_z} - \frac{b Y_r}{I_z} \end{align*}
Finally, to obtain the trajectory of the car, we transform back to inertial coordinates using the following 2 equations
\begin{align*} \dot{\theta }(t) & = r(t) \\ \dot{X}(t) & = U \cos \theta (t) - V(t) \sin \theta (t) \\ \dot{Y}(t) & = U \sin \theta (t) + V(t) \cos \theta (t) \end{align*}
The above equations are solved and the result displayed during simulation as described below
This table below is a description of each term in the above equations and all other parameters and variables used in the simulation
term |
meaning |
\(\alpha _{f}(t) \) |
slip angle at the front tire |
\(\alpha _{r}(t) \) |
slip angle at the rear tire |
\(Y_{f}(t) \) |
Lateral force at the front tire |
\(Y_{r}(t) \) |
Lateral force at the front tire |
\(\delta (t) \) |
steering angle \(\delta (t) =\delta _{0}\sin \left ( 2\pi ft\right ) \) |
\(f\) |
steering angle frequency used in finding \(\delta (t) \) in Hz (user input) |
\(\delta _{0}\) |
amplitude of \(\delta (t) \) in radians (user input) |
\(U\) |
forward speed on center of car. Constant. (user input when understeer else \(U=\lambda U_{crit}\)) |
\(\lambda \) |
speed multiplier to multiply \(U_{ciritial}\) with for the case when oversteer mode. (user input \(0.9,1,1.1\)) |
\(r(t) \) | yaw rate |
\(\theta (t) \) | angle car makes with inertial X axis. \(r=\frac{d\theta }{dt}\) |
\(X(t) \) |
global X coordinate of center of car |
\(Y(t) \) |
global Y coordinate of center of car |
\(C_{f}\) |
Corner coefficient of front tire (user input) |
\(C_{r}\) |
Corner coefficient of rear tire \(C_{r}=k_{u}\frac{a}{b}C_{f}\) |
\(m\) |
mass of car (user input) |
\(a\) |
distance from c.g. of car to front tire (user input) |
\(b\) |
distance from c.g. of car to the rear tire. (user input) |
\(k_{u}\) |
steering mode parameter. \(k_{u}>1\) means understeer, else oversteer (user input \(1.1,1,0.9\)) |
\(U_{critical}\) |
Critical speed over which car becomes unstable in oversteer mode. \(U_{crit}^{2}=\frac{\left ( a+b\right ) ^{2}C_{f}C_{r}}{m\left ( aC_{f}-bC_{r}\right ) }\) |
\(I_{z}\) |
moment of inertia of car around axis through its c.g. \(I_{z}=\frac{mab}{2}\) |
The following is the list of the linear equations that represent the dynamics of the car\begin{align*} \delta (t) & =\delta _{0}\sin \left ( 2\pi ft\right ) \\ \alpha _{f}(t) & =\delta (t) -\frac{V(t) +a\ r(t) }{U}\\ \alpha _{r}(t) & =\frac{ b\ r(t) -V(t) }{U}\\ Y_{f}(t) & =C_f \alpha _f(t) \\ Y_{r}(t) & =C_r \alpha _r(t) \\ \dot{V}(t) & =\frac{Y_f(t) }{m} + \frac{Y_r(t) }{m} - U r(t) \\ \dot{r}(t) & =\frac{a Y_f(t) }{I_z} - \frac{Y_r(t) b}{I_z} \\ \dot{\theta }(t) & =r(t) \\ \dot{X}(t) & =U \cos \theta (t) - V(t) \sin \theta (t) \\ \dot{Y}(t) & =U \sin \theta (t) +V(t) \cos \theta (t) \end{align*}
The following is the list of nonlinear equations that represent the dynamics of the car. Both the linear and non-linear equations are valid for small angles, but the equations below produces a more accurate result for small angles.\begin{align*} \delta (t) & =\delta _{0}\sin \left ( 2\pi ft\right ) \\ \alpha _{f}(t) & =\delta (t) -\tan ^{-1}\left (\frac{V(t) +a\ r(t) }{U}\right ) \\ \alpha _{r}(t) & =\tan ^{-1}\left ( \frac{b\ r(t)-V(t) }{U}\right ) \\ Y_{f}(t) & =C_{f}\alpha _{f}(t) \\ Y_{r}(t) & =C_{r}\alpha _{r}(t) \\ \dot{V}(t) & =\frac{Y_{f}(t) }{m}\cos \delta (t) +\frac{Y_{r}(t) }{m}-Ur(t)\\ \dot{r}(t) & =\frac{aY_{f}(t) \cos \delta (t) }{I_{z}}-\frac{Y_{r}(t) b}{I_{z}}\\ \dot{\theta }(t) & =r(t) \\ \dot{X}(t) & =U\cos \theta (t) -V(t)\sin \theta (t) \\ \dot{Y}(t) & =U\sin \theta (t) +V(t)\cos \theta (t) \end{align*}
Critical speed below car speed (multiplier = 0.9)
Critical speed the same as car speed (multiplier = 1)
Critical speed larger than speed (multiplier = 1.1)
The following summarizes the results observed from the simulation.
The car speed used was \(60\)m.p.h. The car remained stable and the yaw rate was sinusoidal but did not grow up in magnitude. The trajectory shows the car remained in an almost straight line.
The car speed used was \(60\)m.p.h. Also in this case the car remained stable and the yaw rate did not grow up in magnitude. The trajectory shows the car remained in exactly straight line during all the simulation time.
The mathematical model used predicted that when the car speed used is larger than a critical speed value, an eigenvalue will become unstable when \(k_{u}<1\). Hence the car would become unstable. The above result confirmed.
The model also predicted that when \(k_{u}\geq 1\), then the car will remain stable for any \(U\). And this was also confirmed by showing that the car was stable for \(k_{u}=1\) and \(k_{u}=1.1\) for different speed. This report shows the case for \(U=60mph\), but all other speeds tried generated similar results and the car remained stable as long as \(k_{u}\geq 1\).