Project
AIM :
To study and analyze the BAJA All Terrain Vehicle (ATV) model using Simulink and compare between different models.
OBJECTIVES :-
- To Prepare a technical report explaining the functions of the subsystems & blocks used for preparing the model
- To Explain in detail all the differences between all the five models provided
- To undertand and comment on the results
TYPES OF MODEL studied:-
- BAJA ATV model without Dashboard(cvtModel)
- BAJA ATV model - Data Extraction(cvtModel_data)
- BAJA ATV model with Dashboard(cvtModel_dashboard)
- BAJA ATV model – Mapped Lookup Table without Dashboard(cvtModel_mapped)
- BAJA ATV model – Mapped Lookup Table with Dashboard(cvtModel_dashboard_mapped)
Introduction:
All-Terrain Vehicle:
- An all-terrain vehicle (ATV) is defined as a motorized off-highway vehicle designed to travel on four low-pressure or non-pneumatic tires, having a seat designed to be straddled by the operator and handlebars for steering control.
- It is also known as a quad or quadricycle type vehicle.
- The development of the All Terrain Vehicles started way back in the early 19th century. In 1893, Royal Enfield manufactured and sold the first powered quadricycle. The vehicle employed many bicycle components such as the handle bars. However, it was mainly designed for use as a horseless carriage for road use.
- ATVs are subdivided into two types as designated by the manufacturer
Type I ATVs are intended by the manufacturer for use by a single operator and no passenger.

BAJA SAE:
Baja SAE is an collegiate design series competition run by the Society of automotive engineers (SAE International). Teams of students from universities all over the world design and build small off-road cars. The cars all have engines of the same specifications. As of 2018 the engine has been an unmodified briggs and stratton Model 19 Vanguard engine single cylinder with a displacement of 305cc and power output of approximately 10 bhp (7.5 kW).
The goal in Baja SAE racing is to design, build and race off-road vehicles that can withstand the harshest elements of rough terrain. The vehicles used in Baja SAE racing are often similar in appearance to dune buggies. Before 2007, the events were called "Mini Baja."

Continuously Variable Transmission(CVT):
A continuously variable transmission (CVT) is anautomatic transmssion that can change seamlessly through a continuous range of gear ratios. This contrasts with other transmissions that provide a limited number of gear ratios in fixed steps. The flexibility of a CVT with suitable control may allow the engine to operate at a constant RPM while the vehicle moves at varying speeds.


Main and critical blocks used:
Generic Engine block:

The Generic Engine block represents a general internal combustion engine. Engine types include spark-ignition and diesel. Speed-power and speed-torque parameterizations are provided. A throttle physical signal input specifies the normalized engine torque. Optional dynamic parameters include crankshaft inertia and response time lag. A physical signal port outputs engine fuel consumption rate based on choice of fuel consumption model. Optional speed and redline controllers prevent engine stall and enable cruise control.
Main ports:
B – Rotational Conserving Port :representing the Engine Block(should be connected to rotational motion reference)
F – Rotational Conserving Port :representing the Engine Crankshaft
T - Physical signal input port :specifying the normalized engine throttle level
P - Physical signal output port: reporting the instantaneous engine power, in W
FC - Physical signal output port: reporting the fuel consumption rate, in kg/s
Simple Gear:


The Simple Gear block represents a gearbox that constrains the connected driveline axes of the base gear, B, and the follower gear, F, to corotate with a fixed ratio that is specified.
The follower-base gear ratio is
gFB=rf/rB=NF/NB
where:
- NBis the number of teeth in the base gear
- NBFis the number of teeth in the follower gear
Main Ports:
B — Base: Rotational mechanical conserving port associated with the base, or input, shaft.
F — Follower: Rotational mechanical conserving port associated with the follower, or output, shaft.
Variable Ratio Transmission block:

The Variable Ratio Transmission block represents a gearbox that dynamically transfers motion and torque between the two connected driveshaft axes, base and follower.
Ignoring the dynamics of transmission compliance, the driveshafts are constrained to corotate with a Variable Gear Ratio control that you control. You can choose whether the follower axis rotates in the same or opposite direction as the base axis. If they rotate in the same direction, ωF and ωB have the same sign. If they rotate in opposite directions, ωF and ωB have opposite signs.
Transmission compliance introduces internal time delay between the axis motions. Therefore, unlike a gear, a variable transmission does not act as a kinematic constraint. You can also control torque loss caused by transmission and viscous losses.
Main ports:
B – Base Pulley or Drive Pulley
F – Follower Pulley or Driven Pulley
r – Variable Transmission Ratio (Input)
Vehicle Body block:

The Vehicle Body block represents a two-axle vehicle body in longitudinal motion. The vehicle can have the same or a different number of wheels on each axle. For example, two wheels on the front axle and one wheel on the rear axle. The vehicle wheels are assumed identical in size. The vehicle can also have a center of gravity (CG) that is at or below the plane of travel.
The block accounts for body mass, aerodynamic drag, road incline, and weight distribution between axles due to acceleration and road profile. Optionally include pitch and suspension dynamics. The vehicle does not move vertically relative to the ground.
The block has an option to include an externally-defined mass and an externally-defined inertia. The mass, inertia, and center of gravity of the vehicle body can vary over the course of simulation in response to system changes.
Limitations:
The Vehicle Body block lets you model only longitudinal dynamics, parallel to the ground and oriented along the direction of motion. The vehicle is assumed to be in pitch and normal equilibrium. The block does not model pitch or vertical movement. As such, the equations assume that the wheels never lose contact. This constraint can result in negative normal forces.
Input ports:
Beta – Road Incline Angle (rad):physical signal input port for road incline angle
W – Head Wind Speed (m/s):physical signal input port for road incline angle
CG-center of gravity(m):physical signal input port of externally defined mass relative to the cg of vehicle(only available with externally defined additional mass is set to on)
M-mass(kg):physical signal input port for mass of the externally defined mass(only available with externally defined additional mass is set to on)
J-Externally defined moment of inertia(in kg*m^2):physical signal input port of the externally defined mass
Output ports:
NR – Rear Axle Normal Force (N): physical signal output port for the rear axle which is considered positive acting downward
NF – Front Axle Normal Force (N):physical signal output port for the front axle which is considered positive acting downward
V – Longitudinal Velocity (m/s):physical output signal of vehicle velocity
Conserving ports:
H – Horizontal Motion: conserving port related to the horizontal motion of vehicle body(tyres should be connected to this port)
Double shoe brake Block:

The Double-Shoe Brake block represents a frictional brake with two pivoted rigid shoes that press against a rotating drum to produce a braking action. The rigid shoes sit inside or outside the rotating drum in a diametrically opposed configuration. A positive actuating force causes the rigid shoes to press against the rotating drum. Viscous and contact friction between the drum and the rigid shoe surfaces cause the rotating drum to decelerate.
Double-shoe brakes provide high braking torque with small actuator deflections in applications that include motor vehicles and some heavy machinery. The model employs a simple parameterization with readily accessible brake geometry and friction parameters.
Limitations:
- Contact angles smaller than 45° produce less accurate results.
- The brake uses the long-shoe approximation.
- The brake geometry does not self-lock.
- The model does not account for actuator flow consumption.
Input ports:
F - Physical signal input port associated with the applied actuating force
Conserving ports:
S - Rotational conserving port associated with the rotating drum shaft
Tire(magic formula) block:

The Tire (Magic Formula) block models a tire with longitudinal behavior given by the Magic Formula, an empirical equation based on four fitting coefficients. The block can model tire dynamics under constant or variable pavement conditions.
The longitudinal direction of the tire is the same as its direction of motion as it rolls on pavement. This block is a structural component based on the Tire road interaction block.
To increase the fidelity of the tire model, you can specify properties such as tire compliance, inertia, and rolling resistance. However, these properties increase the complexity of the tire model and can slow down simulation. Consider ignoring tire compliance and inertia if simulating the model in real time or if preparing the model for hardware-in-the-loop (HIL) simulation.
Equivalent model:
The full tire model is equivalent to this Simscape/Simscape Driveline component diagram. It simulates both transient and steady-state behavior and correctly represents starting from, and coming to, a stop. The Translational Spring and Translational Damper are equivalent to the tire stiffness CFx and damping bFx. The Tire-Road Interaction (Magic Formula) block models the longitudinal force Fx on the tire as a function of Fz and k′ using the Magic Formula, with k′ as the independent slip variable.
The Wheel and Axle radius is the wheel radius rw. The Mass value is the effective mass, Iwr2w. The tire characteristic function f(k′, Fz) determines the longitudinal force Fx. Together with the driveshaft torque applied to the wheel axis, Fx determines the wheel angular motion and longitudinal motion.
Without tire compliance, the Translational Spring and Translational Damper are omitted, and contact variables revert to wheel variables. In this case, the tire effectively has infinite stiffness, and port P of Wheel and Axle connects directly to port T of Tire-Road Interaction (Magic Formula).
Without tire inertia, the Mass is omitted.
Limitations:
- The Tire (Magic Formula) block assumes longitudinal motion only and includes no camber, turning, or lateral motion.
- Tire compliance implies a time lag in the tire response to the forces on it. Time lag simulation increases model fidelity but reduces simulation performance.
Input ports:
N – Normal Force: Physical signal input port associated with the normal force acting on the tire. The normal force is positive if it acts downward on the tire, pressing it against the pavement.
M- Magic formula coefficients: Physical signal input port associated with the Magic Formula coefficients. Provide the Magic Formula coefficients as a four-element vector, specified in the order [B, C, D, E].( Port M is exposed only if the Main > Parameterize by parameter is set to Physical signal Magic Formula coefficients)
Common tyre parameters:
Magic Formula B coefficient: 10
Magic Formula C coefficient: 1.9
Magic Formula D coefficient: 1
Magic Formula E coefficient: 0.97
Output ports:
S – Tire Slip: Physical signal output port associated with the relative slip between the tire and road.
Conserving ports:
A – Axle: Mechanical rotational port associated with the axle that the tire sits on.
H – Mechanical translational port associated with the wheel hub that transmits the thrust generated by the tire to the remainder of the vehicle
Other Blocks used:
- Solver Configuration – To specify the solver parameters before starting the simulation
- Signal Builder – To input the Brake, Throttle and CVT Ratio
- Simulink to PS Converter – To convert the Simulink signal to Simscape environment
- PS to Simulink Converter – To convert Simscape signal to Simulink environment
- Mechanical Reference – To make sure all the components are clamped to the ground
- Rotational free end: The Rotational Free End block represents a mechanical rotational port that rotates freely, without torque.
- Scope – To display different graphs
- Display – To view the calculated engine power
- Inertia – To represent the solid inertia
- Rotational Motion Sensor – To sense the rotational motion from the engine and give output as rpm
- PS Terminator - Terminator for unconnected physical signal outputs
- PS Constant - Generate constant physical signal
- Rotational Free End – For mechanical component (Tire)
- Custom Measure Gauge – To measure the brake and throttle input
- Knob – To increase, decrease and vice-versa of throttle and brake inputs
- Lookup Table – To insert the CVT values from the workspace
- Step – To increase or decrease an input value for a defined time interval
BAJA ATV MODEL WITHOUT DASHBOARD:
Main Model:

Engine Sensor:

CVT:

Vehicle Body:

Procedure of Simulation:
- The Throttle and Brake inputs are generated in the signal builder block.
- The Throttle is then connected to the Engine and Brake is connected as input the vehicle axle.

- The brake input is kept as zero i.e., no brake is applied, while Throttle input is apllied as 0.3 for the first 20sec and then increased to 1 for next 20 to 80sec.
- The speed and torque vectors are predefined in Workspace according to the Torque speed characteristics of the vehicle and these are extracted through grabit in MATLAB.




- The output from the Engine is taken from crankshaft and connected to Ideal rotational Sensor to sense the output run from the engine.
- The Output of the Engine rpm is given to the simple gear mechanism to reduce the speed where the gear ratio is 4.

- The output of the gear is given as CVT where the output speed gets reduced.
- The input to Variable Ratio Transmission (CVT block) is provided by Signal Builder.

- The output CVT is given as input to the axle by which vehicle accelerates according to the speed, the brake signal generated by signal builder is inputed to the Double shoe-brake of vehicle body to apply the brake to axle.



- The output of the vehicle body is taken as velocity output of the vehicle.
Results:
Torque-Speed Plot:

The Torque, speed values are taken from MATLAB workspace to the engine block to generate the required output rpm. This plot is taken as default input to the engine for all the cases.
Engine speed curve:

The output of engine is generated according to the Throttle torque-speed input curve.

The engine speed is reduced by the gear ratio '4'.
Max rpm [before reduction] = 3830 rpm.
gear ratio = 1:4
Gear ratio = Driven/Drive
Driven = Drive*gear ratio
Driven = 3832*(1/4)
Driven = 958 rpm
The reduced rpm is 958 which is same as in the plot.
CVT Shaft Reduction Plot:

Max Speed [before CVT] = 958rpm
CVT ratio = 1:1.8
Driven = (958/1.8)
Driven = 532.22 rpm
The reduced max speed after the CVT ratio is 532.22rpm as seen in the plot.
Vehicle speed and Inputs of throttle and brake plot:

- The input of the throttle is applied as 0.3 for 0-20seconds and then increased as step to 1 from 20-80sec whicle increases the speed of the vehicle.
- The input to the brake is taken as zero throughout the curve.
- From the final vehicle velocity graph we can see that initially there is step rise that is vehicle accelerated faster, then gradually increases for 20sec and then when throtlle increases from 0.3 to 1 the speed also increases i.e accelerates finally reaches the speed and continies to travel at constant speed throughout i.e 55.74kmph.
BAJA ATV MODEL WITH DASHBOARD(cvtModel_dashboard):
Main Model:

Dashboard:

User controls:

Steps:
The model workflow process is same as the process of ‘BAJA ATV model without Dashboard’ but the throttle and brake inputs are controlled by the user with knobs.
Results:
Engine speed plot:

Here the engine speed is generated according to the inputs like throttle, break, torque and speed vectors. The runtime is not defined so that the Throttle and Break are controlled by the user. The step up is throttle and step down is brake input.
Engine speed vs. gear reduction speed plot:

The engine speed is reduced by a factor of 4 at any moment in the drive cycle as it is evident by the curve.
CVT speed reduction plot:

The Cvt gear reduction plot shows that at at constant the reduction ratio of 1.8 is applicable at these large time frame and it can be verified by taking 689 constant RPM and dividing it by 1.8=383 RPM which verifies the plot
Speed vs. Throttle input:

From the graph we can infer that the vehicle is accelerating while throttle is applied (Step Up) and decelerated while break is applied (Step Down). The constant speed areas represent no changes in throttle or braking.
BAJA ATV model – Mapped Lookup Table without Dashboard(cvtModel_mapped):
Main model:

Steps:
The model workflow process is same as the process of ‘BAJA ATV model without Dashboard’ except that it used instead of Signal Builder Blocks for Brake and Throttle Input Step input blocks are used. At 35 sec the brake input will take a step of value ‘0’ and at 20 sec throttle input will increases from 0.3-1 then remains constant throughout.

CVT SUBBLOCK:

The cvt subblock is the same as the previous model “BAJA ATV model without Dashboard” but instead of Signal Builder Block for CVT Ratio the 2-D Lookup Table is used. The interpolations and extrapolation methods are set to linear. It needs to be loaded in the workspace having the file name as Lookuptable_data.mat
Lookup Table: A lookup table is an array of data that maps input values to output values, thereby approximating a mathematical function. Given a set of input values, a lookup operation retrieves the corresponding output values from the table. If the lookup table does not explicitly define the input values, Simulink can estimate an output value using interpolation, extrapolation, or rounding, where:
- Interpolation is a process for estimating values that lie between known data points.
- Extrapolation is a process for estimating values that lie beyond the range of known data points.
- Rounding is a process for approximating a value by altering its digits according to a known rule.
A lookup table block uses an array of data to map input values to output values, approximating a mathematical function. Given input values, Simulink performs a “lookup” operation to retrieve the corresponding output values from the table. If the lookup table does not define the input values, the block estimates the output values based on nearby table values.
At last the vehicle speed output is given as a feedback to the 2-D Lookup Table so that we can verify that the velocity of the vehicle is changing perfectly when the CVT Ratio changes. The vehicle speed is converted to m/s from Kmph.

Results:
Cvt ratio plot:

When we compare the above plot, the ratio varies from 2.3 – 1.8 within timespan of 80 sec which is same as the previous BAJA ATV Models. And from 32 sec it’s constant ratio of ‘1.8’ compared to 35 sec in the first model. Also the reduction from 2.3 ratio to 1.8 is not perfectly linear as in the first model.
CVT ratio vs. vehicle velocity:

0 to 20 km/hr, the CVT ratio is constant at 2.3
20 to 30 km/hr, the CVT ratio drops down to 2.03
30 to 50 km/hr, the CVT ratio drops down to 1.8
50 km/hr onwards, the CVT ratio is constant at 1.8
Hence, we can conclude that the vehicle accelerates, decelerates and remains constant when the CVT Ratio is being varied.
Engine speed:
The sam
e graph is shown in the first model
CVT Shaft Speed:

The output shaft speed follows the cvt ratio discussed before.
Speed vs. throttle plot:

It shows same result as the first model.
BAJA ATV model – Mapped Lookup Table with Dashboard(cvtModel_dashboard_mapped):

Dashboard (simulation off):

Dashboard (simulation on):

User controls:


Steps:
The model workflow process is same as the process of ‘BAJA ATV model – mapped lookup table without Dashboard’ but the Throttle and Brake inputs are controlled by the user with the Knob followed by the vehicle speed is given as feedback to the CVT Ratio lookup table.
Results:
CVT ratio plot:

In this BAJA ATV Model, the Engine is pre-set to run at 3300 rpm with the throttle value of ‘0.3’. And the velocity at 45 KMPH. The CVT Ratio for minimum and maximum speed of the engine was pre-defined as 2.3 and 1.8 respectively. When the simulation is started the initial throttle value 0.3 is achieved so that the CVT Ratio is nearby to 1.85. When the throttle is being increased the CVT Ratio move towards 1.8 where the state is maximum engine speed. Simultaneously when the throttle is being decreased the CVT ratio will move towards 1.85. While the braking is applied the CVT Ratio increases so that it can achieve the nearest state of 2.3 (Minimum Engine Speed). When braking is reduced the CVT Ratio move towards 1.85 which is the basic throttle input 0.3 or if any other throttle value is applied it would reach that CVT Ratio state.
Engine speed plot:

From the graph we can infer that the vehicle was first running at minimum rpm of 3300 rpm and then throttle is applied (step-up) then braking (step-down) then brake is released so that engine rpm is increased then braking is applied.
Cvt speed reduction plot:

From the above graph we can understand that the throttle is applied (step-up) and then kept constant then braking is applied (step-down) then brake is released so that the engine speed is increased with increase in throttle input.
Speed vs. throttle plot:

From the plot we can infer that when throttle is applied the vehicle speed increases and when brake is applied vehicle speed decreases simultaneously.
Reference:
https://in.mathworks.com/matlabcentral/fileexchange/70576-baja-all-terrain-vehicle-atv-model