Continue to Site

Welcome to EDAboard.com

Welcome to our site! EDAboard.com is an international Electronics Discussion Forum focused on EDA software, circuits, schematics, books, theory, papers, asic, pld, 8051, DSP, Network, RF, Analog Design, PCB, Service Manuals... and a whole lot more! To participate you need to register. Registration is free. Click here to register now.

[Moved]: DC-AC inverter design problem

Status
Not open for further replies.

powergeek

Newbie level 1
Joined
Feb 20, 2016
Messages
1
Helped
0
Reputation
0
Reaction score
0
Trophy points
1
Activity points
29
Hello.

I am working on a dc-ac inverter. My setup is as follows: I have a DC battery of 48 volts from which I want to generate a 24V sin wave of with a 50Hz frequency. My design is a microcontroller based design where I'm using an STM32F4 type uC. I have 4 transistors (along with a driver that drives them) that make up my H-bridge. Unipolar PWM modulation is used as the switching scheme with an intended switching frequency of 10Khz. The uC is driven by an external 8MHz crystal oscillator and internal circuitry is used to do obtain a system clock of 168MHz. Timer 1 in PWM mode 1 running in up-down count mode is used to produce the outputs necessary to drive the transistors. Timer 1's advanced features such as complementary outputs and deadtime (600ns) are utilized to generate the signals to drive the transistors. The timer interrupt is entered on an overflow/underflow, however the outputs driving the transistors are updated only on an overflow event. A sin lookup table made of 200 points (100 us * 200 = 20 ms = 1/50Hz) cover a whole sin cycle of 50Hz with unity amplitude. On every overflow interrupt a new point from this sin table is obtained and is used to update the compare values as following:

Code:
CMPR1 = TIMER_PERIOD/2 + amplitude_required*sin_table[counter]*(TIMER_PERIOD/VDC);
CMPR2 = TIMER_PERIOD/2 - amplitude_required*sin_table[counter]*(TIMER_PERIOD/VDC);
counter = (counter + 1)%200;

For now VDC is a constant value of 48 volts and amplitude_required = 6. TIMER_PERIOD is set to 8400 since the timer has a clock frequency of 168MHz and is running in up-down count mode (achieves 10Khz PWM switching).

I also have a lowpass LC filter at the output of the full bridge with a cutoff frequency of 4 KHz.

Now here comes the problem that I can't find a logical explanation for.
I am able to obtain the required sin wave with the required frequency and the required amplitude however there are other (more than one) frequency components sitting above and
below the fundamental 50Hz. To be more specific, I can see large components (however smaller than the one of the 50Hz) around 46Hz and 54Hz (+/- 4 Hz above and below the 50Hz) after the LC filter. Those were observed on an FFT spectrum. However observing the signal before the LC filter, I was observing more frequency components above and below the 50 Hz. I couldn't also find a logical explanation to why those components were unseen after the lowpass LC filter!

The switching frequency was also observed to be 10KHz on the output of all the pins of the uC and on the input of the gates of the transistors. I would also add to this that the sin wave lookup table was obtained using MATLAB. The following statement basically fills up an array of size 200 that contains sin wave points separated by 100 us.

Code:
sin_table =sin(2*pi*50*(0:199)*100E-6)

Thank you very much for your help!
 
Last edited:

Status
Not open for further replies.

Similar threads

Part and Inventory Search

Welcome to EDABoard.com

Sponsor

Back
Top