Hi Sougata,little more hepl.
Dear Sougata,
It was a great help indeed.
C-sinewave has lots of info.
However I would like to know little back ground.Thewre are three tables used ,one for sine wave,one reference sine wave and one error/delta correction.I was not able to understand how he arrive at those tables and the values in the tables.Little more deep in to back ground would probably a great help.
thanks very much,
Added to previous question!
Also I would like to know what is the nominal DC volatge used.in that scheme.
I am a little off the track at this moment
Hi Mincing,
I am sorry I need to put some time and scratch my head to explain the C code. Currently I am a bit involved in some projects (pulling my hair almost always :D) But here is a crude explanation.
For a simple proportional control system the PWM for the sinewave for the current pointer is looked up and the previous PWM is used with the feedback to determine the error. Thus before the current PWM is made through it is corrected for errors by proportionally modifying it.
Since for your system the max PWM is 255 (8bits) you cannot scale it up any more so your maximum gain is 1.0. Means your hardware should be able to step up the voltage and provide the current at maximum load, minimum permitted input supply. Now what we found in using the 16F is that the multiplication routines were not fast enough (18F has got a hardware multiply) to be calculated on the fly and still leave room for other tasks such as AC Restore Sense (F/V permit), Batt-low sense (+ Indication), PC communication, Overload (Thermal/Power) and Fault sense. So what we did was implement a pseudo hardware PWM. We used the compare in 16 bits and used the High Byte from the sinetable and lowbyte from the error computation. Now we find that PWM results are unsatisfactory. So we decided for lookups table that contains some precomputed results for current and voltage. This speeded up the whole thing but we lost resolution. However for a domestic inverter it was acceptable as the regulation were within specs. I am sorry I cannot reveal any more details.
So far you have not posted any codes and thus I cannot help you on your code.
We (Me and Pramod) are planning for a dsPIC based inverter for the next season and if that happens as a reality then we may release the old code to public. No promises however at this moment.
Best of Luck
It is the carrier PWM Frequency
Hi,
You are using a lookup table to modulate a carrier frequency (The PWM). In analogue world this is AM. But the pronciple here is of a class D amplifier. That is your switches are either off/on and not working in the linear region. You can use any frequency thats twice (nyquist) the output frequency mulitplied by the resolution (steps) of the lookup table. Your output transformer and parallel resonant capacitor forms a filter to integrate the modulated PWM into a sinewave. Normally the PWM is kept higher than 20KHz to reduce audible noise in the transformer. While keeping it lower has a certain advantage of lower switching loss.
sinewave ups design required
if any one willing to share pic based sinewave upscum inverter design can plz contact me
Without schematics, Code no suggestions
Hi Mincing,
Sorry for the late reply. I really do not get time (or get into weired problems) to log into this forum. Without specific details about your circuit like schematic, code it is impossible to suggest anything.
Devloping programm for square wave inverter
[QUOTE=sougata;35864]Hi,
I am devloping a proogramm for inverter,but i need some helps, More over i have devloped the programm on theory.but in practical i have some problem
i have genrate 50 Hz frequency by a loop and delay.Out Put is Ok but when put load about 100 wats on it
the output voltage go down more tahn 40 volts.
Please help me to do it in write way, I am the lerner and new in the are of pic programming.
Please helps me
You need to have a closed loop control
Hi,
You need to modulate your sinewave according to a modulation index (that increases decreases the output voltage) derived from the error. Inititally a proportional error scheme is okay to experiment with later can add up to PID. In addition you can do a point by point correction to lower distortion. In 16Fs multiply is not supported in Hardware thus a different approach may be taken. Use a sliding lookup table. Here you have more number of points in the lookup table than regular 32/64 points. However it should be a single quadrant lookup table. Now if the resolution of the lookup table is increased you can have a sliding index (according to error) to have voltage correction without much software overhead.
2 Attachment(s)
firmware code for pic18f252
since no one would review my c-code on this subject, ih have decided to modified suogata bacis code on sine wave inverter thread. i am using PIC16F72 for the evaluation because that is the processor that is readily available with me now.
The picbasic iam using is the pro demo version and so i appriciate that i can't run a code more than 31 command line.however upon trying to compile the code ,the following erros are reported:
1: Error line 116 :redefinition of label T0CON
2: Error line 119: bad expression
3: Demo limit of 31 command line exceeded (this is understood)
pls, can any one fix these problem for me?.
(a): With the way the modified code stands,can it generate two complimentary sine pwm signals DRIVE1& DRIVE2?.if yes how do i include a delay routine of about 470ns for dead-time control between the two signals?
(b): If the code cannot generate the two complimentary sinepwm signals what do i do to fix the stuff?.
regards,
babalola.
That code was meant for the 18 series
Hi Babalola,
The routine I posted uses the FSR0 indirect addressing method which is not available in the 16F72. 16F72 has a single FSR register so it would be a different implementation. With Anded outputs steering the PWM should not be difficult. You can use the same phase drive signal to drive the upper MOS so only the lower MOS would be switching with your PWM.
With 20MHz clock each of your instruction takes 200nS. So servicing the interrupt, (All MOS turned off within it) and then fetching the lookup table from PBP and switching as per system flag is quite some DEAD TIME . Another way of steering the PWM is using Four Buffers each connected to individual PIC ports and 4 nos of 4.7K resistors from the PWM pin to the four ports. So you get the following output;
1. PORT pin floating (Z, as input) = PWM
2. PORT pin LOW = LOW
3. PORT pin high = High
Since you are using a demo version of PBP, I would try to find some time to get some portions compiled for you. However I am a bit stuck and behind schedule in one of my projects. So please hang on...
Anybody else out there to help... Please do.
firmware code for pic18f252
I have found that 16f72 has only FSR(at addr. 04,84,104&184h).from the datasheet,could that be the reason for the errors?.implementing this seems a tedious task for me as a beginner in basic and i need further help. can't the anded schematics attached to my last post do the steering?. from what i understand by using four ports with buffers to steer the PWM would mean configuring the four ports as input permanently, is it? i will appriciate the compile portion so that i can use scope to verify the PWM outputs.
babalola.
Trying to answer your queries
Quote:
Originally Posted by
babalola
I have found that 16f72 has only FSR(at addr. 04,84,104&184h).from the datasheet,could that be the reason for the errors?..
Seems so
Quote:
Originally Posted by
babalola
implementing this seems a tedious task for me as a beginner in basic and i need further help.
This forum is the best place for PBP+PIC
Quote:
Originally Posted by
babalola
Can't the anded schematics attached to my last post do the steering?
Yes, I only suggested another option.
Quote:
Originally Posted by
babalola
From what i understand by using four ports with buffers to steer the PWM would mean configuring the four ports as input permanently, is it?
Not really. Having the ability to use the Hardware PWM and general I/O (for experimenting with softpwm, perhaps) without changing your circuit can be beneficial during development
Quote:
Originally Posted by
babalola
I will appriciate the compile portion so that i can use scope to verify the PWM outputs.
Hope I find some time for it.
firmware code for pic18f252
Sougata,
Thanks for your explicit response, i will continue to work on way out of the code problem while also hoping that someone else could offer a clue.
Regards,
Babalola.
Proble in chagrging section
Quote:
Originally Posted by
sougata
Hi PICers,
I want to design a 24V DC to 50Hz/240AC power inverter. My choice of PIC is the 18F452 (HWPWM). But I am not sure whether the ADC conversion time would be short enough for dynamic correction.
Any thoughts
Regards
Sougata
The Andig Technologies
Hi sougata,
i wants to devolope a programm for inverter which will suitable for microtek square wave inverter, i have done the invertring section,overload section and battery low section,but there was problem with the charging section.
in the circuit mains Freuency sample is avilavle at portc.
in our programm having the vivration at the time of charging.
Hence it is request to u that pl help me and give the write logic for charging section.
Thanking u.
Pranav.
Inverter H-bridge snubber by MINCING
Quote:
Originally Posted by
mincing
Thanks a lot for the reply,Walcura.
However I can manage snubber calci for Flyback and other SMPS.My problem is with inverter H-bridge snubbers.
Please give any info. if you have or find somewhere.
regards
Hello Mincing !
It is probably too late for an answer, but i am new here. Anyway if you still have the problem with Snubber, you could try the following paper, which in my concept is very good. In fact it is for IGBT´s protection but it can give you some help. It is supposed that MOSFETs do not require Snubber networks meanwhile they have peak diode recovery dv/dt > 3 V/ns, but i am not completely sure about this statement.
Good Luck.
Snubber considerations for IGBT applications.pdf
http://www.irf.com/technical-info/designtp/tpap-5.pdf
2 Attachment(s)
Sine Wave Inverter Spikes problem
Hello everybody !
I have been working with an inverter prototype 500 VA 24Vdc / 120 Vac 60 Hz, H-Bridge single-phase, Mosfet Switches IRF8010 VDSS 100V - dV/dt 16 V/ns, 2 Mosfets in parallel per Switch. The system runs controlled by means of a PWM 3.72 kHz generated by a Microchip PIC 16C74. The DC voltage source (A standard rectifier, Diode bridge + Capacitor), is connected to the H-bridge inverter by means of a duplex 12 AWG 0.9 meters length cable. Probably due to this cable inductance, the DC voltage at the inverter bridge has some spikes with short duration and high amplitude. I have tried to reduce these spikes with 2 electrolytic capacitors 330 µF 160V in parallel (C4), located at the H-bridge DC voltage entry, and it seems to reduce the Spikes quantity, but not the spikes amplitude.
Questions:
1) I have not used Snubber Networks for these switches because it is supposed Mosfets do not required them. Am i wrong , are the Mosfets subject to High risk in this case with these spikes ?
2) The noise caused by these spikes also can affect the control system performance. Could you please give me any suggestion to eliminate or at least reduce these spikes ?
Attached you can find the H-Bridge circuit diagram, and the obtained signals for a resistive 100W load connected to the HV side of a Step Up transformer 13.6/120 V.
Thanks for your comments.
Inquiries regarding Sinewave Inverter
Hi everybody,
I am a new comer in this forum. I have followed all the postings regarding sine wave inverter as I am interested in it. I am trying to make sine wave inverter of 600va. I made boosting section with sg3525 to convert 12v battery voltage to 350v dc with feedback. I used 100 kHz freq. with etd39 core. I also made battery charging section with separate ferrite core etd34 with 132 kHz freq. I want to make 350v dc rail to 230v AC with full bridge configuration and with pic 18f 1320/4550. While making this section, I am facing problem and invite suggestions regarding these.
In full bridge circuit, upper 2 N channel Mosfets require virtual ground and so keeping those 2 on for 10msec is difficult and hence if I keep the lower mosfet on and upper one pwm-ed with 50kHz, is there any problem?
Which driver is useful for driving mosfets in full bridge configuration?
I have made the sine table and will test soon and hence suggestions are invited urgently.
Hope to get suggestions from you all.
With thanks.
1 Attachment(s)
The following links may help