Challenge

Week 7 Challenge

Below are the vehicle parameters considered for this vehicle model:

m = 1200; % mass [kg]

g = 9.81; % gravity [m/s^2]

Cr = 0.015; % rolling resistance coefficient

rho = 1.225; % air density [kg/m^3]

Cd = 0.32; % drag coefficient

A = 2.2; % frontal area [m^2]

slope_deg = 5; % slope in degrees



VehicleDynamicsModel_Enhanced.slx

This model simulates the longitudinal dynamics of a vehicle, incorporating various real-world physical effects. Let’s break it down component by component:


Main Subsystems & Blocks

BlockDescription
Throttle Input (Time-Varying)Implements a step-based or custom function input to simulate gas pedal application over time.
Vehicle Mass(1/m)Implements Newton's 2nd Law a=Fma=mF​, used after summing all the forces.
Sum of Forces BlockAdds up all the forces: +Throttle Force, -Rolling Resistance, -Gravity Component, -Aerodynamic Drag.
IntegratorIntegrates acceleration to compute velocity over time. Output = vehicle velocity.
ScopeDisplays the velocity vs time. What you shared previously.
To WorkspaceExports velocity to MATLAB for plotting or analysis.


Force Components Modeled

ForceFormulaBlock Function
Throttle ForceFthrottle=Throttle Input×Max ForceFthrottle​=Throttle Input×Max ForceDerived from the input block
Rolling ResistanceFr=Cr⋅m⋅gFr​=Cr​⋅m⋅gResists motion due to tires
Gravity (Slope)Fg=m⋅g⋅sin⁡(θ)Fg​=m⋅g⋅sin(θ)Component of gravity on an incline
Aerodynamic DragFd=0.5⋅ρ⋅Cd⋅A⋅v2Fd​=0.5⋅ρ⋅Cd​⋅A⋅v2Increases with velocity squared


Simulation Behavior Based on the Model

  • 0–100 sec: Vehicle is idle (no throttle).

  • 100–130 sec: Throttle is applied → acceleration.

  • 130–500 sec: Vehicle reaches and maintains cruise speed.

  • After 500 sec: Throttle removed → resistance forces slow vehicle.

    Outputs

    • Scope: Visualizes vehicle velocity.

    • To Workspace Block: Sends velocity to MATLAB variable (vehicle_velocity)





      Understanding the vehicle velocity over time:

      Interpreting the Plot

      Time Axis (X-axis)

      • The horizontal axis runs from 0 to 598 seconds.

      • This aligns with your simulation stop time of 598 sec.

      Velocity Axis (Y-axis)

      • The vertical axis shows velocity, in what appears to be km/h or m/s (depending on your units in Simulink).

      • Values range from 0 up to ~100, then back down.


      Phases of the Simulation

      0–100 seconds:

      • Velocity remains at 0

      • No throttle or driving force applied. Vehicle is stationary.

      100–130 seconds:

      • Sharp acceleration

      • Throttle input kicks in (based on time-varying input).

      • Vehicle gains speed rapidly.

      130–500 seconds:

      • Steady high-speed cruising

      • Velocity plateaus around 100 units.

      • Net forces likely balance (engine force ≈ total resistive forces).

      • Vehicle moves at constant speed.

      500–598 seconds:

      • Deceleration phase

      • Likely the throttle input drops to zero or is reduced significantly.

      • Resistance forces (like drag, gravity on slope, rolling resistance) dominate.

      • Vehicle slows down and comes to a stop by ~598 sec.


      Real-World Interpretation

      This simulation mimics a typical driving scenario:

      1. Vehicle waits initially,

      2. Accelerates to cruising speed,

      3. Maintains that speed for some time,

      4. Then decelerates and stops.

      This behavior is likely driven by your time-varying throttle input combined with:

      • Rolling resistance

      • Aerodynamic drag

      • Gravity due to road slope

Your portfolio, next

Ship work like this
in your own course.

Talk to a career counsellor

Free 20-minute call. We'll map the right course to where you want to work.

By submitting you agree to our Terms and Privacy Policy.