Real time simulation of sensorless control based on back-EMF of PMSM on RT-Lab/ARTEMIS real-time digital simulator

ABSTRACT


INTRODUCTION
The Permanent-Magnet Synchronous Motor (PMSM) controlled by a converter of power electronics is a nonlinear system usually present complex. The main research areas in electrical drives include high-level integrated motor drive, new topologies of converter-inverter, new adjustable speed drives (ASD), optimizationof performance, control algorithms, and fault tolerant controllers design. Therefore, to perform tests at system level which is one of the principle subsystems in the development of a complex product and to maintain this development and prototyping costs at reasonable level, we need real-time (RT) simulations [1][2][3][4][5]. In addition, trying to reach technology and cost at optimium point, it pushes us to use a device that can be able of doing many parallel execution at the same time. DSPs are fast but it is necessary to do sequential calculation. If someone wants to build simulation in real time it is possible with DSP but it needs a DSP with very fast clock. Since the 1970s, Programmable logic arrays (PLAs) have been available but their applications were limited. Field-Programmable Gate Array offers more possibilities by the (FPGA) concept [6][7][8], introduced by Xilinx' cofounder Freeman in 1984 [9]. RT-Lab simulator consists of two major subsystems, software with a Matlab / Simulink and hardware including FPGA boards for data acquisition, control boards and sensors. The two subsystems were coordinated together to achieve the simulation RT.
Recently, there has been a lot of interest in the developpement ofsensorless algorithms in which the motor was controlled using the rotor angular speed estimated values [10,11]. Several methods have been developed in order to estimate speed or position of the rotor, and among them are Extended Kalman Filter  [12]. The latter has a fast response, good robustness against themachine parameter variations and external disturbances [13,14]. In sensorless control [15][16][17][18][19][20][21], some variables of machines are often not directly measurable, but their accurate knowledge is more than necessary for high-performance electrical drives control. Sensorless vector control scheme is successfully implemented if the the accuracy of the estimation of the rotor position is good. This algorithm is implemented by fundamental excitation method and the position of the rotor is detected from the back electromotive force (back EMF) [22,23].
In this paper, a fully digital real-time simulation of a high performance of sensorlesscontrol of Permanent Magnet Synchronous Motor based on back-EMF estimator was presented. The validation and implementation of the proposed algorithm was reached through Opal RT's RT-Lab real-time simulation platform; able to perform calculations at time steps up to 10μs. This real-time simulation tool is now extensively employed by a great number of high-tech industries as a real-time laboratory package for rapid prototyping of complex control systems and for hardware-in-the-loop (HIL) applications. By the use of HIL simulations in the design process, overall cost can be reduced, development cycles reduced, costly breakdowns avoided, and interaction between different subsystems tested.

PMSM MATHEMATICAL MODEL
The field-based control framework presented in this paper is presented on a low voltage permanent magnet synchronous motor. To simplify the motor equations, the following hypotheses have been formulated [1,19]: Magnetic flux distribution in the air gap is sinusoidal, Inductivityand resistivity are constant and equivalent in all phases, Hysteresis losses and Eddy currents are neglected and Lead of star point is not connected. Model of synchronous motor in ( − ) rotating frame can be described by (1) Where , , , are the ( , ) components of stator voltage and current vectors, and = , are the mechanical angular speed and rotor position, , are stator resistance and inductance, is the flux generated by PMs, is moment of inertia, is electromagnetic torque and is the number of motor pole pairs. and are the stator back EMF components on ( , ) frame defined by (2) = − = (2)

SLIDING MODE OBSERVER 3.1. Observer based on back EMF
For the estimatation of the unmeasured mechanical quantities, we will develop an electromotive force (EMF)-based sliding modeobserver defined in (2). Assuming that the speed varies slowly [24,25].
The EMF dynamics can be written as follows
The EMF is given as follows Where, _ , _ are estimated currents and , are observer gains. The estimated speed can be calculated from (2) = and is the back EMF on the axis (q) Finally, the rotor position can be estimated as follow

Stability analysis
A fast and accurate current regulator is essential to reacha good dynamic and static performance of sensorless control of the PMSM. The structure of the proposed control uses two sliding surfaces to regulate the stator current according to the fixed reference ( , ) When the variable structure control system operates in sliding mode, the switching control law ensures the condition = = 0. AL yapunovfunction is used to analysis the stability of the sliding mode observer Requisite condition for sliding mode observer stability is obtained as follows By subtracting (10) from (5) and (6), the estimation error equation is concluded From (14) we have Therefore, to keep the observer sliding modes stable, the observer gain should satisfy the following inequality According to (17), the observer gain must be greater than the induced back EMF.

PLATFORMOF RT-LAB REAL TIME
The RT-LAB Simulator Architecture is shown in Figure 1.

REAL TIME HYBRID SIMULATION PRINCIPLE
A PC-Cluster is a parallel multiprocessor computer system capable of meeting the real-time simulation performance requirements [1,27]. Figure 2 shows the design of the real-time digital simulation of PMSM sensorless control. The real-time simulation is performed by running on separate processors (targets) and in parallel the speed and decoupling control module, the static converter module and the PMSM module. These three modules are actually C code (digital modules) obtained by an automatic code generator for realtime execution.  6. IMPLEMENTATION USING RT-LAB SIMULATOR 6.1. Organization of software development Figure 3 shows the proposed sensorless control of PMSM as implemented in Real time RT-Lab environment. The model is distributed over three target processor motherboards. The first two target processors operate at 2.4 GHz. The third, connected to others through a fast real-time Fire Wire link. The first CPU of the dual CPU unit calculates in real time the sliding mode observer and the decoupling unit of the rotor flux. The second calculates in real time the permanent magnet synchronous motor, the PWM signal generator and the voltage source inverter. The third processor is dedicated to data acquisition. The host PC is the console used for the control signals, the input reference, and the signal visualization.  Figure 4 shows the steps of control algorithm for real-time execution. In RT-Lab real time simulation, the first step is to group the model into sub-systems; the second step is the addition of the OpComm communication blocks which allow the activation and the saving of communication between host PC and target PC as well as between the different calculation nodes of a distributed simulation. The last step is to execute the model under RT-Lab according to the following steps (see Figure 4): open the model already created under Matlab/Simulink, then divide the global system into subsystems (model separation) and convert the Simulink model in real time via Real-Time Workshop (RTW) (specify exactly on which node of target will be executed each subsystem) and finally run the model on one or more QNX (Quick Unix) target. The C code is generated automatically for each subsystem for real-time execution [3]. Figure 5 shows the experimental setup of RT-Lab platform. The distributed configuration (multiple targets) allows complex models to be distributed on a parallel PC cluster. The real-time cluster is connected to the host PC through a TCP/IP Protocol.  Figure 9 shows the real time simulation of real and estimated currents. As shown in Figure 9 the estimated stator current components converge to the real stator current components, it's clear that the waveforms of currents are sinusoid.
From the experimental results, we concluded that that the sensorless control scheme associated with sliding mode observer has a fast response time and good estimation accuracy over a wide speed range. Table 1 shows the simulation time with PSB and RT-Lab / ARTEMIS. The article [24] shows the simulation conditions and processors used for the simulation of the separate model on the multiprocessor platform.

CONCLUSION
A Real-time simulation of the sensorless control using a sliding mode observer based on the back EMF estimation has been presented in this paper. The stability of the proposed scheme has been demonstrated using Lyapunov concept. The feasibility of the whole algorithm has been verified by real time simulation results using RT-Lab/ARTEMIS real time digital simulator. Hardware applications in loops need real-time simulations and their use allows rapid prototyping of high-performance electrical machine controllers. A multi-processor system, parallel processing and FPGA-based computing support make this platform a very interesting tool for research, innovation and testing. High speed PMSM Implementation, especially in technology of electrical vehicle is very expensive and risky. Real time simulator helps us to evaluate simulation results. As future work, once the controller is designed in MATLAB/SIMULINK, it will be physically implemented using the rapid control prototyping of the real time RT-Lab platform. FPGA based digital platform is good enough for real time control of electrical machines.