Hi,
First off, very sorry to hear about your power line problems going off quite a bit, i know how troubling that can be because we had a bad storm here recently and we were without power for 4 or 5 days and nights. So i understand where you are coming from.
There are some problems though, and that is that when you use a 1000 watt inverter for an hour that means you need a battery set that can put out 1000 watts for an hour. You probably realize this. And that means you could be dealing with 100 AHr battery sets. It's possible but it wont be super cheap.
You live in Iran, not by choice, well i live in US also not by choice. It's funny that if we subtract all the governments we all becomes friends
Also to note that building one of these units may take some time for testing and making sure certain things work properly. The last thing you want to do is find out that it fails when you need it most. But there are important safety issues too that go beyond the usual home electronics project. One of these is that when dealing with the testing of these units parts can draw huge current levels and literally blow up like "ash cans" or very big fire crackers. And when they blow they shoot out hot molten metal in every direction as well is sharp bits of plastic or ceramic. And the electrolytic caps also can blow up for various reasons, sending chemicals spewing in all directions. It's not pretty at all and is very dangerous to humans standing nearby. Safety goggles and even a body shield is always necessary and very intense care when making measurements because the unit could be working fine one minute and then a second many of the parts blow up. So you really do have to be very very careful. You have to be aware every second during testing that the high current parts could explode any second. I've seen it happen wayyy too many times in manufacturing plants.
Direct DC to synthesized AC is almost the same as DC to DC when using a transformer, but the difference is that the pattern of transistor switching is changed to reflect a changing output DC level that is really the AC now. So with a DC to DC you have a constant (say) 100v output, but with a DC to AC you have DC output that is first 0v, then maybe 10v, then maybe 20v, then maybe 40v, then maybe 70v, then 100v, then back to 70, then back to 40, then 20, then zero, then -20, then -40, then -70, then -100, then -70, then -40, then -20, then back to zero and that's one complete AC cycle. So you are really making the "DC" change levels all the time. In fact, doing it in steps like that is one way to do it. But with PWM a simple strategy is to make the average PWM signal equal to the average AC at that point in time over the entire cycle. Because we use a circuit like "E" in the drawing (which is just called a full bridge) we can actually make the output go negative as well as positive. Of course this means we get an AC output and of course we dont use rectifier diodes because we dont want DC we want AC output directly.
So for the DC output we use a constant switching pattern, but for the AC output we use a changing pulse width that varies like a sine wave (the widths that is).
There is quite a bit of theory on this but the simplest explanation is that the average of the PWM matches the average of the sine wave at certain points in time. We choose some number of points like 10 per half cycle, then try to keep the sine average correct at those 10 points in time for both halves of the cycle. The result is a sine wave that is fairly clean and the more points we use the cleaner it gets. There's a limit, but that's another story.
A real simple example with just five pulses per half cycle, at 50Hz:
Each half cycle is 10ms long, and we have:
The sine of 30 degrees is 0.50,
the sine of 60 degrees is 0.87,
the sine of 90 degrees is 1.00,
so if we make the pulse at 90 degrees equal to 2ms then we make the other pulses:
00 degrees: 0.00*2ms=0ms
30 degrees: 0.50*2ms=1ms
60 degrees: 0.87*2ms=1.74ms
90 degrees: 2ms (1ms either side of 90 degrees)
and then repeat that for the other half of the half cycle at 120, 150, 180 degrees.
So you see from this rough example that the pulse widths change over the time period of one cycle.
The output filter can then be a small inductor and capacitor set.
You may not need that many switch pulses either, depending on what you intend to drive with this inverter.