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.

Loaded start: Injecting into D-axis

Hi,

not too happy with my current method of starting a motor on a skatebaord. currently in an open loop i send very high PWM in with acceleration, then use flying start to switch to FAST. It's not a very flexible method to start, and is sometimes giving me unexpected behavior like locking up etc. The flying start is just very hard to get right. So I'd like to try the standard force angle method. And to do it right, I need to align the wheel on the skateboard while under the load of a person. The skate board has enough power to take an adult uphill, so available power itself should not be an issue.

from reading sphruhj and and some post on this forum, my understanding is that i need to align the wheel by injecting power purely to the D-axis for some time, before ForceAngle comes into effect and hands over to FAST. (This means that force angle always starts at the same angle, corresponding to the D-axis, correct?) Functionally i have done that, and with little load it works fine. However, not under human weight. So i think what I need to do is have control over the magnitude of PWM signals during D-axis injection and ForceAngle.

I have EST_setMaxCurrentSlope_pu to 127.99

To increase the PWM while in forceAngle, i have this in the interrupt

if ( EST_getForceAngleStatus(obj->handle){

gPwmData.Tabc.value[0] = _IQmpy(gPwmData.Tabc.value[0] , _IQ(1.3)) //etc.. for the remaining lines

what I cant figure out is how to do something similar for the D-axis injection and alignment phase. I dont know how to test for being in RrRecalc, and beside it seems wrong to manually overwrite PWMwrite vaules while doing RsRecalc. I think i need to figure out ho to do alignment without RsRecalc. It's also limiting that RsRecalc only happens during initiation.

So in terms of gPwmData.Tabc.value[0]  , gPwmData.Tabc.value[1]  , gPwmData.Tabc.value[2]  , what does injection into D-axis look like?

  • lui kawasumi said:

    This means that force angle always starts at the same angle, corresponding to the D-axis, correct?

    Yes, but as the user's guide explains in section: "14.4.2.2 Fastest Motor Startup with Full Load with Motor Alignment Example" of SPRUHJ1F, use RsRecalculation for that, so it starts with angle of zero after injecting Id.

    lui kawasumi said:

    So in terms of gPwmData.Tabc.value[0]  , gPwmData.Tabc.value[1]  , gPwmData.Tabc.value[2]  , what does injection into D-axis look like?

    Injecting Id can't be controlled purely with writing directly to PWM duty cycles. It is in fact controlling Iq to zero and Id to a value, so as you can imagine, is part of a closed loop current control, which involves constantly updating duty cycles. As mentioned in the previous point, please use Rs recalculation. The advantages of that is not only injecting Id to align the rotor, but also, to start up the motor with the best knowledge of Rs, which is critical for a successful startup. One parameter you might need to tune is the amount of current used for Rs recalculation. This is because you need enough current to align the rotor even when there is load, so the current needs to be high enough. So increase the value of

    #define USER_MOTOR_RES_EST_CURRENT

    Until the motor actually aligns with the maximum load. Once you get this current right, follow the steps described in section 14.4.2.2 of SPRUHJ1F.

    -Jorge

  • Jorge,
    ah i see, thanks i will test USER_MOTOR_RES_EST_CURRENT.

    1)does this affect ForceStart as well? If not, is the method of manually increasing gPwmData.Tabc.values acceptable? Or would this simply be set by user motor max current, thought I already have that maxed out to what the hardware allows


    2)Now the tricky thing code wise is, how can i go about calling RsRecalc whenever I want? This operation happens based on a flag and only once during initiation. I cant seem to find a simple function call for it. I dont want to do this by leaving the motor run or system run loops, and then going back. I want to continue to track the motor, with PWM off, so that if the board is already in motion (skateboard) i go straight to flying start rather than lock up with rsRecalc.

    3) 4.4.2.2 of SPRUHJ1F suggest changing rampUp and Fine, but does not mention Coarse stage of RsRecalc. Is that a part of RsRecalc that is no longer used? or should I adjust that as well, to get RsRecalc operation time to as short as I can get it 

    thanks for your help!

  • lui kawasumi said:

    1)does this affect ForceStart as well? If not, is the method of manually increasing gPwmData.Tabc.values acceptable? Or would this simply be set by user motor max current, thought I already have that maxed out to what the hardware allows

    No, this only affects motor alignment. Yes, you could do your own manual forced angle. Please disable forced angle that's used for InstaSPIN if you are doing your own.

    lui kawasumi said:

    2)Now the tricky thing code wise is, how can i go about calling RsRecalc whenever I want? This operation happens based on a flag and only once during initiation. I cant seem to find a simple function call for it. I dont want to do this by leaving the motor run or system run loops, and then going back. I want to continue to track the motor, with PWM off, so that if the board is already in motion (skateboard) i go straight to flying start rather than lock up with rsRecalc.

    What I suggest is to run the observer before enabling PWM outputs, to see if the motor is moving to a minimum frequency of say, 2 Hz. If not, re-start motor with Rs recalculation, locking the motor into alignment. If the motor is moving fast enough, then enable flying start, without motor alignment.

    lui kawasumi said:

    3) 4.4.2.2 of SPRUHJ1F suggest changing rampUp and Fine, but does not mention Coarse stage of RsRecalc. Is that a part of RsRecalc that is no longer used? or should I adjust that as well, to get RsRecalc operation time to as short as I can get it 

    Coarse is only used during full motor ID. When doing Rs recalculation, only Fine is used. Sorry about the confusion, but section 14.4.2.2 is only a subsection of the chapter I wanted to suggest, which is 14.4.2, but I think you got the point.

    -Jorge