This thread has been locked.

If you have a related question, please click the "Ask a related question" button in the top right corner. The newly created question will be automatically linked to this question.

PMSM - FOC Control with HVMTR Rev 1p1 - TMDSHVMTRINSPIN

Other Parts Discussed in Thread: TMDSHVMTRINSPIN, MOTORWARE, CONTROLSUITE

Hello,

I've a questions for you about my project with TMDSHVMTRINSPIN.

As example I'm using project Lab04 refered to a torque control mode and i've a problem for the voltage output (block M5 on the yellow PCB). I've correctly insert the moto parameters as Rs, Ls, Ld, ..... in the file user.h

Also i've used the following value:

#define USER_IQ_FULL_SCALE_FREQ_Hz        (50.0)
#define USER_IQ_FULL_SCALE_VOLTAGE_V      (350.0)
#define USER_ADC_FULL_SCALE_VOLTAGE_V       (500)      // 409.6 hvkit_rev1p1 voltage scaling
#define USER_IQ_FULL_SCALE_CURRENT_A          (5.0)   // 10.0 Example for hvkit_rev1p1 typical usage
#define USER_ADC_FULL_SCALE_CURRENT_A        (19.89)     // 19.89 hvkit_rev1p1 current scaling
#define USER_NUM_CURRENT_SENSORS            (3)
#define USER_NUM_VOLTAGE_SENSORS            (3) // 3 Required
#define   I_A_offset    (0.991096735)
#define   I_B_offset    (0.9902896285)
#define   I_C_offset    (0.9826043248)
#define   V_A_offset    (0.3237852454)
#define   V_B_offset    (0.3227902055)
#define   V_C_offset    (0.3217574358)

#define USER_SYSTEM_FREQ_MHz             (90.0)

#define USER_PWM_FREQ_kHz                (30.0)

#define USER_MAX_NEGATIVE_ID_REF_CURRENT_A     (-2.0) 

#define USER_ZEROSPEEDLIMIT   (0.2)   

#define USER_FORCE_ANGLE_FREQ_Hz            (1)  

#define USER_MAX_ACCEL_Hzps                 (20.0)      // 20.0 Default

#define USER_MAX_ACCEL_EST_Hzps           (2.0)         // 2.0 Default, don't change

#elif (USER_MOTOR == MY_MOTOR)
#define USER_MOTOR_TYPE                 MOTOR_Type_Pm
#define USER_MOTOR_NUM_POLE_PAIRS       (1)
#define USER_MOTOR_Rr                   (NULL)
#define USER_MOTOR_Rs                   (87)
#define USER_MOTOR_Ls_d                 (0.3)
#define USER_MOTOR_Ls_q                 (0.3)
#define USER_MOTOR_RATED_FLUX           (2.1)
#define USER_MOTOR_MAGNETIZING_CURRENT  (NULL)
#define USER_MOTOR_RES_EST_CURRENT      (10)
#define USER_MOTOR_IND_EST_CURRENT      (-1)
#define USER_MOTOR_MAX_CURRENT          (5)
#define USER_MOTOR_FLUX_EST_FREQ_Hz     (20.0)

My control torque can be start using a value of gMotorVarson.IqRef_A on  the "expression" tab of my ccs5.

So i've note that the motor can increase the speed when i increase the Iq ref.  Naturally, in a torque control when i increase the Iq ref, in the conditions of the same load, there is an increse of the speed.  The problem is that when i use a value of Iq ref greater than 0.7 the motor don't increase the speed. I've measured the output voltage (line-line) on the 3-ph pin on the block M5 of my yellow PCB and the value is at max 120VAC. How can i incrresase the value of this voltage at  230VAC? I think that my motor can't increase the speed when i increase the iqref beacuse the value of the output voltage is to low.  I'm using a stator with 3-ph star connection.

What do you think about? Do you have any information about the jampers J1 J2 J3 J4 on the block M5? To sole my problem, i'm change any parameter on the file user.h or can i change same electrical connection on the HVMTR kit?


rd@emcmotors.it

felardo@arroweurope.com

  • Hi, Nazario.

    There are multiple mistakes with your user.h settings.

    Can you please tell me for your motor:

    Vbus =
    Max Current @ Rated Load =
    Poles = 2
    Max Frequency Expected =

    Do you have the Rs and Ls of the motor on the nameplate or datasheet? 
    Do the 87 ohm and 0.3 H seem accurate to you?

    Did you use the InstaSPIN-FOC GUI at first to ID and run the motor?
    If so, what parameters did it return?

     

    I will send you back a modified user.h for you to try.

     

  • Hi Chris

    Thanks for your information.

    Well i inform you that the the value of Rs(87 ohm) and Ls(0.3 H) are correct.

    The max current at full load is at maximum 3.5A and with this maximum load I want to have an Rpm of the motor of 1600 or 1700 Rpm.(Now with my user.h file i've obtained a value of 1400 Rpm but i don't know i to increase  this speed). At the minimum load (load near 0 Nm) the motor must have 3000 Rpm (and now i've obtained 2750).

    Also i have 2 poles, so i've use as max frequency expected = 50 Hz.

    Also for this motor i've have a problem with INSTASPIN-FOC GUI. Infact the motorwaregui has not identified the motor, but for motor identification i'm sure on the value of Rs,Ls and Lr.(measured) but  I don't know the flux rated value, so i hypothesized a value: rated flux: 2.3 V/Hz.

    Yesterday, i've note that there are a lot of problem with the compiler 6.2, so i've downlaod and use the compiler 6.0 or 6.2.4 and now iìve the output voltage greater then 120 VAC.

    Well i look forward your user.h file.
    Also how can i increase my current output value?

    Thanks.

  • Please use attached user.h and try again. Which project are you running?

    1. you will need to update your Offsets in the User.h again, they change with the IQ scaliing I updated. And/or just leave the OffsetCalc enabled so it always runs the calculation. Better during development in case you end up changing an IQ variable in user.h and forgetting to udpated the offsets!

    2. Note that I changed your PWM frequency to 15 kHz. I wasn't sure if you selected 30 for a reason. If you really want it at 30 KHz that's fine, but I suggest you then change USER_NUM_PWM_TICKS_PER_ISR_TICK to (2) to get the clock tree to 15 kHz for the inner control loops. You can likely reduce this much further for this motor, but for now testing with everything at 15 kHz inner lop is fine. I would think with your large Rs you would want ro reduce PWM switching to reduce losses.  I would test even lower frequency once things look good.

    3.  See if your maximum RPM changes now.

    3a. If not, please realize that you are using a modulation index of only 1.0  This is pure sine wave and doesn't use all of the voltage bus.  See proj_lab10 for how to increase this modulation up towards 1.33 (pure trapezoidal) to reach your maximum speed with the voltage bus you are using. You will be able to see what what % of Vbus is being used by watching the Vs variable. It will max out at your OverModulation setting.

    3c. if still more speed is required look at proj_lab09 for field weakening

    4. Your flux value.  You can view this during Motor ID or anytime during run-time.  Even if you don't have it entered correctly in your user.,h, the algorithm will lock on to flux while running. The caveat is that the range of flux value is determined by your IQ_VOLTAGE variable, so this window needs to be shifted to look in the right range of where your flux is.  If it's anywhere close to 2V/Hz (which seems reasonable for this motor) the settings in this user.h will work just fine.

    5. Compiler. Yes, you must use 6.2.3+.  Do NOT use anything previous. There was a major IQMath bug in first 6.2.x

     

    user.h
  • Hello Chris

    I've used your user.h file but i don't have any improvements.

    I've a PMSM motor and i want use a torque control. This control must have the maxium torque at the maximum load, and with the FOC control i'll have the maxium Iq ad Id=0. after, when i decrease the load, the torque decrease, so the power input decraese and my Id can be neagtive. So the question is: Is it possible do this control using lab04?

    Also how can i adjust my offset value?

    Now at the maxium load my motor have a power input of 180 W with 1.4A at 230VAC measured line to line of my 3-Ph motor. How can i increae the value of the current? I want to have 2.5 A at the maxium load.

     

  • "after, when i decrease the load, the torque decrease, so the power input decraese and my Id can be neagtive"

    This is incorrect.  Your Id_ref will only be negative if you are trying to apply field weakning. This is where you inject negative Id current in an attempt to reduce the Bemf magnetic field to gain higher speeds (at much higher power usage, as your total current = sqrt (Iq^2 + Id^2)

    "So the question is: Is it possible do this control using lab04?"

    You should use lab05a.  It is the same as lab04 except you have access to the current controller gains. You will need to adapt these to your motor by doing step input testing.

    "Now at the maxium load my motor have a power input of 180 W with 1.4A at 230VAC measured line to line of my 3-Ph motor. How can i increae the value of the current? I want to have 2.5 A at the maxium load."

    If your motor is providing the torque with 1.4A to counteract this load as required, than this is correct.  Why do you want it to use 2.5A if 2.5A is not required?

    In proj_lab5a you can directly input the Iq_A.  If you set this to 2.5A then the FOC controller will use UP TO 2.5A of Iq current.  Note that is UP TO. You can't MAKE the motor draw 2.5A if there is not a large enough load.  A lighter load will use less current.

    "Also how can i adjust my offset value?"

    this is covered in proj_lab3a & 3b

     

  • Hello Chris


    Perfect, my Id current must be negative only if i apply a field weakning.

    Now  i'm just working with lab5a and lab09.

    But i've any problems:

    1) Problem flashing lab05a on my card. There is an error report "...specifies ISA revision "C2800", which is not
       compatible with ISA revision "C2700" specified in a previous file or on the
       command line..."  How can i solve this problem?

    2)Do you have some information in reference example lab09? on pdf file there aren't informations.

    Another questions:

    If i have  2 poles and i want have as maximum speed 3000 Rpm, what is the value that i must insert in USER_IQ_FULL_SCALE_FREQ_Hz?

  • 1. What project settings did you change?  it should not do this if building out of MotorWare with CCSv5 and compiler 6.2.3+

    2. Yes, the write-up hasn't been done but the SW is functional. Just load proj_lab09 and the proj_lab09.js like you have done previously.  You can directly input NEGATIVE Id for field weakening

    gMotorVars.IdRef_A

    or you can try the automatic field weakening using

    gMotorVars.Flag_enableFieldWeakening

    this will set -Id up to your limit in user.h

    #define USER_MAX_NEGATIVE_ID_REF_CURRENT_A     (-2.0)

     

    3000 RPM * 2 poles / 120 = 50 Hz

    This is a very low maximum speed.

    Normally I would suggest setting something like 60 Hz as your limit, but I've never done anything so low.

    You can give it a try, but watch your Flux values to make sure they are stable. If you see any issues try setting to

    (4 * USER_VOLTAGE_FILTER_POLE_Hz)

     

  • Hello Chris

    1.  I've a problem when i complile with flash build. If i compile with RAM build there aren't any error but when i change the variable in the expression windows, the project crash.

    2. i've a 2 poles motor and i use this motor into a blower for air aspiration. well my maximum speed with no laod must be 3000 Rpm and the max speed with full load must be 1600 Rpm. Now i've a problem to run  the motor into the blower at this speed.

    3 also i've note that with USER_MAX_VS_MAG_PU  (1    or    1.1547) the maxium output voltage is 210VAC but using USER_MAX_VS_MAG_PU        (1.3333)  he maxium output voltage is 230VAC.

    So the question is how can i have the maxium output voltage of 230VAC using sinusoidal wave USER_MAX_VS_MAG_PU  (1    or    1.1547) ?

  • 1. which specific project? I will check on my side. 

    2. Well, there are multiple things it could be

    - tuning of speed loop

    - modulation (see #3)

    - incorrect motor parameters

    - incorrect user.h IQ variables

    - incorrect knowledge of the motor's capability

    - incorrect bus voltage being use

    - not using the correct proj_lab##

    3. in user.h you MUST leave this value as default

    #define USER_MAX_VS_MAG_PU        (1.0)

    IF you want to use modulation over 1.0 you MUST use proj_lab10 for these features.  It is in this lab where you can interface using

    gMotorVars.OverModulation

    which is used in the project to set

    CTRL_setMaxVsMag_pu(ctrlHandle,gMotorVars.OverModulation);

     

    you will also be able to access

    svgencurrent.MinWidth  to set the minimum width

    and watch svgencurrent.IgnoreShunt to see which of the A, B, C shunts are being used/ignored.

     

  • Hello Chris

    well first of all thanks for your  availability.

    1. the prblem is running lab5a.

    2. I've insert the correct value for the parameter Iq as indicated in ythe user guide spruhj1c.

    3. For the output voltage i must have a sinusoidal wave, so i've used the value USER_MAX_VS_MAG_PU  (1.1547) to have a 1/SQRT(2)*Vdcbus. <my Vdc bus as indicated on the windows expressions is 300VDC. so my output voltage will be 300*0.7=210VAC. So i want have as output voltage the value of 230-240 VAC. How can i have this value?

    4. i must have a torque control so i've used lab04. using this lab, i've note that when i increase the IQref over 0.9 A the motor don't incraese the speed. How is this possible?

    5. i've change also the USER_VOLTAGE_FILTER_POLE_Hz  to 50 because i've 1 pole pair and the best speed of my motor must be 3000 Rpm. Is it correct?

     

  • Nazario,

    You are not following the instructions.

    1. 5a FLASH builds fine. Perhaps you changed some settings or have not set the proper switches on the controlCARD for Flash operation.

    2. Iq is not  a parameter you can set, so you have made a mistake

    3. You can NOT set this value directly in user.h   It even tells you this in the user.h comments.

    #define USER_MAX_VS_MAG_PU        (1.0)    // Set to 1.0 if a current reconstruction technique is not used.  Look at the module svgen_current in lab10a-x for more info.

    4. Use lab 5a so that you can change the gains if needed.  When you set an Iq_ref it is NOT the current that the motor WILL use, it is the maximum current that it MAY use.  FOC automatically puts the magnetic fields in the proper orientation to use the least amount of current necessary.  If you load the machine it will require more torque and the Iq_A will increase UP TO the Iq_ref as needed.

    5. No, No, No, No, No.  It clearly states in user.h

    /! \brief Defines the analog voltage filter pole location, Hz
    //! \brief Must match the hardware filter for Vph
    #define USER_VOLTAGE_FILTER_POLE_Hz  (372.5)   // 372.5, value for hvkit_rev1p1 hardware

    DO NOT CHANGE THIS VALUE UNLESS YOU MAKE YOUR OWN HW

     

  • Thanks.

    1. I've no change the proper switches. I'm using the  configuration set when I got the kit.

      i'm using the ISOcontrolCard  F2806x using TMS320F28060_xds100v2.ccxml

    2.The parameters that i've change in reference to Iq are:

    USER_IQ_FULL_SCALE_FREQ_Hz (50)

    USER_IQ_FULL_SCALE_VOLTAGE_V (450)

    USER_ADC_FULL_SCALE_VOLTAGE_V       (409.6)

    USER_IQ_FULL_SCALE_CURRENT_A          (10.0)

    USER_ADC_FULL_SCALE_CURRENT_A        (19.89)

    Do you think taht i can change this value? How?

    3. Ok.

    4. I know what means Iq and Iqref.

    5 all right. infact i don't change the default value of 372.5. it was only a ìn hypothesis.

  • Hello Chris

    I've reinstalled CCs and i've solve the problem with lab05.

    I've a problem with the output voltage.

    If i set Iq_Ref_A on the output voltge (M5- UV) measured with a multimeter at most 150VAC.

    1. How can i increase this output voltage to 230 VAC? (I've find my correct Kp and Ki value but there aren't any improuvments)

    2. Do you have some information about jumper (M5: J1 J2 J3 J4)?

  • 1. What is your input voltage?  It sounds to me like you are probably using ~110Vac line input which gets rectified to ~160Vdc for your bus.  You need to use higher Vac or provide your Vdc directly per the instructions.

    2. What do you want to know about the jumpers? They are documented in the HW guide

    C:\ti\motorware\motorware_1_01_00_11\docs\boards\drive\hvkit_rev1p1\docs

     

  • 1. I've solve.

    2. Unfortunately on the doc there aren't inform<ions about jumper on M5 Block.

    3. However, i insert my PMSM motor into a blower for air aspiration.The blower is a process with variable torque. I want have at the maxium torque the speed of 1800 Rpm. Now to increase the torque i increase the Iq_ref_A at the lab05a. But i've at most 1400 Rpm with Iq_Ref_A=0.5. V output measured with a multimeter (Line Line)=205 VAC.

    If i increase Iq_Ref_A to 0.6 or 0.7 or 1 the speed don't incraese.

    I want have 1800 Rpm at the full load (full torque) Can you help me to find a solutions?

  • 2. You are correct, let me verify and post their functionality.

    3. please see proj_lab10 to use a higher modulation. But there is no way that you can expect another 28.5% increase just with modulation. It will get you close. You may need some field weakening to hit that top speed (or increase your bus voltage)

     

  • For the M5 Jumpers

    J1-J4  give scalability in gain selection of voltage sensing 

    If the jumpers are not populated [default, use for controlSUITE and MotorWare projects]

    Then the  gain is   9.09/(820+300+9.09)= 0.00805 => max voltage sense 409

     

    When the jumpers are populated 

    9.09/300 => 108V max sense

     

    I'll add to documentation.

  • How can i increase VDC Bus? Is it possible have 400 VDC with AC Power Entry [M1]? what parameters i must change to increase VDC bus?

  • "How can i increase VDC Bus?"

    Increase Vac or directly provide Vdc-bus per the documentation

    We recommend using Vdc-bus if you have a high voltage supply.  Otherwise use a variac for adjustable AC input.