ICCAS2004 August 25-27, The Shangri-La Hotel, Bangkok, THAILAND 1. INTRODUCTION The implementation of position control of PMSM with FPGA is proposed. This approach is considered suitable for FPGA rapid prototyping. The function blocks, configured by the FPGA, can be treated as the concurrent and programmable hardware modules, gaining both efficiency and flexibility in system design. The program, designed by an end-user, will form logic gates within FPGA into a digital loop. FPGA works as a hardware format that allows the user to define the work procedure. FPGA provides more flexibility than microprocessor. The transfer function of a typical PMSM has the general form that relates * / i θ . This transfer function have pole at s = 0 , -pole1 , -pole2 thus system that is stable for small gain but unstable for large gain.The addition of a zero to the transfer function by compensator has the effect of pulling the root locus to the left, tending to make the system more stable and to speed up the settling of the response. (Physically, the addition of a zero in the feedforward transfer function means the addition of derivative control to the system. The effect of such control is to introduce a degree of anticipation into the system and system and speed up the transient response.) Notice that when a zero is added to the motor system it becomes stable for all value of gain.[1-2] 2. BACKGROUND 2.1 Modeling of the PMSM motor The structure of a PMSM-based drive system is shown in Fig. 1. The control inputs take values from the discrete set 0 0 , u u - + instead of on-off signals from the discrete set {0, 1}. Let the six on-off signals be 1 2 3 4 5 6 [ ] T w w w w w w s s s s s s = w s with 4 1 1 w w s s =- 5 2 1 w w s s =- 6 3 1 w w s s =- and the current control inputs design be 1 2 3 [ ] T u u u = gate U , then the following relation holds: 0 u = gate w w U Gs where 1 0 0 1 0 0 0 1 0 0 1 0 0 0 1 0 0 1 - = - - w G (1) Fig. 1: Structure of a PMSM drive system. In general , the dynamic model of an AC motor can be established using physical law: M d U RI dt LI ψ ψ ψ = + = + (2) Where U,I and ψ are the voltage vector, the current vector and the flux vector, respectively; R, L are the resistance matrix and the inductance matrix, respective; ψM is the flux vector caused by the permanent magnet, if applicable. Fig. 2: Coordinate systems of PMSM The equation system Eq. (2) is a general description of the electro coordinate system. For PMSMs, three reference frames are normally used to describe the dynamic behavior of a motor Fig.2: the phase frame, i.e. the (a,b,c) coordinate frame; the stator frame, i.e. the (α,β) coordinate frame; and the field-oriented frame, i.e. the (d, q) coordinate frame (also called the rotor coordinate frame for PMSMs). Implementation of Position Control of PMSM with FPGA Chalermpol Reaugepattanawiwat*, Nitipat Eawsakul*, Napat Watjanatepin* Prasert Pinprathomrat* and Phayung Desyoo** * Rajamangala Institute of Technology, Bangkok, Thailand (Tel : +66-2-629-9155; E-mail: nitipat_e@hotmail.com) **King Mongkut's Institute of Technology North Bangkok, Bangkok, Thailand (Tel : +66-2-913-2500 ext 4412 ; E-mail: sym@kmitnb.ac.th) Abstract: This paper presents of position control of Permanent Magnet Synchronous Motor (PMSM) the implementation with Field Programmable Gate Array (FPGA) is proposed. Cascade control with inner loop as a current control and an outer loop as a position control is chosen for simplicity and fast response. FPGA is a single chip (single processing unit), which will perform the following tasks: receive and convert control signal, create a reference current signal, control current and create switch signal and act as position controller in a addition of zero form. The 10 kHz sampling frequency and 25 bit of floating point data are defined in this implementation.The experimental results show that the performance of FPGA based position control is comparable with the hardware based position control, with the advantage of control algorithm flexibility Keywords: FPGA, Position Control, Permanent Magnet Synchronous Motor, PMSM β q b ° 120 θ d a c ° 120 e ω 1254