Do you know how an inverter gives us a high voltage alternating current from a low voltage direct current? Let's first consider how an alternator produces an alternating current.
In its simplest form, an alternator would have a coil of wire with a rotating magnet close to it. As one pole of the magnet approaches the coil, a current will be produced in the coil. This current will grow to a maximum as the magnet passes close to the coil, dying down as the magnetic pole moves further away. However when the opposite pole of the magnet approaches the coil, the current induced in the coil will flow in the opposite direction. As this process is repeated by the continual rotation of the magnet, an alternating current is produced.
Now let’s consider what a transformer does. A transformer also causes an electric current to be induced in a coil, but this time, the changing magnetic field is produced by another coil having an alternating current flowing through it. Any coil with an electric current flowing through it will act like a magnet and produce a magnetic field. If the direction of the current changes, the polarity of the field changes.
Now, the handy thing about a transformer is that, the voltage produced in the secondary coil is not necessarily the same as that applied to the primary coil. If the secondary coil is twice the size (has twice the number of turns) of the primary coil, the secondary voltage will be twice that of the voltage applied to the primary coil. We can effectively produce whatever voltage we want by varying the size of the coils.
If we connected a direct current from a battery to the primary coil it would not induce a current in the secondary as the magnetic field would not be changing. However, if we can make that direct current effectively change direction repeatedly, then we have a very basic inverter. This inverter would produce a square wave output as the current would be changing direction suddenly.
This type of inverter might have been used in early car radios that needed to take 12 volts available in the car and produce the higher voltages required to run radio valves (known as tubes in America) in the days before transistors were widely used.
A more sophisticated inverter would use transistors to switch the current. The switching transistors are likely to be switching a small current which is then amplified by further transistor circuitry.
To get a sinusoidal alternating current from the output of our transformer, we have to apply a sinusoidal current to the input. For this we need an oscillator.
An amplifying transistor can be made to oscillate by feeding some of the amplified output back to its input as positive feedback. We will all have heard this effect at some time when someone is setting up a PA or microphone system. If the microphone is too close to the speaker, some of the output from the speaker is fed back to the microphone and inputted to the amplifier again. The result is a howling sound.
The positive feedback in an electronic circuit can be tuned using extra components to produce the frequency we require (generally either 50 or 60 cycles per second to mimic mains electricity). If a crystal is used to control this frequency, as in a battery watch or clock, the frequency can be very accurately controlled.
As with simpler switching transistor circuit, the oscillator will be producing a low current output. This will then need to be amplified by what will be roughly equivalent to a powerful audio amplifier to produce the high current for the primary coil of the transformer (the frequency of mains AC current is roughly equivalent to the lowest notes on a bass guitar).
The transformer, while being very useful, does not do something for nothing. While increasing the voltage, the current will be reduced, and the power (voltage x current) will stay the same (less any inefficiency of the transformer). In other words, to get 1Kw of high voltage AC current out, you have put 1Kw of low voltage AC current in.
If the above example were a grid tied inverter, is able to feed power back into the national grid, it would need to use a sample of the mains voltage to then be amplified within the inverter, or to synchronize the oscillator with that sample.
Grid tied inverters will also sense if there is a "power cut" and disconnect themselves from the grid. If they did not have this facility, in the event of a power cut, your inverter would be attempting to power all your neighbors’ houses and would present an electrocution risk to anyone working on power lines that had supposedly been turned off.