Drive Cycle Source
Standard or specified longitudinal drive cycle
Libraries:
Powertrain Blockset /
Vehicle Scenario Builder
Vehicle Dynamics Blockset /
Vehicle Scenarios /
Drive Cycle and Maneuvers
Description
The Drive Cycle Source block generates a standard or user-specified longitudinal drive cycle. The block output is the specified vehicle longitudinal speed, which you can use to:
Predict the engine torque and fuel consumption that a vehicle requires to achieve desired speed and acceleration for a given gear shift reference.
Produce realistic velocity and shift references for closed loop acceleration and braking commands for vehicle control and plant models.
Study, tune, and optimize vehicle control, system performance, and system robustness over multiple drive cycles.
Identify the faults within tolerances specified by standardized tests, including:
EPA dynamometer driving schedules1
Worldwide Harmonised Light Vehicle Test Procedure (WLTP) laboratory tests2
For the drive cycles, you can use:
Drive cycles from predefined sources. By default, the block includes the
FTP–75
drive cycle. To install additional drive cycles from a support package, see Install Drive Cycle Data. The support package has drive cycles that include the gear shift schedules, for exampleJC08
andCUEDC
.Workspace variables that define your own drive cycles.
.
mat
, .xls
, .xlsx
, or .txt
files.Wide open throttle (WOT) parameters, including initial and nominal reference speed, deceleration start time, and final reference speed.
To achieve the goals listed in the table, use the specified Drive Cycle Source block parameter options.
Goal | Action |
---|---|
Repeat the drive cycle if the simulation run time exceeds the drive cycle length. | Select Repeat cyclically. |
Output the acceleration, as calculated by Savitzky-Golay differentiation. | Select Output acceleration. |
Specify a sample period for discrete applications. | Specify a Output sample period (0 for continuous), dt parameter. |
Update the simulation run time so that it equals the length of the drive cycle. | Click Update simulation time. If a model configuration reference exists, the block does not enable this option. |
Plot the drive cycle in a MATLAB® figure. | Click Plot drive cycle. |
Specify the drive cycle using a workspace variable. | Click Specify variable. The block:
Specify the workspace variable so that it contains time, velocity, and, optionally, the gear shift schedule. For examples, see Create Drive Cycles Using Workspace Variables. |
Specify the drive cycle using a file. | Click Select file. The block:
Specify a file that contains time, velocity, and, optionally, the gear shift schedule. |
Output drive cycle gear. |
Specify a drive cycle that contains a gear shift schedule. You can use:
Click Output gear shift data. |
Install additional drive cycles from a support package. | Click Install additional drive cycles. The block enables the parameter if you can install additional drive cycles from a support package. |
Identify drive cycle faults within tolerances specified by standardized tests. | On the Fault Tracking tab, use the parameters to specify the fault tolerances. If the vehicle speed is not within the allowable speed range, the block sets a fault condition. |
Fault and Failure Tracking
On the Fault Tracking tab, use the parameters to specify the fault tolerances. If the vehicle speed or time is not within the allowable range, the block sets a fault condition.
Parameter | Description | Setting | |
---|---|---|---|
EPA Standard1 | WLTP Tests2 | ||
Speed tolerance | Speed tolerance above the highest point and below the lowest point of the drive cycle speed trace within the time tolerance. | 2.0 mph | 2.0 km/h |
Time tolerance | Time that the block uses to determine the speed tolerance. | 1.0 s | 1.0 s |
Maximum number of faults | Maximum number of faults during the drive cycle. | Not specified | 10 |
Maximum single fault time | Maximum fault duration. | 2.0 s | 1.0 s |
Maximum total fault time | Maximum accumulated time spent under fault condition. | Not specified | Not specified |
These figures illustrate how the block uses the velocity and time tolerances to determine the allowable speed range.
|
|
Create Drive Cycles Using Workspace Variables
If you set Drive cycle source to Workspace
variable
, you can specify a workspace variable that defines the
drive cycle.
This table provides examples for using workspace variables to create your own drive cycles.
Workspace Variable | Source Velocity Unit | Output Velocity Unit | Drive Cycle Plot |
---|---|---|---|
Structure without a gear shift schedule. From workspace set to t = 0:1:100; xdot = 5.*sin(t)+10; myCycleS.time = t'; myCycleS.signals.values = xdot'; | m/s | mph |
|
Structure with a gear shift schedule. From workspace set to gears=[0, 1, 2, 3, 3, 4, 4, 4, 4, 4, 4]; t=0:1:10; xdot=[0,5,10,15,20,25,30,30,30,30,30]; myCycleS.time=t'; myCycleS.signals.values=[xdot',gears']; | m/s | mph |
|
2-D array without a gear shift schedule. From workspace set to t = 0:1:100; xdot = 5.*sin(t)+5; myCycleA = [t',xdot']; | m/s | mph |
|
2-D array with a gear shift schedule. From workspace set to gears=[0, 1, 2, 3, 4, 4, 4, 5, 5, 5, 5]; t=0:1:10; xdot=[0,5,10,15,20,25,30,40,50,60,60]; myCycleA=[t',xdot',gears']; | mph | mph |
|
Time series object without a gear shift schedule. From workspace set to myCycleT = timeseries; t = 0:1:100; xdot = 5.*sin(t)+20; myCycleT.Data = xdot'; myCycleT.Time = t; | m/s | mph |
|
Time series object without a gear shift schedule. From workspace set to myCycleT = timeseries; gears=[0, 1, 2, 3, 4, 4, 4, 5, 5, 5, 5]; t=0:1:10; xdot=[0,10,20,30,32,33,34,40,50,60,60]; myCycleT.Data = [xdot',gears']; myCycleT.Time = t'; | mph | mph |
|
Ports
Input
Output
Parameters
References
[1] Environmental Protection Agency (EPA). EPA urban dynamometer driving schedule. 40 CFR 86.115-78, July 1, 2001.
[2] European Union Commission. "Speed trace tolerances". European Union Commission Regulation. 32017R1151, Sec 1.2.6.6, June 1, 2017.
Extended Capabilities
Version History
Introduced in R2017a