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.

FOC Current Model Module

Other Parts Discussed in Thread: CONTROLSUITE

In build level 4 of the Sensored FOC guide, the current model is to be verified. It states (page 31):

-Compare Curmod1.Theta with rg1.Out via PWMDAC or CCS graph window. They should be identical with a small phase shift.

This was not the case for me. At a speedRef of .25 PU (Base Frequency = 120), rg1.Out was 30 Hz, but cm1.Theta was 45Hz.  Similarly, at speedRef = .3 PU , rg1.Out was 36Hz. , and cm1.Theta was at 50Hz. At speedRef = .4PU, rg1.Out was 48Hz, but cm1.Theta was 60Hz. This was all measured using the PWMDACs and a scope.

It seemed as I increased the speed, the error between the two decreased, but was still off significantly. Also of note were the strange 'blips' that showed up in cm1.Theta on the CCS graph. That is, there would be a normal looking triangle wave, with a random 'half triangle' or a very distorted triangle appearing somewhere in the graph. I can post a screen shot of this if needed.

There isn't really anything said in the FOC document about how to correct this... it just states to verify it. Any help would be appreciated.

Thanks!

  • Here are a few visuals.

    The blip in cm1.Theta

    cm1.Theta and rg1.Out @ speedRef = .3PU

  • Mike,

    The issue you observed in CCS graph is looks like a triggering issue and I dont think it is real. Double check the PWMDAC to see whether it is real or not.

    Regarding the other issue, make sure that you do not saturate PIDs, apply high enough voltage, apply high enough IdRef/IqRef, or try to find a good combination of IdRef,IqRef and Vref while observing the PID outputs in the watch window. Since the speed loop is not closed you have to do these manually. If you have already tried Level 5 and it works ok, you can neglect this step.

    Reagrds

    Bill

  • Bill,

    Thanks for the response. I played around with these parameters without getting too much of a change. I'll list what I have here hoping you can tell me how much further to push some of these parameters.

    Motor Ratings:

    30VAC 4A/ph 130 watts 

    The power supply I'm using goes up to 30 VDC, and that's what I've been setting it at. 

    // Define the base quantites for PU system conversion
    #define BASE_VOLTAGE 24.5 // Base peak phase voltage (volt)
    #define BASE_CURRENT 5 // Base peak phase current (amp)
    #define BASE_TORQUE // Base torque (N.m)
    #define BASE_FLUX // Base flux linkage (volt.sec/rad)
    #define BASE_FREQ 120 // Base electrical frequency (Hz)
    IdRef = .15 (increased to .4--started knocking)
    IqRef = .30 (increased to .5)
    VdTesting = .2 (increased to .4 - no effect)
    VqTesting = .2 (increased to .4 - no effect) Are these what you meant by Vref btw?
    Kp = 6 (decreased to 1 - made pid1_id.Fdb more unstable)
    Ki = .015 (increased to .02 - not much effect)
    
    
    I tried level 5 just to see if things were 'okay', and they certainly were not. As I was increasing the DC bus voltage, it started drawing 5A (the current limit) at about 10V, and the motor wasn't even trying to spin. At 30V, still no hint of spinning.
    Any other suggestions are welcome.
    
    
    Thanks again,
    Mike
  • I found a 'fix' for this problem. That is, I'm not sure how valid the approach was, but the waveforms ended up looking correct. I multiplied my base inductances by a factor of 7, and that seemed to decrease the frequency of cm1.Theta to a reasonable level.

    #define LM   	(7.07e-3) *7				// Magnatizing inductance (H)
    #define LS (9.3e-4 + LM)*7 // Stator inductance (H)
    #define LR (9.3e-4 + LM)*7
    I am still failing miserably on level 5, however. The motor will not spin at all, and draws the max amount of current from the power supply. Any help on getting level 5 working after having level 4 work fine would be appreciated.
    Thanks,
    Mike
  • "I am still failing miserably on level 5, however. The motor will not spin at all, and draws the max amount of current from the power supply. Any help on getting level 5 working after having level 4 work fine would be appreciated."

     

    I'm having the same problem. There is any solution?

    Thanks in advance,

    Matías

  • welcome to tuning two current loops while unsure if the feedback is giving you good data!  The joy of sensorless control.

    It will be almost impossible to help you debug this over a forum...I would recommend that if you are still interested you should at least try the latest Enhanced SMO version from TMDSHVMTRPFKCIT in controlSUITE.  And if you are already frustrated I would highly recommend the InstaSPIN-FOC solution that is available on multiple hardware platforms.  All of what you guys have been struggling with is already done automatically based on the ID'd parameters.