1 // =============================================================================
2 // PROJECT CHRONO - http://projectchrono.org
3 //
4 // Copyright (c) 2014 projectchrono.org
5 // All rights reserved.
6 //
7 // Use of this source code is governed by a BSD-style license that can be found
8 // in the LICENSE file at the top level of the distribution and at
9 // http://projectchrono.org/license-chrono.txt.
10 //
11 // =============================================================================
12 // Authors:
13 // =============================================================================
14 //
15 // M113 powertrain model based on ChShaft objects.
16 //
17 // =============================================================================
18
19 #include "chrono_models/vehicle/m113/M113_ShaftsPowertrain.h"
20
21 namespace chrono {
22 namespace vehicle {
23 namespace m113 {
24
25 // -----------------------------------------------------------------------------
26 // Static variables
27 // -----------------------------------------------------------------------------
28 const double M113_ShaftsPowertrain::m_motorblock_inertia = 10.5;
29 const double M113_ShaftsPowertrain::m_crankshaft_inertia = 1.1;
30 const double M113_ShaftsPowertrain::m_ingear_shaft_inertia = 0.3;
31 const double M113_ShaftsPowertrain::m_power_shaft_inertia = 0.5;
32
33 const double M113_ShaftsPowertrain::m_upshift_RPM = 1500;
34 const double M113_ShaftsPowertrain::m_downshift_RPM = 1000;
35
36 // -----------------------------------------------------------------------------
37 // Constructor of the M113_ShaftsPowertrain.
38 // the direction of the motor block is along the X axis, while the directions of
39 // the axles is along the Y axis (relative to the chassis coordinate frame),
40 // -----------------------------------------------------------------------------
M113_ShaftsPowertrain(const std::string & name)41 M113_ShaftsPowertrain::M113_ShaftsPowertrain(const std::string& name) : ChShaftsPowertrain(name, ChVector<>(1, 0, 0)) {
42 SetGearShiftLatency(0.5);
43 }
44
45 // -----------------------------------------------------------------------------
46 // Initialize vector of gear ratios
47 // https://www.nsncenter.com/Files/library/TM/M113/TM-9-2520-272-34P/TM-9-2520-272-34P.pdf
48 // -----------------------------------------------------------------------------
SetGearRatios(std::vector<double> & fwd,double & rev)49 void M113_ShaftsPowertrain::SetGearRatios(std::vector<double>& fwd, double& rev) {
50 rev = -0.151; // reverse gear;
51
52 fwd.push_back(0.240); // 1st gear;
53 fwd.push_back(0.427); // 2nd gear;
54 fwd.push_back(0.685); // 3rd gear;
55 fwd.push_back(0.962); // 4th gear;
56 }
57
58 // -----------------------------------------------------------------------------
59 // Set the engine and torque converter maps:
60 //
61 // (1) engine speed [rad/s] - torque [Nm] map
62 // must be defined beyond max speed too - engine might be 'pulled'
63 // http://powerforce.com/PDFs/2Cycle_Engines/DS_PF6V-53N.pdf
64 //
65 // (2) TC capacity factor map
66 //
67 // (3) TC torque ratio map
68 //
69 // -----------------------------------------------------------------------------
SetEngineTorqueMap(std::shared_ptr<ChFunction_Recorder> & map)70 void M113_ShaftsPowertrain::SetEngineTorqueMap(std::shared_ptr<ChFunction_Recorder>& map) {
71 double rpm_to_radsec = CH_C_2PI / 60.0;
72 double lbft_to_Nm = 1.0 / 0.73756;
73
74 map->AddPoint(-100 * rpm_to_radsec, 300 * lbft_to_Nm); // to start engine
75 map->AddPoint(500 * rpm_to_radsec, 450 * lbft_to_Nm);
76 map->AddPoint(1000 * rpm_to_radsec, 450 * lbft_to_Nm);
77 map->AddPoint(1500 * rpm_to_radsec, 445 * lbft_to_Nm);
78 map->AddPoint(2000 * rpm_to_radsec, 435 * lbft_to_Nm);
79 map->AddPoint(2500 * rpm_to_radsec, 410 * lbft_to_Nm);
80 map->AddPoint(2800 * rpm_to_radsec, 395 * lbft_to_Nm);
81 map->AddPoint(3000 * rpm_to_radsec, 380 * lbft_to_Nm);
82 map->AddPoint(3200 * rpm_to_radsec, -100 * lbft_to_Nm); // fading out of engine torque
83 }
84
SetEngineLossesMap(std::shared_ptr<ChFunction_Recorder> & map)85 void M113_ShaftsPowertrain::SetEngineLossesMap(std::shared_ptr<ChFunction_Recorder>& map) {
86 double rpm_to_radsec = CH_C_2PI / 60.;
87
88 map->AddPoint(-50 * rpm_to_radsec, 30); // it should never work in negative direction, anyway..
89 map->AddPoint(0 * rpm_to_radsec, 0);
90 map->AddPoint(50 * rpm_to_radsec, -30);
91 map->AddPoint(1000 * rpm_to_radsec, -50);
92 map->AddPoint(2000 * rpm_to_radsec, -70);
93 map->AddPoint(3000 * rpm_to_radsec, -90);
94 }
95
SetTorqueConverterCapacityFactorMap(std::shared_ptr<ChFunction_Recorder> & map)96 void M113_ShaftsPowertrain::SetTorqueConverterCapacityFactorMap(std::shared_ptr<ChFunction_Recorder>& map) {
97 map->AddPoint(0.00, 7);
98 map->AddPoint(0.25, 7);
99 map->AddPoint(0.50, 7);
100 map->AddPoint(0.75, 8);
101 map->AddPoint(0.90, 9);
102 map->AddPoint(1.00, 18);
103
104 ////map->AddPoint(0.0000, 12.2938);
105 ////map->AddPoint(0.5000, 12.8588);
106 ////map->AddPoint(0.6000, 13.1452);
107 ////map->AddPoint(0.7000, 13.6285);
108 ////map->AddPoint(0.8000, 14.6163);
109 ////map->AddPoint(0.8700, 16.2675);
110 ////map->AddPoint(0.9200, 19.3503);
111 ////map->AddPoint(0.9400, 22.1046);
112 ////map->AddPoint(0.9600, 29.9986);
113 ////map->AddPoint(0.9700, 50.0000);
114 }
115
SetTorqeConverterTorqueRatioMap(std::shared_ptr<ChFunction_Recorder> & map)116 void M113_ShaftsPowertrain::SetTorqeConverterTorqueRatioMap(std::shared_ptr<ChFunction_Recorder>& map) {
117 map->AddPoint(0.00, 2.00);
118 map->AddPoint(0.25, 1.80);
119 map->AddPoint(0.50, 1.50);
120 map->AddPoint(0.75, 1.15);
121 map->AddPoint(0.90, 1.00);
122 map->AddPoint(1.00, 1.00);
123
124 ////map->AddPoint(0.0000, 2.2320);
125 ////map->AddPoint(0.5000, 1.5462);
126 ////map->AddPoint(0.6000, 1.4058);
127 ////map->AddPoint(0.7000, 1.2746);
128 ////map->AddPoint(0.8000, 1.1528);
129 ////map->AddPoint(0.8700, 1.0732);
130 ////map->AddPoint(0.9200, 1.0192);
131 ////map->AddPoint(0.9400, 0.9983);
132 ////map->AddPoint(0.9600, 0.9983);
133 ////map->AddPoint(0.9700, 0.9983);
134 }
135
136 } // end namespace m113
137 } // end namespace vehicle
138 } // end namespace chrono
139