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.

Eval Board PID Difference: Standalone vs. Emulation

I'm using the f28027 controlCARD on the experimenter's kit with a strange issue.

 

I've written a PID program, and we can easily tune the gains using the watch window.  When we're satisfied with the gains, I initialize the constants and run the program again in emulation with the same results.

 

However, when I switch from USB to external power on the experimenter's kit to run the program in standalone mode, the PID behaves differently.  At first, I thought the emulation mode might have been slowing it down, but I've observed a digital output pin that is used for a square wave output (not an ePWM, but software controlled frequency) and this output is the same frequency in both cased.

 

For proportional control only, my system goes unstable for Kp gains over 270 when connected to CCS by USB.  But in standalone mode the Kp value to cause instability is closer to 430!  It's quite a difference.  I believe all breakpoints are removed, though sometimes I get errors when toggling them.

 

Is there some normal difference between running in standalone mode vs. CCS that is causing this?  Or is my CCS install possibly corrupted?

  • I found the problem, but not the exact cause.

     

    Power Supply Switch on Experimenter's Kit Makes the Difference

    "ON" (external) vs. "USB" changes behavior

    When I ran the code in CCS emulation mode, the difference was in which power supply I used to power the Experimenter's Kit board.

     

    With CCS controlling execution, I had different values of the PID controller to cause instability depending on if I had the Experimenter's Kit toggle switch on the USB side to power the board from the USB versus set to use external power from my target product's power supply ("ON position for power toggle on the Experimenter's Kit evaluation board).

     

    When I run the board in standalone mode - disconnected from the USB - I get the same PID gain constants when running in standalone as I do when running in CCS with the external supply powering the board.

     

    I'm still not sure as to why this difference exists though.  Could the USB power not be supplying a necessary current for my product, which is causing differences in PID control performance?

  • what are you controlling with the PID and how is it powered? certainly if it's power switching and the bus voltage is markedly different then the PI control could behave differently.

  • We have a 5V supply in the product that powers the evaluation board through the DC jack.  It's a linear regulator though, not switched mode.

     

    From what I gathered online, a USB port coming from a computer (not a powered hub) generally has 500mA max current, which is the max rating for the 5V regulator too.

     

    The circuit the PID is controlling is a current sensor.