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.

Query related with sensor FOC.

Other Parts Discussed in Thread: TMS320F28069F

Dear all,

I am using TMS320F28069F controller and motorware13 example lab2a and other labs implementation in my custom board for AC induction motor 415V/50Hz system.

I want to implement with sensor FOC in insta spin. How can I use? Or any reference? There is no example code for sensored FOC for x28069F.

Thank you.

  • Labs 12 and 13 under instaspin_motion use an encoder. Give that a try.

    -Jorge

  • Thanks jorge,

    Lab 12 & 13 have spintac library for motion, so can i merge this for FOC?

  • Absolutely, the encoder interface as it is used in labs 12 and 13 can also be used in any of the instaspin_foc labs, you would need to add enc.c and qep.c to your projects, and pretty much have the same ENC_x function calls as in lab 12 but in the instaspin_foc labs. Also in the project properties you need to add a definition of "QEP" as it is done in instaspin_motion projects that use an encoder.

    -Jorge

  • Thank you jorge,

    I added enc.c and qep.c file in my FOC project. Still I have to add below files and function in main_ISR and main()?

    spintac_pos_conv.h, slip.h, spintac_vel_id.h and other spintac related files

    /////////////////

    void main(void)

    { // initialize the ENC module

    encHandle = ENC_init(&enc, sizeof(enc));

    // setup the ENC module

    HAL_Obj *hal_obj = (HAL_Obj *)halHandle;

    ENC_setup(encHandle, hal_obj->qepHandle[0], 1, USER_MOTOR_NUM_POLE_PAIRS, USER_MOTOR_ENCODER_LINES, 0, USER_IQ_FULL_SCALE_FREQ_Hz, USER_ISR_FREQ_Hz, 8000.0);

    // initialize the SLIP module

    slipHandle = SLIP_init(&slip, sizeof(slip));

    // setup the SLIP module

    SLIP_setup(slipHandle, _IQ(gUserParams.ctrlPeriod_sec));

    // initialize the SpinTAC Components

    stHandle = ST_init(&st_obj, sizeof(st_obj));

    // setup the SpinTAC Components

    ST_setupVelId(stHandle);

    ST_setupPosConv(stHandle);

    }

    interrupt void mainISR(void)

    {

    // Run the SpinTAC Components

    if(stCnt++ >= ISR_TICKS_PER_SPINTAC_TICK) {

    ST_runPosConv(stHandle, encHandle, ctrlHandle);

    ST_runVelId(stHandle, ctrlHandle);

    stCnt = 1;

    }

    if(USER_MOTOR_TYPE == MOTOR_Type_Induction) {

    // update the electrical angle for the SLIP module

    SLIP_setElectricalAngle(slipHandle, ENC_getElecAngle(encHandle));

    // compute the amount of slip

    SLIP_run(slipHandle);

    // run the controller

    CTRL_run(ctrlHandle,halHandle,&gAdcData,&gPwmData,SLIP_getMagneticAngle(slipHandle));

    }

    else {

    // run the controller

    CTRL_run(ctrlHandle,halHandle,&gAdcData,&gPwmData,ENC_getElecAngle(encHandle));

    }

    }

  • Any one have idea about this thread?

  • For sensored induction motor control you need some software that can estimate the amount of slip in the motor.

    This capability is provided by the SpinTAC Position Converter.  So you would need to include spintac_pos_conv.h in your project.  

    The estimated slip is provided to the SLIP module that will calculate the magnetic angle of the induction motor.  You would also need to include slip.h in your project. 

    I don't think you would need spintac_vel_id.h in your project.  That component is only used to estimate the amount of inertia in the system.

  • Thanks Adam,

    Based on your suggestion i implemented spintac for sensored in my FOC project. It worked.

    but i faced one problem. I implemented field weaking example in my sensorless FOC for ACIM. it works fine. but same can not work for sensored. Motor is hunting in field weaking zone in sensored FOC. So is any change for sensored?

  • What do you mean by hunting in field weakening zone?  Are you implementing field weakening while the motor is holding zero speed?  Or is the motor oscillating around the goal speed when spinning faster than rated speed?  

    If it is oscillating when at field weakening speeds you should try decreasing the speed loop gain.