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.

Instaspin FOC Lab 5a - Running from Flash

Other Parts Discussed in Thread: MOTORWARE, DRV8301

I have tried changing the build configuration from Release (RAM) to Flash. When I remove power from the board and reapply, the software doesn't not seem to boot. I've programmed the status LED to go green on boot. Any advice on how to program the board in such a way that it can run from a cold boot from Flash?

Thanks,

Drew

  • there are some GPIO that you have to pull up to allow boot, as well as turning off the JTAG access.  If you are using a controlCARD or LaunchPad there are specific switches. Ex for TMDSCNCD28069MISO

    C:\ti\motorware\motorware_1_01_00_13\docs\boards\control\f2806x\docs\qsg_hw_cncd28069miso.pdf

    SW3: TRST/ ISO SCI communication signal enables

    Position 1:6

    ON - TRST signal from ISO JTAG circuit will be connected to F2806x. Needed during JTAG debug using ISO JTAG.

    OFF - TRST signal from ISO JTAG circuit will NOT be connected to F2806x. Needed when the application is running from flash at power up without the JTAG connections.

    You will also of course need to change your SW to handle setting some of the flags, sending commands, etc. that are done through the gMotorVars structure in the labs.

  • Thanks for the info. Could you be a little more specific when you refer to sending commands? As of now I am automatically setting the FlagEnable, Identify, etc via a GPIO button. I'm also using the speed control POT box to vary the Iq value. Are there any other specific commands I am missing?

  • sounds like you have it under control

    you will want to have access to the ForceAngle flag, or have logic in your SW that decides how to turn it off/on.  It's typicaly useful for starting FROM 0 speed, but then you want it off unless you come to a stop at 0 speed for some extended time.

    sounds like you have a traction application so let me give you some other advice

    1. in user.h update this variable

    #define USER_FORCE_ANGLE_FREQ_Hz   (2.0* USER_ZEROSPEEDLIMIT * USER_IQ_FULL_SCALE_FREQ_Hz) 

    this keeps the ForceAngle frequency 2x > the frequency where ForceAngle is active. This is critical for start-up capability (but it isn't the default in user.h yet)

    2. you are going to need a trajectory ramp for your Iq_Ref.  You don't wan to just inject a step input into Iq_Ref, especially when starting up. It's better to have a slow ramp in the Iq_Ref.  You may also want to have these settings dynamic so you can have different modes like "cruise" (slower accelerations in torque) and "sport" (faster accelerations of torque.

    3. You will probably still run into some challenges with starting up, especially with heavy load or stall condition load.  We have some help on the way which we will start rolling out in our next MotorWare release (now set for January)

  • Chris,

    Thanks a lot for your insight we are indeed working on a traction (ebike) application. I have a rudimentary start of sequence right now where a fairly high torque value (Iq) is applied until the motor starts spinning. I will definitely come up with something a lot more elegant in the future like a ramp rate. I also appreciate your comment on the USER_FORCE_ANGLE. I've tried playing with that value, but haven't found a value that helps yet. I will try using the equation above. I will certainly have to keep an eye out for that next motorware release. While we should never truly be starting from 0 RPM in this application low speed high torque is definitely important to us.

    Thanks,

    Drew 

  • Chris,

    I've now run into an issue where the motor is starting to get unstable. The motor stays stable up till around 850 hz. The motor I'm using is a low inductance (10.75e-6H) four pole PSM. It is running at around 12750 RPM ((850Hz/4)*60). Once it gets above 850 the three phase voltage waveform starts go get unstable and the RPM starts varying a lot. I've attached some screen shots to explain a little more. In my user.h file my USER_IQ_FULL_SCALE_Hz is set to 1200.0. Since I'm still below that frequency and since I still have plenty of voltage headroom (my supply voltage is 48V) I'm not exactly sure what is causing the instability. Could there be some issues with my Kp and Ki for the torque controller? Any help is very appreciated.

     

  • are you still running in 5a, just controlling torque?

    if so, my instinct would be that the current measurements are breaking down.  this can be due to the current sampling circuit, (exacerbated by the modulation index / sampling window) and the current ripple on the motor (exacerbated by the low Ls of the machine).

    you can attach your user.h and I'll take a look at a few things tomorrow. is this your own HW or one of our EVMs?

  • This is on your DRV-8301-69M-kit. I've limited the max motor current to 41.25 A since the max range on the stock dev kit is 41.25 A (to the best of my knowledge). I will grab and attach my user.h file for your reference in a couple minutes from my lab machine.

  • our DRV8301 EVM has an older layout for current sense that is noisy. You will notice we amplify the signals near the shunts then run the lonnnnng traces back to the controlCARD. This isn't good.  it is better to run the signals then amplify as close to the ADC pin as possible.

    So, with your ultra low Ls and the use of the DRV8301 EVM this doesn't surprise me.

    The thing that would help if you want to keep using this board is to add ~50uH of inductance to each phase, but you need to do this in-between the inverter and the voltage measurement and NOT between the voltage measurement and the motor.  There are some posts showing this circuit.  That will really help with the current ripple on your low Ls motor and in getting better current samples into the MCU.  Another option is to use LEM phase current sensors on your own design (but this is more expensive).  Even better is using a motor w/ at least 50uH of Ls.

    In general, doing good three phase current control is going to be tough with a 10uH motor for a number of reasons, and certainly shunt measurements will be especially challenging. Signal fidelity is key.

  • We are in the process of rewinding our motor for a higher inductance (we need more torque for our application). Is the issue with the current ripple directly related to the motor frequency and inductance?

  • Directly related to the low inductance. If you add more flux density to increase torque capability the short circuit current will increase, making things worse. 

    Getting your Ls over 50uH would help quite a bit.