A self-actuated cylinder comprising a cylinder housing comprising electro-magnetic force generating means to generate electro-magnetic forces, and apiston within the cylinder housing, wherein the electro-magnetic forces actdirectly on the piston to displace the piston within the cylinder housing. Theself-actuated cylinder can be used as an oscillation spirometer to determineair flow, an input impedance or Forced Oscillation pulmonary mechanics.