-
Notifications
You must be signed in to change notification settings - Fork 35
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Update markdown file locations (#22)
* Update locations to store markdowns generated from live scripts.
- Loading branch information
1 parent
cc8a2c1
commit 5e17056
Showing
1,578 changed files
with
7,031 additions
and
4,656 deletions.
There are no files selected for viewing
Large diffs are not rendered by default.
Oops, something went wrong.
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,82 @@ | ||
classdef BEV_Case_test < matlab.unittest.TestCase | ||
|
||
% This is class-based unit test implementation. | ||
% To navigate test results and see code coverage, use Test Browser (testBrowser). | ||
% | ||
% Documentation | ||
% | ||
% - Run Tests in Editor | ||
% https://www.mathworks.com/help/matlab/matlab_prog/run-tests-in-editor.html | ||
% | ||
% - Test Browser | ||
% https://www.mathworks.com/help/matlab/ref/testbrowser-app.html | ||
% | ||
% - Author Class-Based Unit Tests in MATLAB | ||
% https://www.mathworks.com/help/matlab/matlab_prog/author-class-based-unit-tests-in-matlab.html | ||
% | ||
% - matlab.unittest.TestCase Class | ||
% https://www.mathworks.com/help/matlab/ref/matlab.unittest.testcase-class.html | ||
|
||
% Copyright 2024 The MathWorks, Inc. | ||
|
||
methods (Test) | ||
% Functions in this "Test" section are the tests. | ||
% Before a function in this section runs, the TestSetup function | ||
% defined in the "TestMethodSetup" section runs. | ||
|
||
%% Minimum quality check | ||
% Check that models, scripts, functions, and classes run right out of the box. | ||
|
||
function MQC_Constant_Basic_1(~) | ||
BEV_Case_Constant_Basic | ||
end | ||
|
||
function MQC_Constant_Thermal_1(~) | ||
BEV_Case_Constant_Thermal | ||
end | ||
|
||
function MQC_FTP75_Basic_1(~) | ||
BEV_Case_FTP75_Basic | ||
end | ||
|
||
function MQC_HighSpeed_Basic_1(~) | ||
BEV_Case_HighSpeed_Basic | ||
end | ||
|
||
function MQC_SimpleDrivePattern_Basic_1(~) | ||
BEV_Case_SimpleDrivePattern_Basic | ||
end | ||
|
||
function MQC_SimpleDrivePattern_Thermal_1(~) | ||
BEV_Case_SimpleDrivePattern_Thermal | ||
end | ||
|
||
function MQC_WLTP_Basic_1(~) | ||
BEV_Case_WLTP_Basic | ||
end | ||
|
||
end % methods | ||
|
||
methods(TestMethodSetup) | ||
% Functions in this "TestMethodSetup" section always run before | ||
% each test defined in the "Test" section runs. | ||
|
||
function TestSetup(testcase) | ||
%% | ||
close all | ||
bdclose all | ||
|
||
% addTeardown adds a function which always runs after each test. | ||
% Even if the execution of a test ends with an error, the teardown function runs. | ||
% This is useful, for example, to close figure windows | ||
% after a test which opens figure windows fails. | ||
addTeardown(testcase, @close_all) | ||
|
||
function close_all | ||
close all | ||
bdclose all | ||
end % function | ||
end % function | ||
|
||
end % methods | ||
end % classdef |
39 changes: 0 additions & 39 deletions
39
BEV/SimulationCases/Markdowns/BEV_Case_Constant_Thermal.md
This file was deleted.
Oops, something went wrong.
Binary file removed
BIN
-42.7 KB
BEV/SimulationCases/Markdowns/Media/BEV_Case_Constant_Basic_media/figure_0.png
Binary file not shown.
Binary file removed
BIN
-47.5 KB
BEV/SimulationCases/Markdowns/Media/BEV_Case_Constant_Thermal_media/figure_0.png
Binary file not shown.
Binary file removed
BIN
-78.3 KB
BEV/SimulationCases/Markdowns/Media/BEV_Case_FTP75_Basic_media/figure_0.png
Binary file not shown.
Binary file removed
BIN
-60.1 KB
BEV/SimulationCases/Markdowns/Media/BEV_Case_HighSpeed_Basic_media/figure_0.png
Binary file not shown.
Binary file removed
BIN
-58.9 KB
...ationCases/Markdowns/Media/BEV_Case_SimpleDrivePattern_Basic_media/figure_0.png
Binary file not shown.
Binary file removed
BIN
-65.9 KB
...ionCases/Markdowns/Media/BEV_Case_SimpleDrivePattern_Thermal_media/figure_0.png
Binary file not shown.
Binary file removed
BIN
-80.5 KB
BEV/SimulationCases/Markdowns/Media/BEV_Case_WLTP_Basic_media/figure_0.png
Binary file not shown.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
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
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,75 @@ | ||
|
||
# <span style="color:rgb(213,80,0)">Battery Electric Vehicle Model in Simscape</span> | ||
|
||
Open the Project by double\-clicking **<samp>BatteryElectricVehicle.prj</samp>** file if you have not opened the project yet. It will load shortcuts to scripts and models in **Project Shortcuts** in Toolstrip. | ||
|
||
# Battery Electric Vehicle (BEV) Model for System Level Simulation | ||
|
||
This is a simple, fast running BEV model which can estimate the electrical efficiency of the vehicle. It is also suitable for further customizations for more focused analysis of individual components at vehicle system level. | ||
|
||
|
||
Open the [BEV system model](matlab:openFile('BEV_system_model')). You can also use the shortcut button **BEV system model** in the **Project Shortcuts** toolstrip. | ||
|
||
|
||
Files related to the BEV system model can be found at **BEV** folder. | ||
|
||
|
||
<img src="media/BEVProject_main_script_media/image_0.png" width="805" alt="image_0.png"> | ||
|
||
# Vehicle Components | ||
## Longitudinal Vehicle | ||
|
||
Longitudinal abstract vehicle model can be used to find required powertrain performance (such as motor torque and power etc.) given basic vehicle performance specifications. | ||
|
||
|
||
Open the [Vehicle 1D harness model](matlab:openFile('Vehicle1D_harness_model')). You can also use the shorcut button **Vehicle1D** in the **Project Shortcuts** toolstrip to open harness model. You can simulate and analyse basic vehicle performance with the Vehicle1D harness model. | ||
|
||
|
||
See **README.md** in the **Components > Vehicle1D** folder for more informaton. | ||
|
||
|
||
<img src="media/BEVProject_main_script_media/image_1.png" width="404" alt="image_1.png"> | ||
|
||
## High Voltage Battery Pack | ||
|
||
Four different abstract models are available as a high voltage battery pack component. | ||
|
||
- **Basic** model simulates voltage and current. | ||
- **Simple system** model simulates voltage, current, and temperature using equation\-based model. | ||
- **System** model simulates voltage, current, temperature as well as charing dynamics, fading, and aging using equation\-based model. | ||
- **Table\-based system** model simulates the same quantities as System model, but uses table data for terminal voltage and resistance. | ||
|
||
Open the [Battery HV harness model](matlab:openFile('BatteryHV_harness_model')). You can also use the shortcut button **High Voltage Battery** in the **Project Shortcuts** toolstrip to open harness model. | ||
|
||
|
||
See **README.md** in the **Components > BatteryHighVoltage** folder for more informaton. | ||
|
||
## Motor Drive Unit | ||
|
||
Four different abstract models are available as a motor drive unit component. | ||
|
||
- **Basic** model simulates the high level behavior of power conversion between electrical and mechanical powers using abstract copper loss model. | ||
- **Basic thermal** model is similar to Basic model, but this model considers temperature dynamics too. | ||
- **System\-level** model is similar to the above models, but this model considers irons loss and constant/fixed loss too. | ||
- **System\-level model with tabulated losses** is similar to the above models, but this model uses tabulated data for power conversion efficiency or losses. | ||
|
||
Click the shortcut button **Motor Drive Unit** in the **Project Shortcuts** toolstrip to open harness model. | ||
|
||
|
||
See **README.md** in the **Components > MotorDriveUnit** folder for more informaton including **single efficiency measurement model** used in Basic, Basic thermal, and System\-level models for electro\-mechanical power conversion. | ||
|
||
## Other components | ||
|
||
In addition to the above components, other components such as **Vehicle Speed Reference** component are stored in the **Components** folder too. | ||
|
||
# Detailed Model Application | ||
|
||
This project includes detailed model applications for permanent magnet synchronous motor (PMSM). See the **DetailedModelApplications > MotorDrivePmsmFem** folder for more information. | ||
|
||
# About this project | ||
|
||
For additional information about this project, see **About BEV Project** live script in the **Utility** folder. | ||
|
||
|
||
*Copyright 2020\-2023 The MathWorks, Inc.* | ||
|
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,40 @@ | ||
|
||
# <span style="color:rgb(213,80,0)">BEV System Model \- Simulation Case</span> | ||
```matlab | ||
modelName = "BEV_system_model"; | ||
load_system(modelName) | ||
% Use thermal-model-enabled components. | ||
BEV_useComponents_Thermal | ||
``` | ||
|
||
```matlabTextOutput | ||
Use thermal models for Motor Drive Unit and High Voltage Battery components. | ||
Warning: BatteryHV_refsub_SystemSimple (systems/system_root.xml, line 342): Simulink.DataType object 'Bus_HighVoltage' is not in scope from 'BatteryHV_refsub_SystemSimple/Simscape Bus' | ||
``` | ||
|
||
```matlab | ||
VehSpdRef_loadCase_Constant( ... | ||
ModelName = modelName, ... | ||
TargetSubsystemPath = ... | ||
"/Controller & Environment" + ... | ||
"/Vehicle speed reference" ) | ||
``` | ||
|
||
```matlabTextOutput | ||
Setting up simulation... | ||
Simulation case: Constant | ||
Setting simulation stop time to 1000 sec. | ||
Selecting simulation case 5. | ||
``` | ||
|
||
```matlab | ||
simOut = sim(modelName); | ||
simData = extractTimetable(simOut.logsout); | ||
fig = BEV_plotResultsCompact( SimData = simData ); | ||
``` | ||
|
||
<center><img src="media/BEV_Case_Constant_Thermal_media/figure_0.png" width="702" alt="figure_0.png"></center> | ||
|
||
|
||
*Copyright 2023 The MathWorks, Inc.* | ||
|
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
Oops, something went wrong.