Sliding mode rule base
Fuzzy controllers are nonlinear elements used in the control of linguistically defined systems, which can not be modeled accurately. Besides, they are an effective approach for various complex and ill-defined systems [1,2]. In design of fuzzy controllers, there is not well defined approach. The sophisticated and tedious design process is usually implemented by an expert. The success of the controller depends on the knowledge and skill of the expert. In some cases, even a very experienced and skillful expert’s extensive efforts may not yield optimal solution for fuzzy controller design. The optimal design of fuzzy controller has a critical role for their more widespread and effective use. The design inherently requires the determination of a great deal of features and parameters. For this reason, fuzzy controller design problem has a number of local values in a large solution space in the direction of a number of objectives. The conventional trial-and-error based method makes the solution of the problem very difficult .
Genetic algorithms (GAs) are optimization strategies performing a stochastic search by iteratively processing ‘populations’ of solutions according to their fitness, i.e. a predefined scalar index of satisfaction of the design objectives. In control applications, the fitness is usually related to performance measures such as integral error, settling time, and so on. Fitness function may contain more than one objective like the minimization of settling time, steady state error and maximum overshoot. Thus, fitness function can be addressed as a multi objective function. GAs are effective in solving multi-objective optimization problems [4,5].
Most of the GA approaches in use represent the constraint variable using binary form of coding. One of the major disadvantages of using binary coding is the slow convergence speed of the fitness function. Binary coding is also not at all efficient to be used in computer memory. Therefore, the use of real coded genetic algorithm can overcome the inefficient use of computer memory and can contribute the performance. This contribution becomes clear when a lot of parameters are needed to be adjusted in the same problem and higher precision is required for the final result. In literature, for real valued numerical optimization problem, floating point representations were proven to outperform binary representations because they are more consistent, more precise and they lead to faster execution. Also, real coded GA is inherently faster than the binary code GA, because the chromosomes do not have to be decoded prior to the evaluation of the objective function .
Brushless DC (BLDC) motors are one of the motor types rapidly gaining popularity. Due to their favorable electrical and mechanical properties like high starting torque, high efficiency and noiseless operation, the BLDC motors are widely used in various consumer and industrial systems such as actuation, robotics, machine tools, servo motor drives, home appliances, computer peripherals, and automotive applications [5,7]. Operation of the BLDC motors requires non-linear control due to their non-linear characteristics and presence of sensors to estimate rotor position. Moreover, owing to some drawbacks of position sensors such as cost, space requirement and instability, sensorless speed control has recently gained importance . It is possible to determine when to commutate the motor drive voltages by sensing the back emf voltage on an undriven motor terminal during one of the drive phases. Use of fuzzy controllers that have non-linear processes such as fuzzification, defuzzification and fuzzy inference is suitable for BLDC motor control.
In this study, sensorless speed control of the BLDC motor with real coded GA based fuzzy controller has been designed, simulated and practically implemented. ADSP-21992 digital signal processor (DSP) is used to realize the conventional and optimal fuzzy controller algorithms and sensorless speed control of the BLDC motor has been experimentally implemented successfully.
2. Real coded GA based fuzzy controller
The realized control system general diagram is shown in Figure 1. As shown in the figure, the control system includes two closed loops. The inner loop is the fuzzy controller loop that accomplishes speed control of BLDC motor. The outer loop, which processes the fuzzy controller and system operations in background, is the genetic algorithm loop that tunes the controller parameters in regard to performance index of the control system.
2.1. Fuzzy controller
In this study, Mamdani type fuzzy controller, which has five blocks namely normalization, fuzzifier, inference mechanism, defuzzifier and denormalization, has been used . Block diagram of the real coded GA based fuzzy controller consisting two inputs (
In closed-loop control systems, the use of error (
In a fuzzy control system as shown in Figure 2, two normalization parameters (
In the fuzzifier process, the crisp input values (
In this study, the center-of-gravity method given by Eq. (3) has been used in defuzzifier process for simulation and real time DSP application.
The rule definition is subjective and based on the expert’s knowledge and experience. For the system with two inputs and seven membership functions in each range, it leads to a 7x7 decision table and 49 fuzzy rules. For example, two fuzzy rules are decribed as;
Sliding mode rule base table used by fuzzy controller is given in Table 1. In the sliding mode rule base, when an assumption is made such that
The developed fuzzy logic uses the min-max compositional rule of inference. The inference mechanism of fuzzy controller is implemented in regard to the rule base given by Eq. (4).
Fuzzy controllers are nonlinear tools because of the nonlinearity of logical inference, fuzzifier and defuzzifier processes. As mentioned earlier, design of fuzzy controller requires determination of a minimum of 16 parameters comprised of three normalization parameters, six membership function parameters and seven sliding mode rule base parameters. The parameters are decided in regard to the symetrical properties of the controller and that imposes limitations for the controller. The reduction of the number of parameters gives acceptable results and it can be preferred in design process to simplify the sophisticated optimization process.
2.2. Optimization of fuzzy controller by means of real coded GA
In problem solving, the precision of the numbers is crucial. In binary coded GA, the accuracy is limited by the size of the chromosomes. However, the use of real coded GA, which can be coded by real numbers, is advantageous. Real coded GA is more accurate and occupies less space in memory. In literature, it has been reported that, real coded GAs operate faster than binary coded GAs and they can converge to global optimum faster . Also, in the optimization of systems consisting a great deal of parameters to be optimized as in fuzzy controllers, the chromosomes in the binary coded GA becomes too long and the parameter accuracy can not be handled. However, in the developed algorithm, the parameters are coded by integer number set and the parameter accuracy can be determined arbitrarily. Also, in the developed algorithm, binary coding can be accomplished in the limited valued parameters for the optimization of sliding mode rule base table (
In Figure 4, the flowchart of real coded GA used in the study is shown. Some of the GA parameters such as the possible lower and upper limit values of parameters, the precision of parameters, the termination criterion or loop number, the mutation probability, the crossover probability, the population number and elitism property is required to be initialized.
In the proposed algorithm, the normalization parameters (
In Figure 5 (a), the coding of three normalization parameters in six digit number string in real coded GA is depicted. Here, in six digit number string, two of it is assigned for integer part and four of it is for the fractional part. As shown in Figure 5 (b), a total of six coding has been implemented for three membership functions. Here,
In the implemented algorithm, the initial population can be preferably set by the user or can be randomly appointed a value in regard to Eq.(6). An important feature of random generator is that in each execution of the algorithm different values are initialized.
Genetic algorithms sometimes converge prematurely. In order to prevent convergence to a local point, new solutions are obtained by means of mutation. In this study, the number of parameters to be applied to the mutation operation has been determined by multiplying the total number of parameters with mutation rate. The elements to apply mutation operation are determined and they are replaced by randomly generated numbers.
In the developed algorithm, the elitism, a mechanism in which the individuals with the best fitness values in previous population are guaranteed their place in the next population, is implemented by selecting. Later, new fitness value is determined again for new population. Optimization process goes on until the termination criterion is met.
3. Sensorless control of BLDC motor
The BLDC control drive system is based on the feedback of rotor position, which is obtained at fixed points typically every 60 electrical degrees for six-step commutations of the phase currents. So, the operation of BLDC motor requires a control system and position sensors to estimate rotor position. Rotor position is sensed using Hall effect sensors embedded into the stator frequently. However, sensorless speed control has recently gained importance owing to the elimination of some drawbacks of sensors such as cost, space requirement and instability. Figure 6 shows basic block diagram of sensorless control of BLDC motor with real coded GA based fuzzy controller.
In Figure 6, is the reference speed (rad/sec), is the actual rotor speed (rad/sec), θ is the rotor position (degree), u is the control signal used to reference moment (N-m), i
In speed control loop as shown in the block digram, the reference speed and the actual motor speed is compared and the error signal is obtained. These signals (
3.1. Modeling of the BLDC motor
Figure 7 describes the basic building blocks of the BLDC motor and inverter that results in a system producing a linear speed-torque characteristic similar to the conventional DC motor. BLDC motor has three phase windings on the stator similar to three phase squirrel cage induction motor and magnets are placed on the rotor to provide air gap flux resulting in brushless rotor construction. When the motor is operated at a certain speed, trapezoidal emfs are induced in stator phase windings. The quasi-square wave AC current is fed to stator phase windings through electronic commutator using current controlled voltage source inverter and rotor position sensor resulting in constant torque development by the motor.
At any instant, two out of three phase stator windings of the motor carry currents synchronized with developed electromagnetic torque as shown in Figure 8. Active switching states for three phase inverter operation, three phase back-emf waveforms and torques of all phases are illustrated in Figure 8. Here, three phase PWM inverter operation can be divided into six modes according to the current conduction states.
The BLDC motor is not saturated.
Stator resistances of all the windings are equal, self and mutual inductances are constant.
Semiconductor devices in the inverter are ideal.
Iron losses are negligible.
Back-emf waveforms of all phases are equal under above assumptions. A BLDC motor model can be represented as;
The motion equation is expressed as;
This torque expression causes a computational difficulty at zero speed as the induced emf is zero. In this study, the trapezoidal back-emf waveforms are modeled as a function of rotor position to be able to estimate position actively according to the operation speed.
3.2. Modeling of trapezoidal back-emf
The back-emfs can be expressed as a function of rotor position (
3.3. Advanced simulation model of BLDC motor by using Runge-Kutta numerical integration method
Runge-Kutta method is a frequently used method for solving differential equations numerically. In engineering solutions, fourth order Runge-Kutta method is the most widely used one . For BLDC motor simulations,
where k is the sample and T is the sampling period.
3.4. Reference current generator
Reference current generator determines reference phase currents () of the motor in regard to reference current amplitude (
3.5. Current control block
In PWM current control block, reference phase currents () acquired from reference current generator is compared with actual phase currents of the motor (). These current error values () obtained using Eq. (17) are applied to inverter hysteresis band (±
Inverter phase voltages (
4. Simulation results
An algorithm has been developed to simulate the proposed real coded GA based fuzzy controller in BLDC motor drive. In all simulations and practical applications, the BLDC motor and inverter having the parameters listed in Table 3 have been used.
|Rating (||106 watt|
|Number of Phase (Connection)||3 (Star)|
|Rated speed||4228 rpm.|
|Rated current||6.8 A|
|Stator equivalent resistance (||0.348 Ω|
|Stator equivalent inductance (||0.314 mH|
|Moment of inertia (||0.0019 Ncm-s2|
|Number of Pole (||8|
|Voltage constant (||0.0419 V/rad/s|
|Torque constant (||4.19 Ncm/A|
|PWM frequency (||20 kHz|
|Inverter DC supply (||24 volt|
|Inverter hysteresis limits (||± 0.5|
|Inverter current limiter (||20 A|
First of all, conventional fuzzy controller is designed based on trial-error method and simulation. The parameters of conventional fuzzy controller are obtained as;
During simulation of sequential approach, normalization parameters, then rule base and the membership functions have been optimized sequentially. In this approach, the chosen values for mutation probability is 0.05, crossover probability is 0.8, population number is 20, the reference speed for the BLDC motor is set at 2000 rpm, and the motor operates in full load. In the second approach which uses simultaneous optimization, the process is implemented by coding all fuzzy controller parameters in GA simultaneously. In this approach, the chosen values for mutation probability is 0.1, crossover probability is 1, population number is 20, the reference speed for the BLDC motor is set at 2000 rpm and the motor operates in full load. The obtained design parameters of optimal fuzzy controllers using sequential and simultaneous real coded GA are given in Table 4.
For a reference speed of 2000 rpm and operating the BLDC motor in full load, the speed responses and error variations of conventional fuzzy control, sequential GA based fuzzy control and simultaneous GA based fuzzy control are shown in Figure 9 (a) and 9 (b), respectively.
The convergence of performance index (
In the sequential optimization method, the performance index (
5. Experimental results
Block diagram of the configuration of DSP based experimental system is shown in Figure 11. The experimental system consist of a brushless DC motor, a voltage source inverter, a current detector for hysteresis current control loop, back-emf detector for sensorless speed control loop, ADSP-21992 Ez-Kit Lite evaluation board, interface devices between ADSP and driver board, a PC and VisualDSP++ software for emulating and programming the DSP.
In the experimental study, sensorless control of the BLDC motor was implemented successfully using conventional fuzzy controller, sequential and simultaneous real coded GA based fuzzy controller, which have parameters obtained by simulation and given in Table 4. Optimal fuzzy controller was implemented in high level C programming language; the program was compiled by VisualDSP++ C compiler and downloaded to the ADSP-21992 DSP controller board. The block diagram of the configuration of closed loop speed control of BLDC motor executed without position and speed sensors is illustrated in Fig 11(a). The experimental setup implemented in the laboratory is shown in Fig 11(b). The reference speed for BLDC motor is set at 2000 rpm, and the motor operates in full load similar with the simulations.
In Figure 12, phase to phase voltage and phase current waveforms of BLDC motor are shown. The responses of both conventional and sequential real coded GA based fuzzy controller are shown in Figure 13, conventional fuzzy and simultaneous real coded GA based fuzzy controller are shown in Figure 14, sequential real coded GA based fuzzy and simultaneous real coded GA based fuzzy controller are shown in Figure 15, respectively.
The experimental results illustrated in these figures prove that the BLDC motor control system was implemented successfully and it operates stably. Also, it is indicated that simulation results show agreement with experimental results.
6. Limitations of the proposed methods
Although real coded genetic algorithm based fuzzy controller has shown a good behaviour for sensorless speed control of a Brushless DC Motor, we think that there are some limitations and disadvantages as follows in proposed method.
Like other artificial intelligence techniques, the genetic algorithm cannot assure constant optimisation response times. Even more, the difference between the shortest and the longest optimisation response time is much larger than with conventional gradient methods. This unfortunate genetic algorithm property limits the genetic algorithms' use in real time applications.
Genetic algorithm applications in controls which are performed in real time are limited because of random solutions and convergence, in other words this means that the entire population is improving, but this could not be said for an individual within this population. Therefore, it is unreasonable to use genetic algorithms for on-line controls in real time systems without testing them first on a simulation model.
For the design of an effective controller, simulation model of the system is necessary to obtain the most accurately. However, even if the best controller have been designed in simulation environment, fine tuning may be require in order to use the same controller in on-line system.
Micro genetic algorithm which can produce near optimal solution may be used in on-line system for fine tuning.
It is not possible to show the stability of the fuzzy controlled system, since the model is not known. If the system model is obtained exactly, the use of tradional gradient descent methods may give better result for optimal control in on-line systems.
In fuzzy control systems, computing time could be long, because of the complex operations such as fuzzifications and particularly defuzzification. So, the fuzzy controller hardware requires high-speed processors, such as DSP, FPGA.
The advantage of sensorless BLDC motor control is that the sensing part can be omitted, and thus overall costs can be considerably reduced. In addition, the disadvantages of sensorless control are higher requirements for control algorithms and more complicated electronics.
As a result of the study, optimal fuzzy controller has been designed off-line by using real coded GA and the obtained fuzzy controller has been used on-line for DSP-based BLDC motor control system. Modeling of the BLDC motor was performed more accurately to take account of trapezoidal back-emf waveforms and furthermore, fourth order Runge-Kutta numerical integration method was used to decrease the truncation error and numerical instabilities in simulation. Also, the results of our research indicate that an improvement in the transient state and steady state responses of the system has been obtained by means of optimization process using real coded GA. It is clear that, sequential optimization takes less time. Also, observing the system speed response and error curves, it can be deduced that the sequential method gives satisfactory results and that it can be preferred in applications. It was observed that the use of real coded GA makes it possible to adjust system parameters more precisely. Also, the size of chromosomes, in which a great deal of parameters is coded, is reduced. Besides, the proposed method limits the process time to minutes.
This study was supported by Selcuk University Scientific Research Projects (BAP) Support Fund under contract number 2003/051.