Bird
Raised Fist0
EV Technologyknowledge~30 mins

State of Health (SOH) monitoring in EV Technology - Mini Project: Build & Apply

Choose your learning style10 modes available
State of Health (SOH) Monitoring for EV Batteries
📖 Scenario: You work for an electric vehicle (EV) company. Your job is to monitor the battery's State of Health (SOH). SOH tells how healthy the battery is compared to when it was new. It is important to know if the battery needs maintenance or replacement.We will create a simple program to track SOH values for different EV batteries and alert if any battery's SOH falls below a safe threshold.
🎯 Goal: Build a small program that stores SOH values for EV batteries, sets a threshold for safe health, checks which batteries are below this threshold, and prints a warning list.
📋 What You'll Learn
Create a dictionary with battery IDs and their SOH values
Add a threshold variable for minimum safe SOH
Use a loop to find batteries below the threshold
Print the list of batteries needing attention
💡 Why This Matters
🌍 Real World
Monitoring battery health helps EV companies maintain vehicle safety and performance. Early detection of weak batteries prevents breakdowns and extends battery life.
💼 Career
Battery SOH monitoring is a key task for EV maintenance engineers and DevOps teams managing vehicle health data systems.
Progress0 / 4 steps
1
Create SOH data for EV batteries
Create a dictionary called battery_soh with these exact entries: 'EV1001': 92, 'EV1002': 85, 'EV1003': 78, 'EV1004': 88, 'EV1005': 95
EV Technology
Hint

Use curly braces {} to create a dictionary. Each battery ID is a key, and its SOH value is the value.

2
Set the SOH threshold
Create a variable called soh_threshold and set it to 80 to represent the minimum safe SOH value.
EV Technology
Hint

Just assign the number 80 to the variable soh_threshold.

3
Find batteries below the SOH threshold
Create an empty list called batteries_below_threshold. Use a for loop with variables battery_id and soh to iterate over battery_soh.items(). Inside the loop, if soh is less than soh_threshold, append battery_id to batteries_below_threshold.
EV Technology
Hint

Use items() to get both keys and values from the dictionary. Check if SOH is less than the threshold and add the battery ID to the list.

4
Print batteries needing attention
Write a print statement to display the text "Batteries below SOH threshold:" followed by the batteries_below_threshold list.
EV Technology
Hint

Use print("Batteries below SOH threshold:", batteries_below_threshold) to show the result.

Practice

(1/5)
1. What does State of Health (SOH) monitoring primarily measure in electric vehicle batteries?
easy
A. The current speed of the vehicle
B. The remaining battery capacity compared to when it was new
C. The temperature inside the battery pack
D. The total distance the vehicle has traveled

Solution

  1. Step 1: Understand SOH definition

    SOH measures how much battery capacity remains compared to its original capacity.
  2. Step 2: Differentiate from other metrics

    Speed, temperature, and distance are unrelated to SOH's main purpose.
  3. Final Answer:

    The remaining battery capacity compared to when it was new -> Option B
  4. Quick Check:

    SOH = Remaining capacity % [OK]
Hint: SOH = battery health as percentage of original capacity [OK]
Common Mistakes:
  • Confusing SOH with vehicle speed
  • Mixing SOH with battery temperature
  • Thinking SOH measures distance traveled
2. Which of the following is the correct way to represent SOH as a percentage in a monitoring script?
easy
A. soh = (battery_capacity / original_capacity) * 100
B. soh = battery_capacity / original_capacity
C. soh = battery_capacity - original_capacity
D. soh = battery_capacity + original_capacity

Solution

  1. Step 1: Calculate SOH as a percentage

    SOH is the ratio of current to original capacity multiplied by 100 to get a percentage.
  2. Step 2: Check formula correctness

    Only soh = (battery_capacity / original_capacity) * 100 correctly multiplies the ratio by 100 to express percentage.
  3. Final Answer:

    soh = (battery_capacity / original_capacity) * 100 -> Option A
  4. Quick Check:

    Percentage = ratio * 100 [OK]
Hint: Multiply ratio by 100 to get percentage [OK]
Common Mistakes:
  • Forgetting to multiply by 100
  • Using subtraction instead of division
  • Adding capacities instead of dividing
3. Given the following code snippet, what will be the output?
original_capacity = 100
battery_capacity = 85
soh = (battery_capacity / original_capacity) * 100
print(f"SOH: {soh:.1f}%")
medium
A. SOH: 85.0%
B. SOH: 0.85%
C. SOH: 100.0%
D. SOH: 185.0%

Solution

  1. Step 1: Calculate SOH value

    85 divided by 100 equals 0.85, multiplied by 100 equals 85.0.
  2. Step 2: Format output string

    The print statement formats SOH to one decimal place, showing '85.0%'.
  3. Final Answer:

    SOH: 85.0% -> Option A
  4. Quick Check:

    0.85 * 100 = 85.0 [OK]
Hint: Divide then multiply by 100 for percentage output [OK]
Common Mistakes:
  • Misreading decimal as percent
  • Adding capacities instead of dividing
  • Ignoring formatting precision
4. Identify the error in this SOH calculation code snippet:
original_capacity = 100
battery_capacity = 90
soh = battery_capacity / original_capacity * 100
print("SOH is " + soh + "%")
medium
A. Missing parentheses around division
B. Incorrect formula for SOH calculation
C. Using print without parentheses
D. Type error when concatenating string and float

Solution

  1. Step 1: Analyze SOH calculation

    The formula is correct; division and multiplication order is fine without extra parentheses.
  2. Step 2: Check print statement

    Concatenating string and float without conversion causes a TypeError.
  3. Final Answer:

    Type error when concatenating string and float -> Option D
  4. Quick Check:

    Convert float to string before concatenation [OK]
Hint: Convert numbers to strings before concatenation [OK]
Common Mistakes:
  • Assuming formula is wrong
  • Ignoring type conversion in print
  • Thinking print syntax is incorrect
5. You want to alert the maintenance team if SOH drops below 70%. Which code snippet correctly implements this check?
soh = 65
if soh < 70:
    print("Alert: Battery SOH is low!")
else:
    print("Battery SOH is healthy.")
hard
A. The code alerts when SOH is above 70%
B. The code alerts only when SOH is exactly 70%
C. The code correctly alerts when SOH is below 70%
D. The code has syntax errors and won't run

Solution

  1. Step 1: Understand the condition

    The if statement checks if SOH is less than 70, which is true for 65.
  2. Step 2: Verify output behavior

    Since 65 < 70, it prints the alert message correctly.
  3. Final Answer:

    The code correctly alerts when SOH is below 70% -> Option C
  4. Quick Check:

    soh < 70 triggers alert [OK]
Hint: Use < 70 to check low SOH alert [OK]
Common Mistakes:
  • Using <= instead of < causing off-by-one
  • Confusing alert condition direction
  • Assuming syntax error due to < symbol
Recommended

Ready to prove it?

Pass the test and this pattern moves unknown strong while earning +1 Grip toward your certificate.

10 questions~5 mineasy hard