Skip to content

Commit 0a01134

Browse files
committed
Make sure all tests pass.
1 parent 53c3b55 commit 0a01134

File tree

67 files changed

+1410
-936
lines changed

Some content is hidden

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

67 files changed

+1410
-936
lines changed

ChangeLog.md

Lines changed: 21 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,30 @@
11
# Change Log
22

3-
## Version 1.6 ... work-in-progress
4-
3+
## Version 1.6
4+
5+
- Signal Source Block Library (`Utility` > `SignalDesigner` folder)
6+
is newly introduced to replace Input Signal Builder
7+
for streamlined workflow to design and use input signals.
8+
In this update, it is used in the harness model for
9+
Power Split Drive Unit component.
10+
It will be deployed to other models in future updates.
511
- Motor Drive Unit (MDU) component is revamped with
612
a new harness model and tests.
713
- Motor Generator 1 (MG1) and Motor Generator 2 (MG2) components
814
are updated to use the new MDU component.
15+
- Engine component is revamped using Generic Engine block in
16+
Simscape Driveline which now supports torque command
17+
in addition to throttle.
18+
Tests are updated too.
19+
- Power Split Drive Unit is revamped with the updated motor drive unit
20+
and engine components as well as the new Signal Source Block Library.
21+
- All test cases of Power-Split HEV system model with direct torque input
22+
(`HEV` > `PowerSplitHEV_DirectInput`)
23+
now work without any warnings during simulation.
24+
Previously some of the test cases had many warnings during simulation,
25+
but they are all removed properly in this update.
26+
The root cause was a wrong block configuration in From Workspace block
27+
where interpolation had to be on, but it was off.
928

1029
## Version 1.5
1130

5 Bytes
Loading
0 Bytes
Loading
0 Bytes
Loading
0 Bytes
Loading
Lines changed: 91 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,91 @@
1+
component EngineCustom
2+
% Abstract Engine Model
3+
% This block represents an abstract internal combustion engine.
4+
% The model is based on a thrid-order polynomial model.
5+
% Engine speed at peak power is automatically determined
6+
% from peak torque, peak torque speed, and peak power
7+
% according to the polynomial model.
8+
% <br/>
9+
% <br/>
10+
% View <a href="matlab:EngineUtility.plotCustomEngineCurves(gcb);">engine torque and power curves</a>.
11+
12+
% Copyright 2022 The MathWorks, Inc.
13+
14+
parameters
15+
PeakTorque = { 230 'N*m' } % Peak torque
16+
PeakTorqueSpeed = { 4000 'rpm' } % Engine speed at peak torque
17+
PeakPower = { 130 'kW' } % Peak power
18+
MaxSpeed = { 7000 'rpm' } % Maximum engine speed
19+
StallSpeed = { 500 'rpm' } % Engine stall speed
20+
SmoothingWidth = { 100 'rpm' } % Stall smoothing width
21+
end
22+
equations
23+
assert( PeakTorque > 0 )
24+
assert( PeakTorqueSpeed > 0 )
25+
assert( PeakTorque*PeakTorqueSpeed < PeakPower )
26+
assert( StallSpeed < PeakTorqueSpeed )
27+
assert( SmoothingWidth > 0 )
28+
end
29+
30+
parameters (Access = private)
31+
PeakPowerSpeed = (3*PeakPower + sqrt(PeakPower*(9*PeakPower - 8*PeakTorque*PeakTorqueSpeed))) ...
32+
/ (4*PeakTorque)
33+
% Normalized engine speed at peak torque
34+
w_NPT = PeakTorqueSpeed / PeakPowerSpeed
35+
s_1 = (3 - 4*w_NPT) / (2*(1 - w_NPT));
36+
s_2 = w_NPT / (1 - w_NPT);
37+
s_3 = 1 / (2*(w_NPT - 1));
38+
p_1 = s_1 * 2*PeakTorque/(3 - w_NPT);
39+
p_2 = s_2 * 2*PeakTorque/(3 - w_NPT) / PeakPowerSpeed;
40+
p_3 = s_3 * 2*PeakTorque/(3 - w_NPT) / PeakPowerSpeed^2;
41+
end
42+
equations
43+
assert( PeakPowerSpeed > PeakTorqueSpeed )
44+
end
45+
46+
inputs
47+
TrqCmdIn = { 0 'N*m' } % TrqCmd:left
48+
end
49+
50+
nodes
51+
B = foundation.mechanical.rotational.rotational % B:left
52+
end
53+
54+
nodes
55+
F = foundation.mechanical.rotational.rotational % F:right
56+
end
57+
58+
variables
59+
w = { 0 'rad/s' } % Engine speed
60+
trq = { 0 'N*m' } % Engine torque
61+
end
62+
63+
branches
64+
trq : B.t -> F.t
65+
end
66+
67+
intermediates (ExternalAccess = observe)
68+
thr_Norm = max( 0 , min( TrqCmdIn/PeakTorque , 1 ))
69+
70+
w_Norm = w / PeakPowerSpeed
71+
72+
trq_Norm = 2*(s_1 + s_2*w_Norm + s_3*w_Norm^2)/(3 - w_NPT)
73+
74+
trq_WOT = PeakTorque*trq_Norm
75+
76+
% Smoothing factor near stall speed
77+
smoothing_factor = if w > StallSpeed
78+
tanh(4 * (w - StallSpeed)/SmoothingWidth)
79+
else
80+
{ 0 '1' }
81+
end
82+
end
83+
84+
equations
85+
w == F.w - B.w
86+
assert( w < MaxSpeed )
87+
88+
trq == smoothing_factor*thr_Norm*trq_WOT
89+
end
90+
91+
end % component

Components/PowerSplitDriveUnit/Harness/PowerSplitDriveUnit_Component_harness_model.mdl

Lines changed: 327 additions & 95 deletions
Large diffs are not rendered by default.

Components/PowerSplitDriveUnit/PowerSplitDriveUnit_refsub_Basic.mdl

Lines changed: 43 additions & 43 deletions
Original file line numberDiff line numberDiff line change
@@ -42,8 +42,8 @@ __MWOPC_PART_BEGIN__ /metadata/coreProperties.xml
4242
<dcterms:created xsi:type="dcterms:W3CDTF">2020-10-12T08:00:32Z</dcterms:created>
4343
<dc:creator>isaacito</dc:creator>
4444
<cp:lastModifiedBy>isaacito</cp:lastModifiedBy>
45-
<dcterms:modified xsi:type="dcterms:W3CDTF">2022-12-22T16:31:34Z</dcterms:modified>
46-
<cp:revision>5.13</cp:revision>
45+
<dcterms:modified xsi:type="dcterms:W3CDTF">2023-01-11T16:23:18Z</dcterms:modified>
46+
<cp:revision>5.14</cp:revision>
4747
<cp:version>R2022b</cp:version>
4848
</cp:coreProperties>
4949

@@ -65,11 +65,11 @@ __MWOPC_PART_BEGIN__ /metadata/mwcorePropertiesReleaseInfo.xml
6565
<?xml version="1.0" encoding="UTF-8"?>
6666
<!-- Version information for MathWorks R2022b Release -->
6767
<MathWorks_version_info>
68-
<version>9.13.0.2143701</version>
68+
<version>9.13.0.2158767</version>
6969
<release>R2022b</release>
70-
<description>Update 3</description>
71-
<date>Dec 08 2022</date>
72-
<checksum>3517180572</checksum>
70+
<description>Update 4</description>
71+
<date>Dec 31 2022</date>
72+
<checksum>433223369</checksum>
7373
</MathWorks_version_info>
7474

7575
__MWOPC_PART_BEGIN__ /simulink/_rels/blockdiagram.xml.rels
@@ -114,7 +114,7 @@ __MWOPC_PART_BEGIN__ /simulink/blockdiagram.xml
114114
<ConfigManagerSettings>
115115
<P Name="ModifiedByFormat">%&lt;Auto&gt;</P>
116116
<P Name="ModifiedDateFormat">%&lt;Auto&gt;</P>
117-
<P Name="ModelVersionFormat">%&lt;AutoIncrement:5.13&gt;</P>
117+
<P Name="ModelVersionFormat">%&lt;AutoIncrement:5.14&gt;</P>
118118
</ConfigManagerSettings>
119119
<EditorSettings>
120120
<P Name="ScheduleConnectors">off</P>
@@ -135,7 +135,7 @@ __MWOPC_PART_BEGIN__ /simulink/blockdiagram.xml
135135
<Object PropName="InstrumentedSignals" ObjectID="2" ClassName="Simulink.HMI.InstrumentedSignals">
136136
<Array PropName="Persistence" Type="Struct" Dimension="5*1">
137137
<MATStruct>
138-
<Field Name="UUID" Class="char">f025e85e-da49-41a9-9b1c-c4e2d8f5a63d</Field>
138+
<Field Name="UUID" Class="char">cb5d9070-5527-4d13-8350-35ccef74cb33</Field>
139139
<Field Name="BlockPath_" Class="char">Measurement/From12</Field>
140140
<Field Name="SID_" Class="char">3300</Field>
141141
<Field Name="SubPath_" Class="char"/>
@@ -155,7 +155,7 @@ __MWOPC_PART_BEGIN__ /simulink/blockdiagram.xml
155155
<Field Name="VisualType_" Class="char"/>
156156
</MATStruct>
157157
<MATStruct>
158-
<Field Name="UUID" Class="char">0d664bfd-a7ec-4f24-8e19-a04ee2be9f08</Field>
158+
<Field Name="UUID" Class="char">8f8440c9-1aa6-4e7a-90c8-c5ef1f33cdb7</Field>
159159
<Field Name="BlockPath_" Class="char">Measurement/From14</Field>
160160
<Field Name="SID_" Class="char">3302</Field>
161161
<Field Name="SubPath_" Class="char"/>
@@ -175,7 +175,7 @@ __MWOPC_PART_BEGIN__ /simulink/blockdiagram.xml
175175
<Field Name="VisualType_" Class="char"/>
176176
</MATStruct>
177177
<MATStruct>
178-
<Field Name="UUID" Class="char">c9609fd6-68be-4e86-b1f7-1d01026f6dab</Field>
178+
<Field Name="UUID" Class="char">5afd763f-9d42-4a45-b7ae-6e37ab50f8af</Field>
179179
<Field Name="BlockPath_" Class="char">Measurement/From16</Field>
180180
<Field Name="SID_" Class="char">3304</Field>
181181
<Field Name="SubPath_" Class="char"/>
@@ -195,7 +195,7 @@ __MWOPC_PART_BEGIN__ /simulink/blockdiagram.xml
195195
<Field Name="VisualType_" Class="char"/>
196196
</MATStruct>
197197
<MATStruct>
198-
<Field Name="UUID" Class="char">c9d168b4-05f9-4198-a118-3920707f443d</Field>
198+
<Field Name="UUID" Class="char">00c0da20-8321-4f7d-9a91-9ee366b905c5</Field>
199199
<Field Name="BlockPath_" Class="char">Measurement/From25</Field>
200200
<Field Name="SID_" Class="char">3308</Field>
201201
<Field Name="SubPath_" Class="char"/>
@@ -215,7 +215,7 @@ __MWOPC_PART_BEGIN__ /simulink/blockdiagram.xml
215215
<Field Name="VisualType_" Class="char"/>
216216
</MATStruct>
217217
<MATStruct>
218-
<Field Name="UUID" Class="char">0366a61f-87bb-4cb6-bc58-4531e153be4c</Field>
218+
<Field Name="UUID" Class="char">5031be83-52f0-4151-97c7-5fb72250552e</Field>
219219
<Field Name="BlockPath_" Class="char">Measurement/From26</Field>
220220
<Field Name="SID_" Class="char">3309</Field>
221221
<Field Name="SubPath_" Class="char"/>
@@ -1170,8 +1170,8 @@ __MWOPC_PART_BEGIN__ /simulink/graphicalInterface.xml
11701170
__MWOPC_PART_BEGIN__ /simulink/modelDictionary.xml
11711171
<?xml version="1.0" encoding="UTF-8"?>
11721172
<MF0 version="1.1" defaultPackage="slid" packageUris="http://schema.mathworks.com/mf0/slid/R2022b_20220222">
1173-
<System type="System" uuid="bd1932c0-869a-4cab-9588-e7808dda2f5f">
1174-
<Interface type="Interface" uuid="e659c6ef-f1fe-4a48-8903-01ea84b25ecc"/>
1173+
<System type="System" uuid="43741dc8-dec1-46b8-a542-d0a3ec3f7eae">
1174+
<Interface type="Interface" uuid="c52e6056-bd6c-42c2-a4d7-b5a484fe3efe"/>
11751175
</System>
11761176
</MF0>
11771177
__MWOPC_PART_BEGIN__ /simulink/plugins/SimscapeModelParametersPlugin.xml
@@ -2611,7 +2611,7 @@ __MWOPC_PART_BEGIN__ /simulink/systems/system_root.xml
26112611
<System>
26122612
<P Name="Location">[121, 67, 1190, 821]</P>
26132613
<P Name="ReportName">simulink-default.rpt</P>
2614-
<P Name="SIDHighWatermark">18453</P>
2614+
<P Name="SIDHighWatermark">20960</P>
26152615
<Block BlockType="Inport" Name="Inputs" SID="308">
26162616
<P Name="Position">[-320, -292, -290, -278]</P>
26172617
<P Name="ZOrder">187</P>
@@ -2747,106 +2747,106 @@ __MWOPC_PART_BEGIN__ /simulink/systems/system_root.xml
27472747
<P Name="ZOrder">221</P>
27482748
</Block>
27492749
<Line LineType="Connection">
2750-
<P Name="ZOrder">9642</P>
2751-
<P Name="Src">3748#lconn:1</P>
2752-
<P Name="Points">[-48, 0; 0, -130]</P>
2750+
<P Name="ZOrder">464</P>
2751+
<P Name="Src">47#rconn:1</P>
2752+
<P Name="Points">[27, 0]</P>
2753+
<Branch ConnectType="DEST_DEST">
2754+
<P Name="Src">3748#lconn:1</P>
2755+
<P Name="Points">[-48, 0; 0, -130]</P>
2756+
</Branch>
27532757
<Branch ConnectType="DEST_SRC">
27542758
<P Name="Dst">3747#lconn:1</P>
27552759
</Branch>
2756-
<Branch ConnectType="DEST_DEST">
2757-
<P Name="Src">47#rconn:1</P>
2758-
<P Name="Points">[27, 0]</P>
2759-
</Branch>
27602760
</Line>
27612761
<Line>
2762-
<P Name="ZOrder">17704</P>
2762+
<P Name="ZOrder">17724</P>
27632763
<P Name="Src">3747#out:1</P>
27642764
<P Name="Dst">3282#in:1</P>
27652765
</Line>
27662766
<Line>
2767-
<P Name="ZOrder">17705</P>
2767+
<P Name="ZOrder">17725</P>
27682768
<P Name="Src">3288#out:1</P>
27692769
<P Name="Dst">3279#in:2</P>
27702770
</Line>
27712771
<Line>
2772-
<P Name="ZOrder">17706</P>
2772+
<P Name="ZOrder">17726</P>
27732773
<P Name="Src">3289#out:1</P>
27742774
<P Name="Dst">3279#in:1</P>
27752775
</Line>
27762776
<Line>
2777-
<P Name="ZOrder">17707</P>
2777+
<P Name="ZOrder">17727</P>
27782778
<P Name="Src">3290#out:1</P>
27792779
<P Name="Dst">3279#in:3</P>
27802780
</Line>
27812781
<Line>
2782-
<P Name="ZOrder">17708</P>
2782+
<P Name="ZOrder">17728</P>
27832783
<P Name="Src">3333#out:1</P>
27842784
<P Name="Dst">3279#in:4</P>
27852785
</Line>
27862786
<Line LineType="Connection">
2787-
<P Name="ZOrder">17709</P>
2787+
<P Name="ZOrder">17729</P>
27882788
<P Name="Src">3749#lconn:1</P>
27892789
<P Name="Dst">3750#lconn:4</P>
27902790
</Line>
27912791
<Line LineType="Connection">
2792-
<P Name="ZOrder">17710</P>
2792+
<P Name="ZOrder">17730</P>
27932793
<P Name="Src">48#rconn:1</P>
27942794
<P Name="Dst">3750#lconn:1</P>
27952795
</Line>
27962796
<Line>
2797-
<P Name="ZOrder">17711</P>
2797+
<P Name="ZOrder">17731</P>
27982798
<P Name="Src">3279#out:1</P>
27992799
<P Name="Dst">3751#in:1</P>
28002800
</Line>
28012801
<Line LineType="Connection">
2802-
<P Name="ZOrder">17712</P>
2802+
<P Name="ZOrder">17732</P>
28032803
<P Name="Src">3747#lconn:2</P>
28042804
<P Name="Points">[23, 0; 0, 55]</P>
28052805
<P Name="Dst">3750#lconn:3</P>
28062806
</Line>
28072807
<Line LineType="Connection">
2808-
<P Name="ZOrder">17713</P>
2808+
<P Name="ZOrder">17733</P>
28092809
<P Name="Src">3748#lconn:2</P>
28102810
<P Name="Dst">3750#lconn:2</P>
28112811
</Line>
28122812
<Line>
2813-
<P Name="ZOrder">17714</P>
2813+
<P Name="ZOrder">17734</P>
28142814
<P Name="Src">3748#out:1</P>
28152815
<P Name="Dst">3283#in:1</P>
28162816
</Line>
28172817
<Line>
2818-
<P Name="ZOrder">17715</P>
2818+
<P Name="ZOrder">17735</P>
28192819
<P Name="Src">3749#out:1</P>
28202820
<P Name="Dst">3284#in:1</P>
28212821
</Line>
28222822
<Line>
2823-
<P Name="ZOrder">17718</P>
2823+
<P Name="ZOrder">17738</P>
28242824
<P Name="Src">308#out:1</P>
28252825
<P Name="Points">[15, 0]</P>
28262826
<Branch>
2827-
<P Name="ZOrder">17717</P>
2827+
<P Name="ZOrder">17737</P>
28282828
<P Name="Dst">3753#in:1</P>
28292829
</Branch>
28302830
<Branch>
2831-
<P Name="ZOrder">17716</P>
2831+
<P Name="ZOrder">17736</P>
28322832
<P Name="Points">[0, -55]</P>
28332833
<P Name="Dst">3331#in:1</P>
28342834
</Branch>
28352835
</Line>
28362836
<Line>
2837-
<P Name="ZOrder">17719</P>
2837+
<P Name="ZOrder">17739</P>
28382838
<P Name="Src">3753#out:2</P>
28392839
<P Name="Points">[33, 0; 0, 40]</P>
28402840
<P Name="Dst">3747#in:1</P>
28412841
</Line>
28422842
<Line>
2843-
<P Name="ZOrder">17720</P>
2843+
<P Name="ZOrder">17740</P>
28442844
<P Name="Src">3753#out:3</P>
28452845
<P Name="Points">[17, 0; 0, 150]</P>
28462846
<P Name="Dst">3748#in:1</P>
28472847
</Line>
28482848
<Line>
2849-
<P Name="ZOrder">17721</P>
2849+
<P Name="ZOrder">17741</P>
28502850
<P Name="Src">3753#out:1</P>
28512851
<P Name="Points">[515, 0; 0, 205]</P>
28522852
<P Name="Dst">3749#in:1</P>
@@ -2858,7 +2858,7 @@ __MWOPC_PART_BEGIN__ /simulink/systems/system_root.xml
28582858
<P Name="FixedHeight">on</P>
28592859
<P Name="FixedWidth">on</P>
28602860
<P Name="AnnotationType">image_annotation</P>
2861-
<P Name="ZOrder">-682</P>
2861+
<P Name="ZOrder">-31</P>
28622862
</Annotation>
28632863
<Annotation SID="2441">
28642864
<P Name="Name">&lt;!DOCTYPE HTML PUBLIC &quot;-//W3C//DTD HTML 4.0//EN&quot; &quot;http://www.w3.org/TR/REC-html40/strict.dtd&quot;&gt;
@@ -2869,7 +2869,7 @@ p, li { white-space: pre-wrap; }
28692869
<P Name="Position">[41, 9, 268, 25]</P>
28702870
<P Name="InternalMargins">[0, 0, 0, 0]</P>
28712871
<P Name="Interpreter">rich</P>
2872-
<P Name="ZOrder">-683</P>
2872+
<P Name="ZOrder">-32</P>
28732873
</Annotation>
28742874
</System>
28752875

@@ -2994,7 +2994,7 @@ __MWOPC_PART_BEGIN__ /simulink/windowsInfo.xml
29942994
<Array PropName="PersistedApps" Type="Cell" Dimension="0*1"/>
29952995
<P Name="WindowUuid" Class="char">236b416f-95e3-4ef2-b5c6-afc262f79381</P>
29962996
</Object>
2997-
<P Name="BDUuid" Class="char">13322a30-55ae-4611-a957-50096eaed619</P>
2997+
<P Name="BDUuid" Class="char">65f3075f-2f4f-4c24-9617-e42386598e7f</P>
29982998
</Object>
29992999
</WindowsInfo>
30003000

Binary file not shown.

0 commit comments

Comments
 (0)