27-11-2012, 01:03 PM
Using Simulink and StateflowTM in Automotive Applications
Using Simulink.pdf (Size: 736.28 KB / Downloads: 75)
Abstract
This book includes nine examples that represent typical design tasks of an automotive engineer. It
shows how The MathWorks modeling and simulation tools, Simulink® and Stateflow,TM facilitate
the design of automotive control systems. Each example explains the principles of the physical situation,
and presents the equations that represent the system. The examples show how to proceed
from the physical equations to the Simulink block diagram. Once the Simulink model has been
completed, we run the simulation, analyze the results, and draw conclusions from the study.
INTRODUCTION
Automotive engineers have found simulation to be a vital tool in the timely and cost-effective
development of advanced control systems. As a design tool, Simulink has become the standard for
excellence through its flexible and accurate modeling and simulation capabilities. As a result of its open
architecture, Simulink allows engineers to create custom block libraries so they can leverage each other’s
work. By sharing a common set of tools and libraries, engineers can work together effectively within
individual work groups and throughout the entire engineering department.
In addition to the efficiencies achieved by Simulink, the design process can also benefit from Stateflow, an
interactive design tool that enables the modeling and simulation of complex reactive systems. Tightly
integrated with Simulink, Stateflow allows engineers to design embedded control systems by giving them
an efficient graphical technique to incorporate complex control and supervisory logic within their
Simulink models.
Overview
This example describes the concepts and details surrounding the creation of engine models with emphasis
on important Simulink modeling techniques. The basic model uses the enhanced capabilities of
Simulink 2 to capture time-based events with high fidelity. Within this simulation, a triggered
subsystem models the transfer of the air-fuel mixture from the intake manifold to the cylinders via
discrete valve events. This takes place concurrently with the continuous-time processes of intake flow,
torque generation and acceleration. A second model adds an additional triggered subsystem that provides
closed-loop engine speed control via a throttle actuator.
These models can be used as standalone engine simulations. Or, they can be used within a larger system
model, such as an integrated vehicle and powertrain simulation, in the development of a traction control
system.
Analysis THROTTLE
and Physics The first element of the simulation is the throttle body. Here, the control input is the angle of the throttle
plate. The rate at which the model introduces air into the intake manifold can be expressed as the product
of two functions—one, an empirical function of the throttle plate angle only; and the other, a function of
the atmospheric and manifold pressures. In cases of lower manifold pressure (greater vacuum), the flow
rate through the throttle body is sonic and is only a function of the throttle angle. This model accounts for this low pressure behavior with a switching condition in the compressibility equations shown in
Equation 1.1.
Intake Manifold
The simulation models the intake manifold as a differential equation for the manifold pressure. The
difference in the incoming and outgoing mass flow rates represents the net rate of change of air mass with
respect to time. This quantity, according to the ideal gas law, is proportional to the time derivative of the
manifold pressure. Note that, unlike the model of Crossley and Cook, 1991(1) (see also references 3
through 5), this model doesn’t incorporate exhaust gas recirculation (EGR), although this can easily be
added.
Modeling
We incorporated the model elements described above into an engine model using Simulink. The
The Open-Loop following sections describe the decisions we made for this implementation and the key Simulink elements
Simulation used. This section shows how to implement a complex nonlinear engine model easily and quickly in the
Simulink environment. We developed this model in conjunction with Ken Butts, Ford Motor Company (2).
Figure 1.1 shows the top level of the Simulink model. Note that, in general, the major blocks correspond
to the high-level list of functions given in the model description in the preceding summary. Taking
advantage of Simulink’s hierarchical modeling capabilities, most of the blocks in Figure 1.1 are made up
of smaller blocks. The following paragraphs describe these smaller blocks.