which is a convenient way to specify the piston s position. In the simplest case, when φ

Similar documents
Feedback-error control

Chapter 1 Fundamentals

University of North Carolina-Charlotte Department of Electrical and Computer Engineering ECGR 4143/5195 Electrical Machinery Fall 2009

PRELIMINARY SELECTION OF BASIC PARAMETERS OF DIFFERENT TORSIONAL VIBRATION DAMPERS INTENDED FOR USE IN MEDIUM-SPEED DIESEL ENGINES

Radar Dish. Armature controlled dc motor. Inside. θ r input. Outside. θ D output. θ m. Gearbox. Control Transmitter. Control. θ D.

Modelling a Partly Filled Road Tanker during an Emergency Braking

Position Control of Induction Motors by Exact Feedback Linearization *

Prediction of the Excitation Force Based on the Dynamic Analysis for Flexible Model of a Powertrain

02. Equilibrium Thermodynamics II: Engines

High speed wind tunnels 2.0 Definition of high speed. 2.1 Types of high speed wind tunnels

RUN-TO-RUN CONTROL AND PERFORMANCE MONITORING OF OVERLAY IN SEMICONDUCTOR MANUFACTURING. 3 Department of Chemical Engineering

A New Method for Simultaneous Determination of the TDC Offset and the Pressure Offset in Fired Cylinders of an Internal Combustion Engine

Churilova Maria Saint-Petersburg State Polytechnical University Department of Applied Mathematics

5 Diagnosis of diesel engines

MODELING THE RELIABILITY OF C4ISR SYSTEMS HARDWARE/SOFTWARE COMPONENTS USING AN IMPROVED MARKOV MODEL

ANALYTICAL MODEL FOR THE BYPASS VALVE IN A LOOP HEAT PIPE

Characterizing the Behavior of a Probabilistic CMOS Switch Through Analytical Models and Its Verification Through Simulations

Chapter 9 Practical cycles

Oil Temperature Control System PID Controller Algorithm Analysis Research on Sliding Gear Reducer

FLOW RATE CONTROL OF VARIABLE DISPLACEMENT PISTON PUMP USING GENETIC ALGORITHM TECHNIQUE

Design of NARMA L-2 Control of Nonlinear Inverted Pendulum

The Numerical Simulation of Gas Turbine Inlet-Volute Flow Field

Continuous Steel Casting System Components

Keywords: pile, liquefaction, lateral spreading, analysis ABSTRACT

arxiv: v1 [physics.data-an] 26 Oct 2012

AN EVALUATION OF A SIMPLE DYNAMICAL MODEL FOR IMPACTS BETWEEN RIGID OBJECTS

NUMERICAL AND THEORETICAL INVESTIGATIONS ON DETONATION- INERT CONFINEMENT INTERACTIONS

16. CHARACTERISTICS OF SHOCK-WAVE UNDER LORENTZ FORCE AND ENERGY EXCHANGE

Uncorrelated Multilinear Principal Component Analysis for Unsupervised Multilinear Subspace Learning

TORSIONAL VIBRATION SUPPRESSION IN AUTOMATIC TRANSMISSION POWERTRAIN USING CENTRIFUGAL PEN- DULUM VIBRATION ABSORBER

MODELING AND SIMULATION OF A SATELLITE PROPULSION SUBSYSTEM BY PHYSICAL AND SIGNAL FLOWS. Leonardo Leite Oliva. Marcelo Lopes de Oliveira e Souza

A Finite Element Analysis on the Modeling of Heat Release Rate, as Assessed by a Cone Calorimeter, of Char Forming Polycarbonate

Paper C Exact Volume Balance Versus Exact Mass Balance in Compositional Reservoir Simulation

Compressible Flow Introduction. Afshin J. Ghajar

MODELING OF THE DYNAMIC RESPONSE OF A FRANCIS TURBINE

Statics and dynamics: some elementary concepts

Multivariable Generalized Predictive Scheme for Gas Turbine Control in Combined Cycle Power Plant

An Improved Calibration Method for a Chopped Pyrgeometer

The extreme case of the anisothermal calorimeter when there is no heat exchange is the adiabatic calorimeter.

Indirect Rotor Field Orientation Vector Control for Induction Motor Drives in the Absence of Current Sensors

KEY ISSUES IN THE ANALYSIS OF PILES IN LIQUEFYING SOILS

Evaluating Circuit Reliability Under Probabilistic Gate-Level Fault Models

Hotelling s Two- Sample T 2

dn i where we have used the Gibbs equation for the Gibbs energy and the definition of chemical potential

MODEL-BASED MULTIPLE FAULT DETECTION AND ISOLATION FOR NONLINEAR SYSTEMS

Week 8 lectures. ρ t +u ρ+ρ u = 0. where µ and λ are viscosity and second viscosity coefficients, respectively and S is the strain tensor:

Development of self-adaptively loading for planetary roller traction-drive transmission

Actual exergy intake to perform the same task

State Estimation with ARMarkov Models

THE FIRST LAW OF THERMODYNAMICS

MODULAR LINEAR TRANSVERSE FLUX RELUCTANCE MOTORS

Heat Transfer Analysis in the Cylinder of Reciprocating Compressor

A Qualitative Event-based Approach to Multiple Fault Diagnosis in Continuous Systems using Structural Model Decomposition

A SIMPLE PLASTICITY MODEL FOR PREDICTING TRANSVERSE COMPOSITE RESPONSE AND FAILURE

ADAPTIVE CONTROL METHODS FOR EXCITED SYSTEMS

I Poles & zeros. I First-order systems. I Second-order systems. I E ect of additional poles. I E ect of zeros. I E ect of nonlinearities

Speed of sound measurements in liquid Methane at cryogenic temperature and for pressure up to 10 MPa

Chapter 2 Introductory Concepts of Wave Propagation Analysis in Structures

THE 3-DOF helicopter system is a benchmark laboratory

FINITE TIME THERMODYNAMIC MODELING AND ANALYSIS FOR AN IRREVERSIBLE ATKINSON CYCLE. By Yanlin GE, Lingen CHEN, and Fengrui SUN

HEAT, WORK, AND THE FIRST LAW OF THERMODYNAMICS

22 ELECTROMAGNETIC INDUCTION

SIMULATED ANNEALING AND JOINT MANUFACTURING BATCH-SIZING. Ruhul SARKER. Xin YAO

On Line Parameter Estimation of Electric Systems using the Bacterial Foraging Algorithm

Magnetostrictive Dynamic Vibration Absorber (DVA) for Passive and Active Damping

PV/T = k or PV = kt Describe the difference between an ideal gas and a real gas.

Methods for detecting fatigue cracks in gears

Introduction to MVC. least common denominator of all non-identical-zero minors of all order of G(s). Example: The minor of order 2: 1 2 ( s 1)

THERMODYNAMICS. Prepared by Sibaprasad Maity Asst. Prof. in Chemistry For any queries contact at

Homogeneous and Inhomogeneous Model for Flow and Heat Transfer in Porous Materials as High Temperature Solar Air Receivers

Journal of System Design and Dynamics

COMPUTER SIMULATION OF A LABORATORY HYDRAULIC SYSTEM WITH MATLAB-SIMULINK

Uncorrelated Multilinear Discriminant Analysis with Regularization and Aggregation for Tensor Object Recognition

A Simple Fuzzy PI Control of Dual-Motor Driving Servo System

4. Score normalization technical details We now discuss the technical details of the score normalization method.

Preliminary Uncertainty Estimation of the Pressure Distortion Coefficient of a Pressure. Balance by FEM Calculations

OPTIMAL DESIGN AND OPERATION OF HELIUM REFRIGERATION SYSTEMS USING THE GANNI CYCLE

Multi-Operation Multi-Machine Scheduling

Optical Fibres - Dispersion Part 1

Radial Basis Function Networks: Algorithms

Wolfgang POESSNECKER and Ulrich GROSS*

An Investigation on the Numerical Ill-conditioning of Hybrid State Estimators

VIBRATION ANALYSIS OF BEAMS WITH MULTIPLE CONSTRAINED LAYER DAMPING PATCHES

Finite Element Solutions for Geotechnical Engineering

OPTIMAL PATHS OF PISTON MOTION OF IRREVERSIBLE DIESEL CYCLE FOR MINIMUM ENTROPY GENERATION. By Yanlin GE, Lingen CHEN *, and Fengrui SUN

Computer arithmetic. Intensive Computation. Annalisa Massini 2017/2018

On Using FASTEM2 for the Special Sensor Microwave Imager (SSM/I) March 15, Godelieve Deblonde Meteorological Service of Canada

AI*IA 2003 Fusion of Multiple Pattern Classifiers PART III

PROCESSING OF LOW-VISCOSITY CBT THERMOPLASTIC COMPOSITES: HEAT TRANSFER ANALYSIS

OPTIMIZATION OF EARTH FLIGHT TEST TRAJECTORIES TO QUALIFY PARACHUTES FOR USE ON MARS

Buckling of Spherical Shells Revisited. John W. Hutchinson. School of Engineering and Applied Sciences, Harvard University.

The Noise Power Ratio - Theory and ADC Testing

ANALYSIS OF ULTRA LOW CYCLE FATIGUE PROBLEMS WITH THE BARCELONA PLASTIC DAMAGE MODEL

Modeling and Estimation of Full-Chip Leakage Current Considering Within-Die Correlation

Setting up the Mathematical Model Review of Heat & Material Balances

A PARTICLE SWARM OPTIMIZATION APPROACH FOR TUNING OF SISO PID CONTROL LOOPS NELENDRAN PILLAY

Uncertainty Modeling with Interval Type-2 Fuzzy Logic Systems in Mobile Robotics

Visualizing Free and Forced Harmonic Oscillations using Maple V R5*

Simulation of 3-Phase 2- Stator Induction Motor Using MATLAB Platform

Using Gamma-Ray to Determine the Homogeneity of Some Building Materials

Transcription:

Abstract The alicability of the comonent-based design aroach to the design of internal combustion engines is demonstrated by develoing a simlified model of such an engine under automatic seed control, in the Ptolemy environment. A key feature of such a model is its modular construction, which allows sub-models of different kinds to be connected together to form a realistic reresentation of this comlex device. It also allows the individual modules to be "changed out" with others that are more or less refined, deending on the requirements of the task at hand. Finally, such a model rovides a framework in which the different engineering discilines involved can contribute in an effective and Proosed Aroach/Method This roject focuses on the develoment of a hybrid model of an engine that can rovide information on the engine s state at any instant. In order to accomlish this we'll take advantage of the hybrid systems and concurrent comuting theory that has come of age in the last 10-15 years, as imlemented on Ptolemy. This rovides a much more convenient environment in which to construct such models than the traditional comuting environment. A rich and extensive literature has already been develoed on the engine-modeling roblem, and a bibliograhy of some of the more ertinent articles is given at the end of this reort. Here we borrow and modify the results of several of these articles ([4], [7], [9], [14], [15], and [3]), to develo and imlement our own model in the Ptolemy environment. Since the goal here is to demonstrate the method, the analytical sub-models used are ket relatively simle. They are still comlex enough, though, to give realistic results and also to demonstrate the model's and Ptolemy's robustness. The Four Stroke Cycle and Piston Position Figure 1 describes the thermodynamic cycle that a four-stroke sark ignition engine undergoes. The cycle consists of four strokes of the iston (intake, comression, combustion/exansion, and exhaust), each taking a half revolution of the crankshaft, and each beginning and ending at either the iston s to dead center (TDC) or Bottom Dead Center (BDC) osition (its highest or lowest osition). It thus takes two revolutions of the crankshaft (70 ) to comlete one cycle. If the vehicle is moving forward (which we assume throughout), its crankshaft angular velocity, ω cs, will be ositive and its angular osition φ cs will simly be the integral of ω cs, a monotonically increasing function in time. φ cs modulo 70 will then be a saw tooth waveform that increases from zero to 70 (an examle, to be discussed later, is shown in Figure b.) The cylinder delivers a ositive torque in only one of these strokes the exansion stroke. In all of the others it requires torque. The torque outut of a cylinder is thus quite variable and fluctuates between ositive and negative values. A real engine consists of more than one cylinder, and these are offset on the crankshaft with resect to one another to smooth out the engine s overall outut. Figure indicates how this offset angle φ co is defined ositive when the iston is offset counterclockwise from φ cs = 0 and negative when it is offset clockwise from it. The iston angle φ is then defined as φ φcs φco 180 φco + 180, (1) which is a convenient way to secify the iston s osition. In the simlest case, when φ co = 0, 0 φ =φ 70 and iston osition is secified according to the convention cs 0 φ 180 Intake, 180 < φ 360 Comression, 360 < φ 540 Exansion, 540 < φ 70 Exhaust. ()

The Four-Stroke Cycle Figure 1 1 φ co > 0 φ cs = 0 φ co < 0 The Piston Offset Angle φ co Figure 1 Figure taken from Internal Combustion Engines, by E. F. Obert, International Textbooks, 1968,. 3. Figure taken from Thermodynamics: An Engineering Aroach, by Y. A. Çengel & M. A. Boles, McGraw-Hill, 1994,. 15. 1

The more general case is a little more comlicated and is resented in Table 1. Stroke Intake Comression Exansion φ < 0 co φ = 0 co φ > 0 ( φco φ 70 + φ co ) ( 0 φ 70) ( φco φ 70 φco ) 70 < φ 70 + φco φ φ 180 co 0 φ 180 0 φ 180 180<φ 360 180< φ 360 180< φ 360 360<φ 540 360< φ 540 360< φ 540 co Exhaust 540<φ 70 540< φ 70 540 < φ 70 φ φ φ < 0 co co Stroke as a function of φ co and φ Table 1 Engine/Controller Block Diagram We will model the engine/controller according to the block diagram shown in Figure 3. For simlicity we assume an engine with a single cylinder. The rocess begins with the human driver shown at the far left in the figure. The driver commands the engine to rovide a certain vehicle seed, and he does this with the accelerator edal. Of course, we don t inut a numerical value of seed to the controller when we drive, instead, we sense whether or not we re going at the desired seed and indicate more seed (deress the accelerator edal) or less seed (let u on it) if we re not. The controller thus receives and error signal from the driver, telling it (ultimately) how much torque to deliver to the drive train. This isn t the only objective the controller must satisfy, however. It must also deliver the requested torque in such a way as to minimize vehicle emissions and fuel consumtion, and assenger discomfort due to inordinately high acceleration eaks due to the dynamic resonse of the overall system. For this urose it also receives information concerning the vehicle s seed and the comosition of the exhaust gases. The three command signals that the controller uses to accomlish these objectives are the cylinder sark advance φ s, the fuel injector timing T i, and the air inlet throttle valve angle α. Each of these will be described and discussed in greater detail below. The torque outut ω cs ω cs,des + Human - Driver e Sensors and Embedded Controller α des T i Throttle Valve φ s α Fuel Injector Intake Manifold m f m a φ co Cylinder(s) T C + - Exhaust Gases T DL T L Drive Train φ cs ω cs Engine/Controller Block Diagram Figure 3

of the cylinder T C is reduced by any load torque T L that may be resent. T L reresents vehicle loads other than that reresented by the mass of the emty vehicle, occuied only by the driver, and traveling along a level surface. It can thus reresent other assengers, luggage, a trailer, an uhill (or downhill, which constitutes a negative load torque) stretch of road, wind gusts, bums, and the like. It can also have a random comonent. The net torque T DL is then inut to the drive train, which roduces a crankshaft seed (and osition) as a result. These are then fed back to the various ustream comonents of the system. We now consider each of these comonents in turn. Sensors and Embedded Controller The embedded controller receives signals concerning desired seed, actual seed, and exhaust gas comosition through sensors, as indicated in Figure 4. The sensors and various engine comonents are all continuous time devices, but the controller a digital microrocessor is tyically a discrete time device. For this reason the continuous signals from the sensors must first be converted to discrete signals via a samler or event generator. Each event generator samles with some samling eriod t i, as indicated in the figure, which may be different from the other event generators samling eriods. The discrete control signals that are subsequently outut by the controller are then converted back to continuous signals via Zero Order Holds, also shown. Note how the discrete domain must be isolated from the continuous domain that it resides in. This is not only an imortant feature of the model. The comutational domain that the model is constructed in must also be caable of roviding the roer interfaces to allow the various domains to communicate roerly. We ll discuss this in more detail later on. Sensor t 1 ZOH Sensor t Embedded Controller ZOH Sensor t 3 Discrete Domain ZOH Sensors and Embedded Controller Figure 4 3 Continuous Domain Fuel Injector The fuel injector is a valve, on the ustream of which is liquid fuel under high ressure. Based on the inut from the controller, the injector valve oens for a secified time T i and delivers a mass of fuel to the cylinder during the intake stroke according to where ( ) m = g T T, (3) f i i offset kg 3 gi = 1.96 10, sec 4 Toffset = 7.5 10 sec. (4)

This exerimentally derived relation was taken from [14]. Throttle Valve/Servo Motor The Throttle Valve/Servo Motor is described by the block diagram in Figure 5. The governing equations for the motor are Vb= K bα, Vα= Rαiα+ L αiα+ V b, T = K i = J α+ D α+ K α, α t α α α α where α is the angular osition of the motor shaft and thus the butterfly valve connected directly to it ( closed corresonds to α=0 and oen to α=90 ). The other terms are defined at the end of this reort. Elimination of V b, V α, and i α then gives α= + α + + α+ α+ Rα Dα Rα Kα Kt Kb RαKα Kt V, α Lα Jα Lα Jα LαJα LαJα LαJα = K α K α+ K α+ K V. 1 3 4 α (5) (6) The motor arameters are then chosen to rovide the desired erformance. The solution of Equ. (6) is reresented by the shaded block in Figure 5. Alication of an inut voltage to a motor of course gives velocity, not osition, which we desire. This can be achieved, however, by lacing the motor in the simle feedback loo indicated. With this we now have an additional arameter, the feedback gain G, with which to achieve desired transient resonse and steady state error. (For this roblem a satisfactory value for G was determined to be 10 v. deg ) α α α K 4 + - - - α des V α + - G K 1 K K 3 α Motor α Throttle Valve/Servo Motor Figure 5 4

Intake Manifold The equations describing the air flow into the cylinder from the intake manifold are resented in [4], [14], and [15]: 1 V d atm (Rg T atm) man man v cs man cs man eff 4 (Vd V m) (Vd V m) atm = η ( ω, ) ω + β A ( α) π + + V m = η ( ω, ), d a v cs man man 4RgTatm where man is the intake manifold ressure and m a is the mass of air entrained in the cylinder at the end of the intake stroke. The equations are derived from theoretical rinciles and modified by the inclusion of a volumetric efficiency η v and an effective inlet throat area A eff to account for flow losses. These terms are exerimentally derived, where 30 7 η v =.5497071+ 5.15605 ω cs+ 9.30417 10 man, π and where A eff is given by Figure 6. β tests for sonic flow, and is given by (7) (8) 1 γ+ 1 γ γ γ y y y rc 1 γ β (y) =, γ+ 1 1 ( γ 1) γ y< rc γ+ 1 where (9) γ 1 man y= r c = γ, atm γ+ 1 and where γ is the ratio of secific heats for air. The other arameters shown are constants for the engine or thermodynamic roerties of air and are given at the end of this reort. These relations are highly nonlinear, and are evaluated according to the block diagram shown in Figure 7. (10) 5

6 5 A eff = -0.0036α + 0.4155α - 8.53 4 A eff (cm ) 3 A eff = -0.0006α + 0.134α - 1.6503 A eff = 0.0017α - 0.0055α 1 0 0 10 0 30 40 50 60 70 80 90 α (deg) Effective Throat Area A eff Figure 6 V 4R T η ω (, ) d 4R T η ω v cs man g atm m a ω cs α A V d η ( ω, ) ω 4 π (V + V ) d A eff (cm ) m v cs man cs 6 5 A eff = -0.0036α + 0.4155α - 8.53 4 A eff = -0.0006α + 0.134α - 1.6503 3 eff = 0.0017α - 0.0055α 1 + + man 0 0 10 0 30 40 50 60 70 80 90 α (deg) 1 atm g atm man R T β (V d + V m ) atm Air Manifold Block Diagram Figure 7 6

Drive Train The drive train is described by the block diagram shown in Figure 8, taken from [9]. It is a 4 th order linear system, based on a 7 th order nonlinear model of a manual transmission fixed in its highest forward gear. The only state variable required by the other comonents of the model is the crankshaft seed ω cs, which is then integrated to give crankshaft osition φ cs, and adjusted so that it varies between 0 and 70. α b α b T DT 34.7 6.34 10 8.11 10 1.6 α 1.5 10 3 19..611 7.77 10 41. ω 0 + T 3 890. 6. 3.84 5. 10 ω cs 47.8 3 30.3.944 1.3 10 11.0 α e 1.33 10 4 3 b DT ω ω cs ω ω cs α e α e 6 φ cs φ cs mod 70 φ cs Drive Train Block Diagram Figure 8 Torque Generation in the Cylinder Figure 9 shows the generic rofile of a cylinder s torque outut over one cycle, based on exerimentally derived data [7]. A Fourier Series has been fitted to this data, the first three harmonics of which are G φ π 1 1 3( φ π) + φ π + φ ( ).1 sin sin sin 0 0 360 6 φ = φ π 1 1 3( φ π) + φ π + φ T( ). ( ). sin sin sin 0 360 70 6 Note from this that the total torque for the cycle (the integral under the curve) will always be ositive, due to multilication by. in the ositive ortion of the rofile. As mentioned, this is just a generic rofile in order to achieve the actual amount of torque necessary to attain a desired engine seed, Equ. (11) is scaled by a factor T S. T S is determined with the aid of another exerimentally derived relation [9] and [3] for the overall torque roduced during a cycle, TC= G T(ma+ m f) ηign( φ s), (1) (11) 7

0.3 0. 0.1 T G (φ ) 0.0 Intake & Comression -0.1-0. 0 60 10 180 40 300 360 40 480 540 600 660 70 φ (deg) Combustion & Exhaust where 4 GT.5 10, Generic Torque Waveform Figure 9 N = (13) kg and where η ign, the ignition efficiency, is another exerimentally derived relation [3] given in Figure 10. Tyically, we think of the sark as firing at the start of the exansion stroke (φ = 360 ). Because of the finite time it takes for the flame front to roagate, however, it is usually desirable to advance the sark so that it fires before the comletion of the comression stroke. Alternatively, there are other circumstances in which it is desirable to retard the sark so that it fires after the beginning of the exansion stroke. The iston osition at which the sark fires is conventionally given by φ fire =φ φ s = 360 φ s, (14) where φ s is the sark advance. From this, we see that ositive φ s advances the sark into the comression stroke and negative φ s retards it to occur in the exansion stroke. Figure 10 gives the limits on the values φ s can take as well as the effect it has on outut torque (through η ign ). Combining Equs. (11) and (1) and including the scale factor T S, gives 70 S G φ φ = T + f ηign φs 0 T T ( )d G (ma m ) ( ), (15) for which G (ma+ m ) η ( φ ) T =, T f ign s S 70 T( G φ)dφ 0 The integral is easily evaluated, resulting in 45 T = S G T(ma m f) ign( s). 19 + η φ (17) 8 (16)

In the model, m a, m f, and φ s are samled once during the intake stroke, and T S calculated. This is then used to determine the torque outut of the cylinder T S T G (φ ) for the remainder of that cycle. 1.0 Ignition Efficiency ηign 0.9 0.8 0.7 η ign = -0.000 φ s + 0.013 φ s + 0.83 0.6-15 -10-5 0 5 10 15 0 φ s (deg) Ignition Efficiency η ign Figure 10 The Cylinder Module Previously, we described the cylinder s continuous time, event-based nature. Such systems are modeled as Finite State Machines (FSM s), and a simlified rendition of the cylinder FSM is shown in Figure 11 (where, for clarity, both φ co and φ s are assumed to be zero). Transitions between the four strokes are triggered by evolution of φ, as indicated. During the intake stroke, as just discussed, m a, m f, and φ s are samled and T S calculated. This module thus gives torque as a function of iston osition φ. 9

φ s m f m a φ cs 0 φ 180 S Samle m, m, φ a f s Calculate T S T T( φ ) < 0 φ co - + φ = 180 Intake φ = 70 φ Comression 180 φ 360 T T ( φ ) 0 S G Exhaust 540 φ 70 T T ( φ ) 0 S G φ = 360 Combustion 360 φ 540 T T ( φ ) 0 S G φ = 540 T C 0 φ 70 cs φ φ 70 φ co co Simlified Cylinder Finite State Machine Figure 11 Discussion/Simulation Imlementation of the Model in Ptolemy II Ptolemy suorts hierarchical models, which are models containing comonents that are themselves models. Such comonents are called comosite actors. One nice thing about comosite actors is that we can switch domains as we go down the hierarchy. A comosite actor can exist in, say, the CT domain, but the model inside the actor could be in the DE domain. The embedded controller in our engine model is an examle of this (See Figure 4). Modal Models, described above, can also be laced inside comosite actors. The cylinder module (Figure 11) is an examle of a modal model residing in a comosite actor. Though Ptolemy II does a lot of the work for us, we nonetheless have to be careful in how we connect comosite actors with different domains to one another. Another nice feature of comosite actors and modal models is that we can easily change them out with other comatible actors one of the requirements of our model. For hysical models such as ours, the actors oerate simultaneously and can have multile, simultaneous sources of stimuli. They also oerate in a timed (real world) environment. This is true not only for the continuous time modules like the air manifold module, but also for the FSM cylinder module and the discrete event controller. The articular choice of domains for the various modules was easy in our case, because they secifically model the real-world environment we wish to reresent. The engine model has been imlemented in Ptolemy as an interconnection of comosite actors, as shown in Figure 1. This was done to allow for easy interchange and refinement of the individual modules making u the model, as discussed in the revious sections. At this highest level, the CT 10

Imlementation of the Engine Model in Ptolemy Figure 1 domain is emloyed. As noted, other domains can be emloyed inside the individual comosite actors, and this has been done in the case of the embedded controller (DE domain) the cylinder (FSM domain), and the drive train (FSM domain). Since all of the comosite actors excet the embedded controller utilize the CT domain, the interconnections between them were straightforward. More care, of course, had to be taken with the embedded controller, shown in Figure 13, and as discussed reviously (See too Figure 4). Here we isolate the DE controller with event generators ustream of it and zero order holds Embedded Controller Figure 13 11

The Cylinder Finite State Machine Figure 14 downstream of it. This was the first major subtlety of the imlementation. The second had to do with the cylinder module, shown in Figure 14. As described before, the cylinder inuts m a, m f, and φ s are samled once er cycle, during the intake stroke To accomlish this, a level crossing detector set at φ = 90 triggers a samler, which then samles the inuts. This is shown in Figure 15. The remaining modules were imlemented in a very straightforward fashion from the figures already resented. Their imlementations are shown in Figures 16-19. The Intake State Figure 15 1

The Throttle Valve Figure 16 The Fuel Injector Figure 17 The Intake Manifold Figure 18 13

The Drive Train Finite State Machine Figure 19a The Drive Train State Figure 19b Simulation Results Ptolemy is still under develoment, and modifications made to it by the develoment team unfortunately introduced bugs that revented the controller and cylinder from being imlemented, and also revented the overall engine from being constructed and simulated in time to be reorted here. In lace of this, then, we will demonstrate the erformance of the individual modules making the model u, as well as several combinations of comonents. We begin with the Throttle Valve, which has been laced in the circuit shown in Figure 0a. The ustream comonents are intended to simulate a discrete controller, inutting for α des a staircase sine wave. The Throttle Valve s erformance is shown in Figure 0b. Note the fast and accurate resonse to an inut that it would never exerience in actual ractice. The Intake Manifold, shown in Figure 1a, is driven by a simulated Throttle Valve that is oening in stes of 0, and a crankshaft that is undergoing a sinusoidal variation in angular velocity. Again, these are extreme inuts. Its erformance is shown in Figure 1b. The Drive Train is shown in Figure a, 14

and its resonse to a sinusoidally varying inut torque, which changes sign, is shown in Figure b. In Figure 3a we combine the cylinder and the drive train. Here we assume that both φ co and φ s are zero, and that m a and m f are constant at the stoichiometric ratio (not shown). The drive train is driven by a constant torque. Figure 4b shows the torque outut of the cylinder, which comares favorably to the waveform of Figure 9. We end by combining the Throttle Valve, Intake Manifold, Fuel Injector, and Drive Train together, as shown in Figure 4a. Here we suly the same inuts to the Throttle Valve and the Drive Train as in the revious cases, but now the Throttle Valve s outut forms the inut to Intake Manifold. The Simle Controller senses m a from the intake manifold and comutes the inut to the Fuel Injector, T i, to give the stoichiometric amount of fuel. The Controller is shown in Figure 4b. To simulate its discrete nature, we convert m a to a train of ulses rior to comuting T i. The results are lotted in Figure 4c. Note in articular how the Air/Fuel ratio fluctuates due to the discrete samling. (Prior simulations which excluded the samler and treated the inut as a continuous signal gave the exact stoichiometric ratio, as one would exect.) Throttle Valve Simulation Figure 0a Throttle Valve Simulation Figure 0b 15

Intake Manifold Simulation Figure 1a Intake Manifold Simulation Figure 1b 16

Drive Train Simulation Figure a Drive Train Simulation Figure b 17

Cylinder/Drive Train Simulation Figure 3a Cylinder/Drive Train Simulation Figure 3b 18

Throttle Valve, Intake Manifold, Fuel Injector, and Drive Train Figure 4a Simle Controller Figure 4b Conclusions Throttle Valve, Intake Manifold, Fuel Injector, and Drive Train Figure 4c 19

A simlified model of an internal combustion engine was develoed in the Ptolemy environment, demonstrating the alicability of the comonent-based design aroach to this roblem. Problems encountered with Ptolemy, which is still under develoment, recluded the construction and verification of the comlete model, but the erformance of individual comonents and several combinations of comonents was simulated and demonstrated. Key features of the model are its modular construction, ermitting individual asects of the engine to be abstracted or refined, deending on the roblem at hand; and the fact that different modules are modeled in different domains, ermitting study of the interaction of a continuous time hysical system with a discrete event controller. The final simulation (Figure c) showed how the system s behavior can change when such distinctions are incororated. The model develoed here is generally based on the reviously cited references, but it dearts from those efforts most notably with resect to the cylinder module. The references model the cylinder in a discrete, event-based domain. Torque outut is zero during the intake, comression, and exhaust strokes, and some constant net value during the exansion stroke. In contrast, in this roject the cylinder is modeled in the continuous domain (though as a finite state machine), and rovision is made to rovide a realistic torque outut during every stroke of the iston. Inclusion of additional cylinders, offset with resect to one another as they would be in a real engine, should therefore give a very realistic, instantaneous torque outut. The incororation of the servomotor driven inlet valve is a second innovation of this model. It remains to incororate a realistic model of the controller, using as a guide the reviously cited references. Sensor dynamics and noise contamination usually associated with their oeration should also be undertaken, and would be very easy to do in this environment. In order to stay focused on demonstrating the method, very simle models of torque generation in the cylinder were used. More sohisticated models are readily available, and this should be the next task undertaken after the controller and sensors. Next in line would be the fuel injector, which could be modeled much more accurately, then the drive train (to incororate imortant non-linearities associated with its oeration), and finally, another ass at the intake manifold could be taken. Provision was made for a load torque, but nothing was done with it in this current effort. Many different tyes of realistic loads could be modeled with it, and these could be develoed once the abovementioned refinements were comleted. 0

Terms and Definitions Fuel Injector m f : mass of fuel injected into the cylinder during an intake stroke (kg) 3 g i : fuel injector gain constant kg ( 1.96 10 sec) T i : fuel injection duration (sec) 4 T offset : fuel injection duration offset ( 7.5 10 sec) Throttle Valve/Servo Motor V b : servo motor back emf voltage (volts) K b : volt sec servo motor back emf constant am α: servo motor and throttle valve shaft angle (rad) V α : servo motor armature voltage (volts) R α : servo motor armature resistance (1.7 ohms) i α : servo motor armature current (am) L α : servo motor armature inductance (1.5 10-3 H) T α : servo motor armature torque (N) K t : N servo motor torque constant.1190 am K b : volt sec servo motor back-emf constant.1190 rad J α : 5 N m sec servo motor and throttle valve rotational inertia referred to the motor shaft 510 rad D α : 6 N m sec servo motor and throttle valve daming resistance referred to the motor shaft 510 rad K α : N m servo motor and throttle valve sring coefficient referred to the motor shaft.0195 rad K 1,,3,4 : servo motor/throttle valve constants [see Equ. (6)] G: volt servo motor gain 10 deg Intake Manifold man : manifold ressure ( N m ) m a : mass of air injected into the cylinder during an intake stroke (kg) 3 3 1.4 10 m V d : cylinder dislacement volume ( ) V m : 3 3 manifold volume ( 1.500 10 m ) η v volumetric efficiency [see Equ. (8)] atm : manifold inlet ressure ( assumed STP: 101,35 N ) T atm : manifold inlet temerature ( assumed STP: 300 K ) R g : J universal gas constant for air 87.0 kg-k A eff : effective inlet throat area (m, see Figure 5) 1 m

C : J constant ressure secific heat for air 1.005 kg-k C v : J constant volume secific heat for air.718 kg-k γ: ratio of secific heats for air (1.400) Drive Train T DT : drive train inut torque (N) (see Figure 3) α b engine block angle (rad) ω : wheel seed (rad/sec) ω cs : crankshaft seed (rad sec) α e : axle torsion angle (rad) 0 φ φ cs : crankshaft angle (rad) ( ) φ cs : φ rad modulo 70 ( 0 φ 70 ) cs 180 π rad Torque Generation T G (φ ): generic cylinder torque outut (N) [see Figure 8 and Equ. (11)] cs T C : total cylinder torque outut er cycle N ( cycle ) [see Equs. (1) and (15)] cs T S : cylinder torque scaling factor [see Equs. (16) and (17)] T L : load torques in addition to that reresented by emty vehicle and driver (N) (see Figure 3) ( ) G T : Torque Generation Gain 10 N kg Cylinder φ : iston osition (rad) [see Equ. (1)] φ co : iston offset angle (rad) (see Figure ) φ s : sark advance (rad)