ncapSpec
Syntax
Description
Add-On Required: This feature requires the Automated Driving Toolbox Test Suite for Euro NCAP Protocols add-on.
[
returns European New Car Assessment Programme (Euro
NCAP®) test specifications for an input Euro
NCAP test name, variationSpec,ncapTestSpec,specInfo] = ncapSpec(ncapTestName)ncapTestName.
[
returns Euro NCAP test specifications for an input
Euro NCAP test name,
variationSpec,ncapTestSpec,specInfo] = ncapSpec(euroAssessmentObj,ncapTestName)ncapTestName, using the Euro NCAP assessment protocol specifications
euroAssessmentObj. (since R2026a)
Examples
Specify the European New Car Assessment Programme (Euro NCAP) test name for the Vulnerable Road User Automatic Emergency Braking Crossing Car-to-Pedestrian Nearside Child Obstructed test.
ncapTestName = "VRU AEB Crossing CPNCO";Obtain specifications for the NCAP test, which you can use to create a seed scenario and its variants.
[variationSpec,ncapTestSpec] = ncapSpec(ncapTestName)
variationSpec=22×2 table
2.7778 "Day"
4.1667 "Day"
5.5556 "Day"
6.9444 "Day"
8.3333 "Day"
9.7222 "Day"
11.1111 "Day"
12.5000 "Day"
13.8889 "Day"
15.2778 "Day"
16.6667 "Day"
2.7778 "Night"
4.1667 "Night"
5.5556 "Night"
⋮
ncapTestSpec = struct with fields:
SceneSpec: [1×1 struct]
ScenarioSpec: [1×1 struct]
Since R2026a
Specify a European New Car Assessment Programme (Euro NCAP) test name from protocol specification years 2026–2028.
ncapTestName = "CA FC CCRs";Create a Euro NCAP protocol specification object for protocol specification years 2026–2028.
euroAssessmentObj = euroAssessment(2026);
Obtain specifications for the Euro NCAP test, which you can use to create a seed scenario and its variants.
[variationSpec,ncapTestSpec] = ncapSpec(euroAssessmentObj,ncapTestName)
variationSpec=56×2 table
2.7778 "125%"
2.7778 "100%"
2.7778 "75%"
2.7778 "50%"
2.7778 "25%"
2.7778 "0%"
2.7778 "-25%"
5.5556 "125%"
5.5556 "100%"
5.5556 "75%"
5.5556 "50%"
5.5556 "25%"
5.5556 "0%"
5.5556 "-25%"
⋮
ncapTestSpec = struct with fields:
SceneSpec: [1×1 struct]
ScenarioSpec: [1×1 struct]
SeedScenarioIndex: 53
Input Arguments
Euro NCAP test scenario name, specified as
a character vector or string scalar, representing a valid Euro NCAP test scenario name. The list of valid Euro NCAP test scenario names depends on the protocol specification year specified
by the Year property of euroAssessmentObj.
2023, or you do not specify
euroAssessmentObj— See the Euro NCAP Test Scenario Information section of Euro NCAP Test Scenarios for Protocol Specification Years 2023–2025, which lists the full names of the valid Euro NCAP test scenarios, their correspondingncapTestNamevalues, and their descriptions for protocol specification years 2023–2025.2026 — See the Euro NCAP Test Scenario Information section of Euro NCAP Test Scenarios for Protocol Specification Years 2026–2028, which lists the full names of Euro NCAP test scenarios, their corresponding
ncapTestNamevalues, and their descriptions for protocol specification years 2026–2028. (since R2026a)
For more information on the Euro NCAP test scenarios, see Euro NCAP Car Safety Protocols.
Since R2026a
Euro NCAP assessment protocol specifications, specified as a euroAssessment object.
Output Arguments
Variation parameters, returned as an N-by-M
table. Each column in the table represents a variation parameter, and each row contains
a set of values for the variation parameters to use to create scenario variants.
N is the number of scenario variants and M is
the number of variation parameters to create a scenario variant. The table contains
different parameters based on the specified ncapTestName. For more
information on this table, see Variation Parameter Information.
Seed scenario specifications for the Euro
NCAP test, returned as a structure. The structure contains these fields,
using which you can create a seed scenario for the specified Euro NCAP test ncapTestName.
SceneSpec— Scene specifications, returned as a structure. The structure contains theRoadData,LaneData, andRoadWidthfields, which contain road and lane information. You can use this information to create a scene for the specified input Euro NCAP test namencapTestName. For more information on returned scene specifications, see Scene Specification Information.ScenarioSpec— Scenario specifications, returned as a structure. The structure contains actor and event information, which you can add to a scene to create a scenario. For more information on returned scenario specifications, see Scenario Specification Information.SeedScenarioIndex— Row index of the seed scenario specifications in thevariationSpecoutput table. For example, if theSeedScenarioIndexvalue is 11, then the 11th row in thevariationSpectable represents the seed scenario specifications.
Euro NCAP test information, returned as a structure. The structure contains these fields:
NCAPTestFullName— Full name of the input Euro NCAP testncapTestName, returned as a string scalar.MetaData— Metadata information of the generated scenario variants, returned as a structure. The structure contains aVariantTitlesfield. Each element of the field contains a string scalar that specifies the title for the scenario variant in the corresponding row of thevariationSpecoutput table.EvaluationCriterion— Criterion to evaluate for the specified Euro NCAP testncapTestName, returned as a string scalar. (since R2025a)ScoringCriterion— Criteria on which to score the specified Euro NCAP testncapTestName, returned as a structure. Depending on the specified Euro NCAP test, the returned structure contains one or more of these fields:ColorLookup— Lookup table used to assign color based on obtained score while generating the test report.AEBTable— Table containing vehicle under test (VUT) speed values and color lookup for assessment of Autonomous Emergency Braking (AEB) scenarios.AEBWeights— Weights for each AEB test scenario for the specified Euro NCAP testncapTestName, returned as a P-element column vector. P is the number of AEB scenario variants.AEBScenarioPoints— Maximum allocated AEB points for the specified Euro NCAP testncapTestName, returned as a scalar.FCWTable— Table containing VUT speed values and color lookup for assessment of forward collision warning (FCW) scenarios.FCWWeights— Weights for each FCW test scenario for the specified Euro NCAP testncapTestName, returned as a Q-element column vector. Q is the number of FCW scenario variants.FCWScenarioPoints— Maximum allocated FCW points for the specified Euro NCAP testncapTestName, returned as a scalar.Table— Table containing VUT speed values and color lookup for assessment of test scenarios.Weights— Weights for each test scenario for the specified Euro NCAP testncapTestName, returned as an R-element column vector. R is the number of test scenario variants.ScenarioPoints— Maximum allocated points for the specified Euro NCAP testncapTestName, returned as a scalar.DayScenarioPoints— Maximum allocated day scenario points for the specified Euro NCAP testncapTestName, returned as a scalar.NightScenarioPoints— Maximum allocated night scenario points for the specified Euro NCAP testncapTestName, returned as a scalar.
(since R2025a)
For more information, see the Euro NCAP assessment protocol for vulnerable road user protection [1] and safety assist collision avoidance [2].
More About
The returned variationSpec table contains one or more of these
columns based on the specified ncapTestName.
| Column | Description |
|---|---|
Angle | Angle of the |
CenterLaneMarking | Types of lane markings, returned as a string scalar or
|
d1 | Lateral distance traveled during curve establishment while performing a lane change, returned as a scalar. Units are in meters. For more information, see Lane Drift Parameters. |
d2 | Lateral distance traveled after curve establishment, but before crossing the lane edge, while performing a lane change, returned as a scalar. Units are in meters. For more information, see Lane Drift Parameters. |
EgoImpactLocation | Point of collision relative to the collision side of the ego vehicle,
returned as a string scalar. For example:
|
EgoLateralDirection | Lateral direction of the ego actor, returned as one of these options:
|
EgoLateralSpeed | Lateral speed of the ego actor, returned as a scalar. Units are in meters per second. |
EgoLongitudinalSpeed | Longitudinal speed of the ego actor, returned as a scalar. Units are in meters per second. |
EgoSpeed | Speed of the ego actor, returned as a scalar. Units are in meters per second. |
EgoYaw | Yaw angle of the ego actor, returned as a scalar. Units are in radians. |
EndRadius | Radius at the end of |
FinalAngle | Final angle of the |
FinalEndRadius | Final radius at the end of |
FinalStartRadius | Final radius at the start of |
FollowingDistance | Distance between the primary target and the secondary target at the start of the simulation. |
Headway | Distance between the ego and the primary actor at the start of simulation, returned as a scalar. Units are in meters. |
ImpactOverlap | Collision overlap between the ego and the primary target, returned as a
string scalar. For example: |
InitialAngle | Initial angle of the |
InitialEndRadius | Initial radius at the end of |
InitialStartRadius | Initial radius at the start of |
LaneChangeLength | Length of the lane change, returned as a scalar. Units are in meters. |
LaneChangeOffset | Lateral distance traveled after performing a lane change, returned as a scalar. Units are in meters. |
LateralAcceleration | Lateral acceleration while performing a lane change, returned as a scalar. Units are in meters per second-squared. |
Lighting | Lighting status of the scene, returned as a string scalar, such as
|
PrimaryTargetAcceleration | Acceleration of the primary target, returned as a scalar. Units are in meters per second-squared. |
PrimaryTargetAccelerationDistance | Distance for which the primary target ramps up, returned as a scalar. Units are in meters. |
PrimaryTargetDirection | Travel direction of the primary target, returned as one of these options:
|
PrimaryTargetLongitudinalSpeed | Longitudinal speed of the primary target, returned as a scalar. Units are in meters per second. |
PrimaryTargetSpeed | Speed of the primary target, returned as a scalar. Units are in meters per second. |
StartRadius | Radius at the start of |
TTC | Time to collide, specified as a scalar. Units are in seconds. |
The SceneSpec structure contains these fields:
RoadData— Road information, returned as a structure with these fields.Field Name Description RoadTypeType of road, returned as a string scalar, such as
"StraightRoad".RoadLengthLength of the road, returned as a scalar. Units are in meters.
RoadHeadingAngleHeading angle of the road, returned as a scalar. Units are in radians.
LaneData— Lane information, returned as a structure with these fields.Field Name Description LeftLaneCountNumber of left lanes in the road, returned as a scalar.
RightLaneCountNumber of right lanes in the road, returned as a scalar.
LaneMarkingsTypes of lane markings, returned as a scalar or
N+1-element string array. For a scalar, the returnedLaneMarkingsvalue applies to all lanes. For a string array,Nis the number of total lanes. Lane marking values can be"Solid","Dashed", or"Unmarked".LaneMarkingWidthsLane marking width, returned as an
N-element numeric row vector.Nis the number of total lanes. Units are in meters.RoadWidth— Width of the road, returned as a scalar. Units are in meters.
The ScenarioSpec structure contains one or more of these fields based
on the specified ncapTestName.
| Field | Description |
|---|---|
Collision | Collision information, returned as a structure containing these fields.
|
d1 | Lateral distance traveled during curve establishment while performing a lane change, returned as a scalar. Units are in meters. For more information, see Lane Drift Parameters. |
d2 | Lateral distance traveled after curve establishment, but before crossing the lane edge, while performing a lane change, returned as a scalar. Units are in meters. For more information, see Lane Drift Parameters. |
EgoDirection | Travel direction of the ego actor, returned as one of these options:
|
EgoLateralDirection | Lateral direction of the ego actor, returned as one of these options:
|
EgoLateralSpeed | Lateral speed of the ego actor, returned as a scalar. Units are in meters per second. |
EgoLongitudinalDirection | Longitudinal direction of the ego actor, returned as a string scalar.
For example, if the ego vehicle moves forward along the lane direction: |
EgoLongitudinalSpeed | Longitudinal speed of the ego actor, returned as a scalar. Units are in meters per second. |
EgoName | Name of the ego actor, returned as a string scalar, such as
|
EgoRadius | Radius of the turn while the ego vehicle follows a nonlinear road, returned as a scalar. Units are in meters. |
EgoSpeed | Speed of the ego actor, returned as a scalar. Units are in meters per second. |
EgoTrajectoryParameters | Trajectory parameters of the ego, returned as an
|
EgoYaw | Yaw angle of the actor, returned as a scalar. Units are in radians. |
Headway | Distance between the ego actor and primary actor at the start of the test, returned as a scalar. Units are in meters. |
Lighting | Lighting status of the scene, returned as a string scalar, such as
|
Obstruction | Obstruction information, returned as an
|
PrimaryTargetAcceleration | Acceleration of the primary target, returned as a scalar. Units are in meters per second-squared. |
PrimaryTargetAccelerationDistance | Distance for which the primary target ramps up, returned as a scalar. Units are in meters. |
PrimaryTargetActorInfo | Primary target actor information, returned as a structure. This structure is optional, and returned only when the scenario contains a pedestrian, motorcyclist, or a bicyclist as a primary target. The structure contains at least these fields:
|
PrimaryTargetCollisionDistance | Distance traveled by the primary target before collision, returned as a scalar. Units are in meters. |
PrimaryTargetDirection | Travel direction of the primary target, returned as one of these options:
|
PrimaryTargetName | Name of the primary target, returned as a string scalar, such as
|
PrimaryTargetOffset | Lateral distance of the primary target from the central lane boundary, returned as a scalar. Units are in meters. |
PrimaryTargetSpeed | Speed of the primary target, returned as a scalar. Units are in meters per second. |
PrimaryTargetSteadyStateDistance | Distance traveled by the primary target after ramp up and before collision, returned as a scalar. Units are in meters. |
PrimaryTargetTrajectoryParameters | Trajectory parameters of the primary target, returned as a structure. The structure contains these fields.
|
SecondaryTargetDirection | Travel direction of the secondary target, returned as one of these options:
|
SecondaryTargetName | Name of the secondary target, returned as a string scalar, such as
|
SecondaryTargetSpeed | Speed of the secondary target, returned as a scalar. Units are in meters per second. |
SmallObstructionActorInfo | Small obstruction actor information, returned as a structure. For more information on obstruction dimensions, see the Euro NCAP Test Protocol document. The structure contains these fields:
|
LargeObstructionActorInfo | Large obstruction actor information, returned as a structure. For more information on obstruction dimensions, see the Euro NCAP Test Protocol document. The structure contains these fields:
|
References
[1] European New Car Assessment Programme (Euro NCAP). Assessment Protocol - Vulnerable Road User Protection, Implementation 2023, Version 11.4, December 2023.
[2] European New Car Assessment Programme (Euro NCAP). Assessment Protocol - Safety Assist Collision Avoidance, Implementation 2023, Version 10.4.1, February 2024.
Version History
Introduced in R2024aThe ncapSpec function now accepts the
euroAssessmentObj argument, enabling support for Euro NCAP tests for protocol specification years 2026–2028.
For more information on the supported Euro NCAP
test scenarios for protocol specification years 2026–2028, see Euro NCAP Test Scenarios for Protocol Specification Years 2026–2028.
The ncapSpec function now returns additional fields in the
specInfo output structure:
EvaluationCriterionScoringCriterion
These Euro NCAP test scenarios are now renamed:
"VRU AEB Lateral CM Oncoming"is now called"VRU LSS CM Oncoming vehicle""VRU AEB Lateral CM Overtaking unintentional"is now called"VRU LSS CM Overtaking vehicle unintentional""VRU AEB Lateral CM Overtaking intentional"is now called"VRU LSS CM Overtaking vehicle intentional"
The ncapSpec function now returns additional fields for these
output arguments:
ncapTestSpec— Returns theSeedScenarioIndexfield, which contains the row index of the seed scenario specifications in thevariationSpecoutput.specInfo— Returns theMetaDatafield, which contains metadata information of generated scenario variants.
The variationSpec output table now returns these additional fields:
Angle, EgoSpeed, EndRadius,
FinalAngle, FinalEndRadius,
FinalStartRadius, InitialAngle,
InitialEndRadius, InitialStartRadius, and
StartRadius.
The ScenarioSpec table of the ncapTestSpec
output structure now returns these additional fields:
PrimaryTargetActorInfo, SmallObstructionActorInfo,
and LargeObstructionActorInfo. Previously, this information was in the
specInfo output structure.
See Also
ncapScenario | table2scenario | getScenario | generateVariants
MATLAB Command
You clicked a link that corresponds to this MATLAB command:
Run the command by entering it in the MATLAB Command Window. Web browsers do not support MATLAB commands.
选择网站
选择网站以获取翻译的可用内容,以及查看当地活动和优惠。根据您的位置,我们建议您选择:。
您也可以从以下列表中选择网站:
如何获得最佳网站性能
选择中国网站(中文或英文)以获得最佳网站性能。其他 MathWorks 国家/地区网站并未针对您所在位置的访问进行优化。
美洲
- América Latina (Español)
- Canada (English)
- United States (English)
欧洲
- Belgium (English)
- Denmark (English)
- Deutschland (Deutsch)
- España (Español)
- Finland (English)
- France (Français)
- Ireland (English)
- Italia (Italiano)
- Luxembourg (English)
- Netherlands (English)
- Norway (English)
- Österreich (Deutsch)
- Portugal (English)
- Sweden (English)
- Switzerland
- United Kingdom (English)