UPTEC STS11 017

Examensarbete 30 hp
Mars 2011

Modeling in MathWorks Simscapeby building a model of an automatic
gearboxStaffan Enocksson

Abstract
Modeling in MathWorks Simscape by building a modelof an automatic gearbox
Staffan Enocksson

Teknisk- naturvetenskaplig fakultet
UTH-enheten
Besöksadress:Ångströmlaboratoriet
Lägerhyddsvägen 1
Hus 4, Plan 0
Postadress:
Box 536751 21 Uppsala
Telefon:018 – 471 30 03
Telefax:
018 – 471 30 00
Hemsida:http://www.teknat.uu.se/student

The purpose of this thesis work has been to analyze the usability and the feasibility formodeling with MathWorks simulation tool Simscape by building a simplified model ofthe automatic gearbox ZF-ECOMAT 4 (HP 504 C / HP 594 C / HP 604 C). It has
been shown throughout the thesis how this model is build. First has systemknowledge been acquired by studying relevant literature and speaking with thepersons concerned. The second step was to get acquainted with Simscape and thephysical network approach. The physical network approach that is accessible throughthe Simscape language makes is easy to build custom made components with means ofphysical and mathematical relationships. With this background a stepwise approach
been conducted which has led to the final model of the gearbox and the validation
concept.
The results from this thesis work indicates that Simscape is a powerful tool formodeling physical systems and the results of the model validation gives a good signthat it is possible to build and simulate physical models with the Simscape software.
However, during the modeling of the ZF-ECOMAT 4 some things have been
discovered which could improve the usability of the tool and make the learning curve
for an inexperienced user of physical modeling tools less steep. In particular, a larger
model library should be included from the beginning, more examples of simple andmore complex models, the object-oriented related parts such as own MATLAB
functions should be expanded, and a better troubleshooting guidance.

Handledare: Afram KourieÄmnesgranskare: Bengt Carlsson
Examinator: Elisabet Andrésdóttir
ISSN: 1650-8319, UPTEC STS11 017

Populärvetenskaplig beskrivning
Syftet med den här uppsatsen har varit att analysera användbarheten och möjligheten att
modellera med MathWorks simuleringsverktyg Simscape genom att bygga en förenklad modell
av den automatiska växellådan ZF-ECOMAT 4 (HP 504 C / HP 594 C / HP 604 C). Genom
uppsatsen har det visats hur denna modell är uppbyggd. Först har en systemkunskap inhämtats
genom att studera relevant litteratur och genom att tala med berörda personer. Det andra steget
var att bekanta sig med Simscape och den fysiska modelleringsapproachen. Den fysiska
modelleringsapproachen som är tillgänglig via Simscape-språket gör det enkelt att bygga
egentillverkade komponenter med hjälp av fysiska och matematiska samband. Med den här
bakgrunden har en stegvis tillvägagångssätt genomförts vilket har mynnat ut i den slutgiltiga
modellen av växellådan och valideringkonceptet.

Simscape har visat sig vara ett kraftfullt verktyg för att modellera fysikaliska system och
resultatet från modellvalideringen ger en god indikation att det är möjligt att bygga och simulera
fysikaliska modeller med Simscape-mjukvaran. Dock ska det nämnas, att under modelleringen
av ZF-ECOMAT 4 så dök det upp saker som skulle kunna öka användbarheten av verktyget och
minska inlärningskurvan för en ovan användare av fysikaliska modelleringsverktyg. Framförallt
att ett större modellbibliotek borde finnas med från början, mer exempel av enkla och mer
komplicerade modeller, de objektorienterade delarna som t.ex. egna MATLAB-funktioner borde
byggas ut, samt en bättre felsökningsguide.

Acknowledgements
This master thesis has been carried out with great satisfaction at the RBNP department at
Scania’s Research and Development facility between September 2010 and February 2011. It is
the final piece in my engineering degree in Sociotechnical Systems Engineering (STS) at Uppsala
University.
First and foremost I would like to give a huge thank to my supervisor at RBNP, Afram Kourie
who has given me a great support and guidance throughout the whole thesis. He always madesure we were on the right track and corrected every small error.
Secondly, I would like to thank two persons who gave a good kick start with the thesis; Patrik
Ekvall at MathWorks who introduced me into the world of physical modeling and Niklas
Berglund at RBNP who patiently described the ZF-ECOMAT 4 and its components.
Thirdly, I would give a huge thank to all of the people at RBNP for a pleasant and very
educational time.
And at last I would like to thank both my examiner Elisabet Andresdottir and subject reviewer
Bengt Carlsson at Uppsala University.

Staffan Enocksson
Södertälje 11-02-23

Table of Contents
1

2

3

4

5

6

Introduction ..................................................................................................................................... 3
1.1

Purpose.................................................................................................................................... 4

1.2

Goals ........................................................................................................................................ 4

1.3

Delimitations ........................................................................................................................... 4

Method ............................................................................................................................................ 5
2.1

The modeling phase ................................................................................................................ 5

2.2

Modeling and simulation tools used ....................................................................................... 6

2.3

Time requirements .................................................................................................................. 7

Transmissions in general ................................................................................................................. 8
3.1

The function of the transmission ............................................................................................ 8

3.2

ZF-ECOMAT Transmission........................................................................................................ 8

3.2.1

The Clutch ...................................................................................................................... 10

3.2.2

The Torque Converter ................................................................................................... 10

3.2.3

The Retarder .................................................................................................................. 11

3.2.4

The Planetary Gear Sets ................................................................................................ 12

Modeling and simulation............................................................................................................... 13
4.1

Different kinds of modeling approaches ............................................................................... 15

4.2

Model verifying...................................................................................................................... 15

4.3

Which requirements should be considered for a modeling tool? ........................................ 16

Modeling in Simscape.................................................................................................................... 17
5.1

Across variable ...................................................................................................................... 17

5.2

Trough variable...................................................................................................................... 17

5.3

Direction of variables ............................................................................................................ 18

5.4

Connector ports and Connection Lines ................................................................................. 19

5.5

Simscape language ................................................................................................................ 19

5.6

The Simscape Library ............................................................................................................. 22

5.7

Compilation and troubleshooting ......................................................................................... 23

Modeling of the ZF-ECOMAT 4 (HP 504 C / HP 594 C / HP 604 C) ................................................ 25
6.1

The Clutch model................................................................................................................... 25

6.2

The Torque Converter model ................................................................................................ 28

6.2.1
6.3

The Lockup-clutch.......................................................................................................... 30

The Retarder model............................................................................................................... 30
1

6.4

6.4.1

Planetary gear sets ........................................................................................................ 34

6.4.2

The full gear model........................................................................................................ 35

6.4.3

Gear Ratios .................................................................................................................... 36

6.5
7

The Planetary Gear Train model............................................................................................ 33

The Automatic Logic program ............................................................................................... 37

Validation ...................................................................................................................................... 39
7.1

8

Remaining approximations.................................................................................................... 39

Results ........................................................................................................................................... 42
8.1

Test 1, with the automatic shift logic: ................................................................................... 42

8.2

Test 2, with the recorded gear shift signal: ........................................................................... 44

8.3

Results discussion .................................................................................................................. 45

9Conclusion ..................................................................................................................................... 46
9.1

Recommendations for future work ....................................................................................... 49

10

Bibliography............................................................................................................................... 50

11

Appendix.................................................................................................................................... 52

11.1

Simscape MATLAB Supported Functions............................................................................... 52

11.2

Complete Simscape code ...................................................................................................... 53

11.2.1The Ideal Gear model .................................................................................................... 53

11.2.2The Clutch model........................................................................................................... 53

11.2.3

The Torque Converter model ........................................................................................ 54

11.2.4

The Planetary Gear model ............................................................................................. 55

11.3

Parameters setting used........................................................................................................ 56

11.3.1

Clutches ......................................................................................................................... 56

11.3.2Torque Converter .......................................................................................................... 56

11.3.3Retarder ......................................................................................................................... 56

11.3.4

Planetary gears .............................................................................................................. 56

11.3.5

Final gear ....................................................................................................................... 56

11.3.6

Automatic Logic Program .............................................................................................. 57

11.3.7

Air drag .......................................................................................................................... 57

11.3.8Rolling resistance........................................................................................................... 57

11.3.9Other parameters .......................................................................................................... 57

11.4

Torque output on propeller shaft ......................................................................................... 58

11.5

The final validation concept .................................................................................................. 59

2

1 Introduction
The requirements for developing and testing new products have never been higher, especiallyfor many manufacturing industries. Customers, competitors and regulatory boards are setting
standards for new products that are going to be used in the society for a variety of different
purposes. One industry where the requirements have escalated in a number of fields in the
recent years is the automotive industry.
Particularly it is the transport sector that has been affected with increasing requirements foralternative fuels, decreased emission levels and engine efficiency. More and more goods andpeople are to be transported each day in increasingly shorter times. The automotive industry istrying each day to cope with these demands. (European Automobile Industry Report, 20092010)
With long and costly developing processes combined with the increasing demands and at thesame time as computers and software have gotten faster has led to more investments in the fieldof modeling and simulation. (Engineering Simulation Solutions for the automotive Industry,
2008)
Simulation used to be performed entirely by experts in the field using expensive and dedicatedcomputer systems. Today significant simulations can be performed on personal computers by
experts in a specific field without the need for a staff of simulation specialists. Modern languages,
tools and architectures have become better, more specialized and more user friendly. Many ofthese tools can today encapsulate much of the traditionally difficult work in building models andthe main necessity today for building complex models of reality is mainly knowledge about thesystem in focus. (SMITH, Roger D., 2003)
The automotive industry has followed down the same path with huge investments in newtechnology. Going from an industry, consisting of more or less only mechanics to progress into
an industry where computer technology is involved every day, both in the trucks and in the daily
work. (ZACKRISSON, Tomas, 2003)
Computer simulations are, as mentioned above, one part which has increased rapidly in a lot ofdifferent fields in the automotive industry. It has become extremely important to test
components in simulations to find possible design errors before building real prototypes. In
many cases it has proven to be more cost effective, shorter development processes, lessdangerous, or otherwise more practical than testing the real system. In the end this will
hopefully lead to products with higher quality, shorter time to market processes and meet therequired standards. (SMITH, Roger D., 2003)
Most of the vehicles being developed today at Scania CV AB in Södertälje consist of a series ofdifferent systems and components which has become increasingly advanced. This modular
system makes it possible for Scania to produce different kind of vehicles optimized for a specificuser need and at the same time as costs can be kept at a low level for development, production
and spare parts management. (Scania.se)3

In the continuing development process Scania has progressed with their modular thinking bybuilding a model library of different vehicle components which goes by the acronym STARS. The
acronym stands for Scania Truck and Road Simulation and consists of a simulation tool with agraphical user interface and compiled models of complete vehicles. The library consists ofmodels of vehicle components such as combustion engines, gearboxes, axles, wheels, tires etc.
STARS is used to make good estimates of fuel consumption, emissions and shorten lead periods
for different driving scenarios and distances. The models are like the truck and buses also built
in modules so they can be developed separately and then put together into a complete working
vehicle models.
The library is in the process of constant development and in the further development process ofcomponents that go into production every single day there are new demands set for thesimulation tools in translating this components into effective models. To be able to build
complex models of different vehicle components efficiently, high demands are therefore set on
the usability of the new simulation tools.

1.1 Purpose
The purpose of this master thesis is to analyze the usability and the feasibility for modeling with
MathWorks simulation tool Simscape by building a simplified model of the automatic gearbox
ZF-ECOMAT 4 (HP 504 C / HP 594 C / HP 604 C).

1.2 GoalsTo get an understanding of how to model with Simscape simulation software.
To model an automatic gearbox in the Simscape environment by means of physical andmathematical relationships and technical data.
General research about Simscape’s modeling potential in respect to usability,
compilation/troubleshooting and simulation ability.

1.3 Delimitations
Due to the purpose of this thesis all components models are kept simple, which implies:







No static friction is accounted for in the clutch modelNo fluid drag losses is accounted for in the torque converter mode
No bearing or mesh losses are accounted for in the planetary gears
No hydraulics will be modeled
No elastic driveline will be used
The final complete vehicle model is only validated against a reference vehicle. No
separate components have gone through any validation process, except analytically.

4

2 Method
This master thesis has been conducted at the RBNP department at Scania’s R&D facility. RBNP
has the main responsibility for the drivability of the powertrain for buses. Much of the daily
work consists of simulating and test driving of the buses from a performance perspective withthe help of tools such as simulation models and measuring computers.
The first step in the master thesis was acquiring knowledge about the gearbox system.
Interviews with Niklas Berglund1 were made to be able to understand what an automatic
gearbox is and the function of its components.
The second step was to get a theoretical perspective. By doing a desktop research with specificsearch keywords like transmission, gearbox, planetary gear, simulation and modeling a broad
field of different literature could be gathered. Thereafter a literature review was made of thecollected material to get a deeper understanding of the specific components that was going to be
included in the system and about the modeling and simulation concept. Both the Internet,
books, drawings, technical documents etc. was used as source of information.
The third step was to get acquainted with the simulation tool Simscape. By reading the
instruction manuals from MathWorks homepage ( (Simscape™ 3 User’s Guide, 2010),(Simscape™ 3 Language Guide, 2010) ) and by looking at recorded webinars posted by
MathWorks an initial shallow understanding of the physical network modeling approach could
be reached.
During the fourth week a workshop was held at Scania. Patrik Ekvall (a Mathworks
representative), came and talked about the features of Simscape and how it could be of use in
the modeling part. Three web-meetings were thereafter scheduled. During the web-meetings we
discussed the problems that I had encountered, whether they were principle or simulation tool
specific. Especially he taught me how to think when you are dealing with physical modeling andhe also helped me with the modeling of the clutch.
Throughout the thesis writing continuous meetings at random time interval has also been madewith my supervisor at Scania, Afram Kourie. He has worked as a sound board for me to discuss
new ideas and problems that have arisen.

2.1 The modeling phase
The modeling phase has been about understanding and trying to model the systems behavior
analytically. It has also been carried out incrementally with a lot of trial and error. Eachcomponent has therefore been tested separately to verify it worked the way it was expected to
do analytically, before moving on to the next component. Each component has also been tested
together with one another, starting with two components, and then adding one after another.
The process has been iterative in which both forward and backward steps have been taken. This
incremental stepwise time consuming approach made the troubleshooting process a whole loteasier when it was time to simulate the whole model configuration.

1

Niklas Berglund working at RBNP has a background at Scania with manual and automatic transmission,both in production and implementation/calibration in bus chassis.

52.2 Modeling and simulation tools used
All tools that are going to be used in this thesis are developed by MathWorks®2. Below is a brief
description of the four tools used in this thesis.
MATLAB®
Version 7.9.0.529 (R2009b) 12-Aug-2009
MATLAB (matrix laboratory) is a well-known numerical computing environment and a fourthgeneration programming language developed by MathWorks. MATLAB is used for a wide range
of applications, including signal and image processing, communications, control design, test andmeasurement, financial modeling and analysis, and computational biology. MATLAB is very
common among engineers and is taught at universities all over the world.

Simulink®
Version 7.4 (R2009b) 29-Jun-2009
Simulink is a commercial tool for modeling, simulating and analyzing multi-domain dynamic andembedded systems. It provides an interactive graphical environment and a customizable set ofblock libraries. Simulink and MATLAB are tightly integrated and Simulink can either drive
MATLAB or be scripted from it. It is regularly used for designing, simulating, implementing andtesting of variety of time-varying systems such as communication , control theory, digital signal
processing etc.

Simscape™
Version 3.2 (R2009b) 29-Jun-2009
Simscape offers a MATLAB-based, object-oriented, physical modeling language for use in the
Simulink environment. Simscape is a software extension for MathWorks Simulink and provides
tools for modeling systems spanning mechanical, electrical, hydraulic, and other physicaldomains as physical networks. From these different physical domains you can create models ofyour own custom components. Simscape provides a set of block libraries and special simulation
features especially for modeling physical systems that consists of real physical components. It is
accessible as a library within the Simulink environment.
Stateflow ®
Version 7.4 (R2009b) 29-Jun-2009
Stateflow is a design environment for developing state charts and flow diagrams. It provides
elements for describing complex logic in a natural, readable and in an intuitive form. It is also
tightly integrated with MATLAB, Simulink and Simscape.

2

MATLAB, Simulink, Stateflow are registered trademarks, and Simscape is a trademark of The MathWorks, Inc.

6

2.3 Time requirements
The time frame requirements for this thesis work are presented in Table 1, where each step andits corresponding time requirement are listed.
Table 1: Time requirements table

Week

Activity

1-2

Introduction
Starting with report

3-4

Literature review
Writing report

4-8

Starting to get acquainted with SimscapeStarting to build the components

8-15

Building the model
Writing report

15-18

Finishing the model
Validation of model
Writing report

18-19

Finishing report

19-20

Finishing report
Making presentation

7

3 Transmissions in generalIn this section the automatic gearbox and its components are described.

3.1 The function of the transmission
The basic function of the ZF-ECOMAT 4 (HP 504 C / HP 594 C / HP 604 C) transmission, or any
other transmission or gearbox, is to enable angular motion and torque conversion from arotating power source (combustion engine, electrical engine etc.) to another device (wheel, shaftetc.) using different kinds of gear configurations. The purpose of the gearbox is to convert theengines rotating momentum to an appropriate angular speed and torque to the driving wheels.
Combustion engines needs in most cases to operate at a relatively high rotational speed, which
does not work very well for starting, stopping and slower travel. The transmission converts thehigher engine speed (rpm) to the slower wheel speed with an increase in torque which gives thevehicle a different driving range, from hill climbs, to crawling and for going 100 km/h on afreeway.
Practically a gear configuration works like this:A small gear against a big decreases the rpm value but increases the torque power and viceversa, a big gear against a small increases the rpm value but with less torque power. Usually
there is also a reverse gear which shifts the direction of the rotation of the driving wheels in the
opposite direction. (BOSCH, 2000; Wikipedia--Transmission (mechanics))
Multi-speed gearboxes have become the established standard of power transmission in many
modern motor vehicles today. Shifting on multi-speed gearboxes is performed using either
disengagement of power transmission (manual and semi-automatic transmission) or under load
by a friction mechanism (automatic transmissions). Common for automatic transmissions is thatthe driver doesn’t have to worry about shifting gears. A frequent application for the automatictransmission with friction mechanism is when there is a lot of stop and go traffic which require a
lot of frequent gear shifts without excessive comfort disorder. They are especially used for manycity vehicles. (BOSCH, 2007; Wikipedia--Automatic_transmission)

3.2 ZF-ECOMAT Transmission
ZF Friedrichshafen AG (ZF) manufactures and produces among other transmissions an automatictransmission series called ECOMAT. The gearboxes in the ECOMAT series are currently in third
generation which goes by the name ECOMAT 4. In the table below are the existing three different
models listed in the ECOMAT 4 series.
3rd generation — ECOMAT 4 (2006-present)

5HP-504 / 6HP-504 — five- or six-speed; maximum input torque of 1,100 newton
metres (811 ft·lbf)
5HP-594 / 6HP-594 — five- or six-speed; maximum input torque of 1,250 newton
metres (922 ft·lbf)
5HP-604 / 6HP-604 — five- or six-speed; maximum input torque of 1,750 newton
metres (1,291 ft·lbf)

8The gearboxes are used in many commercial and special vehicle applications and can be
designed with the choice of 5 and 6-speed versions. Possible applications for the gearboxes are
everything from city buses to coaches. In Figure 1 the actual ZF-ECOMAT 4 (HP 504 C / HP 594 C/ HP 604 C) is shown. Most modern automatic gearboxes have almost the same components but
the configurations can differ (depending on type). A detailed explanation of the components thatwill be included in the modeling chapter will thereafter be presented. (ZF FRIEDRICHSHAFEN
AG , 2006; Wikipedia--List_of_ZF_transmissions; BOSCH, 2007)

4

6

3

5

2

5

8

1

7

Figure 1: ZF-ECOMAT (HP 504 C / HP 594 C / HP 604 C)
Table 2: Automatic transmissions components description
Number1

Component
Planetary Gear Sets

Function
Sets the various conversion ratios

2

Hydraulic system

Complex maze of passage and tubes that sends
transmission fluid under pressure to all parts of thetransmission.

3

Oil Pump

Engine driven pump that pressurizes the hydraulic fluid. It
also supports the lubrication and cooling system in thetransmission.

4

RetarderA non- wearing brake5

Clutches and brakes (the difference isthat if the driven member is fixed to its
frame, it is called a brake)

Effect gear changes without interrupting the flow of power.

6

Torque Converter (with look-up clutch)

Transfer speed and torque and keeps the engine fromstopping at low speeds

7Transmission shift control unit

Defines the gear selections and shift points.

8

Hydraulic and lubricating oil

Provides lubrication which prevents corrosion

93.2.1 The Clutch
The first component that will be introduced is the clutch. A clutch is a mechanical device thatprovides a smooth and gradual connection between two separate members rotating at different
speed about a common axis. Most of them consist of a number of friction discs which are pressedtightly together in a clutch drum. There are two types of frictions clutches (dry-plate and wetplate), where wet-plate friction clutches have better thermal performance but worse drag losses.
The clutch can connect the two shafts so that they either can be locked together and spin at thesame speed or be decoupled and spin at different speeds.

Figure 2: Exploded view of a typical clutch

A clutch works in the following way (see Figure 2 above for details); a pressure source applies
the force which joins the flywheel, pressure plate and driven plate for common rotation(engaged mode). The clutch is disengaged by a mechanical or hydraulic actuated throw-out
bearing applies force to the center of the pressure plates, thereby releasing the pressure at the
periphery. Clutches engagement/disengagement are either controlled by a clutch pedal or by anautomatic control unit. A torsion damper/coupling may be integrated to reduce vibrations in thedriveline. (BOSCH, 2007; Wikipedia--Clutch)
3.2.2 The Torque Converter
The function of the torque converter is like the gearbox to transfer rotating power to anotherdriven load efficiently and at the same time smoothly. It also allows the engine to keep on
rotating at an idle speed when the vehicle comes to a stop without clutch operations. It consistsof a fluid coupling which increases the lifespan of the gearbox since it decreases the frictionalloss by converting it to heat. The fluid is often some kind of oil. There are three rotating
elements: the impeller, the turbine wheel and the reaction element (stator). Torque istransferred from the engine’s flywheel disk to the converter via a link which consists of flex
plates or a torsion damper/coupling (standard in all Scania produced busses). (BERGLUND,
Niklas, 2010)
A torque converter works in the following way (see Figure 3 for illustration); the impeller moves
oil intro a circular flow system which is controlled by the blades in the converter. The oil flowfrom the impeller side collides with the turbine wheel and is then diverted in the direction of
flow. The purpose of the stator is to divert the oil flowing out of the turbine and providing it
onwards to the impeller using suitable direction of flow. The stator experiences torque from thediversion and use this to increase the turbine rotating movement. The torque multiplying effectdepends especially on the design of the blades in the converter and the viscosity of the liquid.
(ZF FRIEDRICHSHAFEN AG , 2006; Wikipedia--Torque_converter)
10

Figure 3: Torque Converter, Impeller, Stator and Turbine

3.2.3 The Retarder
A retarder is a non-wearing auxiliary brake that augments or replaces some of the functions of
the primary braking system. It resembles a reversed torque converter in the way that it works asa fluid coupling and consists of a rotor and stator which forms a torus (see Figure 4). As in thetorque converter, the fluid in the retarder is thrown between the rotor and stator which resultsin the braking torque. The retarder reduces the thermal load on the road wheel brakes undercontinuous braking, which is ideal for trucks or busses during descent of a long decline where
the speed needs to be controlled and prolongs the life of the ordinary system. The retarder caneither be hydrodynamic or electrodynamic and can be fitted on both the drive input side(primary retarders) or the output side (secondary retarders). Primary retarders can be mounted
as an integrated unit in the transmission which allows for compact dimensions, low weight andfluid shared with the transmission in a single circuit. Integrated retarders are widely used on
public transport buses because they have the above named specific design advantages and they
are good for braking at low speeds, whilst secondary one’s are often used in long-distance trucks
for adjustment braking at higher speeds or when travelling downhill. (BOSCH, 2007)

Figure 4: Retarder, 1 = Rotor, 2 = Stator113.2.4 The Planetary Gear Sets
Planetary gear sets is a gear system that consists of planet gears revolving about a sun gear andan internal ring gear (see Figure 5 for illustration). It is characterized by at least one of the cog
wheels in the gear system is mounted to an axis which is not fixed. The cog wheel can still movein a circle around the other cog wheel’s fixed center. The planet gears are generally mounted on
a carrier which can rotate relative to the sun gear. Each element can act as input or output gear,or it may be held stationary. That is why there are several ways in which an input rotation canbe converted to an output rotation.
The layout of the planetary gear makes it ideal for use with friction clutches and brake bands,
which are used for selective engagement or fixing of the individual elements in the planetary
gear. The engagement pattern can be altered which change the conversion ratio without
interrupting torque flow. In order to provide more conversion ratios (more gears) many
planetary gear sets can be mounted in series, one after another in different arrangements.
(BOSCH, 2007; Wikipedia--Automatic_transmission)

B

C

A

Figure 5: Planetary gear, A = Sun gear, B = Ring gear and C = Planet gears with carrier

12

4 Modeling and simulation
In the book Encyclopedia of Computer Science, Roger D. Smith3 defines simulations as the processof designing a model of a real or imagined system and conducting experiments with that model.
The purpose is to understand the behavior of the system and to link observations tounderstandable patterns. Since models build on representations of real world, assumptions arebeing made and mathematical algorithms and relationships are derived to describe theseassumptions. Simulation is the imitation of reality and it builds on representations of certain key
characteristics or behaviors of a selected physical system. Basically this is what all science isabout, to describe the world around us. In many studies it has proven to be more cost effective,
less dangerous, faster, or otherwisemore more practical than to test the real system. The system
may not even (yet) exist. (SMITH, Roger D., 2003)
Dynamic processes are what characterize many systems in the real world. To be able to better
understand and control them models are required. Models in these contexts are often built-up ofmathematical equations, physical relations. In the end this can lead to good representations of
the dynamic processes in the real world, either if they are simple linear relationships or nonlinear. (LJUNG, Lennart and Glad, Torkel, 2008)
Ljung and Glad present two basic principles for how a model is constructed: physical modelingand system identification.
The first principle is to reestablish the real world properties and behaviours on subsystems.
Different known laws of nature are used to desribe the subsystems. What happens when you
connect a gear to a rotational shaft is followed by Newtons laws about motion. If a system issimple the model may be represented and solved analytically with help of mathematical tools.
Consider the illustration in Figure 6 of a simple system of rotation of a rigid shaft connected to adriven member where Newtons laws are used to describe the physical system.

Figure 6: Rotation of a rigid shaft connected to a driven member

Trough Newtons second law of motion the following differntial equations is derived which
decribe the rotation:
̇3

Roger D. Smith is currently the CTO for Florida Hospital’s Nicholson Center for Surgical Advancement, and has
just finished as the CTO for US Army Simulation, Training and Instrumentation. He has published over 100
papers on innovation, management, technology and simulation (Amazon.com).

13

The expression can be reformulated if it is considered that ̇to:̈
where:

However, problems in the real world are often more complex and many problems of interest canbe so complex that it is impossible to make a simple analytical model represenatation. Copingwith the complexity of the real world is a big challenge in moddeling and simulation. For more
complex systems such as a human being or the global climate; hypotheses and generally
accepted relations are therefore used such as linear approximation. (SMITH, Roger D., 2003;
LJUNG, Lennart and Glad, Torkel, 2008)
Another way to cope with the complexity of the real world is the other modeling principle;
system identification or empirical modeling. The principle is based on observations of thesystem’s behaviour in order to adjust the model’s properties and behaviour to the system’s. This
pinciple is often used as a complement to the first one. Technical systems are initially build uponlaws of nature that comes from observations of subsystems. (LJUNG, Lennart and Glad, Torkel,
2008)
There is a distinction between two kinds of simulations, either discrete event or continous,
based on how the state variables change. Discrete events refers to that the state variables
change at specific points in time and in a continous simulation the states variables change
continously. Normally in a continous simulation the variables are expressed in a funtion wheretime is one dimension of them. Most simulations use a combination of both discrete andcontinous state varaiables, usually one of them is predominant and stands therfore for theclassification of the whole system. (SMITH, Roger D., 2003)

14

4.1 Different kinds of modeling approaches
The traditional modeling methods (C, Fortran, etc.) and signal-based or input-output (Simulink)are often refered to as casual modeling tools. Theese tools works very well for control systems,
but when it comes to physical systems they have some disadvantages. Physical systems are often
expressed in the form of differntial algebraic equations (DAEs), which are a composed set of
equations, consisting of both derivates and without, that must be solved simultaneously. Casualmodeling tools can only approximate them and the models that are created are often dependent
upon which element they are connected to. Therefore it is necessary to know which inputs andoutputs that are available in order to connect it with the rest of the system. This leads to thatevery component have to be modelled in the same manner in order to reuse them in othersystems or applications, especially when components span over multiple physical domains.
Because the above named reasons a new type of simulation tools grew based on acausal objectoriented physical modeling often refered to as non-casual or acausal modeling. Kirchhoff’s laws
had long been used to express the equations for an entire system of connected electricalcomponents. Developers found that similar rules could be applied to other physical domains andwith this came the rise of languages such as Simscape, Modelica, MapleSim and 20Sim. The
advantages of these tools are particularly that the mathematical model does not depend uponlocation in the system making it easier to reuse component models, the equations for the
network are created automatically which makes it easier to handle algebraic constraints and thenon-casual approach makes modeling in multiple domains easier. A description of how Simscape
apply this approach is followed in Chapter 6 Modeling in Simscape. (MILLER, Steve, 2008;
Mathworks.com--Recorded Webinar: Physical Modeling with the Simscape Language)

4.2 Model verifying
It is trivial to build accurate models of representations of the real world, the difficulty lies in tobuild models with sufficient accurancy in order to give them credibility. Therefore every modelneeds to be tested and verified in order to give them acceptance. Model verifications is done bycomparing the behaviour of the model against the real system and evaluate the difference. Ljung& Glad argues in their book Modellbygge och simulering that models have a certain areas offidelity. Some models are valid for vague, qualitative, statements and others are valid for more
precise, quantitative, predictions. The fidelity area responds to the model users accurancy
requirements for the study. A model of a wind power station may for example only be valid forsmall breezes, but anothor one can be reliable for a hurricane wind. It is an impossibilty to deal
with every represenation in a model, therefore a limit have to be set that is acceptable for the
purpose of the study; what kind of variables to include/exlude. Maybe the model can be
simplified by aggregating the effects of the exluded variables into the included ones. The bottom
line here is that every model has certains level of fidelity, because every model are build on
representations of the real world. Even though models and simulations are great for manyreasons, it can never entirely replace observations and experiements. (SMITH, Roger D., 2003;
LJUNG, Lennart and Glad, Torkel, 2008)15

4.3 Which requirements should be considered for a modeling tool?
In (LJUNG, Lennart and Glad, Torkel, 2008)a number of requirements that should be fulfilled fora modern modeling tool are listed:







It should cover as many physical and technical domains as possible.
It should be systematic. Ideally, large parts should be automated in the software.
It should lead to a mathematical formulation that is appropriate for simulation and othermodeling uses.
It should be modular. It should therefore be possible to build component models that canthen be assembled into complete systems.
It should facilitate the reuse of models in the new context
It should be close to the physics. It must therefore resemble the real physical world in anaccessible way.

16

5 Modeling in Simscape
As mentioned earlier, Simscape is a non-casual or acausal modeling tool. Blocks in traditionalmodeling tools such as Simulink represent basic mathematical operators and when you connect
blocks together you get a system of different mathematical operators with specific inputs andoutputs. In Simscape each block in the system consists of functional elements that interact witheach other by exchanging power or energy trough their ports.
Connection ports in Simscape are bidirectional, where energy can flow in both directions.
Connecting Simscape blocks represents connecting real physical components like shafts, valvesetc. Flow direction and information flow does not have to be specified when connecting
Simscape blocks into the network.
The number of connection ports for an element is determined by the number of energy flows it
exchanges with other elements in the system. For example, a resistor can be characterized as a
two-port element, with energy flow in and flow out. The resistor only involves one physicaldomain. Each energy flow is represented by its variables and each flow has two variables, one
through and one across. In Simscape they are called basic or conjugate variables and for example
in mechanical rotational systems there are torque and angular velocity. The difference between
them is described below:

5.1 Across variable
Kirchhoff’s voltage law states that the directed sum of the electrical potential differences aroundany closed circuit must be zero. This implies that the voltage of all components’ ports attached toan electrical node must be the same. If this approach is transferred to the mechanical rotational
domain it means that the angular velocity at all of the component’s ports attached to that node
must be the same.

Figure 7: Across variable, the sum of all voltages around the loop is equal to zero. v1+ v2+ v3+ v4=0

5.2 Trough variable
Kirchhoff’s current law states the sum of currents flowing towards an electrical node is equal to
the sum of currents flowing away from the node. Once again if this approach is transferred to themechanical rotational domain it means that the amount of torque flowing into that node must be
equal to the amount flowing out.

17

Figure 8: Trough variable, the current entering any junction is equal to the current leaving that junction. I1+ I4= I2+ I3

Expressing mathematical and physical equations for a component including these basic variables
makes it possible to formulate the equations for the entire system in using this approach foreach different physical domain. (MILLER, Steve, 2008)
In Table 3 are the predefined physical domains in the Simscape standard package listed with
their respective trough and across variables. The variables are as described above are analogous
to each other and the product of the variables are generally power (energy flow in watts), except
for the pneumatic and magnetic domain where the product is energy. (Simscape™ 3 User’s
Guide, 2010)
Table 3: Simscape predefined physical domains
Physical Domain

Across Variable

Through Variable

ElectricalHydraulic
Magnetic
Mechanical rotational
Mechanical translational
Pneumatic
ThermalVoltage
Pressure
Magnetomotive force (mmf)
Angular velocity
Translational velocity
Pressure and temperature
Temperature

Current
Flow rate
Flux
TorqueForce
Mass flow rate and heat flow
Heat flow

5.3 Direction of variables
Every single variable in Simscape is represented with its magnitude and sign. In Figure 8 is anelement with only two ports connected, and there is only one pair of variables, a trough and an
across variable. The element is oriented form port A to port B meaning that the trough variable
is positive if the flow is going from A to B. The across variable is defined as AV = AVA – AVB.

Figure 9: Simscape element, direction of variables

18

With this approach it is simple to determine the energy flow direction because the only thingthat matters is the sign of the variables. It follows that their energy is positive if the element
consumes energy and negative if it provides energy to the system. All network elements are
separated into active and passive elements, depending on whether they deliver energy to thesystem, dissipates or store it. Therefore active elements as force and velocity sources and otheractuators etc. must be oriented in line with the right action or function as they are expected toperform in the system. Passive elements like dampers, resistors, springs, pipelines etc. on theother can be oriented either way.

5.4 Connector ports and Connection Lines
Simscape has two different kinds of ports:

Physical conserving ports

Physical signal ports

Physical conserving ports are bidirectional, and the connections represent the physicalconnection with the exchange of energy flows. That is why only conserving ports can connect toother conserving ports of the same type and not to Simulink ports or Physical signal ports. Eachdifferent type of ports represents a physical domain. The lines that connect conserving ports arebidirectional lines that carry physical variables (trough and across) instead of signals. Branchingof physical connection lines are possible and in doing so any trough variable transferred along
the physical connection line is divided among the elements connected. Elements directly
connected to each other continue to share the same across variables.

Physical signal ports are one-way directional and transfers signals that use an internal Simscapeengine for computations. Physical signals are used instead of Simulink input and output ports toincrease computation speed and avoid issues related to algebraic loops. The physical signals canhave units assigned and Simscape deals with the necessary unit conversion operations if needed.
(Simscape™ 3 User’s Guide, 2010)

5.5 Simscape language
As mentioned earlier in the description of the Simulation tools, Simscape also has an objectoriented programming language tied to it. The language enables the user to create new selfdefined components as textual files with equations represented as acausal implicit differential
algebraic equations (DAEs). Each component can be used with another component if they sharethe same physical domain and if none of the predefined ones fit it is possible to create new ones.
The following example of an ideal gear can illustrate how the Simscape language works:
An ideal gear is a component that has an energy flow in and one out. It can be described
physically with the following two equations, one for the angular velocity and one for the torqueconversion:19

(1.1)(1.2)

This component can easily be built with the Simscape language. The implementation and thedescription of the code and its components follow below. For the complete coherent code see
Appendix 12.2.1 The Ideal Gear model.
Simscape code 1: The component’s name and description section
component Ideal_gear% Ideal Gear Description

Initially the component’s name is declared. If needed, a description can thereafter be followed.

Simscape code 2: The node sectionnodes
I = foundation.mechanical.rotational.rotational; % I:left
O = foundation.mechanical.rotational.rotational; % O:rightend

The node section is where the declaration of the component takes place and in this case there
are two nodes that are associated with the mechanical rotational domain, which is one of thepredefined physical domains in the standard Simscape package.

Simscape code 3: The parameter section
parameters
ratio = { 1, '1' }; % Min Gear ratio
end

Above are the component’s parameters declared with their associated units. The parameter
section defines the parameters that can only be changed before the simulation starts. Usefulmodels will have parameters that correspond to actual physical quantities, which usually can befound in technical documents or measured. In this case the parameter ratio is set to a default
value of 1.
Simscape code 4: The variables section
variables
t_in = { 0, 'N*m' };t_out = { 0, 'N*m' };w = { 0, 'rad/s' };end

Here are the component’s variables declared with their associated unit.

20

Simscape code 5: The function section
function setup
through( t_in, I.t, [] );through( t_out, O.t, [] );across( w, I.w, O.w);% Parameter range checking
if ratio <= 0
pm_error( 'Ratio value must be greater than zero' );end
end

In the function setup section the relationships between the components variables (across andthrough) and its nodes are defined. Parameter validation can (if needed) also be implemented.
In this case it checks that the ratio is always set to.

Simscape code 6: The equation section
equations
I.w == ratio * O.w;t_out == -ratio * t_in;end

The last equation section defines the mathematical relationship between the components troughand across variables, parameters, input/outputs and corresponding time derivate. In this casethe relationships are between:
torque, angular velocity

and the unit-less parameter

The double equal sign
stands for continuous non-casual equality between the left and rightside, not assignment or not a Boolean operator as in other programming languages. The
equations are evaluated continuously and simultaneously throughout the simulation process.
The equations can be DAEs or ODEs or both and can consist of vectors/matrices. Conditional
equations can be specified using if statements.
All equations in Simscape are evaluated in continuous time. The values such as variables, inputs,
outputs and time are defined as piecewise continuous. Piecewise continuous indicates thatvalues are continuous over compact time intervals but may change at certain instances. Other
values which are not time varying are, parameters and constants. Global simulation time isaccessible in the equation section with the time function, and therefore the time derivate of an
operand is also available. (Simscape™ 3 Language Guide, 2010)
The Simscape language supports some basic MATLAB functions which can be used in theequation section for example, (See Appendix 12.1 Simscape MATLAB
Supported Functions for the complete list).

21

5.6 The Simscape Library
There is a standard library shipped with Simscape that consists of some basic components forthe different physical domains. For example in the rotational mechanic domain the following
components are included:
Table 4: Rotational components with included source code provided with Simscape

Ideal Rotational Motion Sensor
Ideal Torque Sensor
Ideal Angular Velocity Source
Ideal Torque Source
Ideal Gear
Inertia
Mechanical Rotational Reference
Rotational Damper
Rotational Friction
Rotational Hard Stop
Rotational Spring

As described earlier it is possible to build your own custom made physical component with the
Simscape language and this custom built component can thereafter be gathered in a custom
library, together with other own made components, similar to the provided library above.
Because Simscape is object-oriented modeling language, source code inheritance among thecomponent is a feature provided. It is useful for building similar components that share the same
basic variables and parameters, but need different parameter settings.
If the components are going to be distributed to other departments, companies etc., there is an
option to protect the source code of the component for example if it contains sensitive
information. (Simscape™ 3 Language Guide, 2010)22

5.7 Compilation and troubleshooting
Troubleshooting in the Simscape is handled in a number of ways. Below is just an example ofthose that came up commonly during this thesis writing and those who are described in the
Simscape User’s guide and Simscape Language Guide.
The compiler or the solver gives an error if:


The units are not commensurate

The Simscape code 7 example below would result in this error message because
has the unit
,
has
and
has
assigned, i.e. they are not commensurate.
Simscape code 7: Not commensurate equation

equations
I.w == ratio * t_out;
O.w == -ratio * t_in;endMore variables than equations (or the other way around)

For example you declare two variables in the setup section of the code and then have threeequations in equations section. When the numerical solver tries to solve the system it gives anerror message because the system of equations becomes over-determined or underdetermined
and that causes numerical errors for the equation solver.
When studiyng systems of linear equations, the equations can either be lineary dependent or
independent and if is the number of equations, is the number of unknowns and is thelineary dependent equations. Table 5 illustrates the cases that determines if the system isdetermined, overdetermined or underdetermined. (Wikipedia--Overdetermined_system)
Table 5: Different equation systems
Determined
Underdetermined, and three special cases:

OverdeterminedWhen
but allare not linearly
independent, but when the linearly dependentequations are removed. This caseyields no solutions.

Special Case 1,
overdeterminedWhen
but allare not linearly
independent, but when the linearly dependentequations are removed. This caseyields a single solution

Special Case 2,
determinedWhen

but allare not linearly

23

Special Case 3,
underdeterminedindependent, but when the linearly dependentequations are removed. This caseyields infinitely many solutions.



Other numerical issues

The most common problems were often related to numerical issues such as zero crossings
which can be caused by certain configurations of Simscape blocks. Zero crossing is a specific
event type represented by the value of a mathematical function changing sign (e.g. from positive
to negative). Figure 10 illustrates how such an error may show up in Simscape, note that theerror message does not say in which specific block the numerical error is caused or what thecause of the problem is, only that it exist a numerical error somewhere in the model.

Figure 10: Zero crossing numerical errorHigher order derivates

For example it is not possible to write
directly. To use higher order derivate
Simscape code 8 example approach must be used instead
Simscape code 8: Higher order derivate approach

variablesh = { 0, 'rad/s*s' };w = { 0, 'rad/s' };phi = { 0, 'rad' };endequationsphi.der == w;w.der==h;end

24

6 Modeling of the ZF-ECOMAT 4 (HP 504 C / HP 594 C / HP 604 C)
The gearbox that will be modeled in Simscape is the ZF-ECOMAT 4 (HP 504 C / HP 594 C / HP
604 C). In this chapter the construction of the different components in Simscape are described indetail. It should be noted that the goal is to see the modeling potential of Simscape, rather thanto model the gearbox in high fidelity.
The model will only be built of components that will fit in the mechanical rotational domain andthey will all share the same variables, torque and angular velocity. As Figure 11 shows thefollowing Simscape components need to be built:






A Clutch model (included in the Torque Converter and the Gearset and Shift Mechanism)
A Torque Converter (with lockup-clutch) model
A Retarder model
A Planetary Gear Train model (Gearset and Shift Mechanism)
An Automatic Logic program (Transmission Control Unit)

Figure 11: Model overview, the bidirectional arrows represents the physical network approach where the power can flow
in both directions. The unidirectional represents one way signals.

6.1 The Clutch modelA clutch (or brake) can be hard to model realistically since the behavior of a clutch is usuallymodeled in a way where the clutch constantly shifts between continuous and discrete time
events and this can be a difficult problem for many simulation environment solvers to handle.
The clutch model has a certain importance for the gearbox model as a whole, because the clutch
gets the dynamics working in a correct manner by locking and unlocking the planetary wheels,
which in turn sets the direction of the power flow in the gearbox and that sets the different gear
ratios. This will be described later in this chapter.
The clutch model in this chapter is based on a simplified version of real friction clutch that canhave three different states and the only friction that will be accounted for is the dynamic(kinetic) friction, when the clutch plates are sliding.

25

To model the clutch, the following variables are introduced:||

The clutch torque capacity is given by:

∬

[

]

∬

∬

[∫

]
(1.1)

∫ ∫

(

)

After some rearrangements the final torque equation yields:(1.2)
The clutch area is thereafter expressed with the following formula, where the number of clutch
plates is included:(1.3)

Next are the three different states that the clutch can switch between introduced:When the clutch is sliding and kinetic friction torque is transferred. The friction plates
have different angular velocities and the angular velocity is above the threshold value.
The sign function is the mathematical sign function and describe that the torque should
act in the direction that opposes the slip.
(1.4)
(1.5)
(1.6)

26



When the clutch is sliding, but less torque is transferred. The friction plates still havedifferent angular velocities, but w is approaching zero. The angular velocity is below thethreshold value.
(1.7)
(1.8)
(1.9)



When the clutch is locked. The two plates rotate together with the same angularvelocities and the resulting equations become trivial.
(1.10)(1.11)

The clutch states can thereafter be described in Simscape with the following piece of code:
Simscape code 9: Clutch equations

Equations
if((w>=w_tol) || (w<=-w_tol))%Dynamic friction (SLIDING)

t==2/3*R*P*Uk*A*sign(w);else
t==2/3*R*P*Uk*A*sign(w)*(w/w_tol);end
end

The first thing to notice in the code is the first part of the equations is the kinetic friction only
acts in a certain tolerance level, whenor when. This implementation
is to avoid the discontinuing states (zero crossing) when.
The zero crossing avoidance can be seen in the second part in the else statement, when the

clutch is sliding. in this case is the relative absolute value of the angular velocity which is||.
measured on each side of the clutch, i.e.
Thedirection.

is to express that the transferred torque should act in the opposite torqueWhen
the whole expression becomes zero which stands for the locked mode. The left sideof the clutch’s driveline is connected to its rights side and in this mode the both have the sameangular velocity.
(1.12)
27

(1.13)The clutch will stay in this locked mode as long as the pressure is enough. When decreases
the reverse order is applied and when the pressure reaches zero the clutch’s left and right sideof the driveline is now completely separated and can rotate independently from each other.

6.2 The Torque Converter model
It is very difficult to construct a representable physical model of a torque converter since it
represents a fluid coupling and therefore knowledge about the physics of the flow have to be
known in every single state, which often leads to lengthy and cumbersome equation. The fulldynamic perspective of the converter is therefore hard to model analytically, which is not in thescope for this thesis. An easier way, instead of trying to describe it physically, is to describe thepower conversion with mathematical formulas which are based on measurement data from thespecific torque converter.
In doing so, the behavior of the specific flow can me expressed implicit and a good
representation of the physical torque converter can therefore be reached. The technical data
about the behavior of the torque converter is taken from the technical manual provided by ZF
Friedrichshafen AG.

To describe the performance of the converter the following variables are introduced:

First is the function that specifies the relation between input (impeller) and the output (turbine)
speed introduced.
(1.14)
Thereafter are the two functions that specify the characteristics of the converter: the torqueratio and the capacity factor , both as functions of the speed ratio .
(1.15)(1.16)
28

Torque conversion ratio is a term used to express the ratio between the impellers torque andthe turbine torque. The greater the speed difference between the impeller and turbine, thegreater the ratio is. Hence, it multiplies the engine torque at a low engine speed when the
difference is the greatest. This improves the vehicle’s launching performance andresponsiveness. As the speed of the turbine wheel increase, the torque conversion falls. The
capacity factor is dependent on the detailed geometry regarding blade angles, fluid density andviscosity.
In normal operation the torque on both the input impeller and output turbine can be expressedwith the following two equations which are presented in (BOSCH, 2007).
(1.17)(1.18)

The final torque converter Simscape model is described with the following piece of Simscapecode:
Simscape code 10: Torque Converter equations

equations
Rw==(wT/wI);
if (((wI>=w_min) || (wI<=-w_min) || (wT>=w_min) || (wT<=-w_min)))

TI ==K*D^5*wI^2*p*(1-(wT/wI));
TT==- TI *RT;else

TI ==K*D^5*w_min^2*p*(1-(wT/wI));
TT==- TI *RT;
end
end

As in the clutch model, asimulation starts and either

variable is introduced to avoid the zero crossing when theor
can be 0. The
function in equation is to express

that the torque converter should not transfer any torque when the lock-up clutch is active. When, the expression
becomes zero.

29

6.2.1 The Lockup-clutch
Modern automatic torque converters are usually equipped with a lockup-clutch. The clutch locks
the impeller to the turbine and the torque converter can thus be considered as a pure rotating
mechanical shaft. The torque multiplication and speed ratio are in this locked mode equal to one
when the impeller and turbine wheel act as one solid shaft. This solution decreases the power
losses traditionally associated with torque converters. (ZF FRIEDRICHSHAFEN AG , 2006)
In this simplified model the lockup-clutch locks when the difference between impeller andturbine is 80%.
The behavior of the torque converter when the lookup-clutch is in locked mode can be describedin these simple equations:(1.19)(1.20)

The final model of the torque converter with the lockup-clutch can be seen in Figure 12, which isa mixture of Simscape and Simulink components:
K-factor

Inertia1
Inertia2

BSimscapeF

IMPELLER
1

K

Rw

2

Tr
Torque_C
Rw

TURBINE

Torque_C
Scope5Torquefactor

PS S
PS-S

Simscape
BF
custom_clutch_test1
A

0.9
Scope1<=

Convert

-K-

PS S

Gain1
PS-Simulink
Converter2

S PS
Simulink-PS
Converter

Figure 12: The final torque converter with lockup-clutch

6.3 The Retarder model
The retarder is similar to the torque converter, but instead of torque multiplying the retarderdecreases the torque when activated. It is still a fluid coupling and therefore it is modeled withthe same approach as the torque converter with the help of recorded measurement data.
Because the retarder is a primary retarder (mounted on the drive input side), the braking forces30

will be direct dependent on the gear engagement. The highest braking levels are available in thelower gears, and therefore at lower vehicle speeds.

The following variables are introduced:

First there is one function that specifies the characteristics of the retarder, the retarder ratio as afunction propeller shaft speed (output from gearbox):(1.21)

In normal operation the decreasing torque transmitted when the retarder is active is describedwith the following equation:(1.22)

The final equation for the retarder results in:(1.23)In the parameters described above, there are some values that are fixed in the model, but in amore realistic model in the future they could easily be changed to variable parameters. The
engine friction parameter is set at constant value of 0.1 which is a quite reasonable measure ofengine friction. The percentage ratio is set to 0.8; this ratio is in the reality dependent on
number of different factors such as: requested braking torque from the driver, brake pedal
position. The gear ratio is set to a fixed value 1.6 but should in a more realistic model have avariable value that changes according to the current gear ratio.

The above equations results in the following Simscape model seen in Figure 13, notice the use of
Simscape physical signals.

31

MechanicalRotational Reference
C
1

R

W

A
Propeller_input
Ideal Rotational
Motion Sensor

2
A

MechanicalRotational Reference1
Ideal Torque Source

RAD to RPM

PS Lookup Table (1D)

Percent1

Gear_ratio1

C
R
S

Engine_friction

Input
T
3
Conn3

R
C

Inertia

Figure 13: The retarder model

32

PS SubtractTorqe

6.4 The Planetary Gear Train modelThis is the central part of the automatic gearbox and this is mainly where the angular motion
and torque conversion mechanism is taking place. Modeling of this part is really taking
advantage of the physical network approach. In the technical manual of the ZF-ECOMAT 4 series
there is a diagram over the power flow through the gearbox when the different gears are active
which is ideal for modeling with this approach. The schedule shows which clutches are active,
which are not and how the information flow is directed trough the three different planetary
gears which will be described below.

A

B

C

D

1

E

2

F

3

Figure 14: Power flow schedule

Figure 14 above illustrates the inside of the gearbox and how the power can flow through thegearbox. The lettered rings represent the different clutches in the gearbox and the numberedrings represent the three planetary gears.

In Table 6 below the power flow diagrams are shown for each gear, where the bold selection
illustrates the power flow.
Table 6: Power flow diagram for each gear
Clutches active

Power flow

(A, F)(A, E)(A, D)

33

(A, B)(B, D)(B, E)(C, F)

Since a model of a clutch already has been built the next components that will be modeled is theplanetary gear.

6.4.1 Planetary gear sets
The planetary gears can as described in the Chapter 3.2.4 The Planetary Gear Sets shift power
conversion depending on which axle acting as a fixed one, and which one is acting as the input.
The first one who gave a detailed explanation of the physics of the planetary gears was RobertWillis in his book Principles of Mechanism 1870. (WILLIS, Robert, 1870)
The following variables have to be introduced to describe the planetary gear:

Since planetary gears have three connecting ports that they share with the physical network,
three different equations must be derived to describe the relationships between the components
nodes and variables.

34

The first one is the basic kinematic equation for planetary gear sets:

(

)

[

]

(1.24)The last two equations can be derived from doing a torque analysis. The energy balance
equation for planetary gear train can be written as:(1.25)
And when the planetary gear is moving along a solid axle the angular speed is the same(and). The equation above can now be written as:(1.26)
Equation 1.26 is the first energy equation that defines the different torque conversions taking
place. The second one is when the carrier is held stationary (). Equation 1.24 becomesnow:(1.27)
Together with the energy balance Equation 1.25 and once again setting
equation is, after some rearrangement:

the resulting(1.28)The three Equations, (1.24) (1.26) and (1.28) that characterize an ideal planetary gear have now
been derived. When the mathematical representation is done it can easily be transformed into aplanetary gear component trough some programming in the Simscape language. It could look
like the code piece below:
Simscape code 11: Planetary gear equations

equations%Overall kinematics(1+(ZR/ZS))* wC == wS +(ZR/ZS) * wR;%Torque balance
TR == (ZR/ZS) * TS;
0 == TC + TS + TR;
end

6.4.2 The full gear model
When the two components have been built it is time to transfer the power flow diagram into a
Simscape model which can be seen in the Figure 15 below. The model is a representation of thepower flow diagram and it can simulate how the actual power flows through the gearbox.
35

{D}

R1

SPS

{D}

{E}

SPS

{E}

S-PS3

R2
{F}

S-PS4

{F}

R3

SPS
S-PS5

B

Simscape

B

F
B
custom_clutch_test1
Simscape

D

SimscapeEcustom_clutch_test1

F

custom_clutch_test1

F

custom_clutch_test1

F

F

S-PS2

Simscape

B

{B}

SPS

B

{B}

Inertia7

RSimscape

2
Conn2

{C}
{C}

RSimscapeC

CS
plant_gear1

S
plant_gear1

S
plant_gear1

F

plant_gear1

plant_gear2

plant_gear3

SPS
S-PS1

RSimscapeC
SimscapeB
custom_clutch_test1
C
Inertia1

Inertia2

Inertia3{A}

Simscape
B
{A}
{A}

{B}

F
SPS
S-PS

1
Conn1

{C}

custom_clutch_test1
A

1

{D}
f(x)=0Inertia5

P{E}

SolverConfiguration{F}
ClutchPressures

Figure 15: The full gear model

6.4.3 Gear Ratios
The different gear ratios for the ZF-ECOMAT 4 are presented in Table 7 below:
Table 7: ZF-ECOMAT 4 ratios, (ZF FRIEDRICHSHAFEN AG , 2006)
Gear
Ratio

1
3.43

2
2.01

3
1.42

4
1.00

5
0.83

6
0.59

In order to get each corresponding ratio correct the ring to sun ratio ( ) has to be adjusted foreach of the three planetary. The ratio parameters have been incrementally adjusted until it could
match the ZF-ratios. The ratio adjustment ( ) for each planetary gear presented in Table 8
below and the result of the ratio adjustment can be seen in Figure 16 on the next page.
Table 8: Ratio adjustment
Planetary Gear 1(ring to sun)
2.405

Planetary Gear 2 (ring tosun)
2.439636

Planetary Gear 3 (ring to
sun)
2.43

Validation Gearbox
3.5

3

Gear ratio

2.5

2

1.5

1

0.5

0

10

20

30
Time
[s]

40

50

60

Figure 16: Result of the adjusted gear ratios for gear 1-6

6.5 The Automatic Logic program
The control logic for the gearbox is implemented with help of another tool made by MathWorks
called Stateflow. Stateflow enables a graphical representation for event-driven systems based on
finite-states. Gear shift control algorithms in many modern automatic gearboxes can be
extremely complex and often takes many years to develop. Usual parameters that thesealgorithms take account for when shifting gears are for example throttle position, engine rpm,
gps data, current gear, incline, torque request etc. The control logic for this model will have amore simple character and will only have one input parameter and that is the engine angularvelocity. Below is the actual Stateflow chart shown which is based on a modified version of oneof the examples provided with Stateflow called sf_car.

37

Figure 17: Automatic logic Stateflow chart

The gear shifting logic is very simple to follow.
Up-shifting:If engine angular velocity speed > 150 rad/s

Down-shifting:If engine angular velocity speed < 110 rad/s
Figure 18: Gear shift logic

One thing to mention though is that both up-shifting and down-shifting can only take place if theafter trigger is fulfilled. The after trigger represents the time delay it takes before shifting canoccur. In the model it is set to 0.5 seconds.

38

7 Validation
As mentioned earlier it is trivial to build accurate models, the difficulty lies in to build models
with sufficient accuracy for the purpose of the study in order to give the results credibility. It is
an interesting question to ask how close this simplified gearbox model follows the behavior of areal system and since no separate component validation has been carried out.
Therefore, the validation process will be carried out in the following way:
The Simscape model will be tested against given signals recorded from a measurement done on
Scania’s test track in Södertälje. The measurement was done in King-Kong which is one of
Scania’s test busses.
The bus was accelerated to a speed of 80 km/h and thereafter it was freewheeling for a coupleof seconds. The total measurement time was 35 s and the following three signals were recorded:Torque output from the engine (flywheel torque)
Speed on the bus (tire speed)
Current gear

The test vehicle was at the measurement equipped with the following components seen in Table
9 below:
Table 9: List of test bus specifications
Component
VehicleSpecification
Double-Decker (King-Kong), Mass 11 440 kg

Type
Scania KUD 4*2

Engine9 liter, Maxpower 206 kW (280 Hp), Maximum
Torque 1400 Nm

Scania DC 929

Gearbox

6 speed gearbox

ZF ECOMAT HP 604 C

Final Gear

Ratio 6,2

RD 760Tire

Radius 0,507 m

295/80

7.1 Remaining approximations
Because the model, as it has been described to this point, only represents the gearbox system(torque converter, retarder, gear sets) and this validation process will compare the recorded
speed of the actual bus against the speed of the model; some approximations have to be madefor the remainder of the driveline.
The following approximations are therefore made:After the gearbox comes a final gear with a value set to 6.2 which correspond to King-Kong’s
value.
The approximation of the longitudinal forces acting on a bus withsurface can be seen in the Figure 18 on the next page.

39

and

on a flat

Figure 19: Approximation of longitudinal forces acting on a bus

Newton’s second law in the longitudinal direction states:
̅

̅̅̅

̅

̅

(1.29)

If positive direction is defined to the left in Figure 19 above, Equation 1.29 gives:(1.30)
The air drag can be expressed with:(1.31)
Where,
densityis the drag coefficient,the maximum vehicle cross section area, andthe air

Rolling resistance:(1.32)

Where,
andare rolling resistance coefficients depending on tire and tire pressure
expressed in tons, and that is why the expression is divided by 1000.
Further, Equation 1.30 together withequation:yields the resulting driveline(1.33)∫

40

In this stage an approximated complete vehicle model has been created in which a given torqueinput signal gives a roughly approximated vehicle output speed. The final validation concept canbe seen in the Figure 20 below and the corresponding Simscape model can be found in Appendix
12.5 The final validation concept. In the figure is a torque actuator component which in this caserepresents the actual engine and it ignites the system with the measured torque signal from theengine.

Figure 20: Final validation concept, the bidirectional arrows represents the physical network approach where the power
can flow in both directions. The unidirectional represents one way signals.

The measured flywheel torque signal that will be used as the input signal to the model can beseen in the figure below:
Validation Gearbox
2000

1500

Torque

1000

500

0

-500

0

5

10

15

20
Time

Figure 21: Torque input signal

41

25

30

35

8 Results
Two tests were carried out to verify the model. The input signal to the model was the measured
torque signal (see Figure 20). The differences between the two tests were the gear shift strategy.
The first one uses the automatic logic described earlier in the modeling chapter and the second
one uses the actual recorded gear shift signal as input. Figure 23 illustrates the gear shift signal
when Stateflow logic is active and Figure 26 the recorded gear shift signal. The speed results ofthe two tests carried out can be seen in Figure 22 and 25 and the absolute error diagrams can beseen in Figure 24 and 27.

8.1 Test 1, with the automatic shift logic:
Validation Gearbox
90
Reference Speed
Model Speed
80

70

60

Velocity[km/h]

50

40

30

20

10

0

-10

0

5

10

15

20
Time
[s]

Figure 22: Test 1, Model speed versus reference speed

42

25

30

35

Validation Gearbox
6

5.5

5

4.5

Gear

4

3.5

3

2.5

2

1.5

1

0

5

10

15

20

25

30

35

20

25

30

35

Time
[s]

Figure 23: Test 1, Gear shifts with Stateflow

Validation Gearbox
10

9

8

7

Error per time step

6

5

4

3

2

1

0

0

5

10

15
Time
[s]

Figure 24: Test 1, Absolute error between model and reference speed in [km/h], abs(V reference – Vmodel). A trapezoidal
numerical integration gives the total error sum of 124.6099 area units.

43

8.2 Test 2, with the recorded gear shift signal:
Validation Gearbox
90
Reference Speed
Model Speed
80

70

60

Velocity[km/h]

50

40

30

20

10

0

-10

0

5

10

15

20

25

30

35

20

25

30

35

Time
[s]

Figure 25: Test 2, Model speed versus reference speed
Validation Gearbox
6

5.5

5

4.5

Gear

4

3.5

3

2.5

2

1.5

1

0

5

10

15
Time
[s]

Figure 26: Test 2, Recorded gear shift signal

44

Validation Gearbox
10

9

8

7

Error per time step

6

5

4

3

2

1

0

0

5

10

15

20

25

30

35

Time
[s]

Figure 27: Test 2, Absolute error between model and reference speed in [km/h] , abs(V reference – Vmodel). A trapezoidal
numerical integration gives the total error sum of 158.3533 area units.

8.3 Results discussion
The purpose of this thesis was to analyze the feasibility and usability for modeling with
MathWorks simulation tool Simscape by building a simplified model of the automatic gearbox
ZF-ECOMAT 4 (HP 504 C / HP 594 C / HP 604 C). It has been shown throughout the thesis how
this model was build. First the system knowledge has been acquired by studying relevant
literature and speaking with the persons concerned. The second step was to get acquainted with
Simscape and the physical network approach. The physical network approach that is accessible
through the Simscape language makes is easy to build custom made components with means ofphysical and mathematical relationships. With this background a stepwise approach been
conducted which has led to the final model of the gearbox and the validation concept.
The results of the two tests indicates that the dynamic is working in a correct manner. In bothtests the model speed follows the the reference speed quite accordingly through the different
gears. The fact that test 1 gave a less total speed margin of error than test 2 (124.6099 km/h
compared to 158.3533 km/h), which also can be seen in the Figure 24 and 27 is only due to thedifference in gear shifts. The Stateflow automatic logic program for test 1 gave the model a more
moderate speed curve while the recorded gear shift signal for test 2 gave the model a steeper
speed curve. One thing to notice from both of speed figures 22 and 25 is that when a gear change
is taking place a rapid speed jump can be seen which takes place in a very small timeframe.
The two tests show that even though the model is simplified it still is resonably accurate. In a
more realistic vehicle model the difference between the two tests would probably rather resultin the opposite if the current shift logic program is kept as it is now. The fact that test 1 gave aless total speed margin of error is more of a coincidence and depends probably on the45

construction of the simplified vehicle model or incorrect parameter settings when testing themodel.
The rapid speed jumps that takes place when shifting gears is due to the powerful torquetransfer trough the clutches when acting in slip mode
. This can be seen in Appendix
12.4 Torque output on propeller shaft, where the highest peak transfer reaches appriximetely
during 0.1 seconds. This behaviour is a result of the parameters used in the clutch
model. Most impact for the two tests has the pressure parameter which actuates the clutch. For
the two tests all clutches are actuated with a value of. In a more realistic clutch modelthat value may have to be adjusted and that will decrease theese jumps and make the gear
shifting time frame last for a longer period. A more realistic engine model will also consider gear
shifting factors such as engine rpm syncing, and decrease in torque before shifting which willfurther reduce theese jumps.
One thing that can be mentioned is also that no breaking simulations have been carried out
because of the time frame requirements for the thesis. Therefore, the retarder component has
been inactive in the whole validation process.
Nevertheless, this initial model can serve as good ground for further development and gives agood indication that it is possible to build and simulate realistic physical models with the
Simscape software. How realistically is hard to tell solely from the resuslts of this thesis workand need further studies.

9 Conclusion
Simscape has proven to be a powerful tool for modeling physical systems and all of the demands
that Ljung & Glad listed that should be fulfilled for a modern simulation tool has more or lessbeen met which can be seen in Table 10.
Table 10: Demands for a modern modeling and simulation tool
DemandIt should cover as many physical and technical domains as possible.

Fulfilled✓

It should be systematic. Ideally, large parts should be automated in thesoftware.

✓

It should lead to a mathematical formulation that is appropriate for simulationand other modeling uses.

✓

It should be modular. It should therefore be possible to build component
models that can then be assembled into complete systems.

✓

It should facilitate the reuse of models in the new context✓

It should be close to the physics. It must therefore resemble the real physicalworld in an accessible way.

✓46

However, with that said there are still some things that must be improved to make the tool moreaccessible, mainly from a usability perspective. Below is a list of suggestions that I suggest could
make Simscape a lot more accessible, effective and decrease the learning curve, especially for
inexperienced users of physical modeling. First comes the suggestions which I think are themost important and thereafter are the less important.
Important

A larger library of included components for all of the provided physical domains withincluded source code and documentation.

More examples of different models build in respective physical domain, which the user
can study and test. Both simple and more complex models.



A better troubleshooting guidance would make the modeling a lot more efficient. If it
exists numerical issues in the model the error message does not say in which component
the problem arise. The modeling approach has as mentioned before started simple bytesting each component separate to eliminate some of these issues. Hence, when adding
more components some numerical problems may still persists and then it becomes evenharder to know in which component the problem exists if Simscape does not tell you
specifically where or what the root cause of the problem is.

The possibility to use more MATLAB defined functions and to make your own custom
made functions.
For example, and also how it is done in the torque converter model is that lookup tables
are taken from the physical signal library. If the MATLAB lookup table could be
integrated as function in Simscape library no outgoing physical signals would be needed
for the Simscape block which would increase the flexibility with the tool and make themodels less cluttered.
How it is done today

Suggestion

equations
TI==Interpolate((wT/wI),Kvalues)*D^5*wI^2*p*sign(1-(wT/wI));

TT==-TI*Interpolate((wT/wI),
RTvalues);
end

47Less importantWhen building models (even the simplest ones) they often become unnecessary
cluttered. A common approach to reduce this problem is by using subsystems in order tobe able to visualize the complete models. For example to look at the angular velocity;
four different Simscape/Simulink components have to be used if they are not masked asa subsystem, where one component should be sufficient for this.
How it is done today

Suggestion

Boolean operators would further extend the object-oriented possibilities with the
Simscape language.



Better scope features without having to go the detour via MATLAB, such as:
o A scope that can look at Simscape physical signals directly, without the need of a
PS-Simulink converter blocko Export data other formatso Save scope data to a pictureo Compare data to another data source, simulationo Change the visual appearance (colors, fonts, titles etc.)

To be able to activate/deactivate a block. If two components should be tested one ofthem have to be deleted from the model before simulation start. If it could still exist in
the model but exist as passive element it would make the testing process more efficientand it would become easier to test different components and configurations.

48

9.1 Recommendations for future work
One interesting field to look closer into would be to build a more complex gearbox model. My
suggestion for extending the current ZF-ECOMAT 4-model would be the following:






A more realistic clutch model, with a more realistic friction dynamics.
A torque converter where fluid drag losses is included.
Gearbox dynamic such as friction (bearing and mesh), elasticity and backlash.
A more elastic driveline.
Model the hydraulic system in the gearbox, maybe the clutches can be actuated with ahydraulic pressure source.

Further interesting topics for deeper Simscape studies would be to extend the gearbox modelwith more driveline components models and mix different physical domains. Could a more
complete vehicle model match the reality better and what happens with the simulation time
when the model complexity increases?
One limitation of this thesis is also that each model component has not been separetely
validated against a reference. Further studies would need to validate each component
separately in a more accurate way, before merging them into a complete gearbox system.

49

10 Bibliography
Amazon.com. [online]. [Accessed 13 Oct 2010]. Available from World Wide Web:<http://www.amazon.com/Roger-Dean-Smith/e/B0032ONQEI/ref=ntt_dp_epwbk_0>
BERGLUND, Niklas. 2010.
BOSCH. 2000. Automotive Handbook 5th Edition. Stuttgart: Robert Bosch, GmbH.
BOSCH. 2007. Automotive Handbook 7th Edition. Germany: John Wiley & Sons Ltd.
Engineering Simulation Solutions for the automotive Industry. 2008. ANSYS.
European Automobile Industry Report. 2009-2010. European Automobile Manufacturers Association.
LJUNG, Lennart and Torkel GLAD. 2008. Modellbygge och simulering. Lund: Studentlitteratur.
Mathworks.com--Recorded Webinar: Physical Modeling with the Simscape Language. [online].
[Accessed 06 Oct 2010]. Available from World Wide Web:<http://www.mathworks.com/company/events/webinars/wbnr49772.html?id=49772&p1=72391451
4&p2=723914532>
MILLER, Steve. 2008. Modeling Physical Systems as Physical Networks with the Simscape Language.
The MathWorks.
Scania.se. [online]. [Accessed 18 Jan 2011]. Available from World Wide Web:<http://www.scania.se/om-scania/scaniakoncernen/>
Simscape™ 3 Language Guide. 2010. Natick: MathWorks.
Simscape™ 3 User’s Guide. 2010. Natick: MathWorks.
SMITH, Roger D. 2003. Simulation. In: Encyclopedia of Computer Science, 4th edition, Chichester, UK:
John Wiley and Sons Ltd, pp.1578 - 1587.
Wikipedia--Automatic_transmission. [online]. [Accessed 08 Oct 2010]. Available from World Wide
Web: <http://en.wikipedia.org/wiki/Automatic_transmission>
Wikipedia--Clutch. [online]. [Accessed 18 Oct 2010]. Available from World Wide Web:<http://en.wikipedia.org/wiki/Clutch>
Wikipedia--List_of_ZF_transmissions. [online]. [Accessed 30 Sep 2010]. Available from World Wide
Web: <http://en.wikipedia.org/wiki/List_of_ZF_transmissions>Wikipedia--Overdetermined_system. [online]. [Accessed 28 Jan 2011]. Available from World Wide
Web: <http://en.wikipedia.org/wiki/Overdetermined_system>
Wikipedia--Torque_converter. [online]. [Accessed 30 Sep 2010]. Available from World Wide Web:<http://en.wikipedia.org/wiki/Torque_converter>
Wikipedia--Transmission (mechanics). [online]. [Accessed 23 Sep 2010]. Available from World Wide
Web: <http://en.wikipedia.org/wiki/Transmission_(mechanics)>
50

WILLIS, Robert. 1870. Principles of Mechanism, Second Edition. London: Longmans, Green and Co.
ZACKRISSON, Tomas. 2003. Modeling and simulation of a driveline with an automatic gearbox.
ZF FRIEDRICHSHAFEN AG. 2006. Technical Manual ZF-ECOMAT 4. Germany: ZF Friedrichshafen AG ,
MC-C.

51

11 Appendix

11.1 Simscape MATLAB Supported Functions
Name
plus
uplus
minus
uminusmtimestimes
mpowerpower
mldivide
mrdivide
ldividerdivide
eq
ne
lt
gt
le
ge
and
or
sin
cos
tan
asin
acos
atan
atan2
log
log10
sinh
cosh
tanh
exp
sqrt

Restrictions

Discontinuous

Nonmatrix
denominator
Nonmatrix
denominator

Do not use with
continuous variables
Do not use with
continuous variables

Yes
Yes

For negative
numbers, calculated
as . For example,
sqrt(–1) = –1.

abs
logical
sign

Yes
Yes
Yes

52

11.2 Complete Simscape code
11.2.1 The Ideal Gear modelcomponent Ideal_gear% Ideal Gear Description
nodes
I = foundation.mechanical.rotational.rotational; % I:left
O = foundation.mechanical.rotational.rotational; % O:rightend
parameters
ratio = { 1, '1' }; % Min Gear ratio
endvariables
t_in = { 0, 'N*m' };t_out = { 0, 'N*m' };w = { 0, 'rad/s' };endfunction setup
through( t_in, I.t, [] );through( t_out, O.t, [] );across( w, I.w, O.w );% Parameter range checking
if ratio <= 0
pm_error( ‘Ratio value must be greater than zero’ );endendequations
I.w == ratio * O.w;t_out == -ratio * t_in;
end
end

11.2.2 The Clutch modelcomponent custom_clutch_test1% custom_clutch_test1
nodes
B = foundation.mechanical.rotational.rotational; % B:left
F = foundation.mechanical.rotational.rotational; % F:rightend
inputsP = { 0, 'Pa' }; % :left
end
variablest = { 0, 'N*m' };w = { 0, 'rad/s' };endparameters
R = { 0.1, 'm' }; % Radius
N = { 6, '1' }; % Number of friction surfaces
Uk = { 0.36, '1' }; % Kinetic friction constant
W_tol = { 0.03, 'rad/s' }; % Tolerance level for clutch locking
endparameters(Access=private)
A= { 0, 'm^2' };end

53

function setup
across( w, B.w, F.w );through( t, B.t, F.t);
A=pi*R^2*N;end
equations
if((w>=W_tol) || (w<=-W_tol))%Dynamic friction (SLIDING)

t==2/3*R*P*Uk*A*sign(w);else
t==2/3*R*P*Uk*A/W_tol*w;
end
end
end

11.2.3 The Torque Converter modelcomponent Torque_C% Torque_Cnodes
B = foundation.mechanical.rotational.rotational; % B:left
F = foundation.mechanical.rotational.rotational; % F:rightend
inputsK = { 0, '1' }; % K:left
Tr = { 0, '1' }; % Tr:left
end
outputs
Rw= { 0, '1' }; % Rw:rightend
variables
w = { 0, 'rad/s' };i = { 0, 'N*m' };t = { 0, 'N*m' };endparameters
W_min = { 0.03, 'rad/s' }; % Tolerance level for torque converter
D = { 0.3, 'm' }; % Circum diameter in m
p = { 870, 'kg/(m*m*m)' }; % Density of medium (870 kg/m^3 for hudraulic fluid)
endfunction setup
across( w, B.w, F.w );through( i, B.t, [] );through( t, F.t, [] );endequations
Rw==(F.w/B.w);
if ( ((B.w>=W_min) || (B.w<=-W_min) || (F.w>=W_min) || (F.w<=-W_min))54)

i==K*D^5*B.w^2*p*(1-(F.w/B.w));t==-i*Tr;else
i==K*D^5*W_min^2*p*(1-(F.w/B.w));t==-i*Tr;
end
end
end

11.2.4 The Planetary Gear modelcomponent plant_gear1% plant_gear1
nodes
C = foundation.mechanical.rotational.rotational; % C:rightR = foundation.mechanical.rotational.rotational; % R:left
S = foundation.mechanical.rotational.rotational; % S:leftendparameterssgratio = { 5, '1' }; % Gear ratio
endvariables
S_in = { 0, 'N*m' };C_in = { 0, 'N*m' };R_in = { 0, 'N*m' };endfunction setup
through( S_in, S.t, [] );through( C_in, C.t, [] );through( R_in, R.t, [] );% Parameter range checking
if sgratio == 0
pm_error('simscape:NotZero','Gear ratio')end
endequations%Overall kinematics(1+sgratio)*C.w==S.w+sgratio*R.w;%Torque balance
R_in==sgratio*S_in;
0==C_in+S_in+R_in;
end
end

55

11.3 Parameters setting used
11.3.1 Clutches
All clutches in the model have the same parameter settings and all clutch are actuated with ainput pressure signal
Parameter
RadiusNumber of friction surfaces
Kinetic friction constantTolerance level for clutch locking
Clutch pressure signal

Value
0.3
6
0.4
1e-3
45000

11.3.2 Torque Converter
Parameter
Circum diameter
Density of medium
Tolerance level for torque converter

Value
0.1
870
0.03

K-factor[45.3 45.2 45.2 45.4 45.5 46.2 47.7 50.8 56.1 60.7
70.0 93.7][1.982 1.894 1.804 1.692 1.571 1.440 1.303 1.159
1.000 0.995 0.995 0.995]

Torque ratio

11.3.3 RetarderParameter
Ratio
Percent
Engine friction

Value
1.6
0.8
0.1

Retarder ratio[2200 2200 2200 1700 1300 1000]

11.3.4 Planetary gears
11.3.4.1 Planetary Gear 1
Parameter
Ring/Sun ratio

Value
2.405

11.3.4.2 Planetary Gear 2
Parameter
Ring/Sun ratio

Value
2.439611.3.4.3 Planetary Gear 3
Parameter
Ring/Sun ratio

Value
2.43

11.3.5 Final gear
Parameter
Ratio

Value
6.2

56

11.3.6 Automatic Logic Program
Parameter
Up-shifting
Down-shifting
After

Value
150
110
0.5

11.3.7 Air dragParameter
Air drag coefficient
Cross section area
Air density

Value
0.65
10
1.225

11.3.8 Rolling resistanceParameter
Rolling resistance coefficient 1
Rolling resistance coefficient 1
Mass

Value
50
0.2
11440

11.3.9 Other parameters
Parameter
Tire Radius
Vehicle Effective Inertia
Engine Inertia
Impeller Inertia
Turbine Inertia
Gearbox Inertias
Propeller shaft Inertia

Value
0.507
2462
4
1.74
1.12
1.5e-31

57

11.4 Torque output on propeller shaft

Validation Gearbox
14000

12000

10000

Torque
[Nm]

8000

6000

4000

2000

0

0

5

10

15

20

25

30

35

Time
[s]

The figure above illustrates the torque output on propeller shaft. The first peak represents thetorque transferred during torque converter when the lock-up clutch is activated. The remaining
peaks represent the torque transferred during each gear shift. Each peak lasts approximately
between 0.05 – 0.1s.

58

11.5 The final validation concept59