Gray-Box Modeling of Electric Drive Systems Using Neural Networks Roberto Rivera, Miguel Vélez-Reyes Center for Power Electronics Systems Department of Electrical and Computer Engineering University of Puerto Rico-Mayagüez Mayagüez, PR 00681 USA Email: email@example.com, firstname.lastname@example.org Abstract the electrical model of an electric drive machine. The remaining part of the model is due to any unknown or Modeling of Electric Machines coupled to complex partially unknown dynamic of the system to model. nonlinear system may become a challenging task. This part of the model is a black-box type of model. However design of high performance control systems One characteristic of black-box models is that they do for these situations requires accurate models. Gray-Box not depend on the system but on the data collected. It modeling is presented in this work as a possible solution become useful as in the case when electric drives have to the modeling problem of electric machines. In gray- complex loads that may have unknown defects, causing box modeling the system model is partitioned into a phenomena such as backlash. In this case a designer known and an unknown part. The known part of the may perform numerous and complicated test and then model is derived from physical principles while the obtain a model for the whole system but it time and unknown part is modeled using a black-box model. We computationally expensive. In this case an adjustable investigate the use this modeling approach for electrical black-box model could be used in order to model all the machines used in electric drives. In the case of unknown behavior of the system. electrical, machines the electric part of the system is In this work an integrated gray-box model is proposed well understood from the corresponding governing developed and studied in the modeling of a DC motor physical laws, while the mechanical part of the system drive system. Neural networks are used to construct the could be too much complex or unknown. In this paper black-box model. The reason to use neural networks is we present the use neural networks as the black-box their adaptive and nonlinear nature. models for the mechanical part. Our expectation is to The work is presented here as follows. First the concept use these models in a self-commissioning scheme, of gray-box models will be presented. Next the study making the drive controller capable of tune its case will be presented throughout simulations. The parameters for a wide range of mechanical loads. The problems found and the tools used to solve will be performance of this modeling approach is investigated presented. Finally the concluding points and future for a DC drive system. work will be presented 2. Gray-Box Modeling 1. Introduction When dealing with real systems engineers often face the Modern control strategies for electric drives require fact that sometimes physics principles are no enough to accurate knowledge of the machine parameters and model the complete system under their study. However operated load. While this two conditions are of extreme the non-idealities they face may be concentrate only in importance, comply with them is very hard using classic some part of the system or may they affect only some methods. When mechanical loads in electric drives are part of the system. In this case the engineer may use a highly nonlinear extreme care should be take at the time new approach called gray-box modeling  to model of the parameter estimation. Addition of mechanical the system. In gray-box modeling a given system model defects to the system makes even more critical the is split into two main parts, a part which model is easily situation for the designer. found using physics principles and a part which model A new methodology to overcome the modeling is unknown. As an example using a state space model difficulties just mentioned is presented in this work. In as in (1). this methodology a system model is partitioned into different parts. One part is of physical nature, and is derivable from physics principles. This is the case of x(t ) = f (x(t ), u (t )) & dI a (t ) = − a I a (t ) − a ω (t ) + Va (t ) (1) R K 1 dt La La La (4) We assume that the system is partially known so we can dω (t ) split it as in (2), where g(· ) is the known part of the = A1 I a (t ) − A2ω (t ) − BB (ω (t )) dt system and h( · ) is the unknown part. In (4) the contribution of motor speed from (3) are x(t ) = g (x (t ), u (t )) + h(x(t ), u(t )) & (2) substituted by a black-box model BB(ω(t)). In this case the black-box model used is a neural network. Notice The additive relation before is a merely example since that further information about the system is used in other relations are admissible too. selecting the structure for the neural network modeling the mechanical subsystem of the motor. The 3. Study Case comparison between the model and the system is gives in Fig.2 A. The system A permanent magnet DC motor drive is presented in Fig. 1. The motor is connected to a Fan load, which is assumed to be unknown. Figure. 1. Schematic of the DC drive system Figure. 2. Transformation of the DC drive model It is known that Ra, La, and Ka are the armature resistance, inductance, and the armature constant, while The neural network structure is based on the Ia(t), and Va(t) are the armature current, and voltage .Jm, structure of a single parametric function called neuron and Bm represent the inertia, and viscous coefficient or node. A neuron in a neural network is a multiple respectively. The parameter µ is a constant, which is input single output basis function composed of a weight related to the fan characteristics. The motor speed is matrix W, a bias d, and a transfer function ϕ (⋅ ). A ⋅ represented by ω(t). single node is shown in Figure. 3. The state space model for the drive system is: dI a (t ) = − a I a (t ) − a ω (t ) + Va (t ) R K 1 dt La La La (3) dω (t ) K a B = I a (t ) − m ω (t ) − µ sign(ω (t ))ω (t ) 2 dt Jm Jm Figure. 3. Neuron model Neurons are grouped in layers. Each layer has as In the remaining of the text it is assumed that the load input the outputs of the preceding layer, beginning with is an unknown function of the motor speed. the input of the network. These inputs may be also composed from the outputs of the following layers B. The Gray-Box Model outputs. These two types of networks are called feed With the assumptions made above a gray-box model forward and feedback or dynamic neural networks. is constructed as in (3). Neural networks have been proven to be excellent function approximator’s . A possible problem with the use of a neural network is the possible large number For experimental purposes the drive is simulated under of parameters needed to obtain an accurate model, the rated operation conditions using the Matlab™ which may cause problem in the parameter estimation software package. The simulated data is collected and (training) phase. used in the identification of the model parameters. The initial parameters used for the electrical part of the 4. Nonlinear Least-Squares Parameter model are selected close to the real values, actually Estimation within the 15% of error from the rated values. Using a 4-6-1 feedforward neural network the gray-box Physical parameter estimates and network weights are state-space (18) model is obtained. dI a (t ) Rˆ Kˆ = − a I a (t ) − a ω (t ) + V (t ) computed by minimizing a quadratic cost function. The 1 nonlinear least-squares parameter estimation problem dt Lˆ Lˆ ˆ a L a a a can be formulated as the optimization problem: dω (t ) = A1 I a (t ) + A2ω (t ) (10) θ = arg min S (θ ) ˆ dt + Wc tanh (Wb tanh (Wcω (t ) + d a ) + d b ) (5) θ Where θˆ is the estimate of θ and : n n The parameter vector (11) is obtained after arrange S (θ ) = ∑ r (θ ) =∑ [y i 2 i − f i (θ )]2 = Y − f 2 (6) every matrix in the network as a row string vector rs(⋅). i =1 i =1 [ è = Ra La K a A1 A2 rs Wa rs Wb rs Wc rs d a rs db ˆ ˆ ˆ ] T (11) Is the quadratic cost function that measures the two norm of the model prediction error. The standard A view of the Singular Values of the Jacobian on Fig. 4. method to compute the parameter estimate is given by show the ill-conditioning problem of the parameter the Gauss-Newton method. estimation problem for this model the conditioning θˆ (a +1) = θ (a ) + ρ (a ) ˆ (7) number for the 46 parameter vector is 1020. Where θ (a ) is the parameter estimated at the ath iteration ˆ and ρ (a) is the Gauss-Newton search direction computed by solving the least-squares problem. ρ = arg min r ( a ) − J (a ) ρ (8) θ with r (a ) = y − f (θ (a ) ), ( ) J (a ) = J (a ) θˆ (a ) = ∂f ∂θ (9) θ =θ ( a ) 5. Implementation and Simulations Results Figure. 4. Singular Values of the Jacobian for the Gray- Box model For the case of study the parameters drive systems are given it Table 1 . The motor is a 220 V, 550 rpm and This problem suggests the use of a regularized 1hp permanent magnet DC motor. version for the Gauss-Newton method for the estimation. Table 1 Parameters of the Experimental Case A. Truncated SVD for Gauss-Newton method Armature Resistance Ra 7.56 Ω A way to mitigate the effect of small singular values is Armature Inductance La 0.055 H to discard the contribution due to small singular values Torque Coefficient Ka 3.475 N-m/A keeping the first few terms of (12). The theory behind Viscous Friction Coefficient Bm 0.03475 N-m-s this alternative method is given on  and so it will not Fan Torque Coefficient µ 0.0039 N-m-s2 be discussed here. Briefly the TSVD version of the Inertia Jm Kg/m2 Gauss-Newton method computes the iterative search direction based on a truncated version of the search direction vector. The search direction is computed then as: k T r ρi = ∑ ui vi (12) i =1 σi where k is the regularization parameter (number of parameters to estimate) and k ≤ np, the number of parameters to estimate. In this k is incremented as function of the residual error each iteration. B. Simulation results After four iterations the estimation algorithm converged. The electrical parameter estimates and their percent errors are shown below. Table 2 Electrical Parameter Estimates Parameter Estimate % Error Rˆ 7.77 2.78 a ˆ La 0.0569 3.53 ˆ Ka 3.5688 2.70 The forty-six black box parameters aren’t show since they have no physical meaning. The performance of the identified model and system is presented on Figure. 5a and 5b, for different transients. 6. Conclusions and Future Work Figure. 5. a. System and model response to an input voltage step. b. System and model response to an input voltage ramp. The modeling approach presented before allowed identifying physical and non-physical parameters. The . convenience of this model is that the identified physical parameters would allow classical control while the References neural network based black-box model part would allow to model different types of loads independently of their  J. Eriksson, Optimization and Regularization of actual form. Nonlinear Least Squares Problems, Ph.D. Thesis, There still some questions to answer about this Department of Computing Science, Umea approach. First is need to be answered the question of University, Sweden, 1996. the number of network parameters needed and how to  F. Girosi, and T. Poggio,“Neural Networks and best condition the estimation of the parameters. How other approximation property,” Biological Cybernetics, estimation methods may be applied to improve the 63, pp.169-176. computational resources use. It need to be answered  R. Rico-Martinez, J.S. Anderson and I. G. how this approach may be used with dynamic or higher Kebrekidis, “Continuous-time nonlinear signal order loads. The work ongoing is intending to answer processing: a neural network based approach for some of these questions gray box identification,” in Proc. IEEE Workshop on Neural Networks for Signal Processing, pp. 596 – 605, Oct. 1994.  S. Weerasooriya and M.A. El-Sarkawi. “Identification and control of a dc motor using back- propagation nerual networks”, IEEE Trans. on Energy Conversion. 6, pp. 663-669, Dec, 1991.