Designing an automotive control system to follow a drive cycle
The goal of this report is to design automotive system using Excel and Javascript. The report demonstrates the effect of the increase or decrease of fuel on an engine speed. Based on the findings, it is revealed that the engine speed will reach an equilibrium at a certain limit no matter the fuel input. The reports also tests the engine drive cycle and the engine will increase the speed with constant the fuel input.
✍️ How to write this paper — tools & examples ▾
¶ … Automotive Control System to Follow a Drive Cycle.
Automotive control is a driving force within the automotive innovation. To lower fuel consumption, improved safety and lower exhaustive consumption as well as enhancing convenience and comfort function, there is a need to apply automotive control. Automotive control system is fundamental principles used for successful design of automobile automatic control systems.
The goal of this report is to "Design an Automotive Control System to Follow a Drive Cycle" and this report is organized in three parts. The first part demonstrates the strategy to implement an engine stimulation and dynamometer. The second part demonstrates the strategy to add control system and the third part provides the implementation of a drive cycle.
First Part
: Simulation of an engine and dynamometer
This part demonstrates the stimulation of engine and dynamometer. To enhance the greater understanding of the stimulation, the report demonstrates the steps in building a mathematical model of engine. The report reveals how the results work correctly and the report implements all parts, which include inertia, friction, throttle accurately. The paper uses the Excel software and JavaScript for the stimulation. Dynamometer is a device used to measure moment of force, force and power. The power produced by the motor, engine and other rotating prime mover could be calculated using rotational speed (RPM) and speed. A dynamometer is also used to determine power and torque required to operate a driven machine.
1.2: "Steps to Build a Mathematical Model of an Engine"
A mathematical model that governs the performance of an engine generally expresses fuel consumption, power and torque, and the model generally governs the function of engine speed at zero torque. The mathematical model could predict the fuel quantity that determines the engine speed. (Harris, & Pearce, 1990). Engine performances could be predicted using a simulation program. This section provides steps in modeling the engine using a mathematical model. The approach to use is to decompose the system to minimum number of parameter which assists in revealing the operation of an engine. This is achieved by considering all the moving components using Newtonian mechanics to demonstrate the dynamic operation of an engine. The system provides desired output using the necessary functional blocks. This report also demonstrates the construction of model of an engine using a simple diagram revealing simple input parameters, which will have some effect on the system operation and outputs representing the particular state of the system. Typically, the output of the engine is demonstrated by its speed, which determines the quantity of fuel to fill in the engine. The diagram in Fig 1 provides the simplistic model of an engine:
Fig 1: Outlining the System indicating Input and Output of an Engine
Fuel (0-100%) Speed (rpm)
Analysis of the diagram in Fig 1 reveals the purpose of the system; however, the diagram does not explain the process that occurs within the engine. Thus, there is a need to build a mathematical model to describe the input of fuel in relation to the output of the engine speed. An engine is a complex structure, however, the engine fiction and rotation inertia as well as its applied torque due to fiction could be simplified using mathematical model. Thus, the mechanical of the system is described using a mathematical model. (Golten, & Verwer, 2003). The following diagram illustrates a simplified engine as well as forces that act upon it.
Fig 2: Illustration of Physical System of an Engine
T
Frictional Angular
Torque (Nm) Displacement Acceleration
Applied torque (Nm) Moment of inertialJ (kg m2) (rad) Angular Velocity rad/s2
(rad/s)
The diagram in Fig 2 reveals the single rotating mass equivalent to all the moving components within the engine. Typically, the applied torque is being generated directly from the combustion of fuel, which is working on the pistons. On the other hand, the frictional torque occurs due to the interface between components of moving engine and is being dictated from specific lubricated regime. Using the mathematical model, the report demonstrates the parameter of the diagram in Fig 2.
Generally, the torque demonstrates the rate of change of an angular momentum in the same process that acts as a force to provide rate of change within linear momentum. The following equation demonstrates the torque:
T= dL= d (JO)
dt dt
The J. is defined as the mass distribution on the axis rotation. However, J is constant with the moment of inertia.
Then
T=JO
On the other hand, F=ma is the analogous of a force acting on mass. However, the report considers the retardation from fiction, which is associated with the fiction of the engine. The equation is as follows:
T -- TF = JO (1.1)
Where T. serves as frictional torque
Using mathematical inspection, the report provides the following relations:
dt (1.2)
and =?
dt
The next process is to define T. And TF to complete all the equation necessary to define the process.
The fiction between components of the engine is considered with the result of a shearing stress based on the lubricating interface of the moving components. The result is proportional to the square of angular velocity that can be derived from dimensional analysis. Thus, the frictional torque is defined as follows:
TF=k1?2 (1.3)
From the equation, k serves as the constant proportionality. Typically, torque has been approximated by the proportion of fuel consumed. Thus,
T=k2F (1.4)
F represents the total fuel supplied to the engine represented as the (0-100%) where K. is constant.
The equations 1, 2, 3 and 4 are used to provide the simplified model of an engine. The diagram in Fig 2 is used to present the visual model of the engine, and the block represents relation variables in Fig 3. To fully define the model, there is a need to define the model dependant and their variables and their interdependent. From Fig 3, the block reveals the unidirectional inputs on the left and the output on the rights, which represents the transfer of functions from one variable to the other.
Fig 3: A Typical Block
RC
With C= GR, it is often convenient to represent the block in matrix notation to demonstrate the interrelationships of the block, where R. And C. are column vector which generally contains input/output variables respectively.( for example an N. x1 matrix where N. represents the number of input and output variables). Moreover, G represents the transfer function between each of the input/output combination (represented by an NxN matrix). With inputs (R1 and R2) and (C1 and C2), the system could be represented by the following equations:
C1= G11 R1 + G12 R2
C2= G21 R1 + G22R2
The equation could also be represented by the following matrix:
[ C1 ] = [ G11 G. 12] [R ] or Simply C=GR
[ C2 ] [ C21 G22 ] [ R2]
Based on the above equation the next step is to construct the block diagram
Contracting a Block Diagram
The block diagram in Fig 4 revealing the system diagram representing the engine model, which reveals the output speed of the engine using the equation I, 2,3, and 4 and the block diagram in Fig 2. The block diagram also reveals the correlation of fuel supplied with the engine speed.
Fig 4: System Diagram for Model of the Engine
T + TN
F ?(rpm)
Thus, the description of the flow of the diagram in Fig 4 is as follows:
1. The first functional block at the left hand side operates for the fuel input. When F. is multiplied with k2, it delivers applied torque, T as being revealed in Fig 4.
2. The second element in the block diagram is to produced a summing function that delivers applied Torque T. As well as frictional torque, TF, which produces an output TN= T- TF. The +/- sign at the summing block of the inputs indicates whether the inputs is to add and subtract.
3. The next is step is to take the sum and divide it by the moment of inertial, J, of the Engine as being revealed in the equation 1 in order to obtain the angular acceleration at the engine output level.
4. The report determines the angular velocity of the output of the engine and this is achieved by integrating the angular acceleration using Equation 2 .
5. The block output of the angular velocity is in radian/second using rpm. The final operation of the blocks is performed with following conversion factor:
Rev = [ 60] radians min [2?] sec
6.The final step is to define TF using the summing function. Typically, Equation 3 reveals that TF is proportional to ?2 . Thus, the ? system variable is used to create a branch in the block. Thus, the operation in the block is k1( )2, where the brackets in the block contains the input variables.
Part Two
This section demonstrates the strategy to add a control system. The strategy is to add different control systems to test the engine performances. The system in Fig 4 only uses the nonlinear with ?2 .Moreover; the system diagram has a loop without the feedback control. However, the report intends to adjust the fuel input of the system manually. With feedback control, the report compares the output with reference value to obtain an error, which is used to obtain the desired response. Typically, the error margin is used to achieve a desired output.
Fig 6: Close Loop System (Negative Feedback)
+ Error
Desired Output Actual Output
"The control loop has ability to implement a variety of control algorithms to achieve the desired output in an effective and efficient manner" (Golten, & Verwer, 2003 P. 10). The negative feedback is achieved by subtracting feedback from the input to achieve a desire measure of error in the output. The process is called negative feedback because the feedback is deducted from the input reference. The report implements the control block to complete the system since the block in Fig 4 only represents the process block. Thus, the report uses both Excel and JavaScript to test the performance of different speed control system using on/off control system
(i) on/off control
Regulation of engine speed through manual process of adjustment of fuel input may lead to trial and error approach, which may take time to achieve a desired result. However, there is a need to introduce controller and adjust the fuel input to achieve a desired results. The report starts from the simplest form of control type on/off controller. The principle to determine error in the output speed is to apply either 0% (off) and 100% (on) to fuel to decrease or increase the engine speed to remain as close to 800 rpm as possible. The accuracy of controller is generally being determined by sampling time. The report will determine the control loop system of the diagram in fig 6. The report attempts to use the output speed and set the desired speed how close the system could achieve a correct speed. The graphical illustration in Fig 7 reveals the on/off controller, which reveals whether the output speed is greater or less than the set point.
Fig 7: The Function of on/Off Controller
0% Error
The on/of controller illustration reveals whether the engine speed is greater than the set point, the error is negative and set at 0% if fuel is less than set point and when the error is positive and the fuel is set at 100%. The spreadsheet is used to demonstrate the process and use a conditional function and is extended to include controller.
The conditional function start with if statement as follows:
IF X and Y THEN Z
However, the following rule describes the control process of the engine model
"IF (engine speed is too low) and (engine speed increasing) THEN (throttle 100%)
IF (engine speed is too low) and (engine speed decreasing) THEN (throttle 100%)
IF (engine speed is too high) and (engine speed increasing) THEN (throttle 0%)
IF (engine speed is too high) and (engine speed decreasing) THEN (throttle 0%)." ( Golten, . & Verwer, 2003 P. 11).
The table below illustrates the four conditional statements:
Increasing
Decreasing
Too low
1
1
Too high
0
0
Thus, the algorithms are simplified as follows:
IF (error >0) THEN (throttle 100%) ELSE (throttle 0%)
As being revealed in the diagram below, when fuel input is set to 50%, the time taken for the engine to achieve 3000-rpm changes 1 minute.
The output of the JavaScript is presented below in the following link:
http://azizautomotivedesign.webs.com/engine-speed-fuel-at-50
The table below reveals the layout f the spreadsheet for on/off controller.
Table: Layout of the Spreadsheet
A
B
C
D
D
E
F
G
H
I
1
Time (sec)
Error
Fuel (%)
T (Nm)
TF
(Nm)
TN
(Nm)
Acc (rad/s2)
Vel (rad/s2)
Pos
rpm
2
0
=$L$11-$12
=if ($B2>0,100, 0)
=$L$8*$B2
0
=$C2-D2
=$E2/$L$9
0
0
=$G2*30/PI ()
3
=$A2+0.1
=$L$7*POWER ($G2,2)
=$G2+($A3-$A2)*$F2
=H2+(A3-A2)*0.5*(G2+G3)
4
Table 3: Spreadsheet Layout of on/off Controller
Time
Error (rpm)
Fuel (%)
T (Nm)
Tf (Nm)
Tn (Nm)
Acc (rad/s2)
Define Constant
k1=
0.0001
k2=
0.2
J=
0.25
Setpoint (rpm)
The table 3 presents the spreadsheet of the stimulation and the system parameter is added to investigate the system response.
Fig 6: Engine vs Controller
The following link produces the output of the JavaScript
http://azizautomotivedesign.webs.com/engine-vs.-controller
The illustration in Fig 6 reveals that fuel increase from 0% to 100% and reaches its maximum speed. The on/off controller reveals the strategy of using a close loop feedback.
(ii) on/off control with hysteresis
The model develop in the previous section does not seems to test the engine with no external load. In the real world application, the engine would be subject to various loads and this depends on the situation. The report provides the strategy to provide the practical example. The propeller blades of aircraft will increase the overall load of the aircraft. Using the engine model of Fig 4, the report provides, the reports the strategy to add extra input to the engine.
Fig 7: Additional Propeller torque Tp of the Engine Process
Tp
TN
TF
The following formula is applied to a new constant introduced in relation to the angle ? To the torque and as being applied to the engine propeller.
Tp =k3 tan (?) where k3 = 100
The process makes ? To move away from 0 and the propeller Tp increases in magnitude. The spreadsheet is edited to demonstrate the process.
A
B
C
D
E
F
G
H
H
I
J
K
Time (sec)
Error
Fuel (%)
T (Nm)
Alpha (deg)
TP
(Nm)
TF
(Nm)
TN
(Nm
Acc (rad/s2)
Vel (rad/s2)
Pos
rpm
0
=$N$12-$12
=if ($B2>0,100, 0)
=$N$8*$B2
=$N$X
=$N$9*$E2
0
=$C2-$D2-$F2
=$E2/$N$10
0
0
=$G2*30/PI ()
=$A2+0.1
$N$7*POWER ($G2,2)
=$G2+($A3-$A2)*$F2
=H2+(A3-A2)*0.5*(G2+G3)
Time
Error (rpm)
Fuel
T (Nm)
Alpha (deg)
Tp (Nm)
Tf (Nm)
Tn (Nm)
Acc (rad/s2)
Vel
fig 8 reveals that there is a decline in the speed of the engine due to the load on the engine. With constant 100% of the engine fuel, there is a gradual decline in the speed of the engine.
Fig 8: Effect of Load on the Engine
This is the output of the Javascript of Fig 8
http://azizautomotivedesign.webs.com/effect-of-load-on-engine
(iii) Proportional control
The proportional controller is widely used for industrial process, and it uses "feedback to sample the output from a process and compare it with the reference set point." ( Golden, . & Verger, 2003 P. 20). The process produces error between the set point and the process output. Thus, the error is corrected using a proportional controller. The block form provides the serial interacting and non-interacting form.
Fig 9: Block form Algorithm of Proportional Controller
+ Controller
error output
The equation of proportional controller is presented below:
However, the block diagram in Fig 10 represents the system in Laplace notation.
Fig 10: Block form Algorithm of Proportional Controller in Laplace Notation.
+ E(s) Uc(S)
R(s) C(s)
Controller Process
Feedback
The processes gain are being specified as constant, time, and dead time. Moreover, the proportional controller has three parameters, which include gain, integral and derivative. These values are being keyed into the appropriate cell to achieve the desired results.
Process
Gain (K)
1.5
Time Constant (T)
Delay (L)
23
Controller
Gain (C)
2.94
Integral (I)
34.52
Derivative (D)
0
(All times in seconds)
The following Excel formula provides the output of proportional controller
1
t
SP
OP
PV
Error
AccumErr
2
-10
0
0
0
=B2-D2
0
3
-9
0
0
0
=F2+E3
4
-8
0
0
0
5
-7
0
0
0
6
-6
0
0
0
7
-5
0
0
0
8
-4
0
0
0
9
-3
0
0
0
10
-2
0
0
0
11
-1
0
0
0
12
0
1
0
=SI (LIGNE ()-12
13
1
1
=K*E12+F12*OnebyTi+Td*(E12-E11)
1
14
2
1
15
3
1
Fig 10: Output of Proportional Controller Stimulation
The following link delivers the output of the Javascript in Fig 10.
http://azizautomotivedesign.webs.com/proportional-controller
(iv) PID control
In the PID control, the conditional statements are used to test the output of PID control using the following algorithms:
IF (Uc >100) THEN
(Fuel =100% )
ELSE {
IF (Uc
(Fuel =100%)
ELSE
( Fuel = Uc) }
Table: Implementation of PID Control
A
B
C
D
E
F
G
H
Time (sec)
Error
Up
Ur
Ud
Uc
Fuel (%)
TN
(Nm
0
=$R$2-$O2
=$R$15*$B4
0
0
=$C4+$D4+ $E4
=if ($F4>100,100, if ($F4
=$R$8*$G4
=$A2+0.1
=$D4+($R$15*($A5-$A4)/(2*$R$16))*($B5+$B4)
=($R$15*$R$17)/($A5-$A4))*($B5-$B4)
Q
R
6
Engine Parameter
7
k1
00.1
8
k2
0.6
9
k3
10
J
0.25
11
12
Set Point
13
14
PID Parameter
15
K
10
16
Tr
1
17
Td
0
18
19
Pitch
20
0-10s
0
21
10.20s
10
22
20-30s
26.6
23
30-40s
0
24
40-50s
-10
25
50-60s
0
In the PID control, the proportional part could make the system unstable if it is small. Thus, the proportional part must be as large as possible without causing the system to be unstable. Moreover, "the integral term takes out the steady state errors, and it can make the system to be unstable if it too large. The derivative term response to a change in the system. It can be used to damp changes however, it set too large in can cause system instability."(P 29).Open loop method will remove the impulse error if the feedback is removed.
However, the best results for manually PID control are as follows:
K
0.3
Tr
10
Td
0
(v) Feedforward control
Feedforward control measures a disturbance variable and predicts the process to implement the corrective action. Combination of feedback control and feedforward control can significantly improve the engine performances and reduce the effect of disturbances.
Part 3
Implementation of Drive Cycle
A driving cycle reveals series of data points to represent the speed of a vehicle vs. time. Different countries produce driving cycle to assess the performances of vehicles, which include the engine fuel consumption level and polluting emissions. Another benefit of driving cycle is for the engine stimulation. However, the New European Driving Cycle is designed to evaluate the fuel economy and emission level of car engine in passenger cars. The report uses the engine model in Fig 4 to test implement the Drive Cycle. However, from the spreadsheet and diagram below, there is an increase in the speed of the engine with the 100% fuel constant.
The report assumes that the gear changes of 2.5 Tons are to be used for the Drive Cycle taking into account the vehicle performances, which include power, mass, and gears as well as the load of the engine.
Table: Spreadsheet for the Drive Cycle
List of References
Harris, H.D. & Pearce, F. (1990). A universal mathematical model of diesel engine performance .Journal of Agricultural Engineering Research . 47: 165 -- 176.
Golten, J. & Verwer, a. (2003). Control System Design and Stimulation.London.McGraw-Hill Publishing.
Jon, R. (2004). Automotive Control Systems: For Engine, Driveline and Vehicle. Sensor Review. 24(4): 395-396.
Appendix 1: Code of the Javascript of the Engine Speed vs. Fuel Part 1
Create your account
- Harris, H.D. & Pearce, F. (1990). A universal mathematical model of diesel engine performance .Journal of Agricultural Engineering Research . 47: 165–176.
- Golten, J.& Verwer, A. (2003). Control System Design and Stimulation.London.McGraw-Hill Publishing.
- Jon, R. (2004). Automotive Control Systems: For Engine, Driveline and Vehicle. Sensor Review. 24(4): 395-396.
Always verify citation format against your institution’s current style guide requirements.