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.

F28M36H53C2: SPLL phase jump detection

Part Number: F28M36H53C2
Other Parts Discussed in Thread: C2000WARE

Hello,

I am working on a PFC application and I would like to understand if there is an easy way to check the error between the phase of my input sine wave and the SPLL output.
I am working in floating point and I have noticed that the phase detection is implemented using the cos output.

I had a look at https://e2e.ti.com/support/microcontrollers/c2000/f/171/t/488937

but this could not help me. Basically I would like to understand if there is any way to detect a phase jump between two subsequent ISR events.

I thought to check if the difference in the output theta is larger than a given threshold but to me this sounds too simple and I fear that I am missing something.

Any help on this would be really appreciated.

Thanks in advance,

Claudio

  • do you want to detect phase jump condition? I am not exactly sure what physical phenomena you want to detect. 

  • Hello Manish,
    Yes I would like to be able to understand that the phase had a shift greater than a tollerance threshold. Most probably I should monitor the output theta but I am not sure this is enough.
  • Hello Manish,
    Sorry to bother you once again.
    I would say that the answer to your question is yes I would like to be able to detect phase jump conditions, Is it possible to do it using the SPLL SPLL_1ph_F_FUNC? It would be of great help if you would be able to provide any feedback on this.

    Regards,
    Claudio
  • Claudio,

    You can look at the loop error input term, that is representative of a phase jump, but it is not the only reason that can cause it to change.

    I have used this term is some projects to detect phase/ frequency jumps i.e. AC transients.

    www.ti.com/.../tidm-1007
  • Manish,

    Tank you for your inputs. I had a look at your code for tidm and in particular at \C2000Ware_DigitalPower_SDK_1_00_00_00\solutions\tidm_hv_1ph_dcac\source\gridconnectedinvlclfltr\source\gridconnectedinvlclfltr.c

    And I could see that in there a variable called Phase_Jump is declared and used under certain conditions the only problem is that i was not able to understand where it is initiliazed.

    if(Phase_Jump==1)
    {
    	rgen1.out+=(float)(0.25);
    	if(rgen1.out>(float)(1.0))
    		rgen1.out=rgen1.out-(float)(1.0);
    		Phase_Jump=0;
    	if(Phase_Jump_Trig==0)
            Phase_Jump_Trig=1;
       else
            Phase_Jump_Trig=0;
    }

    By the way if my understand is correct and reading at the documentation in solarLib you are telling me to work on the notch filter output because they represent the difference between the two theta. Thank you very much it was of great help.

  • The code you are referring to is used to test the PLL, by imparting an artificial phase jump ,

    it is used in build level 1, it is not phase jump detect..

    the place where we use loop filter input variable to detect phase jumps is below, but as i mentioned it would detect any type of transient not just phase jump

    #if SPLL_METHOD_SELECT==SPLL_1PH_SOGI_SEL
    SPLL_1PH_SOGI_run(&spll1,ac_vol_sensed);
    spll_sine=spll1.sine;
    spll_cosine=spll1.cosine;
    if(fabs(spll1.ylf[0]) >2.0)
    {
    if(ac_vol_sensed>0.0)
    {
    ac_sign_filtered=1;
    }
    else
    {
    ac_sign_filtered=0;
    }
    }
    else
    {
    if(spll1.sine>0.0)
    {
    ac_sign_filtered=1;
    }
    else
    {
    ac_sign_filtered=0;
    }
    }

    acSinePrev = acSine;
    acSine = spll_sine;
    #endif

  • Thanks for your support. That was of great help!