Implementation of Type-2 Fuzzy Logic Controller in PMSM Drives Using DSP

Received Oct 30, 2017 Revised Apr 24, 2018 Accepted Aug 6, 2018 This paper presents interval type-2 fuzzy logic (IT2FL) controller applied on a direct torque controlled (DTC) permanent magnet synchronous motor (PMSM), using digital signal processing (DSP). The simulation of PMSM with space vector pulse widths modulation (SVPWM) inverter presented under several operating condition. To verify the simulation results a hard ware setup is prepared and tested at several operating conditions using dspace 1102 DSP model. The experimental and simulation results are in agreement, the torque dynamic response is very rapid and the system achieves the steady state in a very short time. Keyword:


INTRODUCTION
Fuzzy logic systems (FLS) have been successfully applied to control complex or ill-defined processes whose mathematical models are difficult to obtain. The ability of converting linguistic descriptions into automatic control strategy has made it a practical and promising alternative to the classical control scheme for achieving control of complex nonlinear systems.
The concept of type-2 fuzzy sets was initially proposed by Zadeh as an extension of typical fuzzy sets (called type-1). Mendel and Karnik developed a complete theory of IT2FL systems. Recently, T2FLSs have attracted more attention in many literatures and special issue of IEEE Transactions on Fuzzy systems. A decentralized adaptive controller based on type-2 fuzzy systems has been presented by [1], the controller used to maintains the tracking errors in PMSM based on field oriented control. An adaptive IT2FLCcontroller is proposed in [2] for PMSM drives, Type-2 fuzzy logic system combined with adaptive control to achieve accurate control system which able to track the refence speed in a system with higher uncertainties.
IT2FL systems are more complex than type-1, the major difference being the present of type-2 is their antecedent and consequent sets. IT2FL systems result better performance than type-1 fuzzy logic systems on the applications of function approximation, modeling and control [2]- [8]. The wide ranges of applications of type-2 FLS have shown that it provide good solutions, especially in the presence of uncertainties as a. Uncertainties in inputs to the FLC which translate to uncertainties in the antecedent Membership Functions (MFs). b. Uncertainties in control outputs which translate to uncertainties in the consequent MFs of the FLC. c. Linguistic uncertainties as the meaning of words that are used in the antecedent and consequent linguistic labels can be uncertain-words mean different things to different people.
In the mid 1980's the direct torque control (DTC) was introduced for induction motor by Takahashi et al. In the 1990's, DTC for permanent magnet synchronous motor (PMSM) was developed. Compared with field oriented control, the DTC has many advantages such as less machine parameter dependence, simpler implementation and quicker dynamic torque response. There is no current controller needed in DTC, because it selects the voltage space vectors according to the errors of flux linkage and torque. DTC has some drawbacks, such as the high torque and flux ripples. Due to sophisticated and large computational of vector control DTC recognized as a viable solution to achieve these requirements and reduce the complexity of vector control.
In this article, DTC technique used to control the speed of the PMSM, the speed controller is represented by IT2FL, the torque and flux regulators are represented by conventional PI controllers. The controller's parameters are adjusted for minium traking error, the system implemented and tested at different operating conditions using DSP.

PMSM MATHEMATICAL MODEL AND DIRECT TORQUE CONTROL PRINCIPLE
The stator flux linkage vector ψs and rotor flux linkage ψm can be drawn in the rotor reference frame (d-q), stator reference frame (ds-qs) and stationary reference frame(α-β) as shownin Figure 1[9]- [12]. (1) Where vd, and vq are the d-q axis voltages, id and iq are the d-q axis stator currents, Ld and Lq, are the d-q axis inductances, , and , are the d-q axis stator flux linkages, is the stator resistance per phase, the rotor speed and , is the stator flux linkage due to the rotor magnets. By transforming the rotor reference flux component ψd, ψq and current id, iq to the stator reference flux component ψds, ψqs and current component ids, iqs with the transformation (6) and (7), torque (5) can be transformed as in (8).
Equation (10) shows that to increase torque, δ should be increased; to increase δ stator flux should turn faster than rotor flux by the selection of optimum voltage vector according to difference between the reference and actual values of torque and flux.

SPACE VECTOR MODULATION
The main advantages of the space vector modulation (SVM) are: A 15% increase in DC link voltage utilization compared with the sine-triangle technique. Lower harmonic content, particularly at high modulation indices compared with the sine-triangle technique [11].
The voltage-vector space is divided up into six sectors in the vector space as shown in voltagevector space in Figure 2. In one sampling interval, the output voltage vector can be written as (11) Where t0, t1,………., t7 are the turn-on time of the vectors ,….., , t0, t1,….., t7≥0, , and Ts is the switching time. However, in order to reduce the number of switching actions and make full use of active turn-on time for space vectors, the vector U is commonly split into the two nearest adjacent voltage vectors and zero vectors U0 and U7 in an arbitrary sector. For example, in sector I, in one sampling interval, vector U can be expressed as:

INTERVAL TYPE -2 FUZZY LOGIC SYSTEM
In order to represent an IT2F set, we use two membership functions called upper membership (UMF) and lower membership (LMF) [13]- [18]. Uncertainty of the primary membership grade of a type-2

1101
MF consist a bounded region that called footprint of uncertainty (FOU) which models the uncertainties in the shape and position of the type-1 fuzzy set. Shown in Figure 3. An UMF and a LMF are two type-1 MFs that are bounds for the FOU of an interval type-2 MF. The UMF is a subset that has the maximum membership grade of the FOU, and the LMF is a subset that has the minimum membership grade of the FOU Figure 4. A IT2FLS consists of four basic elements Figure 5: the type-2 fuzzyfier, the fuzzy rule-base, the inference engine, and the type-2 type reduction/defuzzifier. The IT2FL system works as follows, the crisp inputs from the input sensors are first fuzzified into input type-2 fuzzy sets. The input type-2 fuzzy sets then activate the inference engine and the rule base to produce output type-2 fuzzy sets. The type-2 FLC rules will remain the same as in a type-1 FLC but the antecedents and/or the consequents will be represented by IT2F sets. The inference engine combines the fired rules and gives a mapping from input type-2 fuzzy sets to output type-2 fuzzy sets. The type-2 fuzzy outputs of the inference engine are then processed by the typereducer which combines the output sets and performs a calculation which leads to type-1 fuzzy sets called the type-reduced sets. After the type-reduction process, the type-reduced sets are defuzzified to obtain crisp outputs that are sent to the actuators [14]- [16]. It has been argued that using IT2F sets to represent the inputs and/or outputs of FLCs has many advantages when compared to type-1 fuzzy sets; we summaries some of these advantages as follows: 1. As the type-2 fuzzy set membership functions are themselves fuzzy and contain a footprint of uncertainty, they can model and handle the linguistic and numerical uncertainties associated with the inputs and outputs of the FLC. Therefore, FLCs that are based on type-2 fuzzy sets will have the potential to produce a better performance than type-1 FLCs when dealing with uncertainties. 2. Using type-2 fuzzy sets to represent the FLC inputs and outputs will result in the reduction of the FLC rule base when compared to using type-1 fuzzy sets as the uncertainty represented in the footprint of uncertainty in type-2 fuzzy sets lets us cover the same range as type-1 fuzzy sets with a smaller number of labels. The rule reduction will be greater as the number of the FLC inputs increases. 3. Each input and output will be represented by a large number of type-1 fuzzy sets which are embedded in the type-2 fuzzy sets. The use of such a large number of type-1 fuzzy sets to describe the input and output variables allows for a detailed description of the analytical control surface as the addition of the extra levels of classification gives a much smoother control surface and response. 4. It has been shown that the extra degrees of freedom provided by the footprint of uncertainty enables a type-2 FLC to produce outputs that cannot be achieved by type-1 FLCs with the same number of membership. A standard approach for speed control in drives is the use of a PI controller. Recent developments in artificial intelligence based control have brought in to focus a possibility of replacing a PI controller with a fuzzy logic (FL).
The membership functions for input and output variables for the PI-type fuzzy type-2 are speed error (E), change of speed error (ΔE), and change of torque as output (ΔT).

EXPERIMENTAL DRIVE CONFIGURATION
The laboratory set-up built for experimental tests of the PMSM drive system consists of the following main parts: The overall system as shown in Figure 6 consists of the PMSM with built in resolver and shaft encoder in order to measure the motor position, another component in the system is the BECKHOFF digital servo amplifier which drive the motor using space vector PWM technique, also, there are output group of sensors to measure the actual motor currents, voltage, and torque. This system is controlled using DSP implemented in computer system using Matlab software.

SIMULATION AND EXPERIMENTAL RESULTS
There are many control strategies for DTC PMSM drives. Fuzzy typ-1 was used in control of DTC PMSM drives and now we apply IT2FLS. IT2FL controller is used for speed loop, torque and flux loops controllers are of conventional PI controller type [19]- [23]. The system is modeled with MATLAB SIMULINK using PMSM data in appendix (A), with switching time Ts=0.0002sec. Figure 7 shows the speed response at 2000 rpm reference speed, while Figure 8 shows the load torque response (TL) at load step change from 0.55 NM to 1.1 N.M at 1 sec time, Figure 9.shows the current response. Motor torque and reference torque is shown in Figure 10.

CONCLUSION
This paper presents modeling, simulation and implementation of a speed control in PMSM drive based on DTC technique. IT2FL utilized as a speed controller, since it provides additional degrees of freedom and handles systems uncertainties. The drive system has been simulated and tested using MATLAB SIMULINK. Simulation and experimental are presented under different operating conditions. A hardware setup is implemented and tested using dspace 1102 DSP board. The results show that the system operation more smooth and reaches steady state faster when using fuzzy type-2 with the same number of memberships as compared to conventional fuzzy. The system reaches steady state in 700 ms, 1.5% speed overshot, 1.35% speed ripples and zero steady state speed error experimentally. The results show good agreement between simulation and test results.