Parameter estimation of DC motor through whale optimization algorithm

Received Jul 3, 2018 Revised Sep 4, 2018 Accepted Nov 10, 2018 This article estimates the unknown dc motor parameters by adapting the adaptive model with the reference model created by experimental data onto armature current and speed response from separately excited dc motor. The field flux dynamics, which is usually ignored, is included to model the dynamics of the motor. The block diagram including the flux dynamics and model parameters is considered as the adaptive model. The integral time square error between the instant experimental data and the corresponding adaptive model data is taken as cost function. The Whale optimization algorithm is used to minimize the cost function. Additionally, to improve the performances of optimization algorithm and for accurate result, the experimental data is divided into three intervals which form the three inequality constraints. A fixed penalty value is added to the cost function for violating these constraints. The effectiveness of estimation with two different methods is validated by convergence curve. Keyword:


INTRODUCTION
For designing a proper controller to achieve the specific responses without affecting the stability of the system requires the dynamic model of any system. This demands the exact value of system parameters. Data sheet of some system parameters can be used to model the system if given, otherwise it can be determined through experiments. However, it is difficult to determine all the parameters through experiments. In addition to that, the accuracy of determined parameters mainly depends on the accuracy of measuring instruments. In order to overcome the above difficulties, the actual system can be designed in the form of block diagram considering all dynamic behaviours and the values are optimised in such a way that the responses from block diagram model named as adaptive model will exactly match with the corresponding response from actual (reference) system model. The performances of parameters estimation depend on accuracy of adaptive model, accurate experimental data of reference model, the selection of cost function and ability for minimisation of optimisation algorithms. The estimation by measuring system data is called an experimental (inductive) identification. There are two methods of experimental estimation one online and other offline. In offline identification the measuring of the system data is recorded, and a mathematical model is created after the whole measuring process has finished. The online identification is where the computation of the adaptive parameter model occurs to the online measuring process data. In online, the stability criterion must be formulated before online process begins otherwise the system will not be converged.
This article is exclusively focused on the offline estimation of dc separately excited motor. Though 80% of industries use three phase induction motors, still DC motors plays an important role in industrial control system due to easy control. Data provided by manufacturer may not be adequate and accurate,  [4]. Least square and recursive least square methods were used for identification of parameters in [5], [6]. The inverse theory was also applied for estimation of parameters [7]. Moment method was used for identification of parameters in [8]. Parameters estimation and control variable of dc motor were determined by neural network [9]. Algebraic identification technique was used for parameter estimation of dc motor in [10], [11]. DC motor parameter identification approaches based on the Taylor series expansion of the motor speed response was presented in [12]. Integral time square error (ITSE) and Integral time absolute error (ITAE) were used for parameter estimation and design of control variables in [13]- [15]. In this article, effort has been made to find the seven unknown parameters of separately excited dc motor named as: armature resistance, armature inductance, field resistance, field inductance fictitious mutual reactance, and Moment of Inertia and Viscous friction coefficient. The experimental data onto armature current and speed responses with respect to time are collected through data acquisition board from separately excited motor which runs for full rated voltage with load torque of 50 N-m using current sensor and voltage sensor respectively. The dc motor model including the effect of flux dynamics is built in MATLAB environment with randomly chosen initial parameters. The error between response from experimental data and that of adaptive parameters of adaptive model is used to formulate the cost function. The cost function is based on different integral criterion is well defined in control engineering [16]. The Simpson's one-third rule is used for integration of objective function. The minimisation of the cost function in order to adapt the response from adaptive model to the experimental response can be realised through recent published Whale optimisation algorithm [17]. The mechanical and electrical parameters of dc motor are identified by Constraint Optimization Technique using MATLAB code and MATLAB Parameter Identification Toolbox [18]. An overview of different optimization algorithms that is used to achieve optimal design of an electrical machine is mentioned in [19]. PSO is used for parameter estimation of a Nonlinear Auto-Regressive with Exogenous (NARX) model for dc motor [20]. Grey Wolf Optimization [21] and Bio -Inspired Optimization Algorithm [22] is used for parameter estimation of PMDC coreless micro-motor. The dc motor parameter is evaluated accurately by the recently published Flower Pollination Algorithm (FPA) [23] and Nelder -Mead Optimisation [24].
In this article, the dynamic model of DC motor is modified to include the field flux dynamics which otherwise affects the accuracy of estimation because the flux dynamics affect the transient response of the motor. Secondly, the experimental data is divided into three intervals: rise time, settling time and steady state, which form the three inequality constraints and a fixed penalty is added to the cost function for violating these constraints. Here two methods are used: 1 st method is with whole data and 2 nd method is with the data divided into three intervals. A comparison of the two methods shows that the 2 nd method gives better result than the 1 st .

MODEL OF SEPARATELY EXCITED DC MACHINE
The model of separately excited dc motor is developed by incorporating the initial dynamic behaviour of the field current which exhibit the flux dynamics. Though the flux is constant under steady state condition, but dynamics of flux exist initially due to field inductance which affects the responses of speed and armature current. For accurate estimation of motor parameters, the effect of dynamics of flux must be included while modelling the dc machine. The modified model which includes the effect of dynamics of flux as shown in Figure 1. The back emf induced can be written as: where Φ is the flux per pole and can be represented as: where N is the number of turns in the field winding and ℜ is the reluctance of magnetic material. P, Z and A are pole, total number of armature conductors and number of parallel paths of armature winding respectively. The fictitious mutual inductance is denoted as L ℜ the dynamic behaviour of excitation current i can be written in the form of: the frequency domain form of (1) is as: the dynamic equations governed by the armature can be expressed in the form as: where L i i is the torque developed in the machine. The frequency domain form of 3 and 4 can be represented as: where ia, ωm, T and V are the armature current (ampere), mechanical speed (rad/sec) , load torque and armature voltage (Volt) respectively. The block diagram of DC motor using 4 and 5 is represented as shown in Figure 1. The seven unknown parameters Ra, La, L , J, B, L and R are armature resistance(Ω), armature inductance(H), fictitious mutual inductance, moment of inertia (kg-m 2 ), viscous friction (Volt-sec/rad.), field inductance and field resistance respectively. The block diagram of dc motor with these seven unknown parameters is represented as adaptive model. In this article, efforts are made to determine the above seven parameters through an optimisation algorithm.

EXPERIMENTAL DATA COLLECTION
Since the estimation of parameters is based on the experimental responses from speed and armature current in this article, the accuracy of estimation of parameters mainly depends on the experimental responses to speed and armature current. This demands the accurate collection of speed and armature current data. The separately excited motor runs for the rated armature voltage under no load condition and 50 N-m loaded conditions. The optical encoder was used to measure the speed response. Armature current response was measured by Agilent1146A Hall-effect probe. Data onto speed responses and current responses were collected through the data acquisition board of LABVIEW developer. A high pass filter was used to filter out the noise content of the data and send to computer. The conversion ratio was adopted for speed and armature  table) and adaptive model (block diagram of dc motor) is placed in one simulink file. The seven unknown parameters are adapted though an optimisation algorithms by creating a cost function. The values are adopted though the iteration process of optimisation algorithm in such a way that the response from adaptive model will tend to match with the corresponding response to reference model the model is repeatedly called through a MATLAB command 'sim'.

CONVENTIONAL METHOD
The unknown parameters can be identified through mathematical formulation using experimental data of armature current, speed and field current with two different load conditions. Only three data points of each response, two consecutive data at starting time for determination of electrical, field and mechanical time constant with the steady state data points for two different loads are required. The starting slope of armature current, field current and speed responses are termed as electrical field and mechanical time constants and denoted as , and respectively. The steady state current and speed data with two different loads are denoted as , , , and respectively. The is the steady state field current and and are the two different load torques. The errorless of parameter estimation depends on the preciseness of data information and sampling time. However, the accuracy of parameter estimation is also affected because of armature reaction, no information of brush contact drop, effect of leakage flux and nonlinear effect of B-H curve. The mathematical formulation for estimation of parameter is as follows.

COST FUNCTION
Two methods are used to define the cost function. In 1 st method the whole data is processed by defining one cost function whereas in 2 nd methods the data is divided into three intervals. The 1 st interval is up to rise time, the 2 nd one is the oscillating region and third one is the steady state region. The time limit of three cost functions used in 2nd method is different, and the overall cost function is sum of the three independent cost function. The three inequality constraints are defined considering each independent function. The violation of independent cost function is penalised by fixed penalty value.

1 st method
To match the adaptive response with the corresponding experimental response the optimisation algorithm is used which minimises the cost function. In this problem the integral of time squared error between experimental data and adaptive data is considered as the cost function. Mathematically it can be written as: Simpson 1/3 rule is used here to develop MATLAB program for integration. The X represents the seven unknown variables of dc motor. The data is collected for 2 seconds. The whole data is used for adaption in 1st method.

2nd method
In order to improve the performances (minimisation of error), the data of speed response are analysed and divided into three intervals. The penalty is added for violation of constraints. The three intervals behave as three independent functions. The cost function is written as: (9) The inequality constraints are: For violation of (11) in any iteration of optimisation algorithm, the penalty is imposed in cost function and it is shown as: * 1 2 3 The penalty value, a, b, c must be carefully chosen so that the optimisation will be converged towards zero. The three functions are represented based on the three interval of speed response as: * .

WHALE OPTIMIZATION ALGORITHM (WOA)
The humpback whale is known for their special hunting method. They search the prey. Once search of prey is over, encircling and attacking the prey was carried out. The mathematical model of searching, encircling and attacking is expressed as follows: Searching for prey is the exploration phase which is carried out by whales randomly according to the positions of each other. The mathematical model is as follows: The position is updated by If random values ' A' greater than 1 or less than −1 are to force search agent to move far away from a reference whale. The behaviour of encircling can be represented by the following equations: after the best search agent is defined, the other search agents will hence try to update their positions towards the best search agent.
where' t' indicates the current iteration, ⃗ and ⃗ are coefficient vectors, * ⃗ is the position vector of the best solution obtained so far, ⃗ is the position vector, | | is the absolute value, and 'ꞏ' is an element-by-element multiplication.
The vectors ⃗ and ⃗ are formulated as follows: where ⃗ is linearly decreased from 2 to 0 over the course of iterations (in both exploration and exploitation phases) and ⃗ is a random vector in (0,1). There are two attacking approaches (exploitation phases). One is Shrinking encircling mechanism for 'a' lying between 0 to 1 in 2D space. In this case the 15 and 16 are used. The second is Spiral updating position based on value of random no 'p'. The mathematical model is as follows: where ⃗ * ⃗ ⃗ and indicates the distance of the i th whale to the prey (best solution obtained so far), b is a constant for defining the shape of the logarithmic spiral, l is a random number in (−1,1).
The WOA starts with a set of random unknown parameters of dc machine. The position of each whale must have seven dc machine parameters which are updated to find out the best solution that is the adaptive response will match with the corresponding experimental data response. The parameter 'a' is decreased from 2 to 0 to provide exploration and exploitation with increase of iteration. For updating the position of search agent, the two procedures are adopted. For | ⃗ | > 1 the random solution is selected (14) but for | ⃗ | < 1 the best solution is selected (16) based on cost function as in Equation (8/9). Depending on the value of p, the search agent is able to switch between either a spiral or a circular movement as in (19). Finally, the WOA algorithm is terminated by the selection of a termination criterion or fixed iteration.

PERFORMANCE EVALUATION STATISTICS
The preciseness of estimation of parameter can be judged by the statistics between the experimental data and adaptive data values and expressed as: Mean Error (ME) ∑ . (21) where is the number of data point.

RESULTS AND DISCUSSION
The parameters of separately excited dc motor can be determined by performing the various experiments in laboratory and might also be given in machine specification data sheet. But, however, it is difficult to ascertain the exact value of parameters because of inaccuracy of measuring instruments. Therefore, the adaptive method is the best solution for determination of unknown parameters of the system.
The data of speed response and current response corresponding to time are collected from separately excited dc motor at rated voltage and with load torque of 50 N-m by using the speed encoder and current sensor for 2 seconds. Two look up tables are formed based on the speed and current response data in MATLAB simulink environment. The block diagram of DC motor is shown in Figure 2 is also placed in same MATLAB simulink file. The block diagram of dc motor will act as adaptive model because of unknown parameters that are updated at each iteration. The responses of lookup table model will act as reference model. The current responses of reference and adaptive models are stored in the workspace 'arm_current', whereas the speed responses are stored in 'speed'. The model should be stored by certain name. By calling this name through 'sim' command the responses are passed to the cost function.
where, |e t | and |e t | is the difference of reference speed and adaptive speed and reference armature current and adaptive current respectively. The time increment (h) is chosen to 0.005. In order to get the better result, the current and speed response of experimental data are divided into three intervals. The cost function for current responses with constraints for three intervals is shown in (11). Similarly, the speed response cost function should be defined. The overall cost function is formulated as in (19). The penalty value adopted here is 1000. The total numbers of Whales are 10 Table 1 and where, |e t | and |e t | is the difference of reference speed and adaptive speed and reference armature current and adaptive current respectively. The time increment (h) is chosen to 0.005.
In order to get the better result, the current and speed response of experimental data are divided into three intervals. The cost function for current responses with constraints for three intervals is shown in (11). Similarly, the speed response cost function should be defined. The overall cost function is formulated as in (19). The penalty value adopted here is 1000. The total numbers of Whales are 10 and the number of iterations considered here is 100. The best optimal converge value of the cost function found by WOA are 13.39 in 1st method and 6.6082 in 2 nd method. To get the best optimal converge value, both the methods run for number of times. The smaller number of runs is required to get the best optimal converge value in 2 nd method compared to 1st method. The run time for each run is different. The average run time in 1 st method is 1455 second, but in 2nd method it is less and found to be 720 second. The number of iterations required is less in 2 nd with comparison to 1 st method. The mean error and standard deviation error of speed response are -1.0191 and 2.8180 respectively in 1 st method, whereas in 2 nd method the above coefficients are found to be -0.4711 and 1.0796. Similarly, for current response, the mean error and standard deviation error values are (-29.4094, 42.4488) for 1 st method and (-12.6852, 13.4926) for 2 nd method. The statistical error analysis with respect to the data sheet of machine confirms the 2nd method gives better parameter estimation compared to the 1st method. The current response and speed response of both methods are compared with experimental data points as shown in Figures 3(a, b). The convergence curves of cost function for both methods with different independent runs are represented in Figures 4(a, b). . Converge curve of cost function of 2 nd method respectively using WOA algorithm

CONCLUSION
The parameters of separately excited DC motor can be determined by performing the required number of experiments. The accurate estimation may be affected due to error in the measuring instruments or by approximation of mathematical analysis. In addition, some parameters are difficult to measure as for example the viscous friction. The conventional method given in this article may be the 2 nd choice of identification of parameters. However, this method also does not accurately determine the parameters because of wrong estimation of time constants, particularly the armature time constant which is affected by coupling effect of field behaviour. The optimisation algorithm can be utilised to adapt the parameters through a cost function to track the experimental response data by running the machine at rated value. This requires the accurate dynamic model. The dynamics of flux behaviour is the major responsible for affecting the electrical and mechanical time constants. Therefore, this article proposes the dynamic model of separately excited dc motors which takes care of the dynamics of flux behaviour. In this article, the Whale optimisation algorithm is used to minimise the cost function -one for complete periods of experimental data and other by making the whole period of experimental data onto different intervals. The statistical analysis and estimated parameters compared with the data sheet parameters of different interval segment method show better results in comparison to the whole period of experimental data.