# A novel IMC controller based on bacterial foraging optimization algorithm applied to a high speed range PMSM drive

- First Online:

- 3 Citations
- 1.9k Downloads

## Abstract

This paper is a proposal of a modified internal model control based on an intelligent technique. The indirect field oriented control strategy (IFOC) is used as a permanent magnet synchronous motor (PMSM) drive platform. Neural network controller and estimator are respectively added to replace the conventional speed regulator and the speed encoder in the global drive scheme. A wide speed working range is considered and high speed mode is incorporated in the study testes. In the IFOC inner control loops, the commonly used synchronous frame conventional proportional plus integral (PI) controllers are replaced by two modified internal model control (IMC) regulators. Therefore, a method based on the bacterial foraging optimization (BFO) algorithm is performed to optimize and adjust the IMC low pass filter parameters. The robustness of the proposed PMSM sensorless drive scheme is confirmed by simulation tests in the MATLAB/SIMULINK. Moreover, a comparative evaluation results are illustrated to prove the effectiveness of the proposed control algorithm according to different controllers combinations.

### Keywords

PMSM Bacterial foraging optimization Internal model control Neural network## 1 Introduction

PMSM drives become more and more attractive in motion-control applications such as High Speed Trains and electric vehicles. Its high performances: high efficiency, low inertia and high torque-to-volume ratio, high power factor and almost no need for maintenance are the main advantages. Compared to induction and reluctance motors, PMSM is lower in weight and smaller in size [1]. The previous features make it the most preferable for high performances motion control application. Several control strategies have been carried on to unsure the highest dynamic electrical machine drive performances. The most popular one is the IFOC which requires an accurate knowledge of the rotor shaft position. This implies the need of a speed or position sensors, such as an absolute encoders or magnetic resolvers mounted to the rotating shaft. However, these sensors present several drawbacks, such as reduced reliability, susceptibility to noise, additional cost and weight, and increased complexity of the installation [2]. Therefore, sensorless drive system is crucial for many applications, not only to reduce cost of the equipment, but also to improve system reliability. So the idea is to replace the real speed encoder by a software one. This last is an observer or an estimator which is built upon measured variables. Effectively, the simplest measured PMSM variables are stator voltages and currents. Many sensorless based schemes have been proposed in the literatures [3]. Some methods are based on the back-EMF voltage. These are simple and yield well position estimation at average and rated speeds, but fail at low operating speeds. Two basic deficiencies let these methods degrade as the speed reduces: pure integration drift and sensitivity to parameter uncertainty. To overcome this problem, several authors have used other techniques, either based on state observers, like Extended Kalman Filter in [4], High-gain Observer in [5] and Extended Luenberger Observer in [6], or based on the intelligent techniques, like the neuronal network estimators as presented in [7]. For its good performance proved in [8], the artificial neural architecture is used to replace the real speed encoder in this application.

The PMSM control problems present an extended research sector. Many authors, who look for the PMSM robustness drive, use the field oriented control (FOC) strategy as a reliable method, which is characterized by a simple architecture based on three proportional plus integral controllers as described in [2]. But the problems that occur in this last method are mainly: calculation of controller parameters and the robustness performances. Some works propose the adaptive control scheme as a robust control strategy, as the Model Reference Adaptive Control (MRAC) method. Effectively, the MRAC approach was able to compensate the system parameters variations, such as inertia and torque constant as explained in [9, 10]. Some other authors relied on the artificial intelligence techniques in their robustness control problems as presented in [11]. In the mean time, these methods need an exact mathematical identification for the learning system’s starting phase, in the artificial case, and for adjusting the controller parameters in the MRAC case.

The Internal Model Control (IMC) is classified as a robust control strategy which principle simulates the human style. Thus, in the manual mode, the operator attempts to tune the desired variable close to the desired goal, based on their spontaneous representation. This act is designed by the internal model in the IMC architecture. Therefore, some authors aim to replace the internal model system by an intelligent one, as neuron, fuzzy, or ANFIS technique, as supported in [12] and [13, 14, 15, 16, 17]. However, the inverse model stability problem appeared as explained in [17]. Meanwhile, the contributions in the internal model control strategy are limited and the IMC filter parameter tuning presents another critical point which hardly can influences the IMC control performances.

Many researches are based on the heuristics algorithms in their optimization problems, as given in [18], where the authors are based on the Ant-Colony Algorithm in the satellite control problem, or as done in [19], where the authors use the Particle Swarm Optimization technique in the Fuzzy inferences system tuning. These algorithms prove their effectiveness in these optimization problems. Therefore, based on the heuristic algorithms, an intelligent optimization method based on bacterial foraging algorithm (BFO) is used here for tuning the IMC controller parameter and for enhancing its robustness. The BFO approach choice is based on its powerful optimization algorithms in terms of convergence speed and final precision [18]. In the proposed PMSM control method, the BFO-IMC is used as current controllers in the IFOC drive strategy. In order to improve the overall PMSM control scheme, a robust speed controller is required. This one should enable the drive to follow any reference speed, taking into account the high speed mode and the effects of load dynamic impact and parameter variations. In [7] and [19], the performance and robustness of the recurrent neural network are noted. So the recurrent neural network type is selected as the speed controller in this method. In the electrical vehicle application, the high speed range is required and to perform this working mode, a filed weakening algorithm [20] is added for generating the needed direct reference stator current.

This paper is organized as follows: Sect. 2 presents the mathematical model of the PMSM, the principles of the field weakening and the IFOC strategies. The use of the neural network as a speed controller and as a speed observer is developed in Sect. 3. Section 4 is designed for the development of two internal model current controllers and the stability analysis. The intelligent optimization approach using the BFO is explained in Sect. 5. Sections 9 and 7 present the simulation results and the conclusion, respectively.

## 2 Mathematical modeling of the PMSM

*d*-

*q*) reference frame can be described by the system (1) of nonlinear differential equations [7, 21]:

*v*

_{d},

*v*

_{q}and

*i*

_{d},

*i*

_{q}are respectively direct and quadratic stator voltage and current comportments.

*R*

_{s}is the stator resistance,

*L*

_{d},

*L*

_{q}are the

*d*and

*q*axis self stator inductances,

*ω*is the rotor speed and

*λ*

_{m}is the permanent magnet flux linkage.

*λ*

_{d}=

*L*

_{d}

*i*

_{d}+

*λ*

_{m}and

*λ*

_{q}=

*L*

_{q}

*i*

_{q}. For a non salient pole PMSM the quadratic and the direct inductances are equal then

*L*

_{d}=

*L*

_{q}=

*L*

_{s}, so the torque expression becomes: \(T_{e} = \frac{3}{2}p( \lambda_{m}i_{q} )\).

Hence the electromagnetic torque depends only on the *q* axis current.

*T*

_{l},

*p*,

*J*and

*fv*are respectively the load torque, the motor pole pairs number, the moment of inertia and the viscous friction coefficient.

### 2.1 Field weakening operation FWO

*d*and

*q*components and corresponding limit value are given in Eq. (5).

*i*

_{smax}as shown in Fig. 1. It should be noticed that this current-limited circle remains constant for any speed. Assume that the voltage applied to the PMSM reaches its limit, the maximum stator voltage

*v*

_{smax}is determined by the available DC bus voltage. Considering this limit, the stator voltage equations should satisfy the following condition:

*v*

_{d}and

*v*

_{q}from system 1 and dividing by

*ω*squared, the stator voltage equation can then be written as indicated in Eq. (7):

*i*

_{d},

*i*

_{q}) plane. As the maximum voltage

*v*

_{smax}is fixed, the ellipsis shrinks inversely with rotor speed. Figure 1 illustrates the voltage-limit ellipses (

*ω*

_{1}<

*ω*

_{2}<

*ω*

_{3}) and the current-limit circle which are plotted in the (

*i*

_{d},

*i*

_{q}) plane.

*L*

_{d}=

*L*

_{q}=

*L*

_{s}), the voltage-limited shape (Eq. (8)) change to circles.

### 2.2 Field oriented control (FOC)

Field oriented control (FOC) strategy has been widely used in various industrial applications. It is one of the most popular schemes for high performance of electrical machine drives. It is originally introduced for induction machines and it is easily extended to PMSM drives. The FOC-PMSM strategy in its standard scheme incorporates one outer loop for speed control and two inner loops for *d* and *q* current components regulation. These loops are usually built all around PI conventional regulators. In this strategy the direct reference current is fixed to a zero value. Hence, the PMSM drive behaves typically as a separately excited DC machine. However, if the reference speed exceeds the rated one, the *d* current reference value is derived from the field weakening algorithm. The *q*-axis reference current *i*_{q} is generated as the speed regulator output Fig. 6.

## 3 Neural networks controller and estimator

The neural networks application is highly useful as controller estimator. Neural networks architecture can be classified into recurrent and non recurrent categories. Every architecture is required for a specific application. In the non recurrent networks the output is calculated directly from the input through feed forward connections. In the recurrent networks, the output is calculated from the actual input value of the network, and the actual or the previous outputs or states of the total network. It is clear that the recurrent one is dynamic versus the non recurrent one. In this work, two NNs are used together as a speed controller, and estimator.

The non recurrent neuron network architecture is used as estimator for its simple and easy usage versus the recurrent. The estimator is ANN and the recurrent one as a dynamic is used as a controller. This last contains more mathematical expressions in the running algorithm; this why the ANN is selected for identification problem [21].

### 3.1 Recurrent neural networks speed controller

*S*

_{j}is the input signals of the hidden layer,

*X*is the output signal of the hidden layer, \(i_{q}^{*}\) is the final output signal of the RNNSC and

*I*

_{i}(

*k*) is the input vector. \(W_{j,j}^{D}(k)\) is the weight between the same neuron in the hidden layer, \(W_{j,j}^{L}(k)\) is the weight between two successive neurons in the hidden layer, \(W_{j,i}^{I}(k)\) is the weight from the input layer to the hidden layer and \(W_{j}^{O}(k)\) is the weight from the hidden layer to the output layer.

*f*(.) is a sigmoid activation function.

*e*

_{I}is the difference between the desired actual

*i*

_{q}current and the RNNSC output as a reference one. The gradient method is used for adjusting the weights. The mathematical expressions used to update the different weights are in Eq. (13):

### 3.2 Artificial neural networks speed estimator

*S*

_{j}is the hidden layer input signals.

*X*

_{j}is the hidden layer output signals. \(\hat{\omega}\) is the output signal of the ANNSE. \(V_{j,i}^{I}(k)\) is the weight from the input layer to the hidden layer and \(V_{j}^{O}(k)\) is the weight from the hidden layer to the output layer.

*I*

_{i}(

*k*) is the input data vector and

*f*(.) is the sigmoid function. The error function is defined in Eq. (18):

*e*

_{ω}(

*k*) is the error between the desired actual speed and the ANNSE output. We use the gradient method for adjusting the weights. The mathematical expressions for the weights update are given in Eq. (19), and the gradient expressions are reported in Eq. (20): The coefficients \(\eta_{\omega}^{I}, \eta_{\omega}^{O}\)are the learning ANNSE rates. The used ANNSE structure corresponds to 3 neurons at input layer, two neurons in hidden layer and one in output layer.

## 4 The internal model current controller

*Gi(s)*represents the internal model,

*C(s)*the controller and

*G(s)*the real model. The reference stator currents \(i^{*} = [ i_{d}^{*},i_{q}^{*} ]\) are compared with the output error between the real, “Open image in new window” and the observed, “Open image in new window” stator currents. The output errors are applied as inputs to the controller to generate the stator reference voltages

*v*

^{∗}=[

*v*

_{d},

*v*

_{q}].

### 4.1 IMC stability analysis

From Fig. 4, if the internal model is perfect, then *Gi*(*s*)=*G*(*s*). So, there is no more feedback occurring in Fig. 4. The closed loop system can be expressed as: *F*(*s*)=*Gi*(*s*)*C*(*s*).

*F*(

*s*) is stable if and only if

*Gi*(

*s*) and

*C*(

*s*) are stable. However, if

*Gi*(

*s*) is not minimum phase, then

*Gi*

^{−1}(

*s*) is unstable. If

*Gi*

^{−1}(

*s*) numerator degree is higher than the denominator, then

*Gi*

^{−1}(

*s*) cannot be implemented. These two constraints can be resolved as: In the present application

*Gi*(

*s*) has no right half plane zero. So refers to

*H*

_{2}optimization procedure we can let:

*C*(

*s*)=

*Gi*

^{−1}(

*s*). This solution resolves only the first cited constraint. The second one is resolved with a low pass filter

*L*(

*s*). Then the IMC controller can be expressed by:

## 5 Bacteria foraging optimization: a brief overview

According to the Escherichia coli (E. coli) bacterial which is present in the human intestine, the bacterial foraging optimization support a new method based on foraging behavior for solving optimization problems. So according to the bacteria behavior law, all the elements support the best species which have the ability for searching food and eliminate the other. The bacteria foraging strategy can be expressed generally by three processes, the first is the chemotaxis step. The second is called the reproduction and the last is the elimination-dispersal step [18]. Some authors divide the chemotaxis step into two other, swimming and tumbling, then four steps are obtained.

*J*(

*i*,

*j*,

*k*,

*l*) the value function coast and

*θ*

_{i}(

*j*,

*k*,

*l*) the

*i*th bacteria position. In the present algorithm, the most important loop is the chemotaxis, designed by “B”. In this one, each bacterium will be passed through the tumbling and the swimming step “F”. Where the corresponding objective value will be calculated and compared to the less saved one. After assuring that all the bacteria, “G”, are executing the entire chemotaxis step, “B”, the reproduction one will start. Effectively, this action is characterized by, the reproduction of the best bacteria half. Where, the worst bacteria half that corresponding to the highest objective function coast will be dead. However, the other best half with the lowest coast function, split. The obtained copies are placed at the same location as their parent. After, the reproduction step is achieved, the last one, which called “elimination-dispersal”, start. Effectively, with a probability

*P*

_{ed}, an elimination and dispersion for each bacterium (this keeps the number of bacteria in the population constant) occur [18, 22]. The elimination and dispersal events assist chemotaxis progress by placing the bacteria to the nearest required values. Each bacterium according to a fixed probability dispersed from their original position and move to best position within the search space. These events may prevent the local optima trapping but lead to disturb the optimization process.

*C*(*i*)=*C*(*i*)+*d*1 in swimming*C*(*i*)=*C*(*i*)−*d*2 in the tumbling

*θ*

_{i}(

*j*,

*k*,

*l*) represents the position of the

*i*th bacterial in the

*j*th chemotaxis step, the

*k*th reproduction step and the

*l*th elimination step. The parameters

*d*1 and

*d*2 are two positive elements.

*C*(

*i*) shows the swim size taken in the random direction specified by the tumble. Δ

*s*(

*i*) depicts the vector direction of the

*j*th chemotaxis step. When the bacterial movement is run or swim, Δ

*s*(

*i*) takes the same that was available in the last chemotaxis step; otherwise, Δ

*s*(

*i*) is a random vector elements in the interval [−1,1]. This swimming action is continued as long as it continues to reduce the cost, but only up to a maximum number of steps,

*Ns*. If not, this action will be stopped.

The Integral Absolute Error and (IAE): \(\mathit{IAE} = \int_{0}^{\infty} | \mathit{error}( t ) | dt\)

The Integral of Time-weighted-Absolute Error (ITAE): \(\mathit{ITAE} = \int_{0}^{\infty} t| \mathit{error}( t ) | dt\)

The Integral of the Squared Error (ISE): \(\mathit{ISE} = \int_{0}^{\infty} | \mathit{error}^{2}( t ) | dt\)

## 6 Simulations results

The PMSM parameters are: *P*=400 W, the rated current *I*_{rat}=2 A, the maximum current *I*_{max}=2.*I*_{rat}, the rated speed *ω*=2500 rpm, the rated torque *T*_{l}=1.5 N m, *L*_{d}=*L*_{q}=21.5 mH, *R*_{s}=5.2 Ω, *λ*_{m}=0.24 Wb, *J*=85*e*^{−6} kg m^{2}. The inverter parameters are: the DC bus voltage is fixed to 660 V and the switching frequency is 10 kHz.

In the traction and the electric vehicle applications, the load torque decreases if the motor speed exceeds the rated value. In this work the electric vehicle typical drive cycle is supporting the speed reference trajectory. The used target speed trajectory begins with *T*_{l}=1.5 N m from 0 rpm at *t*=0 s to 2500 rpm at *t*=0.075 s, then to 4000 rpm with *T*_{l}=0.9 N m at *t*=0.575 s as indicated to Fig. 10.

For the ANNSE: \(I(k)=\bigl[i_{d}(k)\ i_{q} (k)\ v_{d} (k) v_{q}(k)\bigr]^{T}\)

For the RNNSC: \(I(k)=\bigl[e(k-1) e(k) i^{*}_{q}(k-1)\bigr]^{T}\)

*β*

_{1}and

*β*

_{2}are two positive numbers chosen in this application as

*β*

_{1}=

*β*

_{2}=100. The speed error and overshoot are respectively denoted by

*e*and Δ. The BFO architecture parameters specifications are chosen those of the test yielding to a minimum of computational and keeping good performance. The best obtained BFO characteristics are given as the follow:

The bacteria number:

*S*=6The chemotaxis steps number:

*N*_{c}=4The swim length:

*N*_{s}=4The reproduction steps number:

*N*_{re}=2The elimination-dispersal events number:

*N*_{ed}=2The number of bacteria reproductions (splits) per generation

*S*_{r}=*S*/2The probability that each bacteria will be eliminated/dispersed:

*P*_{ed}=0.25The run length

*c*(:,1)=0.05_ones(*s*,1)The initial fitness cost; calculated by the ISE method for the initial random parameter.

^{5}. However in the last one, Fig. 9d, the value is decreased to 3×10

^{4}. The corresponding IMC parameters are also highlighted at the same figures. It should be noticed that the obtained minimum coast function can be more reduced if the reproduction and the elimination iterations are increased. However, a compromise between simulation time reduction and a precise results, inquires the use of previously cited BFO configuration.

In these figures, are illustrated the obtained coast function value and IMC parameter for each bacterium and for every part of chemotaxis step. It is clear that the best objective function cost value, is always obtained in the first chemotaxis step. That is due to the reproduction loop, where the present bacteria are cloned from the best previous one. So, the new chemotaxis event will be started with the best bacterium. It is clear here to deduce that the last chemotaxis loop presents the highly coast function and this is due to the worst half of bacteria, that will be eliminated.

Finally, the BFO generate the best IMC parameter that equivalent to the minimum of both speed error and overshoot. In this case, the best value is obtained for *N*_{re}=2, *N*_{ed}=2, *N*_{c}=1. Where, all the *S* bacteria locate the same optimum IMC parameter.

### 6.1 Comparative and discussion studies

The conventional IFOC strategy with three PI (PI method),

The IFOC strategy with a PI speed regulator and two standard IMC current regulators (IMC without BFO method),

The IFOC strategy with a neural network speed controller and two PI current controllers (NN method),

The IFOC strategy with a PI speed regulator and two BFO IMC current regulators (IMC with BFO method),

The proposed IFOC strategy with a RNNSC speed controller and two BFO IMC current regulators (IMC with BFO and NN method).

*t*=0.15 s and removed at

*t*=0.4 s. The same load torque crisp value (0.1 N.m) is added in the high speed region, at a time

*t*=0.9 s. An added 100 % abrupt stator resistance variation is introduced at a time

*t*=1 s. In Fig. 10, many zooms are presented to highlight PMSM speeds dynamic response performances according to the five previously cited methods. These zooms concern the load torque and parameter variations as same as the speeds overshoots. For the same methods and conditions, the Fig. 11 reports the phase plane stator flux components. It can be easily noticed that the IFOC decoupling and different magnetic regimes behavior are highly better for the proposed method (IMC with BFO and NN method). A comparison of different methods performances are extracted and summarized in Table 1. Where one easily notices the highest performances of the proposed method compared to others. The worst method (IMC without BFO) is not reported in this table and in the zooms too. The IFOC strategy with a PI speed regulator and two standard IMC current regulators (IMC without BFO method) gives the worst performances and the speed signal becomes unstable when a stator resistance variation occurs at a high speed regimes.

A comparative study between the four drive methods

Regimes |
| Methods | ||||
---|---|---|---|---|---|---|

PI | IMC with BFO | NN | IMC with BFO and NN | |||

Rated speed | Load torque variation |
| 0.04 | – | – | 0.06 |

Maximum speed error | ±0.4 % | ±0.8 % | 0.006 % | 0.004 % | ||

Speed performances |
| 0.03 | 0.03 | ≈0.02 | ≈0 | |

Overshoot Δ (%) | 1 % | 2.4 % | 0.2 % | 0.2 % | ||

High speed | Load torque variation |
| 0.04 | – | 0 | 0.04 |

Maximum speed error | ±0.25 % | ±0.3 % | 0.2 % | 0.025 % | ||

Speed performances |
| 0.05 | – | 0.02 | 0.05 | |

Overshoot Δ(%) | ±1.25 % | ±2 % | 0.125 % | 0.125 % | ||

Stator resistance variation |
| 0.02 | – | 0 | 0 | |

Maximum speed error | ±0.5 % | ±0.25 % | 0 | 0 | ||

Number of controllers tuning parameters | 6 | 3 | 4 | 1 |

The speeds dynamic responses reported in Fig. 10 confirm that the dynamic performances of the proposed method are much higher versus the four candidate methods. From Fig. 11 the NN and IMC-BFO method phase plane trajectory of the motor flux, indicates the superiority in IFOC decoupling at different speed regimes and in its high performances dynamic trajectory behavior.

The major drawback of the PMSM is the ripple in the produced torque which is critical. The important torque ripple source is generated by the interaction of the stator current magnetomotive forces and the permanent magnetic field produced. In order to reduce this, good performance current regulation is the challenge. Figure 14b, confirms the obtained high performances in stator current regulation against load torque and resistance variations for a large speed working range. Therefore, the use of IMC with BFO (Fig. 14b) in current regulation is better than that of conventional PI (Fig. 14a). From the IMC with BFO current regulation response which is robust and precise, it can be concluded that the IFOC used strategy will have good decoupling, the drive scheme is of energy saving and the torque ripple is then reduced. For a high performance drives the speed regulation performance is not sufficient because this can induces lost of FOC decoupling, worst efficiency and higher torque ripple. For that the use of IMC with BFO is very helpful to enhance the PMSM drive performances.

*i*

_{q}generates the torque and

*i*

_{d}is generated by the field weakening algorithm accordingly to the speed working regime. It can be seen the agreement of the estimated speed with the reference one. A stator resistance and torque variations are applied and the system response is immune to that.

## 7 Conclusion

In this paper, a high performances sensorless PMSM drives based on the recurrent neuronal networks and the bacteria foraging algorithm IMC tuning is developed to control the PMSM at wide speed range. The Internal model control based on the bacteria foraging algorithm for adjusting the parameters of the IMC controller, was applied as a robust command in the IFOC strategy. The recurrent neural network algorithm was described and the bacteria foraging algorithm was presented. The simulation results prove the good performances obtained for the proposed control scheme under load torque and stator resistance variations.

### Open Access

This article is distributed under the terms of the Creative Commons Attribution License which permits any use, distribution, and reproduction in any medium, provided the original author(s) and the source are credited.