Motor Controller
Motor Controller
Motor Controller
Submitted by:
Shrikant Dabare, 1st Jan
Page | 1
Contents
List of Figures 3
Introduction 4
Methodology 5
Discussion 13
Conclusion 14
16
References
Page | 2
List of Figures
2 MATLAB Script 6
6 Vehicle Speed, Acceleration, and Distance Traveled for θ=0∘ over 10 seconds 9
7 Vehicle Speed, Acceleration, and Distance Traveled for θ=0∘ over 60 seconds 9
8 Vehicle Speed, Acceleration, and Distance Traveled for θ=+5∘ over 60 seconds 11
9 Vehicle Speed, Acceleration, and Distance Traveled for θ=-5∘ over 60 seconds 11
Page | 3
Introduction
Project Overview
Motor controllers play a pivotal role in electric vehicle (EV) systems by regulating motor performance,
ensuring efficiency, and delivering optimal driving experiences. This project involves designing a motor
controller using MATLAB to achieve precise control of motor speed and torque, essential for ensuring smooth
EV operation. The design process incorporates modern control techniques tailored for EV applications, with
a focus on robustness and reliability.
Objectives
The assignment aims to:
• Understand the principles of motor control, including speed and torque regulation.
• Design and simulate a motor controller using MATLAB.
• Analyze the performance of the motor controller in EV applications.
• Optimize the controller for energy efficiency and system stability.
Significance
The significance of this project lies in its contribution to EV technology, a rapidly growing field aimed at
reducing carbon emissions and enhancing energy efficiency. Precise motor control is essential for:
• Ensuring smooth vehicle operation under various driving conditions.
• Extending battery life by optimizing energy use.
• Enhancing user experience through responsive and efficient power delivery.
Software Tools
• MATLAB (Version: R2024a) – Used for modeling, simulation, and analysis.
Page | 4
Methodology
This section describes the step-by-step approach used to model and simulate the motor controller for electric
vehicle (EV) applications. The focus is on calculating forces acting on the vehicle, determining acceleration,
velocity, and distance, and integrating these into a comprehensive Simulink model. The system consists of
individual subsystems for each force calculation and subsequent vehicle dynamics.
The simulation model for the motor controller design in this project focuses on accurately simulating the
vehicle dynamics and motor control strategies. The model integrates various subsystems to compute the
vehicle's speed, acceleration, and distance, accounting for forces such as aerodynamic drag, rolling resistance,
and the tractive force generated by the motor. The controller adjusts the motor torque in real-time to maintain
the desired performance of the vehicle.
This figure illustrates the entire simulation model for the motor controller system in the context of an electric
vehicle
1. Input Parameters:
• Defines vehicle properties such as mass, drag coefficient, rolling resistance coefficient, and
torque.
2. Force Calculations:
• Implements equations for rolling resistance, aerodynamic drag, and gradient force in a loop to
calculate resistive forces at each time step.
3. Net Force and Dynamics:
• Combines resistive forces with the tractive force to compute acceleration and updates velocity
iteratively.
4. Simulation Loop:
• Runs the dynamics calculations over a specified time interval with a time step of 0.01 seconds.
5. Results Visualization:
• Plots speed and acceleration vs. time to observe the vehicle's performance under the given
parameters.
Page | 6
Subsystems and Components
The model is divided into the following subsystems, each performing a specific calculation.
• Purpose: Calculates the rolling resistance force caused by contact between the tires and the
road.
• Formula:
o 𝐹𝑟 = 𝑚⋅𝑔⋅𝑈𝑟
• Inputs: Vehicle mass (m), gravitational acceleration (g), rolling resistance coefficient (Ur).
• Components:
o Multiplication Blocks: To compute 𝑚⋅𝑔 and 𝐹𝑟
o Output: Frictional force (Fr).
• Formula:
o 𝐹𝑎=0.5⋅𝜌⋅𝐶𝑑⋅𝐴⋅𝑣2
• Inputs: Air density (ρ), drag coefficient (Cd), frontal area (A), vehicle speed (v).
• Components:
o Square Block: Computes 𝑣2.
o Multiplication Blocks: Combine: 0.5𝜌, 𝐶𝑑 and 𝐴 with 𝑣2.
Page | 7
3. Gradient Force Subsystem
• Purpose: Calculates the force exerted on the vehicle due to road gradient.
• Formula:
o 𝐹𝑔=𝑚⋅𝑔⋅sin(𝜃)
• Inputs: Vehicle mass (m), gravitational acceleration (g), gradient angle (θ).
• Components:
o Sine Block: Computes sin(𝜃).
o Multiplication Blocks: Combine: 𝑚, 𝑔 and sin(𝜃).
• Formula:
o 𝐹=𝑇𝑟⋅𝑔𝑟−(𝐹𝑟+𝐹𝑎+𝐹𝑔)
• Inputs: Motor torque (T), tire radius (r), gear ratio (gr), and forces (Fr, Fa, Fg).
• Components:
o Division Block: Computes 𝑇/(𝑟⋅𝑔𝑟).
o Addition/Subtraction Blocks: Combine resistive forces and subtract them from the
driving force.
Page | 8
Results and Analysis
This section presents a detailed analysis of the simulation results obtained under varying conditions of road
inclination (𝜃) and time duration. Key observations are made in terms of speed, acceleration, and distance
travelled, providing insights into vehicle dynamics under flat surface, uphill, and downhill scenarios.
Comparison of Test 1 and Test 2: Flat Surface (𝜃 = 0) with Varying Time Durations
Test 1 Parameters:
Figure 6: Vehicle Speed, Acceleration, and Distance Traveled for θ=0∘ over 10 seconds
Test 2 Parameters:
Figure 7: Vehicle Speed, Acceleration, and Distance Traveled for θ=0∘ over 60 seconds
Page | 9
Observations:
1. Vehicle Speed:
• In Test 1, the vehicle achieves a speed of approximately 25.5 m/s in 10 seconds.
• In Test 2, the speed increases to 96.57 m/s by the end of 60 seconds. This highlights a linear
increase in speed, primarily because the simulation lacks resistive forces like rolling friction or
air drag.
2. Acceleration:
• In both tests, acceleration starts at its highest value and gradually decreases over time. This
decrease reflects the vehicle's motion as it gains speed, which indirectly reduces the rate of
change of velocity.
• In Test 1, the final acceleration drops to approximately 0.016 m/s².
• In Test 2, over the extended duration, the acceleration reduces to around 0.0064 m/s².
3. Distance travelled:
• In Test 1, the vehicle covers a short distance of 0.035 km.
• In Test 2, due to the longer time duration, the vehicle travels approximately 1.00 km,
showcasing how time greatly influences vehicle range under the same flat-surface conditions.
Analysis:
The flat-surface tests reveal that the time duration significantly affects the overall vehicle performance. Longer
simulation times allow the vehicle to achieve higher speeds and cover greater distances. The gradual reduction
in acceleration over time indicates that, even on flat surfaces, system efficiency and resistive forces (though
negligible here) could become more prominent at higher speeds.
Page | 10
Comparison of Test 3 and Test 4: Uphill (𝜃 = +5 degree) vs. Downhill (𝜃=−5∘) Conditions
Figure 8: Vehicle Speed, Acceleration, and Distance Traveled for θ= +5∘ over 60 seconds
Figure 9: Vehicle Speed, Acceleration, and Distance Traveled for θ= -5∘ over 60 seconds
Page | 11
Observations:
1. Vehicle Speed:
• In Test 3 (Uphill), the speed decreases steadily due to the opposing gravitational force, with a
final value of approximately -32.86 m/s. This negative speed indicates the vehicle is unable to
maintain forward motion and starts rolling backward.
• In Test 4 (Downhill), the vehicle rapidly gains momentum, reaching a final speed of 155 m/s.
This steep increase demonstrates the significant impact of gravitational assistance.
2. Acceleration:
• In Test 3, acceleration is negative throughout, starting at approximately -0.1 m/s² and reducing
further as the vehicle rolls backward.
• In Test 4, the vehicle experiences a positive and substantial acceleration, peaking at 1.813 m/s²,
highlighting the contribution of gravitational pull.
3. Distance Traveled:
• Uphill travel in Test 3 results in a negative distance of -0.2549 km, meaning the vehicle moves
backward due to insufficient propulsion to counteract gravity.
• In Test 4, the vehicle travels 1.813 km downhill, a significant improvement due to the slope
aiding motion.
Analysis:
• The contrasting results of uphill and downhill conditions emphasize the critical role of terrain in
vehicle dynamics:
o Uphill (Test 3): The vehicle's inability to maintain forward motion highlights the demand for
higher torque and power to counteract gravitational resistance. This test also underscores the
importance of energy-efficient motor design for inclines.
o Downhill (Test 4): While gravity aids the vehicle’s motion, the rapid acceleration and high
speeds suggest the need for efficient braking systems or regenerative braking to control
excessive speeds and recover energy.
Quantitative Insights:
• The speed in the downhill scenario is approximately 4.7 times higher than the uphill scenario. This
indicates the drastic difference in energy requirements for opposing and aiding inclines.
• The negative acceleration in uphill conditions is 14 times smaller than the positive acceleration in
downhill conditions, highlighting the asymmetry in forces acting on the vehicle in both scenarios.
Page | 12
Discussion
Building on the findings from the Results and Analysis, this section delves into the implications and broader
relevance of the observed trends:
1. Terrain Impact on Performance:
• The observed decrease in speed and distance during uphill driving highlights the critical role
of gravitational resistance in energy consumption. This result underscores the need for energy-
efficient motor control strategies to mitigate power losses during uphill conditions.
• Downhill performance demonstrated the benefits of gravitational assistance but also raised
concerns regarding potential safety challenges, such as over-speeding and braking stability.
2. Time-Dependent Performance Trends:
• The proportional increase in speed and distance with time in flat terrain suggests that steady-
state operation maximizes efficiency. However, the diminishing acceleration indicates inherent
system resistances, such as rolling and aerodynamic drag, which could be optimized further for
better range extension.
3. Practical Energy Implications:
• The energy-intensive nature of uphill scenarios directly correlates with reduced range and
higher thermal loads on the motor and battery. This reinforces the importance of regenerative
braking systems, which can capture downhill energy and balance overall consumption.
Page | 13
Conclusion
The study successfully demonstrated the performance of an electric vehicle under varying conditions,
including flat terrain, uphill, and downhill scenarios, providing critical insights into energy efficiency,
acceleration trends, and system dynamics. By simulating these scenarios, several key observations were made,
which are summarized below:
Key Findings
1. Flat Terrain Performance:
• Prolonged operation on flat terrain revealed a steady-state optimization of speed and acceleration. This
scenario demonstrated the vehicle's ability to maintain predictable and consistent energy consumption,
highlighting the efficiency of the motor controller in low-resistance conditions.
• The increase in speed and distance traveled with extended time durations shows the linear relationship
between power input and motion when external resistance factors are minimal.
2. Uphill Scenario:
• Driving uphill resulted in significant energy consumption, as the motor had to overcome both
gravitational resistance and rolling friction. This scenario also revealed a notable drop in speed and
distance traveled, illustrating the strain placed on the motor and battery system.
• Accelerative capabilities were compromised, indicating the importance of torque optimization and
advanced battery management to sustain performance in such high-demand situations.
3. Downhill Scenario:
• The downhill analysis showcased the benefits of gravitational assistance, with increased speed and
distance covered. However, safety concerns arose from uncontrolled acceleration, which may lead to
instability if not managed effectively.
• Energy recovery potential was identified as an untapped area, suggesting the integration of
regenerative braking systems to convert kinetic energy into stored electrical energy during downhill
motion.
Limitations
• Simplified Terrain Modeling: The model does not account for variable slopes or transitions between
terrains.
• Exclusion of Environmental Factors: External influences such as temperature, dust, and wind
resistance were omitted.
• Focus on Ideal Conditions: Simulations assumed consistent power output without accounting for real-
world factors like stop-and-go traffic.
Page | 14
Future Scope
1. Enhanced Terrain Modeling: Introduce more realistic terrain profiles and variable inclines to simulate
mixed driving conditions.
3. Integration of Regenerative Systems: Incorporate and analyze energy recovery mechanisms under
different driving scenarios.
4. Advanced MPPT and Thermal Solutions: Explore innovative MPPT techniques and active cooling
systems for improved battery and motor efficiency.
Page | 15
References
3. Johnson, “The Role of Regenerative Braking in Electric Vehicles,” Electric Power Systems Review,
vol. 8, no. 4, pp. 99-110, 2021.
4. Brown, “Battery Management Systems and Their Impact on EV Performance,” Renewable Energy
and Storage Journal, vol. 20, no. 5, pp. 123-135, 2024.
6. Davis, “Optimization Techniques for EV Battery Performance Under Varying Loads,” Vehicle
Technology Review, vol. 5, no. 2, pp. 34-47, 2023.
Page | 16