Piston motion control of a free-piston engine generator: A new approach using cascade control

The free-piston engine generator (FPEG) is a linear energy conversion system, which is known to have greater thermal efficiency than an equivalent and more conventional reciprocating engine. The piston motion of a FPEG is not restricted by a crankshaft-connection rod mechanism, it must be controlled to overcome challenges in the starting process, risk of misfire, and unstable operation. In this paper, the global control structure for a FPEG prototype is presented. A Cascade control strategy is proposed for the piston stable operation level, and PID controllers are used for both of the outer loop and inner loop. The measured top dead centre of the previous stroke and the piston velocity during the current stroke are taken for controller feedback, and the injected fuel mass is used as the control variable. The proposed cascade control implemented in the FPEG is shown to have good performance, the piston returns to a stable state in 0.5 s. Compared with a single loop control strategy, the performance of cascade control is improved in terms of the control delay, peak error and settling time. 2016 The Authors. Published by Elsevier Ltd. This is an openaccess article under the CCBY license (http:// creativecommons.org/licenses/by/4.0/).


Background
The free-piston engine (FPE) is a linear energy conversion system, and the term 'free-piston' is widely used to distinguish its linear characteristics from those of a conventional reciprocating engine [1][2][3]. Without the limitation of the crankshaft mechanism, as known for the conventional engines, the piston is free to oscillate between its dead centres. The piston assembly is the only significant moving component for the FPEs, and its movement is determined by the gas and load forces acting upon it [4]. During the operation of FPEs, combustion takes place in the internal combustion chamber, and the high pressure exhaust gas pushes the piston assembly backwards. The chemical energy from the air fuel mixture is then converted to the mechanical energy of the moving piston assembly. Due to this linear characteristic, a FPE requires a linear load to convert this mechanical energy for the usage of the target application [1]. As the load is coupled directly to the piston assembly, the technical requirements for the free-piston engine loads are high, which are summarised as: (1) The load must provide satisfactory energy conversion efficiency to make the overall system efficient. (2) The load may be subjected to high velocity. (3) The load may be subjected to high force from the cylinder gas. (4) The load device may be subjected to heat transfer from the engine cylinders. (5) The size, moving mass and load force profile are feasible to be coupled with the designed FPEs.
Reported load devices for the FPEs include air compressors, electric generators and hydraulic pumps [5][6][7]. In this research, the FPE is connected with a linear electric generator (free-piston engine generator, FPEG) and is investigated with the objective to utilise the configuration within a hybrid-electric automotive vehicle power system. Since the FPEG was first proposed, it has attracted interest from all over the world. Different research methods and prototype designs have been reported using the FPEG concept [8][9][10][11]. However, to date, none of these have been commercially realised in part due to the challenges of system control.
In conventional engines, the crankshaft mechanism provides piston motion control, defining both the outer positions of the piston motion (the dead centres) and the piston motion profile. Due to the high inertia of the crankshaft system, the piston motion cannot be influenced in the timeframe of one cycle [12]. In the free-piston engine, the piston motion is determined by the instantaneous sum of the forces acting on the mover, and the piston motion is therefore influenced by the progress of the combustion process [13]. Moreover, the piston motion profile may be different for different operating conditions. Variations between consecutive cycles due to cycle-to-cycle variations in the in-cylinder processes are also possible [7,14,15]. Overcome controlling of the FPEG engine is a challenging task.

Literature review
A model-based controller was developed for the European Commission-funded Free Piston Energy Converter (FPEC) project. The controller was implemented in a real-time control prototype system and tested on a FPEG simulation model [16]. The controller consisted of an observer, and output power controller, an ignition time controller, and a servo controller that was used to control the velocity of the moving mass. The outer control loop was used to meet the output power requirement, and the inner loop was used to set the optimal ignition timing for ignition. The electromagnetic force and the input fuel mass were selected as control inputs, and output power and ignition timing were the control outputs [16].
Johansen et al. proposed a control structure for the FPE [17][18][19], which was a multi-level control system. The upper level was the supervisory control and optimisation, aimed to perform logic control and adapt the operating characteristic. The next level was the piston motion control, where commands were given to the timing subsystems to control the piston motion. At the lowest level there was timing control, i.e. fuel injection timing and valve timing for each cycle. A hierarchical multi-rate electronic control system was developed for an experimental engine, focusing on piston motion parameter estimation, valve and injector timing, and a piston motion control system. The present results showed that the current state of the art electronic control technology provided the required processing capacity and resolution to implement the required control system functionality of modern high-speed FPEs. A major challenge was to optimise the engine and control system to get sufficiently high reliability, fault tolerance and robustness [18,19].
Mikalsen and Roskilly discussed the basic features of a single piston FPEG under development at Newcastle University and investigated engine control issues using a full-cycle simulation model [13,20,21]. The control structure was similar to that presented by Johansen. The response of the engine to rapid load changes was investigated using decentralised PID, PDF and disturbance feed forward. It was identified that PDF feedback control was more suitable for the FPEG than a conventional PID controller. The engine was found to be sensitive to immediate electric load changes, whilst the effect of cycle-to-cycle combustion variations was reported as not critical. It was concluded that the control of the FPEG was a challenge, but the proposed control strategy was technically feasible [21].
To reduce the time delay in the control loop, a predictive control system was further proposed by Mikalsen and Roskilly. The piston TDC was predicted from the piston velocity in the compression stroke, rather than measured from the previous operation cycle to improve the dynamic performance of the controller. Significant improvement was observed using the proposed control method compared with a conventional PI feedback controller, including a faster response and lower error [20]. The proposed control scheme was put forward to make use of a more advanced fuzzy control system which could take the nonlinear and multi-variable characteristic of the control problem into consideration [20].

Summary
As the piston motion of FPEG is not restricted by a crankshaftconnection rod mechanism, the piston is free to move between its TDC and BDC, and the movement is only controlled by the gas and load forces acting upon it. This induces problems such as difficulties in the starting process, misfire, unstable operation and complex control strategy [2,4,22]. For different configurations, the control objectives vary and these are summarised in Table 1. To meet these challenges, a robust control system is required for the FPEG. Control of piston TDC position is crucial for stable operation. It should be controlled within tight limits to ensure a sufficient compression ratio for ignition and efficient combustion, but must also to avoid mechanical contact between the piston and cylinder head.
As the piston is free to move between its instantaneous TDC and BDC positions, and this movement is only controlled by the gas and load forces acting upon it. This creates challenges in the starting process, risk of misfire, and unstable operation [23,24]. In this paper, control challenges for the FPEG will be analysed and the global control structure will be presented. As the control of piston dead centres are crucial for the FPEG compared with conventional reciprocating engines, the piston motion control is selected as the main objective in this research. A Cascade control method is proposed to be implemented, and the controller performance will be simulated and discussed.

FPEG configuration
The FPEG developed at Newcastle University is illustrated in Fig. 1. It is comprised of two internal combustion cylinders, and a linear electric machine is located in the middle of these two cylinders. The two pistons are connected using the mover of the linear electric machine, this component is the only significant moving part of the system. Spark ignition combustion mode is selected, as it is easier to initialize combustion using a spark plug than compression ignition or homogenous charge. Poppet valves are used for both intake and exhaust processes instead of scavenging ports design. The main issue in using scavenging ports for a FPEG is that the port opening and closing timing is controlled by the piston movement, which is fixed during the design process. By applying intake and exhaust valves with independent timing control, the gas exchange process is then decoupled from the piston motion. The prototype specifications and the values of the input parameters have been listed in Table 2.

Control challenge and objectives
For the conventional engine, an engine control unit (ECU) is now used widely to control a series of actuators to ensure optimal engine performance. The ECU reads data from sensors, and interprets the valves using multidimensional lookup tables, and then adjusts the corresponding actuators. The ECU is used widely to control the air/fuel ratio, ignition timing, engine idle speed and valve timing [26]. The crankshaft mechanism determines the piston profile and provides piston motion control. Due to the high inertia of the flywheel, the piston movement cannot be easily affected by potential disturbance in one cycle. A starting motor is widely used on gasoline engines to initiate the engine rotary motion and operation. When electric current from the starting battery is applied to the solenoid of the motor, the solenoid engages a lever that pushes out the drive pinion on the starter driveshaft and meshes the pinion with the starter ring gear on the flywheel of the engine [27].
The need for a crankshaft mechanism has been eliminated in a FPEG. Its piston motion is not limited by the mechanical system, and the compression ratio is a control parameter or variable. The piston profile is therefore not fixed, and it is therefore more prone to be influenced by disturbances. Another crucial technical challenge in the FPEG operation is the starting process, which is the initial process of overcoming the compression force to achieve the required piston speed and compression ratio for stable and continuous operation [28]. Despite these challenges, only a few detailed investigations on the control strategy of the FPEs have been reported, as most of the research work concentrate on the design, simulation or performance prediction of FPEs in stable operation [29,30]. A sophisticated engine system normally contains a large number of control loops [31]. For the design of these feedforward and feedback control systems [31], the main objectives are: (1) The system demand for energy supply, and low fuel consumption must be met. (2) The piston is controlled to move in a stable manner between its target BDC and TDC, or to reach and maintain the target dead centres. (3) The engine must be maintained in a safe operation region to avoid damage or fatigue of the material. Engine knocking, overheating, or poor lubrication must be prevented. (4) The emission limits must be met. For spark-ignited engines, precise stationary air/fuel ratio control is required.
It is observed that, the objective (1), (3) and (4) are identical with the main objectives listed for the control of conventional spark ignited engines, whilst objective (2) is unique for the control of FPEG. Since these objectives are partially in contradiction, they must be fulfilled according to defined set priorities. The hardware implementation of all control problems arising in the FPEG system is beyond the current research stage. Thus objective (2), the piston motion control is selected as the main objective in this research to investigate the stable operation of the FPEG.

Control structure
The proposed control structure for the FPEG is illustrated in Fig. 2, which is a multi-layer control system. The general working principles for each control level are discussed below, and further explanation is presented in the following section.
(1) The top level is the engine start/restart control level, which identifies the engine start and misfire signals to decide the working mode of the linear electric machine. When the FPEG system starts from a cold condition, the linear electric machine is operated as a motor to drive the piston assembly  back and forth to reach the required compression ratio for ignition. The machine will then be switched to generator mode to output electricity during the stable generating process. During the operation of the FPEG, if an engine misfire is detected, the linear electric machine will be switched from generator to motoring mode to restart the engine. (2) The supervisory control level decides the TDC setpoint, the throttle opening as well as the external load according to the engine performance and the target output power. The requested TDC setpoint will be used as the reference signal to the controller in the lower level. (3) The piston control level reads the piston TDC data, and updates the control variables to the system. Feasible controllers and algorithms will be applied in this level. The TDC setpoint received from the upper level will be taken as the reference to the controller, and updated values for the control variables will be generated and provided to the lower level. (4) The timing control level receives the updated values of the control variables, and output the suitable values for the ignition timing, injection timing, and valve timing. This level can be considered as a software implementation level for the actuators, and can be programmed in LabVIEW software in the prototype. It further calculates the piston TDC value from the piston displacement data, and feeds this back to the piston control level. (5) The actuator control level receives the updated timing setting, and generates transistor-transistor logic (TTL) command signals to the actuators of the FPEG prototype. It acts as a hardware level for the actuators, and it is implemented using the National Instruments CompactRIO hardware in the prototype. It also reads and decodes the electric signals from the sensors, and outputs the engine performance data to the upper level. (6) The basic level on the structure is the FPEG prototype with control actuators and sensors. The linear electric machine, the injector, the ignition plug, the throttle and the intake/ exhaust valves are controlled by the command signals from the upper level. Signals from the sensors are collected and feed back to the upper level for further analysis.

FPEG numerical description
As there is compressible gas in both cylinders, the gas acts like nonlinear springs. Here we consider the FPEG system as analogous to a mass-spring system. The analogies between a mass-spring damper and a FPEG system are summarised in Table 3. For the dual piston FPE, the engine is operated in a two-stroke cycle mode, and during stable operation combustion occurs alternately in each chamber. This means that the system is running under an external excitation, which is determined by the heat released during the combustion process. As a result, the dual piston FPE will show similar characteristics to the vibration system under external excitations after proper simplification.
Assumptions are made to simplify the system, i.e. (a) energy consumed by the heat transfer to the cylinder walls and gas leakage through the piston rings are ignored; (b) the running cycle of FPEG is two adiabatic compression/expansion processes connected with a constant volume heat release process. The FPEG system is finally described by a forced mass-spring vibration system under external excitation. Details for the model simplification and validation can be found in our previous publications [32]. The model is designed specifically for use in control applications. The simplicity and flexibility of this model make it feasible to be implemented and coupled with real-time HIL simulation model for the future piston dynamic control system development. The simplified dynamic equation is expressed as below: where m is the moving mass of the mover with the pistons (unit: kg); x is the mover displacement (m); the constant c is the damping coefficient; the constant of proportionality k is the spring constant; k v is the coefficient of the load force, and it varies with the load resistance; and FðtÞ is the excitation force; c is the heat capacity ratio; p 0 is the ambient pressure (Pa); A is the piston surface area (m 2 ); L s is the length of half stroke (m); m f is the injected fuel amount to the combustion chamber (kg); L c is the length of the clearance (m); CR is the set geometric compression ratio, which is affected by the ignition timing due to the ideal constant volume  Excitation force Heat release force Ls Cv heat release process; H u is the low heating value of the fuel with the combustion efficiency (J/kg); C v is the heat capacity at constant volume (J/m 3 K); V 0 is the cylinder volume at the beginning of the compression stroke (m 3 ).

System input and output analysis
As the control system is aimed for piston stable running control, the piston is controlled to reach and maintain the target TDC, x TDC . The solution to Eq. (1) can be obtained according to vibration theory [33], and the piston displacement is then defined by: As a result, the TDC is selected as the system output, which can be calculated by: The angular natural frequency x of a FPEG is expressed by: The engine speed, H n (Hz) is a useful output sign for the observation of the engine operation, which is obtained by: From Eqs. (3) and (5), it is apparent that both the TDC and engine speed are influenced by various input parameters, which can be selected as control variables. The potential control parameters are summarised in three categories, and presented in Table 4. The engine capacity is decided during the hardware design process, thus the piston area, stroke length and moving mass are not considered as feasible real-time control inputs. The injected fuel amount is found to be impact on both piston TDC and engine speed. Whilst the electric load only influences to the piston TDC according to Eqs. (3) and (5), and it is often considered as a disturbance to the system [13,21]. As a result, the injected fuel amount was selected as the main control variable in this research. Varying the injected fuel mass will affect the amount of energy released in the combustion process. The data presented in Fig. 3 shows the effect of the injected fuel mass per cycle on engine operation performance using Eqs. (3) and (5). When the fuel mass changes from a wide range from À90% to 90% in the model, i.e. without considering its physical feasibility, the TDC increases from 2 mm to 24 mm (engine stroke length from À20 mm to 20 mm). The engine TDC is sensitive to the injected fuel mass amount, and small variations in the current engine can lead to large changes in TDC and compression ratio. For an engine with a stroke length of 40 mm, as considered here, a TDC variation of ±1% of the stroke length would be equivalent to 0.4 mm and would produce a compression ratio variation of approximately ±1.0. However, the influence of the injected fuel mass on the engine speed is not that obvious compared with that on the piston TDC, the equivalent engine speed is limited within the range from 700 to 1500 rpm with the fuel mass changes from a wide range from À90% to 90%.

Cascade control introduction
The special configuration and characteristics of the FPEG make it different from the control system for conventional engines. From the above simulation results, it is shown that for any disturbance there will be change on the piston TDC, and the disturbance will corresponding affect the TDC for every subsequent cycle. From the reported literature, most of the controllers for the FPEs are designed to be single loop controller with single control input and single output (SISO) [21,34]. If the piston TDC is used as a feedback signal, and the injection amount is the control variable of the control system, the information flow diagram for a single feedback controller is illustrated in Fig. 4.
The series of events for a two-stroke FPEG cycles with SISO controller actions are summarised in Table 5. It is observed that the control variable can be updated once per stroke. When a disturbance occurs during event (1) or (2), the piston TDC of the right cylinder will be affected and further detected by the controller at (3). The controller action will be set during (4) and the injection will be updated at (5), then the error will be corrected gradually from (6). A significant delay is found in this SISO control system. When a disturbance happens in stroke 1# of cycle 1#, correction will not take place until the stroke 1# of cycle 2#, one full cycle after the disturbance occurs.
If the error of the SISO controller is significant, and cannot be corrected at the current cycle due to the controller delay, this may induce misfire or mechanical contact between piston and cylinder head. In order to improve the controller performance and to reduce the controller delay, cascade control strategy is proposed to be implemented in the FPEG piston stable motion control system. The cascade control, in contrast with SISO control, makes use of multiple control loops that involve multiple feedback signals for one control variable [35,36]. The information flow with cascade control is shown in Fig. 5. It uses the measured piston TDC and velocity signals to control the injected fuel mass.
The block diagram of the FPEG coupled with cascade control is illustrated in Fig. 6. In such a control system, the output of the outer loop will determine the set point for the inner loop, and the output of the inner loop is used to update the control variable. The implementation of cascade control makes it possible to take both of the measured TDC of the previous stroke and the measured piston velocity at the current stroke as feedback, the injected fuel mass being the control variable, thus potentially providing better performance than a single loop controller. It will detect the fluctuations from the secondary controller, and reduce the influence to the primary controller. If a disturbance occurs during (1) or (2) in Table 5, the secondary controller can detect the piston velocity at the middle stroke of the current operation stroke, and then correct the error at (3). Thus the control delay will be reduced significantly compared with the single feedback controller.
The Proportional-Integral-Derivative (PID) controllers are used in both of the outer loop and inner loop. PID controller is a three-term controller that has a long history in the automatic control field [37,38]. Due to its intuitiveness and its relative simplicity, Injected fuel mass, m f -in addition to satisfactory performance, it has become a standard controller across many industrial settings [39][40][41]. Applying a PID control law consists of applying the sum of three types of control actions: a proportional action, an integral action and a derivative one. In the Laplace domain, the three actions can be described by the following equation [42]: The controller transfer function CðsÞ can be written as: where UðsÞ is the control variable; EðsÞ is the control error; K p , K i and K d are the proportional gain, integral gain and derivative gain respectively.

Controller performance simulation
The FPEG system coupled with cascade control illustrated in Fig. 6 is simulated in Matlab/Simulink. A subsystem is developed to simulate the occurrence of potential disturbance, and immediate change on the electric load is used to represent the effects of all kinds of possible disturbance to the system. As the piston motion is decided by the net forces acting on the piston, any type of disturbance will lead to an immediate change of the net forces, which acts as an extra force on the piston. Thus the results of electric load change may be taken to represent the effects of other disturbances.
The electric load, injected fuel mass, as well as the other initial parameters are taken as inputs to the FPEG fast response numerical model, and the piston displacement and velocity are thus obtained. The piston TDC and the piston velocity at middle stroke are then further evaluated and feedback to the controllers. When an error on either the piston TDC or the piston velocity at middle stroke is detected, the cascade control algorithm will take action, and correct the injected fuel mass. The updated injection information will be output to the injection system, and the corrected fuel mass will be delivered when the piston reaches its TDC.
As the effect of the derivative gain term is limited in the TDC control loop, the controller performance was investigated using a PI controller only [21]. By setting the values of the proportional gain and integral gain in the feedback control system, two PI con-   trollers were successfully implemented to the simulation programme. An example of the engine response to a 15% step decrease of electric load is shown in Fig. 7. The disturbance occurs immediately at 1.1 s, and the controller performance proved sufficiently robust. The cascade control takes action during the cycle when disturbance occurs, and the piston TDC is gradually reduced during that cycle. The settling time is acceptable, and the piston TDC is controlled to be back to its set point in 0.5 s. The injected fuel mass for each cycle after the occurrence of the disturbance is illustrated in Fig. 8. It is observed that when an error on the piston velocity at the middle stroke position is detected by the controller, the injector is controlled to take action from the current cycle to reduce the error. However, the variations on the injected fuel mass are presented in Fig. 8 are not that significant, which should be controlled with high accuracy. The port injection system spray design means that the fuel is injected behind the intake valve, and the fuel will be draw into the cylinder when the intake valve opens. This may induce to some fuel drop out of the air, and may affect the control accuracy.
The data in Fig. 9 demonstrates the engine response to a 15% step increase of electric load. The disturbance takes place at 1.1 s, and the controller takes action when the error is detected. The piston TDC increases from the current cycle when disturbance occurs, both of the piston TDC and the piston velocity are controlled to the target value in less than 0.5 s, indicating that the controller perfor-mance is acceptable. From Figs. 8 and 9, it is observed that the proposed cascade control implemented in the FPEG is feasible for both immediate load decrease and increase. The system will be back to the stable state in an acceptable period. The parameters of the PID controller are manually tuned, and the controller performance   could in principle be further improved with optimised control parameters.
The error of cascade control is demonstrated in Fig. 10, with the error of the single loop control as well as the error without active control compared in the same figure. The maximum error happens at the first cycle after the disturbance occurs. With the designed cascade control, the error for piston TDC begins to decrease from the first cycle onwards. Whilst with the single loop PID control, the error decreases from the second cycle as the controller is unable to update the injected fuel mass only when an error for the first cycle is detected. The purple lines in Fig. 10 are ±0.1 mm from the TDC, and the orange lines are the settling time, i.e. the time it takes for the controller to bring the response within these bounds. It is obvious that, by implementing the cascade control, the outcome is better in terms of both peak error and the observed settling time.
As the disturbance may occur anywhere during the operation of the FPEG, the performance of the proposed cascade control is simulated with different disturbance occurrence times. According to our previous simulation and experimental investigation on the operation of the FPEG, the piston profile is similar to that of a constant amplitude and frequency oscillation system [5,15,43]. The FPEG system is finally described by a forced mass-spring vibration system under external excitation, which is designed specifically for use in control applications. From the validation results, the fastresponse model can predict the piston amplitude and operation frequency with acceptable accuracy. Details for the model simplification and validation can be found in our previous publications [32]. Four typical points for the disturbance occurrence are highlighted in Fig. 11  . Cascade control performance with load step increase. Fig. 10. Cascade control error analysis. Fig. 11. Illustration of disturbance occurrence time.
As demonstrated in Fig. 12, the error of the cascade control on the piston TDC varies with different disturbance onset time. Whenever the disturbance takes place, the controller performance proved acceptable, and the system returned to a stable state in less than 10 cycles (approximately 0.5 s). It is observed that if the disturbance occurs earlier before the piston arrives the middle stroke, the peak error will be reduced compared with those which takes place afterwards. This is because once a disturbance occurs shortly after TDC/BDC (Stroke 1# a and Stroke 2# c), an error on the piston velocity will be detected by the controller at the middle of the stroke, and the control variable will be updated in the current stroke. However, if the disturbance takes place after the piston arrives the middle of the stroke (Stroke 1# b and Stroke 2# d), the controller will not take action until the subsequent stroke. As a result, the proposed cascade control implemented in the FPEG system is more effective when the disturbance occurs before the piston arrives the middle position.
For the single loop controller, shown in Fig. 13, the peak errors are the same whenever the disturbance occurs. The piston TDC for the previous cycle is the only feedback, thus it does not take action until the next cycle. As a result, since the disturbance occurs in the current cycle, the error will not be detected immediately during the same cycle, and the timing of the disturbance is of little importance to the controller performance.

Conclusions
As the piston motion of FPEG is not restricted by a crankshaftconnection rod mechanism, the piston is free to move between its two dead centres, and the movement is only controlled by the gas and load forces acting upon it. This induces problems such as difficulties in the starting process, misfire, unstable operation and complex control strategy. Control of piston TDC position is crucial  for stable operation. In this paper, the global control structure for the FPEG prototype is presented, which is a multi-layer control system including the engine start/restart control level, supervisory control level, piston control level, timing control level, actuator control level, and the prototype level with actuators and sensors. Cascade control strategy is proposed for the piston stable operation level, and PID controllers are used in both of the outer loop and inner loop. Both of the measured TDC of the previous stroke and the piston velocity during the current stroke are taken for feedback, and the injected fuel mass is used as the control variable.
According to the simulation results, the proposed cascade control implemented in the FPEG shows good performance, and it is feasible for both immediate load decrease and increase. The system returns to the stable state in 0.5 s, which is acceptable. Compared with single loop control, the performance is improved by implementing the cascade control in terms of the control delay, peak error and settling time, and it is more effective when the disturbance occurs before the piston arrives the middle position in each stroke. The model we used have been validated with the test data from a running prototype, which means the results from this paper is feasible to be used in the real prototype. Meanwhile, the algorithms for the fast-response model and the PID controllers in the cascade control strategy are simple and flexible, and they can be easily coupled with real-time Hardware-in-the-Loop control application.