Alperen

's profile
image
Student

Born in Turkey Kahramanmaras 1993. I am an electronics design engineer/student living in Turkey. I graduated from electrical and electronics engineering at Bahcesehir University in Istanbul,Turkey. My biggest passion is precision analog circuits, but I also like embedded systems and FPGAs. My working experiences includes R&D intern engineer in a UAV company and a few failed hobby projects.


Alperen

's contributions
  • 05.31.2017
  • Double µC’s PWM frequency & resolution
  • You don't get 180° phase difference when you simply invert one of the PWM signals, instead you get PWM signals with different duty cycles which add up to 100%. That's not what I've done here. To implement 180° phase difference I just started one of the PWM signals with a delay which is equal to a half of period of the PWM. Let's say you have two PWM signals at 1kHz and you want them to have 180° phase difference between, then you simply start one of them with 0.5 ms of delay. That's how phase difference is implemented here. Inverting one the PWM is only going to achieve 180° phase difference at 50% duty cycle. If you calculate the fourier series of each PWM look at every harmonic's amplitude and phase, you'll see that odd-harmonics are of equal amplitude, but have 180° phase difference between them that's why the frequency of the ripple doubles when using two PWM with 180° phase difference because they cancel each other out due to the phase difference. Even though fourier series show you that the even harmonics also have the same amplitude, the phase difference between even harmonics is not equal to 180°, therefore there is no perfect cancellation. What I pointed out earlier in my comment was 50% PWM signal, which is basically square wave, has no even-harmonic content, and therefore the cancellation due to phase shift is almost perfect and the output is free of ripple.
  • 05.31.2017
  • Double µC’s PWM frequency & resolution
  • Correct. The output of the 180° phase shift PWM has less harmonic content. I should have pointed that out in my post. Specifically speaking, odd-harmonics are cancelled. Interesting things happens when the duty cycle is 50%. Since there is no even harmonics in a 50% duty cycle PWM signal and only odd-harmonics are cancelled, the output is really clean.