Parameters Identification of a Direct Current Motor Using the Trust Region Algorithm

In this paper, the trust region algorithm was used to identify the parameters of the dynamic model of a permanent magnet direct current (PMDC) motor, using the MATLAB/Simulink Parameter Estimation tool. The objective was to estimate the parameters applying the square wave, pseudo-random binary sequence (PRBS) and random signals in the motor excitation. The obtained models were evaluated in open and closed loop, where a speed control project was applied using the entire eigenstructure assignment. The error between the simulated and real curves of velocity and current were evaluated by means of the normalized root mean squared error (NRMSE).


I. INTRODUCTION
Many industrial processes that require position control, variable speed, constant torque, rapid acceleration and deceleration make use of direct current (DC) motors [1]. However, to control systems, it is often necessary to use model-based control techniques, e.g., eigenstructure assignment, state estimator, robust control, and optimal control. Thus, to design controllers and satisfy performance criteria, it is fundamental to know the dynamic model of the system. For control purposes, it is not necessary to find an exact mathematical model, but it is necessary to have a model that contemplates its main dynamics. One of the great problems in controlling DC motors is the lack of information regarding the parameters that constitute the mathematical model. Often the motor is worn out due to its use, which makes its information out of date. Thus, a model with imprecise parameters can reduce the efficiency of a control system [2]. In this context, the study presents a methodology found in [2] to estimate the parameters of the dynamic model of a permanent magnet direct current (PMDC) motor, using the Parameter Estimation tool of the MATLAB/Simulink software. For the practical realization of the study, the Maxon Motor F2140 shown in Fig. 1 was used. The work is organized as follows. Section II presents the dynamic model of a DC motor. In Section III the trust region method is explained. Section IV shows the parameters identification using the trust region algorithm. In Section V is presented the tracking control system with state feedback and entire eigenstructure assignment. Section VI presents the results. Section VII concludes this paper.
II. DC MOTOR DYNAMIC MODEL Consider the armature circuit shown in Fig. 2.

Fig. 2: Electric circuit of a PMDC motor.
The parameter is the supply voltage of the armature, is the armature resistance, is the inductance of the armature coil and is an induced voltage that opposes the supply voltage. It is possible to equate the equivalent circuit of the motor in (1), using the Kirchoff laws. The parameters and can be rewritten as a function of the current , as presented in (2).  (5), (6) and (7) into (4), the differential equation in (8)  where is a torque constant. With the electrical and mechanical characteristics equated in (2) and (8), they can be rewritten for the armature current in (9) and angular velocity in (10). where is the vector of states and the notation of the point indicates the time derivative, is the vector of inputs, is the vector of measured outputs and , , and D are constant matrices for a linear system [3]. Then, (12) and (13) represent the state space form of (9) and (10).
[̇̇] = In this way, the block diagram in Fig. 3, represents the dynamics of the PMDC motor. According to [4], parameter estimation methods for nonlinear systems can be applied to linear systems, this is possible because the class of linear systems is a subset of the class of nonlinear systems. In this sense, the Trust-Region optimization algorithm is used to estimate the PMDC motor parameters, through the Parameter Estimation tools from MATLAB/Simulink software. The purpose of the method is to find a vector ̂ that minimizes the expression in (20). The adjustment of the parameters vector using the trust region algorithm is done through an iterative process starting from an initial vector 0 . Most methods of minimization usually choose the direction of the step and then decide on its size. However, the trust region method determines an upper limit for the size of the step to be given and then find the direction to be taken [5]. The step size is restricted to each iteration , by the radius of the trust region ℎ , centered in as shown in Fig. 4.

International Journal of Advanced Engineering Research and Science (IJAERS)
[   This approach consists of determining the parameters , , , , and , present in the block diagram of Fig. 3, using the MATLAB/Simulink Parameter Estimation tool, which is widely used for estimation and optimization of model parameters based on experimental data. To use the Parameter Estimation tool, it is necessary to create a block diagram according to Fig. 3 to represent the dynamic model of the PMDC motor. The diagram created in MATLAB/Simulink is shown in Fig. 5, and it can be seen that = was adopted to reduce the number of variables and simplify the estimation.  As shown in Fig. 6 it is necessary to perform four steps, which summarize the procedure of configuration and execution of the estimation process: 1. It is necessary to select the parameters to be estimated and optionally the initial conditions and limits. The configuration window is shown in Fig. 7 and Table 1 shows the settings used for each parameter. The value of the scale setting can be used to normalize the data.   .org/10.22161/ijaers.4.12.24  ISSN: 2349-6495(P) | 2456-1908(O) www.ijaers.com Page | 165 2. It is necessary to import the experimental data obtained from the real system. The armature current ( ) and the speed of the rotor ( ) are the output data. The armature voltage ( ) is the input data. Fig. 8 shows that for each of these data it is necessary to provide an array of two columns, the first column is a time vector, and the second column is the data itself. 3. This step consists in the configuration of the estimation options, such as tolerances, methods and algorithms. Fig. 9 shows the estimation configuration window and Tables 2 and 3 show the settings used in this work. The Parameter Tolerance option causes the estimation process to end when the parameter variation is less than the specified value. The Function Tolerance option causes the estimation process to end when the cost function variation is less than the specified value. Finally, the Maximum Iterations option defines the maximum number of iterations allowed in the estimation process.   1e-09 100 4. After performing the previous steps, the estimation process is started. The Parameter Estimation tool calculates the cost function by comparing the experimental data obtained from the real system with data obtained using the model created in MATLAB/Simulink. Fig. 10 shows a complete estimation and the values of the parameters obtained for a given experiment. Fig. 10: Complete estimation process. This procedure was performed for three different approaches, each using an excitation signal. As shown in Figs. 11a, 11b and 11c, respectively, the used excitation signals were square wave, pseudo-random binary sequence (PRBS) and random. (c) Random signal.

V. TRACKING SYSTEM WITH STATE FEEDBACK
The dynamic model obtained for the PMDC motor was validated in closed loop through a speed control using a tracking system with state feedback, which was also applied in the real plant to compare the results.

International Journal of Advanced Engineering Research and Science (IJAERS) [Vol-4, Issue-12, Dec-2017] https://dx.doi.org/10.22161/ijaers.4.12.24 ISSN: 2349-6495(P) | 2456-1908(O)
Consider the block diagram in Fig. 12 The vector = represents the outputs that are required to follow the input vector that consists of piecewiseconstant command inputs [7]. Fig. 12: Block diagram for the tracking control system [7]. This control approach uses an integrator that makes the error between the reference and the controlled state go to zero when the system is in steady state [7]. Therefore, to determine the gains 1 and 2 that allocate the eigenvalues of the closed-loop system in the left halfplane, it is necessary to add in equation (27)   for = 1,2 … , . The notation ( ) is used to define the space called null that contains the eigenvectors [ ] in order for (40) to be satisfied [7]. Equation (41) can be used to form the matrix equality in (43).
The matrix ̅ is obtained through (43) and is presented in The eigenvalues can have repeated numbers equal to the system inputs. This is because the null space has a dimension equal to the number of inputs. In this way, a repeated eigenvalue is associated to a vector of the basis of the null space. Thus, all the columns of the matrix remain linearly independent and, therefore, the matrix −1 exists [7].

VI. RESULTS
The parameter estimation procedure was performed for each excitation signal: square wave, PRBS and random. The curves resulting from the estimates are shown in Figs. 13, 14 and 15, respectively.  By analyzing the results, it can be verified that the parameters identified for the PMDC motor are very close to the actual parameters provided by the manufacturer, as shown in Tables 4 and 5.  10.7 To evaluate the quality of the estimated parameters, three validation signals were applied in the real motor and in the simulated models as shown in Figs. 16, 17 and 18, respectively, the step, sinusoidal and triangular signals. Table 6 shows the results of the comparisons between the curves obtained experimentally and through the simulation. In Table 6, a higher value of the normalized root mean square error (NRMSE) criterion indicates a greater proximity between the compared curves and, therefore, indicates a better result. Thus, an NRMSE value of 100% indicates that the curves are the same. In Table 6, the NRMSE for the armature current ( ) presents small values, this is because there were nonlinearities in the model that were not considered, e.g., the Coulomb's friction and the dead zone of the motor (i.e. for a range of applied voltages, the motor does not rotate). These nonlinearities are significant when the motor passes through the zero speed point when rotating in both directions [2]. However, as this work assumes that the mathematical model of the PMDC motor is linear, the results are considered satisfactory. In addition, it can be verified that the results of the models identified for the square wave, PRBS and random signals were close and it is not possible to indicate the best result.  The Table 7 presents, for the control responses, the comparison between the curves obtained experimentally and the curves obtained through the simulation. It can be verified that for the control project, the simulated model satisfactorily described the actual PMDC motor, since the speed responses for all references were close to the experimental responses. VII. CONCLUSIONS In this work, the trust region algorithm was applied to determine the parameters of a PMDC motor. Three excitation signals were used and the efficiency of the method was verified for the three cases, all the identified models satisfactorily represented the behavior of the PMDC motor. In order to arrive at the results the models were validated in open-loop applying the step, sinusoidal and triangular signals, and comparing the curves of velocity and armature current, obtained experimentally with the curves obtained in the simulation. Then, these models were evaluated in closed-loop, where a tracking system with state feedback was applied for speed control. The experimental responses were satisfactorily close to the simulated responses. It is concluded that, in practice, the estimation of PMDC motor parameters by the trust region method with the Parameter Estimation tool is simple to use and efficient. The next step will be to compare this identification method with traditional methodologies and also using Kalman Filter Unscented.