3 rd International Sympoium on Electrical Engineering and Energy er September 24-25, 2009, Suceava Technique for Implementing a Model Simulated on a Phyical Drive Vector Control Ciprian AFANASOV "Stefan cel Mare" Univerity of Suceava tr.univeritatii nr.3, RO-720229 Suceava aciprian@eed.uv.ro Abtract The purpoe of thi paper i to preent the ue of the DMCode-MS(IM) motion control library in the MATLAB- Simulink development environment and in the DMCD-Pro (Digital Motor Control Developer Pro) real control ytem. It preent the way of uing the DMCode-MS(IM) MATLAB/Simulink library, and of imulating in MATLAB/Simulink different control model for aynchronou motor. Thee model can then be teted on the Technooft MSK282 Kit C Pro, a digital control real time ytem integrated with the TMS320F282. Thi tate-of-the-art development approach of digital motor control application implement the developer old dream: tart with the complete ytem model, deign the control block and analyze it expected behavior by imulation, then automatically generate executable code for the target control ytem and perform the tet on the real ytem. Such an approach not only ignificantly reduce the development time, but alo let you focu on the application functionality and performance, thu hortening the road from deign and laboratory phae and from there to indutrial application level. already tet that all part operate properly (imulation, code generation, download and execution on DSP tructure). Index Term aynchronou motor, digital motor control, motion control, vector control, imulation oftware. I. INTRODUCTION The rapid pace of technology development and progre recorded in power electronic equipment allow at the preent production of highly efficient electric drive. Rapid development of microelectronic and informatic, ha caued major change in the electric motor control technology and development of digital ignal proceor dedicated to control movement made poible the widepread deployment of numerical control algorithm. In order to practically implement a ytem drive, in a way a quickly a poible, in recent year have developed a erie of pecially deigned oftware to convert a drive from the tage of imulation in machine code for digital ignal proceor dedicated to different application. The olution ued provide many ignificant benefit for the following characteritic: automatic generation of C code - it eliminate the need to write C code and aembly code; tructure modeling and viual imulation ytem - can quickly change the control tructure, may be made an optimization of control parameter, imulation reult are obtained immediately; analyi on the DSP ytem - validation of the olution on the real control environment; plug-and-play approach - the firt traightforward tep i to et up the hardware and oftware and then you can Fig. The implementation of the cheme drive ytem - the oftware imulation tage during the execution phae on DSP. II. MATHEMATICAL MODEL OF INDUCTION MOTOR To imulate ome tranitional procee in aynchronou machine wa ued a model of induction motor baed on the theory of repreentative pace phaor. Uing theory of repreentative pace phaor allowed to obtain a general and imple model of induction motor, including the mot complex operating regime. The ue of repreentative pace phaor implifie the mathematical model of the motor with cylindrical ymmetry, a i the induction motor. The main advantage i that it facilitate the undertanding of the phenomena occurring in the motor, through the direct link between the repreentative pace phaor of the current and the magnetic voltage produced by a poly-phaed winding. Thee advantage are bet illutrated within the field control of the induction motor. With practical control ytem, the ue of a model with a number of equation a little a poible i preferred, even if it parameter preent certain variation. In developing the model were taken into account the following implifying aumption: the motor i unaturated; the iron permeability i practically infinite; 37
iron loe are practically inignificant; only the fundamental of magnetic field are conidered; the motor ha a perfect electric ymmetry (tator phae have the ame number of coil and the ame parameter). Taking into account the above implifying aumption and the functioning equation of the induction motor, through computing we can obtain the following final operating equation []: where: ω u α R i α Ψ α Ψ α u α R i α () u β R i β Ψ β Ψ β u β R i β (2) u α R i α Ψ α Ψ α u α R i α (3) u β R i β Ψ β Ψ β u β R i β (4) i i α j i β (5) i i α j i β i i α j i β (6) ω L I i, i M L I i α ji β i α ji β M ω L i β i α i α i β M (9) The variable parameter to be placed in SIMULINK block of the induction motor are: tator winding reitance: R rotor winding reitance: R r tator winding inductance: L rotor winding inductance: L r mutual inductance: L m moment of inertia: number of pole pair: p (7) (8) SIMULINK diagram of three phae induction motor that wa imulated i hown in Fig. 2. III. SYSTEM SIMULATION At thi firt level, the working environment MATLAB allow complete imulation of digital ytem control for induction motor. All model block to imulate motor, enor, power converter, etc., are provided by oftware librarie. For example, Fig. 3 preent the principle cheme for the vector control of an three phae induction motor operating in a peed loop. Equivalent cheme of vector control ytem decribed in Fig. 3 wa implemented in the MATLAB-Simulink development environment, a can be een in Fig. 4. A eparate tuning tool can be ued to et up the controller, baed on the ytem parameter and impoed control performance. Fixed-point IQ Math type i emulated, to reproduce the real environment from the DSP controller [2]. Once the deign phae ha been accomplihed, imulation of different operating condition will allow you to evaluate the expected behavior of the ytem, and to improve the ytem model and/or parameter, for better performance. At thi tage you can chooe optimal parameter for all regulator, may refrain imulated waveform that baically have no way to be meaured and verified if made properly functioning ytem. If reult are atifactory, can pa to the next tage - C code generation for the model. R R Ua [V] 2 Ub [V] 3 Uc [V] 3/2 ABC -> a,b,o TABC2abo I_Phi_a I_Phi_b I_Phi_ra Phi I Phir Ir Phia ---> Ia Phi I Phir Ir Phib ---> Ib Ira*Ib Irb*Ia 3/2*p*p/*Lm 2/3 a,b,o ->ABC Tabo2ABC Ia 2 Ib 3 Ic I_Phi_rb Rr M Rr 4 Phira 5 omega_mech[rad/] 4 Mr [Nm] p/ I_w /p 6 teta_mech[rad] Fig. 2 SIMULINK diagram of three phae induction motor 38
3 rd International Sympoium on Electrical Engineering and Energy er September 24-25, 2009, Suceava Fig. 3 Motion control cheme of an induction motor, operating in inuoidal mode (vector control) -K- Speed reference pd_ref [count/ampling] peed [count/ampling] REFERINTA DE VITEZA + VITEZA MASURATA [count/ampling] pd_controller0 iq_ref [bit] iq[bit] -K- iq_controller0 IQ_ref + ID_ref uq_ref [bit] ud_ref [bit] Tranform dq->abc UQ-ref + UD_ref [biti] ua_ref [bit] ub_ref [bit] Power module u_a [V] u_b [V] UA +UB + UC IM i_a i_b IA +IB FLUX ROTORIC Id_ref id_ref [bit] uc_ref [bit] u_c [V] i_d_ref TDQ2ABC0 Induction Motor id_controller0 0. Mr [Nm] ID_reactie id[bit] iq[bit] Tranform abc->dq i_a[bit] i_b[bit] i_c[bit] A/D CUPLU ELECTROMAGNETIC IQ_reactie peed omg_mech TABC2DQ0 Current Meaurement OMEGA [RAD/S] [count/ampling] [count/ampling] theta_mech[count] theta_mech[rad] Encoder TETA [RAD] peed Copy [count/ampling] Rate Tranition SLIP COMPENSATION Unit Delay z in_theta in co co_theta lip0 Fig. 4 The vector control cheme in MATLAB-Simulink IV. C CODE GENERATION At thi level it i generating code C/C++ for all block involved in the imulated ytem in order that they are implemented and teted on a DSP controller (in thi cae TMS320F282). To do thi the program ue Real Time Workhop, offered by MATLAB working environment. It help generate a file C/C++ complete for each of the block that were ued to model the control ytem, a een in Fig.5. Thu, you will get the code to be embedded on the DSP, implementing for example coordinate tranformation, current/peed/poition controller, etc. Specific implementation apect a fixedpoint numerical repreentation can alo be applied, including caling, overflow and aturation. Specific numerical repreentation (a the IQ Math format) can be ued to generate code that can be correctly implemented and executed at DSP level [3]. V. IMPLEMENTATION OF THE DSP REAL TIME APPLICATION The C code generated from MATLAB i finally included in a baic real-time interrupt application, which can be executed on a TMS320F282 DSP controller baed module. Uing the Digital Motor Control Developer Pro (DMCD- Pro) IDE platform, you will be able to download and run the application on the real digital control environment (Fig. 6). Alo thi program allow you to ue ome graphical tool for analyi and could thu generate a graph of motion a a benchmark for the ytem and can ee how varied the parameter of the ytem. The value are hown graphically are aved in a firt phae the memory controller, aving i made in real time a they are tranferred to the uer' computer and diplayed graphically. At thi level, you can finally compare reult obtained from ytem imulation with the one obtained in the real time application. 39
Fig. 5 Uing Real Time Workhop for C/C++ code generation Fig. 6 Real-time Digital Motor Control Developer-Pro IDE platform VI. EXPERIMENTAL RESULTS Simulation of vector drive ytem decribed in Fig.4 preent the operation of a three phae induction motor with rotor cage precribing a reference peed. Throughout the imulation, the induction motor wa applied to the rotor a reitant torque of 0.05 Nm. Parameter correpond to a induction motor with power of 370W. Drive ytem include in addition to three phae induction motor powered by a PWM inverter, two block performing tranformation of axe of DQ in ABC and the ABC in DQ, a block i to compenate the rotor lip (SLIP COMPENSATION), a block (A / D) which i to convert the current of the two phae of analog to digital, and three PI regulator. An PI block i deigned for peed regulator and the other two erve a current regulator, one for component Iq and one for component Id. The entire drive ytem imulating vector control of induction motor through a DSP. For thi reaon all unit with working digital ignal proceor are converted into bit and caled with the appropriate cale factor. Scale factor i choen for each ize eparately in line with current and peed tranducer which are ued baically to meaure the trength parameter of the circuit. In Fig.7 are preented imulation reult of vector drive ytem. In Fig.7 a) i preent in blue precribed peed and the green peed at which the engine worked, where 00 bit i 3000 rpm. In Fig.7 c) are preented current repone after the component Id and the Fig.7 d) real current component ha been etablihed for Iq. 40
3 rd International Sympoium on Electrical Engineering and Energy er September 24-25, 2009, Suceava Fig. 7 a) Precribed peed and the actual peed of the ytem Fig.7 e) Electromagnetic torque In Fig. 7 f) i preented a the variation of three phae tator current. Note that current go to high level during the regime of variation of peed between two contant value of peed. Large amount of current i an image of component Iq which produce torque in the motor, while the lower value of current i an image of component Id which produce magnetic field in the motor. Fig. 7 b) Reference of current component Iq and Id Fig.7 f) Three phae tator current Fig. 7 c) Current component Id In Fig. 8 are preented the reult of practical implementation a drive ytem on digital ignal proceor TMS320F282. To make a comparion a well between the value obtained by imulating the control ytem and the value obtained by direct meaurement, have been precribed a a reference peed of Fig.8 a), the ame reference i ued and for imulation. In Fig.8 a) i preented in black precribed peed and with red the peed at which the engine worked. In Fig.8 b) i preented the tator current Iq_ref and in Fig.8 c) how the varied current Iq. If a comparion i made between reult obtained by imulation and reult are determined practically almot find no major difference, validating the correctne of thi vector drive ytem imulation. Fig. 7 d) Current component Iq 4
50 75 APPENDIX A Photograph of the experimental tand 0-75 -50 0 2 Acquiition time 3 4 5 xe3 SpdRef Spd Fig. 8 a) Precribed peed and the real peed of the ytem xe3 7.5 0-7.5-5 xe3 0 2 3 4 5 Acquiition time xe3 IqRef Fig. 8 b) Reference of current component Iq_ref 0 5 0-5 -0 0 2 3 4 5 Acquiition time xe3 Iq Fig. 8 c) Current component Iq REFERENCES [] K B. Boe. Power electronic and ac drive, New erey 07632 : Prentice Hall. [2] Intrument, Texa. Digital Motor Control SPRU485A. Dalla, Texa 75265 : Texa Intrument, Augut 200. [3] Technooft. DMCode-MS(IM) MATLAB Library Uer Manual. Chemin de Buchaux 38 Switzerland : Technooft, 2006. VII. CONCLUSION Such a ytem deign of drive not only ignificantly reduce the development time, but alo let you focu on the application functionality and performance, thu hortening the road from deign and laboratory phae and from there to indutrial application level. 42