Real-Time Fuzzy Logic Control of Switched Reluctance Motor

In this study, 8/6 switched reluctance motor (SRM) is controlled by fuzzy logic. For driving SRM, four phase asymmetric bridge converter is chosen. STM32F4 Discovery processor and MATLAB Simulink software fuzzy logic controller (FLC) are used. SRM’s speed and current are transferred to the computer in real-time. Measured speeds and currents are plotted. It is shown here that, the SRM for different reference speeds and loads is controlled by a STM32F4 Discovery card with MATLAB Simulink FLC.


Introduction
Real-time performance of controllers takes a long process during industrial design. Depending on increased demands, the importance of designing real time controllers become crucial due to: 1) testing the system in real time, and 2) reducing project completion time [1]. Testing control techniques and evaluated their performance in real-time is critical issue for future controllers design. Fuzzy logic has been already successfully used in industrial applications. Especially, for modeling and controlling nonlinear systems fuzzy logic has an inevitable importance [2]. SRM is a nonlinear system which is the most important characteristic of SRM. The reason for this is a nonlinear inductance of magnetic circuit which is depending on phase current and rotor positions [3,4]. Because of the nonlinear characteristic of the SRM and variable parameters, it needs a controller which is able to control SRM. To use classical controllers on a system, a mathematical model describing the system phenomena must be known. Because of this reason, the classic controllers such as P, PI, and PID controllers does not meet the requirements [5]. For SRM controlling, a nonlinear control system must be used [6]. In the last decades, intelligent control techniques are used for nonlinear system and also many studies are done on SRM speed controls by using intelligent techniques [7][8][9][10].
The MATLAB Simulink software is useful to use in real-time data exchange. Besides this, it is, also used in many control applications. For example, it is used for a dynamic system modeling, its simulation and analysis [11,12]. In the literature, numerous studies in real-time system control are performed with MATLAB/Simulink software [13][14][15]. Digital signal processors which are designed with fuzzy controllers using MATLAB are commonly used for real time applications. TMS, Spartan and Xilinx cards are the most common cards in academic studies [16][17][18]. Due to technological progress on microcontrollers, economic microcontrollers which are compatible with MATLAB simulink, and have been developed recent decades, the STM32F4 Discovery microcontroller is one of this economic microcontroller [19,20]. In this study, SRM was controlled by the fuzzy logical controlled driver. For driving SRM, we chose four phase asymmetric bridge converter. SRM's speed control was done by fuzzy logic and was controlled in real time using MATLAB Simulink software. In real time control, motor's current and speed outputs were transferred instantaneously to the computer and in the MATLAB Simulink software, the fuzzy logic controller was performed. MATLAB Simulink software is able to graph motor's speed and current values in real time. Samples of fungal affected images are shown in ( Figure.

Proposed Methodology
A block diagram for SRM's real time control is given in Fig. 1 and an experimental design for SRM's speed control are given in Fig. 2. In this study, 8/6 SRM is chosen to test the driver implemented. Technical specifications of SRM are given in the Table I. This motor is commonly used in mid-range industrial applications.
In equation (1), V is the supply voltage, R s is winding resistance per phase, i is the current of phase (A), θ rotor position (rad), L (θ,i) is the phase reluctance depending on rotor position and phase current, φ is magnetic flux. Magnetic flux equationis given in equation (2) and phase voltage equations are given in equations (3 and 4).
In equation (4), defines the ohmic voltage drop, ( , ) defines an inductive voltage drop and ( , ) represents induced electromotive force. The instantaneous power equation (5) is obtained by putting winding flux in equation (1) and multiplying with current (i).
The instantaneous power finally is written in equation (7) by putting pi in equation (6).
In equation (7), 2 represent a winding ohmic losses, A linear load is used for loading SRM and a synchronous alternator which is chosen. SRM's revolutions are obtained by an encoder. The current probe measures SRM's current values [22].
(360 pulse/round encoder is used to measure the rpm of SRM and 20A measuring ranged current sensor is used to measure thecurrent of the SRM [22].) The STM32F4 Discovery card is used for motor speed control in this study. STM32F4 Discovery is preferred in robotics, embedded systems, and many platforms. It is compatible with MATLAB Simulink software. It can also have a real-time application feature. The most important advantage of this card is a low cost comparing with the similar cards. It is easily obtainable and commonly used for many applications. (Controller produces 1 kHz digital output signal.)

Method
To apply a fuzzy logic controller (FLC) on a system, firstly system's input and output must be determined. The FLC's input and output variables are given in Fig. 4. An error on motor speed and an error ratio are chosen as aninput variable. The motor speed error and error ratio equations are given in equation (8) and (9) respectively.
In equation (8), * is a reference speed, ( ) is a real speed obtained from the motor, ( ) is speed error and ( − 1) is previous speed error.  In this study, FLC's rule base is given as:    There is a one FLC's output variable∆( ). A membership function of the output variable is given in Fig. 9. For Output

Results and Discussion
Performed unload, quarter loaded and half-loaded experiment's measurements are transferred to MATLAB and graphs are plotted in MATLAB. SRM is investigated for different motor speeds and loads. 1500 rpm and 3000 rpm motor speeds were used in this study.   Depending on the load situation, different SRM's responses were observed. For unloaded (Fig. 10) and quarter loaded SRM (Fig.  11), overflows were observed, before reaching steady level, besides those for half-loaded SRM, overflows did not observe (Fig. 12). Overflow rate was calculated 16 % for unloaded SRM, 1% for quarter loaded SRM. The lowest rise time was observed for unloaded SRM, the highest rise time was observed for halfloaded SRM. Rise-time and overflow time were tabulated in Table 3. When the SRM's speed reach follow the reference speed, the current decrease was also observed. During first speed up, the current was measured as 2.6 A, 4 A, 7.2 A. When the SRM reaches the steady state, the current was also stable.    1500 rpm motor speed with applied sinus function, graphs for unloading SRM (Fig. 13), quarter-loaded SRM (Fig. 14) and halfloaded SRM (Fig. 15) is plotted. ThePhase difference between SRM's measured speed and reference speed for unloading, quarter-loaded and half-loaded are measured of 25°, 40° and 42°, respectively.. While SRM's measured speed is following the reference speed, and the current is also observed as follows a sinus wave.

Conclusion
In this study, the control of SRM is done at different speed and load levels. The target-host method is applied successfully. The equipments used in the study are cheap andtheir accessibility is easy, which provided a significant advantage on this study. Experimental studies showed that SRM runs effectively via fuzzy logic control under different conditions. The reference speed applied to the motor is caught and steady state is provided. The real-time control used in this study can be applied to other studies, condition monitoring and fault diagnosis studies.