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.

Motor Control and PFC Control Developers Kit

Hi,

 

I am currently using the Motor Control and PFC Control Developers Kit kit to achieve speed and position control. I wish to use the F2808 control card with the above kit which is supplied with a F28035 control card. I wish to use the Ecaps on F2808 control card for position sensing. I am trying to figure out what changes I need to make to the examples supplied with the kit to enable the ecaps on the 2808.

 

I am wondering if I need to make any changes to the 2xPM_Motors-DevInit_F2803x.c

Also is there a source file for Initializing the Motor Control Dev Kit for use with the F2808 control card.

 

 

-Manas

  • Manas,

    I will answer your question and give comments one by one below:

    ----

    I am currently using the Motor Control and PFC Control Developers Kit kit to achieve speed and position control. I wish to use the F2808 control card with the above kit which is supplied with a F28035 control card. I wish to use the Ecaps on F2808 control card for position sensing. I am trying to figure out what changes I need to make to the examples supplied with the kit to enable the ecaps on the 2808.


    > Unfortunately, there has not been a port of the F2808 to the "Motor Control and PFC Developer's Kit", although much of this project's code can be used.  The current Digital Motor Control library (http://focus.ti.com/mcu/docs/mcuorphan.tsp?contentId=51397) supports the F2808 and this could be used instead as your base project or as a good reference for porting the existing 2xPM_Motors project to the F2808.  As you are likely aware, if your motor has an encoder, it may be more useful to use the F28035's QEP peripheral which can be used to sense position/speed.

    I am wondering if I need to make any changes to the 2xPM_Motors-DevInit_F2803x.c .  

    > I would recommend taking a look at the FlashingLEDs-DevInit_F280x.c file that should exist at "C:\TI_F28xxx_SysSW\FlashingLeds".  You would then need to redefine the functionality in this file to match the 2xPM_Motors-DevInit_F2803x.c

    Also is there a source file for Initializing the Motor Control Dev Kit for use with the F2808 control card.

    > Editing the DevInit file should take care of most of the initialization required for the controlCARD.  The other pieces of the project that would need to be edited would be:

    • You will likely use a 100MHz clock frequency for the F2808 instead of the 60MHz clock frequency on the F28035.  Since the PWM periods are based off of the system clock, the PWM periods would need to increase to keep the PWM switching frequency at 10kHz or whatever speed your project requires. Any other peripherals based off the system clock would also need to be slightly edited.
    • The ADC peripheral is different between the F2808 and the F28035.  It will be useful to use the F2808 digital motor control library as a reference here.


    Thank you,
    Brett

  • Brett,

    Thank you for the reply. I am sure it sheds some light.

    I am aware of the QEP capability of the board. However my application requires me to use hall effect sensors for position measurement. The 28035 contains only 1 ECAP module and I need 3 to estimate the position within 120 degree accuracy, hence the 2808 control card.

    I wish to know if any of the motor control examples supplied with the 2808 motor control library would work directly with the motor control pfc kit?

     

    Thank you,

    Manas

  • Manas,

    If your application is BLDC, it may be possible to use GPIO inputs to sense the Hall Effect sensors.  You would then poll a series of GPIO in the ISR to move the control to the next PWM sector.  I assume that your application is permanent magnet synchronous, but I thought I would list that option here for others.

    Unfortunately, I don't believe we have an example that has the F2808 on the Motor Control + PFC kit.  Porting will be necessary. Some notes:


    Thank you,
    Brett

  • Hello Manas

    As Brett mentioned in many cases polling GPIO may be sufficient for a BLDC trapezoidal control. However, depending on your maximum speed you may run into some issues with polling and in those cases if you have to use interurpt driven technique then you may consider configuring  regular GPIOs to receive external interrupt. In this configuration one Hall will use  capture and the remaning two Halls will use regular GPIO with external interrupts. Some time back I used this configuration to operate a small BLDC drive around 40KRPM. By the way, if you are operating at a high RPM then interestingly you may actually get better performance with a sensorless algorithm than hall based implementation.

  • Arafeen,

    Thank you for your reply. I am aware that the Sliding Mode observer provides sufficient performance at higher RPM, however my application needs calibration of the motor at lower speeds. I would like to be able to control the position at a lower rpm. The motor needs to reset to a predetermined  position.

     

    -Manas

     

  • Thanks for the clarification .. by the way what level of position resolution are you looking for? I am assuming you will run some sort of extrapolation between two Hall transisitons as at low speed 120 degree spacing of Hall signals may not provide enough resolution. Or may be you will have an encoder - if it is okay I am interested to know more about your motor calibartion concept.

  • Arefeen,

    Let me explain:

    The motor is fixed to a 23:1 gear head. This means for every 120 degree motion of the rotor shaft, the gearhead shaft would rotate around 5.2 degrees. This accuracy is acceptable for my application.

    Depending on the hall sensor outputs which I will feed to the ECAP modules, I would know exactly in what sector the motor is and implement control. The ECAP's on the 2808 give a 10-ns time resolution. This should be sufficient.

    -Manas

  • Arafeen,

     

    I wish to know what is the transfer function model used to obtain the PID gains on the 2xPMSM example in the Motor control kit examples bundle.

     

    I wish to go a step further with the control algorith.

     

    -Manas

  • Hello Manas

    Sorry, I am not familiar with this code but assuming the documentation describes the transfer functions. I am sure TI team will clarify.

  • download and install the DMC Library

    http://focus.ti.com/docs/toolsw/folders/print/sprc215.html

    look here

    C:\tidcs\DMC\c28\v32x\lib\doc\pid_reg3.pdf

    for documentation on the PID module.

     

    BTW - we are working on a clean-up, optimization, and overall better user experience with the DMC software. You'll see part one in January :)

     

  • Chris,

    Thank You.

    Well I am aware of the documentation on the DMC lib. What I meant was what BLDC model has been used during the controller design process for the Anaheim Automation BLY172S-24V-4000 motor.This transfer function would have been used by the TI team to obtain the PID gains.

     

    -Manas

  • Manas,

    For the most part we tune on the fly, but we do have an old spreadsheet that we used for much of the original PID work

    I had to find it...it was buried!  We need to get some of these things pulled into a new DMC revision.

    Install the old F24x PMSM3_2 http://focus.ti.com/docs/toolsw/folders/print/sprc109.html

    look here

    C:\tidcs\DMC\c24\v31x\sys\pmsm3_2\asm\pid.xls

    and you'll see the equations we used.

  • Hi all,

    In the Motor Control kit mentioned above, there is this line in 2xPM_Motors-Settings.h:

    #define BASE_FREQ       200            // Base electrical frequency (Hz)

    Can some explain what the base_freq term is, and how it is derived? I believe it can be used to calculate max RPM, but somehow, it's derivation eludes me. I am trying to port the F28035 code to F28335.

    Thanks,

    Tim

  • I am not familiar with the latest example code but most likely base frequency is utilized for per unit calculations so that all items can be kept in percentage instead of absolute value. This will make code more portable and easier to modify. There must be good reasons to select 200Hz as the base frequency which only TI folks can clarify.