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.

Best way to achieve 2 pwm outputs with 180degrees of phase difference

Other Parts Discussed in Thread: TM4C1294NCPDT

Hello,

As I understand from the datasheet of the tm4c1294ncpdt, it has 4 pwm generator with 2 outputs each. 

I currently need to use them in such a way that I can control two outputs with the same duty cycle (which is below 50%) to work specifically with 180 degrees of phase difference. Since I'm controlling a half bridge converter, I need to make sure that whenever I change the duty cycle the change is made on both outputs at the same time, so I don't lose synchronization.

What is the best way to achieve it? Should I use two generators or can I do it with 2 outputs of the same one?

Thank you very much

  • Hi Leonard0o
    Just as an other forum post is asking very same question and provided a few lines of configuration.
  • Leonardo Muricy said:
    specifically with 180 degrees of phase difference. Since I'm controlling a half bridge converter, I need to make sure that whenever I change the duty cycle the change is made on both outputs at the same time, so I don't lose synchronization

    180 degrees apart or complementary outputs? The comment about 1/2 H suggests you actually want complementary outputs not 180 degree separation. (With 180 degree separation both can be on or off at the same time).

    Robert

  • Hi Robert.
    Actually in my case I want 180 degree separation, with the duty cycle always below 50% (so the switches won't work at the same time). To use them on complementary forms I'd need to control the phase separation with a constant duty cycle, I believe, which is not my case (I'm really controlling the duty cycle).
  • That's a really odd use case. What are you trying to do Leonardo?

    If it were motor control or power supply use you'd use complementary waveforms.

    Robert
  • It's a DC-DC converter. I've done a lot of pscad simulations with it and it works fine, as long as I keep the duty cycle below 50%. When the outputs are not complementary you have 3 states: one with S1 on, one with S2 on and one with both switches off. That creates a square wave on the transformer in such a way that as you increase the duty cycle you reduce the 0V stage and increase the DC voltage at the rectified secondary side of the transformer, therefore controlling the output voltage.
  • Why would you not use complementary forms?

    Robert
  • If I did what kind of benefits would I have? Although I guess the microprocessor setup would be easier
  • Also fewer losses in the power devices and you'd lose the 50% limitation.

    Why be different unless there is an advantage?

    Robert
  • Just because I had tested before the phase shift controller on pscad and I got worse efficiency than with half bridge with duty cycle control.
    I really don't want to change too much my project because it's a very big one and it's almost on a prototype situation. Is it possible to use complementary form and still use duty cycle control?
  • As opposed to? Maybe something like PFM? Certainly there's no reason not to use PWM unless you are using very small duty cycles.

    Robert
  • You do have to have a deadband so you are not turning on one side of the 1/2 while the other is still turning off Quite doable in H/W but I belive the processor also provides a deadband.

    Robert
  • As opposed to a phase shifting zero voltage control method.
  • May I register Vote #2 for poster Robert's, "Use complementary PWM." It will prove greatly helpful if you have a scope and can monitor the 2 outputs from a single, PWM Generator.
  • Thank you for your help. I'll evaluate the situation and see if it's possible to change the project for complementary waves.
  • Robert Adsett said:
    You do have to have a deadband so you are not turning on one side of the 1/2 while the other is still turning off

    It is usual that the Power FET gate drivers (also) employ HW logic to prevent both (high & low) side FETs being ON together.  And the MCU does include programmable, dead-band control - as one extra measure of precaution...

  • If you are changing the switching point based on the current feedback I'm not sure that PWM makes sense in any case. Also not sure why it would be incompatible with complementary waveforms.

    Robert
  • Leonardo Muricy said:
    I'll evaluate the situation and see if it's possible to change the project for complementary waves.

    It may make sense as a simpler starting point in any case. Find most of your problems before dealing with simultaneously varying duty and frequency.

    Robert

  • Not an uncommon configuration 2 PWM modules phase shifted H bridge yet it is most efficient 4 FETS  constant 50% duty with dead band protection. Perhaps Piccolo may use the term module versus TM4C generators.

  • That's a full bridge not a 1/2 bridge, a rather different setup. It also uses complementary drive waveforms.


    Robert
  • And isn't that the best way to achieve an 180 degree phase shift as the poster had requested "What is the best way to achieve 180 phase shift two PWM outputs?"

    Poster also mentions desired his model testing zero voltage switching (ZVSFB) -- seemingly only achievable Full H bridge with fixed 50% duty cycle.

    Half model is claimed possible TM4C1294 but I wouldn't trust the dead band generator after filming random undesired FED pulses on the rising edge pwmA. Perhaps as CB1 stated the FET driver with dead band could better protect the 1/2 H bridge but then again that model wouldn't be ZVS.

    Recall Tivaware text suggest some MCU's have dual PWM modules and perhaps could be made to sync update from PWM0 CNT0 pulse and load PWM1 comparator B 180 out of phase much like the Piccolo F280x easily achieves.   

    After all the desire is for clean sounding water falls without any random PWM noise producing poor DC or random FET burn outs on full H bridge startup. That seems the draw back of ZVSFB (startup) and special dead band precautions must be adhered to during FET IAS periods.