The problem
Standard cycles such as IDC and MIDC do not reflect present traffic in every Indian city or for every vehicle type, and real logs are too long to use directly. Representative synthetic cycles that preserve the statistics of real driving let designers estimate range and component loading realistically. The method must be statistically sound and validated by energy outcomes, not only by speed statistics.
Objectives
- Collect or obtain real-world speed logs for a defined vehicle type and city.
- Clean, segment and characterise the data with standard cycle metrics.
- Build a Markov chain model on discretised speed–acceleration states.
- Generate and select candidate cycles that match the data's statistics.
- Validate selected cycles by energy and power demand in an EV model, and compare with IDC and MIDC.
What you need
Tools and toolboxes
- MATLAB — Data cleaning, segmentation, Markov transition matrices, cycle generation and selection.
- Statistics and Machine Learning Toolbox — Distribution fitting, kernel density estimates, clustering of micro-trips and statistical tests.
- Simulink — A longitudinal EV model to compare energy and power demand of real data, synthetic cycles and standard cycles.
- Signal Processing Toolbox (optional) — Filtering of noisy GPS speed; a simple moving-average filter in base MATLAB also works.
Software
- MATLAB R2023b or later
- Simulink
- CSV or GPX speed logs
- Published IDC and MIDC traces for comparison
Extra parts and data
- GPS speed logs from a phone logging app or a vehicle telematics unit — The method needs real driving data for the chosen vehicle type and city; the students must collect or obtain it with permission.
Key concepts
- Micro-trip
- A segment of driving between two stops. Splitting data into micro-trips is a common basis for cycle construction.
- Markov chain on speed–acceleration states
- Speed and acceleration are binned into states, and a transition probability matrix gives the chance of moving from each state to the next in one time step. Sampling from it generates synthetic speed traces.
- Speed–acceleration frequency distribution (SAFD)
- A 2-D histogram of time spent at each speed and acceleration. Comparing SAFDs of synthetic and real data is a standard representativeness test.
- Characteristic parameters
- Mean speed, mean running speed, idle share, mean positive acceleration, relative positive acceleration (RPA) and others used to compare cycles.
Step-by-step guide
- 1
Define scope and collect data
Choose one vehicle type (for example electric two-wheelers used for delivery) and one city, and define what representative means: the same characteristic parameter distribution as the population of trips. Collect or obtain at least several tens of hours of 1 Hz speed data with consent, removing personal location details. Record vehicle, time of day and route type metadata. Agree the data format and logging settings before collection starts.
Checkpoint: A data inventory listing hours, trips, metadata and a privacy statement explaining how location data was removed.
- 2
Clean and preprocess
Load logs, resample to 1 Hz, remove GPS dropouts and spikes (physically impossible accelerations, for example beyond ±4 m/s² for a two-wheeler), interpolate short gaps and filter speed with a low-pass or moving-average filter. Compute acceleration by central difference. Keep a log of how much data was removed and why. Visually inspect a random sample of cleaned trips against the raw data to confirm the filter has not removed real stops or genuine hard braking.
Checkpoint: Cleaned data with acceleration distributions free of spikes and a removal log showing the fraction discarded.
- 3
Characterise the data
Split the data into micro-trips and compute characteristic parameters for each and for the whole dataset: mean speed, running speed, idle share, acceleration and deceleration shares, mean positive acceleration, RPA and stops per km. Compute the SAFD of the whole dataset. Compare the same metrics for IDC and MIDC. Plot the distribution of each parameter across micro-trips as well as the overall value, because the spread matters for representativeness.
Checkpoint: A table of characteristic parameters for the dataset, IDC and MIDC, with the SAFD plotted.
- 4
Build the Markov model
Discretise speed (for example 1 m/s bins) and acceleration (for example 0.2 m/s² bins) into states, count transitions between consecutive seconds and normalise each row into a transition probability matrix. Handle the idle state specially so stops have realistic durations. Check that rows sum to one and that no state reachable in data is absorbing. Save the matrix with its bin definitions so the generation step is fully reproducible.
Checkpoint: A transition matrix with rows summing to one, and a heat-map showing it is sparse and concentrated near the diagonal.
- 5
Generate candidate cycles
Sample the chain from the idle state to generate many candidate cycles of a target length (for example 20 minutes), ending at idle. Rebuild speed by integrating sampled acceleration and project it to stay non-negative and consistent with the speed bin. Generate a few thousand candidates with a fixed random seed for reproducibility. Smooth the generated speed lightly if the bin structure creates unrealistic step changes in acceleration.
Checkpoint: A few thousand candidate cycles, with sample plots that look like plausible city driving.
- 6
Select representative cycles
For each candidate, compute the characteristic parameters and the SAFD difference from the dataset (for example the sum of squared differences of normalised bins). Select the cycle with the lowest weighted error, with weights stated in advance. Also keep the best few so the robustness of the choice can be tested. Plot the SAFD of the selected cycle beside the dataset SAFD and a difference map, so reviewers can see where the match is weakest.
Checkpoint: A selected cycle whose characteristic parameters are within a stated tolerance (for example 5 per cent) of the dataset values.
- 7
Validate by energy demand
Run the real data (in long chunks), the selected synthetic cycle, IDC and MIDC through the same Simulink longitudinal EV model. Compare Wh/km, positive and negative traction energy per km, peak power and the distribution of motor operating points. Representativeness in speed statistics should carry through to energy. Repeat the comparison with a second vehicle model, for example a heavier scooter, to show that the cycle remains representative beyond one parameter set.
Checkpoint: Wh/km of the synthetic cycle within a stated tolerance of the real data, with the standard cycles' difference shown for comparison.
- 8
Test robustness
Repeat generation with different seeds, bin sizes and Markov orders (first versus second order) and check how much the selected cycle's metrics and energy demand vary. Use held-out data (for example a different week) to confirm that the cycle represents data not used to build it. If results vary strongly with bin size, choose bins by a stated rule and report the sensitivity as a limitation, rather than picking the bin size that gives the best match.
Checkpoint: A table of selected-cycle metrics and energy across seeds, bin sizes and held-out data.
- 9
Compare with alternative methods
Implement a simpler micro-trip method (selecting and concatenating real micro-trips to match the parameters) as a baseline. Compare both methods on characteristic-parameter error, SAFD error and energy error, and on computation time. Discuss which suits which use. Use the same target parameters, cycle length and validation model for both methods so the comparison is fair. Report each method's spread across repeated runs as well as its best result, because a method that is good only on its best run is less useful in practice.
Checkpoint: A comparison table of the Markov and micro-trip methods on the same criteria.
- 10
Write up
Document data collection and privacy, cleaning, characterisation, the Markov model, selection criteria, validation, robustness and comparison. Release the method code, the synthetic cycle and anonymised aggregate statistics if data permissions allow. State the limits: one city, one vehicle type and the period of data collection. Discuss how the cycle could be updated as traffic patterns change, and how much new data would be needed to rebuild it with the same method.
Checkpoint: A thesis chapter with a released synthetic cycle and validation results that others can check.
Testing & validation
- Characteristic parameters of the selected cycle within tolerance of the dataset.
- SAFD difference lower than that of IDC and MIDC.
- Energy demand in an EV model within tolerance of real data.
- Results hold on held-out data and across random seeds.
Expected results
A validated, representative synthetic drive cycle for a defined Indian vehicle type and city, the Markov-chain generation and selection code, and a comparison with standard cycles and a micro-trip method on both statistics and energy demand.
Research angle for your PhD
Research questions: does a Markov-chain cycle built on speed–acceleration states reproduce real-world energy demand better than IDC, MIDC and micro-trip methods for Indian two-wheeler or three-wheeler use, and how much data is needed for a stable result? Baselines: standard cycles and micro-trip concatenation. Metrics: characteristic-parameter error, SAFD error, Wh/km and peak-power error on held-out data, and stability across seeds. Contributions suitable for publication include a validated cycle for an under-studied vehicle type, a data-sufficiency analysis, or an energy-aware selection criterion, with code released for reproduction.
Take it further
- Add road grade from elevation data to produce speed–grade cycles.
- Build separate cycles for peak and off-peak traffic.
- Use a higher-order or variable-order Markov model.
- Extend the method to e-rickshaws and e-buses with stop-pattern modelling.
Viva and review questions
Why validate the cycle with an EV model rather than only with speed statistics?
The purpose of a cycle is to predict energy and component loading. Two cycles with similar mean speed can have very different acceleration patterns and energy demand, so energy is the most relevant test.
What does the Markov property assume here?
That the next speed–acceleration state depends only on the current state. Real driving has longer memory, which is why I also tested a second-order model.
How did you avoid overfitting the selection to your data?
By fixing selection weights in advance and checking the chosen cycle on held-out data from a different period.
How did you handle privacy?
Only speed and time were kept for modelling; location traces were removed or reduced to aggregate route types before analysis.
Learn it at DIYguru
These DIYguru courses and programmes teach what this project needs.
- CourseCertification Course in MATLAB-SIMULINK, QSS & Advisor Toolbox for EV Design
- CourseAdvanced Certification Course in EV Design & Simulation using MATLAB
- ProgrammeAdvanced Nanodegree Certification Program in EV Engineering, Design, Simulations, and Analysis
- ProgrammePCP in EV Electrical Design & Simulation
