A DSP Based Servo System Using Permanent Magnet Synchronous
Total Page:16
File Type:pdf, Size:1020Kb
A DSP Based Servo System Using Permanent Magnet Synchronous Motors PMSM Longya Xu, Minghua Fu, and Li Zhen The Ohio State University Department of Electrical Engineering 2015 Neil Avenue Columbus, OH 43210 Abstract- A digital servo system using a Digital Signal Pro cessor DSP is presented in this pap er. A Permanent Magnet Synchronous Motor PMSM with rotor p osition enco der and Hall sensor is used. The eld oriented vector control technique is employed to achieve robust p erformance and fast torque resp onse. The system uses p osition and sp eed regulations as the system outer lo op, and the current regulation with vector control as the inner lo op. A DSP system using TI's TMS320C240 is develop ed, and the prop osed digital control strategy is implemented in the DSP. Key Words: Vector Control, Motion Control, Servo System, Digital Control, Permanent Mag- net Synchronous Motor PMSM, Digital Signal Pro cessor DSP I. Intro duction Precise motion control plays an imp ortant role in various areas such as automation industry, semiconductor industry, etc. Permanent magnet synchronous motors PMSM are ideal for advanced motion control systems for their p otentials of high eciency, high torque to current ratio, and low inertia. Advances in Digital Signal Pro cessors DSP have greatly enhanced the p otential of PMSM in servo applications. Digital control can b e implemented in the DSP, which makes it sup erior to analog based stepp er control, since the controller is much more compact, reliable, and exible. High p erformance of PMSM can be obtained by means of eld oriented vector control, which is only realizable in a digital based system. In this pap er a DSP based servo system is presented. A digital servo controller using TI's TMS320C240 is develop ed. Position and sp eed regulations are develop ed to ensure accurate p osition control and fast tracking, and current regulation with eld oriented vector control is implemented to secure fast dynamic resp onse. The system has b een proved to be robust and e ective with very reasonable cost. II. Analysis of PMSM Vector Control 1 The mo del of a PMSM is shown in Fig. 1. Di erent reference frames can be used to analyze the motor, that is, 3-phase frame a-b-c, stationary frame x-y, or rotational frame d-q [1]. From the control p oint of view, the d-q reference frame is convenient and most widely used. Note that the d-axis of the reference frame is lo cked to that of the p ermanent magnet. y y b q q V E I Liqq d λ d θ iq λ Lidd O a ,x m O θ a, x id (b) (a) c Figure 1: aDi erent frames of the PMSM. bFlux, Current and Voltage Vectors The voltage and ux equations for a PMSM in the rotational d-q reference frame can be expressed as: d d V = R i + ! 1 d s d q dt d q V = R i + + ! 2 q s q d dt = L i + 3 d d d m = L i 4 q q q where V ;V and i ;i are voltages and currents in the d-q axis, R is the stator winding resistance, d q d q s L ;L are inductances in d-q axis, ; are ux linkages in d-q axis, is the main ux linkage d q d q m of the p ermanent magnet, and ! is the angular frequency of the rotor. The transformation between di erent reference frames can be achieved by[1] 3 2 2 3 i i a d 7 6 6 7 i i 5 = T 5 4 4 5 b q abcdq i 0 c 2 3 2 3 2 i i a x 7 6 7 6 6 i = T i 5 4 5 4 b abcxy y i 0 c " " i i x d 7 = T xy dq i i y q where 3 2 cos cos 2=3 cos +2=3 2 7 6 sin sin 2=3 sin +2=3 T = 5 4 abcdq 3 1=2 1=2 1=2 3 2 1 1=2 1=2 p p 2 7 6 T = 0 3=2 3=2 5 4 abcxy 3 1=2 1=2 1=2 " cos sin T = xy dq sin cos and 1 T = T ; dq abc abcdq 1 T = T ; xy abc abcxy 1 T = T : dq xy xy dq The torque T can b e written as e 3 P 3 P T = i i = [ i L L i i ] 8 e d q q d m q q d d q 2 2 2 2 where P is the motor p ole numb ers. It is apparent that if we can control i to b e zero then the torque is directly prop ortional to d i . Hence, vector control is achieved by controlling i to be zero and i to pro duce the required q d q torque. Thus, the PMSM has the fastest dynamic resp onse and also op erates in the most ecient state. The vector control scheme is shown in Fig. 2. The mechanical equation of the PMSM can be written as 2 d d T = J + T 9 + B e L 2 dt dt where T is the motor torque, J the inertia, the rotor p osition, B the friction constant, and T e L the load torque. 3 Va,Vb,Vc Sa,Sb,Sc PWM dq-abc VSI PMSM Generator Inverter Transformation Vd Vq PI PI Controller Controller i i a b Position i d Encoder abc-dq - + Transformation +- - iq θ i*=0 i* d q Figure 2: Vector Control of the PMSM III. Servo Control Scheme A. System Structure The servo control scheme of the PMSM is illustrated in Fig. 3. As shown in Fig. 3, the controller has an inner lo op of current regulation using vector control, and an outer lo op of hybrid sp eed and p osition regulation. This dual-lo op structure ensures the fast torque resp onse by using the vector control, high p osition accuracy with the p osition controller, and fast tracking p erformance with the hybrid sp eed and p osition control. The structure is also imp ortant to secure the stability of the system. B. Initial Position Identi cation Incremental enco ders can only give displacements from the initial p osition and cannot provide absolute p osition. Hence to achieve vector control usually initial p osition alignmenttoa known p osition is required. However in some circumstances such alignment is not desired and needs avoided. By means of Hall sensors the rotor initial p osition can be identi ed, and further corrected when the rotor starts rotating. Assuming the Hall sensors are lo cated at each phase, as shown in Fig. 4. The output signals of the Hall sensors are illustrated in Fig. 5. It can be seen that o the resolution of the Hall sensor signals are 60 electrical degree. Table 1 shows the p ossible combinations corresp onding to di erent p ositions. From Fig. 5 and Table 1, given a sp eci c Hall sensor output combination, the rotor must o reside in certain region with a range of 60 . The initial p osition is determined as follows. When a group of output signals are obtained, for example, 101, we can nd which region the rotor is o in region 1 in this example. We can set the initial p osition at the center of the region 30 in o this example. It can b e seen that the maximum error of the initial p osition is 30 , which o ccurs 4 Va,Vb,Vc Sa,Sb,Sc PWM dq-abc VSI PMSM Generator Inverter Transformation Vd Vq PI PI Controller Controller i i a b Position i d Encoder abc-dq - + Transformation +- - iq θ PI i*=0 i* d q Controller +- - + + θref n - d/dt Kv + d/dt n ref Figure 3: Servo Control Scheme of the PMSM Ha=1 N S Hb=0 Hc=0 Figure 4: Hall Sensor Lo cations o when the rotor is at the edge of two regions. However, even with 30 error, the motor will still be able to pro duce sucient torque to start the motor. Once the motor starts rotating, the p osition can be readily corrected when the rotor moves out of the initial region and enters the next region. This p osition is accurate. In the previous example, when the motor starts rotating in the p ositive direction from region 1, the rotor p osition o can be corrected when the p osition =60 . 5 60 60 60 60 60 60 60 60 60 60 60 Ha Hb Hc 0 60 120180 240 300 360 420 480 540 (0) (60) (120) (180) (Electrical Degrees) Figure 5: Hall Sensor Output Signals Region H H H Position a b c 1 1 0 1 0-60 2 1 0 0 60-120 3 1 1 0 120-180 4 0 1 0 180-240 5 0 1 1 240-300 6 0 0 1 300-360 Table 1: Combinations of Hall Sensor Output Signals C. Anti-Hunt Processing When the motor reaches to the required p osition and needs to pro duce torque at standstill, sp ecial attention needs paid since the rotor will very likely oscillate hunting. A variable gain anti-hunt algorithm is develop ed. As shown in Fig. 6, the PI gains of the sp eed and p osition regulators are kept normal when the p osition error is large.