5th 5th IFAC IFAC Conference Conference on on Engine and Powertrain Control, Simulation Simulation and and Modeling Modeling 5th IFACand Conference onControl, Engine Powertrain Available online at www.sciencedirect.com 5th IFACand Conference onControl,20-22, Changchun, China, September 2018 and Modeling Engine Powertrain Simulation Changchun, China, September 20-22, 2018 Engine and Powertrain Control,20-22, Simulation Changchun, China, September 2018 and Modeling Changchun, China, September 20-22, 2018
ScienceDirect
IFAC PapersOnLine 51-31 (2018) 632–639
Nonlinear Nonlinear Nonlinear Starting Nonlinear Starting Starting Starting
Model Predictive Control for the Model Predictive Control for the Model Predictive Control for the Process of a Free-Piston Model Predictive ControlLinear for the Process of a Free-Piston Linear Process of a Free-Piston Linear Generator Process of a Free-Piston Linear Generator Generator Generator ∗∗ ∗ Martin Keller ∗∗∗ Bernhard Jochim ∗∗ ∗∗ Dirk Abel ∗ ∗
Martin Keller ∗∗∗Bernhard Jochim Dirk Abel ∗∗ ∗∗ Dirk Abel ∗ ∗∗∗ Martin Keller ∗∗∗ Jochim ∗∗ ∗∗∗ Joachim Beeckmann Heinz Pitsch Albin ∗∗Bernhard ∗∗ Thivaharan ∗∗∗ Joachim Beeckmann Heinz Pitsch Thivaharan Albin ∗∗ ∗ ∗∗Bernhard Jochim ∗∗ Martin Keller Dirk Abel Joachim Beeckmann ∗∗ Heinz Pitsch ∗∗ Thivaharan Albin ∗∗∗ ∗∗∗ Heinz RWTH PitschAachen Thivaharan Albin ∗ Joachim Beeckmann ∗ for Automatic Control, University, Aachen, ∗ Institute ∗ Institute for Automatic Control, RWTH Aachen University, Aachen, Institute for Automatic Control, RWTH Aachen University, Aachen, Germany (e-mail:
[email protected], ∗ Germany (e-mail:
[email protected], Institute for Automatic Control, RWTH Aachen University, Aachen, Germany (e-mail:
[email protected],
[email protected])
[email protected]) ∗∗ Germany (e-mail:
[email protected],
[email protected]) ∗∗ for Combustion Technology, ∗∗ Institute Technology, RWTH RWTH Aachen Aachen University, University, ∗∗ Institute for Combustion
[email protected]) Institute for Combustion Technology, RWTH Aachen University, Aachen, Germany (e-mail:
[email protected], Aachen, Germany (e-mail:
[email protected], ∗∗ Institute forGermany Combustion Technology, RWTH Aachen University, Aachen, (e-mail:
[email protected],
[email protected],
[email protected])
[email protected],
[email protected]) ∗∗∗
[email protected], Aachen, Germany (e-mail:
[email protected],
[email protected]) ∗∗∗ Institute for Dynamic Systems and Control, ∗∗∗ Institute for Dynamic Systems and Control, ETH ETH Zurich, Zurich, Zurich, Zurich, ∗∗∗
[email protected],
[email protected]) Institute for Dynamic Systems and Control, ETH Zurich, Zurich, Switzerland (e-mail:
[email protected]) Switzerland (e-mail:
[email protected]) ∗∗∗ Institute forSwitzerland Dynamic Systems Control, ETH Zurich, Zurich, (e-mail:and
[email protected]) Switzerland (e-mail:
[email protected]) Abstract: Abstract: Free-piston Free-piston linear linear generators generators (FPLG) (FPLG) attract attract aa lot lot of of attention attention and and are are under under ongoing ongoing Abstract: Free-piston linear generators (FPLG) attract a lot of attention and are under ongoing investigation due to their fuel efficiency, low emissions and the compact design as generator unit. investigation due to their fuel efficiency, low emissions and the compact design as generator unit. Abstract: Free-piston linear generators (FPLG) attract a lot attention and aare under ongoing investigation due to their efficiency, emissions and theof compact asmajor generator unit. The main characteristic characteristic offuel FPLGs is the thelow absence of a crankshaft, crankshaft, which design poses major challenge, The main of FPLGs is absence of a which poses a challenge, investigation due tomoves theiroffuel efficiency, low emissions and the compact design as generator unit. The main characteristic FPLGs is the absence of a crankshaft, which poses a major challenge, because the piston freely. Hence, the locations of top dead center (TDC) and bottom dead because the piston movesoffreely. Hence, the locations top dead center (TDC) bottom dead The main characteristic FPLGs is the absence ofthis a of crankshaft, which poses aand major challenge, because the piston moves freely. Hence, the locations of top dead center (TDC) and bottom dead center (BDC), have to be controlled precisely. In contribution, an approach for modeling center (BDC), have to be controlled precisely. In this contribution, an approach for modeling because the of piston moves freely. Hence, the locations of top dead center (TDC) and bottom dead center (BDC), have to be controlled precisely. In this contribution, an approach for modeling and control a FPLG is presented. The combustion cylinder and the bouncing chamber on and control of ahave FPLG is presented. The combustion cylinder and thean bouncing chamber on the the center (BDC), to be controlled precisely. In this contribution, approach for modeling and control of a FPLG is presented. The combustion cylinder and the bouncing chamber on the opposite side side are are described described with with a a physics-based, physics-based, continuous-time continuous-time thermodynamic thermodynamic model. model. For For opposite and starting control of a FPLG is presented. The combustion cylinder and the bouncing chamber on For the opposite side are described with a physics-based, continuous-time thermodynamic model. the process of the FPLG a nonlinear model predictive controller (NMPC) with multiple the starting of the FPLG nonlinear modelcontinuous-time predictive controller (NMPC) with multiple opposite sideprocess are described with aaa for physics-based, thermodynamic model. For the starting process of the FPLG nonlinear model predictive controller (NMPC) with multiple shooting discretization is designed a safe and reliable starting process. shooting discretization is designed a safe and reliable starting process. the starting process of the FPLG a for nonlinear model predictive controller (NMPC) with multiple shooting discretization is designed for a safe and reliable starting process. © 2018, IFAC (International Federationfor of Automatic by process. Elsevier Ltd. All rights reserved. shooting discretization is designed a safe andControl) reliableHosting starting Keywords: Keywords: Free-Piston Free-Piston Linear Linear Generator, Generator, Engine Engine Modeling, Modeling, Nonlinear Nonlinear Model Model Predictive Predictive Keywords: Free-Piston Linear Generator, Engine Modeling, Nonlinear Model Predictive Control, Multiple Shooting Control, Multiple Shooting Keywords: Free-Piston Linear Generator, Engine Modeling, Nonlinear Model Predictive Control, Multiple Shooting Control, Multiple Shooting 1. FREE-PISTON LINEAR LINEAR GENERATORS pled pled by by aa freely freely moving moving piston. piston. The The gas gas spring spring works works as as a a 1. 1. FREE-PISTON FREE-PISTON LINEAR GENERATORS GENERATORS pled by a chamber freely moving piston. the Thepiston gas spring works as a bouncing to decelerate moving towards bouncing chamber to decelerate the piston moving towards 1. FREE-PISTON LINEAR GENERATORS by a freely moving piston. The gas spring works as a bouncing to decelerate piston moving towards BDC and to it towards the combustion Free-piston linear generators generators (FPLG) are aa promising promising pled BDC andchamber to accelerate accelerate it back backthe towards the combustion Free-piston linear (FPLG) are bouncing chamber to decelerate the piston moving towards BDC and to accelerate it back towards the combustion chamber to initiate the next combustion cycle. The Free-piston linear generatorsengine (FPLG) are aInpromising and innovative innovative combustion concept. contrast chamber to initiate the next combustion cycle. The pispisand combustion engine concept. In contrast BDC movement andtotoinitiate accelerate it current back towards the combustion Free-piston linear generators (FPLG) are a promising the aanext combustion cycle. The piston’s induces in the linear generator, and innovative combustion engine concept. In contrast to conventional conventional combustion combustion engines, engines, which which transfer transfer the the chamber ton’s movement induces current in the linear generator, to chamber to initiate the anext combustion cycle.generator, The pisandconventional innovative combustion engine concept. In contrast ton’s movement induces current in the linear which can for propulsion or auxiliary to combustion engines, whichenergy transfer chemically bounded energy rotational of which can be be used used for electric electric propulsion or for forgenerator, auxiliary chemically bounded energy to to rotational energy of the the ton’s movement induces a current in the linear to conventional combustion engines, which transfer the which can be used for electric propulsion or for auxiliary chemically energy the to rotational energy of the units. crankshaft, bounded FPLGs transfer transfer fuel’s to the fuel’s energy energy to translatranslacrankshaft, FPLGs which can be used for electric propulsion or for auxiliary chemically bounded energy to rotational energy of the units. units. crankshaft, FPLGs transfer the fuel’s energy to translational energy of the piston, which is directly converted which is directly converted Due tional energy of the piston, Due to to the the absence absence of of aa crankshaft, crankshaft, new new degrees degrees of of freedom freedom crankshaft, FPLGs transfer the fuel’s energy to translational energy of the piston, which is directly converted to electric electric energy energy by by the the linear linear generator. generator. Fig. Fig. 1 1 gives gives an an units. Due to the absence of a crankshaft, new degrees of freedom to for the piston movement can be realized. This allows for tional energy ofinvestigated the piston, which is directly converted for the piston movement can be realized. This allows for to electric energy by the linear generator. Fig. 1 gives an overview of the system setup. Duethe to the absence ofpiston a crankshaft, new as degrees of freedom overview of the investigated system setup. for piston movement can be realized. This allows for variable stroke and trajectories well as variable variable stroke and piston trajectories as well as variable to electric energy by the linear generator. Fig. 1 gives an overview of the investigated system setup. for the piston movement can be realized. This allows for variable stroke and piston trajectories as well as variable compression ratios, which enable fuel flexibility and online compression ratios, which enable fuel flexibility and online overview of the investigatedPermanent system setup. Inlet-/Outlet Inlet-/Outlet variable stroke and piston trajectories as well as variable Permanent compression ratios, which enable fuel flexibility and online downsizing (Mikalsen and (2007)). Furthermore, a downsizing (Mikalsen and Roskilly Roskilly (2007)). Furthermore, a Inlet-/Outlet Permanent Valve Magnets Valve compression ratios, which enable fuel flexibility and losses. online Magnets Piston downsizing (Mikalsen and Roskilly (2007)). Furthermore, a FPLG consists of less moving parts reducing friction Inlet-/Outlet Permanent Piston Valve Magnets FPLG consists of less moving parts reducing friction losses. downsizing (Mikalsen and Roskilly (2007)). Furthermore, a Piston FPLG consists of less moving parts reducing friction losses. Valve Magnets However, in to advantages to Piston FPLG consists of less movingfrom partsthese reducing friction and losses. However, in order order to benefit benefit from these advantages and to However, in order to of benefit from athese advantages and to guarantee reliability operation, proper and conguarantee reliability operation, athese proper and robust robust conHowever, in order to of benefit from advantages and to guarantee reliability of operation, a proper and robust control is required, which is very challenging with such engines trol is required, whichofisoperation, very challenging with engines guarantee reliability aInproper andsuch robust control is required, which is very challenging with such engines (Mikalsen and Roskilly (2010a)). conventional internal (Mikalsen and Roskilly In conventional trol is required, which(ICE) is (2010a)). verythe challenging with such internal engines (Mikalsen and Roskilly (2010a)). In conventional internal combustion engines crankshaft determines the combustion engines (ICE) the crankshaft determines the Fuel Injector Gas Spring Electric Coil of (Mikalsen and Roskilly (2010a)). In conventional internal Fuel Injector Gas Spring Electric Coil of combustion engines (ICE) the crankshaft determines the piston motion motion with with the the fixed fixed TDC TDC and and BDC BDC positions. positions. The The Fuel Injector Gas Spring Electric Coil of piston Linear Generator combustion engines (ICE) the crankshaft determines the Linear Generator piston motion with the fixed TDC and BDC positions. The piston’s movement in free-piston engines is determined by Fuel Injector Gas Spring ElectricGenerator Coil of piston’s movement in free-piston engines is determined by Linear piston motion with acting the fixed TDC and BDC positions. The piston’s movement in free-piston engines is determined by the sum of forces on the piston which in general Fig. 1. System setup of the FPLG with combustion chamLinear Generator the sum of forces acting on the piston which in general Fig. 1. System setup of the FPLG with combustion cham- piston’s movement in free-piston engines is determined by the sum of forces acting on the piston which in general leads to different motion profiles for different operation Fig. ber 1. System setup of the FPLG with combustion cham(left), gas spring (right) and linear generator (midto different motion profiles for different operation (left), gas spring (right) and linear generatorcham(mid- leads the sum of forces acting on the piston which in general leads to different motion profiles for different operation Fig. ber 1. System setup of the FPLG with combustion points. Thus, Thus, the the control control concept concept needs needs to to replace replace the the ber (left), gasare spring (right) generator dle), which coupled by the moving piston with dle), which are coupled byand thelinear moving piston (midwith points. leads toThus, different profiles for different operation points. the motion control concept to crankshaft. replace the ber (left), gas spring (right) and linear generator (midmechanical crankshaft and work as aaneeds virtual dle), which are coupled by the moving piston with permanent magnets mechanical crankshaft and work as virtual crankshaft. permanent Thus, the control to crankshaft. replace the mechanical crankshaft and concept work as aneeds virtual dle), which magnets are coupled by the moving piston with points. permanent magnets Furthermorecrankshaft cycle-to-cycle variation due to varying varying commechanical and work as a due virtual crankshaft. Furthermore cycle-to-cycle variation to compermanent magnets Furthermore cycle-to-cycle variationstarting due to varying combustion efficiencies and combustion positions beThe FPLG consists of the three sub-parts combustion bustion efficiencies and combustion starting positions beThe FPLG consists of the three sub-parts combustion Furthermore cycle-to-cycle variation due to varying combustion efficiencies and combustion starting positions between subsequent cycles are possible which might even The FPLG consists of the three sub-parts combustion chamber, gas spring and linear generator, which are coutween subsequent cycles are possible which might even chamber, gas spring and linear generator, which are couefficiencies cycles and combustion starting between subsequent are possible whichpositions might even The FPLG of the three sub-parts combustion chamber, gasconsists spring and linear generator, which are cou- bustion tween subsequent cycles are possible which might even chamber, gas spring and linear generator, which are cou2405-8963 © 2018, IFAC (International Federation of Automatic Control) Hosting by Elsevier Ltd. All rights reserved.
Copyright © 2018 676 Copyright 2018 IFAC IFAC 676 Control. Peer review© under responsibility of International Federation of Automatic Copyright © 2018 IFAC 676 10.1016/j.ifacol.2018.10.149 Copyright © 2018 IFAC 676
IFAC E-CoSM 2018 Changchun, China, September 20-22, 2018Martin Keller et al. / IFAC PapersOnLine 51-31 (2018) 632–639
lead to misfiring (Mikalsen and Roskilly (2007)). The minimization of cycle-to-cycle variation is also an important objective of the control concept. As FPLGs can be used e.g. as range extenders in hybrid vehicles, where disturbances such as acceleration and breaking forces as well as road-holes can affect the free moving piston and lead to misfiring or worse e.g. collisions of the piston with the periphery, a closed-loop control is required to reduce the disturbances’ influences on the piston motion. The modeling and control of FPLGs during nominal operation, where electric energy is extracted by the linear generator has already been investigated in several publications. Mikalsen and Roskilly (2010a) and Mikalsen and Roskilly (2010b) present basic operational characteristics and control objectives. Furthermore, control concepts for the control of TDC and BDC are investigated, e.g. decentralized control and PID-approaches with disturbance feedforward controller where the TDC is controlled via injected fuel mass per cycle and the BDC via air mass inside the gas spring. There has also been some work on model-based and predictive control concepts for the nominal operation, in e.g. Mikalsen et al. (2010) and Gong et al. (2015). The latter presents a physics-based, continuous-time FPLG model and a discrete-time control-oriented model for the model predictive controller. The discrete model treats every engine stroke as a discrete event with the TDC and BDC positions as control state. Furthermore, the German Aerospace Center (DLR) built a FPLG prototype. In Kock (2015) the overall control concept is presented and validated on the DLR test-bench. Different control approaches for the piston motion are investigated. Simple PID concepts as well as more complex predictive concepts for controlling the TDC and BDC positions are examined. The starting process of FPLGs has also been analyzed in various contributions. While conventional ICEs are cranked via electrical cranking motors, for FPLGs other methods have to be considered. In Mikalsen and Roskilly (2007), the basic different possibilities are briefly described. Starting via high pressured air in the bouncing chamber is one possibility. Other concepts use the linear generator in motor operation to swing up the piston until the ignition conditions are met, e.g. in Guo et al. (2016). In Jia et al. (2015) a control strategy for the starting process is presented and validated with experiments where the motoring force is kept constant during the starting phase until a desired compression ratio is reached. Most of the presented starting strategies are based on heuristic and rule-based approaches. This paper presents a systematic nonlinear model predictive control (NMPC) concept for the startup of the FPLG until the first combustion occurs, which calculates an actuation trajectory for the swing up in an optimal manner. Therefore a control-oriented continuous-time model is derived for the control internal model of the NMPC. Based on that an offline optimized trajectory for the start up is introduced allowing a fast and safe starting process. As NMPC approaches have a control internal model which 677
FCC
633
x
AP
FGS
FLG
mP
Fig. 2. Free body diagram with the forces acting on the piston contains the characteristic system dynamics and can inherently treat the system’s constraints, MPC is a beneficial control approach for FPLG applications. The paper is organized as follows. The physics-based model for the FPLG is presented in Section 2. In Section 3 the control problem is briefly described followed by the introduction to the proposed control concept in Section 4. Here the concept and the control structure for the starting process is described. Section 5 explains the NMPC controller design from the underlying control internal model to the formulation of the NMPC. The derivation of the offline optimized reference trajectory for the startup is explained in Section 6. Section 7 provides the simulative validation of the control concepts containing a short comparison with a linear MPC as well. At the end an outline for further improvements and future work is given in Section 8. 2. MODELING OF THE FREE-PISTON LINEAR GENERATOR Combustion is a multi-physical process, including chemical, thermodynamical and mechanical mechanisms. For modeling all the processes need to be considered. Applying Newton’s 2nd law to the cut free piston in Fig. 2, it follows mP x ¨ = FCC + FLG − FGS ,
(1)
where FCC = pCC · AP is the force acting on the piston due to the pressure pCC in the combustion chamber, FGS = pGS · AP is the force affected by the pressure pGS inside the gas spring and FLG is the force applied by the linear generator. AP is the surface area of the piston, mP depicts the piston’s mass and x ¨ its acceleration. The pressures in the combustion chamber and gas spring are modeled using a 0D thermodynamic model. The general first law of thermodynamics for open systems out (hi m ˙ i )in = −pV˙ + Q˙ Comb + Q˙ Wall (2) ˙ + mcv T˙ + um i
and the ideal gas law pV˙ + V p˙ = mRT˙ + RT m ˙ + mT R˙
(3)
build the basis for the modeling. The internal energy u, heat capacity cv and enthalpies hi of the species are temperature dependent and can be calculated using NASA polynomials (Gordon and McBride (1994)). The other variables in (2) and (3) are temperature T , volume V , specific gas constant R and their respective time derivatives. The volume and the change of volume depend on the piston’s position and velocity respectively V = AP x + VTDC (4) ˙ V˙ = AP x. VTDC is the volume of the cylinder when the piston is at TDC position.
IFAC E-CoSM 2018 634 Changchun, China, September 20-22, 2018Martin Keller et al. / IFAC PapersOnLine 51-31 (2018) 632–639
The mass balance is calculated from the difference between incoming and outgoing streams and their respective species compositions: m ˙ = m ˙i (5) i
Q˙ Wall represents the wall heat transfer losses, which are calculated using Newton’s law of cooling (6) Q˙ Wall = αAWall · (T − TWall )
where α is the heat transfer coefficient calculated by Woschni’s approach (Woschni (1967)) and AWall is the surface area, which depends on the current volume of the cylinder. TWall depicts the temperature of the cylinder wall. The heat release rate due to the combustion Q˙ Comb can be described using the Vibe burning function (Vibe (1970)), where the classical crankshaft angle dependency is replaced by time dependency. The rate of turnover of mass fraction burned x˙ mB in dependence of time using Vibe’s approach is n t−t n+1 a (n + 1) t − tStart −a ∆t Start Comb x˙ mB (t) = ηComb e ∆tComb ∆tComb (7) where ηComb is the efficiency of the combustion, a is a scaling factor, n is the shaping factor, ∆tComb the duration of the combustion and tStart is the time when the combustion process starts. Equation (7) is used to calculate the change of mass fraction Y˙ j during the combustion and gas exchange m ˙ j,Comb m ˙ inj m ˙ int + (Yj,int − Yj ) + , Y˙ j = (Yj,fuel − Yj ) m m m (8) where the change of species’ masses m ˙ j,Comb during combustion is modeled as a function of x˙ mB . m ˙ inj is the injected fuel mass flow and m ˙ int is the incoming air mass flow. Hence, for the heat release rate Q˙ Comb , it follows V Q˙ Comb = − Y˙ j . (9) hj − p m j The time derivative of the specific gas constant R˙ in (3) can be calculated via Y˙ j R˙ = Runi (10) Mj j
where Mj are the molar masses of the species and Runi is the universal gas constant. Nitrogen (N2 ), oxygen (O2 ), water (H2 O), carbon dioxide (CO2 ) and n-heptane (C7 H16 ) are considered as species for modeling. The FPLG works on the 2-stroke cycle, which means the gas exchange in the combustion chamber happens at the end of the power stroke, when the piston is near the BDC position. The gas exchange is modeled using the throttle equation, see e.g. Guzzella and Onder (2010). To predict the ignition delay τ of the fuel, a 1-step Arrhenius approach is applied, which depends on pressure and temperature inside the cylinder E a √ (11) τ = K p e Runi T .
678
Here, K is an empirical ignition delay constant and Ea is the activation energy for n-heptane (Lakshminarayanan et al. (2010)). Thus, the start of the combustion tStart in (7) can be calculated using the time of injection tinj : tStart = tinj + τ (12) The force of the gas spring FGS can be modeled in an analogous manner. The only difference is the absence of combustion in the gas spring which leads to Q˙ Comb = 0. Due to the lack of combustion the mass fraction in the gas spring does not change (Y˙ j = 0), as well. The gas spring is filled with air. The air mass can be adjusted via inlet and outlet valves. Using the equations above, a continuous-time model is built allowing the simulation of the FPLG’s dynamics and getting an insight to the inner-cycle processes. 3. CONTROL PROBLEM DESCRIPTION From a control engineering point of view, the FPLG is described by a stiff, instable, nonlinear differential equation. Without any control, the FPLG would either stall after few cycles due to insufficient fuel injection coming along with too large electric extraction or it would swing up and, eventually, crash into the cylinder head causing serious damage. Hence, a robust control is required to prevent critical behavior of the FPLG and to analyze its behavior during operations. Furthermore, as mentioned above, the TDC and BDC positions need to be met precisely to guarantee combustion in the next cycle as well as to limit cycle-to-cycle variations. For simulation of the stiff differential equation, the sample time has to be chosen sufficiently small to gather all the events during the combustion cycle but not too small to allow for simulation of numerous cycles in an acceptable period of time. For the starting process of the FPLG, the TDC and BDC positions cannot be met directly in the first cycle. As the maximum force provided by the linear generator cannot accelerate the piston sufficiently to reach the TDC position directly from standstill, a control strategy is required to provide a safe and fast swing up of the piston. 4. CONTROL CONCEPT FOR THE STARTING PROCESS For a safe and stable starting process of the FPLG a model predictive control (MPC) approach is proposed which allows the consideration of system constraints (TDC and BDC positions) as well as limitations of the actuating force FLG . During the starting phase there is no combustion taking place inside the combustion chamber. Hence, the FPLG can be modeled as a piston working against two gas springs. Fig. 3 shows the control structure during the starting phase. Based on the measurable outputs yred , a state observer calculates the internal system states xred and provides them for the model-based controller. During the starting process the linear generator is used as a motor initiating the swing up of the FPLG. Therefore the controller gets a reference trajectory yref for the piston’s position and calculates the required force FLG of the
IFAC E-CoSM 2018 Changchun, China, September 20-22, 2018Martin Keller et al. / IFAC PapersOnLine 51-31 (2018) 632–639
Control Input
1 · −pGS · AP x˙ + αGS · AWall,GS mGS · cv,GS · (TWall,GS − TGS ) 1 · (mGS · RGS · T˙GS − pGS · AP x) ˙ p˙GS = AP x + VBDC 1 · −pCC · AP x˙ + αCC · AWall,CC T˙CC = mCC · cv,CC · (TWall,CC − TCC ) 1 · (mCC · RCC · T˙CC − pCC · AP x) ˙ p˙ CC = AP x + VTDC 1 · (pCC − pGS ) · AP + FLG x ¨= mP (18)
Measurable Outputs
FPLG Plant
T˙GS =
yred
State Observer
Internal System States xred
Reference Trajectory yref
FLG
Model-based Controller
635
Fig. 3. Structure of the model-based control concept for the starting process of the FPLG linear generator. During startup the control input can be adjusted at every sampling time step and hence be adapted according to the current system state.
Furthermore an additional artificial state for the absolute value of the control input u = FLG is introduced. With this formulation, the rate of change of the control input u˙ can be optimized directly which allows to introduce additional constraints and cost terms for u˙ in the NMPC formulation. The controlled variable is the piston’s position y = x.
5. NONLINEAR MODEL PREDICTIVE CONTROLLER DESIGN
5.2 NMPC Formulation
5.1 Control Internal Model The FPLG model presented in Section 2 has ten system states. Four states describe the gas spring behavior T
xGS = [ pGS TGS mGS Yj,GS ] . Another four for the combustion chamber T xCC = [ pCC TCC mCC Yj,CC ] and two last states for the piston’s dynamics: T
xPiston = [ x˙ x ] .
(13)
In each sampling step, the NMPC algorithm needs to solve a nonlinear Optimal Control Problem (OCP). For the described problem, the following continuous time formulation is used: TCH 2 min ˙ (19) ||yref (t) − y(t)||2Q + ||u(t)|| R ˙ x(·),u(·)
(14) (15)
Throughout the starting process, there is no combustion taking place. Thus, the gas composition in the combustion chamber is constant (Y˙ j,CC = 0). The same holds for the gas mixture in the gas spring (Y˙ j,GS = 0), as already mentioned in Section 2. Furthermore, for the control internal model it is assumed that there is no gas exchange inside the combustion chamber (m ˙ CC = 0) and the air mass inside the gas spring is kept constant as well (m ˙ GS = 0). Therefore these four states can be eliminated for the control internal model and the reduced state vector contains the following states: T
(16) xred = [ pGS TGS pCC TCC x˙ x ] . Without gas exchange and combustion, which are discrete events, the reduced system is continuously differentiable. For practical and economic reasons not all states are measurable. For the FPLG it is assumed that only the piston’s position and the pressures inside the combustion and gas spring chambers are measured via sensors: T
(17) yred = [ x pGS pCC ] . The remaining internal states must be estimated via an observer. For this purpose an appropriate filter is implemented (Simon (2006)). Eventually, the following reduced order nonlinear model derives: 679
s.t.
0
0 = x(0) − x0 ˙ 0 = f (x(t), x(t), u(t)) ˙
ylb ≤ y(t) ≤ yub ulb ≤ u(t) ≤ uub u˙ lb ≤ u(t) ˙ ≤ u˙ ub xlb,TCH ≤ x(TCH ) ≤ xub,TCH
∀t ∈ [0, TCH ]
∀t ∈ [0, TCH ] ∀t ∈ [0, TCH ] ∀t ∈ [0, TCH ]
(20)
(21)
˙ Here x(t) denotes the differential states, x(t) its time derivatives, u(t) the control input and u(t) ˙ its time derivative. The OCP depends on the current state estimate x0 . In the cost function for the control horizon TCH , the tracking costs for the piston’s position as well as the costs for the derivative of the control input are weighted with the 2-norm and the weighting matrices Q and R, respectively. The nonlinear dynamics in (20) are given by the ordinary differential equations in (18). The path constraints consist of simple bounds from (21). 5.3 Discretization of the Optimal Control Problem As described in Section 3 the FPLG is an instable system. Therefore a direct multiple shooting method, which was presented by Bock and Plitt (1984), is implemented. In general, direct optimal control methods solve the continuous OCP by first discretizing the OCP such that a Nonlinear Program (NLP) derives. For the sake of simplicity a grid of Hp equidistant sampling steps is considered over the prediction horizon TCH . Furthermore the input trajectory u(t) is simplified to a piecewise constant control
IFAC E-CoSM 2018 636 Changchun, China, September 20-22, 2018Martin Keller et al. / IFAC PapersOnLine 51-31 (2018) 632–639
input u(τ ) = ui for τ ∈ [ti , ti+1 ]. For the continuous OCP in (19) - (21) the following NLP results: min
xi ,ui
Hp −1
i=0
||yref,i − yi ||2Q + ||ui − ui−1 ||2R
0 = x(0) − x0 0 = xi+1 − Φ(xi , ui ) ∀i = 0, . . . , Hp − 1 ∀i = 0, . . . , Hp ylb ≤ yi ≤ yub ulb ≤ ui ≤ uub ∀i = 0, . . . , Hp − 1 ∆ulb ≤ ui − ui−1 ≤ ∆uub ∀i = 0, . . . , Hp − 1. xlb,Hp ≤ xHp ≤ xub,Hp s.t.
(22) (23)
(24)
The function Φ(xi , ui ) denotes the numerical integration of the nonlinear dynamics in one shooting interval starting from xi with the control input ui . Here, a simple 4th order Runge-Kutta (RK4) integration scheme is used with 10 RK4 integration steps during one prediction step. Although the FPLG is described by a set of stiff differential equations, with this approach it is possible to provide a sufficient prediction horizon with a still manageable amount of optimization variables without using an implicit integration scheme. The optimization variables in this multiple shooting scheme are wOpt = [xi , u˙ i ]T . In contrast to single shooting approaches where wOpt = u˙ i would be smaller, multiple shooting has more optimization variables and hence a larger search space but more linear behavior. With this approach, the knowledge of the state vector x can be used in every prediction step, which provides a good treatment of instable systems (Betts (2010)). Therefore the gap closing equality constraints in (23) are introduced. To solve the aforementioned NLP the interior point optimizer (IPOPT) is used (W¨ achter and Biegler (2006)). The sensitivities of the NLP, required by IPOPT, are calculated using the CasADi framework by Andersson (2013). 5.4 Formulation of the Cost Function The cost function is a crucial part in MPC and directly affects the control quality. For a better control result, it is assumed that the future reference trajectory is known in advance. Hence, it can be considered in the prediction horizon of the cost function. In addition, the weighting factors can be adapted in each prediction step. For references being close to TDC and BDC position, the weighting factor Q is augmented by a factor of 10. This permits the accurate tracking of the reference in the zones where a lot of control effort is required. Furthermore, with the last inequality equation in (21) and (24) respectively it is possible to consider terminal constraints in the optimization. This is important in the formulation of the optimization problem for deriving the swing up reference trajectory in the next section. 6. DERIVATION OF THE REFERENCE TRAJECTORY FOR THE STARTING PROCESS The starting process is performed by introducing a reference trajectory of the piston’s position. Starting at the neutral position, where the resulting forces of the left 680
and right gas spring are equal, a trajectory for the swing up of the piston should be derived. Therefore, an offline computed optimized trajectory is used as reference for the swing up until the first combustion sets in. The prediction horizon for the first swing up towards TDC position is chosen to TCH = 100 ms (Hp = 100 steps). For ensuring the piston’s position being at TDC at the end of the prediction horizon, the following terminal constraints are formulated xTDC − ε1 ≤ y(TCH ) ≤ xTDC + ε1 (25) 0 − ε2 ≤ x(T ˙ CH ) ≤ 0 + ε2 with ε1 = 0.1 mm and ε2 = 0.1 mm s . As at this stage the reference is unknown, only the normalized rate of change of the control input u˙ is weighted with R = 1 and hence Q = 0. With this setup the first part of the trajectory (0 − 100 ms) in Fig. 4 is obtained. Once the TDC position is reached the reference signal should perform oscillations between TDC and BDC starting at 100 ms. To achieve an energy optimal trajectory for these oscillations only one change of the control input is allowed between consecutive dead centers. Hence, the control input is kept constant between consecutive dead centers. From an energetic point of view, the linear generator needs to balance the energy such that the kinetic energy between two successive turnaround points is zero: ∆WCC + ∆WGS + WLoss + WLG = 0 (26) Here ∆WCC is the difference of stored energy inside the combustion chamber between TDC and BDC. ∆WGS is the difference of stored energy inside the gas spring between consecutive turnaround positions. WLoss is the work loss due to system losses, e.g. wall heat transfer losses. WLG = FLG · (xTDC − xBDC ) is the energy provided or extracted by the linear generator. Eq. (26) can be solved via root-finding algorithms. The resulting reference trajectory for the startup is depicted in Fig. 4. It is noteworthy, that from 100 ms on, the force of the linear generator is always negative. The reason for this are the non-symmetric behaviors of the combustion chamber and the gas spring. Although both cylinders have the same volume, the air mass in both cylinders is different. This leads to different in-cylinder pressure and temperature traces with different peak pressures (see lower plot in Fig. 4). Hence, the linear generator provides energy while the piston moves from TDC to BDC and extracts energy while moving from BDC to TDC. 7. SIMULATIVE VALIDATION OF CLOSED LOOP CONTROL STARTING BEHAVIOR The validation of the presented control concept is conducted via simulative investigation. 7.1 Comparison of Linear MPC and NMPC Due to the nonlinear characteristics of gas springs, especially the nonlinear stiffness, the NMPC approach is beneficial in comparison to linear MPC approaches. This is shown via simulation studies of the trajectory tracking behavior. Therefore a linear time varying MPC (LTVMPC) is implemented with prediction horizon Hp = 5 and weighting matrices Q = 100, R = 1. For the NMPC
IFAC E-CoSM 2018 Changchun, China, September 20-22, 2018Martin Keller et al. / IFAC PapersOnLine 51-31 (2018) 632–639
1000
FLG [N]
yref [mm]
80 60 40 20 0 1000
FLG [N]
500
−500 −1000
0
−500
xPiston [mm]
80
−1000 60 p [bar]
0
500
pGS pCC
40 20 0
637
60 40 LTV-MPC NMPC Reference
20 0
0
50
100
150 200 Time [ms]
250
300
0
Fig. 4. Offline optimized reference trajectory: 0−100 ms first swing up towards TDC; 100−300 ms free oscillation between TDC and BDC with piecewise constant control input as well as the pressure traces in the combustion chamber and gas spring a prediction horizon of Hp = 30 and weighting matrices Q = 100, R = 1 are chosen. The prediction horizon of the NMPC covers about one period of the oscillations. Simulations showed that larger prediction horizons for the LTV-MPC reduce the control quality because the future reference trajectory, considered in the cost function, moves too far away from the linearized operating point and hence the linearized model is not valid in these regions. For solving the quadratic programming problem (QP) during MPC optimization the open source solver qpOASES is used (Ferreau et al. (2014)). Fig. 5 shows the comparison of the trajectory tracking behavior between the NMPC and MPC approach. The NMPC follows the reference trajectory more accurately and with a smoother control sequence than the LTV-MPC. The model of the NMPC contains the nonlinearities of the system while the model of the LTV-MPC only gets the current states for deriving a linearization. Although the tracking result of the piston’s position is quite similar, the LTV-MPC uses a lot of input energy to follow the trajectory. In the LTV approach the linear generator strongly accelerates the piston towards TDC and BDC position respectively and decelerates the piston after TDC and BDC position. Hence the LTV-MPC provides and extracts a lot of energy to and from the piston around the TDC and BDC positions respectively to track the desired position. Comparing the computational load of both MPC approaches, the NMPC is currently slower by a factor of 100. This can be further improved by applying a sequential quadratic programming (SQP) approach for solving the NLP (Diehl et al. (2009)). All in all, the NMPC is more suitable for the startup of the FPLG. 681
50
100
150 200 Time [ms]
250
300
Fig. 5. Comparison of control input and piston position between NMPC and LTV-MPC approaches for the reference trajectory 7.2 Closed Loop Control of FPLG’s Startup Until First Combustion As mentioned above, for the startup procedure the computed reference trajectory from Fig. 4 is used. In preparation for the first combustion and to get fresh air into the combustion cylinder, the gas exchange in the combustion chamber is already starting when the piston reaches BDC during the startup phase. At the end of the trajectory the fuel injection system of the FPLG is activated. Once the first combustion takes place, the controller for the nominal operation of the FPLG takes over. The starting phase is depicted in Fig. 6. The NMPC follows the position reference very accurate and after about 300 ms the first combustion takes place. This can be recognized by the sudden increase in the pressure trace of the combustion chamber. 7.3 Nominal Operation of the FPLG After the starting process the FPLG enters nominal operation mode where electric energy can be provided for loads. Here a PI-Feedback controller based on Mikalsen and Roskilly (2010b) supplemented with a linear feedforward controller takes over and keeps the piston within the system constraints for a safe operation. The actuating variables during nominal operation are the injected fuel mass per cycle for TDC and the pressure of the gas spring in relaxed state for BDC. The force of the linear generator is now treated as an external measurable disturbance. As mentioned in Section 2, the model permits an insight into inner-cyclic processes. Fig. 7 presents the trace of pressure, temperature and air mass inside the combustion chamber as well as the changes of the mass fractions due to gas exchange and combustion. In this operating point the FPLG provides about 2 kW of electric power output. The
FLG [N]
IFAC E-CoSM 2018 638 Changchun, China, September 20-22, 2018Martin Keller et al. / IFAC PapersOnLine 51-31 (2018) 632–639
8. CONCLUSION AND OUTLOOK
→ Nominal Operation
1000
In this contribution, the modeling and control of the innovative Free Piston Linear Generator (FPLG) was investigated. The model consists of well-known basic 0D thermodynamic combustion equations, where the crankshaft −1000 angle dependency is replaced by time, as the movement of 80 the piston is free and describes the innercyclic processes of the FPLG. The proposed control concept was capable 60 to control the nonlinear dynamic behavior of the FPLG 40 during the startup process. Furthermore, the model pre20 dictive control strategy for the starting process has been NMPC Reference 0 described in detail. Starting with the continuous Optimal Control Problem with control input and path constraints 80 and its discretization using multiple shooting, first the 60 derivation of the offline optimized reference trajectory was First Fire → shown. Built on that the starting process was investigated 40 in simulations. Simulative validations of the model and 20 the control concepts showed the thermodynamic feasibility 0 of the FPLG as well as the benefits of considering the 0 100 200 300 400 500 nonlinearities in the control concept. For that purpose a Time [ms] comparison between a linear time varying MPC approach and the NMPC approach was conducted. Fig. 6. The startup of the FPLG with NMPC; at around However, further improvement is necessary. Therefore, in 300 ms the first combustion takes place and the FPLG a next step, especially the combustion model should be starts with nominal operation; the lower plot shows enhanced to describe the combustion process in a predicthe pressure trace inside the combustion chamber, the tive manner. Also, the control concept for nominal control first combustion increases the peak pressure should be augmented to inner-cyclic control interventions pCC [bar]
xPiston [mm]
0
40 20
22 YO2 [%]
pCC [bar]
60
as well by using the linear generator as manipulated variable and possibly also model-based control approaches. Therefore it is necessary to treat the discrete combustion event in the optimization problem which might lead to a mixed integer nonlinear programming problem which needs to be solved. Additionally, it might be helpful to use implicit iteration schemes for the FPLG simulation to take the stiff system of differential equations into better consideration.
20 18
1000 800 600 400
YCO2 [%]
TCC [K]
0 5 4 3 2 1
ACKNOWLEDGEMENTS The presented work was funded by UMC Universal Motor Corporation GmbH, Marienau 3, D-70563 Stuttgart, EMail:
[email protected].
0.6
Yfuel [%]
mCC [g]
0.6 REFERENCES 0.4 0.2 Andersson, J. (2013). A General-Purpose Software Frame0.4 work for Dynamic Optimization. PhD thesis, Aren0 berg Doctoral School, KU Leuven, Department of Elec900 925 950 975 1000 900 925 950 975 1000 trical Engineering (ESAT/SCD) and Optimization in Time [ms] Time [ms] Engineering Center, Kasteelpark Arenberg 10, 3001Heverlee, Belgium. Fig. 7. On the left hand side the traces of pressure, temper- Betts, J. (2010). Practical Methods for Optimal Control and Estimation Using Nonlinear Programming. Society ature and air mass inside the combustion chamber in for Industrial and Applied Mathematics, second edition. case of closed loop control; on the right hand side the mass fractions of O2 , CO2 and fuel during the cycles Bock, H. and Plitt, K. (1984). A multiple shooting algorithm for direct solution of optimal control problems. In IFAC World Congress. frequency of the free moving piston is around 28 Hz (≈ Diehl, M., Ferreau, H.J., and Haverbeke, N. (2009). Efficient numerical methods for nonlinear mpc and moving 1700 rpm). The efficiency of the FPLG lies at ηFPLG ≈ 54 horizon estimation. In Nonlinear Model Predictive Con%. The efficiency covers the losses from the lower heating trol: Towards New Challenging Applications, 391–417. value of the injected fuel to the mechanical side of the Springer Berlin Heidelberg, Berlin, Heidelberg. linear generator. 0.5
682
IFAC E-CoSM 2018 Changchun, China, September 20-22, 2018Martin Keller et al. / IFAC PapersOnLine 51-31 (2018) 632–639
Ferreau, H., Kirches, C., Potschka, A., Bock, H., and Diehl, M. (2014). qpOASES: A parametric active-set algorithm for quadratic programming. Mathematical Programming Computation, 6(4), 327–363. Gong, X., Zaseck, K., Kolmanovsky, I., and Chen, H. (2015). Modeling and predictive control of free piston engine generator. In Proceedings of the American Control Conference. Institute of Electrical and Electronics Engineers Inc. Gordon, S. and McBride, B.J. (1994). Computer program for calculation of complex chemical equilibrium compositions and applications. National Aeronautics and Space Administration, Office of Management, Scientific and Technical Information Program. Guo, C., Feng, H., Jia, B., Zuo, Z., Guo, Y., and Roskilly, T. (2016). Research on the operation characteristics of a free-piston linear generator: Numerical model and experimental results. Energy Conversion and Management. Guzzella, L. and Onder, C.H. (2010). Introduction to Modeling and Control of Internal Combustion Engine Systems. Springer Berlin Heidelberg. Jia, B., Tian, G., Feng, H., Zuo, Z., and Roskilly, A. (2015). An experimental investigation into the starting process of free-piston engine generator. Applied Energy, 157, 798 – 804. Kock, F. (2015). Steuerung und Regelung des Freikolbenlineargenerators - Entwicklungsmethode und Regelungskonzept f¨ ur den Betrieb eines neuartigen Energiewandlers. Dissertation. Deutsches Zentrum f¨ ur Luft- und Raumfahrt e.V. Bibliotheks- und Informationswesen. Lakshminarayanan, P.A., Aghav, Y.V., Shi, Y., and Reitz, R.D. (2010). Modelling Diesel Combustion. SpringerVerlag GmbH. Mikalsen, R., Jones, E., and Roskilly, A. (2010). Predictive piston motion control in a free-piston internal combustion engine. Applied Energy, 87(5), 1722 – 1728. Mikalsen, R. and Roskilly, A. (2007). A review of freepiston engine history and applications. Applied Thermal Engineering, 27(1415), 2339 – 2352. Mikalsen, R. and Roskilly, A. (2010a). The control of a free-piston engine generator. part 1: Fundamental analyses. Applied Energy, 87(4), 1273 – 1280. Mikalsen, R. and Roskilly, A. (2010b). The control of a free-piston engine generator. part 2: Engine dynamics and piston motion control. Applied Energy, 87(4), 1281 – 1287. Simon, D. (2006). Optimal State Estimation. John Wiley & Sons Inc. Vibe, I. (1970). Brennverlauf und Kreisprozess von Verbrennungsmotoren. Verlag Technik. W¨ achter, A. and Biegler, L.T. (2006). On the implementation of an interior-point filter line-search algorithm for large-scale nonlinear programming. Mathematical Programming, 106(1), 25–57. Woschni, G. (1967). A universally applicable equation for the instantaneous heat transfer coefficient in the internal combustion engine. In National Fuels and Lubricants, Powerplants, Transportation Meetings. SAE International.
683
639