📖 Scenario: You are working on an electric vehicle (EV) dashboard that shows the estimated driving range based on battery charge and driving conditions.This project will help you understand how range estimation algorithms work in EVs.
🎯 Goal: Build a simple step-by-step model to estimate the driving range of an EV using basic data and calculations.
📋 What You'll Learn
Create a data structure to hold battery capacity and average consumption
Add a configuration variable for driving efficiency factor
Calculate the estimated range using the data and configuration
Complete the model by adjusting the range with the efficiency factor
💡 Why This Matters
🌍 Real World
Range estimation algorithms help EV drivers know how far they can travel before recharging, improving trip planning and reducing range anxiety.
💼 Career
Understanding these algorithms is important for EV software developers, automotive engineers, and data analysts working on vehicle performance and user experience.
Progress0 / 4 steps
1
DATA SETUP: Define battery capacity and average consumption
Create a dictionary called ev_data with these exact entries: 'battery_capacity_kWh': 75 and 'average_consumption_kWh_per_km': 0.15.
EV Technology
Hint
Use a dictionary with keys exactly as 'battery_capacity_kWh' and 'average_consumption_kWh_per_km'.
2
CONFIGURATION: Add driving efficiency factor
Create a variable called efficiency_factor and set it to 0.9 to represent driving conditions affecting range.
EV Technology
Hint
The efficiency factor is a decimal less than 1 to reduce the ideal range based on real conditions.
3
CORE LOGIC: Calculate estimated range without efficiency factor
Create a variable called estimated_range_km and calculate it by dividing ev_data['battery_capacity_kWh'] by ev_data['average_consumption_kWh_per_km'].
EV Technology
Hint
Divide battery capacity by average consumption to get the ideal range in kilometers.
4
COMPLETION: Adjust estimated range with efficiency factor
Create a variable called adjusted_range_km and calculate it by multiplying estimated_range_km by efficiency_factor.
EV Technology
Hint
Multiply the ideal range by the efficiency factor to get the realistic estimated range.
Practice
(1/5)
1. What is the main purpose of range estimation algorithms in electric vehicles (EVs)?
easy
A. To control the air conditioning system
B. To calculate the speed of the EV
C. To measure the tire pressure
D. To predict how far the EV can travel on the current battery charge
Solution
Step 1: Understand the function of range estimation algorithms
These algorithms estimate the distance an EV can travel based on battery charge and other factors.
Step 2: Identify the correct purpose among options
Only To predict how far the EV can travel on the current battery charge matches the purpose of predicting travel distance on current battery charge.
Final Answer:
To predict how far the EV can travel on the current battery charge -> Option D
Quick Check:
Range estimation = Predict travel distance [OK]
Hint: Range estimation predicts travel distance, not speed or controls [OK]
Common Mistakes:
Confusing range estimation with speed calculation
Thinking it controls vehicle systems like air conditioning
Assuming it measures unrelated parameters like tire pressure
2. Which of the following factors is NOT typically used by range estimation algorithms in EVs?
easy
A. Color of the vehicle
B. Driving conditions
C. Battery charge level
D. Vehicle efficiency
Solution
Step 1: List common factors used in range estimation
Battery charge, driving conditions, and vehicle efficiency affect range estimates.
Step 2: Identify the irrelevant factor
The color of the vehicle does not affect battery usage or range estimation.
Final Answer:
Color of the vehicle -> Option A
Quick Check:
Color irrelevant to range estimation [OK]
Hint: Focus on factors affecting battery use, ignore cosmetic features [OK]
Common Mistakes:
Assuming vehicle color affects battery consumption
Confusing unrelated vehicle features with range factors
3. Consider a simple range estimation formula: range = battery_percentage * efficiency_factor. If the battery is at 80% and the efficiency factor is 3 km per percent, what is the estimated range?
medium
A. 83 km
B. 240 km
C. 3.8 km
D. 80 km
Solution
Step 1: Identify the formula and values
Range = battery_percentage * efficiency_factor = 80 * 3 km.
Step 2: Calculate the estimated range
80 * 3 = 240 km estimated range.
Final Answer:
240 km -> Option B
Quick Check:
80% * 3 km = 240 km [OK]
Hint: Multiply battery % by efficiency factor for range [OK]
Common Mistakes:
Multiplying incorrectly or reversing values
Confusing percentage with decimal
Choosing the wrong option due to calculation errors
4. A range estimation algorithm uses this formula: range = battery_level * efficiency - terrain_penalty. If battery_level = 70, efficiency = 2.5, and terrain_penalty = 50, what is the correct estimated range? Identify the error if the formula is written as range = battery_level * (efficiency - terrain_penalty).
medium
A. Correct range is 125 km; error is incorrect order of operations
B. Correct range is 100 km; error is missing multiplication
C. Correct range is 70 km; error is wrong variable names
D. Correct range is 0 km; error is division by zero
Solution
Step 1: Calculate correct range using given formula
range = 70 * 2.5 - 50 = 175 - 50 = 125 km.
Step 2: Identify error in incorrect formula
Incorrect formula does battery_level * (efficiency - terrain_penalty) = 70 * (2.5 - 50) = 70 * (-47.5) = -3325 km, which is wrong due to wrong order of operations and grouping.
Final Answer:
Correct range is 125 km; error is incorrect order of operations -> Option A
Quick Check:
Correct formula subtracts penalty after multiplication [OK]
Hint: Subtract penalty after multiplying battery and efficiency [OK]
Common Mistakes:
Grouping terms incorrectly causing negative range
Ignoring terrain penalty or applying it before multiplication
Misreading formula parentheses
5. An EV's range estimation algorithm adjusts the base range by multiplying with factors for terrain (0.9) and weather (0.8). If the base range is 200 km, what is the final estimated range after these adjustments?
hard
A. 160 km
B. 180 km
C. 144 km
D. 200 km
Solution
Step 1: Understand adjustment factors
Final range = base range * terrain factor * weather factor = 200 * 0.9 * 0.8.
Step 2: Calculate the final estimated range
200 * 0.9 = 180; 180 * 0.8 = 144 km final range.
Final Answer:
144 km -> Option C
Quick Check:
200 * 0.9 * 0.8 = 144 km [OK]
Hint: Multiply all adjustment factors with base range [OK]
Common Mistakes:
Adding factors instead of multiplying
Applying only one factor
Ignoring decimal multiplications
Recommended
Ready to prove it?
Pass the test and this pattern moves unknownstrongwhile earning +1 Grip toward your certificate.