Documente Academic
Documente Profesional
Documente Cultură
rd
of the 3 International Modelica Conference,
Linköping, November 3-4, 2003,
Peter Fritzson (editor)
Paper presented at the 3rd International Modelica Conference, November 3-4, 2003,
Linköpings Universitet, Linköping, Sweden, organized by The Modelica Association
and Institutionen för datavetenskap, Linköpings universitet
Program Committee
Peter Fritzson, PELAB, Department of Computer and Information Science,
Linköping University, Sweden (Chairman of the committee).
Bernhard Bachmann, Fachhochschule Bielefeld, Bielefeld, Germany.
Hilding Elmqvist, Dynasim AB, Sweden.
Martin Otter, Institute of Robotics and Mechatronics at DLR Research Center,
Oberpfaffenhofen, Germany.
Michael Tiller, Ford Motor Company, Dearborn, USA.
Hubertus Tummescheit, UTRC, Hartford, USA, and PELAB, Department of
Computer and Information Science, Linköping University, Sweden.
2.1 Physical Subsystems for all purely electrical components, the electrical
system is also the source of electrical power for
The first category we will be discussing every other physical subsystem in the vehicle and,
includes all the physical subsystems in the vehicle. as such, is subject to "external" influences that may
This section will provide some discussion for each charge or deplete the battery (e.g. alternator,
physical subsystem and some explanation of what is regenerative braking).
contained within each subsystem. The order of the
subsystems corresponds, roughly, to the order that 2.1.3 Powerplant
they appear (from left to right) in Figure 1. The powerplant subsystem represents the
Note that each physical subsystem is connected primary source of motive torque for the vehicle.
to a subsystem controller. We will defer the Typically, this would be an internal combustion
discussion of this connection until Section 2.2.3 and engine although it could also be, for example, an
instead focus, for now, on the physical connections electric motor. Like the battery, the powerplant
associated with each subsystem. model provides power to the rest of the vehicle. As
such, there are physical connections from the
powerplant to the accessories and the transmission.
The powerplant is also connected to the
electrical subsystem. Although the electrical
influence of an internal combustion engine is
normally quite small (e.g. spark plug energy, etc), if
the powerplant were an electric motor, the
connection to the electrical system would become
quite important. In the case of hybrid electric
vehicles, additional electrical components, such as
electric motors, may be included in the powerplant
or they may be lumped into the transmission
(depending on the powertrain topology).
The physical connection between the driver and
the powerplant includes a signal representing the
physical position of the accelerator pedal.
Typically, this signal is translated directly into a
throttle position. However, in "drive by wire"
applications, it is assumed that the pedal position
Figure 1: Vehicle Model Architecture sensor would be associated with the powerplant
subsystem and that sensor information would be
2.1.1 Accessories relayed to the powerplant subsystem controller
The accessory subsystem is composed of those and/or vehicle controller where, for example, the
components typically connected to the front end commanded throttle position (or motive torque, in
accessory drive (FEAD) of an engine. Examples of the case of an electric vehicle) would be calculated
such components would include an alternator or AC and returned as an actuator command.
compressor. As shown in Figure 1, the accessories Finally, Figure 1 shows that the powerplant has
are connected to the front side of the powerplant. a third mechanical connection. This connection is
As a result, any torque required by these to the powertrain mounts and accounts for reaction
components will be taken from the powerplant. The torque to the powertrain mount system.
accessories are also connected to the electrical
subsystem and they typically represent a significant 2.1.4 Transmission
influence on the charging and discharging of the The transmission subsystem represents any
electrical system. "gearing" done to deliver power from the
powerplant to the wheels. One side of the
2.1.2 Electrical transmission is connected to the powerplant while
The electrical subsystem is composed of the the other side is connected to the driveline. Any
various purely electrical components in the vehicle. hydraulic function associated with the transmission
Typical examples would include the battery, radio is assumed to be encapsulated within the
and/or headlights. In addition to being the location transmission subsystem.
motive torque is delivered from the internal For each case, the subsystem controller must have
combustion engine versus how much is delivered by the appropriate architecture to deal with the varying
electric motors in a hybrid electric vehicle). sets of sensors and actuators in each case. As a
In order to function, a vehicle system controller result, the set of signals exchanged between the
(if present, not all vehicles implement one) must controller and its physical counterpart must be
communicate with each of the subsystem controllers customizable on a per configuration basis.
on the vehicle. In an actual vehicle, this kind of In a similar way, the information exchanged
communication would be done through a vehicle between the vehicle system controller and each of
level communication bus (e.g. a Controller Area the subsystem controllers will also depend on
Network, or CAN, bus). Although the behavior of whether a vehicle system controller is present and, if
the bus itself can have a significant impact on so, what features are implemented at the system
overall vehicle performance, modeling of the bus is level.
not currently within the scope of this architecture.
the reusability of components that results from this 3.3 Subsystem Configuration Options
acausal approach, the use of inheritance, subtype
constraints and the ability to declare replaceable As mentioned in Section 2.2.3, the set of signals
components and subsystems is often useful in communicated on each bus depends on the specific
practice for large scale modeling projects. In this set of features implemented in each subsystem. To
section, we will discuss how these features allow us address this issue, our architecture contains a set of
to satisfy important requirements for our vehicle replaceable packages that are used to propagate
model architecture. specific definitions for connectors and/or records
that are configuration specific.
For example, the powerplant configuration
3.2 Replaceable Subsystems and package includes a definition for the connector used
Controllers to communicate information between the physical
powerplant and the powerplant subsystem
The cornerstone of configuration
controller. That definition, in turn, can be
management in Modelica is the ability to declare
customized (using replaceable type definitions) to
types and components as replaceable. In fact,
specify what kind of information is required for
all the physical subsystems, controllers and external each control feature. In this way, the fact that a
influence components shown in Figure 1 are particular powerplant has, for example, a dual
declared replaceable so that alternative independent cam phasing feature can be stated as a
configurations can be easily created. Furthermore, configuration option which then automatically adds
constraining types are also defined for each of these the necessary signals to the connectors used on both
components to prevent inappropriate substitutions the physical powerplant and the powerplant
from being made. controller. In other words, for any given vehicle
One problem with making each component model there is a single top-level configuration
replaceable is that it leaves open the possibility option for each subsystem that ensures consistent
that novice users will attempt to pair plant and bus definitions throughout the vehicle model.
controller models together that are not compatible This is essentially the same idiom, utilizing
with each other (e.g. the controller expects an replaceable packages, that is sometimes used to
automatic transmission but the actual transmission model different media in fluid modeling
plant is a manual transmission). So, in addition to applications [14].
making each component in Figure 1
replaceable, the set of models associated with
each subsystem (i.e. the plant, local controller bus 3.4 Common Environment
signals, local controller and global bus signals) are
The ambient environment in this architecture
grouped together (using replaceable packages) so
contains information that is potentially relevant to
that entire subsystem configurations can be changed
every subsystem. Since the environment is a model
in a single operation. This allows users to select
(potentially with its own equations and states), it
from pre-packaged, consistent and compatible
isn't possible to propagate the environment
collections of these models that can be changed in a
component through the vehicle hierarchy. Instead,
single operation.
an inner qualifier is used to make the information
Ultimately, vehicle level models will extend
available to other components in the hierarchy.
from the template shown in Figure 1 and then use
redeclarations (as class modifications) to create each
specific vehicle configuration. Furthermore, 3.5 Documentation
alternative vehicle configurations can then extend
from each other ad infinitum to create many The ability to embed documentation about a
different variations on a baseline design. This package, subsystem, connector, etc. into its
approach allows users to easily control definition has already been utilized in this package
configuration options while at the same time to provide model developers with a useful online
maximizing reuse. In turn, this minimizes reference for the various interface definitions as well
redundant code and/or configuration options across as HTML versions of the same information which
different configurations which greatly eases can be posted, for example, on a corporate intranet
maintenance of the models. site for reference.
(a)
(a)
(b)
Figure 2: (a) Powerplant Interface; (b) Sample Engine
4.1 Engine
The engine model used in this example (b)
includes simple "filling and emptying" dynamics for Figure 3: (a) Transmission Interface; (b) Sample
the engine manifold and uses a table to lookup Transmission
1 4
0 3
0 2.5 5 7.5 10
2
...ission_bus.clutch_control.engage_clutch[2]
1
1
0
0 1400 1600 1800 2000 2200
0 2.5 5 7.5 10 Figure 8: Gear Selection vs. Engine RPM
...ission_bus.clutch_control.engage_clutch[3] This section demonstrates just a few of the
1
possible results that a vehicle level analysis can
0 uncover. Having a standardized set of interfaces not
0 2.5 5 7.5 10
only makes the exchange of models easier, it also
assures, to some degree, that signals will have
...ission_bus.clutch_control.engage_band[1] common names (at least those associated with the
1 provided interfaces).
0
...mission_control.shift_schedule.gear.signal[
6 1] 5.1 Handling User Choices
4
5.1.1 Link Choices to Component Icons
First, it should be possible to select a component
in a vehicle model and browse a set of compatible
2
alternative components. In other words, the set of
alternatives should be easily accessible from the
0 graphical icon associated with that component
0 2.5 5 7.5 10
rather than requiring users to find components in,
Time [sec] for example, the component browser (which
Figure 7: Gear Selection requires knowledge of what classes the components
were inherited from).
5.1.2 Consistent Handling of Choices a tree should show, in a single comprehensive view,
For complex "template" models (i.e. models that choices that influence topological changes (e.g.
are designed so that end users can merely "fill in the what transmission model is used) as well as
blanks"), it is important that users be presented with parameters.
a complete view of the model including all
redeclarations/customizations they have made. 5.2.2 Visualizing Configurations
Redeclarations can affect many different "visual" Another issue with template models is the
aspects of the model including its inheritance, its proliferation of variations. It should be possible to
component hierarchy, the parameter dialogs, visualize in a coherent way the modifications
graphical appearance, results structure, associated associated with a "tree" of configurations (in this
scripts, etc. It is important for tools to make sure case, a tree based on the inheritance hierarchy as
that all of these possibilities are always consistent opposed to the tree discussed in Section 5.2.1 which
with the choices made by the end user when is based on the compositional hierarchy).
customizing the models.
When interface definitions are influenced by
top-level choices (e.g. the physical powerplant 6 Limitations
interface is altered by the choices made in the top While Modelica provides some powerful
level powerplant configuration package), this should features to support the architecture described in this
influence the set of possibilities generated with the paper, there are still some areas where the existing
choicesAllMatching annotation in the features are still not sufficient. In this section, we
models. For example, if the top-level configuration will discuss some of the limitations we encountered
specifies a powerplant with dual independent cam and some ideas for overcoming those limitations.
phasing, the set of choices generated when As described in Section 3.3, we have chosen to
redeclaring the powerplant should only include propagate configuration information from the top
powerplant models that can satisfy that interface. down. In other words, decisions about connector
definitions are made at the top level and then
5.1.3 Carryover and Memory of Choices propagated to subsystems. This is awkward because
While exploring alternatives, graphical tools it is often unnatural for this information to either
should perpetuate user modifications for identical appear or originate at the vehicle level. For
parameters and/or choices when possible and, when example, information about signals exchanged
not possible, remember those modifications in case between the powerplant and the powerplant
the same options reappear. For example, if a user controller is really determined by the set of sensors
configures a model to use one particular 5 speed and actuators present on the powerplant itself but we
transmission model and then switches to a different were not able to find a way of expressing this in
5 speed transmission model, it should be possible to Modelica.
carryover any common parameters (e.g. gear ratios) Along similar lines, the set of signals
or choices (e.g. torque converter model) between communicated on the vehicle control bus should be
the two alternatives. In addition, if they explore the the union of all signals broadcast from each
idea of a continuously variable transmission (CVT), subsystem controller. From a user perspective, it
the tool should remember the gear ratio settings if would be best to simply choose the controller and
they decide to revert back to a 5 speed transmission. physical subsystem and have the information about
broadcast messages "propagate up" automatically to
5.2 Visualization the vehicle level controller bus.
In the current design, the subsystem bus
5.2.1 Decision Tree Visualization connector on the physical subsystems is always
declared inner. This is done to allow the use of
With a template model as complicated as the
the SignalBus idiom [8] which allows sensors
one shown in Figure 1, the options and possibilities
and actuators to reference only the specific signals
open to the end user can be quite disorienting. For
they require (as opposed to all signals
these kinds of models, it would be very useful to
communicated in that subsystem). Unfortunately,
have a compact representation of the tree of possible
the relationship between the bus connector and these
choices open to the user. Such a tree would need to
sensors and actuators is not explicit because it relies
be hierarchical and each decision that is made
on using inner and outer qualifiers. A better
should be reflected in the tree (i.e. the tree should
respond dynamically to user choices). Ideally, such solution would be to allow direct connections.
Unfortunately, the current Modelica specification Burchill, Peter Bennet, David Copp and Nick
requires each connector to contain exactly the same Darnton, to develop a vehicle model architecture for
signals. By relaxing this requirement and, for Simulink [5]. This work leverages a great deal from
example, allowing one connector to be a subtype of the system decomposition and thorough analysis
the other, such connections would be possible and, that was done as part of that work. As a result, the
as a result, clearer. authors would like to recognize the significant
One of the biggest problems in developing such influence and impact that work had on the material
a framework is how to represent the fundamental in this paper.
engineering assumptions present. For example, the The authors would also like to thank John
powertrain mounts might be represented as either Batteh, Chuck Newman, Erik Surewaard, Graham
1D or 3D connections. Likewise, the electrical King, Johan Andreasson, Christian Schweiger,
system may support multiple voltage levels. Several Martin Otter, Jonas Hellgren, Jonas Karlsson, Jonas
subsystem models can be impacted by these choices Fredriksson, Bengt Jacobson and Lars Eriksson for
and there is no easy way of understanding what their work in developing automotive component and
assumptions are made for particular models and subsystem models which we hope will, at some
how that affects the assembly and compatibility at point, be compatible and freely exchangeable
the vehicle level. Rather than relying on complex through this architecture.
nested replaceable type definitions and interfaces,
the entire process might be more coherently
represented with features (e.g. layers) that provide 9 References
configuration based on a fixed set of possibilities. 1. J. Andreasson, A. Möller and M. Otter,
"Modeling of a Racing Car with Modelica's
7 Future Work Multi-Body Library", Modelica Workshop 2000
Proceedings,
It is important to reiterate that the structure http://www.modelica.org/workshop2000/procee
defined in this document is merely a proposal and dings/Andreasson.pdf
that further discussion is required. Once a 2. M. Otter, M. Dempsey and C. Schlegel,
consensus is reached on the appropriate subsystem "Package PowerTrain. A Modelica library for
decomposition and interface definitions, there are modeling and simulation of vehicle power
several potential directions for this work. For trains", Modelica Workshop 2000 Proceedings,
example, it might be useful to extend the depth of p. 23-32,
the current hierarchy to define architectures for each http://www.modelica.org/workshop2000/procee
of the various subsystems. For example, powerplant dings/Otter.pdf
templates could be developed for internal 3. P. Treffinger and M. Goedecke, "Development
combustion engines (e.g. I-4 or V-6 cylinder of Fuel Cell Powered Drive Trains With
configurations) and transmission templates could be Modelica", Proceedings of the 2nd Modelica
developed that decompose automatic transmissions Conference, p.125-131,
into individual models for a torque converter, http://www.modelica.org/Conference2002/paper
bypass clutch and gearbox (with interface s/p16_Treffinger.pdf
definitions for each). Finally, other top-level 4. J. Hellgren, "Modelling of Hybrid Electric
architectures could be developed that reuse the Vehicles in Modelica for Virtual Prototyping",
subsystem interface definitions. These architectures Proceedings of the 2nd Modelica Conference, p.
may choose to use a subset of the subsystems shown 247-256,
in Figure 1 (e.g. an engine connected to a http://www.modelica.org/Conference2002/paper
dynamometer) or they may choose to add additional s/p32_Hellgren.pdf
subsystems for more exotic vehicle configurations 5. C. Belton, P. Bennet, P. Burchill, D. Copp, N.
(for towing applications, fuel cell vehicles, etc). Darnton, K. Butts, J. Che, B. Hieb, M. Jennings
and T. Mortimer, "A Vehicle Model
Architecture for Vehicle System Control
8 Acknowledgments Design", SAE Congress 2003, SAE-2003-01-
The architecture presented in this paper is 0092.
heavily based on a Ford Motor Company internal 6. "Dymola 5.0 User's Manual", Dynasim AB, p.
initiative, by Mark Jennings, Judy Che, Bradley 206.
Hieb, Tim Mortimer, Ken Butts, Chris Belton, Pete