a free piston gas compressor comprising a cylinder , a piston reciprocable within the cylinder and a reciprocating linear electric motor derivably coupled to the piston having at least one excitation winding . a measure of the reciprocation time of the piston is obtained , any change in the reciprocation time is detected and the power input to said excitation winding is adjusted in response to any detected change in reciprocation time .