Contenuto principale

RDE.DriveCycles

R2026b

RDE-compliant drive cycle generator

Since R2024b

Description

Use an RDE.DriveCycles object to generate drive cycles that comply with the Real Driving Emissions (RDE) standard and conform to United Nations Economic Commission for Europe (UNECE) regulatory constraints. To produce compliant trips, configure properties using dot notation, and then call the generateDriveCycles function. The function generates drive cycles, exports them as CSV files to the folder specified by OutputFolder, and stores them in the Data property of the RDE.DriveCycles object. See RDE.DriveCycles Properties.

Creation

Description

obj = RDE.DriveCycles creates an RDE.DriveCycles object with default regulatory parameters for generating RDE-compliant drive cycles.

example

Object Functions

generateDriveCyclesGenerate RDE-compliant drive cycles
plotDriveCyclesPlot generated RDE drive cycles

Examples

collapse all

To see how these tuning parameters affect velocity profile characteristics, create RDE.DriveCycles objects and generate drive cycles with different ShapeParameter and SmoothingWindowLength values. Lower values produce more aggressive speed transitions, while higher values produce smoother profiles.

% Trip Structure (speed bins: urban <=60, rural 60-90, motorway >90 km/h)
params.dt = 1;
params.StopSpeedTh = 1/3.6;
params.OperationModeBoundaries = [60 90]/3.6;

% Distance Composition (fraction of total trip distance per segment)
params.UrbanRatioRange = [0.29 0.44];
params.RuralRatioRange = [0.23 0.43];
params.MotorwayRatioRange = [0.23 0.43];

% Speed Constraints (average and limit speeds per segment)
params.MotorwayUsualMaxSpeed = 145/3.6;
params.MotorwayAbsoluteSpeedTimeRatio = 0.03;
params.MotorwayAbsoluteMaxSpeed = 160/3.6;
params.UrbanAverageSpeedRange = [15 40]/3.6;
params.RuralAverageSpeedRange = [60 90]/3.6;
params.MotorwayAverageSpeedRange = [90 145]/3.6;
params.MotorwayUsualMinSpeed = 100/3.6;
params.MotorwayUsualMinSpeedTime = 5*60;

% Urban Stop Conditions (stop = speed <= StopSpeedTh)
params.UrbanStopRatioRange = [0.06 0.3];
params.UrbanMinStopTime = 10;
params.UrbanMinStopCount = 2;

% Trip Duration and Distance (90-120 min, >=16 km per segment)
params.TripDurationRange = [90 120]*60;
params.UrbanMinDistance = 16000;
params.RuralMinDistance = 16000;
params.MotorwayMinDistance = 16000;

% VA95 Dynamic Boundary (upper limit - trip invalid if too aggressive)
params.VA95VelocityThreshold = 74.6/3.6;
params.VA95BoundarySpeedCoeff1 = 0.136;
params.VA95BoundaryBias1 = 14.44;
params.VA95BoundarySpeedCoeff2 = 0.0742;
params.VA95BoundaryBias2 = 18.966;

% RPA Dynamic Boundary (lower limit - trip invalid if too passive)
params.RPAVelocityThreshold = 94.05/3.6;
params.RPABoundarySpeedCoeff = -0.0016;
params.RPABoundaryBias = 0.1755;
params.RPALowerBound = 0.025;

% Create generator with aggressive profile (shape = 1, window = 5)
dcAggressive = RDE.DriveCycles;
flds = fieldnames(params);
for k = 1:numel(flds)
    dcAggressive.(flds{k}) = params.(flds{k});
end
dcAggressive.ShapeParameter = 1;
dcAggressive.SmoothingMethod = 'rloess';
dcAggressive.SmoothingWindowLength = 5;
dcAggressive.NTrips = 1;
dcAggressive.NumberOfIterations = 10000;
dcAggressive.OutputFolder = fullfile(tempdir,'results_aggressive');
generateDriveCycles(dcAggressive);

% Create generator with smooth profile (shape = 2, window = 20)
dcSmooth = RDE.DriveCycles;
for k = 1:numel(flds)
    dcSmooth.(flds{k}) = params.(flds{k});
end
dcSmooth.ShapeParameter = 2;
dcSmooth.SmoothingMethod = 'rloess';
dcSmooth.SmoothingWindowLength = 20;
dcSmooth.NTrips = 1;
dcSmooth.NumberOfIterations = 50000;
dcSmooth.OutputFolder = fullfile(tempdir,'results_smooth');
generateDriveCycles(dcSmooth);

% Overlay velocity profiles
figure
hold on
plot(seconds(dcAggressive.Data{1}.t),dcAggressive.Data{1}.v*3.6,'r')
plot(seconds(dcSmooth.Data{1}.t),dcSmooth.Data{1}.v*3.6,'b')
yline([60 90],'--k')
xlabel('Time (s)')
ylabel('Speed (km/h)')
legend('Shape = 1, Window = 5 (aggressive)','Shape = 2, Window = 20 (smooth)', ...
    'Urban/Rural boundary','Rural/Motorway boundary')
title('Effect of Generation Parameters on RDE Trip Profile')

RDE trip profile plot that compares aggressive and smooth driving on cycle

Version History

Introduced in R2024b