Skip to content

Commit 9c3fd21

Browse files
committed
Update Vehicle1D
1 parent 14e1c97 commit 9c3fd21

File tree

66 files changed

+2975
-356
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

66 files changed

+2975
-356
lines changed

Components/DrivePattern/test/TestResults_R2021a.xml

Lines changed: 0 additions & 23 deletions
This file was deleted.

Components/Engine/+EngineUtility/plotCustomEngineCurves.m

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
function plotCustomEngineCurves(blockpath)
1+
function f = plotCustomEngineCurves(blockpath)
22
%%
33

44
% Copyright 2022 The MathWorks, Inc.

Components/Engine/EngineCustom.ssc

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@ component EngineCustom
77
% according to the polynomial model.
88
% <br/>
99
% <br/>
10-
% View <a href="matlab:EngineUtility.plotCustomEngineCurves(gcb)">engine torque and power curves</a>.
10+
% View <a href="matlab:EngineUtility.plotCustomEngineCurves(gcb);">engine torque and power curves</a>.
1111

1212
% Copyright 2022 The MathWorks, Inc.
1313

Components/Engine/test/TestResults_R2021a.xml

Lines changed: 0 additions & 17 deletions
This file was deleted.

Components/PowerSplitDriveUnit/test/TestResults_R2021a.xml

Lines changed: 0 additions & 17 deletions
This file was deleted.

Components/Vehicle1D/+Vehicle1DUtility/getVehicle1DCustomBlockInfo.m

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
function info = getVehicle1DCustomBlockInfo(blk_gcbh)
2-
% Collects block parameter values from Vehicle 1D Basic block.
2+
% Collects block parameter values from Vehicle 1D Custom block.
33
% To use this function, make sure to select the block in Simulink canvas and
44
% then pass gcbh to this function.
55

Lines changed: 17 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,17 @@
1+
function info = getVehicle1DDriveineBlockInfo(blk_gcbh)
2+
% Collects block parameter values from longitudinal Vehicle block.
3+
% To use this function, make sure to select the block in Simulink canvas and
4+
% then pass gcbh to this function.
5+
6+
% Copyright 2021-2022 The MathWorks, Inc.
7+
8+
getp = @(p) evalin('base', get_param(blk_gcbh, p));
9+
10+
info.M_e_kg = getp('M_vehicle');
11+
info.R_tire_m = getp('R_tireroll');
12+
info.A_rl_N = getp('A_rl');
13+
info.B_rl_N_per_kph = getp('B_rl');
14+
info.C_rl_N_per_kph2 = getp('C_rl');
15+
info.grav_m_per_s2 = getp('g');
16+
17+
end
Binary file not shown.

Components/Vehicle1D/README.md

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,12 @@
1+
# Longitudinal Vehicle
2+
3+
[Longitudinal Vehicle block][url-1] from Simscape Driveline
4+
5+
[url-1]:https://www.mathworks.com/help/physmod/sdl/ref/longitudinalvehicle.html
6+
7+
## Block Property
8+
9+
<img src="images/image_Vehicle1DDriveline_ResistingForcePower.png"
10+
width="500" alt="Vehicle resisting force and power">
11+
12+
*Copyright 2022 The MathWorks, Inc.*

0 commit comments

Comments
 (0)