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.

Some InstaSPIN-FOC Questions

Other Parts Discussed in Thread: MOTORWARE

Hi hope to get assitance for my questions:

1. How to calculate of USER_MAX_VS_MAG_PU from maximum duty cycle?

2. Is USER_MAX_ACCEL_Hzps used for starting from zero speed? How does its variations affect the start-up? I was experiencing motor locked in oscillation during start before changing USER_MAX_ACCEL_Hzps to 1.0, now all seems good, albeit start-up needs longer time.

3. In fan application (motor attached to inertia load), is forced angle needed/a better method to start from zero speed?

4. I wish to identify motor with some inertia load attached (fan), which settings can I change to increase the duration for motor spin up to target speed before Ls estimation starts? I noticed the Ls estimation ended before my motor reached the target speed (USER_MOTOR_FLUX_EST_FREQ_Hz = 20.0 = 20 * 60 / 8 pole-pair = 150rpm)

5. Will USER_IQ_FULL_SCALE_FREQ_Hz settings affect motor performance? Motor I have only needs to achieve <250rpm which is around 30Hz. It runs fine with the default value (800.0) Hz. Will reducing this value give better performance? What is the minimum/optimum value to set for my motor? Please refer attached user.h.

6. USER_VOLTAGE_FILTER_POLE_Hz can only take values between 200 and USER_VOLTAGE_FILTER_POLE_Hz * 10 *1.1 < EST rate? Should I make the filter pole as low as possible, in my case 200Hz?

user.h
  • Soon,

    1. Please see the write-up on proj_lab10 where modulation is updated.  It is best if you leave the user.h value at (1.0) and just update it manually as the lab shows you....however, if you are sure you will use overmodulation in your code you may hardcode USER_MAX_VS_MAG_PU to your new value from 1.0 to 1.33

    It is also explained in the user.h comments

    //! \brief Defines the maximum Voltage vector (Vs) magnitude allowed. This value sets the maximum magnitude for the output of the
    //! \brief Id and Iq PI current controllers. The Id and Iq current controller outputs are Vd and Vq.
    //! \brief The relationship between Vs, Vd, and Vq is: Vs = sqrt(Vd^2 + Vq^2). In this FOC controller, the
    //! \brief Vd value is set equal to USER_MAX_VS_MAG*USER_VD_MAG_FACTOR. Vq = sqrt(USER_MAX_VS_MAG^2 - Vd^2).
    //! \brief Set USER_MAX_VS_MAG = 1.0 for a pure sinewave with a peak at SQRT(3)/2 = 86.6% duty cycle. No current reconstruction is needed for this scenario.
    //! \brief Set USER_MAX_VS_MAG = 2/SQRT(3) = 1.1547 for a pure sinewave with a peak at 100% duty cycle. Current reconstruction will be needed for this scenario (Lab10a-x).
    //! \brief Set USER_MAX_VS_MAG = 4/3 = 1.3333 to create a trapezoidal voltage waveform. Current reconstruction will be needed for this scenario (Lab10a-x).
    //! \brief For space vector over-modulation, see lab 10 for details on system requirements that will allow the SVM generator to go all the way to trapezoidal.
    #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.

    2. USER_MAX_ACCEL_Hzps is just the default value. You can immediately change this, or change anytime you like.  This is an input to the trajectory module whose output feeds the speed controller.. See proj_lab5b

    3. Forced angle will make the start-up from 0 speed more repeatable / more controlled.  If you turn it off it will still start up, but less controlled.  Once the motor is running you typically want to turn ForceAngle off. The only time you want it on is a) start-up from 0 and b) if you are operating where your speed may drop to a very low speed for a longer period of time than the estimator can handle....this will keep the motor moving in a controlled fashion until a new command which puts you back into a speed range where FAST is working.  But you really don't want to have ForceAngle take over unless it's really necessary, so you may want to write some logic for your system to decide if you ever want to turn it on.  Also, for a fan the blades may already be moving. If you want to do this VERY controlled search this forum for "flying start".  Not required, but can be helpful, especially if the fan is outside and may be blowing VERY hard.

    4. The easiest is to just increase #define USER_MAX_ACCEL_EST_Hzps in user.h so you will increase your speed faster.  You can also directly change the timing in the user.c file. 

    5. There is a maximum (4 * filter_pole) and a minimum (larger than the maximum frequency). It effects the minimum flux measurement, the Rs range, many things...it's very important....but once you have a valid value you can't really make it "better". Valid is valid. Please use this post:

    http://e2e.ti.com/support/microcontrollers/c2000/f/902/t/319433.aspx

    6. try the spreadsheet first. let me know if it's not clear. But yes, for a 30 Hz motor you can design your own HW with voltage filter poles of 200 Hz. You could go down to 100 Hz, but it won't buy you anything.  I'd just use our minimum of 200.

    Your maximum speed is 30 Hz....what is your minimum speed you will operate at?  What is Bemf and Bus Voltage?

     

  • Hi Chris,

    2. I can't find USER_MAX_ACCEL_Hzps used anywhere in the codes, except assigning it to UserParams->maxAccel_Hzps, and used for error checking (introduced in Motorware v12). Can you briefly describe how this value affects startup/speed change? Can't find any reference in lab05b either.

    Since you mention this is a input to the trajectory module, does it govern the maximum difference (accel) between the trajectory speed and current speed?

  • The user.h variables are used to seed the default settings of the EST function (FAST). 

    The acceleration is then updated through a _set function. In 5b this is discussed in the lab write up and the variable is updated in a globalvariables function as a background task. 

    I'm not in front of my laptop, but search 5b for "accel" and you'll find it. 

    Accel = rate of change of the trajectory output. (used for accel and decel)