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.

TMS320F28069F: Issue with current sense and offset calculation

Part Number: TMS320F28069F

Hi all,

I have a custom inverter using TMS320F28069F, code almost identical to lab 11a, and 3 LEM current sensors, which have zero current at 1.65V on ADC. Our system is high current, so motor is designed for 200Arms and has current sensors with a linear range of +-375A. However their full scale ADC range corresponds to 1075A, (+-537A), but the far extents of this range are not guaranteed to be linear.

I have therefore set the ADC full scale current to 1075A. According to application notes, I set IQ full scale current to 538A. These values now saturate the default IQ range, so I set GLOBAL_Q to IQ21 to represent up to 2048.

There is strange behavior with current readings in gAdcData.I . Setting all offsets to 0.0 to start, two of the current sensors always appear as expected with value of 1 pu (corresponding to zero current after offset is considered), and the third one has strange behavior reporting -2 pu when no current flows through sensor. Because we verified all 3 ADC counts being correct, I think the error is likely in IQ setup or ADC to current calculation.

Separately, we found that to use the LEM current sensors from other forum threads, we needed to configure them to be consistent with negative feedback amplifier current shunt measurement and have done so.

Any help would be appreciated. Thanks!

Will

  • 1. You can't change the GLOBAL_Q, it must be IQ24 always. And you don't need to change it for any maximum current if you don't convert the PU value to real current in your project.
    2. The sign of read current is based on the LEM sensor and its connection.
  • Yanming said:
    1. You can't change the GLOBAL_Q, it must be IQ24 always. And you don't need to change it for any maximum current if you don't convert the PU value to real current in your project.
    2. The sign of read current is based on the LEM sensor and its connection.

    Thanks for your reply. We saw same issue when we had default setting of IQ24. We physically wired the phases and set the current sensors to be consistent with the direction of positive current for a shunt current measurement as implemented in the Instaspin labs for 8305 dev kit.

    I forgot to mention this in original post:

    The 1st strange behavior is as I mentioned, where if we command offfset calculation, we get offsets of -2, 1, and 1 pu. The -2 pu value makes no sense - all three sensors are wired the same physically through the phases and we verified that all three read the correct ADC reading of ~2048 ADC counts when zero current flows through sensors.

    The second strange behavior we are getting is this. We have the 3 current sensors on the 3 phases (and number of current sensor is configured to 3 in user file). Then we pass a wire through all of the 3 current sensors in the positive current direction for each sensor.  We then run 16A through this wire. When we look at the ADCRESULT register group, we see that all 3 ADC counts are very close and correspond to correct physical value for current. When we look at gAdcData.I.value and *manually set offset* to 1.0 pu, we see that they correspond to +32A, -16A, and -16A, respectively, which is nonphysical because they run in the same direction and have same current. These values were calculated by hand outside of Instaspin from the pu values stored in gAdcData.I.value.

    It's my understanding that  the only computation that happens to these signals between ADC count seen in ADCRESULT register and assignment to gAdcData.I.value  occurs in the HAL_readAdcDataWithOffsets(), and example is as follows:

      // convert current B
      value = (_iq)ADC_readResult(obj->adcHandle,ADC_ResultNumber_2);
      value = _IQ12mpy(value,current_sf);
      pAdcData->I.value[1] = value;

  • I also wanted to add a couple more details.

    The greater problem I'm trying to troubleshoot is inability to start the motor. The motor I'm using was previously identified using the launchpad and 8305 booster board and control (speed, current) worked fine with no modifications to lab 2a and lab 5 code.

    On the new inverter, the issue we are having when running lab 11a code is that the motor oscillates with and without forced angle enabled. We have verified that voltage sense is accurate and working for all three phases and DC bus voltage. Therefore we turned to checking out the current sense circuity, where we saw the issues described above. It looks like Instaspin is doing an A+B+C=0 calculation even though it has access to the three phase current sensors.

  • This turned out to be a problem with current resolution. The inverter is meant for high current traction motors, and since we were testing at no load, we had almost no resolution on current since internal ADC is only 12 bit, and full scale range on high current sensors was 1080A. The issue was resolved when we replaced the design current sensors with ones with much lower range.

    Shoutout to Dave Wilson at Kappa Electronics for pointing us in the right direction!