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.

TMS320F28335 sensor-less control processor utilization

Other Parts Discussed in Thread: TMS320F28335, CONTROLSUITE

Hello, I am investigating using the TMS320F28335 for sensor-less control of a BLDC motor. My question is, since this processor can support driving two motors, will the sensor-less control take up too much processor time? I am currently running two BLDC motors using sinusoidal commutation with sensor feedback and the processor utilization is around 50%. Now, there are also some other computations, error checking and communications going on inside the DSP at the moment, but how much utilization can I expect from two sets of transforms? Is there a good way to estimate the load of the sensor-less controls on this processor?

Thank you for you time!

  • from the doc here

    C:\ti\controlSUITE\development_kits\HVMotorCtrl+PfcKit_v2.1\HVPM_Sensored_Servo\~Docs

    a standard encoder based position --> velocity -> torque FOC --> SVPWM takes about 700 CPU cycles.  That is based on the torque control at 10 KHz and the velocity/position at 1 KHz.

    700 cycles at 6.6ns (150 MHz CPU clock) is 4.6usec.   10 KHz is 100usec, so about 5% of the processor per axis.

    In high end position control systems you may see effective rates of 8 KHz on the position/velocity and 16 KHz on the current.  Assuming you have quite a bit of other things that happen at some layer of the interrupt (more calculations, averaging, etc.) hitting 50% wouldn't be too surprising.

  • Sorry, I commented on SENSORED since I saw that was what you were using.  Sensorless will take a bit more cycles of course. A good rule of thumb is about as many cycles for the sensorless observer as for the forward control.

    You can certainly do 2-axis sensorless velocity + torque on an F28335.  We do it on 60 MHz F2803x+ devices with eSMO and 90 MHz F2806x devices with InstaSPIN-FOC.

  • Thank you Chris for your fast response. What is the load on both of the applications that you mention? Are these two applications only spinning motors? Is there a CLA in the 28335 or is that part of the compiled software? When you say "a bit more cycles..." is there a known amount of cycles it takes to process the transforms? Does the frequency or update rate of the pwm affect how the transforms are processed since I would assume that every pwm cycle a new position is calculated? Does a low pwm rate (5kHz) allow more time to process the velocity and torque vs a fast pwm (10kHz)?

    Thank you for your help!

    David

  • The #s I gave are for the motor control kernel only. Anything you add will be on top of that, but most system code doesn't need to run at any given interrupt rate, it can just be executed in the background task whenever the core interrupt returns.  In control applications your MIPS usage is dominated by the periodic fastest interrupt plus other sub-frequencies of control (ex: running velocity/position every 10th time you run the current).

    dridgway said:
    Is there a CLA in the 28335 or is that part of the compiled software?

    The CLA is a parallel CPU available on certain devices (F2803x, 5x, 6, 37x) it is not on F2833x

    dridgway said:
    When you say "a bit more cycles..." is there a known amount of cycles it takes to process the transforms

    This is from the documentation at

    C:\ti\controlSUITE\development_kits\DRV8312-C2-KIT_v128\PM_Sensorless\~Docs

    dridgway said:
    Does the frequency or update rate of the pwm affect how the transforms are processed since I would assume that every pwm cycle a new position is calculated?

    The frequency effects how much time you have each interrupt, it doesn't effect the cycle count of the operation. If your control loop interrupt takes 5000 CPU cycles and your PWM frequency is 20000 CPU cycles, you are using 25% of the available MIPS (regardless of MHz of the device).  If you then increase the frequency so you only have 100000 CPU cycles, you now use 50% of the available MIPS.

    dridgway said:
    Does a low pwm rate (5kHz) allow more time to process the velocity and torque vs a fast pwm (10kHz)?

    The calculations take the same amount of time regardless, the change will be the effective interrupt loading will double moving from 5 to 10 KHz, meaning you have less time for background tasks (comms, system state machine, etc.).

    you can read through here:

    http://processors.wiki.ti.com/index.php/TMS320C2000_Motor_Control_Primer

  • Wow! Really good information, thank you! In looking at eval boards to purchase there are some that are InstaSpin - motion and InstaSpin - FOC, what is the difference between these two options?

    Thanks!

    David

  • David,

    This is explained here

    www.ti.com/instaspin-foc

    and then you can click on MOTION

     

     

    InstaSPIN-FOC is primarily a sensorless (FAST observer) for Torque control, with a simple PI velocity controller included.

    InstaSPIN-MOTION builds on top of -FOC with the SpinTAC Suite.  SpinTAC Suite allows for inertia/friction ID, simplified and improved mechanical tuning (velocity and position), on-chip motion profile generation, and a motion state machine planning.  InstaSPIN-MOTION can be used for

    - sensorless (FAST) velocity + torque control (FOC)

    - sensored (encoder/resolver) velocity + torque control (FOC)

    - sensored (encoder/resolver) postion+velocity + torque control (FOC)