Linear alternator
A linear alternator is essentially a linear motor used as an electrical generator. An alternator is a type of alternating current (AC) electrical generator. The devices are often physically equivalent. The principal difference is in how they are used and which direction the energy flows. An alternator converts mechanical energy to electrical energy, whereas a motor converts electrical energy to mechanical energy. Like many electric motors and electric generators, the linear alternator works by the principle of electromagnetic induction. However, most alternators work with rotary motion, whereas linear alternators work with linear motion (i.e. motion in a straight line). Theory
A linear alternator is most commonly used to convert back-and-forth motion directly into electrical energy. This eliminates the need for a crank or linkage to convert a reciprocating motion to a rotary motion in order to drive a rotary generator. Air compression generator 
Mainspring Energy's linear generator uses a flameless reaction to efficiently convert chemical-bond energy into electricity. It is compatible with various fuels, including ammonia, and biogas, and hydrogen. The commercial device is double-ended. A translator on each end equipped with permanent magnets moves back and forth between the reaction chamber and a fixed-dimension box that functions as an air spring. Stationary copper coils surround each translator, forming a linear electromagnetic machine (LEM). Air and fuel are introduced into the center reaction chamber. Energy stored in the air springs from a previous cycle compresses the mixture until a flameless, exothermic reaction occurs. The reaction pushes the translators back through the copper coils, producing electricity. This motion recompresses the air springs, readying the system for the next cycle. Byproducts are water, nitrogen gas, and other substances. The reaction requires no spark/ignition source. A 115 kW machine extends 5.5 meters and is about 1 meter in diameter. Applications
The simplest type of linear alternator is the mechanically powered flashlight (shake type). This is a torch (UK) or flashlight (USA) which contains a coil and a permanent magnet. When the appliance is shaken back and forth, the magnet oscillates through the coil and induces an electric current. This current is used to charge a capacitor, thus storing energy for later use. The appliance can then produce light, typically from a light-emitting diode, until the capacitor is discharged. It can then be re-charged by further shaking. Because of this, they are sometimes referred to as a faraday flashlight. Other devices that use linear alternators to generate electricity include the free-piston linear generator, an internal combustion engine, and the free-piston Stirling engine, an external combustion engine. References

External links
  Linear Alternators in Free Piston Engines

Alternators
Electrical generators