The problem
In Indian summers, cabin temperatures in a parked car can climb far above ambient, and air conditioning becomes one of the largest auxiliary loads in an EV. Range figures quoted on standard cycles usually exclude AC, so drivers see lower range in practice. A cabin heat-load and AC model makes this effect visible and lets students compare countermeasures such as pre-cooling and tinted glazing.
Objectives
- Model cabin heat loads from solar radiation, ambient conduction, occupants and ventilation.
- Model an AC system with a temperature-dependent coefficient of performance.
- Simulate cabin pull-down from a hot soak and steady holding on a drive cycle.
- Couple AC power to a vehicle energy model and compute range loss.
- Compare mitigation options such as pre-cooling, recirculation and solar-control glazing.
What you need
Tools and toolboxes
- MATLAB — Heat-load parameters, solar input, range calculation and parameter sweeps.
- Simulink — Cabin thermal model, AC controller, vehicle energy model and logging.
- Simscape — Thermal Mass and Convective Heat Transfer blocks for cabin air and interior mass; the moist-air library can be added for humidity. A basic-Simulink energy-balance version is acceptable without Simscape.
Software
- MATLAB R2023b or later
- Simulink
- Simscape (optional)
- Excel/CSV for drive cycles and hourly weather data
Extra parts and data
None beyond the software above.
Key concepts
- Cabin heat balance
- m·cp·dT/dt = Q_solar + Q_ambient + Q_occupants + Q_ventilation − Q_AC. Solar gain through glass is usually the largest term in a hot, sunny climate.
- Coefficient of performance (COP)
- COP = cooling delivered / electrical input. It falls as the outside temperature rises because the compressor must push heat against a larger temperature difference.
- Thermal mass of the interior
- Seats, dashboard and trim store heat during a hot soak and release it slowly, so pull-down takes longer than heating the air alone would suggest.
- Auxiliary load and range
- Range loss depends on AC power multiplied by time, so it hurts most on slow urban cycles where the trip takes long relative to the traction energy used.
Step-by-step guide
- 1
Define the vehicle, climate and comfort targets
Choose an example small car or e-rickshaw cabin with a stated volume, glazing area and angle, roof area and occupancy. Set climate cases such as 35, 40 and 45 °C ambient with solar irradiance of about 800–1000 W/m² at midday as an example, and a comfort target of 25 °C cabin air. Record U-values for roof, doors and glass, glass transmittance and occupant heat (around 100 W per seated person) in a parameter script.
Checkpoint: A parameter script and a table of climate cases, each value labelled as example or sourced.
- 2
Model the heat loads
Build subsystems for each load. Solar gain is Q = τ·A_glass·G·cos(incidence) plus absorbed roof radiation conducted inward. Ambient conduction is Q = U·A·(T_amb − T_cabin) for each surface. Ventilation load is ṁ_fresh·cp·(T_amb − T_cabin) for the fresh-air fraction. Test each subsystem with a fixed cabin temperature and check the numbers by hand. Keep each load as a separate logged signal so later results can show which load dominates in each case.
Checkpoint: At 25 °C cabin and 40 °C ambient, each load is within a few per cent of the hand calculation and the total is plausible for the vehicle size, typically a few kilowatts.
- 3
Build the cabin thermal model
Use two Thermal Mass blocks, one for cabin air and one for interior trim and seats, linked by a convective resistance. Connect all heat loads to the air node, with part of the solar load landing on the interior mass. Start from a hot-soak condition, for example interior at 60 °C and air at 55 °C after parking in the sun. Use ode23t and log with the Simulation Data Inspector.
Checkpoint: With AC off, the cabin settles well above ambient under sun and returns to ambient when solar input is removed.
- 4
Model the air-conditioning system
Represent the AC as a cooling capacity limit (for example 3–4 kW for a small car, as an example) and a COP map that falls with ambient temperature, such as COP of about 3 at 30 °C dropping to about 2 at 45 °C, stored as a 1-D Lookup Table. Add a blower power term. Implement a PI controller on cabin air temperature that commands cooling power between zero and the capacity limit, with anti-windup.
Checkpoint: The controller holds 25 °C with no overshoot greater than 1 °C in a steady test, and electrical power equals cooling divided by COP plus blower power.
- 5
Simulate pull-down
From the hot-soak start, run the AC at full capacity and record the time for cabin air to reach 25 °C and the energy used. Repeat for each ambient. Compare fresh-air and recirculation modes. Plot cabin air and interior temperatures together to show the interior mass keeping the cabin warm after the air has cooled. Define the end of pull-down consistently, for example cabin air within 1 °C of the set point.
Checkpoint: Pull-down times of a few to several minutes, longer at higher ambient and in fresh-air mode.
- 6
Couple to the vehicle energy model
Add a longitudinal vehicle model using the road-load equation F = m·g·Crr + ½·ρ·Cd·A·v² + m·a, with an example drivetrain efficiency map or constant efficiency, and a battery energy integrator. Add AC electrical power to the auxiliary load. Run IDC and MIDC repeated until a chosen battery energy is used, and compute range with and without AC. Use the same usable battery energy for every case so ranges are comparable.
Checkpoint: Range without AC is consistent with the example vehicle's consumption, and range with AC is lower in every case.
- 7
Sweep ambient and cycle
Script runs with sim() for each combination of ambient temperature, cycle and AC mode, and record range, average AC power and the share of total energy used by AC. Plot range loss against ambient for each cycle. Explain why the slow urban cycle loses a larger share of range than the faster cycle. Use Simulink.SimulationInput objects so each case's settings are stored with its results, which makes the tables easy to regenerate.
Checkpoint: A range-loss table and plot with AC share of energy increasing at higher ambient and on slower cycles.
- 8
Compare mitigations
Model three options: pre-cooling while plugged in (so the pull-down energy comes from the grid), solar-control glazing with lower transmittance, and recirculation with periodic fresh air. Re-run the worst case for each and report range recovered. Discuss practical constraints such as fogging and CO₂ build-up with recirculation. For pre-cooling, count the grid energy separately from battery energy so the range benefit is not confused with an overall energy saving.
Checkpoint: A table showing range recovered by each mitigation relative to the baseline.
- 9
Report
Document heat-load equations, parameters and sources, pull-down and steady results, range impact and mitigations. State the limitations: a two-node cabin, simplified solar geometry, a COP map rather than a refrigerant cycle model, and no humidity unless the moist-air extension was done. Present results as comparisons between cases, which are more reliable than the absolute numbers. Include the parameter script and all run scripts.
Checkpoint: A report with range loss stated for each case and the most effective mitigation identified.
Testing & validation
- Each heat-load subsystem against a hand calculation.
- AC-off soak behaviour and cool-down to ambient.
- PI controller holds the set point within 1 °C.
- Range with and without AC on IDC and MIDC at three ambient temperatures.
- Range recovered by each mitigation.
Expected results
A cabin thermal and AC model coupled to a vehicle energy model that quantifies AC range loss across Indian summer conditions and compares practical mitigations.
Take it further
- Add humidity with Simscape moist-air blocks and model latent cooling load.
- Replace the COP map with a refrigerant-cycle model in Simscape Fluids.
- Model a heat pump for cold-climate heating and compare with resistive heating.
- Optimise pre-cooling start time against grid tariff.
Viva and review questions
Why does AC hurt range more on slow urban cycles?
AC energy is power times time, and an urban trip takes much longer for the same distance, while traction energy per kilometre is lower, so AC is a bigger share of the total.
Why does COP fall at high ambient?
The compressor must reject heat at a higher condensing temperature, increasing the pressure ratio and work needed per unit of cooling.
Why does the cabin take longer to cool than the air volume alone suggests?
Seats, dashboard and trim stored heat during the soak and keep releasing it into the air after the air itself has cooled.
Learn it at DIYguru
These DIYguru courses and programmes teach what this project needs.
