The stroke and offset in the linear compressor can be detected by using a search coil.
Value of mutual inductance between the search and the main coils is required.
A solenoid valve was used to control the piston offset.
Controls of stroke, offset and frequency were implemented in LabVIEW