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.

TMS320F28377D: Is it possible to detect the phase of a square wave with PLL module?

Part Number: TMS320F28377D
Other Parts Discussed in Thread: CONTROLSUITE,

Hello,

      I am trying to synchronize phase value for 2 controller boards with TMS320F28377D. What I am doing now is generating a sine wave by signal generator and using PLL module provided in ControlSuite for both controller boards to detect the phase of the sine wave. It works well now but I wonder if I could replace the sine wave by a square wave and using PLL to detect the phase information? Thank you for help!

  • Lee,

    Are you trying to run both the controllers boards with the clock phase synchronized with input sine wave from signal generator using PLL? I am still not clear, on what phase information you are gathering by using PLL.

    In terms of input signal to PLL, it does not matter if it is Sine wave or Square wave, it will align the System clock phase with the input signal.

    Regards,

    Nirav

  • Hi Nirav,

        What I am doing now is generating a sine wave of 100Hz from signal generator and input this signal to both DSP boards and use single phase PLL to obtain phase of the sine wave. By 'phase', I mean a sawtooth waveform representing 0 to 2*pi angle. In this way, both DSP will obtain the same angle value for some synchronization control I will do.

       Now I am wondering if I can output a 100Hz 50% duty square wave from the signal generator, and obtain the sawtooth wave representing 0 to 2*pi with any of the TI macro?

  • Hi Nirav,

        Sorry for the confusions. Let me make this clear.

        1. I am using a signal generator outputting 100Hz sine wave which is sampled by my DSP through ADC ports. The sampled sine wave is then processed by SPLL_1ph_SOGI block as described in 'Software Phase Locked Loop Design Using C2000™ Microcontrollers for Single Phase Grid Connected Inverter'. The output 'theta' of the block is what I referred to as 'angle/phase information' in my previous posts. So if this angle value is shown by a DAC, that will be a sawtooth wave representing 0 to 2*pi.

       2. I designed my own controller board with TMS320F28377D.

       3. I do not mean the PLL used for system clock synthesizing . Sorry for this confusion too.

       So My question is : is it possible to replace the 100Hz sine wave from signal generator by a square wave of the same frequency and obtain the 'theta' of that square wave by any of TI blocks?

      Thank you!

  • Lee,

    the theory of SPLL is based on sine wave,

    we have not tried it with a square wave,

    we do have an app note with matlab code, that you can try to see if that would work.. but you are in uncharted territories..

    www.ti.com/.../sprabt3.pdf
  • I guess it might work because square wave in nothing but a combination of harmonics of the fundamental.. but i think there might be some noise or error .. you will need to simulate and check..
  • Hi Manish,

        Thank you. I can't find any method of detecting phase of a square wave, there is something called' All Digital PLL' used to construct a square wave based on the input square wave, but I just guess it is not quite possible to implement with a DSP.