Skip to content

Commit

Permalink
Clean up files and the project status for the GitHub release
Browse files Browse the repository at this point in the history
  • Loading branch information
Isaac-Ito-MW committed May 25, 2021
1 parent dfc9aaf commit cdde874
Show file tree
Hide file tree
Showing 54 changed files with 179 additions and 20 deletions.
Binary file modified HEV/PowerSplitHEV_SpeedTracking/PowerSplitHEV_SpeedTracking.slx
Binary file not shown.
Original file line number Diff line number Diff line change
Expand Up @@ -15,3 +15,20 @@

% Controller/Driver - load this after plant
DriverHEVPowerSplit_params

%% Override initial conditions and block parameter values

% initial_SOC_pct = initial_DrvPtn.HVBattery_SOC_pct;
initial_SOC_pct = 75;

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

initial.driverBrakeForce_N = 8000;
initial.driverBrakeOn_tf = true;

initial.vehicleSpeed_kph = 0;
initial.motorGenerator2_speed_rpm = 0;
initial.motorGenerator1_speed_rpm = 0;
initial.engine_speed_rpm = 0;
initial.engine_torque_Nm = 0;
Binary file not shown.
Original file line number Diff line number Diff line change
@@ -0,0 +1,74 @@
function PowerSplitHEV_SpeedTracking_plot_result_compact( nvpair )
% plots the simulation result.

% Copyright 2021 The MathWorks, Inc.

%% Process arguments

arguments
nvpair.Dataset (1,1) Simulink.SimulationData.Dataset
nvpair.PlotParent (1,1) matlab.ui.Figure
end

logsout = nvpair.Dataset;
parent = nvpair.PlotParent;

%% Plot

parent.Position(3:4) = [800 700]; % width height

tl = tiledlayout(parent, 3, 2, ...
'TileSpacing','compact', 'Padding','compact' );

ax = nexttile(tl);
vals = logsout.get("Vehicle Speed").Values;
plot(ax, vals.Time, vals.Data, 'LineWidth',1)
hold on; grid on
xlabel(ax, "Time (s)")
title(ax, "Longitudinal Vehicle Speed (km/hr)")
hold off

ax = nexttile(tl);
vals = logsout.get("MG2 Speed").Values;
plot(ax, vals.Time, vals.Data, 'LineWidth',1)
hold on; grid on
xlabel(ax, "Time (s)")
title(ax, "MG2 Speed (rpm)")
hold off


ax = nexttile(tl);
vals = logsout.get("Vehicle G Force").Values;
plot(ax, vals.Time, vals.Data, 'LineWidth',1)
hold on; grid on
xlabel(ax, "Time (s)")
title(ax, "Longitudinal G Force")
hold off

ax = nexttile(tl);
vals = logsout.get("MG1 Speed").Values;
plot(ax, vals.Time, vals.Data, 'LineWidth',1)
hold on; grid on
xlabel(ax, "Time (s)")
title(ax, "MG1 Speed (rpm)")
hold off


ax = nexttile(tl);
vals = logsout.get("HV Battery SOC").Values;
plot(ax, vals.Time, vals.Data, 'LineWidth',1)
hold on; grid on
xlabel(ax, "Time (s)")
title(ax, "HV Battery SOC (%)")
hold off

ax = nexttile(tl);
vals = logsout.get("Engine Speed").Values;
plot(ax, vals.Time, vals.Data, 'LineWidth',1)
hold on; grid on
xlabel(ax, "Time (s)")
title(ax, "Engine Speed (rpm)")
hold off


end
Original file line number Diff line number Diff line change
Expand Up @@ -16,8 +16,8 @@

%% Override initial conditions and block parameter values

initial_SOC_pct = initial_DrvPtn.HVBattery_SOC_pct;
% initial_SOC_pct = 75;
% initial_SOC_pct = initial_DrvPtn.HVBattery_SOC_pct;
initial_SOC_pct = 75;

initial.hvBatteryCapacity_kWh = batteryHighVoltage.nominalCapacity_kWh * initial_SOC_pct/100;
initial.driverHVBattSOC_pct = initial_SOC_pct;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -16,8 +16,8 @@

%% Override initial conditions and block parameter values

initial_SOC_pct = initial_DrvPtn.HVBattery_SOC_pct;
% initial_SOC_pct = 75;
% initial_SOC_pct = initial_DrvPtn.HVBattery_SOC_pct;
initial_SOC_pct = 75;

initial.hvBatteryCapacity_kWh = batteryHighVoltage.nominalCapacity_kWh * initial_SOC_pct/100;
initial.driverHVBattSOC_pct = initial_SOC_pct;
Expand Down

This file was deleted.

Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
<?xml version='1.0' encoding='UTF-8'?>
<Info />
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
<?xml version='1.0' encoding='UTF-8'?>
<Info location="simulation_result.png" type="File" />
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
<?xml version='1.0' encoding='UTF-8'?>
<Info />
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
<?xml version='1.0' encoding='UTF-8'?>
<Info location="PowerSplitDriveUnit_small.png" type="File" />
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
<?xml version='1.0' encoding='UTF-8'?>
<Info />
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
<?xml version='1.0' encoding='UTF-8'?>
<Info location="PowerSplitHEV_SpeedTracking.png" type="File" />
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
<?xml version='1.0' encoding='UTF-8'?>
<Info />
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
<?xml version='1.0' encoding='UTF-8'?>
<Info location="drive_patterns" type="File" />

This file was deleted.

This file was deleted.

This file was deleted.

This file was deleted.

Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
<?xml version='1.0' encoding='UTF-8'?>
<Info location="PowerSplitHEV_SpeedTracking_high_speed.mlx" type="File" />
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
<?xml version='1.0' encoding='UTF-8'?>
<Info location="DrivingPatternBasic_accelerate_decelerate_mph.mlx" type="File" />

This file was deleted.

Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
<?xml version='1.0' encoding='UTF-8'?>
<Info location="DrivingPatternBasic_simple_drive_pattern.mlx" type="File" />
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
<?xml version='1.0' encoding='UTF-8'?>
<Info location="DrivingPatternBasic_ftp75_mph.mlx" type="File" />
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
<?xml version='1.0' encoding='UTF-8'?>
<Info location="DrivingPatternBasic_high_speed.mlx" type="File" />
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
<?xml version='1.0' encoding='UTF-8'?>
<Info location="DrivingPatternBasic_mg2_accelerate.mlx" type="File" />
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
<?xml version='1.0' encoding='UTF-8'?>
<Info location="DrivingPatternBasic_accelerate_decelerate_kph.mlx" type="File" />
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
<?xml version='1.0' encoding='UTF-8'?>
<Info location="DrivingPatternBasic_eng_accelerate.mlx" type="File" />
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
<?xml version='1.0' encoding='UTF-8'?>
<Info />
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
<?xml version='1.0' encoding='UTF-8'?>
<Info location="1" type="DIR_SIGNIFIER" />
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
<?xml version='1.0' encoding='UTF-8'?>
<Info>
<Category UUID="FileClassCategory">
<Label UUID="design" />
</Category>
</Info>
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
<?xml version='1.0' encoding='UTF-8'?>
<Info location="PowerSplitHEV_SpeedTracking_ftp75.mlx" type="File" />
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
<?xml version='1.0' encoding='UTF-8'?>
<Info>
<Category UUID="FileClassCategory">
<Label UUID="design" />
</Category>
</Info>
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
<?xml version='1.0' encoding='UTF-8'?>
<Info location="PowerSplitHEV_SpeedTracking_simple_drive_pattern.mlx" type="File" />

This file was deleted.

Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
<?xml version='1.0' encoding='UTF-8'?>
<Info>
<Category UUID="FileClassCategory">
<Label UUID="design" />
</Category>
</Info>
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
<?xml version='1.0' encoding='UTF-8'?>
<Info location="PowerSplitHEV_SpeedTracking_plot_result_compact.m" type="File" />
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
<?xml version='1.0' encoding='UTF-8'?>
<Info>
<Category UUID="FileClassCategory">
<Label UUID="design" />
</Category>
</Info>
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
<?xml version='1.0' encoding='UTF-8'?>
<Info location="PowerSplitHEV_SpeedTracking_select_ftp75.m" type="File" />
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
<?xml version='1.0' encoding='UTF-8'?>
<Info>
<Category UUID="FileClassCategory">
<Label UUID="design" />
</Category>
</Info>
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
<?xml version='1.0' encoding='UTF-8'?>
<Info location="PowerSplitHEV_SpeedTracking_select_simple_pattern.m" type="File" />
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
<?xml version='1.0' encoding='UTF-8'?>
<Info>
<Category UUID="FileClassCategory">
<Label UUID="design" />
</Category>
</Info>
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
<?xml version='1.0' encoding='UTF-8'?>
<Info location="PowerSplitHEV_SpeedTracking_select_accel_decel.m" type="File" />

This file was deleted.

0 comments on commit cdde874

Please sign in to comment.