Skip to content

Commit cdde874

Browse files
committed
Clean up files and the project status for the GitHub release
1 parent dfc9aaf commit cdde874

File tree

54 files changed

+179
-20
lines changed

Some content is hidden

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

54 files changed

+179
-20
lines changed
5 Bytes
Binary file not shown.

HEV/PowerSplitHEV_SpeedTracking/PowerSplitHEV_SpeedTracking_setup.m

Lines changed: 17 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -15,3 +15,20 @@
1515

1616
% Controller/Driver - load this after plant
1717
DriverHEVPowerSplit_params
18+
19+
%% Override initial conditions and block parameter values
20+
21+
% initial_SOC_pct = initial_DrvPtn.HVBattery_SOC_pct;
22+
initial_SOC_pct = 75;
23+
24+
initial.hvBatteryCapacity_kWh = batteryHighVoltage.nominalCapacity_kWh * initial_SOC_pct/100;
25+
initial.driverHVBattSOC_pct = initial_SOC_pct;
26+
27+
initial.driverBrakeForce_N = 8000;
28+
initial.driverBrakeOn_tf = true;
29+
30+
initial.vehicleSpeed_kph = 0;
31+
initial.motorGenerator2_speed_rpm = 0;
32+
initial.motorGenerator1_speed_rpm = 0;
33+
initial.engine_speed_rpm = 0;
34+
initial.engine_torque_Nm = 0;
Lines changed: 74 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,74 @@
1+
function PowerSplitHEV_SpeedTracking_plot_result_compact( nvpair )
2+
% plots the simulation result.
3+
4+
% Copyright 2021 The MathWorks, Inc.
5+
6+
%% Process arguments
7+
8+
arguments
9+
nvpair.Dataset (1,1) Simulink.SimulationData.Dataset
10+
nvpair.PlotParent (1,1) matlab.ui.Figure
11+
end
12+
13+
logsout = nvpair.Dataset;
14+
parent = nvpair.PlotParent;
15+
16+
%% Plot
17+
18+
parent.Position(3:4) = [800 700]; % width height
19+
20+
tl = tiledlayout(parent, 3, 2, ...
21+
'TileSpacing','compact', 'Padding','compact' );
22+
23+
ax = nexttile(tl);
24+
vals = logsout.get("Vehicle Speed").Values;
25+
plot(ax, vals.Time, vals.Data, 'LineWidth',1)
26+
hold on; grid on
27+
xlabel(ax, "Time (s)")
28+
title(ax, "Longitudinal Vehicle Speed (km/hr)")
29+
hold off
30+
31+
ax = nexttile(tl);
32+
vals = logsout.get("MG2 Speed").Values;
33+
plot(ax, vals.Time, vals.Data, 'LineWidth',1)
34+
hold on; grid on
35+
xlabel(ax, "Time (s)")
36+
title(ax, "MG2 Speed (rpm)")
37+
hold off
38+
39+
40+
ax = nexttile(tl);
41+
vals = logsout.get("Vehicle G Force").Values;
42+
plot(ax, vals.Time, vals.Data, 'LineWidth',1)
43+
hold on; grid on
44+
xlabel(ax, "Time (s)")
45+
title(ax, "Longitudinal G Force")
46+
hold off
47+
48+
ax = nexttile(tl);
49+
vals = logsout.get("MG1 Speed").Values;
50+
plot(ax, vals.Time, vals.Data, 'LineWidth',1)
51+
hold on; grid on
52+
xlabel(ax, "Time (s)")
53+
title(ax, "MG1 Speed (rpm)")
54+
hold off
55+
56+
57+
ax = nexttile(tl);
58+
vals = logsout.get("HV Battery SOC").Values;
59+
plot(ax, vals.Time, vals.Data, 'LineWidth',1)
60+
hold on; grid on
61+
xlabel(ax, "Time (s)")
62+
title(ax, "HV Battery SOC (%)")
63+
hold off
64+
65+
ax = nexttile(tl);
66+
vals = logsout.get("Engine Speed").Values;
67+
plot(ax, vals.Time, vals.Data, 'LineWidth',1)
68+
hold on; grid on
69+
xlabel(ax, "Time (s)")
70+
title(ax, "Engine Speed (rpm)")
71+
hold off
72+
73+
74+
end

HEV/PowerSplitHEV_SpeedTracking/utils/PowerSplitHEV_SpeedTracking_runsim_accel_decel.m

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -16,8 +16,8 @@
1616

1717
%% Override initial conditions and block parameter values
1818

19-
initial_SOC_pct = initial_DrvPtn.HVBattery_SOC_pct;
20-
% initial_SOC_pct = 75;
19+
% initial_SOC_pct = initial_DrvPtn.HVBattery_SOC_pct;
20+
initial_SOC_pct = 75;
2121

2222
initial.hvBatteryCapacity_kWh = batteryHighVoltage.nominalCapacity_kWh * initial_SOC_pct/100;
2323
initial.driverHVBattSOC_pct = initial_SOC_pct;

HEV/PowerSplitHEV_SpeedTracking/utils/PowerSplitHEV_SpeedTracking_runsim_ftp75.m

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -16,8 +16,8 @@
1616

1717
%% Override initial conditions and block parameter values
1818

19-
initial_SOC_pct = initial_DrvPtn.HVBattery_SOC_pct;
20-
% initial_SOC_pct = 75;
19+
% initial_SOC_pct = initial_DrvPtn.HVBattery_SOC_pct;
20+
initial_SOC_pct = 75;
2121

2222
initial.hvBatteryCapacity_kWh = batteryHighVoltage.nominalCapacity_kWh * initial_SOC_pct/100;
2323
initial.driverHVBattSOC_pct = initial_SOC_pct;

resources/project/-V17xoKMQuak4-chxc1ixTLv0tA/N-eG_4vJzCQEnyhP9iZj4pC1qykp.xml

Lines changed: 0 additions & 2 deletions
This file was deleted.
Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,2 @@
1+
<?xml version='1.0' encoding='UTF-8'?>
2+
<Info />
Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,2 @@
1+
<?xml version='1.0' encoding='UTF-8'?>
2+
<Info location="simulation_result.png" type="File" />
Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,2 @@
1+
<?xml version='1.0' encoding='UTF-8'?>
2+
<Info />

0 commit comments

Comments
 (0)