Nonlinear Dyn (2009) 55: 385–393 DOI 10.1007/s11071-008-9371-1
O R I G I N A L PA P E R
Neural networks based self-learning PID control of electronic throttle Xiaofang Yuan · Yaonan Wang
Received: 13 April 2008 / Accepted: 9 May 2008 / Published online: 3 June 2008 © Springer Science+Business Media B.V. 2008
Abstract An electronic throttle is a low-power DC servo drive which positions the throttle plate. Its application in modern automotive engines leads to improvements in vehicle drivability, fuel economy, and emissions. In this paper, a neural networks based selflearning proportional-integral-derivative (PID) controller is presented for electronic throttle. In the proposed self-learning PID controller, the controller parameters, KP , KI , and KD are treated as neural networks weights and they are adjusted using a neural networks algorithm. The self-learning algorithm is operated iteratively and is developed using the Lyapunov method. Hence, the convergence of the learning algorithm is guaranteed. The neural networks based selflearning PID controller for electronic throttle is verified by computer simulations. Keywords Nonlinear systems · Nonlinear control · Electronic throttle · PID control · Neural networks · Self-learning
1 Introduction Today’s automobile effectively encompasses the spirit of mechatronic systems with its abundant applicaX. Yuan () · Y. Wang College of Electrical and Information Engineering, Hunan University, Changsha 410082, China e-mail:
[email protected]
tion of electronics, sensors, actuators, and microprocessor-based control systems to provide improved performance, fuel economy, emission levels, and safety. Electronic throttle is a DC motor driven valve that regulates air inflow into the engine’s combustion system [1]. Electronic throttle can successfully replace its mechanical counterpart if a control loop satisfies prescribed requirements: a fast transient response without overshoot, positioning within the measurement resolution, and the control action that does not wear out the components. Vehicles equipped with electronic throttle control (ETC) systems are gaining popularity in the automotive industry for several reasons including improved fuel economy, vehicle drivability, and emissions. As adaptive-cruise-control and direct-fuel-injection systems become popular, the market of ETC has become larger [2]. The ETC system positions the throttle valve according to the reference opening angle provided by the engine control unit. Today’s engine control unit use lookup tables with several thousand entries to find the fuel and air combination which maximizes fuel efficiency and minimizes emissions while respecting drivers intentions. Hence, accurate and fast following of the reference opening angle by the electronic throttle has direct economical and ecological impacts. The synthesis of a satisfactory ETC system is difficult since the plant is burdened with strong nonlinear effects of friction and limp-home nonlinearity. Moreover, the control strategy should be simple enough
386
to be implemented on a typical low-cost automotive micro-controller system, while it has to be robust for a range of plant parameters variations. Additionally, the control strategy should respect physical limitations of the throttle control input and safety constraints on the plant variables prescribed by the manufacturer. Considering everything mentioned before, it is not a surprise that this challenging control problem has attracted significant attention of the research community in the last decade [3–9]. There are several ETC control strategies that differ in the underlying philosophy, complexity, and the number of sensor signals needed to determine the desired throttle opening. Several of the existing control strategies use a linear model of the plant and derive a proportional-integral-derivative (PID) controller with feedback compensator [3]. Variable structure control with sliding mode is an effective method for the control of nonlinear plant with parameter uncertainty, and it has also been applied in the ETC system in [4, 5], and [6]. In [4], a discretetime sliding mode controller and observer are designed to realize ETC system by replacing signum functions with continuous approximations. A sliding model controller coupled with a genetic algorithm (GA) based variable structure system observer fulfills the demand for high robustness in nonlinear opening of the throttle in [5]. In [6], a neural networks based sliding mode controller is described since neural networks has good learning ability and nonlinear approximation capability. In [7], variable structure control technique based robust control is presented. A time-optimal model predictive control is proposed in [8] based on the discretetime piecewise affine model of the throttle. In [9], recurrent neuro-controller is trained for real time application in the electronic throttle and hybrid electric vehicle control. It is well known that proportional-integral-derivative (PID) controllers have dominated industrial control applications for a half of century, although there has been considerable research interest in the implementation of advanced controllers. This is due to the fact that the PID control has a simple structure that is easily understood by field engineers and is robust against disturbance and system uncertainty. As most of the industrial plants demonstrate nonlinearity in the system dynamics in a wide operating range, different PID control strategies have been investigated in the past years. In this paper, a neural networks based self-learning PID controller is proposed for the ETC system. The
X. Yuan, Y. Wang
proposed self-learning PID controller is also acceptable in engineering practice as it can meet the following requirements: (1) Fulfill the demand of total nonlinear characteristic in throttle, i.e., stick-slip friction, nonlinear spring, and gear backlash. (2) Simplicity of the control strategy is required, so that it can be implemented on a low-cost automotive micro-controller system. (3) Robustness of the control system with respect to variations of plant parameters is required, which can be caused by production deviations, variations of external conditions. (4) Settling time of the position control system step response should be less than 0.15 seconds for any operating point and for any reference step change. This paper is organized as follows. In Sect. 2, the nonlinear dynamics of electronic throttle is derived. In Sect. 3, a self-learning PID controller is presented and it is implemented using neural networks approach. At last, several simulations illustrate the performance of the proposed self-learning PID controller for electronic throttle. 2 Model of electronic throttle The electronic throttle consists of a DC drive (powered by the chopper), a gearbox, a valve plate, a dual return spring, and a position sensor. All throttle components are assembled in a compact electronic throttle body as in Fig. 1, which is mounted on the engine air tube. The control signal is fed to the bipolar chopper, which supplies the DC drive with the appropriate armature voltage. The armature current created induces the motor torque that is transmitted through the gearbox to the throttle plate. The valve plate movement stops when the motor torque is counterbalanced by the torque of the dual return spring, the gearbox friction torque, and the load torque induced by the air inflow. The complete electronic throttle plant can be given by [10]: θ˙ = ω
K Kf Cs Ks θ− − dω− sgn(ω) J J J J KT VBat + u J Ra + RBat
w˙ = −
(1)
where θ is the throttle angle; ω is the throttle angular velocity; J is lumped inertia of throttle plate, reduction gears and motor rotor; Ks is spring constant; Cs is torque constant (spring torque at θ = 0); Kd is equiv-
Neural networks based self-learning PID control of electronic throttle
387
Fig. 1 The structure of an electronic throttle
alent viscous friction constant, while Kf is Coulomb friction constant; KT is motor torque constant; VBat is no-load voltage; sgn(·) is the signum function; Ra is armature resistance; RBat is internal resistance of the source; u is the control signal. In the electronic throttle control system, the throttle angle θ is the control objective, and u is the control input then:
K Kf Cs Ks θ− − d θ˙ − sgn(θ˙ ) J J J J VBat KT + u J Ra + RBat
θ¨ = −
where KP (k), KI (k) and KD (k) are proportional, integral, and derivative gains, respectively; u(k) is an overall control force at time k which is a summation of three components; e(k) is the tracking error defined as: e(k) = y ∗ (k) − y(k), and e(k) = e(k) − e(k − 1); y ∗ (k) is the desired plant output, y(k) is the actual plant output at time k. We also can present the PID control in the increment forming as: u(k) = u(k − 1) + u(k)
(2)
u(k) =
3
Ki (k) · ei (k)
(5)
i=1
we also can present the plant as: θ¨ = f (θ, θ˙ ) + bu + d(t) y=θ
(3)
where f is a unknown function, b is a unknown parameter, but it is assumed to be a constant, d(t) is the unknown external disturbance, u ∈ R and y ∈ R are the input and output of the plant, respectively, θ = (θ, θ˙ )T ∈ R n is the state vector of the plant, which is assumed to be measurable. And it is assumed that d(t) have upper bound D, that is, |d(t)| ≤ D.
where e1 (k) = y ∗ (k) − y(k), e2 (k) = e1 (k) − e1 (k − 1), e3 (k) = e1 (k) − 2e1 (k − 1) + e1 (k − 2); Ki (i = 1, 2, 3) are the three parameters for PID control, if we can select the optimal values of Ki (i = 1, 2, 3), the PID controller will have good performance. However, these parameters are not easy to select since the practical plant is generally nonlinear. In this paper, we will propose an intelligent PID controller as the parameters of PID controller used here can adjust its parameters in an intelligent way, which is implemented using neural networks. 3.2 Structure of self-learning PID control
3 Self-learning PID controller design 3.1 PID control In control engineering, PID control technique has been considered as a matured technique in comparing with other control techniques. In a typical discrete-time PID controller, its control law can be expressed in the following forms [11, 12]: ei (k) + KD (k)e(k) u(k) = KP (k)e(k) + KI (k) i (4)
The structure of the proposed self-learning PID controller is illustrated in Fig. 2. There are two neural networks; one is a Gaussian potential function networks (GPFN1), which can identify the nonlinear plant, the other is another Gaussian potential function networks (GPFN2), which acts as a PID controller. GPFN networks may be seen as a three-layer feedforward networks, the input layer acts as transmitting input value to the next layer, the second layer is a hidden-layer, center parameter is included in each node, the third layer is output layer. Usually, nonlinear
388
X. Yuan, Y. Wang
Fig. 2 The structure of self-learning PID controller
plant could be described by nonlinear mapping shown as follows:
GPFN2 acts as the self-learning PID controller, and the output of GPFN2 is
y(k) = f y(k − 1), . . . , y(k − n), u(k), . . . , u(k − d)
u(k) = u(k − 1) +
T X m (k) = y(k −1), . . . , y(k −n), u(k), . . . , u(k −d) (7)
X m (k) − ajm (k)2 − , 2(bjm (k))2
hm j (k) = exp
(8)
and the output layer of GPFN1 is obtained as y(k) ˆ =
M
Wjm (k) · hm j (k)
(10)
and the hidden layer of GPFN2 is X(k) − ai (k)2 , Φi (k) = exp − 2bi2 (k) i = 1, 2, 3
(11)
and the input layer of GPFN2 is T X(k) = X1 (k), X2 (k), X3 (k)
then the hidden layer of GPFN1 is
j = 1, 2, . . . , M
Ki (k) · Φi (k)
i=1
(6) where n and d are orders of the plant output and control input. The GPFN1 is used for the construction of plant model and input layer of GPFN1 is defined as:
3
(12)
where Ki (k) (i = 1, 2, 3) is the networks connecting weights, which is corresponding to PID controller parameters (proportional gains, integral gains, and derivative gains), X1 (k) = e1 (k), X2 (k) = e2 (k), X3 (k) = e3 (k), ai (k) is the center of the Gaussian potential function, and bi (k) is the width of the Gaussian potential function at time k.
(9)
j =1
where Wjm (k) (j = 1, 2, . . . , M) are the networks connecting weights, ajm (k) is the center of the Gaussian potential function, and bjm (k) is the width of the Gaussian potential function, at time k. y(k) ˆ in (9) is the approximation of y(k) in (6), and it constructs the plant model.
3.3 Learning algorithm In this section, we will present the learning algorithm for these two GPFN networks. For GPFN1, a cost function may be defined as Jm =
2 1 2 1 y(k) − y(k) ˆ = em (k) 2 2
(13)
Neural networks based self-learning PID control of electronic throttle
A gradient descent approach is employed to train GPFN1 in order to minimize const function Jm . The gradients of error in (13) with respect to vector Wjm (k), aim (k), and bim (k) are given by:
= em (k) · hm j (k)
(14)
∂hm ∂ y(k) ˆ ∂Jm j (k) = − y(k) − y(k) ˆ · · m m m ∂aj (k) ∂hj (k) ∂aj (k)
×
X m (k) − ajm (k)
(15)
(bjm (k))2
×
(16)
(bjm (k))3
∂Jm = − 1) + η(k) · − ∂Wjm (k) + α Wjm (k − 1) − Wjm (k − 2)
∂Jm ajm (k) = ajm (k − 1) + η(k) · − m ∂aj (k) m + α aj (k − 1) − ajm (k − 2)
∂Jm bjm (k) = bjm (k − 1) + η(k) · − m ∂bj (k) m + α bj (k − 1) − bjm (k − 2)
Wjm (k
(17)
2 1 1 ∗ y (k) − y(k) = e2 (k) 2 2
×
(X(k) − ai (k))T ∂y(k) · ∂u(k) bi2 (k)
(22)
∂u(k) ∂Φi (k) · ∂Φi (k) ∂bi (k) X(k) − ai (k)2 ∂y(k) · ∂u(k) bi3 (k)
∂hm ∂ y(k) ˆ ∂ y(k) ˆ j (k) = m · ∂u(k) ∂hj (k) ∂u(k) M
=−
M j =1
(20)
Wjm (k) · hm j (k) ·
j =1
(18)
(19)
(23)
∂y(k) In these equations, ∂u(k) denotes the sensitivity of the plant with respect to its input, which is identified using GPFN1 since after learning there is y(k) ˆ ≈ y(k), ∂y(k) ∂ y(k) ˆ ∂u(k) ≈ ∂u(k) . As
=−
where η(k) is the learning rate, 0 < η(k) < 1; α is positive factor. Define a cost function for the online learning of GPFN2 as: Jc =
∂Φi (k) ∂ai (k)
= −e(k) · Ki · Φi (k)
X m (k) − ajm (k)2
(21)
∂y(k) ∂Jc = − y ∗ (k) − y(k) · ∂bi (k) ∂u(k)
∂hm j (k) m ∂bj (k)
The corresponding learning algorithm of GPFN1 are given by the following expressions: Wjm (k)
∂y(k) ∂u(k) ∂y(k) ∂u(k) ∗ ∂Jc = − y (k) − y(k) · · ∂ai (k) ∂u(k) ∂Φi (k)
= −e(k) · Ki (k) · Φi (k)
= −em (k) · Wjm (k) · hm j (k) ×
∂y(k) ∂u(k) ∂Jc = − y ∗ (k) − y(k) · · ∂Ki (k) ∂u(k) ∂Ki (k)
×
= −em (k) · Wjm (k) · hm j (k)
∂ y(k) ˆ ∂Jm = − y(k) − y(k) ˆ · m · m ∂bj (k) ∂hj (k)
The gradients of error in (20) with respect to vector Ki (k), ai (k), and bi (k) are given by
= −e(k) · Φi (k) ·
∂ y(k) ˆ ∂Jm = − y(k) − y(k) ˆ · m ∂Wj (k) ∂Wjm (k)
×
389
Wjm (k) · hm j (k) ·
X(k) − ajm (k) (bjm (k))2 u(k) − ajm (k) (bjm (k))2
(24)
therefore, the learning algorithms for GPFN2 are:
∂Jc Ki (k) = Ki (k − 1) + η(k) · − ∂Ki (k) (25) + α Ki (k − 1) − Ki (k − 2)
∂Jc ai (k) = ai (k − 1) + η(k) · − ∂ai (k) (26) + α ai (k − 1) − ai (k − 2)
390
∂Jc ∂bi (k) + α bi (k − 1) − bi (k − 2)
X. Yuan, Y. Wang
Assumption (1) 2 > γ > 0; (2) W (k) is very close to optimal weights W ∗ ; (3) g(0) = 0.
bi (k) = bi (k − 1) + η(k) · −
(27)
where η(k) is the learning rate, 0 < η(k) < 1; α is positive factor. For a proper understanding and applying the approach, the more detailed procedures of the selflearning PID control design are given below. Step 1. Initial parameters: weights W m (0), K(0), parameters aim (0), bim (0), ai (0), bi (0), η = 0.35, α = 0.2. Step 2. Using (9) to compute the output of GPFN1 y(k). ˆ Step 3. Using (14)–(16) and (17)–(19) to train the weights and parameters of GPFN1. ∂y(k) Step 4. Compute ∂u(k) using (24). ∗ Step 5. Sample y (k), y(k), compute the control signal u(k) by (10). Step 6. Update PID parameters (GPFN2) using (21)– (23) and (25)–(27), go to Step 2. 3.4 Stability and convergence The learning algorithms of GPFN2 in (25)–(27) can be denoted as follows, that is, the weights can now be adjusted following a gradient method as: Wi (k) = Wi (k + 1) − Wi (k) = −η(k) ·
∂Jc ∂Wi (k)
(28)
where Wi (k) is the weights and parameters of GPFN2, that is, Wi (k) = [Ki (k), ai (k), bi (k)], η(k) is the learning rate, 0 < η(k) < 1. ∂y(k) ∂Jc Let z(k) = ∂W (k) , g[ei (k)] = ∂y(k) , and select the γ learning rate as η(k) = 1+z(k) 2 , γ > 0 is a constant. Therefore, Wi (k + 1) = Wi (k) − η(k) ·
∂Jc ∂Wi (k)
Proof Suppose weights W (k) are very close to optimal weights W ∗ , W ∗ = [W¯ 1 , W¯ 2 , W¯ 3 ], then (10) can be expressed by: u(k) =
3
W¯ i (k) · Φi (k)
(29)
(30)
i=1
W˜ (k) = W ∗ − W (k)
(31)
Define a Lyapunov function as 2 V (k) = W˜ (k) ≥ 0
(32)
then 2 V (k + 1) = W˜ (k + 1) = W˜ T (k + 1)W˜ (k + 1) γ · g[e(k)] · z(k) T = W˜ (k) − 1 + zT (k) · z(k) γ · g[e(k)] · z(k) ˜ × W (k) − 1 + zT (k) · z(k) 2 2γ W˜ T (k) · g[e(k)] · z(k) = W˜ (k) − 1 + zT (k) · z(k) +
γ 2 · g 2 [e(k)] · zT (k) · z(k) [1 + zT (k) · z(k)]2
≤ V (k) − +
2γ W˜ T (k) · g[e(k)] · z(k) 1 + zT (k) · z(k)
γ 2 · g 2 [e(k)] 1 + zT (k) · z(k)
(33)
From Assumption (2) and (33), we can know that W˜ T (k) · z(k) is the first order approximation of g[e(k)], that is, T ∂y(k) W˜ T (k) · z(k) = W¯ − W (k) · ∂W (k) = g ei (k) + o(1)
∂y(k) ∂Jc = Wi (k) − η(k) · · ∂y(k) ∂W (k) γ · g[e(k)] = Wi (k) − · z(k) 1 + zT (k) · z(k)
Theory Under Assumptions (1)–(3), there is g 2 [ei (k)] limk→∞ 1+z T (k)·z(k) = 0. And if z(k) is bounded, limk→∞ g[e(k)] = 0, limk→∞ e(k) → 0, and the learning algorithm is converged.
(34)
thus, the change of the Lyapunov function is obtained by
Neural networks based self-learning PID control of electronic throttle
391
V (k) = V (k + 1) − V (k) ≥−
2γ W˜ T (k) · g[e(k)] · z(k) 1 + zT (k) · z(k)
+ ≥−
γ 2 · g 2 [e(k)] 1 + zT (k) · z(k)
γ (2 − γ ) · g 2 [e(k)] 1 + zT (k) · z(k)
(35)
When Assumption (1) is satisfied, 2 > γ > 0, V (k) is negative definite. This also means that the g 2 [ei (k)] convergence is guaranteed, then limk→∞ 1+z T (k)·z(k) = 0, limk→∞ g[e(k)] = 0, limk→∞ e(k) → 0. 4 Simulation (a) angle This section shows the application of the self-learning PID controller on the electronic throttle. In this paper, plant parameters values are: KJs = 1.35E01 s−2 , K
= 2.01E02 rad/s2 , Jd = 3.30E01 s−1 , Jf = Bat 6.29E01 rad/s2 , KJT = 2.50E01 rad/A · s2 , RaV+R = Bat 3.0E01 A. Here, three kinds of controllers are compared together. They are: PID controller with feedback compensator (PIDFC) in [3], recurrent neurocontroller (RNC) in [9], and the proposed self-learning PID controller (SLPID). Several set-points tracking are performed in this simulation with different operating points and different reference step changes. Figures 3, 4 and 5 illustrate the control results for these three controllers, and variables θ , errors of θ, and ω are given in these figures. We can know from the figures that the selflearning PID controller (SLPID) preserve important performance measures, like fast response, the absence of overshoot, and static accuracy within the measurement resolution. The PIDFC has poor static accuracy while the RNC has slow response. Cs J
K
(b) errors of angle
5 Conclusion A neural networks based self-learning PID controller is presented for electronic throttle. In the self-learning PID, controller parameters KP , KI , and KD are treated as neural networks weights and they are adjusted using neural networks algorithm. The selflearning algorithm is operated iteratively and is developed using Lyapunov method. Hence, the convergence of the learning algorithm is guaranteed. Simulations show its successful performance.
(c) angle speed Fig. 3 Set-points tracking performance of PIDFC
392
X. Yuan, Y. Wang
(a) angle
(a) angle
(b) errors of angle
(b) errors of angle
(c) angle speed
(c) angle speed
Fig. 4 Set-points tracking performance of RNC
Fig. 5 Set-points tracking performance of SLPID
Neural networks based self-learning PID control of electronic throttle Acknowledgements This work has been partially supported by the National Natural Science Foundation of China (No. 60775047), and the National High Technology Research and Development Program of China (No. 2008AA04Z214).
References 1. Kim, D., Peng, H., Bai, S., Maguire, J.M.: Control of integrated powertrain with electronic throttle and automatic transmission. IEEE Trans. Control Syst. Technol. 15(3), 474–482 (2007) 2. Aono, T., Kowatari, T.: Throttle-control algorithm for improving engine response based on air-intake model and throttle-response model. IEEE Trans. Ind. Electron. 53(3), 915–921 (2006) 3. Deur, J., Pavkovic, D., Peric, N., Jansz, M., Hrovat, D.: An electronic throttle control strategy including compensation of friction and limp-home effects. IEEE Trans. Ind. Appl. 40(3), 821–834 (2004) 4. Ozguner, U., Hong, S., Pan, Y.: Discrete-time sliding mode control of electronic throttle valve. In: Proceedings of 40th IEEE Conference on Decision and Control, Orlando, FL, pp. 1819–1824 (2001)
393 5. Nakano, K., Sawut, U., Higuchi, K., Okajima, Y.: Modelling and observer-based sliding-mode control of electronic throttle systems. ECTI Trans. Electr. Eng., Eletron. Commun. 4(1), 22–28 (2006) 6. Baric, M., Petrovic, I., Peric, N.: Neural network-based sliding mode control of electronic throttle. Eng. Appl. Artif. Intell. 18(8), 951–961 (2005) 7. Rossi, C., Tilli, A., Tonielli, A.: Robust control of a throttle body for drive by wire operation of automotive engines. IEEE Trans. Control Syst. Technol. 8(6), 993–1002 (2000) 8. Vasak, M., Baotic, M., Petrovic, I., Peric, N.: Hybrid theory-based time-optimal control of an electronic throttle. IEEE Trans. Ind. Electron. 54(3), 1483–1494 (2007) 9. Prokhorov, D.V.: Training recurrent neurocontrollers for real-time applications. IEEE Trans. Neural Netw. 18(4), 1003–1015 (2007) 10. Griffiths, P.G.: Embedded software control design for an electronic throttle body. M.S. thesis, Department Mechanical Engineering, University of California, Berkeley (2002) 11. Li, Y., Ang, K.H., Chong, G.: PID control system analysis and design. IEEE Control Syst. Mag. 26(1), 32–41 (2006) 12. Ang, K.H., Chong, G., Li, Y.: PID control system analysis, design, and technology. IEEE Trans. Control Syst. Technol. 13(4), 559–576 (2005)