-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Update VehicleSpeedReference component: Remove the WLTP drive cycle s…
…imulation case. Updtae the test-related files and folders.
- Loading branch information
1 parent
b2cdc59
commit 004850e
Showing
108 changed files
with
3,402 additions
and
3,507 deletions.
There are no files selected for viewing
Large diffs are not rendered by default.
Oops, something went wrong.
Binary file not shown.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Binary file modified
BIN
+399 Bytes
(100%)
Components/VehicleSpeedReference/SimulationCases/VehSpdRef_Case_Constant.mlx
Binary file not shown.
Binary file modified
BIN
+17.5 KB
(170%)
Components/VehicleSpeedReference/SimulationCases/VehSpdRef_Case_FTP75.mlx
Binary file not shown.
Binary file modified
BIN
-185 Bytes
(99%)
Components/VehicleSpeedReference/SimulationCases/VehSpdRef_Case_HighSpeed.mlx
Binary file not shown.
Binary file modified
BIN
+12 Bytes
(100%)
Components/VehicleSpeedReference/SimulationCases/VehSpdRef_Case_SimpleDrivePattern.mlx
Binary file not shown.
Binary file removed
BIN
-39.6 KB
Components/VehicleSpeedReference/SimulationCases/VehSpdRef_Case_WLTP.mlx
Binary file not shown.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
50 changes: 50 additions & 0 deletions
50
Components/VehicleSpeedReference/SimulationCases/VehSpdRef_loadCase.m
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,50 @@ | ||
function VehSpdRef_loadCase(NameValuePair) | ||
%% Sets up simulation | ||
% This function sets up the followings: | ||
% - Simulation stop time | ||
% - Input signals | ||
% | ||
% Model must be loaded for this function to work. | ||
|
||
% Copyright 2023-2024 The MathWorks, Inc. | ||
|
||
arguments | ||
NameValuePair.CaseName {mustBeTextScalar} = "Default" | ||
|
||
NameValuePair.ModelName {mustBeTextScalar} = "VehSpdRef_harness_model" | ||
NameValuePair.TargetSubsystemPath {mustBeTextScalar} = "/Vehicle speed reference" | ||
|
||
NameValuePair.CaseNumber (1,1) {mustBeMember(NameValuePair.CaseNumber, 1:5)} = 1 | ||
NameValuePair.StopTime (1,1) {mustBePositive} = 100 | ||
|
||
NameValuePair.DisplayMessage (1,1) logical = true | ||
end | ||
|
||
dispMsg = NameValuePair.DisplayMessage; | ||
|
||
if dispMsg | ||
disp("Setting up simulation...") | ||
disp("Simulation case: " + NameValuePair.CaseName) | ||
end | ||
|
||
mdl = NameValuePair.ModelName; | ||
|
||
t_end = NameValuePair.StopTime; | ||
|
||
if dispMsg | ||
disp("Setting simulation stop time to " + t_end + " sec.") | ||
end | ||
|
||
set_param(mdl, StopTime = num2str(t_end)); | ||
|
||
caseNumStr = num2str(NameValuePair.CaseNumber); | ||
if dispMsg | ||
disp("Selecting simulation case " + caseNumStr + ".") | ||
end | ||
|
||
sysPath = mdl + NameValuePair.TargetSubsystemPath; | ||
|
||
set_param( sysPath + "/Simulation Case", ... | ||
Value = caseNumStr) | ||
|
||
end % function |
22 changes: 22 additions & 0 deletions
22
Components/VehicleSpeedReference/SimulationCases/VehSpdRef_loadCase_Constant.m
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,22 @@ | ||
function VehSpdRef_loadCase_Constant(NameValuePair) | ||
%% Sets up simulation | ||
% Model must be loaded for this function to work. | ||
|
||
% Copyright 2023-2024 The MathWorks, Inc. | ||
|
||
arguments | ||
NameValuePair.ModelName {mustBeTextScalar} = "VehSpdRef_harness_model" | ||
NameValuePair.TargetSubsystemPath {mustBeTextScalar} = "/Vehicle speed reference" | ||
NameValuePair.DisplayMessage (1,1) logical = true | ||
end | ||
|
||
VehSpdRef_loadCase( ... | ||
CaseName = "Constant", ... | ||
CaseNumber = 4, ... | ||
StopTime = 1000, ... | ||
... | ||
ModelName = NameValuePair.ModelName, ... | ||
TargetSubsystemPath = NameValuePair.TargetSubsystemPath, ... | ||
DisplayMessage = NameValuePair.DisplayMessage ) | ||
|
||
end % function |
22 changes: 22 additions & 0 deletions
22
Components/VehicleSpeedReference/SimulationCases/VehSpdRef_loadCase_FTP75.m
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,22 @@ | ||
function VehSpdRef_loadCase_FTP75(NameValuePair) | ||
%% Sets up simulation | ||
% Model must be loaded for this function to work. | ||
|
||
% Copyright 2023-2024 The MathWorks, Inc. | ||
|
||
arguments | ||
NameValuePair.ModelName {mustBeTextScalar} = "VehSpdRef_harness_model" | ||
NameValuePair.TargetSubsystemPath {mustBeTextScalar} = "/Vehicle speed reference" | ||
NameValuePair.DisplayMessage (1,1) logical = true | ||
end | ||
|
||
VehSpdRef_loadCase( ... | ||
CaseName = "FTP-75 using Drive Cycle Source block", ... | ||
CaseNumber = 3, ... | ||
StopTime = 2474, ... | ||
... | ||
ModelName = NameValuePair.ModelName, ... | ||
TargetSubsystemPath = NameValuePair.TargetSubsystemPath, ... | ||
DisplayMessage = NameValuePair.DisplayMessage ) | ||
|
||
end % function |
22 changes: 22 additions & 0 deletions
22
Components/VehicleSpeedReference/SimulationCases/VehSpdRef_loadCase_HighSpeed.m
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,22 @@ | ||
function VehSpdRef_loadCase_HighSpeed(NameValuePair) | ||
%% Sets up simulation | ||
% Model must be loaded for this function to work. | ||
|
||
% Copyright 2023 The MathWorks, Inc. | ||
|
||
arguments | ||
NameValuePair.ModelName {mustBeTextScalar} = "VehSpdRef_harness_model" | ||
NameValuePair.TargetSubsystemPath {mustBeTextScalar} = "/Vehicle speed reference" | ||
NameValuePair.DisplayMessage (1,1) logical = true | ||
end | ||
|
||
VehSpdRef_loadCase( ... | ||
CaseName = "High speed driving", ... | ||
CaseNumber = 2, ... | ||
StopTime = 200, ... | ||
... | ||
ModelName = NameValuePair.ModelName, ... | ||
TargetSubsystemPath = NameValuePair.TargetSubsystemPath, ... | ||
DisplayMessage = NameValuePair.DisplayMessage ) | ||
|
||
end % function |
22 changes: 22 additions & 0 deletions
22
Components/VehicleSpeedReference/SimulationCases/VehSpdRef_loadCase_SimpleDrivePattern.m
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,22 @@ | ||
function VehSpdRef_loadCase_SimpleDrivePattern(NameValuePair) | ||
%% Sets up simulation | ||
% Model must be loaded for this function to work. | ||
|
||
% Copyright 2023-2024 The MathWorks, Inc. | ||
|
||
arguments | ||
NameValuePair.ModelName {mustBeTextScalar} = "VehSpdRef_harness_model" | ||
NameValuePair.TargetSubsystemPath {mustBeTextScalar} = "/Vehicle speed reference" | ||
NameValuePair.DisplayMessage (1,1) logical = true | ||
end | ||
|
||
VehSpdRef_loadCase( ... | ||
CaseName = "Simple drive pattern", ... | ||
CaseNumber = 1, ... | ||
StopTime = 100, ... | ||
... | ||
ModelName = NameValuePair.ModelName, ... | ||
TargetSubsystemPath = NameValuePair.TargetSubsystemPath, ... | ||
DisplayMessage = NameValuePair.DisplayMessage ) | ||
|
||
end % function |
53 changes: 0 additions & 53 deletions
53
Components/VehicleSpeedReference/Test/VehSpdRef_UnitTest_MQC.m
This file was deleted.
Oops, something went wrong.
71 changes: 0 additions & 71 deletions
71
Components/VehicleSpeedReference/Test/VehSpdRef_runtests.m
This file was deleted.
Oops, something went wrong.
Oops, something went wrong.