OPTIMAL PARAMETER VALUES OF PID CONTROLLER FOR DC MOTOR BASED ON MODIFIED PARTICLE SWARM OPTIMIZATION WITH ADAPTIVE INERTIA WEIGHT

35 easy realization, the PID controller has played the most important role as the heart of control engineering practice in the close loop control systems. Traditional PID techniques suffer from complex, time-consuming implementation and often generate significant overshooting non-customized performance measure and inadequate process information. To hold basic properties intact, the control system must be configured to face all system disturbances [2]. Incorrect tuning of the PID parameters may lead to slow recovery, poor robustness and poor results and the worst case scenario will be the failure of the system. The main message brought by this paper is to demonstrates how the information from the process step response may be successfully used for finding certain PID parameters, which satisfy a relatively demanding magnitude optimum criterion and for a wide variety of process models [1, 2]. Therefore, the proposed approach finds the optimum values for the PID controller based on modified PSO in order to improve the performance of the control system, reduce the steady-state error percentage to zero, and increase the speed of the system’s response.


Introduction
In all engineering and industrial systems, electric drives are typically an essential feature, such as pumps, fans, mills, conveyor belts, elevators, and many others. Indeed, the DC motors are widely used in the mechanisms that require high accuracy control of speed such as biomedical and robotics [1].
The controller of the DC motor may be of any kind, such as Proportional-Integral-Derivative (PID) [2], neural network (NN) [3], fuzzy logic (FL) [4]. Speed control of the DC motor by conventional PID controllers is well known and their objective is a good performance that includes minimization of the steady-state error, minimization of overshoot, minimization of rise time and minimization of settling time. PID controllers are a very efficient solution to obtain the desired output from the plant in a steady state as well for dynamic response [5]. PID controllers are the process industry's most used controllers. It has been recognized that more than 95 % of the control loops are of the PID type of process control [2]. Many different methods have been developed for tuning the PID types of controllers over the past decades. The main task of the PID controller tuning rules focuses on calculating the step response or the process ultimate point such as Ziegler-Nichols, CohenCoon, Chien-Hrones-Reswick. The scope of our research work was to find tuning rules for PID controllers used for the control of the DC motor. Minorsky [5,6] first suggested the PID controller in 1922 and applied first for industrial applications in 1939. Due to its simple use, low cost, easy maintaining and proposed to determine the values of the PID controller such as Ziegler and Nichols, Cohen and Coon [7,8]. They have suggested experimental PID tuning techniques relying on trial and error and based on the system response curve [8,9]. However, when the system is complicated, there can be problems in tuning the PID controller. such as high order, time delay, variable load torque, wide operating periods, non-minimum phase and non-linear processes [8,9]. For example [7][8][9], the Ziegler and Nichols method may provide a high order system with big overshoots, highly oscillatory and longer settling time. To solve these challenges and difficulties, various approaches have been proposed to find optimum PID parameters such as [10] meta-heuristic algorithms [11], differential evolution (DE) [12], Flower Pollination Algorithm (FPA) [13], genetic algorithms (GN) [14], Levenberg-Marquardt Algorithm (LMA) [15], Grey Wolf Optimization Algorithm (GWO) [16], Jaya optimization algorithm (JOA) [17], PSO [18,19], Improved Sine Cosine Algorithm (ISCA) [20]. These are optimization methods that have been introduced to tune the controller parameters for speed control of the DC motor. The common objective of these studies was to use an optimally developed controller using an optimization algorithm to minimize the steadystate error, overshoot, rise time and settling time, thus, to increase the speed control efficiency of the DC motor.
The papers [16,17] have shown that the presented method suffers from memory capacity and computational cost, local minimum, parameter selection difficulties, and increased calculation time. Furthermore, in [20,21] are poor although and they are wealthy in terms of exploration, which creates an imbalance between exploration and exploitation. The work presented in [14] is an iterative search approach based on natural genetic mechanism. However, GA is quite fussy; it involves selection, copy, crossover and mutation scenarios and so on. The implementation time became a problem [14], for instance, GA crossover effects typically differ significantly during a run. The members of the population are generally randomized at the start, so that crossover can have major effects, bringing a chromosome into the problem space at a relatively large distance. But there are several popular traits between GA and PSO. First, they are flexible technology for optimization. Second, they've all got a powerful universal property independent of any gradient. However, PSO is a lot simpler than GA, and its service is easier, without any option, copy, crossover [22]. PSO does not suffer from some of GA's difficulties. To solve the same kind of problems as genetic algorithms (GA), particle swarm optimization can be used. Changes in genetic populations contribute to the loss of the problem's prior understanding. The particle swarm system has memory, which the genetic algorithm does not have. In PSO, individuals that move past optima are tugged to return towards them; all particles maintain knowledge of successful solutions. Moreover, the drawbacks of the PSO method are that in high-dimensional space it is simple to collapse into global optimization and has a low convergence speed in the iterative analysis.
Indeed, the classic PSO [23] is not the best method to solve nonlinear engineering problems and it is slow and converges to local optima in some cases. Therefore, to improve the PSO performance, different variants of the algorithm were developed and modified [24,25]. In 1998, the inertia weight, which plays a vital tool in the PSO process was introduced [25]. The success of PSO depends on values of inertia weight [24]. Therefore, this paper introduces a new modified particle swarm optimization PSO method based on four types of inertia weight functions, which are suggested to find the optimum parameters of the PID controller for speed and position control of the DC motor. Also, the comparison study between the presented schemes, classical PSO algorithms and traditional PID is being carried out to find the better scheme to apply modified PSO for DC motor control.

The aim and objectives of the study
The aim of the study is to modify and improve the PSO algorithm by adaptive inertia weight functions Wi, social and personal acceleration coefficient (C1 and C2) in order to find optimum PID parameters for speed and position control of the DC motor.
To accomplish the aim, the following objectives have been set and undertaken: -to study the comparison between classical PSO and presented modified PSO based on inertia weight functions, social and personal acceleration coefficient; -to perform time response of the DC motor control based on the modified PSO algorithms; -to choose better inertia weight functions for the development and modified PSO as part of the PID controller; -to implement the structure and operating algorithm of modified PSO for the tasks on control over nonlinear objects.

1. Model of DC motor
The DC motor is widely used in many industrial applications such as the control of a pendulum arm and robotics. The electrical equation for the DC motor is presented in equation (1) [18]. and where R a is armature resistance in ohm, L a is armature inductance in henry, i a (t) is the armature current in Ampere, v b (t) is the back emf voltage in volt, v s (t) is the voltage source in volt, k b is the back emf constant in volt/(rad/sec) and ω a (t) is the speed of the motor in rad/sec. The torque equation can be discretion as: where T m is the electromagnetic torque in N•m, T ω1 is the torque due to rotational acceleration of the rotor, T ω is the torque produced from the velocity of the rotor and T L is the torque of mechanical load. k T is the torque constant and it depends on the flux density of the magnets, the reluctance of the iron core and the number of the turn in the armature winding and T ω1 and T ω can be written as: where j is the moment of inertia of the rotor and the equivalent mechanical load in kg•m 2 /rad and B is the damping and friction coefficient associated with the mechanical rotational system of the motor in N•m/(rad/sec). Substituting equation (4), (5) in equation (3), we can get the following equation: From equation (1) and (6), we can find the transfer function s v s for the DC motor is described in equations (7) and (8): where θ(s) is the angular displacement of the rotor.

2. PID controller
One of the most popular techniques of controlling in industrial processes is the PID controller. The PID controller is characterized by its simplicity of execution, good robustness and high performance. The essential principle of the standard PID controller is that the control quantity (t) is the linear combination of proportional-integral-derivative of the difference (t). The description of the PID controller law is explained in the following equation.
where e(t) is the system error (difference between the reference input and the system output), u(t) the control variable, K p , K i and K d are the proportional, integral and derivative gain, respectively. Each parameter of the PID controller adds some useful features to the output response of the system.

3. Particle swarm optimization
Particle swarm optimization (PSO) algorithms are widely used in the design of PID controllers because of a simple idea, easy implementation, and fewer parameters to be adjusted [33]. It is a powerful optimization technique that is vital for solving nonlinear problems. PSO is a technique of stochastic population optimization, which imitates the actions of birds when attempting to locate food as a group in a specific area. PSO was first founded in 1995. by R. Eberhart and J. Kennedy based on the behavior of bird flocks. It has a short calculation time and strong results and convergence. Of all stochastic methods, the PSO approach produces a high-quality solution. The basic concept of the PSO algorithm operates by a swarm of particles. In PSO, particles change their locations by moving around in the search space according to some basic criteria. Fig. 1 presents the movement of particles in the PSO algorithm. The system initially has potential solution known as Particle's initial position. It is currently located at the position denoted as current position. Each particle moves through the problem space with randomly choosing velocity and position. Every particle is following up its best prior position, which is denoted as Personal Best (P best ) and its corresponding fitness. There are several P best for each particle in the Swarm with the best of the greatest fitness called the Global Best (G best ). The principle concept of PSO is to accelerate each particle to its P best and G best position at each stage of the process. The particle changes the direction of its new movement based on the following: -its own and swarm's information regarding the best position; -the direction of its previous movement.

Fig. 1. Motion of particle in PSO algorithm
The modified velocity and position of each particle can be determined using the following equations.
where: -w: intertia coefficient for the velocity of particle i; -, v velocity based on P best ; -f ij : objective function. The PID controller realizes the specified output of the system by modifying three parameters K p , K i and K d . From the optimization point of view, an optimal solution is to be found in the vector space of three parameters K p , K i and K d in order to make the system optimal. The configuration and structure of the proposed PSO-PID controller are shown in Fig. 2. In the proposed PSO method, each particle contains three members P, I and D. This means that the search space has three dimensions and particles must 'fly' in a three-dimensional space. The flowchart of the PSO-PID control system is shown in Fig. 3.  The presented techniques are used to minimize the maximum overshoot, minimize the rise time. The objective function f ij is the steady-state error (E ss ), and it is defined as:

Modified PSO (MPSO)
The modification of PSO includes two scenarios known as the M1-PSO and M2-PSO. The presented modified PSO is used to set the PID parameters for the DC motor. The error value is minimized to zero by MPSO-PID for controlling the output of the DC motor.
First scenario -M1-PSO. The modification of PSO is done by changing the value of the inertia weight formula (W), social and personal acceleration coefficient (C 1 and C 2 ). The value of weight (W) and (C 1 and C 2 ) of each generation are modified by equation (12)- (15). The goal of this parameter modification is to expand the range of particles in the beginning generation (global optimum) and to decrease the area when they are in the last generation (local optimum), therefore, PID parameter values reached are more mature. Four inertia weight functions have been considered as the following equations: where W max is the final weight, W min : is the initial weight, T is the maximum iteration number and iter is the current iteration number. Second scenario -M2-PSO. In this scenario, the weight formula (W i ) values of each generation are modified by equation (12)- (16) while the values of C 1 and C 2 are constant. In classic PSO, the values of W, C 1 and C 2 are constant and (W=0.9, C 1 =C 2 =1.5). The classic PSO process keeps going exploring the best location but the convergence is delayed. A theoretical study [3,19] showed that the inertia weight should be between [0.4, 0.9].

Research results
This section includes the results of the modified PSO scenarios using the benchmark of inertia weight functions for the speed and position control of the DC motor. The simulation is being carried out based on Matlab.

1. Convergence based on PSO for position and speed control of DC motor
The corresponding performance curves of the PSO scenarios are depicted in Fig. 4-7, and show how the PSO algorithm converged to its final values. In more detail, all the cases of weight values (Wi) for the first and second scenario have been examined. As shown in Fig. 4-7, it can be   Fig. 8, 9 show that the step response based on W3 is better than W, W1, W2, and even the classic PSO method.  Fig. 10, 11. Also, Fig. 10, 11 show that the step response based on W3 is better and faster than W, W1, W2, and even the classic PSO method. Step response curve of position control based on M1-PSO

3. Performance of time response for speed and position control
The settling time (Ts), rise time (Tr), overshoot percentage, steady-state error (Ess), time of steady-state error (t Ess ) and the PID values for each case of suggested approaches are presented in Tables 1, 2 Table 2 (position M1) shows that there is a slightly different rise time between the PID controller and PID with M1-PSO but the overshoot obviously can be reduced from  Table 2 shows that the rise time reduced from 0.444 sec for only PID controller to 0.193 sec by implementing M1-PSO but the overshoot was reduced from 25.3 % to zero.

Discussion of simulation results
The application of modified PSO for speed and position control of the DC motor has been presented. The ITAE has been considered as an objective function for the proposed optimization algorithm. Comparison of the proposed PSO schemes with classical PSO as well as traditional PID has also been studied. The sturdiness analysis of the first scenario of the suggested modified PSO has also been carried out and shown that the proposed MPSO approach has fast searching speed and better performance compared to classical PSO. Moreover, the accuracy and speed of convergence of the proposed method based on M1-PSO are better than those of M2-PSO and even classical PSO.
In other words, the PID controller architecture using M1-PSO causes the overshoot rate in the step response curve to be reduced compared to M2-PSO and classic PSO. The simulation results have shown that the first scenario based on inertia weight function (W3) gives a better response compared to the second scenario and classic PSO and it reaches the global minimum value in fewer iteration numbers compared to the previous study [11,12]. Indeed, the obtained simulation results encourage to apply the proposed approach in practical control systems. Furthermore, the proposed method accelerates the convergence for the PSO algorithm.
Moreover, the limitations of the PSO technique stem from that it easily suffers from partial optimism, which allows its velocity and direction to be controlled less accurately. Also, there is no general principle of convergence specific to realistic theories of multidimensional difficulties. Input parameters tuning and experimenting with different implementations of the PSO algorithm are sometimes required.

Conclusions
1. The main messages brought by this paper are that using the modified PSO algorithm based on speed and position control of the DC motor can be meaningful and the optimization method has indeed been able to tune optimal PID parameters successfully and accurately, which confirmed the rightness of proposed scheme and good behavior of DC motor control, which were not learnt by the perceptron.
2. Based on an analysis aimed at the implementation of the PID controller for the DC motor, I selected a modified PSO algorithm, which makes it possible to improve the response of the controller. Indeed the study shows that it reached the steady state value within 0.4 and 1 sec for speed and position control, respectively.
3. Furthermore, comparative studies have shown that changes of the inertia weight function W3, social and personal acceleration coefficient lead to improved PSO method efficiency, and compared to the second scenario (M2 PSO) and classical PSO, it has very efficient rapid implementation and better response for control systems. 4. A structure of the control system of the DC motor, based on the modified PSO, which derives optimum values for the PID coefficients controller in the process of operation was proposed. Such an approach makes the time response results presented in this work to have accurate results and a better response effect compared to other methods. More precisely using W3 led to the enhancement of DC motor performance and gave the overshoot of 0 % and 6.73 % for speed and position

Introduction
The use of microprocessor (MP) equipment in the ship's electricity generating units implies the automation of control processes, as well as the processes of control and protection of ship technical systems and complexes (STS and C). An important and integrated part of each of these processes is the measurement of electric power parameters, which, for example, are necessary to enable effective automatic synchronization of generator sets (GSs). Namely: the magnitude and nature of load currents in all phases, the voltage, frequency of the current, the phase angle φ of the shift between the current and voltage, power direction, and others.
It is known that aboard a modern sea vessel most of the measurement systems for electric power parameters are associated with the functioning of analog-digital converters (ADC), and, along with the issue of ensuring reliability and accuracy, there is a task to provide for the necessary speed of measurements. Resolving this issue requires finding new ways -based on a systematic approach with accounting for known digital measurement techniques. In a general form, the task to measure the electrical energy parameters in an n-phase system relates to determining the set of values {I 1 , …, I n , U 1 , …, U n , f, φ} according to the selected performance criterion. In this case, I 1 , …, I n and U 1 , …, U n are the amplitude values of phase currents and linear voltages.

This paper considers the construction of principles and the synthesis of a system of effective control over the processes of synchronization of generator sets (GSs) that form a part of the distributed MP-control systems for complex ship technical systems and complexes (STS and C). The tasks of synchronization have been set, the process and database models have been built, the system configurations have been defined. Based on the use of resultant functions, we have determined stages in solving the tasks of control over the frequency adjustment synchronization in a hierarchical sequence. The performance analysis of the STS and C control elements has been carried out; the use of the integrated optimization criteria and dual management principles has been proposed. Practical techniques to manage the GS synchronization have been given. We have solved the problem of high-speed control over the frequency of synchronized objects based on the principles of adjustment. That has made it possible to determine in advance the moments of GS enabling under the deterministic and stochastic statement of the synchronization task. The results of the experimental study into the GS synchronization processes are given; the effectiveness of the proposed GS control has been proven. The principles underlying the construction of procedures to control the GS composition when using the methods of "rigid" and "flexible" thresholds have made it possible to define the optimization criteria and implement a control law that satisfied the condition for an extremum, which is an indicator of the feasibility of the set goal and takes into consideration the limitations of control influences. We managed to design a system in the class of adaptive control systems by the appropriate decomposition of the system's elements by splitting a synchronization task into the task on performance and the task on control under the required conditions. The given examples of the processes where the synchronization failed while using standard synchronizer control algorithms, as well as processes of successful GS synchronization when applying the proposed synchronizer dual control algorithms, have confirmed the reliability of the main scientific results reported here
Keywords: technical operation, synchronization, quality, control system, mathematical modeling