Author Topic: Understanding DC-AC inverter for pure Sine PWM  (Read 1078 times)

0 Members and 1 Guest are viewing this topic.

Offline Vindhyachal.taknikiTopic starter

  • Frequent Contributor
  • **
  • Posts: 487
Understanding DC-AC inverter for pure Sine PWM
« on: March 11, 2020, 02:09:17 pm »
1. Need to design solar inverter dc to ac using pure sine wave PWM. I am reading a bit and this is what understand. I am using MCU with FPU enabled.
2. Have to change output freq from 1-400Hz(depending on user input)  & output ac voltage from 110Vac-300Vac(depending on user input)


3.  Currently i am understanding how to change freq:
a) Whatever I have read on internet is using swtiching freq 20Khz or higher for pure sine wave since its outside audible range. So i am using 20Khz here. I dont know if its ok or higher need to be selected, what is criteria for it?
Since I am using IGBT of 10Amps for application, so cannot go above 20Khz, as they have limitation of their own.
With 20Khz , PWM time period = 1/20Khz = 50us.

b) Then I read to divide sine wave into equal parts some on intenet used 100, some 200 some 10. What is criteria for it?
I am chosen 100 parts since it will divide 360 degree into 3.6 degree each.So an array of 100 values is made
arr[n] = Sin(n*Pi/180) where n varies from 0 to 99

Is it ok?
Then PWM will start with width variation and after every degree time period, corresponding PWM On time be selected, whereas PWM timer period is fixed at 50Hz so that switching freq is 20Khz always.
 

Offline schmitt trigger

  • Super Contributor
  • ***
  • Posts: 2252
  • Country: mx
Re: Understanding DC-AC inverter for pure Sine PWM
« Reply #1 on: March 11, 2020, 02:16:51 pm »
I would use an interval which results in whole degrees.
120 steps would result in 3 degree steps, and could be implemented with 7 bits.
 

Online Zero999

  • Super Contributor
  • ***
  • Posts: 19638
  • Country: gb
  • 0999
Re: Understanding DC-AC inverter for pure Sine PWM
« Reply #2 on: March 11, 2020, 03:47:02 pm »
1Hz to 400Hz is a huge frequency range. Are you sure it's really needed? 50Hz to 400Hz makes more sense, but is it really necessary to go down to 1Hz?
 

Offline Vindhyachal.taknikiTopic starter

  • Frequent Contributor
  • **
  • Posts: 487
Re: Understanding DC-AC inverter for pure Sine PWM
« Reply #3 on: March 15, 2020, 01:51:40 pm »
Thanks for responses.
I have one doubt whether to go with fixed PWM period or fixed steps/360 degree.

I was reading this: http://www.ocfreaks.com/sine-wave-generator-using-pwm-lpc2148-microcontroller-tutorial/
Here it is mentioned : "For each division we have a single PWM cycle."  So for number of steps we divide full cycle we will have fixed PWM period.

1. Suppose for ease of understanding using 50-400Hz variable.

2. I have uploaded excel file with two options: https://drive.google.com/open?id=1a_WLaLzs7RiUBYA6N0_hSOvFjJV2TrD3

Also attached pdf of same excel also
a) fixed steps 360 & keep swtiching freq variable (i.e 1 step per degree)
b) fixed switching freq(20Khz) & keep steps variable (20Khz as this is max freq for most igbt)
I prefer 4 igbt in H bridge configuration.



A) Fixed steps & keep PWM period(swtiching freq)  variable:
1. At 50hz, time period = 1/50hz = 20ms
2. If keep 360 steps fixed, then time_per_step = 20ms/360 = 55.55us/step
3. 55.55us means swtiching freq will be 18khz around.
4. But if intial freq is 400Hz, then switching freq by this calculaltions will be 144Khz, which is very high .


B) Fixed switching freq i.,e 20Khz i.w PWM period = 50us & keep steps variable
1. At 50Hz, steps will be = 20Khz/50Hz i.e 400 steps
2. Time period per step = (1/50)*1000000/400 = 50us
3. So for 50hz, need to divide into 400 steps. For 400 steps, each step sine value is calculated as in excel.
4. Now for each step, 50us PWM period is fixed, so on_time varies. As in excel it changes from 0.78us to 50us(o tp 90 degree) & cycle continues.

I am not sure if igbt can work with such low on_times?
Normally igbt have max switching freq of 20Khz mentioned, so I assume this means 25us on time and 25us off time max?

Are my calculations correct.

I have been able to generate sine wave by measuring directly at PWM output of MCU & connecting low pass filter of cut off 800hz around. Level shifted for negative cycle.

I am not sure which way is correct? Can anyone tell?
Is my understanding correct or other way to do it?


 

Offline Siwastaja

  • Super Contributor
  • ***
  • Posts: 8243
  • Country: fi
Re: Understanding DC-AC inverter for pure Sine PWM
« Reply #4 on: March 15, 2020, 03:28:46 pm »
I hope you understand what you are asking is worth writing a complete book about; or a task which requires years and years of design experience. I suggest you keep Googling reading material and go through all that, and then ask again if you have some specific detail you don't understand. Allocate at least a week or two for full-time reading. You will find the answers to your questions, but then you'll find a dozen new questions per each answerred.
 
The following users thanked this post: schmitt trigger

Offline Vindhyachal.taknikiTopic starter

  • Frequent Contributor
  • **
  • Posts: 487
Re: Understanding DC-AC inverter for pure Sine PWM
« Reply #5 on: March 16, 2020, 10:42:11 am »
By keeping fixed PWM freq 20Khz, i.e 50us time period, and variable steps to divide the sine wave i been able to generate it across MCU pin and connecting simple low pass filter, been able to generate sine wave acroos it for 50,100 & 400Hz, as in pic attached.

For example:
1. For 50hz, divide 360 degree into 20Khz/50hz = 400 steps
2. For 100hz, divide 360 degree into 20Khz/100hz = 200 steps
3. For 400hz, divide 360 degree into 20Khz/400hz = 50 steps
All caculations will be caried with FPU enabled MCU only, cortex M4.

I was reading some article on delta for carieer freq. They have default 4Khz and can go to max 15Khz.



Now I have some doubts:
1. Currenlty i am able to generate sine wave as desired but on MCU only. is it correct way to do that?

2. If it is, then next step is to select igbt of 20Khz switching freq. But have doubt that on_time varies from 0 to 50us? Can igbt work when on_time is near zero?
For example for 50Hz, PWM period is fixed 50us(20Khz), on time varies from 0 minimum, then next minimum is 0.78566us. SO can igbt turn on at this low time? Datsheet specify only 20Khz switching freq max. But i dint find minimum allowable on_time/off_time?

3. For initial for safety, will start with low voltages like 24Vdc and gradually increases to 220Vmax.

 



 

Offline schmitt trigger

  • Super Contributor
  • ***
  • Posts: 2252
  • Country: mx
Re: Understanding DC-AC inverter for pure Sine PWM
« Reply #6 on: March 16, 2020, 04:50:48 pm »


2. If it is, then next step is to select igbt of 20Khz switching freq. But have doubt that on_time varies from 0 to 50us? Can igbt work when on_time is near zero?
For example for 50Hz, PWM period is fixed 50us(20Khz), on time varies from 0 minimum, then next minimum is 0.78566us. SO can igbt turn on at this low time? Datsheet specify only 20Khz switching freq max. But i dint find minimum allowable on_time/off_time?

 

Would you kindly attach the datasheet for the IGBT?
 

Offline Vindhyachal.taknikiTopic starter

  • Frequent Contributor
  • **
  • Posts: 487
Re: Understanding DC-AC inverter for pure Sine PWM
« Reply #7 on: March 18, 2020, 11:01:53 am »
Need to drive a 3 phase induction motor.

Delta vfd page attached, default carrier is 4Khz only. But why is that so? Wont it create audible noise more?





With current setup with MCU I am able to genearte sine PWm from 50-400Hz without issue. 

But now i need to vary amplitude also of output from 110Vac-300Vac? How to do that? Will that by same formula for sine wae?
y= Asin(angle) ?? current setup I have taken A=1in formula. 

Will varying A will vary amplitude also?  I have tried it , it seems to work. But  I am not sure if that is ok or not or this is how its done in vfd's??





 

Offline Ground_Loop

  • Frequent Contributor
  • **
  • Posts: 651
  • Country: us
Re: Understanding DC-AC inverter for pure Sine PWM
« Reply #8 on: March 18, 2020, 12:42:20 pm »
I would think that applying an fixed offset to the duty cycle with appropriate filtering would allow for varying the voltage.
There's no point getting old if you don't have stories.
 

Offline Siwastaja

  • Super Contributor
  • ***
  • Posts: 8243
  • Country: fi
Re: Understanding DC-AC inverter for pure Sine PWM
« Reply #9 on: March 18, 2020, 01:10:40 pm »
OH, this isn't a "pure sine inverter" - it's a motor controller! Quite a different beast:
* Motor controller doesn't need a filter network - the bridge drives the motor directly,
* Motor doesn't want or need pure sine. Quite the opposite, methods such as Third Harmonic Injection are sometimes used to improve DC link voltage utilization
* Motors are quite insensitive to harmonics, ripple, noise, etc.
* You want to implement motor-control specific algorithms (like FOC), which include rotor speed approximation.

Everything's quite different from an inverter designed to power general purpose loads.
 


Share me

Digg  Facebook  SlashDot  Delicious  Technorati  Twitter  Google  Yahoo
Smf