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.

Using example 5g on instaspin

Other Parts Discussed in Thread: MOTORWARE

Hi,

I am trying to use the fpu32 library on the instaspin control card. I am using this program on some hardware that I have made myself. I have already run the other experiments (2a, 5a etc) on this setup and am running into problems with the program 5g and 2d.

When the system flag and the Motor identify flags are set and the controller tries to estimate the motor parameters, the voltage output is a PWM wave with 50% duty cycle. Hence no current flows. I have checked the values read by the controller in gAdcData.V and g.AdcData.I and both these show 0, even though the values in the ADCRESULT registers are updated correctly.This happens through the Rs calculation and the Ramp Up states after which there is an error and the system flag is set to 0.

I am using the 6.1.5 compiler and the rts2800_fpu32.lib runtime support library. I am have made only a few changes to the existing example program and these changes have caused no problems when I ran the examples 2a etc. 

Can someone please tell me what I am doing wrong.

  • Udai,

    You are using CCSv5.5 aren't you?

    I agree, 5g from MotorWare_1_01_00_09 isn't functioning with CCSv5.5. 

    I'm using CCSv5.5, and first I tried to build with 6.1.5, f28069F_ram_lnk.cmd, and rts2800_fpu32.lib.

    Then I tried 6.2.3 and same.

    Then I tried CCSv5.4 with TI v6.1.2 and it worked as expected.

    So this looks like the linking order issue that we recently identified in CCSv5.5 for the FPU library.  The fix for this has to be done on our MotorWare project side to specify the order of linking for the various libraries. We are making these project updates for revision _10 which releases November 7th, but in the meantime here is what you need to insure:

    If using CCSv5.5 with MotorWare _09, you must fix the order of linking so that:

     rts2800_ml.lib  is linked in before 2806xRevB_FastSpinROMSymbols.lib

     

    Just tried this with 5.5 and 6.2.3 and it worked!

     

  • Hi Chris,

    Thanks! It worked. I just had another question I hope you can help me with.

    During the learning process in the estimation of Rs and Ls, the learned value depends greatly on the value selected for USER_IQ_FULL_SCALE_VOLTAGE_V. 

    For example, I have used a 300V power supply and the voltage sensing circuit is configured such that USER_ADC_FULL_SCALE_VOLTAGE_V is 604V. For different full scale voltage values (say from 400 to 1200V) I get different values for Rs (from 6.5 ohm to 3.5 ohm where the DC resistance of the winding is 6 ohm per phase)

    There is a small amount of noise on the measurement circuit but it is not large enough for the kind of variation we are seeing.

    I have not been able to understand why this is happening.

  • Udai,

    This is your own HW design?  You say you are measuring 604V full scale at the ADC, this is actual bus voltage that your inverter supports?  Your motor requires near 600Vdc?

    Can you tell me more about the USER_MOTOR settings you are using for ID (like RES_EST_CURRENT) vs. the rated current of the motor?

    What is the range you are getting for Flux and Ls?

    Perhaps posting your updated user.h file would be most helpful.

    The USER_IQ_FULL_SCALE_VOLTAGE_V varaible is the most critical variable in the system, but it has the most effect on flux identification.

    Rs estimation should be extremely consistent as long as the current injection isn't over heating the wiring. This is usually only an issue for very high short circuit current motors (low inductance) which have very small no load currents but very high peak currents.  For  a high voltage / low current motor It is very concerning that you are seeing such a delta.  I would be very suspect of your hardware sensing/scaling/feedback.

     

  • Hi Chris,

    Yes, we made the hardware to support a system where the ADC full scale voltage is 604 V. Currently we are testing this system with a much smaller PMSM motor and running it with a DC bus voltage of 300V. I was wondering if the reduced resolution could be a factor.

    I am posting the user.h file. The flux varies between 0.018 V/Hz and 0.036 V/Hz.

    I had considered measurement noise being the reason for this variation but I could not understand how the full scale voltage could have such an impact on the Rs measurement even with the noise.

    1460.user.h

  • Udai,

    Here are some comments for your user.h

    • your max Hz is only 200, for 4 poles this is 6 KRPM max. Is this correct for your motor?
    • even if you take your max flux of 0.036 V/Hz, at 200 Hz that is only 7.2V maximum from your Bemf generation. This is VERY small flux for a high voltage motor, especially when you are looking at 604V at your ADC and using an IQ scaling of 400.  Your resolution is VERY poor. I don't think you will be successful with this 300V motor on 600V HW scaling. You are using only the bottom half of the ADC for the bus, and the Bemf is going to be a very small resolution.  You can try to reduce your IQ_VOLTAGE lower but it won't help much since the inputs are still low resolution.
    • On that note, your IQ_VOLTAGE needs to be < Flux * FAST Frequency
      • You had FAST frequency set at 20/3....first, change this to 20/2 for 10 KHz effective.
      • That means IQ_VOLTAGE > 0.036 * 10K = 360 V
    • Your ADC scalings are whole numbers...are you sure on this? It should be specific as possible to the HW circuit
    • Change USER_NUM_PWM_TICKS_PER_ISR_TICK    to 2 and yoru SPEED and TRAJ to 10. This will put PWM at 20 KHz, main ISR tick at /2 = 10, estimator and current control at 10, and speed and trajectory at 1 KHz.
    • USER_MOTOR settings for the active My_Motor_Sync
      • Is this a 10A motor? You have RES_EST_CURRENT at 1.0A
      • You have the max current at 5A.  If it is a 5A motor you should reduce your RES_EST_CURRENT to 0.5-0.8 A
      • Your EST_FREQ is too low, increase to 20 Hz (10% if your 200 Hz is correct) for better flux and Ls measurements
    • You didn't post your Ls. What is it?
    • Is = Flux / 2pi / Ls = ?  For a 5A motor with 0.036 V/Hz flux I'm expecting Ls of about 0.0005 H
    • But this would give an Rs / Ls of 3 / 0.005 H = 6 KHz, MUCH too high for this motor
    • A more reasonable Ls for a 200 Hz 3ohm motor would be 6mH. With 0.036 flux this would be a <1A capable motor though....

    The parameters of this motor don't make much sense if it's supposed to be a 4 pole 200 Hz 5A machine.

     

     

  • I made a mistake, the value I gave for flux was the value for Ls.

    1. The flux is approx. 1~1.1 V/Hz. Therefore the maximum BEMF is 220V.

    2. USER_FULL_SCALE VOLTAGE<Flux*20000/(3*0.7) = 10,476 V 

    3. I_s is calculated to be approx. 4.8 A. (flux/2*pi/Ls)

    I will try some of the changes you suggested. On the basis of these new values is there anything you see that is going wrong?

    Sorry for the mix-up.

    Udai

  • ok, those numbers make more sense.

    1. please change the ticks as I suggested so that you are using 20 KHz PWM, 10 KHz interrupt/control/estimator, and 1 KHz speed/traj.

    2. Lower your RES_EST_CURRENT.  It seems like you may be overheating this low current motor. I would try 0.4 A as this setting.  

    2a. Your HW scaling isn't great for this motor, you're using +/-20A and only the very low end of that scale. Same for voltage, you are looking at 600V with 300V max, not ideal.