Patent Publication Number: US-2023151802-A1

Title: Systems and methods for compression and expansion of gas

Description:
FIELD 
     The present disclosure relates generally to compression and expansion of gases. More specifically, the present disclosure provides valves contemplated for use in reciprocating machines and methods for operating them. Embodiments of the present disclosure are contemplated for use with, but are not limited to, heat pumps, compressed gas systems, and pumped heat energy storage systems. 
     BACKGROUND 
     Thermodynamic principles governing adiabatic compression and expansion of gases are long established and proved in countless machines including gas turbines and internal combustion engines. Other machines designed to recover mechanical energy from compressed gases are less common. Pneumatic tools, for example, are driven by compressed air. In compressed air energy storage systems, expansion takes place in isolation from compression and is used to extract mechanical energy from the compressed air. At natural gas gate stations, expansion turbines have been used to recover energy when reducing the high pressures of transmission pipelines to the lower pressures required by distribution mains. The goal of these machines is to receive gas at high pressure, recover usable mechanical energy through adiabatic expansion, and return the gas at a lower pressure and temperature. 
     Reciprocating machines can also be designed for this purpose. The term “reciprocating machines” as used herein refers to machines and devices that comprise at least one piston to convert pressure using a reciprocating motion. These machines and devices are frequently used to produce the pressurized gas in the first place (i.e., to compress air, natural gas, and industrial gases), but they are not commonly used for expansion and energy recovery despite several advantages of reciprocating machines over expansion turbines: lower cost, operability over a wide range of flow rates, and the abundance of technicians, know-how, and infrastructure. The advantages of reciprocating machines are even more pronounced for systems at the high temperatures encountered in pumped heat energy storage, where turbomachinery faces difficult challenges associated with thermal expansion of blades at high temperatures and high rotational speeds. Examples of reciprocating machine(s) applied in such a setting are shown and described in US Patent Application Publication No. 2021/0071918 to Norris, which is hereby incorporated by reference in its entirety. 
     As described in the referenced Norris Application, solenoid valves are contemplated for use in reciprocating machines to control flow into and out of the cylinders. Solenoid valves, i.e., valves that open and close by electromagnetic forces, are contemplated as being timed to provide precise control over inlet and outlet gas quantities. Consequently, the flow rate of gas, outlet pressure, and outlet temperature may all be controlled by properly timing the operation of the valves. 
     Conventional solenoid valves generally comprise a valve plunger that is constrained to move along a linear axis by a valve guide. Some amount of clearance is required to permit the plunger to slide freely within the guide. This clearance provides a pathway for high pressure gas inside the system to escape to the outside air. Gas leakage is detrimental to the performance of the system because it is a form of energy loss. With wear on the valve guides over time, clearances increase, and losses become greater. Gas leakage also limits operating pressure—and consequently rated power—of the machines. 
     Internal combustion engines do not face the same problem. In these engines, the seal(s) at the valve guides is not critical because the pressure internal to the cylinder is always at or near atmospheric pressure when the valves open. This is true for both intake and exhaust valves. All valves are closed and sealed at the valve seat during compression and expansion, isolating the valve guides from the highest pressures. On the other hand, in pumped heat energy storage, and more generally in reciprocating expansion machines, this is not the case. Valve guides are exposed to the highest pressures in both the high side and low side valves. The issue is most pronounced at the high side valves which are exposed continuously to the highest pressures and temperatures, and they must seal even while the valve plunger is in motion. 
     Conventional solenoid valves generally open when electrical current is passed through a coil, creating a magnetic field that attracts the valve plunger to the open position. In the process, a spring is compressed, providing the energy for closing when the current is interrupted. The spring is subject to failure over repeated cycling. The valves strike the upper and lower stops in each cycle (e.g., at 50 Hz), producing undesirable noise that may limit the use of the machine in certain locations. The strikes also represent loss of energy because the kinetic energy of the valve plunger is rapidly converted to heat, vibration, and acoustic energy. The spring must be designed to provide sufficient force at all points along the return path, but this can result in more force than needed at is point of maximum compression. Thus, the solenoids must be over designed to counter the unnecessary spring force, leading to higher manufacturing cost than would otherwise be required. While conventional solenoid valves are contemplated for use with various embodiments and methods of the present disclosure, the disclosure further provides and contemplates improved valve systems as shown and described herein. 
     U.S. Pat. No. 9,551,219 to Howes discloses an apparatus for compressing and expanding gas including a valve system and is hereby incorporated by reference in its entirety. Howes discloses a controller to adjust a timing of the valves for purposes of switching between operating modes, i.e., charging and discharging, but fails to teach or disclose variable timing and the system cannot support variable output properties, such as pressure and temperature. Howes further does not disclose an ability to monitor the temperature of upstream or downstream reservoirs or working fluid properties, nor does Howes disclose an ability to control a system and valve elements at least as shown and described herein. 
     SUMMARY 
     Accordingly, there has been a long-felt and unmet need to provide improved systems and methods for valves for regulating and for use with gas expansion and compression systems. There has further been a long-felt and unmet need to provide improved methods and systems for valve systems for use with (but not limited to) valve systems for controlling working fluid undergoing various changes in temperature, pressure, flow rate, flow direction, and other properties. 
     Embodiments of the present disclosure provide valves and valve sets that overcome the limitations of the prior art. Embodiments of the present disclosure further provide control methods and operational benefits as described herein. 
     It is an object of the present disclosure to provide systems and methods wherein pressure and/or temperature within the system are adjustable as a temperature of a storage medium (e.g. gravel or molten salt) increases and decreases. 
     In certain embodiments, one or more valves are provided that avoid the aforementioned guide sealing problem by locating a valve plunger, a solenoid, and an electromagnet inside a pressurized containment vessel. These elements are preferably surrounded on all sides by a pressurized gas as the gas moves through flow channels. Electrical current used by the solenoid is sourced outside the vessel, passing through the walls via sealed bulkhead connectors. Valve guides are contemplated as being provided to constrain the motion of the plunger and are not required to seal in pressurized gas. 
     In some embodiments, conventional magnet wire is provided in the solenoid windings. 
     Embodiments of the present disclosure contemplate devices and systems suitable for high temperature applications, e.g., in a pumped heat energy storage system operating at 400 degrees Celsius or higher. Conventional magnet wire is typically coated with enamel insulation rated up to 250 deg. C. and is unable to withstand this operating environment. High-temperature magnet wire is contemplated for use in various embodiments of the present disclosure. This wire is available to support continuous operation above 500 deg. C. However, this wire is subject to special handling procedures as to not damage the insulation, and bending radiuses are limited. Embodiments of the present disclosure further contemplate and provide a method to overcome these limitations. For example, bare solid wire with sufficient thickness and strength may be pre-wound and coated in ceramic inorganic electrical coating rated above 1300 deg. C. 
     In various embodiments of the present disclosure, integral forced convective cooling for the solenoid windings is provided. In some embodiments, two forced cooling mechanisms are provided. First, gas is provided that surrounds the electromagnets and mixes with a gas moving through the valve(s). This creates circulation within the pressure vessel and flow across the solenoid surfaces. Second, additional circulation is caused by the oscillatory motion of a plunger. In both of these cases, the valve provides a means to remove the heat by transporting it away from the source and out of the valves as part of the larger flow stream. 
     In preferred embodiments, solenoid valves are provided that are devoid of a spring and which comprise first and second electromagnets. In this case, two electromagnets alternately raise and lower a plunger as a linear motor. The plunger comprises a ferromagnetic ring, acting as a segment in each of the two magnetic circuits, so the attractive forces act alternately on the ring, pulling the plunger in one direction to open the valve and in the opposite direction to close the valve. Such embodiments improve the reliability of the valve by eliminating the spring and utilizing only a single moving part. Uncertainties associated with spring material fatigue life, especially in high temperature applications, are removed or limited. Design force is also limited to only that necessary to move the plunger, and not the additional force required to compress the spring. 
     Embodiments of the present disclosure provide methods related to the control of a linear motor to achieve a desired plunger motion. Smooth opening and closing motion of valves of the present disclosure is made possible by dynamically controlling the currents in the solenoids of the electromagnets. Noise, energy loss, and wear associated with plunger strikes is reduced because the plunger is slowed prior to reaching the stops. In opening, the plunger can be brought to rest at a point prior to the hard stop, eliminating the open position strike. When the valve closes, plunger position, speed, and acceleration are all actively controlled to bring it smoothly and quietly to its rest position at the valve seat, analogous to the smooth motion produced by a rounded cam in the control of other valves, such as those found in internal combustion engines. 
     In various embodiments, an electronic circuit is provided to control solenoid currents. Pulse width modulation (“PWM”) provides controlled voltages across the solenoid terminals and delivers the required currents in each time interval of the operating cycle. The circuit additionally provides recovery of plunger kinetic energy by converting it back into electrical energy during braking. This electrical energy is reusable by the system in later cycles, thereby improving energy efficiency. 
     Methods of the present disclosure are provided that produce the desired plunger kinetics using measured position in a proportional-integral-derivative (“PID”) control feedback loop. The operating cycle is divided into small time intervals. A controller subtracts the measured plunger position from its calculated, ideal position along a predefined smooth motion curve. This difference is the feedback error. Using known PID principles, control variables are calculated from the error, the rate of change of error, and/or the integral of error. 
     In some embodiments, methods are provided to measure a position of a plunger in each interval, which can then be used as feedback. Position is detected without the use of sensors inside the high temperature, high pressure vessel, saving the cost and complexity of specialized monitoring. Instead, position is measured remotely, external to the pressure vessel, using (for example) readily available solenoid voltages and currents at the control circuit. 
     In certain embodiments, methods of the present disclosure provide for detecting reversal of pressure across the plunger heads. This serves as an indicator of the precise time in the cycle at which the valve should be opened and as a trigger for the controls to do so. Detection of pressure reversal is performed without the use of any pressure sensors, again saving materials cost, and avoiding design challenges of sensors located in the high temperature environment. U.S. Patent Application Publication No. 2011/0070113 to Mohamed, which is hereby incorporated by reference in its entirety, discloses valve assemblies for a compressor including energy-salvage modes of operation. Mohamed, however, fails to teach or disclose various features of the present disclosure including but not limited to a reversible system with valve members as shown and described herein. 
     In some embodiments, methods are provided that enable the controller to calculate in each interval the required solenoid currents, the voltages necessary to produce those currents, and the corresponding PWM duty cycle. 
     Embodiments of the present disclosure provide the ability to combine two valves into a coherent valve set that may be used in conjunction with an external piston-cylinder for gas compression and/or expansion. Valve sets of the present disclosure are contemplated as comprising two valves, flow channels, controls, and an electrical power source. A first valve is designated as the high side valve and is continuously exposed to high pressure at its external port. A second valve is the low side valve, exposed to the low pressure at its external port. The valve set is operable as either a compressor or as an expander, such that work is either done on, or recovered from, the gas. The two valves open and close as described herein. 
     In one embodiment, and by way of example without limitation, a valve set is provided to work with an external reciprocating piston-cylinder to recover energy from air at 20 MPa and 400 deg. C. The cylinder has a bore of 90 mm, a stroke of 90 mm, and the piston speed is 50 Hz (3000 RPM). It will be recognized, however, that no limitation is provided herewith with respect to piston size, speed, or operating conditions. Inventive aspects of the present disclosure are provided that are irrespective of such design considerations. 
     In this example embodiment, a valve is contemplated that comprises a steel plunger. The plunger is contemplated as comprising a diameter between approximately 10 mm and 100 mm, and in some embodiments of about a 30 mm. The plunger is contemplated as comprising a disk-shaped head designed to manage the flow through an internal flow channel. In various embodiments, the head comprises a thickness of between approximately 1 mm and 10 mm and preferably of about 3 mm thick, and the internal diameter of the flow channel is between approximately 10 mm and 100 mm and in certain preferred embodiments of about 26 mm. The head is connected to a perpendicular stem with a diameter of between approximately 1 and 10 mm and in certain embodiments of about 4 mm. In some embodiments, the plunger is about 56 mm tall including both head and stem. Around the stem is fit a cylindrical ferromagnetic ring with outer diameter of 12 mm (for example), separated from the stem by a non-magnetic bushing. In various embodiments, the plunger&#39;s total mass, including head, stem, ring, and bushing, is approximately 31 g. It will be recognized, however, that the present disclosure and inventive concepts provided herein are not limited to the dimensions and masses described above. 
     In operation, the plunger is moved by the magnetic forces of two electromagnets, each comprising a solenoid. As an example, the solenoid is contemplated as comprising 140 turns of 12 AWG solid copper wire wound in 7 layers of 20 coils with a minimum spacing in all directions of 0.3 wire diameters. These windings are coated with a commercial high temperature ceramic inorganic electrical coating, cured, and fastened around a core rectangular in cross section with a thickness of 4 mm, a height of 12 mm, and a length of 98 mm. In some embodiments, the core is made of pressed iron powder of discrete insulated particles. The core is extended by mechanically clamping two pole components, one on either end, made of the same material as the core and having the same cross section. The poles have a geometry that allows the resulting path of magnetic flux to approach the plunger from opposite sides. They also have rounded pole faces which interact magnetically with the ring at a constant gap clearance of 1 mm. Pole faces have a height of 12 mm, an angular width of 160 degrees, and a thickness of 4 mm. The upper poles in the upper electromagnet are separated from the lower poles by 3 mm, and the system is designed so that there is always some overlap between ring and all poles, regardless of plunger position. 
     In various embodiments, a power supply is provided. In some embodiments, the power supply comprises a dedicated power supply for the valves and their operation. Continuing the example embodiment, a power supply is contemplated as providing 100 VDC across the positive and negative rails of a PWM electronic circuit, such that the voltage applied across each solenoid, independently, may be 100 V, 0 V, or −100 V, depending upon transistor configuration. A controller is provided that manages the transistor switching, the PWM duty cycle, and the effective solenoid terminal voltages, which can vary continuously between −100 V and +100 V. 
     Controllers of systems and methods of the present disclosure are provided that mimic an idealized motion. For example, in some embodiments a high pressure valve is provided with an upper electromagnet that lifts the plunger off its valve seat under a constant acceleration in the upward direction. A lower electromagnet slows the plunger at a preferably constant acceleration. This is the case in the example embodiment, such that the plunger reaches its open position at 8 mm in 4 ms. The valve should close along a similar path, also in 4 ms. Dwell times in the open and closed positions are variable, depending upon operating mode and the desired outlet properties, but in this example, the valve should dwell open for 8 ms and closed for 4 ms, completing the cycle in 20 ms, corresponding to the example 50 Hz piston speed. The low side valve preferably exhibit identical behavior except with a phase offset and with different dwell times as needed to expand the gas and enable the external piston to recover the expansion energy. 
     When operated with empirically-derived PID gain constants, the example valves in practice follow the idealized paths with a root-mean-squared (RMS) positional error of 0.24 mm. The maximum current draw through each solenoid is 35 A, and RMS currents are 10 A. This produces 15 W of heating in the coils. Convective cooling by the gas limits the core and internal wiring temperature to 414 deg C., within the limits of the wire insulation. It will be recognized that the foregoing dimensions, cycle times, etc. are provided for illustrative purposes of certain embodiments and examples and no limitation with respect thereto is provided. 
     In one embodiment, a valve system operable for use with a reciprocating machine is provided that comprises a first valve provided in a first valve housing and a second valve provided in a second valve housing; the first valve housing comprises a first conduit, and the second valve housing comprises a second conduit; the first valve comprises a valve plunger comprising a valve head and a stem and a ferromagnetic member provided on the stem; the second valve comprises a valve plunger having a valve head and a ferromagnetic member provided on the stem. Each of the first valve housing comprises a first magnetic pole and a second magnetic pole and the ferromagnetic member is moveable relative to the magnetic poles. The first valve housing and the second valve housing comprise separate housings that are in fluid communication via at least one of the first conduit, the second conduit, and a piston cylinder. 
     In another embodiment, a valve system operable for use with a reciprocating machine is provided. The valve system comprises: a valve housing comprising a pressure vessel housing a valve; the valve comprises a valve plunger with a valve head and a stem and a ferromagnetic member provided on the stem; a first solenoid operable to receive an electric current and provide a magnetic force to the ferromagnetic member; a second solenoid operable to receive an electric current and provide a magnetic force to the ferromagnetic member; a first magnetic pole and a second magnetic pole and wherein the ferromagnetic member is moveable relative to the magnetic poles and the magnetic poles are operable to selectively control a vertical position of the valve head; a first conduit and a second conduit are provided and are in communication with the valve housing, wherein the valve is in selective communication with a seat provided between the valve housing and the second conduit; and a fluid flow path is provided that extends from the first conduit to the pressure vessel and to the second conduit, and the first and second solenoids are provided in the fluid flow path. 
     In another embodiment, a method of gas compression and expansion is provided that comprises providing a first chamber and a second chamber, the first chamber comprising a first valve operable to control fluid flow to and from the first chamber and the second chamber comprising a second valve operable to control fluid flow to and from the second chamber. Each of the first valve and the second valve are in communication with a solenoid and a magnetic pole. A controller is provided in communication with at least one of the first valve and the second valve. A valve position is determined based on a measured reluctance of a magnetic circuit of at least one of the first valve and the second valve, a valve position. A controller is provided to adjust at least one of timing and position of at least one of the first valve and the second valve. 
     The above-described embodiments, objectives, and configurations are neither complete nor exhaustive. As will be appreciated, other embodiments of the invention are possible using, alone or in combination, one or more of the features set forth above or described in detail below. 
     The phrases “at least one,” “one or more,” and “and/or,” as used herein, are open-ended expressions that are both conjunctive and disjunctive in operation. For example, each of the expressions “at least one of A, B, and C,” “at least one of A, B, or C,” “one or more of A, B, and C,” “one or more of A, B, or C,” and “A, B, and/or C” means A alone, B alone, C alone, A and B together, A and C together, B and C together, or A, B, and C together. 
     The term “a” or “an” entity, as used herein, refers to one or more of that entity. As such, the terms “a” (or “an”), “one or more,” and “at least one” can be used interchangeably herein. 
     The use of “including,” “comprising,” or “having” and variations thereof herein is meant to encompass the items listed thereafter and equivalents thereof as well as additional items. Accordingly, the terms “including,” “comprising,” or “having” and variations thereof can be used interchangeably herein. 
     It shall be understood that the term “means” as used herein shall be given its broadest possible interpretation in accordance with 35 U.S.C. § 112(f). Accordingly, a claim incorporating the term “means” shall cover all structures, materials, or acts set forth herein, and all of the equivalents thereof. Further, the structures, materials, or acts and the equivalents thereof shall include all those described in the summary of the invention, brief description of the drawings, detailed description, abstract, and claims themselves. 
    
    
     
       BRIEF DESCRIPTION OF THE DRAWINGS 
       The accompanying drawings, which are incorporated in and constitute a part of the specification, illustrate embodiments of the invention and together with the Summary given above and the Detailed Description of the drawings given below, serve to explain the principles of these embodiments. In certain instances, details that are not necessary for an understanding of the invention or that render other details difficult to perceive may have been omitted. It should be understood, of course, that the invention is not necessarily limited to the particular embodiments illustrated herein. Additionally, it should be understood that the drawings are not necessarily to scale. 
         FIG.  1    is a partially cut-away perspective view of a valve set according to one embodiment of the present disclosure. 
         FIG.  2 A  is a top view of the valve set of  FIG.  1   . 
         FIG.  2 B  is front elevation view of the valve set of  FIG.  1   . 
         FIG.  2 C  is a right-side view of the valve set of  FIG.  1   . 
         FIG.  2 D  is a top view of a dual-purpose valve according to an embodiment of the present disclosure. 
         FIG.  3    is a right side cut-away view of the valve set of  FIG.  1   . 
         FIG.  4    is a perspective view of a plunger according to an embodiment of the present disclosure. 
         FIG.  5 A  is a sectional view of a plunger and surrounding components according to an embodiment of the present disclosure in a first position. 
         FIG.  5 B  is a sectional view of a plunger and surrounding components according to the embodiment of  FIG.  5 A  of the present disclosure in a second position. 
         FIG.  6    is a perspective view of an electromagnet and plunger according to an embodiment of the present disclosure. 
         FIG.  7 A  is a perspective view of a linear motor according to an embodiment of the present disclosure. 
         FIG.  7 B  is an exploded view of the linear motor of  FIG.  7 A . 
         FIG.  8    is a perspective view of a linear motor frame according to an embodiment of the present disclosure. 
         FIG.  9    is a diagram of an electronics system according to an embodiment of the present disclosure. 
         FIG.  10    is an illustration of the PWM pulses used for voltage control according to embodiments of the present disclosure. 
         FIG.  11    is an illustrative idealized path of vertical plunger position versus time according to various embodiments of the present disclosure. 
     
    
    
     DETAILED DESCRIPTION 
       FIG.  1    is a perspective view of a valve set  1  according to one embodiment of the present disclosure.  FIG.  1    shows the valve set fastened by bolts to an external piston-cylinder  2  that is contemplated as housing a moveable and reciprocating piston. A low pressure port  3  is provided. The low pressure port  3  comprises a port wherein low pressure gas is drawn during compression and expelled during expansion. A high pressure port  4  is provided. The high pressure port  4  comprises a port through which high pressure gas is drawn during expansion and expelled during compression. A cylinder head  5  is provided that comprises internal flow pathways and interconnects low pressure port  3 , high pressure port  4 , and piston-cylinder  2 . Low side cover  6  and high side cover  7  contain the gas under pressure and provide housing for internal components. 
     Covers  6 ,  7  are fastened around their periphery by bolts to cylinder head  5 . Gaskets are contemplated as being provided in some embodiments between the covers  6 ,  7  and cylinder head  5  and between cylinder head  5  and piston-cylinder  2  to help prevent gas leakage. The valve set  1  includes electronic auxiliaries (not shown in  FIG.  1   ) connected electrically via high pressure conductor feedthrough  8 . 
       FIGS.  2 A,  2 B, and  2 C  are the top view, front view, and right side view, respectively, of valve set  1 . In  FIG.  2 A , conductor feedthroughs  8  are shown to indicate separate internal electrical components under the two covers  6 ,  7 . In  FIG.  2 C , the cylinder head is shown with distinct functional elements. Specifically, a low side motor base  9  and a high side motor base  10  are provided. A low side external pipe  11 , a high side external pipe  12 , a low side conduit  13 , a high side conduit  14 , and a cylinder port  15  are provided. Other embodiments are contemplated that distribute these elements among multiple parts and/or arrangements. A manifold may be present in some embodiments with multiple cylinder ports  15  allowing connecting cylinder head  5  to connect to multiple cylinders operating in parallel. 
     The referenced Norris Application discloses a system of energy storage and management. Systems and methods of the present disclosure, including valve systems, are contemplated for use with (but are not limited to) the systems of the Norris Application. For example, various embodiments of the present disclosure contemplate cylinders that are provided to perform compression and/or expansion of a working fluid of the kind referred to in the Norris Application as “dual-purpose” cylinders. 
     One embodiment of a valve set intended for use with a dual purpose cylinder is shown in  FIG.  2 D . This valve set comprises two low side ports  3 ,  3 ′. In some embodiments, these two ports are at approximately the same pressure. For example, in a pumped heat energy storage system, the two low side ports may connect to conduits providing fluid communication to either side of a thermal energy storage reservoir. Low side port  3  may in this case be used to deliver low pressure gas to one side of a heat exchanger with the return flow entering at low side port  3 ′ or vice versa. In this embodiment, low side port  3  is connected to a low side valve comprising cover  6 , with flow path including low side conduit  13 . A separate flow path is defined by low side port  3 ′, a low side valve comprising cover  6 ′, and low side conduit  13 ′. These two flow paths share a common cylinder port  15 . Similarly, there are two high side flow paths. The first comprises high side conduit  14 , the high side valve comprising cover  7 , and high side port  4 . The second comprises high side conduit  14 ′, the high side valve comprising cover  7 ′, and high side port  4 ′. The two high side ports  4 ,  4 ′ may similarly function in some embodiments as entry and exit points on a common pathway comprising a high pressure heat exchanger. 
     A cylinder head  5  may be manufactured as a single cast metal part, such as cast iron, using sand casting methods or similar methods known in the art. The parting plane between cope and drag may be the vertical centerline of  FIG.  2 B , and a core may be used to produce all internal gas flow pathways. Covers  6  and  7  may also be cast with the parting plane defined by the bottom of the covers. All walls in the covers and cylinder head must be made thick enough to withstand the pressures and of the enclosed gas and to account for fatigue from fluctuating pressures and, in some applications, high temperatures. 
     The elements of  FIG.  2 C  are shown in cut-away format in  FIG.  3    to illustrate flow pathways. For purposes of describing these pathways, a gas expansion operating mode is assumed. To begin the expansion, the piston  20   a  of the piston-cylinder moves downward, drawing gas into the cylinder. The high side plunger  16  is provided in the open position, i.e., with its head raised above its valve seat, permitting gas to flow freely from the high side pressure vessel  18  into the high side conduit  14 . The low side plunger  17  is provided in a closed position, impeding flow from the low side pressure vessel  19  into low side external pipe  11 . In this initial state, there is an uninterrupted flow path from high pressure port  4 , through high side external pipe  12 , into the high side pressure vessel  18 , down the high side conduit  14 , through cylinder port  15  and into the cylinder volume  20 , upwards through low side conduit  13 , and into low side pressure vessel  19 . The low side conduit  13  and high side conduit  14  are contemplated as being two portions of a bifurcated conduit in some embodiments and as shown in  FIG.  2 C . This series of pathways are provided at substantially the same pressure (i.e., the high side pressure at the high side port  4  minus frictional pressure drops). Similarly, the low side conduit  11  shares the same low pressure as the low side port  3  through which there is no flow in this state. The low side plunger  17  therefore separates high pressure above the plunger from low pressure below, forcing it downward and providing a seal. 
     At a predetermined point, as the piston  20   a  continues its downward motion, the high side plunger  16  is lowered to a closed position against its seal, preventing further flow from high side pressure vessel or chamber  18  into high side conduit  14 . Flow through the high side port  4  stops. The gas below the high side plunger  16  expands because the variable cylinder volume  20  increases. In this state, the system contains three separate pressure regions: the high side pressure, the low side pressure, and an intermediate pressure found in the volume made up of high side conduit  14 , cylinder port  15 , cylinder volume  20 , low side conduit  13 , and low side pressure vessel or chamber  19 . The intermediate pressure is lower than the high side pressure, so a downward force develops on high side plunger  16 , forcing its seal and preventing flow past the high side plunger  16 . 
     The intermediate pressure drops until such time as it reaches equilibrium with the low side pressure, i.e., when the pressure in the low side pressure vessel  19  equals the low pressure in the low side external pipe  11 . As there is no longer any pressure differential across the head of low side plunger  17 , it can move freely. In this state low side plunger  17  is opened, and the system again contains only two pressure regions: a low-pressure region contained in all elements between low pressure port  3  and the high side plunger  16 , and a high pressure region between high side plunger  16  and the high side port  4 . 
     For a short period of time near the end of the piston&#39;s  20   a  downward motion, low pressure gas is drawn into the system through the low pressure port  3 , into the low side external pipe  11 , into low side pressure vessel  19 , through low side conduit  13 , through cylinder port  15 , and into cylinder volume  20 . However, once the piston is fully drawn or expanded, the piston reverses its course and starts moving in the upward (i.e., compression) direction. The flow reverses, and a large volume of low-pressure gas is expelled via low pressure port  3 . 
     At a predetermined point, the low side plunger  17  closes while the piston  20   a  continues its upward motion. This action again separates the system into three separate pressure regions. The intermediate pressure rises, forcing low side plunger  17  against its seal. The intermediate pressure rises until the point when it is in equilibrium with the high-pressure source gas. At this point, high side plunger  16  is free to move. The high side plunger  16  is opened, and the system is again returned to two pressure regions. For a short period at the end of the piston&#39;s upward motion, high pressure gas is forced out of the high-pressure port  4 , but then the piston then reaches a fully compressed position, begins its downward motion, gas is draw in through high pressure port  4 , and the cycle repeats. 
     During the expansion cycle just described, the gas is drawn into the cylinder at high pressure and expanded in the cylinder at intermediate pressure. During these two processes, work is done by the gas on the piston  20   a . Gas is then expelled at low pressure, requiring a small amount of work to overcome internal friction, and then the piston must compress a small amount of residual cylinder gas to reach high pressure, also requiring work. In all, net work is done on the piston, and this may be employed for useful purposes including, for example, energy recovery. 
     The valve set may also be operated as a compressor. In this case, and again with reference to  FIG.  3   , the low side plunger  17  is initially provided in the open position and the high side plunger  16  begins in the closed position. The piston&#39;s  20   a  downward motion draws gas into the cylinder from low pressure port  3 . At full draw, the piston reverses and begins traveling upward. At a predetermined point, low side plunger  17  closes. Intermediate pressure rises, forcing the head of low side plunger  17  against its seat. When the intermediate pressure reaches equilibrium with the high pressure in the high side vessel  18 , high side plunger  16  is moved to its open position, and high-pressure gas is expelled through the high pressure port  4 . The piston then reverses its motion to the downward direction, and at a predetermined point high side plunger  16  is closed. The small amount of residual gas is expanded, the intermediate pressure drops, and the low side plunger  17  is opened when the intermediate pressure reaches equilibrium with the low-pressure source, and the cycle repeats. During this compression cycle, net work is done by the piston on the gas. 
     Dimensions of high side flow channels, plungers, and ports may be smaller than their low side counterparts because they contain higher pressure gas with lower specific volume. In the figures and description of this disclosure, they are shown to have identical dimensions for simplicity. 
     Other geometries are contemplated including those having plungers that open in the downward direction, those with plungers moving in a direction other than vertical, those moving in a rotational motion, and those with plunger heads and mating valve seats having a geometry other than flat. 
       FIG.  4    is a perspective view of a plunger according to an embodiment of the present disclosure. The plunger  17  includes a disk-shaped head  21 , which preferably comprises metal and is fastened by welding or brazing to a stem  22 . In other embodiments, the plunger head and stem comprise a single component. A non-magnetic cylindrical bushing  23  is provided and a ferromagnetic cylindrical ring  24  is provided around the bushing  23 . The bushing  23  separates the ring from stem to reduce magnetic flux from passing from the ring  24  to the stem  22 . The bushing and ring are fastened tightly to the stem, such as by press fitting or shrink fitting. It is contemplated that the high side and low side plunger comprise substantially the same construction (i.e., that shown in  FIG.  4   ). 
     In some embodiments, plungers are moved in one direction by an electromagnet and in the opposite direction by a spring. For example, the plunger(s) is/are contemplated as being raised by an electromagnetic force and biased closed by a spring. In a preferred embodiment, described in detail below, plungers are moved in both directions by electromagnets. Collectively, two fixed electromagnets and the moving plunger comprise a variation of the linear switched reluctance motor with only two stator poles, the poles being placed on opposite sides of the mover (or rotor), and with continuous or near-continuous overlap of the ring and all poles. The linear motor offers several advantages over the spring alternative: it avoids wear and failure of the spring and improves reliability. It avoids the materials uncertainty of fatigue strength in high temperature environments. It avoids the need to overdesign the spring so that it provides sufficient force at partial compression, while providing excessive force at full compression, thereby requiring overdesign of the compressing electromagnet. 
     In some embodiments, the ring comprises a permanent magnet. In some embodiments the ring comprises a permanent magnet and the valve comprises a single electromagnet and a spring. In some embodiments, additional poles are added to the stator and/or mover. 
       FIGS.  5 A- 5 B  is a cross-sectional elevation view of linear motor components. In  FIG.  5 A , the plunger is in its closed position with head  21  contacting the valve seat  27 . The valve seat  27  as illustrated is integral to the cylinder head. Alternatively, the seat is provided as a separate part and reparable and/or replaceable after wear. A plunger is constrained to move only in the vertical direction by guide holes in lower frame  25  and upper frame  26  through which the plunger stem  22  is provided. In some embodiments, the stem and/or the inside surface of the guide holes are contemplated as being coated with a dry lubricant such as tungsten disulfide to reduce friction. Preferably, there are no transverse forces acting to push the plunger against the guide surfaces. The plunger is pulled upward by magnetic force from the upper magnetic poles  29 ,  30  acting upon plunger ring  24  and pulled downward by magnetic force from the lower magnetic poles  31 ,  32 . The upper magnetic poles  29 ,  30  are provided with a vertical position or height that is greater than a vertical position or height of the lower magnetic poles  31 ,  32 , at least when the device is positioned as shown in  FIGS.  5 A and  5 B . The plunger stem  22  and head  21 , bushing  23 , and ring  24  all move in unison as a single unit, bound together by internal static frictional forces (for example). The motion of the plunger is preferably constrained between two vertical limits. The lower limit is reached when the bottom of plunger head  21  contacts valve seat  27 . The upper limit is when the top of plunger head  21  contacts stops  28  as illustrated in  FIG.  5 B . Upper stops  28  are contemplated as being integral to lower frame  25  as shown. The motion of the plunger may be controlled by varying the magnetic forces produced by the upper magnetic poles  29 ,  30  and the lower magnetic poles  31 ,  32 . The motion may be controlled such that the open position is defined at a point slightly below the physical upper limit imposed by stops  28 . This prevents the head  21  from contacting stops  28 , resulting in quieter and more efficient operation while still providing sufficient passage for gas flow between plunger head  21  and valve seat  27 . The vertical heights of bushing  23  and ring  24  and their placement on stem  22  are such that they never contact the lower frame  25  or upper frame  26 . High side plunger  16  is constructed, moved, and constrained in the same fashion. 
     A lower electromagnet is provided that comprises lower magnetic poles  31 ,  32 . As shown in  FIG.  6   , the lower electromagnet  33  includes a solenoid  34  comprising wire windings around a lower magnetic core  35 . In some applications, specialty magnet wire is required to survive high temperatures of surrounding gas and joule heating produced by electrical current in the windings. In some embodiments, a commercially available high temperature magnet wire may be used. These may be insulated with a fully cured vitreous enamel film bonded to the wire conductor. Special care is needed when winding the solenoids, however, to avoid damaging the insulation. In addition, the bending radius of the turns must not be smaller than a specified amount, typically seven times wire diameter. These limitations may be overcome in other embodiments as follows. Embodiments of the present disclosure contemplate providing solid bare wire pre-wound into the desired shape, holding its form by its own strength, taking care that individual wires are separated by at least the distance that will result in required dielectric strength in the final, formed solenoid. To assist with winding, jigs may be used to guide the wire separation within each layer and between layers. Then, the formed coil is dipped or brushed with a commercial high temperature electrical coating, such as a ceramic inorganic coating, cured, and fastened around the core  35  with additional coating and curing and/or high temperature adhesive. 
     The magnetic core  35  and the magnetic poles  31 ,  32  are made from a ferromagnetic material. In some embodiments, the poles comprise pressed iron powder. The powder, used in the manufacture of some inductors, is made from discrete insulated high-permeability ferromagnetic particles, and is selected with a suitably high Curie temperature. The magnetic core  35  is mechanically clamped or similarly secured to poles  31  and  32 , which are shaped and arranged geometrically to approach the plunger from either side and surround the plunger ring in a close, non-contact, proximal relationship at terminals  37   a ,  37   b . Poles may be made of the same material and in the same manner as the core. The terminals  37   a ,  37   b  preferably comprise curvilinear or C-shaped terminals to increase surface area, but no limitation with respect to the shape of the terminals  37   a ,  37   b  are provided. 
     The electromagnet and plunger together form a magnetic circuit as follows. The solenoid  34  produces magnetomotive force (MMF). This produces magnetic flux which passes through the core  35 , through the first pole  32 , crosses a first gap between the pole and the plunger ring  24 , continues around the ring, crosses a second gap, and returns via the second pole  31  to the core and solenoid. These components are designed such that the magnetic force will be sufficient to move the plunger along its intended path of motion. The poles are contemplated as comprising curved terminals  37   a ,  37   b  to follow the shape of the ring while maintaining a constant gap, as shown. The system comprises a solenoid that is operable to produce a magnetic flux and operate as a switched reluctance motor. 
     Current to and from solenoid  34  is provided by wires (not shown) from the high pressure conductor feedthrough  8  shown in  FIG.  1   . In some embodiments, this wire is contemplated as being high temperature wire, such as ceramic coated wire, electrically connected to the terminals of the solenoid wires. In other embodiments, this wire is contemplated as being extensions of the same wire used in the solenoid but not wound around the core. In either case, the wires are electrically connected to the inside terminals of the conductor feedthrough  8 . External to the conductor feedthrough  8 , other wires complete the electrical circuit at the electronics system described later. In some embodiments, ceramic feedthroughs  8  are used, capable of withstanding the high temperatures and pressures internal to pressure vessels  19  and  18  shown in  FIG.  3   . 
     The reluctance of the magnetic circuit derives primarily from the two gaps of the magnetic circuit. Reluctance depends upon the size of the gap, i.e., the distance between the ring and terminals  37   a ,  37   b , and the area of overlap between the ring and terminals. The gap size is fixed, but the area of overlap varies by plunger position. When the plunger is in a position having high overlap, the reluctance is small, and this corresponds to high magnetic flux. When the plunger is in a position with small overlap, the reluctance is high, and this corresponds to low magnetic flux. The relationship between plunger position and reluctance is central to the position detection method described later. 
     The height of the poles and the vertical spacing between upper magnet poles  29 ,  30  and lower magnet poles  31 ,  32  are sized based on considerations of the ring height and the maximum vertical distance of plunger travel. These dimensions may be such that there is always some minimum amount of overlap, regardless of plunger position. 
       FIG.  7 A  is a perspective view of the low side linear motor  36  comprising a lower electromagnet  33  containing poles  31  and  32  as described above and shown in  FIG.  6    and  FIG.  5 A . The motor  36  further comprises an upper electromagnet  37  containing poles  29  and  30  shown in  FIG.  5 A . The upper electromagnet is preferably identical except for orientation and placement. The low side linear motor  36  includes movable low side plunger (not shown in  FIG.  7 A ). The low side linear motor  36  is contained within the low side cover  6  as shown in  FIG.  1   . A preferably identical high side linear motor is contained within the high side cover  7 . 
     The low side linear motor  36  is shown in exploded view in  FIG.  7 B . A plunger bushing  23  is fit onto stem  22  after passing the stem through the guide hole of the lower frame  25 . The plunger ring  24  is fit over the bushing  23 . The lower electromagnet  33  and upper electromagnet  37  are mechanically clamped between the lower frame  25  and upper frame  26 . The entire assembly, including support legs  39  are held together by tightening bolts  38  against the cylinder head  5 . This positions the plunger head  21  directly above its seat on the low side external pipe  11  (not shown in  FIG.  7 B ). The high side linear motor is similarly bolted into place above the high side conduit  14 . 
     Additional features of the lower frame  25  are shown in  FIG.  8   . The frame is made of non-magnetic material, such as brass, fabricated by milling or casting. It includes support grooves  39  into which are fit the lower magnetic poles  31 ,  32  and the lower magnetic core  35 . A clamp  40  is provided that presses upward against the upper magnetic poles and upper magnetic core to hold them tightly in place against the upper frame  26  of  FIG.  7 B . The clamp may also be designed with grooves for additional support. Poles and cores may be fitted directly against the frame as shown. Alternatively, to reduce operating noise of vibration, poles and cores may be affixed to the frame with adhesive rated for the anticipated operating temperatures or may be set into a temperature-rated compressive packing material, such as graphite foil, shaped and fit into the grooves prior to assembly. External clamps may also be used. On the bottom of the frame, shown in the inverted view, are the stops  28  that limit plunger motion as described previously. As shown in  FIG.  7 B , the upper frame  26  may be identical to the lower frame  25  but placed in an inverted position during assembly. Thus, the clamp of the upper frame holds in position the lower poles and core, while the clamp of the lower frame holds in position the upper poles and core. The four integral spacers  41  are made to the precise length to ensure that the magnetic parts are clamped tightly but not damaged. It is important to note that the clamp  40  and other clamps, if used, are designed so that they do not touch the opposite frame, thereby forming an electrically conductive path around the poles. This will prevent induction of electrical currents in the metallic frames as magnetic flux moves through the electromagnets. The frames do touch at the spacers  41 , but there is no net flux passing through any contiguous conductive pathway in the frames via the contacting spacers. The frames of  FIG.  8    comprise substantially the same structure and may be inverted to convert a “lower” frame to an “upper” frame. In various embodiments, frames are provided that are operable for use as an upper or lower frame portion, thus providing for a simpler design and fabrication process. Joule heating produced by current in the windings of solenoid  34  is preferably removed to prevent damage to the wire insulation, and embodiments of the present disclosure provide integral forced convective cooling for this purpose by two mechanisms. First, linear motor  36 , which includes the windings, can be cooled by gas circulating within pressure vessel  19 . This is illustrated in  FIG.  3    where the gas in pressure vessel  19  is able to mix with the main flow path of gas through low side conduit  13  and low side external pipe  11  when plunger  17  is open. A portion of the flowing gas is redirected by viscous forces from the main flow into the pressure vessel  19 , where it is able to circulate and deliver flow across the solenoid surfaces. Second, additional circulation is generated by the rapidly oscillating head  21  and other surfaces of plunger  17 . Joule heating is thus removed from the solenoid surfaces by forced convection developed from these two mechanisms, after which it mixes with the larger gas stream and is transported away. Transport may be in either direction, with the generated heat ultimately exiting the valve set via the low-pressure port  3  or high pressure port  4 . The above mechanisms of heat removal are similarly valid for the other three solenoids of the valve set. 
       FIG.  9    is a schematic of an electronics system  42  according to an embodiment of the present disclosure. The electronics system  42  is contemplated as and operable to produce required solenoid currents throughout a valve set(s) according to embodiments of the present disclosure. A first electronic circuit  44  is operable for motor control. A second electronic circuit  45  is operable to control a second motor (e.g., a high side linear motor). The second electronic circuit  45  is contemplated as being identical to the first, differing only in the timing of operation, so only the first will be described here. A valve controller  43  is provided that receives data and controls both electronic circuits  44 ,  45 . A power supply  46  provides a stable DC voltage source to the positive rail containing nodes a, b, c, d, and e. The negative rail, containing nodes k, m, n, p, and q, is the negative return to the power supply. The power supply is designed to source and sink current as needed to ensure stable rail voltages and may include a capacitor to help provide stabilization. Both the positive and negative rails extend into the second electronic circuit  45 . A system controller  47  is contemplated to be in communication with valve controller  43  and provide timing-related information, such as system status, external pressures, temperatures, and piston position. The system controller  47  also controls higher-level functions of a system, such as setting charging or discharging modes in a pumped heat energy storage system, not required by the functions of the valve controller  43 . The valve controller  43  is also capable of delivering valve status information to the system controller  47 . In some embodiments, the system controller  47  and valve controller  43  may be combined into a single controller. 
     The solenoid  34  of the lower electromagnet  33  is represented in  FIG.  9    as S 1 . The solenoid in the upper electromagnet  37  is represented in  FIG.  9    as S 2 . Current i 1  passes through solenoid S 1 , and this is measured using a sensor, such as a Hall sensor, located between node f and S 1 , and measurements are made available to valve controller  43 . Similarly, current i 2  passes through solenoid S 2 , measured using a sensor located between node h and S 2 . Transistor T 1  can switch between its ON (closed) state, providing a conductive path between node b and f, and its OFF (open) state, breaking that path. Transistors T 2 , T 3 , and T 4  provide similar functions at their locations shown. Diode D 1  prevents current from passing from node f to node m but allows current to pass from m to f Diodes D 2 , D 3 , and D 4  perform similar functions at their locations shown. The voltage between the positive rail and the negative rail is also measured and the result is made available to the controller. The potential at node a relative to node k is the full positive rail voltage, referred to as v r . 
     Current i 1  is manipulated by valve controller  43  by switching transistors T 1  and T 2  ON and OFF in four possible configurations. In the first configuration, both T 1  and T 2  are ON, allowing current to flow from the positive rail at node b, through T 1  to node f, through S 1  to node g, and through T 2  to the negative rail at node n. This configuration applies driving voltage v r  across S 1  such that the potential at node f relative to node g is v r . This will cause a change in current i 1 . If the plunger were immobile in its closed position, for example, this configuration would cause current i 1  to increase at a rate inversely proportional to the inductance of S 1 . In the second configuration, both T 1  and T 2  are OFF, preventing current from flowing between b and f and between g and n. However, current is allowed to flow through S 1  along the path m-f-g-c, in which case the negative driving voltage is applied, that is, the potential at node f relative to node g is −v r . This configuration would cause current i 1  to decrease. In the third configuration, T 1  is ON and T 2  is OFF. This permits circulation of current along the path b-f-g-c-b, although no driving voltage is applied: the potential at f relative to g is zero. Finally, in the fourth configuration, T 1  is OFF and T 2  is ON. This permits circulation of current along the path m-f-g-n-m, with no voltage applied. Current i 2  through solenoid S 2  may be similarly manipulated using the same four transistor configurations applied to T 3  and T 4 . 
     In some embodiments, pulse width modulation (PWM) is contemplated as being used to approximate a time-varying analog voltage profile applied across the terminals of each solenoid. This is illustrated in  FIG.  10    in which an effective voltage v(t) is approximated by applying pulses of positive or negative rail voltage. The interval T S  is made up of period T P , during which a pulse of v r  is applied, and T Z  during which zero volts are applied. The duty cycle is defined as the ratio of the period T P  to T S . The pulse may be applied during T P  by switching the transistors as described in the first configuration, with both T 1  and T 2  closed. The zero voltage may be applied during T Z  by switching the transistors to the third configuration by opening T 2  while keeping T 1  closed. The effective voltage is then the average voltage over T S , i.e., the duty cycle times v r . Similarly, v(t) may be made negative by alternately applying the second transistor configuration, with both T 1  and T 2  open (providing the negative rail voltage) and the fourth configuration, by closing T 2  while keeping T 1  open (providing zero volts). 
     Switching transistors as described above results indirectly in the control of electric currents through the solenoids, magnetic fluxes in the cores and poles, magnetic forces on the plungers, and plunger motion. These methods may be used to match a predefined kinematic behavior of the plungers, such as path s(t) shown in  FIG.  11   , which represents a single open-close cycle of a valve. Many alternative paths are possible, so this is provided for illustrative purposes. The plunger begins in its closed position (displacement s=0 at time t 0 ), when a constant upward (positive) magnetic force is applied to the plunger through time t 1 . This results in a constant upward acceleration a 0 . The constant acceleration means that the speed u(t) increases linearly over this time. At t 1 , an opposite net force is applied for an equal amount of time, resulting in a negative constant acceleration until the plunger reaches its open position s 2  at t 2 . No further net forces are applied until t 3 , when the plunger is closed by applying a constant negative force followed by a constant positive force. The magnitudes and durations of the applied forces during closing mirror those during opening. The closing operation is complete at t S . The valve then remains closed until t 6 , at which point the cycle repeats. 
     To compare the actual plunger position against the idealized cycle path s(t) of  FIG.  11   , embodiments of the present disclosure provide for measuring plunger position at selected intervals over the cycle. Embodiments of the present disclosure provide for methods of detection that do not necessarily require dedicated position sensors, thereby avoiding costly hardware and difficult engineering problems associated with the high temperatures and pressures inside the pressure vessels in at least some embodiments. In this context, position measurement intervals are illustrated by example period T S  of  FIG.  10   . There may be many such intervals within the cycle, e.g., 100, depending on the desired measurement resolution, accuracy, and the speed of measurement and computation. 
     By Faraday&#39;s law, the voltage v across a solenoid is equal to the number of turns N around the core times the rate of change of magnetic flux ϕ through the core. The flux depends upon solenoid current i and position z of the plunger along its vertical axis. Faraday&#39;s law may therefore be expanded as Eqn. 1: 
     
       
      
       v=N∂ϕdi/∂i dt+N∂ϕdz/∂z dt  
      
     
     The first term of Eqn. 1 is in the form of voltage across a stationary inductor. The second term relates solenoid voltage to plunger speed. The above equation may be re-written as Eqn. 2: 
     
       
      
       v=LΔi/Δt+Ku  
      
     
     where the current-related differentials are replaced by finite intervals, the coefficient in the first term is replaced by a defined inductance L, the coefficient in the second term is replaced by K, and the plunger speed is denoted u. Inductance L is known to be a function of plunger position because the reluctances of the two pole-ring gaps depend on the areas of overlap, and these change with plunger position. K is known to be a function of current because flux ϕ is a function of current, and the definition of K−N times the partial derivative of ϕ with respect to z—holds current constant. Furthermore, we know based on physical laws that neither plunger speed u nor current i can change instantaneously (as in step functions), even when a voltage is applied or removed at the solenoid terminals. They may, however, change in a continuous fashion. 
     In reference to  FIG.  10   , two sets of measurements are conducted, the first over time interval T P , and the second over time interval T Z . In the first set, current is measured at points a and b. In this set, Δt 1  of Eqn. 2 is T P , Δi 1  of Eqn. 2 is the current as measured at b minus the current as measured at a, and v 1  of Eqn. 2 is v r . In the second test, current measurements are taken at c and d. These are used in a second instance of Eqn. 2 in which Δt 2  is T Z , Δi 2  is the difference in current measurements, and v 2  is zero. A system of two equations are thereby produced with two unknowns: L and Ku. These are readily solved for L and Ku. This results in a measurement of inductance L in interval T S  which may be converted by any of several means to the corresponding plunger position z. 
     In some embodiments, the conversion to position is based an empirical lookup table developed and added to the valve controller  43  prior to operation. The table may be created by independently measuring position and inductance at several points. Later, when operating the valve, the controller interpolates position based on data contained in the table. In some embodiments, the data may instead be converted into a model function, such as a polynomial, with coefficients selected to fit the function to the measured data. Model coefficients are added to the controller. The controller may then use the same model and coefficients during operation to calculate position as a function of inductance. 
     In some embodiments, the controller includes a self-calibration mode that is performed prior to operation. This mode may be automatically performed at any time. This mode assumes a model form, such as a linear relationship, between inductance and position. When operated in such a mode, the controller determines the inductance at each of the two extreme known positions as limited by physical stops. It can do this by measuring inductance over a range of conditions and determining the minimum and maximum inductance. In the upper electromagnet, inductance increases with z, and in the lower electromagnet, the inductance decreases with z, so it is possible to determine in both cases the inductance at the closed position and at the maximum open position. From these two points and the assumed model form, the controller can interpolate to create intermediate points of position z and inductance L. It can then create either a lookup table or model function as described above. The linear model is preferred for its simplicity. The actual relationship is of course not linear because of complicated flux fringing between the poles and ring. However, the intended purpose is not to accurately measure position, but rather to open and close a valve along a smooth, continuous pathway, even if this deviates from s(t). 
     Valves never open against a significant pressure gradient. For example, when the valve set is operated as a compressor, gas is drawn into the cylinder through the low-pressure valve, but the valve is only opened when the gas inside the cylinder is approximately equal to the low-pressure source. Also, the drawing of gas by the piston into the cylinder forces open the valve because the expanding cylinder volume results in an internal cylinder pressure lower than the low port pressure. The pressure difference produces a force in the upward direction needed to begin opening it passively, like a check valve. The movement of the plunger may then be detected, triggering the controller to actively open the valve. 
     Embodiments of the present disclosure provide for methods of detecting the time at which valves should open. The following cases are relevant: in compression when drawing gas through the low side valve; in compression when expelling gas through the high side valve; in expansion when expelling gas through the low side valve; and in expansion when drawing gas through the high side valve. In all these cases, the valves should open when the pressures on either side of the plunger heads are equal. 
     According to one embodiment, whenever either valve is closed, it is not necessary to actively control its position. Instead, the plunger is held closed by the pressure above the valve head. This is true for both valves and for both compression and expansion. Though the plunger when closed does not need active control, the method for detecting position is applied continuously. When the plunger position changes from closed to any detectable positive position above its seat, the time for opening the valve is discovered, and the active motion control is initiated. 
     Embodiments of the present disclosure provide for methods of computing sequential PWM duty cycles to reach target solenoid currents. The target solenoid current is the current calculated by the controller in one measurement interval to be carried in the solenoid by the end of the following interval. It may be obtained in any number of ways. In some embodiments a PID controller may be used to calculate a control variable as the sum of PID terms using established PID methods. The control variable may be positive or negative. Referring to  FIG.  9   , a positive value of corresponds to an increase in current in the upper solenoid, i 2 , and a negative value corresponds to an increase current in the lower solenoid, i 1 . If I c  is positive, then the target value for i 2  is set equal to i 2 +I c  and the target value for i 1  is set to zero. Conversely, if is negative, then the target value for i 2  is set to zero and the target value for i 1  is set to i 1 +|I c | (keeping i 1  positive). 
     Regardless of the method for setting target solenoid currents, the following method may be used to set the effective voltage and duty cycles such that the target currents may be reached in the next interval. Inductance L and term Ku are calculated using the methods described previously for determining plunger position. Then, using Eqn. 2, the controller computes effective voltage v required in the next interval. In this calculation, Δi is the required increase in current, i.e., the target current minus the most recent measured current, and Δt is the duration of the interval, T S . Finally, the duty cycle is the resulting effective voltage v divided by the rail voltage v r . For example, if the required effective voltage is 75 V and the rail voltage is 100 V, then the duty cycle to be used in the next interval is 0.75. This means that the controller will impose v r  on the solenoid for 75% of the interval, followed by zero volts for 25% of the interval using transistor switching. In some cases, the calculated duty cycle will exceed 1, in which case the duty cycle will be limited, and the target current will not be reachable in a single interval. The resulting error will be reflected in the next duty cycle calculation. 
     Embodiments of the present disclosure provide for methods of recovering energy used to open and close the valves during braking periods. In various embodiments, upon opening, electrical energy is converted to kinetic energy by putting the plunger into motion. As the plunger slows, whether slowing to the open position or the closed position, the kinetic energy is recovered and returned to the rail. 
     For example, a plunger may be provided in upward motion by activating the upper electromagnet (i.e., current was introduced into the upper electromagnet). To slow the plunger as it approaches an upper limit, the lower electromagnet is be activated, and the upper electromagnet is deactivated. Whether this is performed using PID control or other control method, the effect is the same. Referring to  FIG.  9   , the current in the upper solenoid S 2  is i 2 . To slow the upward motion of the plunger, valve controller  43  switches the transistors into the second configuration by turning OFF both T 3  and T 4 . However, i 2  does not stop instantaneously. It is allowed to continue via path p-h-j-e, during which current flows from the negative rail to the positive rail and back to the power supply, thereby recovering energy used to set the plunger in motion. This recovery of energy will continue until such time as i 2  reduces to zero. By inspection of Eqn. 2, it is possible to see that current will decline because voltage v in this example is −v r  and K, u, L and Δt are all positive. Therefore Δi must be negative. By the conservation of energy, the energy needed to put the plunger in motion is recovered, less losses such as joule, windage, and friction losses. 
     Although the foregoing text sets forth a detailed description of numerous different embodiments, it should be understood that the detailed description is to be construed as exemplary only and does not describe every possible embodiment since describing every possible embodiment would be impractical, if not impossible. Numerous alternative embodiments could be implemented, using either current technology or technology developed after the filing date of this patent, which would still fall within the scope of the claims. To the extent that any term recited in the claims at the end of this patent is referred to in this patent in a manner consistent with a single meaning, that is done for sake of clarity so as to not confuse the reader, and it is not intended that such claim term by limited, by implication or otherwise, to that single meaning. 
     While various embodiments of the present invention have been described in detail, it is apparent that modifications and alterations of those embodiments will occur to those skilled in the art. Moreover, references made herein to “the present invention” or aspects thereof should be understood to mean certain embodiments of the present invention and should not necessarily be construed as limiting all embodiments to a particular description. It is to be expressly understood that such modifications and alterations are within the scope and spirit of the present invention.