Week 7 Challenge
The function blocks used are :
- Drive cycle source
- add
- subtract
- product
- divide
- compare
- constant
- gain
- anta
- switches
- integrator
- saturation
- derivative
- memory
- Goto & from tags
- terminator
- scope
The top view of the model

Top view of driver block subsystem which is nothing but the PID controller
Inputs : desired and actual velocity
output : acceleration & braking

Top view of vehicle model subsystem
input : Traction force
output : velocity

Top view of tractive force subsystem

Rolling resistance force = mass*gravity*roll coefficient *cos(angle)
Aerodynamic drag force = 0.5*Air density*area*drag coeff*sq(velocity)
Gradeability = mass*gravity*sin(angle)
Force of aceelration : The acceleration force refers to the vehicle resistance to speed varitaions This force holds you back when you increase your speed and also moves you forward when you slow down in other words it means that you consume energy to acclerate up to as certain speed but can recover part of that energy when you decelerate allowing you to drive a certain distance without consuming fuel
Results :
simulation for 598 seconds and the input drive cycle

Velocity of the vehicle obatined

Note : All the parameter input as been created as .mat file and model as well is attached as zip file