Keywords

1 Introduction

One of the principal advantages of a DC motor is the high start torque characteristics, high response performance and easier to be linear control [1]. Typically, the speed of a DC motor can be tuned to a great extent so as to provide easy control and high performance [2]. There are several methods for controlling the DC motor speed at its executing various tasks like PID Controller [3], Fuzzy Logic Controller [4], or the combination between them like PID-Particle Swarm Optimization [5], the optimal Fuzzy Logic controller using the different strategy [6], etc. [7].

PID controllers are widely used in industrial plants due to their simplicity and robustness. With appending some zeros to a closed-loop transfer function using a differential controller, the transient response will be improved and with appending some poles to it using an integral controller, the steady-state error will be decreased [8]. Selecting the proper tuning parameters is essential to have a good performance of PID controllers. Several methods have been developed to determine the PID controller parameters for single input single output (SISO) systems. Ziegler-Nichols (Z-N) [9], the Cohen-Coon method [10], are some well-known examples of these methods. Ziegler and Nichols utilized transient response characteristics of given plant rules for adjusting the PID controllers [11].

Jin et al. [12] proposed a method based on the model reduction method for designing PID controllers. Tumari et al. [13] presented a model-free approach for optimizing the parameters of a controller. Leva et al. [14] described several PID controller methods for industrial control systems. Adjusting of PID is performed by some expert humans empirically which is often an expensive and difficult activity. Evolutionary Algorithms like GA and PSO have demonstrated their superiority in achieving better results by improving the characteristics and efficiency of the steady-state. In this study, an improved version of the whale optimization algorithm is proposed for the optimal design of the PID controller in a DC motor. A comparison is then performed between the proposed method and the standard whale optimization algorithm to show the superiority of the proposed method. One of the most important factors on DC motors stability is their output speed.

Whale optimization algorithm (WOA) is a new optimization technique that belongs to this category of the so-called nature-inspired algorithm and is based on the whales hunting process [15].

In the whale optimization algorithm, the fitness function of a given optimization problem is depended on the whales’ hunting process to achieve effective optimal solutions. The achieved results from the whale optimization algorithm are finally compared with the standard whale optimization algorithm. Experimental results show that for this purpose, the WOA has higher performance.

2 Model of Brushed DC Motor

Typically, a DC motor consists of a stator, a rotor, and a commutator. The stator is the cover of the motor and contains a magnet, bearing, etc. The rotor is the movable component of the motor and comprises a coil of wire through which current flows. The wire coil through the rotor connects to the commutator and captures current through brushes. The commutator warranties that the current flow in the appropriate direction while the rotor turns. DC motor procreates torque directly from DC power covered to the motor by handling internal commutation, static permanent or electromagnets, and rotating electrical magnets. Profits of a brushed DC motor include high reliability, low initial cost, and easy motor speed control. Figure 1 shows the equivalent model of the brushed DC motor with a PID controller.

Fig. 1
figure 1

Equivalent circuit of DC motor with PID Controller

The transfer function of a PID controller is presented as follows:

$$PID = K_{p} + \frac{{K_{i} }}{s} + K_{d} s$$
(1)

where, Kp is the proportional tuning constant, Ki is the integral adjusting constant, and Kd is the derivative tuning constant. The process of specifying the PID controller parameters Kp, Ki, and Kd to get high and consistent performance characteristics is known as controller adjusting. A low-pass filter (LPF) is also applied to noise elimination. The real model of the DC motor for Simulink is shown in Fig. 2.

Fig. 2
figure 2

Model of the DC Motor in Simulink

In this paper, an efficient and fast adjusting method based on a new improved version of the whale optimization algorithm is proposed to find the optimal parameters of the PID controller so that the desired system features are convinced. To illustrate the presented method efficiency, the step responses of the closed-loop system are compared with the standard whale optimization algorithm based PID. The parameters of the motor used for simulation are presented in Table1.

Table 1 Parameters of the motor

3 Improved Whale Optimization Algorithm

3.1 The Standard Whale Optimization Algorithm

Humpback whales are some kinds of the largest whales in the world. An adult is about the size of a school bus. Small fish groups are the favorite food for them. The most interesting thing about humpback whales is their particular way of hunting. This exploratory behavior is known as the bubble feeding method. Humpback whales prefer to hunt bunches of small creatures or fish near the water's surface. It has been observed that this exploration is accomplished by generating index bubbles along a circle or paths [16,17,18].

The WOA is one of the nature-inspired optimization algorithms that is inspired by the bubble net hunting process of the humpback whales and can be used in different optimization problems [19,20,21].

The algorithm starts with a random vector of variables as the whale’s population to find the global solution for the optimization problem. The bubble-net feeding process of the humpback whale is A mathematically modeled as follows:

$$Z\left( {t + 1} \right) = \left\{ {\begin{array}{*{20}l} {Z^{*} \left( t \right) - AD,} \hfill & {p < 0.5} \hfill \\ {D^{\prime}e^{bl} \cos \left( {2\pi t} \right) + Z^{*} \left( t \right),} \hfill & {p \ge 0.5} \hfill \\ \end{array} } \right.$$
(2)
$$D^{\prime} = \left| {CZ^{*} \left( t \right) - Z\left( t \right)} \right|$$
(3)
$$A = 2ar - a$$
(4)
$$C = 2r$$
(5)

where, l describes a random variable in the interval [−1, 1], a is a decent integer from 2 to 0 linearly over the iteration, r and p describe random constants in the interval [0, 1], b defines the logarithmic shape of the spiral motion, t is the current iteration, and \(D^{\prime}\) describes the distance of ith whale from the best solution.

Here, the convergence of the method will be guaranteed if \(\left| Z \right| > 1\). the algorithm exploration is an improvement by the following formula:

$$D^{\prime} = \left| {CZ_{rand} \left( t \right) - Z\left( t \right)} \right|$$
(6)
$$Z\left( {t + 1} \right) = \left\{ {\begin{array}{*{20}l} {Z_{rand} \left( t \right) - AD,} \hfill & {p < 0.5} \hfill \\ {D^{\prime}e^{bl} \cos \left( {2\pi t} \right) + Z_{rand} \left( t \right),} \hfill & {p \ge 0.5} \hfill \\ \end{array} } \right.$$
(7)

The main idea of using the whale optimization algorithm is that although it is a new optimization algorithm, it has been used for different applications due to its good exploration capability. One problem of the whale optimization algorithm is its premature convergence.

3.2 Improved Whale Optimization Algorithm (IWOA)

In this study, chaos theory has been for improving the system efficiency in terms of convergence. This conception has various applications in science such as mathematics and physics. Its simple meaning is rooted in human early perceptions of the universe. In chaos theory, complex systems have a purely turbulent appearance and, as a result, appear irregular and random, while they may be subordinate to a given process with a specific mathematical formula [22, 23]. A simple formulation for the chaos behavior is illustrated below:

$$CM_{i + 1}^{j} = f\left( {CM_{i}^{j} } \right),\quad j = 1,2, \ldots ,k$$
(8)

where, k describes the map dimension and \(f\left( {CM_{i}^{j} } \right)\) represents the chaotic model generator function. Using chaos behavior can improve the system convergence and speed which improves the population diversity to escape from the local optimum trap [22, 23]. In this subsection, an improved version of the WOA is utilized based on the Singer mechanism [24,25,26]. To implement this mechanism, the unknown scale factor (\({\upgamma })\) is converted into regular formulated value as follows:

$$\begin{aligned} X_{{Rand,k}}^{{i + 1}} & = 1.07\left( {7.9 \times X_{{Rand,k}}^{i} - 23.3 \times \left( {X_{{Rand,k}}^{i} } \right)^{2} } \right. \\ & \left. {\quad + 28.7 \times \left( {X_{{Rand,k}}^{i} } \right)^{3} - 13.3 \times \left( {X_{{Rand,k}}^{i} } \right)^{4} } \right) \\ \end{aligned}$$
(9)

The flowchart of the presented IWOA is shown in Fig. 3.

Fig. 3
figure 3

The block diagram of the proposed improved whale optimization algorithm

Table 2 illustrates some significant advantages and disadvantages of the proposed IWOA.

Table 2 Advantages and disadvantages of IWOA

According to the results, the proposed Chaos Whale Optimization Algorithm has a simple structure and the only difference between the original WOA and the Chaos WOA is that utilizes a logistic map for updating the algorithm. As a result, the convergence speed is improved. However, the proposed algorithm has the limitation of the high computational effort in terms of methodology and application.

4 Fitness Function

The general fitness function for the PID control system is as follows:

$$ISTSE = 10 \times \int {t_{sim}^{2} \times \,} e^{2} dt + \left( {Os} \right)^{2}$$
(10)

where, tsim is the simulation time, the variable e(t) represents the tracking error which is the difference between the purposed input value and the actual output. This error signal will be sent to the PID controller and the controller calculates both the derivative and the integral of this error signal and OS is the overshoot. In the PID control designing approaches, the most popular performance criteria are integrated absolute error (IAE), the integrated of time weight square error (ITSE), the integrated squared of time weight and square error (ISTSE), and integrated of squared error (ISE) that can be evaluated analytically in the frequency domain.

These five integral performance metrics in the frequency domain have their own profits and drawbacks. For example, the drawback of the IAE and ISE metrics is that their minimization can result in a response with respectively small overshoot but a long settling time because of the ISE performance criterion weights all errors equally independent of time. However, the ITSE performance metric can dominate the drawbacks of the ISE metric. The derivation processes of the analytical formula are complex and time-consuming. The formulation for the IAE, ISE, and ITSE performance criterion formulas are as follows:

$$IAE = \int {\left| {e(t)} \right|dt}$$
(11)
$$ISE = \int {e^{2} (t)dt}$$
(12)
$$ITSE = 1000 \times \int t .e^{2} (t)dt$$
(13)
$$ISTSE = 10000 \times \int {t^{2} e^{2} (t)dt}$$
(14)
$$FD = (14 \times OS^{2} ) + (t_{s}^{2} )$$
(15)

5 Proposed IWOA Based PID Controller

In this work, a PID controller based on an improved version of the whale optimization algorithm is employed to achieve the optimal parameters of the DC Motor speed control system.

The mechanism of the PID controller with IWOA is shown in Fig. 4. IWOA is applied to the fitness function in order to control the speed of the DC motor. A group of good parameters including K and Resistance determines a proper step response that will result in performance criteria minimization in the time domain. Table 3 illustrates the performance of the IWOA and standard WOA based PID controllers.

Fig. 4
figure 4

The block diagram of the proposed PID Controller with IWOA

Table 3 IWOA and WOA PID controller parameters

6 Simulation Results

To evaluate the performance of the proposed IWOA-PID controller and its robustness, different operating points are tested in the time domain. To prove the efficiency of the proposed method, a comparison is performed with the designed PID controller with the standard WOA method. Controller Time domain performance is simulated using the model given in Sect. 2. To do so, the operating points of Table 4 are used by considering the changes in electrical resistance and K parameters. Evaluating operation points are shown in Table 4.

Table 4 Operation points

The Output speed of DC motor system per operating points without and with considering the step disturbance's effectiveness is shown in Figs. 5, 6, 7, 8, 9, 10, 11 and 12.

Fig. 5
figure 5

Output speed system for the operating point (1): solid (IWOA), dashed (WOA)

Fig. 6
figure 6

Output speed system for the operating point (2): solid (IWOA), dashed (WOA)

Fig. 7
figure 7

Output speed system for the operating point (3): solid (IWOA), dashed (WOA)

Fig. 8
figure 8

Output speed system for the operating point (4): solid (IWOA), dashed (WOA)

Fig. 9
figure 9

Output speed system with step disturbance (10%) for the operating point (1): solid (IWOA), dashed (WOA)

Fig. 10
figure 10

Output speed system with step disturbance (10%) for the operating point (2): solid (IWOA), dashed (WOA)

Fig. 11
figure 11

Output speed system with step disturbance (10%) for the operating point (3): solid (IWOA), dashed (WOA)

Fig. 12
figure 12

Output speed system with step disturbance (10%) for the operating point (4): solid (IWOA), dashed (WOA)

From the simulation results, it is obvious that the proposed system achieved its stability for all of the operation points. it also results that the WOA-PID controller could reduce the oscillation damping in an admissible value, but increases the damping time and setting time; whereas IWOA-PID controller has a good performance in both time and oscillation damping value.

Tables 5, 6, 7 and 8 present the numerical results for each performance indexes. The value of the indexes’ efficiency in IWOA-PID is less than WOA-PID. Therefore, overshoot, settling time and motor speed refraction are reduced by the proposed approach. With regard to the steady-state condition changes and with describing different assessment points, the PID controller is implemented. For the system robustness analysis, simulation is applied for Ra = (0.1…0.4), and K = (0.01…0.15).

Table 5 The results of analysis DC motor system without step disturbance for operating points
Table 6 The characteristics of output response system without step disturbance for operating points
Table 7 The results of analysis DC motor system with step disturbance (0.1) for operating points
Table 8 The characteristics of output response system with step disturbance (0.1) for operating points

7 Conclusions

In this study, the optimal control of the DC motor with different variations for the resistance and K is analyzed. The purpose is to provide a trade-off between optimal and robust solution for the system control.

Here, a new optimized method is proposed to determine the optimal PID controller parameters. For this purpose, a new version of the whale optimization algorithm is proposed for improving the algorithm convergence. The proposed whale optimization algorithm based PID is applied to the DC Motor drive for optimal control of the system with the minimum settling time and overshoot. Simulation results showed that the proposed technique can efficiently perform for achieving an optimal PID controller. By comparison with the standard WOA-PID controller, it shows that this method can develop the dynamic performance of the system in a better way.