Home
        Motor Control Application Tuning (MCAT) Tool for 3
         Contents
1.    Freescale Semiconductor  Application Note    Document Number AN4642  Rev  1  01 2013    Motor Control Application Tuning   MCAT  Tool for 3 Phase PMSM    by  Marek Stulrajter  Pavel Sustek    1 Introduction    This application note describes a Freescale motor control  tuning solution known as Motor Control Application Tuning   MCAT  tool  MCAT is a graphical tool dedicated to motor  control developers and the operators of modern electrical  drives  The main feature of proposed approach is automatic  calculation and real time tuning of selected control structure  parameters  Connecting and tuning new electric drive setup  becomes easier because the MCAT tool offers a possibility to  split the control structure and consequently to control the  motor at various levels of cascade control structure     2 Motivation    An electric drive is known as a set of several subsystems such  as electric motor with load  controlled supply source  control  unit and wide range of sensors  which provide a conversion of  electric energy to a specific mechanical movement   Performing the mechanical movement according to certain  specifications requires a suitable control strategy of the  electric motor  Based on the motor type and the application  requirements there are several dedicated control methods  In  general  the control techniques are very complex and require  knowing of controlled system parameters and control structure  parameters  This is a matter of experience in the motor control 
2.   Integrator Constants    Integrator gain lo  103125    Integrator scale   0    ace arr ero   Seco      Figure 14  POSPE sensor tab   Expert mode    Table 6 shows the list of the POSPE Sensors tab inputs with their physical units  brief description  the impacted algorithms    and accessibility status in basic mode                                         Table 6  Inputs of the POSPE Sensors tab  Parameter Name Description Use in Constant Basic mode  calculation TEE  Encoder  pulses  Pulses of an encoder  ATO PI controller  Resolver     Pole pairs of resolver  ATO PI controller YES  Sample Time  sec  Observer sampling time   ATO PI controller NO  FO  Hz  Observer bandwidth ATO PI controller NO   amp      Observer attenuation ATO PI controller NO  Motor Control Application Tuning  MCAT  Tool for 3 Phase PMSM  Rev  1  01 2013  22    Freescale Semiconductor  Inc     E FT  MCAT tool for 3 phase PMSM    6 5 1 POSPE sensors setting variability    The PI controller within an ATO algorithm can be implemented by both parallel and recurrent way  The MCAT tool supports  both types of PI controllers as well as respects the variability of data type representation  The available setting modes  supported by the POSPE sensors tab can be seen in Table 7     Table 7  Summary of POSPE sensors setting modes    Position and Speed Sensor module Applicable changes                   PI controllers Parallel Recurrent form  Data type representation FIX  FLOAT arithmetic  NOTE    All settings shown inTab
3.   Speed PI Controller Limits    Upper limit 5 TA   Lower limit   fA    MCAT tool for 3 phase PMSM    Speed Control Loop  Speed PI Controller Constants  Kp gain  0 621138  Kp scale   5  Ki gain  0 718102  Ki scale   1    Speed PI Controller Limits Scaled    Upper Limit   0 625  Lower Limit    0 625  Speed Ramp Scaled Increments Scaled  Inc Up 0 000606  Inc Down 0 000606    Sore ar   See   Sore      Figure 11  Speed Loop tab     Expert mode    The Table 4 shows the list of the speed loop input parameters with their physical units  brief description  the impacted    algorithms and accessibility status in basic mode     Table 4     Input of the Speed Loop tab    Parameter Name Description Use in constant Basic mode  calculation accessibility                         Sample time  sec  CL sampling time Current PI controller  Zero compensator  FO  Hz  Current loop bandwidth  Current PI controller NO  Zero compensator   amp      Current loop Current PI controller NO  attenuation  Zero compensator  Inc Up  rpm sec  Speed increasing with  Ramp function NO  the increment  Inc Down  rpm sec  Speed decreasing with  Ramp function NO  the increment  Filter points  points    Moving Average Filter NO  Samples                Table continues on the next page       Motor Control Application Tuning  MCAT  Tool for 3 Phase PMSM  Rev  1  01 2013       Freescale Semiconductor  Inc     17       MCAT tool for 3 phase PMSM    Table 4  Input of the Speed Loop tab  continued     Parameter Name Description
4.  2013    24 Freescale Semiconductor  Inc        eee  MCAT tool for 3 phase PMSM    6 6 Sensorless tab    As it has been mentioned  the most important signals in the PMSM FOC control scheme are speed and position feedbacks   They can be acquired from either physical speed sensors or some advanced observer algorithms  The Sensorless  SLS  tab  deals with a Back Emf  BEMF  observer as a sensorless algorithm for the speed and position signals estimation     Similar to previous tabs  the SLS tab is also divided into two parts  The first part represents an input data field with required  sensorless parameters and parameters for open loop start up  The second one is an output data field displaying the calculated  parameters of BEMF observer  tracking observer  TO  and open loop start up     Application tuning modes available in Sensorless tab       Basic     highly recommended for users who are not enough experienced in motor control theory  Only open loop start   up parameters are required as an input in this mode  The BEMF observer and tracking observer input parameters are  estimated from the motor and application parameters automatically by MCAT tool engine  The cells requiring these  parameters are shadowed with the status read only  as in Figure 16      Expert     all input parameter cells of the SLS tab are accessible and freely editable by an user  as in Figure 17   However  their setting requires a certain level of expertise in motor control theory     BEMF Observer DQ   Po
5.  6 8 2 Voltage FOC control    If the direction of the rotor spinning is according to the user demand and the measured estimated position gives also correct  direction  the Voltage FOC control can be chosen  There are two reference variables available for motor controlling  as in  Figure 22  Required voltage in d axis Ug req is actually not enabled in basic tuning mode  The q component of the voltage    Ug req represents a torque component and by its application the motor will run     Once the motor runs  few tests should be provided in order to verify the conditions needed for successful torque and  consequently speed control  If positive Ug  eq voltage is applied to the motor  rotor should rotate to the positive direction and  vice versa  Consequently the currents have to be checked  The correct phases order and polarity of the currents have to be  checked     Ua req Ua re            sensor         Figure 22  Voltage FOC control mode    If it is done  a control loop can be then closed with the current feedback signals by toggling the Current FOC Control     6 8 3 Current FOC control    Current control or also called torque control requires rotor position feedback as well as the currents transformed into the dq    synchronous frame  There are two reference variables available for motor controlling  as in Figure 23  Required current in d  axis Iq req is actually not enabled in basic tuning mode and is kept at zero by default  The q component of the current Ig req  represents a
6.  65    AnNRWNeE    Motor Control Application Tuning  MCAT  Tool for 3 Phase PMSM  Rev  1  01 2013    Freescale Semiconductor  Inc  35       How to Reach Us     Home Page   www freescale com    Web Support   http   www  freescale com support    USA Europe or Locations Not Listed   Freescale Semiconductor   Technical Information Center  EL516   2100 East Elliot Road   Tempe  Arizona 85284    1 800 521 6274 or  1 480 768 2130  www freescale com support    Europe  Middle East  and Africa   Freescale Halbleiter Deutschland GmbH  Technical Information Center  Schatzbogen 7   81829 Muenchen  Germany    44 1296 380 456  English     46 8 52200080  English     49 89 92103 559  German     33 1 69 35 48 48  French   www freescale com support    Japan    Freescale Semiconductor Japan Ltd   Headquarters   ARCO Tower 15F   1 8 1  Shimo Meguro  Meguro ku   Tokyo 153 0064   Japan   0120 191014 or  81 3 5437 9125  support japan  freescale com    Asia Pacific    Freescale Semiconductor China Ltd   Exchange Building 23F   No  118 Jianguo Road   Chaoyang District   Beijing 100022   China    86 10 5879 8000  support asia   freescale com    Document Number  AN4642  Rev  1  01 2013    Information in this document is provided solely to enable system and software  implementers to use Freescale Semiconductors products  There are no express or implied  copyright licenses granted hereunder to design or fabricate any integrated circuits or  integrated circuits based on the information in this document    
7.  Freescale Semiconductor reserves the right to make changes without further notice to any  products herein  Freescale Semiconductor makes no warranty  representation  or  guarantee regarding the suitability of its products for any particular purpose  nor does  Freescale Semiconductor assume any liability arising out of the application or use of any  product or circuit  and specifically disclaims any liability  including without limitation  consequential or incidental damages   Typical  parameters that may be provided in  Freescale Semiconductor data sheets and or specifications can and do vary in different  applications and actual performance may vary over time  All operating parameters   including  Typicals   must be validated for each customer application by customer s  technical experts  Freescale Semiconductor does not convey any license under its patent  rights nor the rights of others  Freescale Semiconductor products are not designed   intended  or authorized for use as components in systems intended for surgical implant  into the body  or other applications intended to support or sustain life  or for any other  application in which failure of the Freescale Semiconductor product could create a  situation where personal injury or death may occur  Should Buyer purchase or use  Freescale Semiconductor products for any such unintended or unauthorized application   Buyer shall indemnify Freescale Semiconductor and its officers  employees  subsidiaries   affiliates  and dist
8.  Hz  Current loop bandwidth  Current PI controller NO       Zero compensator                          amp      Current loop Current PI controller NO  attenuation  Zero compensator  Output limit     Limit of the current PI NO  controllers       6 3 1 Current Loop Setting Variability    Two types of PI controllers and optional zero cancellation blocks  Figure 2  lead to several variations of current control loop  structure     Motor Control Application Tuning  MCAT  Tool for 3 Phase PMSM  Rev  1  01 2013    12 Freescale Semiconductor  Inc        FEER        MCAT tool for 3 phase PMSM    The MCAT tool covers both options  it means it supports both types of PI controllers and offers an opportunity to use the  optional zero cancellation blocks  Moreover  including the variability of data type representation  there are several modes  available that are required to be supported by the current loop tab  see Table 3     Table 3  Summary of Current Loop setting modes    The control loop available mode Applicable changes                   PI controllers Parallel   Recurrent form   Zero cancellation blocks Allowed   Non allowed   Data type representation FIX  FLOAT arithmetic  NOTE    All settings shown in Table 3 will be predefined by Freescale developer according to the  MC reference application     6 3 2 Current loop parameters calculation    The parameters of the PI controllers in current loop are calculated by exploiting the pole placement  PP  method  Pole  placement method is an a
9.  It is a mandatory tab due to its high level of  dependency with other tabs  To ensure proper MCAT tool functionality and control parameter calculation accuracy an  attention must be paid when entering the input application parameters into required cells  An impact of each required input is  shown in Table 1  Number of input parameters that need to be filled depends on the selected application tuning mode  The  application tuning mode can be changed on the right side of motor selector bar and offers two options  basic and expert  mode     Application tuning modes available in Parameters tab are as follows     Motor Control Application Tuning  MCAT  Tool for 3 Phase PMSM  Rev  1  01 2013    6 Freescale Semiconductor  Inc           MCAT tool for 3 phase PMSM      Basic     highly recommended for users who are not enough experienced in motor control theory  The number of  required input parameters is reduced according to the Table 1  The mandatory cells are with white background while  the rest of input parameters are calculated automatically by MCAT tool engine  These parameters are read only and  shadowed  see Figure 5       Expert     all inputs parameters are accessible and freely editable by a user  However  their setting requires a certain  level of expertise in motor control theory  see Figure 6      roactn   a precios eerie    Input Application Parameters         Motor Parameters               Application Scales   a SS ee    pp   36   UDCBtrip   288 M  Rs   0 288 10    U
10.  Use in constant Basic mode  calculation accessibility       Upper Limit Required current upper  limit   Lower limit  A  Required current lower NO  limit                         6 4 1 Speed Loop Setting Variability    Two types of speed PI controller and optional blocks as zero cancellation block or ramp function  Figure 2  lead to the  several variations of speed control loop structure     The MCAT tool covers all above mentioned options  it means it supports both types of PI controllers and offers an  opportunity to use different approach in speed feed forward path as the optional zero cancellation blocks or ramp function   Moreover  including the variability of data type representation  there are available several modes that are required to be  supported by the speed loop tab  see Table 5     Table 5  Summary of Speed Loop setting modes    The control loop available mode Applicable changes                         PI controllers Parallel   Recurrent form   Zero cancellation blocks Allowed   Non allowed   Ramp function Allowed   Non allowed   Ramp function FIX  FLOAT arithmetic  NOTE    All settings shown in Table 5 will be predefined by Freescale developer according to the  MC reference application     6 4 2 Speed loop parameters calculation    Again the pole placement approach is used for parameters calculation of all speed loop control elements  A simplified closed  speed control loop  shown in Figure 12  is used for deriving the parameters of all blocks of speed control 
11.  change signalization  By  pressing the Store Data button all new values from modified cells will be saved into the file  After successful data  saving  the background of the cells becomes white and the button gets disabled     The editing fields accept only numeric characters  The parameter values are fully under user responsibility and no additional  checking is applied to those items  The typical range of the parameter value appears when the mouse pointer is in a parameter  name focus     6 4 Speed Loop Tab    The Speed Loop  SL  is a tab designed for tuning the speed control loop  The speed control loop is an outer loop in the  cascade control structure of vector controlled PMSM  Speed loop consists of a PI controller and optional blocks like zero   cancellation or ramp function     Motor Control Application Tuning  MCAT  Tool for 3 Phase PMSM  Rev  1  01 2013    Freescale Semiconductor  Inc  15       LT   MCAT tool for 3 phase PMSM    The SL tab is logically divided into two parts  The first part represents input data fields with required control loop parameters  needed for PI controller parameter calculation  The second one is an output data field which displays the calculated  parameters of the speed controller  The PI controller constants are calculated from the motor parameters  application scales  and speed loop parameters     Application tuning modes available in Speed Loop tab are as follows     e Basic     highly recommended for users which are not enough experie
12.  for users who are not enough experienced in motor control theory  Only sensor  parameters are required as an input in this mode  Position observer input parameters of the PS tab are estimated from  the motor and application parameters automatically by MCAT tool engine  The cells requiring these parameters are  shadowed with the status read only  as shown in Figure 13      Expert     all input parameter cells of the PS tab are accessible and freely editable by a user  as shown in Figure 14   However  their setting requires a certain level of expertise in motor control theory     Position  amp  Speed Sensors Module    Position Sensor Position Observer Constants   Encoder 1024  pulses  Kp gain 0 713998  cal   Position Observer SEES 3    Ki gain   Sampletime   0 000625  sec   0 841159  Ki scale   FO 150  Hz    0       1 H Integrator Constants  aen Fre 0 103125  Data Type  Frac32 integrator scale  5    PI controller type  Parallel    ace o  a aa    Figure 13  POSPE sensor tab   Basic mode    Motor Control Application Tuning  MCAT  Tool for 3 Phase PMSM  Rev  1  01 2013  Freescale Semiconductor  Inc  21          MCAT tool for 3 phase PMSM    Introduction   Parameters   Current Loop Speed    Position  amp  Speed Sensors Module    Position Sensor    Encoder   1024  pulses   Position Observer   Sample time   0 000625  sec   FO   150  Hg   i mz   Data Type  Frac32    PI controller type  Parallel    Position Observer Constants  Kp gain  0 713   Kp scale 3  Ki gain  0 841159  Ki scale 0
13.  is the simplest type of electric drives control strategy  The motor is supplied with the set of voltages given by the following  expression        Uibe   U nsin 0     a   Equation 31    Oe    Z Nreq at  Equation 32    The ratio between the magnitude of the voltage and the frequency  frequency information is hidden in the Nreq  has to be  kept at the nominal ratio  Therefore  attention must be paid during entering required voltage and speed in expert tuning mode   The ratio will be automatically kept constant in basic tuning mode and user does not have to take care about that  The only  required input will be required speed     As can be seen from the Figure 21  there is no feedback in the control structure hence the name open loop control     Motor Control Application Tuning  MCAT  Tool for 3 Phase PMSM  Rev  1  01 2013    32 Freescale Semiconductor  Inc           MCAT tool for 3 phase PMSM    Um   Uq req         N required       sensor        Integrator    Figure 21  Scalar control mode    In fact  it is not very common to use scalar control for PMSM motors  Such control approach can be used just for initial  application tuning  Since there are no any feedbacks  it is the easiest way to get the motor run just hooked with new inverter   Once the motor rotates  sensor estimator signals can be evaluated and aligned with the direction of rotation and so on     If it is done  the control loop can be closed with the rotor position signal by toggling Voltage FOC Control method    
14.  output  e k  is the controller input error signal  CC1 and CC2 are controller coefficients  calculated using Trapezoidal method     Ts  CQ    Kp 1  Kr ry    Equation 12     Motor Control Application Tuning  MCAT  Tool for 3 Phase PMSM  Rev  1  01 2013    14 Freescale Semiconductor  Inc        Ey  MCAT tool for 3 phase PMSM    Ts  CC p   Kp 7  Ky ry  Equation 13     The zero cancellation transfer function  Equation 4 on page 14  can be also transformed into Z domain using Backward Euler  method  Then the discrete implementation is therefore given by     K    _ Ari s a PI  Yay Kp IKI its     Kp Kp ITS Yk     Equation 14     It is clear that  Equation 14 on page 15  is a simplified form of 1  order Butterworth LP filter in IIR implementation  So the  zero cancellation block physically behaves as a low pass filter  smoothing the input command  It therefore allows increasing  of the loop gain  achieving higher bandwidth     In depends on the PI controller implementation  the controller constants  Equation 9 on page 14  Equation 10 on page 14  or   Equation 12 on page 14  Equation 13 on page 15  are used in case of floating point data representation  The discrete  implementation of PI controllers in the fixed point arithmetic platform requires the scaling approach to keep all signals in the  range  lt  1  1   Detailed description of proper PI controller   s parameters scaling is in  3     4       6 3 3 Parameter modification    All parameter cells are filled automatically with pre
15.  theory which can cause difficulties to motor control       2013 Freescale Semiconductor  Inc     AHA ADA un A W N    Contents  TPO CGT ON s  eanan  Ee elire i A E  Ol Wate Conceptes eiiiai  Pey Peete  cice i  Target Applications riarann eae  MCAT tool for 3 phase PMSM      Gu GuGu sseseereerreerreree    RESTER ES iela sense a    A  Y           w     gt   freescale    Software Concept    developers or users  To avoid these problems and make the tuning of the motor control applications easier  Freescale has  developed software solution to control and tune the electrical drives from a graphical environment running on a host PC     The MCAT tool runs under FreeMASTER online monitor  which allows the real time tuning of the motor control  application  Respecting the parameters of the controlled drive  the correct values of control structure parameters are  calculated  which can be directly updated to the application or stored in an application static configuration file  The electrical  subsystems are modeled using physical laws and the parameters estimation algorithms are based on Pole placement method     The given solution is a graphical user friendly tool that allows tuning of the application within minutes and will save the user  much of the work     3 Software Concept    The MCAT tool is a user friendly graphical plug in tool for Freescale   s FreeMASTER dedicated to debugging the motor  control application  The environment of MCAT tool is based on HTML language whereas the 
16.  torque component and by its application the motor will run  By changing the polarity of the current Ig  eq the  motor will change the direction of the rotation     Supposing the Position and Speed evaluation algorithms are tuned correctly  the current PI controllers can be tuned using  Current Loop tab     Motor Control Application Tuning  MCAT  Tool for 3 Phase PMSM  Rev  1  01 2013  Freescale Semiconductor  Inc  33          MCAT tool for 3 phase PMSM    la_req  Ua req       PI controller re UB req                            iara PI controller la real             lb real        Ile real             Figure 23  Current  torque  control mode    If the motor runs correctly and the Position Speed evaluation algorithm provides correct information about the speed  the  current control loop can be then closed with an outer speed loop by toggling the Speed FOC Control     6 8 4 Speed FOC control    Speed control loop requires information about the actual rotor speed  This can be provided by physical sensor or sensorless  algorithm     la_req         Pl controller Ug req                   PI controller re la real    PI controller          sensor          lb real               le real             We real       Figure 24  Speed FOC control mode    Supposing the current controllers are tuned correctly  the speed PI controller can be tuned using Speed Loop tab     6 8 5 Cascade control structure controlling    The variables are entered to the white boxes of the selected control method  T
17. 01 2013    4 Freescale Semiconductor  Inc           MCAT tool for 3 phase PMSM    Motor Control Application Tuning tool             Number of motors One motor    Two motors       Type of motor       Control strategy    Cascade structure Open Loop    Voltage FOC Control                Current FOC Control             Speed FOC Control       Control Structure    Figure 3  The application cases tree diagram    6 MCAT tool for 3 phase PMSM    The MCAT tool is a graphical tool with friendly environment and intuitive control  As can be seen in Figure 4  the tool  consists of motor selector bar  tab menu and the workspace  The proposed approach supports up to three PMSM motors   while each motor has its own tab menu and workspace     The MCAT tool represents a modular concept that consists of several sub modules  Each sub module represents one tab in  the tab menu  The arrangement of the sub modules is flexible according to the needs of embedded application  Several tab  menu combinations can be created based on the type of application  for instance sensorless applications do not need any  POSPE Sensors tab  torque control applications do not need any Speed Loop tab and so on     Based on this  the initial setting of the MCAT tool will be provided by Freescale team developing the motor control reference  designs     Motor Control Application Tuning  MCAT  Tool for 3 Phase PMSM  Rev  1  01 2013       Freescale Semiconductor  Inc  5       MCAT tool for 3 phase PMSM           2    frees
18. 138    Data Type     Frac32    Zeef pee   ue    Figure 17  Sensorless tab     Expert mode    The Table 8 shows the list of the Sensorless tab inputs with their physical units  brief description  the impacted algorithms  and accessibility status in basic mode     Table 8  Inputs of the Sensorless tab    Parameter Name Description Use in Constant Basic mode  calculation accessibility   Hz                          BEMF loop natural BEMF observer  frequency   E     BEMF loop attenuation  BEMF observer NO   FO  Hz  TO loop natural Tracking observer NO  frequency    amp      TO loop attenuation Tracking observer NO   Start up ramp  rpm sec  The slope of risen Open loop start up YES  current   Start up current  A  Current limit for start up   Open loop start up YES  process   Merging speed  rpm  Switch open    to closed  Open loop start up NO  loop at given speed   Merging speed     How fast switch open      Open loop start up NO  to closed loop position                         Motor Control Application Tuning  MCAT  Tool for 3 Phase PMSM  Rev  1  01 2013    26 Freescale Semiconductor  Inc        C  MCAT tool for 3 phase PMSM    6 6 1 Sensorless setting variability    The only variability within the Sensorless tab is given by a different data type representation  as in Table 9     Table 9  Summary of Sensorless setting modes    Position and Speed Sensor module Applicable changes    Data type representation FIX32  FIX16       NOTE  All settings shown in Table 9 will be predefined by 
19. DCBunder 14 4 M  Ld   0 000468 TH    U DCB over  288 M     0 000618 fH    Nmax Ej  ke   0 0577 M secirad    Umax   208 M   J   0 000025  kg m2    Emax   5982 M  Iph nom 5A  k   004711  Nma   Uph nom    48 M r Alignment   N required max   3000  rpm  Align current  050    Al  Hardware Scales   Align duration 0 00132  sec    I max  os      upcBmax   36 M             za   aa    Figure 5  Parameters tab     Basic mode    Motor Control Application Tuning  MCAT  Tool for 3 Phase PMSM  Rev  1  01 2013  Freescale Semiconductor  Inc  7          MCAT tool for 3 phase PMSM    Introduction       Input Application Parameters    Motor Parameters Application Scales   pp 3 4 U DCB trip 28 8 M   Rs   0 288 10  U DCB under   144 M   Ld  0 000468  HI U DCB over   288 M   Lq   0 000618  H  N max   3300 0  rpm   ke   0 0577   V secirad  Umax   208 M   J   0 000025  kg m2  E max   59 82 M   Iph nom  5 Ay kt   0 04711  Nm A   Uph nom 18 M Alignment   N required max    3000  rpm  Align current 0 50    Al  Hardware Scales Align duration   0 00132  sec    I max 8 TAJ Update FRM  upcBmax   36 M       Bae  Sa aa    Figure 6  Parameters tab     Expert mode    The Table   shows the list of the MCAT tool input parameters with their physical units  brief description  the impacted  algorithms and accessibility status in basic mode     Table 1  Inputs of the Parameter tab    Parameter Name Description Use in constant Basic mode  calculation accessibility      Yes                         pp Motor pole pairs Spe
20. Freescale developer according to the  MC reference application     6 6 2 Sensorless algorithm parameter calculation    Detailed overview describing the coefficient calculation of Back EMF observer and Tracking observer is shown in  4       6 6 3 Parameter modification    All parameter cells are filled automatically with predefined data downloaded from an external file  The parameter cells are  freely accessible for editing in accordance to the selected tuning mode  as it is shown in Table 8  There are four user buttons  on the page with the following functionality     e Calculate     the button is disabled by default  The button becomes enabled as soon as one of the input sensor or observer  parameters is changed  The background of the cell is changed from white to pink color for the purpose of change  signalization  By pressing the Calculate button PI controller parameters and integral coefficient are recalculated  according to the Sensorless algorithm parameter calculation    Update FRM   the button is enabled by default  By pressing the button  the application algorithms on the embedded  side are updated with the ones displayed in output field data    Reload Data     the button is disabled by default  The button becomes enabled as soon as one of the input BEMF  TO or  open loop start up parameter is changed  The background of the cell is changed from white to pink color for the  purpose of changes signalization  By pressing the Reload Data button the all modified cells wil
21. IT  Equation 4     The current loop transfer function with the zero cancellation block in feed forward is then     Ge  5  Gris  2    roe  E  Equation 5        t    ohon       Having the closed loop with canceled zero  Equation 5 on page 14   the PI controller can be designed by comparing the  closed loop characteristic polynomial with that of a standard second order system as        Kp rtR Ki I  2   7 b   82  20 s  cof    Equation 6     where Wg is the natural frequency of the closed loop system  loop bandwidth  and     is the loop attenuation  The proportional  and integral gains of the PI controller can be therefore calculated from  Equation 6 on page 14  as     Kp   2 amp o L  R  Equation 7   K   1  L  g  Equation 8      Equation 7 on page 14  Equation 8 on page 14  describe a PI controller design in continuous time domain  Considering the  discrete domain the expressions  Equation 7 on page 14  Equation 8 on page 14  will change as follows     Kp 1 2z   Kr ds     Equation 9     K  iz    K   As   Equation 10     where Ts is sampling period of the current loop     The form of PI controller  Equation 1 on page 13  implementation which allows the user to define the proportional and  integration components independently without interaction is called parallel PI controller  Another type of PI controller  implementation is recurrent form that can be reached by transforming  Equation   on page 13  into a discrete domain as  follows     Equation 11     where u k  is the controller
22. ameter calculation    Update FRM   the button is enabled by default  By pressing the button  the application PI controllers on the embedded   side are updated with those ones displayed in output field data    e Reload Data     the button is disabled by default  The button becomes enabled as soon as one of the input sensor or  observer parameters is changed  The background of the cell is changed from white to pink color for the purpose of  changes signalization  By pressing the Reload Data button the all modified cells will be rewritten with original values  taken from the file  After successful data reload  the background of the cells becomes again white and the button gets  disabled    e Store Data     the button is disabled by default  The button becomes enabled as soon as one of the input sensor or  observer parameters is changed  The background of the cell is changed from white to pink color for the purpose of  changes signalization  By pressing the Store Data button all new values from modified cells will be saved into the file   After successful data saving  the background of the cells becomes white and the button gets disabled     The editing fields accept only numeric characters  The parameter values are fully under a user responsibility and no  additional checking is applied to those items  The typical range of the parameter value appears when the mouse pointer is in a  parameter name focus     Motor Control Application Tuning  MCAT  Tool for 3 Phase PMSM  Rev  1  01
23. ameters   tdefine Q KP_GAIN   define QO KP SC   define Q KI G  IN   define Q KI SC       Speed Loop Control       Loop bandwidth      Loop attenuation      Loop sample time    def ine SPEED KP GAIN   def ine SPEED KP SC     20 8    3300 0 0    59  82     FRAC32 0 8   FRAC32 0 4   FRAC32 0 8      22   FRAC32 0 0625       0 0000625  sec   FRAC32 0 9     FRAC32 0 832528705594     1   FRAC32 0 771567772796     5     FRAC32 0 585185373171    0   FRAC32 0 509432567936     4     FRAC32 0 62113850398    5     Figure 18  Output File tab example    In other words  the Output File tab shows a content of the file that can be generated by MCAT tool  The coefficients that  correspond to the tuned application represent the static configuration of the PMSM FOC application  Static configuration file  is a part of the S W package  as seen in Figure 1  and it is linked with the application source code as a header file     Motor Control Application Tuning  MCAT  Tool for 3 Phase PMSM  Rev  1  01 2013       Freescale Semiconductor  Inc     29    MCAT tool for 3 phase PMSM    6 7 1 Output file generation    To generate the content of the Output File tab  Generate Configuration File button needs to be pressed  The header file  PMSM_appconfig h is generated and will be saved to the default path     6 8 Cascade tab    Cascade tab deals with the control structure of the PMSM motor  Assuming that the embedded application is based on the  cascade control structure  depicted in Figure 2  the Cascade tab 
24. anged in series represents hierarchical structure which is characteristic by a  feedback  hence the name closed loop system  Proportional integral  PI  controllers are the most commonly used as feedback  controllers  that provide an    error    calculation as the difference between a measured process variable and desired    reference     variable  The PI controller attempts to minimize the control loop error by adjusting the actuating signal in other words the  controller output signal     Motor Control Application Tuning  MCAT  Tool for 3 Phase PMSM  Rev  1  01 2013    Freescale Semiconductor  Inc  3          Target Applications                Optional blocks la req la req  ZC T  Ug req        gE  dq       SVMF4y VSI t    Zero cancellation    ld real             PI controller Ug req Ug req iL eI PMSM       Ramp PI controller Zero cancellation  we  PI controller      W real           AC             Zero cancellation                   sensor        Io real    Position   Speed  evaluation    Figure 2  Cascade structure  speed FOC of PMSM             There are two types of PI controllers mostly used in the control algorithms  We distinguish between parallel and recurrent  form of the PI controller  Based on the form  the PI controller algorithm involves two separate constant parameters  the  proportional component Kp and integral component Ky for parallel form or their equivalents CC1 and CC2 for recurrent form   Setting of these constants depends on the required control loop be
25. cale  Motor Control Application Tuning Tool         Motor 1 PMSM  ed Motor 2  PMSM e Motor 3  PMSM d       sober s  re   cascate ee MCAT tool tab MENY  B enn  Application Description        MCAT tool workspace       Application concept   A position and speed estimation method without position transducer is applied for horizontal axis washing machines with  Permanent Magnet Synchronous Motor  PMSM   By integrating methods  i e  using a speed reference for zero speed startup  and low speed acceleration  and back EMF for mid high speed operation  the rotor position can be estimated and controlled  over the full speed range  In order to achieve correct operation from zero speed  the two techniques are combined with a  crossover function based on the speed reference            Freescale  Inc  2012  Designed by Motor Control Teams   Roznov pod Radhostem       Figure 4  MCAT tool environment    Predefined MCAT tool will be a part of reference software for dedicated MCU  Since the tuning tool cannot be used as a  standalone  it will be included in the FreeMASTER project by default     The MCAT tool workspace is unique for each tab and detailed overview of each available tab is provided in the following  chapters     6 1 Introduction tab    An Introduction tab can be considered as a voluntary tab  It provides a room for describing or introducing the targeted MC  application  Figure 4     6 2 Parameters tab    A Parameters tab is dedicated for entering the input application parameters 
26. defined data downloaded from an external file  The parameter cells are  freely accessible for editing according to the selected tuning mode  as shown in Table 2  There are four user buttons on the  page with the following functionality     e Calculate     the button is disabled by default  The button becomes enabled as soon as one of the input Loop Parameters  is changed  The background of the cell is changed from white to pink color for the purpose of change signalization  By  pressing the Calculate button all PI controller parameters are recalculated according to the Current loop parameters  calculation    Update FRM   the button is enabled by default  By pressing the button  the application PI controller parameters on the   embedded side are updated with the ones displayed in output field data      Reload Data     the button is disabled by default  The button becomes enabled as soon as one of the input Loop  Parameters is changed  The background of the cell is changed from white to pink color for the purpose of change  signalization  By pressing the Reload Data button all the modified cells will be rewritten with original values taken  from the file  After successful data reload  the background of the cells becomes again white and the button gets  disabled      Store Data     the button is disabled by default  The button becomes enabled as soon as one of the input Loop Parameters  is changed  The background of the cell is changed from white to pink color for the purpose of
27. ed and Position  module  Rs  Q  Resistance of one Current PI controller Yes  motor phase  BEMF Observer  Ld  H  Direct Inductance of Current PI controller Yes  one motor phase  BEMF Observer  Lq  H  Quadrature Inductance  Current PI controller Yes  of one motor phase  BEMF Observer  ke  V sec rad  Back EMF constant BEMF Observers Yes  J  Kg m   Drive Inertia Speed PI controller Yes  Iph nom  A  Nominal phase current  Current scale Yes  calculation  Uph nom  V  Nominal phase voltage  Voltage scale Yes  calculation                         Table continues on the next page       Motor Control Application Tuning  MCAT  Tool for 3 Phase PMSM  Rev  1  01 2013    8 Freescale Semiconductor  Inc           MCAT tool for 3 phase PMSM    Table 1  Inputs of the Parameter tab  continued     Parameter Name Description Use in constant Basic mode  calculation accessibility                                                    N required max  rpm  Maximal required speed   Speed scale calculation  in the application  It is  not a speed scale   Imax  A  HW current sensing Current PI controller No  scale  BEMF Observer  Speed Controller  U DCB max  V  HW DC Bus voltage Current PI controller No  scale  BEMF Observer  Speed Controller  U DCB trip  V  Trigger value that Fault protection No  switches an external  DC Bus braking resistor  on  U DCB under  V  Voltage value that Fault protection No  generates DC Bus  UNDER VOLTAGE  fault  U DCB over  V  Voltage value that Fault protection No  generates DC B
28. from an external file  The parameter cells are  freely accessible for editing according to the selected tuning mode  as shown in Table 4  There are four user buttons on the  page with the following functionality     e Calculate     the button is disabled by default  The button becomes enabled as soon as one of the input Loop Parameters  is changed  The background of the cell is changed from white to pink color for the purpose of changes signalization  By  pressing the Calculate button all PI controller parameters are recalculated according to the Speed loop parameters  calculation   Update FRM   the button is enabled by default  By pressing the button  the application PI controllers on the embedded   side are updated with the ones displayed in output field data      Reload Data     the button is disabled by default  The button becomes enabled as soon as one of the input Loop  Parameters is changed  The background of the cell is changed from white to pink color for the purpose of change  signalization  By pressing the Reload Data button all the modified cells will be rewritten with original values taken  from the file  After successful data reload  the background of the cells becomes white again and the button gets  disabled      Store Data     the button is disabled by default  The button becomes enabled as soon as one of the input Loop Parameters  is changed  The background of the cell is changed from white to pink color for the purpose of change signalization  By  pressing 
29. g  allows MCAT tool to utilize the runtime debugging  features in order to tune the embedded application  Once the application is tuned properly  MCAT tool offers a possibility to  store all constants in a file and export them as static configuration  see Figure 1  The application static configuration  represents a part of Freescale reference S W package and will be added into the reference S W as a header file     NOTE  The MCAT tool can be linked only with FreeMASTER version 1 3 16 or higher     Motor Control Application Tuning  MCAT  Tool for 3 Phase PMSM  Rev  1  01 2013    2 Freescale Semiconductor  Inc        Key Features    4 Key Features    The given approach is designed to tune the motor control applications  in other words it provides the support for embedded  applications  The application meets the following performance specifications       Supports up to three motor applications  Keeping an independent access to each motor   e Supports embedded applications that are compliant with MCAT tool standards  e Utilizes a Pole Placement method for control parameters estimation     Real time tuning and updating of control parameters     Offers a preview of the static configuration of tuned parameters     Generates an output file with static configuration of tuned parameters   e MCU independent  It supports platforms such as Kinetis  MPC and DSC    e Applicable for Freescale microcontrollers only   e Plug in tool for FreeMASTER  not available as a stand alone tool     Offer
30. hase PMSM       gies are AA        eae se cans    Application Control Structure        rpm       Speed FOC Control  lt  y c    Sensor type encoder    M State Control                          p Cascade Control Structure Composition           ae SE ES  ON   Scalar Control  lt   lt  Um lo M  ENABLED  view     masu gt  7  Speed req  500  rpm   Voltage FOC         M   S  OFF   view a Uq _req M  Application State    Current FOC 7 c Id_req    A   RUN a    view _    Ia_req   IA   Update FRM    Figure 19  Cascade tab     Basic mode    Motor Control Application Tuning  MCAT  Tool for 3 Phase PMSM  Rev  1  01 2013    Freescale Semiconductor  Inc  31          MCAT tool for 3 phase PMSM    aos ES TELE        ee   cans  ee     Application Control Structure    State Control Cascade Control Structure Composition  ON Scalar Control   c Um M      RR    view konnan    Speed req  rpm   Voltage FOC  ao a  OFF view         Uq req M  Application State  a   c Id_req IA   RUN La      view n    Iq_req  A   Update FRM 3  Speed FOC Control  lt   6000  view   Spent rag ta      Position  amp  Speed    encoder IE   F EAGLES   Sensortype   encoder    Figure 20  Cascade tab     Expert mode    Despite the tool deals with the common cascade control structure  getting a full support of Cascade tab requires software  switches in the embedded FOC implementation  Such modification will be an integral part of Freescale reference source  code  Then the toggling control mode can be used     6 8 1 Scalar Control    It
31. havior such as the loop bandwidth or attenuation     As seen in Figure 2  the control structure can be extended by additional optional blocks placed in the feed forward path of the  control loop  They are called Zero Cancellation blocks and play an important role in term of compensation of a closed loop     zero    introduced by a PI controller  Ramp block modifies the edges of speed step change command and introduces a slope  behavior to the reference speed request     Proposed MCAT tool helps the user to properly calculate the constants of the control structure with respecting the overall  system parameters as well as the parameters of the control     5 2 Application cases tree    The MCAT tool was designed to tune and control the applications employing up to three motors  Such a strategy covers wide  range of the multiple motor applications with different conditions  Cascade control approach allows the PMSM motor to be  controlled by following the FOC principles  Additional feature of the MCAT tool is an open loop scalar control of PMSM  motor  The last but definitely not least feature of the MCAT tool is position speed feedback option  In recent times  there are  plenty of various sensors such as resolver or encoder demanded  Very popular and often required is also sensorless design of  a PMSM control  All main MCAT tool features reflecting the possible application cases are summarized in Figure 3     Motor Control Application Tuning  MCAT  Tool for 3 Phase PMSM  Rev  1  
32. he cells disabled due to the basic tuning mode  are shadowed  Selected method is marked with a red colored button with a title ENABLED  To change the control structure  safety the application must be OFF  Toggling the control strategy the related red colored button has to be pressed     Each change of reference value has to be confirmed by a button Update FRM     If there is more than one source of the position speed information  the proper sensor type can be selected from the list Sensor  type     Motor Control Application Tuning  MCAT  Tool for 3 Phase PMSM  Rev  1  01 2013       34 Freescale Semiconductor  Inc     References    6 9 Application control tab    The last tab available from the menu is App Control tab  It is a voluntary tab that offers a possibility to display an optional  application control HTML based page  This option will be fully supported by a Freescale developer and will depend on the  application type as well as the target MCU     As an example of possible application control pages can be found  5    6       7 References     FreeMASTER user   s manual  freescale com FreeMASTER     AN4518  Dual 3 Phase PMSM Development Kit with MPC5643L  freescale com AutoMCDevKits  Automotive Math and Motor Control Library Set  fixed point arithmetic  freescale com AutoMCLib    Embedded Software and Motor Control Libraries     AN4561  3 Phase PMSM Motor Control Kit with the MPC5604P  page 24     DRM110  Sensorless PMSM Control for an H axis Washing Machine Drive  page 6
33. he input application parameters has changed as well  a new set of application scales have to be  recalculated  The Calculate button provides calculation and update of application scales values      Reload Data     the button is disabled by default  If the value in a particular field has changed  the background of the cell  is changed from white to pink color for the purpose of signalization the changes and the button becomes enabled  By  pressing the Reload Data button all modified cells will be filled with original values taken from the file  After  successful data reload  the background of the cells becomes white and the button gets disabled   e Store Data     the button is disabled by default  If the value in a particular field has changed  the background of the cell  is changed from white to pink color for the purpose of signalization the changes and the button becomes enabled  By  pressing the Store Data button all new values from modified cells will be saved into the file  After successful data  saving  the background of the cells becomes white and the button gets disabled     The editing fields accept only numeric characters  The parameter values are fully under a user responsibility and no  additional checking is applied to those items  The typical range of the parameter value appears when the mouse pointer is in a  parameter name focus     6 3 Current Loop tab    The Current Loop  CL  is a tab designed for tuning of the current control loop  The current control loop 
34. is the most inner  loop in the cascade control structure of vector controlled PMSM  One of the FOC features is separate controlling of the flux   d axis  and torque  q axis  components of the current  Figure 2  Due to this  PMSM control structure has two current loops  and each of them consists of a PI controller and an optional zero cancellation block     The CL tab is logically divided into two parts  The first part represents an input data field with required control loop  parameters needed for PI controller parameter calculation  The second one is an output data field which displays the  calculated parameters of PI controllers in both d and q axis  All PI controller constants are calculated from the motor  parameters  application scales and current loop parameters     Application tuning modes available in Current Loop tab     e Basic     highly recommended for users who are not experienced enough in motor control theory  There are no input  parameters required in this mode  All input parameters of the CL are estimated from the motor and application  parameters automatically by MCAT tool engine  The cells requiring these parameters are shadowed with the status  read only  Figure 7      Expert     all input parameters cells of the CL are accessible and freely editable by the user  as given in Figure 8   However  their setting requires a certain level of expertise in motor control theory     Motor Control Application Tuning  MCAT  Tool for 3 Phase PMSM  Rev  1  01 2013  10 F
35. l be rewritten with  original values taken from the file  After successful data reload  the background of the cells becomes again white and  the button gets disabled    Store Data     the button is disabled by default  The button becomes enabled as soon as one of the input sensor or  observer parameters is changed  The background of the cell is changed from white to pink color for the purpose of  change signalization  By pressing the Store Data button all new values from modified cells will be saved into the file   After successful data saving  the background of the cells becomes white and the button gets disabled     The editing fields accept only numeric characters  The parameter values are fully under user responsibility and no additional  checking is applied to those items  The typical range of the parameter value appears when the mouse pointer is in a parameter  name focus     6 7 Output file tab    Previous tabs are mainly dedicated to tuning the motor control applications  Once the application is tuned according to the  requirements  it might be useful to store the coefficients that correspond to the overall electrical drive  For this purpose  an  Output File tab has been designed and it is a part of tab menu     Motor Control Application Tuning  MCAT  Tool for 3 Phase PMSM  Rev  1  01 2013    Freescale Semiconductor  Inc  27       SQ             EEEEE 7E7 Hm LEL ELE  MCAT tool for 3 phase PMSM    The Output File  OF  tab serves a preview of the application coefficient
36. le 7 will be predefined by Freescale developer according to the  MC reference application     6 5 2 POSPE sensors parameter calculation    Angle Tracking Observer algorithm is used for the estimation of the rotor angle and the angular speed  The ATO approach  yields smooth and accurate estimations  As in any common closed loop systems  the intent is to minimize observer error  The  observer error is given here by subtraction of the estimated resolver rotor angle       from the actual rotor angle      see Figure  l5     cos O          sin Qest   COS OQest   Figure 15  Block scheme of the Angle Tracking Observer    The position tracking structure according to the scheme Figure 15 can be expressed by the following transfer function     Dosis  Kp ATOS K  ATO    Gatols  Bem  SKP ATOSKI ATO       Equation 25   The observer error corresponds to the formula of the difference of two angles   sin 0  cos O s1  g cos 0  sin O s1  F sin 6  a Dest   Equation 26     The ATO PI controller can be designed by comparing the closed loop characteristic polynomial  Equation 25 on page 23   with that of a standard second order system and the angle tracking observer coefficients Kp aro and Ky aro can by  calculated using     Motor Control Application Tuning  MCAT  Tool for 3 Phase PMSM  Rev  1  01 2013    Freescale Semiconductor  Inc  23       ne  MCAT tool for 3 phase PMSM    Kp ato z  Kp_ato s    4n  f i    Equation 27     2  Kr atoz  Kr atols Ts   2af o  Ts  Equation 28     where     is the requi
37. loop     Zero cancellation PI controller Motor       Wreq    Dec Inc    Figure 12  Simplified speed control loop    Motor Control Application Tuning  MCAT  Tool for 3 Phase PMSM  Rev  1  01 2013    18 Freescale Semiconductor  Inc        SSS SSS  MCAT tool for 3 phase PMSM    In most cases the electrical time constant of the RL circuit T   is much smaller than the mechanical time constant of the motor  Tmec  Small Ta requires the current control loop running at higher sampling frequency  hence the name fast loop  On the  contrary  the speed loop regarding the higher time constant can run in slower control loop with lower sampling frequency   Such approach gives enough time to control the current between two speed samples  Based on this  the behavior of the  current loop can be considered as a torque gain from speed loop perspective     The speed loop is closed by a PI controller  which enables speed control with zero steady state error  Considering a general  form of closed loop with a first order plant and PI controller     Kp ostK  Gp  As   as    Equation 15     Gy  s    5  Equation 16     where K  represents torque constant  J is a moment of inertia and B is a friction  Then the speed closed loop transfer function  is derived in Laplace domain as follows     KrK  KrKp T       ze KP w  zo stl    Gals    roal    Gel ds  G uds  KI w    wreg zd  1 Gpr oS  Gyls  ST w TE w panir ice w    Equation 17        Similar to the approach described in the current loop parameters calculati
38. might be very helpful  Connecting and tuning new electric  drive setup becomes easier because the MCAT tool via Cascade tab offers a possibility to split the control structure and  consequently to control the motor at various levels of cascade control structure  Such cascade control loops arrangement  results to four optional control modes       scalar control mode  e voltage FOC control    current FOC control  e speed FOC control    The Cascade tab contains ON OFF switch that can run the application  a window for displaying the current application state   Update FRM button that provides an update of reference variables on embedded application side and finally the window with  separately distributed control buttons for each available level of control structure  The functionality of each control mode will  be described in the following topics     Application tuning modes available in Cascade tab       Basic     highly recommended for users who are not enough experienced in motor control theory  as in Figure 19  The  inputs availability in basic mode depends on the selected control mode and will be described in the related topics      Expert     all input parameter cells of the Cascade tab are accessible and freely editable by an user  as in Figure 20   However  their setting requires a certain level of expertise in motor control theory     Motor Control Application Tuning  MCAT  Tool for 3 Phase PMSM  Rev  1  01 2013  30 Freescale Semiconductor  Inc           MCAT tool for 3 p
39. nced in motor control theory  There are no input  parameters required in this mode  All input parameters of the SL are estimated from the motor and application  parameters automatically by MCAT tool engine  The cells requiring these parameters are shadowed with the status  read only  as in Figure 10      Expert     all input parameters cells of the SL are accessible and freely editable by an user  as in Figure 11  However   their setting requires a certain level of expertise in motor control theory     emery iia i er sae SE som            Speed Control Loop  Loop Parameters Speed PI Controller Constants  Sample time 0 001  sec  Kp gain 621138    FO 23  Hz  Kp scale  t 1H Ki gain 0 71810    ale    Ki scale  Data Type  Frac32 eo  PI controller type  Parallel Speed PI Controller Limits Scaled  Upper Limit 0 625  Speed Ramp Lower Limit  0 625  ncup 2000 SiNSec Speed Ramp Scaled Increments Scaled  Inc Down 2000  rpm sec  Inc Up 0 000806  Actual Speed Filter Inc Down  0 000606  Filter points 2  points 2   Speed PI Controller Limits  Upper limit 5  A  Lower limit  5  Al      Update FRM   j      Figure 10  Speed Loop tab     Basic mode    Motor Control Application Tuning  MCAT  Tool for 3 Phase PMSM  Rev  1  01 2013    16 Freescale Semiconductor  Inc           Loop Parameters    Sample time 0 001  sec     FO 23  HZ     128  Data Type  Frac32    PI controller type  Parallel    Speed Ramp  Inc Up 2000  rpm sec   Inc Down 2000  rpm sec     Actual Speed Filter  Filter points 2  points   
40. on  Current loop parameters calculation   the speed  PI controller introduces a zero to the closed loop transfer function  The zero can be compensated by introducing a zero  cancellation block into the speed feed forward path  which has the following transfer function        KI     Equation 18   The speed loop transfer function with the zero cancellation block in feed forward path is then     reas   G     Gpr_ols Gu s  Lre    SZC    red s  7    AS 1Gp als Guls  EH 2  EERE NESS To  Equation 19     Gals  T    Then the proportional and integral gains of the PI controller as well as the zero cancellation block parameters can be derived  as follows       i aa  Kp _olz  Kp_ols   eu      Equation 20        Ki lz  K1 AJT s  ETs  Equation 21     where Ts is sampling period of the speed loop  w    is the natural frequency of the closed loop system  loop bandwidth  and  amp   is the speed loop attenuation  The constants  Equation 20 on page 19  Equation 21 on page 19   represent a parallel form of PI  controller  whereas the recurrent type of PI controller utilizes CC1 and CC2 constants     Motor Control Application Tuning  MCAT  Tool for 3 Phase PMSM  Rev  1  01 2013  Freescale Semiconductor  Inc  19       A   MCAT tool for 3 phase PMSM    Ts  CCI o E KP o ig Ki o7  Equation 22   Ts  CC  w   KP o   Ki o7  Equation 23     The zero cancellation transfer function  Equation 18 on page 19  can be also transformed into Z domain using Backward  Euler method  Then the discrete implementation i
41. pproach of the feedback control system theory to place the closed loop poles of a plant in pre   determined locations  The PP method applied to the closed loop system leads to desired controlled system behavior     A simplified closed current control loop shown in Figure 9  is used for deriving the PI controller parameters calculation  process     Zero cancellation PI controller RL circuit       Figure 9  Simplified current control loop    Considering a general form of closed loop with RL model as a plant of first order and PI controller   Kp js K  I  Gri  9     gt   Equation 1     Grels    Tak  Equation 2     where L is the stator inductance and R is a stator resistance  The closed loop transfer function is derived in Laplace domain as  follows     KI 1 KP I  G s   ireal    Gp_ s Ggy s    r APL At i FE et 7 lege    frog 2s  Ger AGr  a mao KIT Ceo fe  A I  Equation 3     The PI controller however  introduced a zero to the closed loop transfer function for command changes  located at  Ky Kp 1   This derivative characteristic of the loop increases the system overshoot  lowering the potential closed loop bandwidth  Due  to this  the zero of the PI controller must be compensated  This can be done by introducing a zero cancellation block in the  feed forward path  which has the following transfer function     Motor Control Application Tuning  MCAT  Tool for 3 Phase PMSM  Rev  1  01 2013  Freescale Semiconductor  Inc        13    LEE a    MCAT tool for 3 phase PMSM    Ced  EE     K
42. red attenuation  f    required bandwidth  in Hz  and Tg is sampling time  The constants  Equation 27 on  page 23 Equation 28 on page 24  represent a parallel form of PI controller  whereas the recurrent type of PI controller utilizes  CC1 and CC2 constants     Ts  CC  ato Kp atot Ki ATT    Equation 29     T  CC  ato    Kp atot Kr ato   Equation 30     The PI controller coefficients  Equation 27 on page 23  Equation 28 on page 24  Equation 29 on page 24  Equation 30 on  page 24  are used in case of floating point data representation  The discrete fixed point arithmetic implementation of PI  controllers requires the scaling approach to keep all signals in the range  lt  1  1   Detailed description of proper PI controller    s  parameters scaling is in  3     4       6 5 3 Parameter modification    All parameter cells are filled automatically with predefined data downloaded from an external file  The parameter cells are  freely accessible for editing in accordance to the selected tuning mode  as it is shown in Table 6  There are four user buttons  on the page with the following functionality       Calculate     the button is disabled by default  The button becomes enabled as soon as one of the input sensor or observer  parameters is changed  The background of the cell is changed from white to pink color for the purpose of changes  signalization  By pressing the Calculate button PI controller parameters and integral coefficient are recalculated  according to the POSPE sensors par
43. reescale Semiconductor  Inc           MCAT tool for 3 phase PMSM    Current Control Loop    r Loop Parameters          _      _  M D Axis Controller     r Q Axis Controller            Sample Time  0 0000625  sec    Kp_gain  0 832528 Kp_gain  0 585185  FO  233 Ha   Ki gain o771567   Ki oain  0 509432    me    Kp scale PEE Kp_scale  a     Ki_scale  5 Ki_scale  4  Data Type  Frac32    Pl controller type  Parallel    Current PI Controller Limits    Output limit   90        o  ere T        Figure 7  Current Loop tab     Basic mode    Motor Control Application Tuning  MCAT  Tool for 3 Phase PMSM  Rev  1  01 2013    Freescale Semiconductor  Inc  11          MCAT tool for 3 phase PMSM    Current Control Loop    Loop Parameters D Axis Controller Q Axis Controller   Sample Time  0 0000625  sec  Kp_gain  0 832528 Kp_gain  0 585185   FO       233  Hz  Ki_gain  0 771567 Ki_gain  0 509432   E I 1 Kp_scale    Kp_scale  Oo  Ki_scale  5 Ki_scale  a   Data Type  Frac32    PI controller type  Parallel    Current PI Controller Limits    Output limit 90        Sr eee ee S    Figure 8  Current Loop tab     Expert mode    The Table 2 shows the list of the current loop input parameters with their physical units  brief description  the impacted  algorithms and accessibility status in basic mode     Table 2  Inputs of the Current Loop tab  Parameter Name Description Use in Constant Basic Mode  Calculation Accessibility   Sample Time  sec  CL sampling time Current PI controller    Zero compensator  FO 
44. ributors harmless against all claims  costs  damages  and expenses  and  reasonable attorney fees arising out of  directly or indirectly  any claim of personal injury  or death associated with such unintended or unauthorized use  even if such claims alleges  that Freescale Semiconductor was negligent regarding the design or manufacture of   the part     RoHS compliant and or Pb free versions of Freescale products have the functionality and  electrical characteristics as their non RoHS complaint and or non Pb free counterparts   For further information  see http   www freescale com or contact your Freescale   sales representative     For information on Freescale s Environmental Products program  go to  http   www  freescale com epp     Freescale    and the Freescale logo are trademarks of Freescale Semiconductor  Inc   All other product or service names are the property of their respective owners        2013 Freescale Semiconductor  Inc        ey       freescale       W    
45. s basic and expert tuning mode   e Modular S W concept  easily configurable    5 Target Applications    In recent times  there are plenty of servo drive applications employing various types of electric motors  Freescale  based on  its experiences  mainly focuses on permanent magnet types of electric drives such as Permanent Magnet Synchronous Motor   PMSM  and Brushless Direct Current  BLDC  motor  Both of them are very popular in wide variety of the motor control  applications due to their performance  efficiency  reliability  easy controlling and so on  Another type of motors    Asynchronous Induction Motor  ACIM  or Switched Reluctance Motor  SRM  are not widely used as servo drives  however  they are still popular due to their absence of expensive permanent magnets     The application note describes the PMSM application tuning variant as a first motor module of MCAT tool     From a wide spectrum of PMSM control techniques the most common one has been chosen for the purpose of electric drives  tuning by using MCAT tool  The most popular and widely used control strategy for PMSM motors is Field Oriented Control   FOC  which is characterized by smooth rotation over the entire speed range of the motor  full torque control at zero speed   and fast acceleration deceleration     5 1 PMSM Field Oriented Control    Field Oriented Control  2   also called vector control  is based on the cascade structure with inner current loop and outer  speed loop  Figure 2  The control loops arr
46. s that correspond to the tuned motor control  application  as in Figure 18  The coefficients are thematically divided into the groups according to selected control tabs as  follows     Application scales   Mechanical alignment   Current loop parameters   Speed loop parameters   Position and Speed Sensors module parameters  if required   Sensorless BEMF DQ observer  if required    Cascade control structure parameters  if required   FreeMASTER scale variables    There are no application tuning modes available for this tab     Motor Control Application Tuning  MCAT  Tool for 3 Phase PMSM  Rev  1  01 2013       28    Freescale Semiconductor  Inc        MCAT tool for 3 phase PMSM      se oe            Output File    mt iis AE   Sensores   cascade    Generate Configuration File               File Name  PMSM_appconfig h   File Source   TWRK60_PMSM_SENSORLESS src    Date  December 4  2012  10 52 11   Description  Automatically generated file for static configuration of the PMSM FOC application     Application Scales   a     define I_MAX   define U_DCB_ MAX   define U_MAX   define N_MAX   define E_MAX     define U_DCB_TRIP   define U_DCB_UNDERVOLTAGE   define U_DCB_OVERVOLTAGE       Mechanical alignment             define ALIGN_DURATION   define ALIGN_CURRENT       Current Loop Control       Loop bandwidth     Loop attenuation     Loop sample time     define CLOOP_LIMIT       D   axis parameters   define D_KP_GAIN   define D_KP_SC   define D_KI_GAIN   define D KI SC       Q   axis par
47. s therefore given by     ace OS  gp e U  VI  KP KI ols Mk   Kp oF KT oTs Vk     Equation 24     The discrete implementation of speed zero cancellation block represents a simplified form of 1st order Butterworth LP filter  in IIR implementation     It depends on the PI controller implementation  the controller constants  Equation 20 on page 19  Equation 21 on page 19   Equation 22 on page 20  Equation 23 on page 20  are used in case of floating point data representation  The discrete  implementation of PI controllers in the fixed point arithmetic platform requires the scaling approach to keep all signals in the  range  lt  1  1   Detailed description of proper PI controller   s parameters scaling is in  3    4      As can be seen  to get the constants of the speed loop a very sensitive parameter     moment of inertia is required  However   there is plenty of motor control applications where this parameter is either completely unknown or rapidly changed during the  operation in depends on the load torque behavior  In such case  the ramp function placed in the speed feed forward path can  be used instead of zero cancellation block  The ramp behavior of the required speed can partly suppress the impact of the  inaccurate calculated PI controller parameters caused by a difference in estimated moment of inertia  More details about ramp  function can be found in  3    4      6 4 3 Parameter modification    All parameter cells are filled automatically with predefined data downloaded 
48. sition and Speed Calculation    BEMF Observer Parameters BEMF Obsrv Constants TO Constants   FO  150  Hz  I scale  0 962962 Kp gain  0 969696  E   448 Uscale  0 334362 Kp scale    Tracking Observer Parameters   man         FO  40 H        ERE  Kp gain 0 635676 Theta gain 0 66  Open Loop Start up Parameters pouce 3 esee 5  Start up ramp   1000  rpm sec  sae 0 889511 OL Start up Constants  Start up current 1 TAJ mince   8 Start up Inc 0 000303  Merging speed  300  rpm  Start up   Scaled  0 125000  Merging coeff   50     Merging N Scaled  0 090909    Merging Coeff 0 008138  Data Type  Frac32    SSeS ee Ser  Serene    Figure 16  Sensorless tab     Basic mode    Motor Control Application Tuning  MCAT  Tool for 3 Phase PMSM  Rev  1  01 2013    Freescale Semiconductor  Inc  25          MCAT tool for 3 phase PMSM    Introduction   Parameters   Current Loop Speed    BEMF Observer DQ   Position and Speed Calculation    BEMF Observer Parameters BEMF Obsrv Constants TO Constants  FO   150  Hz  I scale 0 962962 Kp gain  0 969696  E   10 U scale  0 334362 Kp scale E   Tracking Observer Parameters TES 0 901612       9r  84s    7 WI scale 0 082394 Ki scale  12     1H Kp gain  0 635676 Theta gain 0 66  Open Loop Start up Parameters Soucis  3 mee  5  Start up ramp   1000  rpm sec  syan 0 889511 OL Start up Constants  Start up current  a  A  i cae 8 Start up Inc  0 000303  Merging speed   300  rpm  Start up   Scaled  0125000  Merging coeff  50     Merging N Scaled  0 090909  Merging Coeff 0 008
49. the Store Data button all new values from modified cells will be saved into the file  After successful data  saving  the background of the cells becomes white and the button gets disabled     The editing fields accept only numeric characters  The parameter values are fully under user responsibility and no additional  checking is applied to those items  The typical range of the parameter value appears when the mouse pointer is in a parameter  name focus     Motor Control Application Tuning  MCAT  Tool for 3 Phase PMSM  Rev  1  01 2013    20 Freescale Semiconductor  Inc        E  MCAT tool for 3 phase PMSM    6 5 POSPE sensors tab    The most important signals in the PMSM FOC control scheme are speed and position feedbacks  The POSPE sensors  PS   tab deals with the algorithm for the speed and position signals estimation  An angle tracking observer  ATO  represents a  Freescale SW solution for obtaining the actual angle and speed of the resolver and encoder sensors     Similar to previous tabs  the PS tab is also divided into two parts  The first part represents an input data field with required  sensor parameters and ATO loop parameters needed for ATO PI controller parameters calculation  The second one is an  output data field displaying the calculated parameters of the ATO algorithm  The ATO PI controller constants are calculated  from the application scales and ATO loop parameters     Application tuning modes available in POSPE sensors tab     e Basic     highly recommended
50. tool engine is based on Jscript  language  The HTML and Jscript are widely used on the Internet so the design can be made with the help of the web   authoring tools which are commercially available or even free on the Internet     Proper displaying of the MCAT tool as an HTML code is provided by the FreeMASTER software exploiting Microsoft  Internet Explorer  FreeMASTER software implements an ActiveX object  which is used to enable access to and control the  target board application     More details about FreeMASTER tool can be found in  1       An integration of MCAT tool into the development process chain is shown in Figure 1     SOFTWARE   fem i mm HARDWARE  I  I    FreeMASTER Freescale MCU    RUNTIME  Freescale aa 6 Freescale H W    online monitor   Application debugging reference control design setup      PI controllers tuning    Control schemes layering                PI controller Ug rq    nm     reg lems    gt   L Kosky  gt   L kak F   o   Pl controller fur PI controller   a mej  w ap  v  rn  ap x abc    I  I  I  I  I  I  l  I  i  I il  I  I  I  I  I  I  I  I  I  I  I                                                       Development Studio  Pose Freescale BUILD PROCESS  N S W Package    Output  file       Motor Control Library set             Position   Speed    Embedded application  lt    valuation                Motor Control Reference Design    Figure 1  The software concept of MCAT tool utilization    FreeMASTER  as a tool for hard real time applications monitorin
51. us  OVER VOLTAGE fault  N max  rpm  Speed scale     maximal  Speed and position No  value of electrical  angular velocity BEMF Observer  Tracking Observer  U max  V  Voltage scale     Current PI Controller No  maximal value of FOC  BEMF Observer  E max  V  Back EMF voltage BEMF Observer No  scale  kt  Nm A  Torque constant Speed PI controller No  Align current   voltage   A    V  DC value of current or   Rotor alignment No  voltage for rotor  alignment  Align duration  sec  Duration of rotor Rotor alignment No  alignment          The parameters of the controlled motor can be acquired from a motor datasheet provided by motor manufacturer or from  laboratory measurement     6 2 1 Parameter modification    All parameter cells are filled automatically with predefined data downloaded from an external file  The input parameter cells  are freely accessible for editing in accordance to the selected tuning mode  as it is shown in Table 1  There are four user  buttons on the page with the following functionality     e Update FRM   the DC voltage or current and the duration of applied alignment state can be updated by using this    button  The button is disabled in basic tuning mode     Motor Control Application Tuning  MCAT  Tool for 3 Phase PMSM  Rev  1  01 2013    Freescale Semiconductor  Inc        co    e N   MCAT tool for 3 phase PMSM    e Calculate     the button is disabled by default  In case that the tuning mode has changed from an expert to a basic mode  and at least one of t
    
Download Pdf Manuals
 
 
    
Related Search
    
Related Contents
Electrolux ESL 47020 User's Manual    Manual de instruções  Mellanox Grid Director 4700  ROBO-8712E Series User`s Manual  木製新聞掛け 取扱説明書  ONKYO SBT-200    Copyright © All rights reserved. 
   Failed to retrieve file