Method for managing the period of a control loop for controlling an engine using model predictive control
The integration of model predictive control in engine systems optimizes actuator settings for improved torque control and fault diagnosis, addressing the inaccuracies and response delays of conventional systems.
Patent Information
- Application Number
- DE102015103880
- Authority / Receiving Office
- DE · DE
- Patent Type
- Patents
- Current Assignee / Owner
- Priority Date
- 2014-03-26
- Filing Date
- 2015-03-17
- Publication Date
- 2025-07-03
- Estimated Expiration
- 2035-03-17
AI Technical Summary
Conventional engine control systems fail to accurately control engine output torque and do not provide rapid response to control signals, lacking coordination between various devices affecting torque output.
Implementing a model predictive control (MPC) module in the engine control module (ECM) to determine target values for engine actuators, such as throttle, intake and exhaust cam phasers, and wastegate, while monitoring iteration time and taking corrective actions to ensure system stability and fault diagnosis.
Enhances engine torque control accuracy, improves response time, and reduces fuel consumption by optimizing actuator settings using MPC, while also diagnosing and mitigating faults in the control system.
Smart Images

Figure 00000000_0000_ABST
Abstract
Description
The present disclosure relates to internal combustion engines, and more particularly to systems and methods for managing the period of a control loop for controlling an engine using model prediction control.Internal combustion engines combust an air and fuel mixture within cylinders to drive pistons, producing drive torque. Airflow into the engine is regulated via a throttle. More specifically, the throttle adjusts the throttle opening area, which increases or decreases air flow into the engine. As the throttle opening area increases, the air flow into the engine increases. A fuel control system adjusts the rate at which fuel is injected to provide a desired air / fuel mixture to the cylinders and / or to achieve a desired torque output. Increasing the amount of air and fuel provided to the cylinders increases the torque output of the engine.In spark ignition engines, spark initiates combustion of an air / fuel mixture provided to the cylinders. In auto-ignition engines, compression in the cylinders burns the air / fuel mixture provided to the cylinders. The spark timing and air flow may be the primary mechanisms for adjusting torque output of spark ignition engines, while fuel flow may be the primary mechanism for adjusting torque output of self ignition engines.Engine control systems have been developed to control engine output torque to achieve a desired torque. However, conventional engine control systems do not control engine output torque as accurately as desired. Further, conventional engine control systems do not provide a quick response to control signals or coordinate engine torque control between different devices that affect engine output torque.Post-published DE 10 2014 110 695 A1 discloses an engine control method for a vehicle on the basis of prediction models. The method includes performing MPC tasks performed by an MPC module including determining predicted operating parameters for a set of possible target values, determining costs of the set of possible target values based on the predicted operating parameters, selecting the set of possible target values from a plurality of sets of possible target values based on the costs, setting target values to the possible target values of the selected set, and controlling an actuator of an engine based on at least one of the target values.DE 10 2011 017 414 A1 discloses systems and methods for optimum value control of a camshaft phase shifter. When an operating state of the vehicle changes, for example, from a normal operating state to an inertia phase in gear shifting, the target phaser position for the intake and exhaust camshafts is changed to an optimum phaser position. The system includes an inertia phase detection module, an feed forward engine speed module, a feed forward APC module, a feed forward phaser position module, and a phaser control module. The inertia phase detection module determines when an inertia phase of a gear change occurs in a transmission. The feed forward engine speed module predicts an engine speed for a future time at which the inertia phase ends. The feed forward APC module predicts air per cylinder (APC) for the future time based on the engine speed. The feed forward phaser position module determines a feed forward phaser position based on the engine speed and the APC. The phaser control module controls a camshaft phaser position during the inertia phase of the gear change based on the feed forward phaser position. MPC is not used.DE 10 2013 217 929 A1 discloses safety systems and methods for a coordinated torque control. A control system for an engine includes a selection module, a target air per cylinder (APC) module, and a phaser scheduling module. The selection module selects target intake and exhaust cam phaser angles or measured intake and exhaust cam phaser angles and determines selected intake and exhaust cam phaser angles based on the corresponding intake and exhaust cam phaser angles. The target APC module determines a target APC based on a target spark timing and the selected intake and exhaust cam phaser angles. The phaser scheduling module determines the target intake and exhaust cam phaser angle based on the target APC and controls the intake and exhaust cam phasers of the engine based on the target intake and exhaust cam phaser angles. MPC is not used.DE 10 2009 024 544 A1 discloses a determination of data for characteristic maps of a control unit for spark-ignition engines. The data for the characteristic maps are determined beforehand by a computer system located outside the vehicle on the basis of optimization algorithms on the basis of a torque model and a cost model.US 2011 / 0 301 723 A1 discloses a method according to the preamble of claim 1.It is the object of the present invention to provide an improved method for managing a period of a control loop for controlling an engine using model prediction control (MPC).This object is achieved by a method having the features of claim 1.Advantageous embodiments are given in the dependent claims.The present disclosure will become more fully understood from the detailed description and the accompanying drawings, in which: FIG. 1 is a functional block diagram of an example engine system according to the present disclosure; FIG. 2 is a functional block diagram of an example engine control system according to the present disclosure; FIG. 3 is a functional block diagram of an exemplary air control module according to the present disclosure; FIG. 4 is a flow chart illustrating an example method for controlling a throttle, intake valve and exhaust valve phasing, wastegate, and exhaust gas recirculation (EGR) valve using model prediction control, in accordance with the present disclosure; FIG. 5 is a flowchart illustrating an example method of managing a time period of a control loop executed with a model prediction control module according to the present disclosure; and FIG. 6 is a graph showing the example method of FIG. 5.In the drawings, reference numerals may be reused to identify similar and / or similar elements.An engine control module (ECM) controls torque output of an engine. More specifically, the ECM controls actuators of the engine based on target values based on a requested amount of torque. For example, the ECM controls the intake camshaft phasing and the exhaust camshaft phasing based on the target intake phaser and the target exhaust phaser angles, a throttle valve and a throttle valve, respectively, based on a target throttle opening, an exhaust gas recirculation (EGR) valve based on a target EGR opening, and a wastegate of a turbocharger based on a target wastegate duty cycle.The ECM could individually determine the target values using multiple single-input single-output (SISO) controllers, such as proportional-integral-derivative (PID) controllers. However, the target values may be set to maintain system stability at the expense of possible reductions in fuel consumption when multiple SISO controllers are used. In addition, the calibration and design of the individual SISO controllers can be costly and time consuming.The ECM of the present disclosure generates the target values using a model prediction (MPC) module. The MPC module identifies possible sets of target values based on an engine torque request. The MPC module determines predicted parameters for each of the possible sets based on the target values of the possible sets and a mathematical model of the engine.The MPC module may also determine a cost associated with using each of the possible sets. The cost determined for a possible set may increase as the differences between the target values of the possible set and reference values increase, and vice versa. The MPC module may choose the possible set that has the lowest cost. Instead of or in addition to identifying possible sets of target values and determining the cost of each of the sets, the MPC module may generate an area representing the cost of possible sets of target values. Then, the MPC module may identify the possible set with the lowest cost based on the increase in cost area.The MPC module may determine whether the predicted parameters of the selected set meet constraints. If so, the MPC module may set the target values based on the selected set. Otherwise, the MPC module may choose the possible set with the next lower cost and test that set for compliance with the constraints. The process of selecting a set and testing the set to satisfy the constraints may be referred to as an iteration. Multiple iterations may be performed during each control loop.The ECM of the present disclosure may monitor the time elapsed when the MPC module performs iterations and take one or more remedial action when the iteration time is greater than a threshold. In some cases, the period required to perform a single iteration may be known, in which case the ECM may monitor the number of iterations being performed and multiply the number of iterations by the predetermined iteration period to obtain the iteration time. Iterations started during the current loop may be referred to as the current iterations, and the time that elapses when the MCP module executes the current iterations may be referred to as the current iteration time. When the current iteration time extends into the period assigned to the next loop, the ECM may instruct the MPC module to set the target values for the current loop to the target values set for the last loop and refrain from restarting the iterations in the next loop.In this manner, the ECM allows the MPC to complete the current iterations during the next loop. By allowing the MPC module to complete the current iterations during the next loop, the amount of time required to complete iterations that were begun during subsequent control loops can be reduced. In addition, the loop rate of the MPC module may be decreased relative to a worst case loop rate for the iteration time expected to last longest.If the current iteration time extends into the period allocated for the next control loop, a solution sought by the MPC module may not be feasible or there may be another fault in the MPC module. Thus, the ECM may diagnose a fault in the MPC module. The ECM may also reset and re-initialize the MPC module, enable a service indicator, such as a malfunction indicator lamp and / or limit the engine torque output.Referring now to FIG. 1, a functional block diagram of an example engine system 100 is presented. The engine system 100 includes an engine 102 that burns an air / fuel mixture to generate drive torque for a vehicle based on driver input from a driver input module 104. The engine 102 may be a gasoline spark-ignition internal combustion engine.Air is drawn into an intake manifold 110 through a throttle valve 112. For example only, the throttle valve 112 may include a butterfly valve with a rotatable flap. An engine control module (ECM) 114 controls a throttle actuation module 116 that regulates opening of the throttle valve 112 to control the amount of air drawn into the intake manifold 110.Air from the intake manifold 110 is drawn into cylinders of the engine 102. Although the engine 102 may include multiple cylinders, a single representative cylinder 118 is shown for illustrative purposes. For example only, the engine 102 may include 2, 3, 4, 5, 6, 8, 10, and / or 12 cylinders. The ECM 114 may command a cylinder actuator module 120 to selectively deactivate some of the cylinders, which may improve fuel economy under certain engine operating conditions.The engine 102 may operate using a four-stroke cycle. The four strokes described below may be referred to as the intake stroke, the compression stroke, the expansion stroke, and the exhaust stroke. During each revolution of a crankshaft (not shown), two of the four strokes take place within the cylinder 118. Thus, two crankshaft revolutions are necessary for the cylinder 118 to experience all four strokes.During the intake stroke, air is drawn from the intake manifold 110 into the cylinder 118 through an intake valve 122. The ECM 114 controls a fuel actuator module 124 that regulates fuel injection to achieve a target air / fuel ratio. Fuel may be injected into the intake manifold 110 at a central location or at multiple locations, such as near the intake valve 122 of each of the cylinders. In various implementations (not shown), fuel may be injected directly into the cylinders or into mixing chambers associated with the cylinders. The fuel actuator module 124 may stop injection of fuel into cylinders that are deactivated.The injected fuel mixes with air and creates an air / fuel mixture in the cylinder 118. During the compression stroke, a piston (not shown) in cylinder 118 compresses the air / fuel mixture. A spark actuator module 126 energizes a spark plug 128 in the cylinder 118 based on a signal from the ECM 114, which ignites the air / fuel mixture. The timing of the spark may be specified as compared to when the piston is at its top position, referred to as top dead center (TDC).The spark actuator module 126 may be controlled by an spark timing signal that determines how far before or after TDC spark is to be generated. Because piston position is directly related to crankshaft rotation, operation of the spark actuator module 126 may be synchronized with crankshaft angle. The generation of spark may be referred to as an ignition event. The spark actuator module 126 may have the capability to vary the spark timing of the spark for each firing event. When the spark timing is changed between a last ignition event and the next ignition event, the spark actuator module 126 may vary the spark timing for a next ignition event. The spark actuator module 126 may stop providing spark to deactivated cylinders.During the combustion stroke, combustion of the air / fuel mixture drives the piston away from the TDC, thereby driving the crankshaft. The power stroke may be defined as the time duration between when the piston reaches TDC and when the piston reaches bottom dead center (BDC). During the exhaust stroke, the piston begins to move away from the BDC, expelling the byproducts of combustion through an exhaust valve 130. The byproducts of combustion are exhausted from the vehicle via an exhaust system 134.Intake valve 122 may be controlled by intake camshaft 140, while exhaust valve 130 may be controlled by exhaust camshaft 142. In various implementations, multiple intake camshafts (including intake camshaft 140) may control multiple intake valves (including intake valve 122) for cylinder 118, and / or may control the intake valves (including intake valve 122) of multiple banks of cylinders (including cylinder 118). Similarly, multiple exhaust camshafts (including exhaust camshaft 142) may control multiple exhaust valves for cylinder 118 and / or may control exhaust valves (including exhaust valve 130) for multiple cylinder banks (including cylinder 118). In various other implementations, the intake valve 122 and / or the exhaust valve 130 may be controlled by devices other than camshafts, such as camless valve actuators. The cylinder actuator module 120 may deactivate the cylinder 118 by deactivating opening of the intake valve 122 and / or the exhaust valve 130.The timing at which the intake valve 122 is opened may be changed with respect to piston TDC by an intake cam phaser 148. The timing at which the exhaust valve 130 is opened may be changed with respect to the piston TDC by an exhaust cam phaser 150. A phaser actuator module 158 may control the intake cam phaser 148 and the exhaust cam phaser 150 based on signals from the ECM 114. When implemented (not shown), a variable valve lift may also be controlled by the phaser actuator module 158.Engine system 100 may include a turbocharger including a hot turbine 160- 1 powered by hot exhaust gases flowing through exhaust system 134. The turbocharger also includes a cold air compressor 160- 2 driven by the turbine 160- 1. The compressor 160- 2 compresses air that leads into the throttle 112. In various implementations, a supercharger (not shown) driven by the crankshaft may compress air from the throttle 112 and deliver the compressed air to the intake manifold 110.An exhaust control valve 162 may allow exhaust to bypass turbine 160- 1, thereby reducing boost pressure (the amount of intake air compression) provided by the turbocharger. The boost actuator module 164 may control the boost pressure of the turbocharger by controlling the opening of the wastegate 162. In various implementations, two or more turbochargers may be implemented and may be controlled by the boost actuator module 164.An air cooler (not shown) may transfer heat from the compressed air charge to a cooling medium, such as an engine coolant or air. An air cooler that cools the compressed air charge using engine coolant may be referred to as an intercooler. An air cooler that cools the compressed air charge using air may be referred to as a charge air cooler. The compressed air charge may receive heat, e.g., via compression and / or from components of the exhaust system 134. Although shown separately for illustrative purposes, turbine 160- 1 and compressor 160- 2 may be attached to each other, placing intake air in close proximity to hot exhaust gas.The engine system 100 may include an exhaust gas recirculation (EGR) valve 170 that selectively directs exhaust gas back to the intake manifold 110. The EGR valve 170 may be positioned upstream of the turbine 160- 1 of the turbocharger. The EGR valve 170 may be controlled by an EGR actuator module 172 based on signals from the ECM 114.Using a crankshaft position sensor 180, a position of the crankshaft may be measured. Based on the crankshaft position, a speed of the crankshaft (an engine speed) may be determined. Using an engine coolant temperature (ECT) sensor 182, a temperature of the engine coolant may be measured. The ECT sensor 182 may be disposed in the engine 102 or at other locations where the coolant is circulated, such as a radiator (not shown).Using a manifold absolute pressure (MAP) sensor 184, a pressure within the intake manifold 110 may be measured. In various implementations, an engine negative pressure, which is the difference between ambient air pressure and the pressure in the intake manifold 110, may be measured. Using a mass airflow (MAF) sensor 186, a mass flow rate of air flowing into intake manifold 110 may be measured. In various implementations, the MAF sensor 186 may be located in a housing that also includes the throttle valve 112.The throttle actuator module 116 may monitor the position of the throttle valve 112 using one or more throttle position sensors (TPS) 190. Using an intake air temperature (IAT) sensor 192, an ambient temperature of the air drawn into the engine 102 may be measured. Additionally, engine system 100 may include one or more other sensors 193 such as an ambient humidity sensor, one or more knock sensors, a compressor outlet pressure sensor and / or a throttle inlet pressure sensor, a wastegate position sensor, an EGR position sensor, and / or one or more other suitable sensors. The ECM 114 may use signals from the sensors to make control decisions for the engine system 100.The ECM 114 may communicate with a transmission control module 194 to coordinate shifting gears in a transmission (not shown). For example, the ECM 114 may reduce engine torque during a gear shift. The ECM 114 may communicate with a hybrid control module 196 to coordinate operation of the engine 102 and an electric motor 198.The electric motor 198 may also serve as a generator and may be used to generate electrical energy for use by vehicle electrical systems and / or for storage in a battery. In various implementations, various functions of the ECM 114, the transmission control module 194, and the hybrid control module 196 may be integrated into one or more modules.Any system that varies an engine parameter may be referred to as an engine actuator. For example, the throttle actuator module 116 may adjust the opening of the throttle valve 112 to achieve a target throttle opening area. The spark actuator module 126 controls the spark plugs to achieve a target spark timing relative to piston TDC. The fuel actuator module 124 controls the fuel injectors to achieve target fueling parameters. The phaser actuator module 158 may control the intake cam phaser and the exhaust cam phasers 148 and 150 to achieve target intake cam phaser angles and target exhaust cam phaser angles, respectively. The EGR actuator module 172 may control the EGR valve 170 to achieve a target EGR opening area. The wastegate actuator module 164 controls the wastegate 162 to achieve a target wastegate opening area. The cylinder actuator module 120 controls cylinder deactivation to achieve a target number of activated or deactivated cylinders.The ECM 114 generates the target values for the engine actuators to cause the engine 102 to generate a target engine output torque. The ECM 114 generates the target values for the engine actuators using model prediction control (MPC) as previously described. The ECM 114 also monitors the elapsed time during generation of the target values and takes remedial action and / or diagnoses a fault if the elapsed time is greater than a predetermined time period. The ECM 114 may set a diagnostic fault code (DTC) and / or enable a service indicator 199 if a fault is detected. The maintenance indicator 199 indicates that maintenance is required using a visual message (e.g., text), an audible message (e.g., sound), and / or a tactile message (e.g., vibration).Referring now to FIG. 2, a functional block diagram of an example engine control system is illustrated. An example implementation of the ECM 114 includes a driver torque module 202, an axle torque arbitration module 204, and a propulsion torque arbitration module 206. The ECM 114 may include a hybrid optimization module 208. The ECM 114 also includes a reserves / loads module 220, a torque request module 224, an air control module 228, a spark control module 232, a cylinder control module 236, and a fuel control module 240.The driver torque module 202 may determine a driver torque request 254 based on a driver input 255 from the driver input module 104. For example, the driver input 255 may be based on a position of an accelerator pedal and a position of a brake pedal. Additionally, the driver input 255 may be based on a cruise control, which may be an adaptive cruise control system that varies vehicle speed to meet a predetermined following distance. The driver torque module 202 may store one or more maps of the accelerator pedal position to the target torque and may determine the driver torque request 254 based on a selected one of the maps.An axle torque arbitration module 204 arbitrates between the driver torque request 254 and other axle torque requests 256. Axle torque (torque at the wheels) may be generated by various sources including an engine and / or an electric motor. For example, the axle torque requests 256 may include a torque reduction requested by a traction control system when positive wheel slip is detected. Positive wheel slip occurs when axle torque overcomes friction between the wheels and the road surface and the wheels begin to slip against the road surface. Additionally, the axle torque requests 256 may receive a torque increase request to counteract negative wheel slip in which a tire of the vehicle slips in the other direction with respect to the road surface because the axle torque is negative.Additionally, the axle torque requests 256 may include brake management requests and vehicle overdrive torque requests. Brake management requests may reduce axle torque to ensure that the axle torque does not exceed the ability of the brakes to hold the vehicle when the vehicle is stopped. Vehicle overdrive torque requests may reduce the axle torque to prevent the vehicle from exceeding a predetermined speed. The axle torque requests 256 may also be generated by vehicle stability control systems.The axle torque arbitration module 204 outputs a predicted torque request 257 and an immediate torque request 258 based on the results of arbitration between the received torque requests 254 and 256. As described below, the predicted and immediate torque requests 257 and 258 from the axle torque arbitration module 204 may be selectively adjusted by other modules of the ECM 114 before being used to control the engine actuators.Generally speaking, the immediate torque request 258 may be an amount of the currently desired axle torque, while the predicted torque request 257 may be an amount of the axle torque that may be needed in the short term. The ECM 114 controls the engine system 100 to generate an axle torque equal to the immediate torque request 258. However, different combinations of target values may result in the same axle torque. Thus, the ECM 114 may set the target values to allow a more rapid transition to the predicted torque request 257 while still maintaining the axle torque at the immediate torque request 258.In various implementations, the predicted torque request 257 may be adjusted based on the driver torque request 254. In certain circumstances, such as when the driver torque request 254 causes wheel slip on an icy surface, the immediate torque request 258 may be set to less than the predicted torque request 257. In this case, a traction control system (not shown) may request a decrease via the immediate torque request 258, where the ECM 114 decreases the engine torque output to the immediate torque request 258. In this case, the ECM 114 performs the reduction such that the engine system 100 can quickly resume generation of the predicted torque request 257 once wheel slip stops.Generally speaking, the difference between the immediate torque request 258 and the (generally higher) predicted torque request 257 may be referred to as a torque reserve. The torque reserve may represent the amount of additional torque (above the immediate torque request 258) to allow the engine system 100 to begin generating with minimum deceleration. To increase or decrease the current axle torque with minimum deceleration, fast engine actuators are used. Fast engine actuators are defined as opposed to slow engine actuators.Generally speaking, fast engine actuators may change axle torque more quickly than slow engine actuators. Slow actuators may be responsive to changes in their respective target values more slowly than fast actuators. For example, a slow actuator may include mechanical components that require more time to move from one position to another in response to a change in a target value. A slow actuator may be characterized by the amount of time it takes for the axle torque to begin changing when the slow actuator begins to implement the changed target value. Generally, this amount of time is longer for slow actuators than for fast actuators. In addition, even after the change has begun, it may take longer for the axle torque to fully respond to a change in a slow actuator.For example only, the spark actuator module 126 may be a fast actuator. Spark ignition engines may combust fuels including, for example, gasoline and ethanol by applying spark. In contrast, the throttle actuator module 116 may be a slow actuator.For example, as described above, the spark actuator module 126 may vary the spark timing for a next firing event when the spark timing is changed between a last firing event and the next firing event. In contrast, changes in throttle opening may take longer to affect engine output torque. The throttle actuator module 116 changes throttle opening by adjusting the angle of the throttle of the throttle valve 112. Thus, there is a mechanical delay while the throttle valve 112 moves from its previous position to a new position in response to the change when the target value for opening the throttle valve 112 is changed. Additionally, airflow changes based on throttle valve opening are subject to air transport delays in the intake manifold 110. Further, increased air flow in the intake manifold 110 is not realized as an increase in engine output torque until the cylinder 118 receives additional air in the next intake stroke, compresses the additional air, and begins the combustion stroke.Using these actuators as an example, by setting the throttle opening to a value that would allow the engine 102 to generate the predicted torque request 257, a torque reserve may be generated. Meanwhile, the spark timing may be adjusted based on the immediate torque request 258 that is less than the predicted torque request 257. Although the throttle opening generates sufficient airflow for the engine 102 to generate the predicted torque request 257, the spark timing is retarded (which reduces torque) based on the immediate torque request 258. Thus, the engine output torque becomes equal to the immediate torque request 258.If additional torque is necessary, spark timing may be adjusted based on the predicted torque request 257 or a torque between the predicted torque request and the immediate torque requests 257 and 258. By the following firing event, the spark actuator module 126 may restore the spark timing to an optimum value that allows the engine 102 to generate the full engine output torque that may be achieved when the airflow is already present. Thus, engine output torque may be quickly increased to predicted torque request 257 without experiencing delays from changing throttle opening.The axle torque arbitration module 204 may output the predicted torque request 257 and the immediate torque request 258 to a propulsion torque arbitration module 206. In various implementations, the axle torque arbitration module 204 may output the predicted and immediate torque requests 257 and 258 to the hybrid optimization module 208.The hybrid optimization module 208 may determine how much torque should be generated by the engine 102 and how much torque should be generated by the electric motor 198. The hybrid optimization module 208 then outputs the changed predicted torque request and the changed immediate torque request 259 and 260, respectively, to the propulsion torque arbitration module 206. In various implementations, the hybrid optimization module 208 may be implemented in the hybrid control module 196.The predicted and immediate torque requests received from the propulsion torque arbitration module 206 are mapped from an axle torque domain (torque at the wheels) to a propulsion torque domain (torque at the crankshaft). This conversion may take place before, after, as part of, or instead of the hybrid optimization module 208.The propulsion torque arbitration module 206 arbitrates between propulsion torque requests 290 that include the converted predicted torque requests and immediate torque requests. The propulsion torque arbitration module 206 generates an arbitrated predicted torque request 261 and an arbitrated immediate torque request 262. The propulsion torque arbitration module 206 generates an arbitrated predicted torque request 261 and an arbitrated immediate torque request 262. The arbitrated torque requests 261 and 262 may be generated by selecting an winning request from the received torque requests. Alternatively or additionally, the arbitrated torque requests may be generated by modifying one of the received requests based on one or more other ones of the received torque requests.The propulsion torque requests 290 may include, for example, torque reductions for engine overspeed protection, torque increases to prevent stalling, and torque reductions requested by the transmission control module 194 to adapt to gear shifts. Additionally, propulsion torque requests 290 may result from a clutch fuel cut that reduces fuel output torque when the driver in a manual transmission vehicle depresses the clutch pedal to prevent engine speed cranking.In addition, propulsion torque requests 290 may include an engine shut-down request that may be initiated when a critical fault is detected. For example only, critical errors may include detection of vehicle theft, a stuck starter, electronic throttle control issues, and unexpected torque increases. In various implementations, when an engine shutdown request is present, arbitration selects the engine shutdown request as the winning request. When the engine shutdown request is present, the propulsion torque arbitration module 206 may output zero as the arbitrated predicted torque request and as the arbitrated immediate torque requests 261 and 262.In various implementations, an engine shutdown request may simply shut down engine 102 separately from the arbitration process. The propulsion torque arbitration module 206 may still receive the engine shutdown request, such that, for example, appropriate data may be fed back to other torque requests. For example, all other torque requesting devices may be informed that they have lost arbitration.The reserves / loads module 220 receives the arbitrated predicted torque request and the arbitrated immediate torque requests 261 and 262. The reserves / loads module 220 may set the arbitrated predicted torque request and the arbitrated immediate torque requests 261 and 262 to generate a torque reserve and / or to compensate for one or more loads. The reserves / loads module 220 then outputs the adjusted predicted torque request and the adjusted immediate torque requests 263 and 264 to the torque request module 224.For example only, a catalyst light-off process or a cold start emissions reduction process may require retarded spark timing. Thus, the reserves / loads module 220 may increase the adjusted predicted torque request 263 above the adjusted immediate torque request 264 to generate a retarded spark for the cold start emissions mitigation process. In another example, the engine air / fuel ratio and / or mass air flow may be varied directly, such as by diagnostic intrusive equivalence ratio testing and / or new engine purge. Prior to initiation of these processes, a torque reserve may be created or increased to quickly compensate for decreases in engine output torque resulting from leaning of the air / fuel mixture during these processes.The reserves / loads module 220 may also generate or increase a torque reserve in anticipation of a future load, such as operation of the power steering pump or engagement of a clutch of the air conditioner (A / C) compressor. The reserve for engaging the A / C compressor clutch may be generated when the driver first requests air conditioning operation. The reserves / loads module 220 may increase the adjusted predicted torque request 263 while leaving the adjusted immediate torque request 264 unchanged to generate the torque reserve. When the A / C compressor clutch is then engaged, the reserves / loads module 220 may increase the adjusted immediate torque request 264 by the estimated load of the A / C compressor clutch.The torque request module 224 receives the adjusted predicted torque request and the adjusted immediate torque request 263 and 264. The torque request module 224 determines how to achieve the adjusted predicted torque request and the adjusted immediate torque request 263 and 264. The torque request module 224 may be engine type specific. For example, the torque request module 224 may be implemented differently for spark-ignition engines than self-ignition engines or use other control schemes.In various implementations, the torque request module 224 may define a boundary between modules that are common across all engine types and modules that are specific to the engine type. For example, engine types may include spark ignition and compression ignition. Modules prior to the torque request module 224, such as the propulsion torque arbitration module 206, may be common between engine types, while the torque request module 224 and subsequent modules may be engine type specific.The torque request module 224 determines an air torque request 265 based on the adjusted predicted torque request and the adjusted immediate torque request 263 and 224. The air torque request 265 may be a braking torque. The braking torque may refer to torque at the crankshaft under the current operating conditions.Based on the air torque request 265, target values for air flow control engine actuators are determined. More specifically, the air control module 228 determines a target wastegate opening area 266, a target throttle opening area 267, a target EGR opening area 268, a target intake cam phaser angle 269, and a target exhaust cam phaser angle 270 based on the air torque request 265. As discussed further below, the air control module 228 determines the target wastegate opening area 266, the target throttle opening area 267, the target EGR opening area 268, the target intake cam phaser angle 269, and the target exhaust cam phaser angle 270 using model prediction control.The wastegate actuator module 164 controls the wastegate 162 to achieve the target wastegate opening area 266. For example, a first conversion module 272 may convert the target wastegate opening area 266 into a target duty cycle 274 to be applied to the wastegate 162, and the wastegate module 164 may apply a signal to the wastegate 162 based on the target duty cycle 274. In various implementations, the first conversion module 272 may convert the target wastegate opening area 266 to a target wastegate position (not shown) and convert the target wastegate position to the target duty cycle 274.The throttle actuator module 116 controls the throttle 112 to achieve the target throttle opening area 267. For example, a second conversion module 276 may convert the target throttle opening area 267 into a target duty cycle 278 to be applied to the throttle 112, and the throttle actuator module 116 may apply a signal to the throttle 112 based on the target duty cycle 278. In various implementations, the second conversion module 276 may convert the target throttle opening area 267 to a target throttle position (not shown) and convert the target throttle position to the target duty cycle 278.The EGR actuator module 172 controls the EGR valve 170 to achieve the target EGR opening area 268. For example, a third conversion module 280 may convert the target EGR opening area 268 into a target duty cycle 282 that is target applied to the EGR valve 170, and the EGR actuator module 172 may apply a signal to the EGR valve 170 based on the target duty cycle 282. In various implementations, the third conversion module 280 may convert the target EGR opening area 268 to a target EGR position (not shown) and convert the target EGR position to the target duty cycle 282.The phaser actuator module 158 controls the intake cam phaser 148 to achieve the target intake cam phaser angle 269. Additionally, the phaser actuator module 158 controls the exhaust cam phaser 150 to achieve the target exhaust cam phaser angle 270. In various implementations, a fourth translation module (not shown) may be included and may translate the target intake cam phaser angle and the target exhaust cam phaser angle into a target intake duty cycle and a target exhaust duty cycle, respectively. The phaser actuator module 158 may apply the target intake and exhaust phasings to the intake cam phaser and to the exhaust cam phasers 148 and 150, respectively. In various implementations, the air control module 228 may determine a target overlap factor and a target effective displacement, and the phaser actuator module 158 may control the intake cam phaser and the exhaust cam phasers 148 and 150 to achieve the target overlap factor and the target effective displacement.Additionally, the torque request module 224 may generate a spark torque request 283, a skip fire torque request 284, and a fuel torque request 285 based on the predicted and immediate torque requests 263 and 264. The spark control module 232 may determine how much to retard the spark timing from an optimal spark timing (which reduces engine output torque) based on the spark torque request 283. For example only, the torque relationship may be reversed to resolve it after a target spark timing 286. For a given torque request (T Req) the target spark timing (S T) 286 may be determined based on: where APC is an APC, I is an intake valve phasing value, E is an exhaust valve phasing value, AF is an air / fuel ratio, OT is an oil temperature, and # is a number of activated cylinders. This relationship may be embodied as an equation and / or as a look-up table. The air / fuel ratio (AF) may be the actual air / fuel ratio as reported by the fuel control module 240.When the spark timing is set to the optimized spark timing, the resulting torque may be as close as possible to the maximum best torque (MBT). MBT refers to the maximum engine output torque produced for a given air flow while spark timing is advanced, while fuel having an octane greater than a predetermined octane is used and stoichiometric fueling is used. The ignition timing at which the maximum torque occurs is referred to as an MBT ignition timing. For example, due to fuel quality (such as when using fuel with a lower octane number) and environmental factors such as ambient humidity and temperature, the optimal spark timing may be slightly different from the MBT spark timing. Thus, engine output torque may be less than MBT at the optimal spark timing. For example only, a table of optimal spark timing settings corresponding to different engine operating conditions may be determined during a calibration phase of vehicle design, the feed forward value determined from a table based on the current engine operating conditions.The cylinder deactivation torque request 284 may be used by the cylinder control module 236 to determine a target number of cylinders 287 to deactivate. In various implementations, a target number of cylinders to be activated may be used. The cylinder actuator module 120 selectively activates and deactivates the valves of cylinders based on the target number 287.Additionally, the cylinder control module 236 may command the fuel control module 240 to stop providing fuel to deactivated cylinders and command the spark control module 232 to stop providing spark to deactivated cylinders. The spark control module 232 may stop providing spark to a cylinder when a fuel / air mixture already present in the cylinder has been burned.The fuel control module 240 may vary the amount of fuel provided for each cylinder based on the fuel torque request 285. More specifically, the fuel control module 240 may generate target fueling parameters 288 based on the fuel torque request 285. The target fueling parameters 288 may include, for example, a target mass of fuel, a target injection start timing, and a target number of fuel injections.During normal operation, the fuel control module 240 may operate in an air conduction mode in which the fuel control module 240 attempts to maintain a stoichiometric air / fuel ratio by controlling fueling based on the air flow. For example, the fuel control module 240 may determine a target fuel mass that provides stoichiometric combustion when combined with a current mass of air per cylinder (APC).FIG. 3 is a functional block diagram of an example implementation of the air control module 228. Referring now to FIGS. 2 and 3, the air torque request 265 may be a braking torque as discussed above. A torque conversion module 304 converts the air torque request 265 from a brake torque to a base torque. The torque request resulting from the conversion to the base torque is referred to as a base air torque request 308.Base torques may refer to a torque at the crankshaft that is generated during operation of the engine 102 at a dynamometer while the engine 102 is warm and no torque loads are imposed on the engine 102 by accessories such as an alternator and the A / C compressor. The torque conversion module 304 may convert the air torque request 265 to the base air torque request 308, for example, using a map or function that relates the brake torques to base torques. In various implementations, the torque conversion module 304 may convert the air torque request 265 to another suitable torque type, such as a specified torque. An indicated torque may refer to a torque at the crankshaft attributable to work generated via combustion within the cylinders.An MPC module 312 generates the target values 266- 270 using the MPC (model prediction control). The MPC module 312 may be a single module or may include multiple modules. For example, the MPC module 312 may include a sequence determination module 316. The sequence determination module 316 determines possible sequences of the target values 266- 270 that may be used together during N future control loops. Each of the possible sequences identified by the sequence determination module 316 includes a sequence of N values for each of the target values 266- 270. In other words, each possible sequence includes a sequence of N values for the target wastegate opening area 266, a sequence of N values for the target throttle opening area 267, a sequence of N values for the target EGR opening area 268, a sequence of N values for the target intake cam phaser angle 269, and a sequence of N values for the target exhaust cam phaser angle 270. Each of the N values is for a corresponding one of the N future control loops. N is an integer greater than or equal to one.A prediction module 323 determines the predicted response of the engine 102 to the possible sequences of target values 266- 270, respectively, based on a mathematical model 324 of the engine 102, exogenous inputs 328, and feedback inputs 330. More specifically, based on a possible sequence of the target values 266- 270, exogenous inputs 328, and feedback inputs 330, using the model 324, the prediction module 323 generates a sequence of predicted torques of the engine 102 for the N control loops, a sequence of predicted APCs for the N control loops, a sequence of predicted amounts of external dilution for the N control loops, a sequence of predicted amounts of residual dilution for the N control loops, a sequence of predicted combustion phasing values for the N control loops, and a sequence of predicted combustion quality values for the N control loops. Although an example of generating the predicted torque, predicted APC, predicted external dilution, predicted residual dilution, predicted combustion phasing, and predicted combustion quality is described, the predicted parameters may include one or more other predicted engine operating parameters.For example, the model 324 may include a function or characteristic calibrated based on characteristics of the engine 102. The dilution may refer to an amount of exhaust gas from a previous combustion event included for a combustion event within a cylinder. The external dilution may refer to exhaust gas provided via the EGR valve 170 for a combustion event. The residual dilution may refer to exhaust gas remaining in a cylinder and / or exhaust gas being pushed back into the cylinder after the exhaust stroke of a combustion cycle. In addition, the residual dilution may refer to an internal dilution.The combustion phasing may refer to a crankshaft position at which a predetermined amount of injected fuel is burned within a cylinder as compared to a predetermined crankshaft position for the combustion of the predetermined amount of injected fuel. For example, the combustion phasing may be expressed with respect to CA50 versus a predetermined CA50. CA50may refer to a crankshaft angle (CA) at which 50 percent of a mass of injected fuel is burned within a cylinder. The predetermined CA50may correspond to a CA50at which a maximum amount of work is generated from the injected fuel, and may be approximately 8.5 - approximately 10 degrees after TDC (top dead center) in various implementations. Although combustion phasing is discussed with respect to CA50values, any suitable parameter indicative of combustion phasing may be used. Although combustion quality is discussed as coefficient of variation (COV) of indexed mean pressure (IMEP) values, another suitable parameter indicative of combustion quality may also be used.The exogenous inputs 328 may include parameters that are not directly affected by the throttle 112, the EGR valve 170, the turbocharger, the intake cam phaser 148, and the exhaust cam phaser 150. For example, the exogenous inputs 328 may include engine speed, turbocharger intake air pressure, IAT, and / or one or more other parameters. Feedback inputs 330 may include, for example, an estimated torque output of engine 102, an exhaust pressure downstream of turbocharger turbine 160- 1, IAT, an APC of engine 102, an estimated residual dilution, an estimated external dilution, and / or one or more other suitable parameters. The feedback inputs 330 may be measured using sensors (e.g., the IAT) and / or may be estimated based on one or more other parameters.A cost module 332 determines a cost value for each of the possible sequences of the target values 266- 270 based on the predicted parameters determined for a possible sequence and the reference values 356. An example cost determination is discussed further below.A selection module 344 selects one of the possible sequences of the target values 266- 270 based on the cost of the possible sequences, respectively. For example, the selection module 344 may select the one of the possible sequences with the lowest cost while the actuator constraints 348 and the output constraints 352 are satisfied.In various implementations, the cost determination may consider compliance with the actuator constraints 348 and the output constraints. In other words, the cost module 332 may determine the cost values further based on the actuator constraints 348 and the output constraints 352. As discussed further below, based on how the cost values are determined, the selection module 344 selects the one of the possible sequences that, subject to the actuator constraints 348 and the output constraints 352, best achieves the base air torque request 308 while minimizing fuel consumption.The selection module 344 may set the target values 266- 270 to the first of the N values of the selected possible sequence, respectively. In other words, the selection module 344 may set the target wastegate opening area 266 to the first of the N values in the sequence of N values for the target wastegate opening area 266, may set the target throttle opening area 267 to the first of the N values in the sequence of N values for the target throttle opening area 267, may set the target EGR opening area 268 to the first of the N values in the sequence of N values for the target EGR opening area 268, The target intake cam phaser angle 269 may set the target intake cam phaser angle 269 to the first of the N values in the sequence of N values for the target intake cam phaser angle 269 and may set the target exhaust cam phaser angle 270 to the first of the N values in the sequence of N values for the target exhaust cam phaser angle 270.During the next control loop, the MPC module 312 identifies possible sequences, generates the predicted parameters for the possible sequences, determines the cost of each of the possible sequences, selects one of the possible sequences, and sets sets sets of target values 266-270 to the first set of target values 266-270 in the selected possible sequence. This process continues for each control loop.An actuator constraint module 360 (see FIG. 2 ) sets the actuator constraints 348 for each of the target values 266- 270. In other words, the actuator constraint module 360 sets actuator constraints for the throttle valve 112, actuator constraints for the EGR valve 170, actuator constraints for the wastegate 162, actuator constraints for the intake cam phaser 148, and actuator constraints for the exhaust cam phaser 150.The actuator constraints 348 for each of the target values 266- 270 may include a maximum value for an associated target value and a minimum value for that target value. Moreover, the actuator constraints 248 may include a rate of change constraint for an associated target value. Generally, the actuator constraint module 360 may set the actuator constraints 348 to predetermined operating ranges for the associated actuators. More specifically, the actuator constraint module 360 may generally set the actuator constraints 348 to predetermined operating ranges for the throttle 112, the EGR valve 170, the wastegate 162, the intake cam phaser 148, and the exhaust cam phaser 150, respectively.However, in some circumstances, the actuator constraint module 360 may optionally set one or more of the actuator constraints 348. For example, the actuator constraint module 360 may set the actuator constraints for a given actuator to narrow the operating range for that engine actuator when a fault is diagnosed in that engine actuator. For example only, as another example, the actuator constraint module 360 may set the actuator constraints such that the target value for a given actuator follows a predetermined schedule over time or changes by a predetermined amount, e.g., for a fault diagnostic such as a cam phaser fault diagnostic, a throttle diagnostic, an EGR diagnostic, etc. In order for a target value to follow a predetermined schedule or change by a predetermined amount over time, the actuator constraint module 360 may set the minimum and maximum values to the same value. Setting the minimum and maximum values to the same value may force the corresponding target value to be set to the same values as the minimum and maximum values. The actuator constraint module 360 may vary the same value to which the minimum and maximum values are set over time to cause the target value to follow a predetermined schedule.An output constraint module 364 (see FIG. 2 ) sets the output constraints 352 for the predicted engine 102 torque output, the predicted CA50, the predicted COV of the IMEP, the predicted residual dilution, and the predicted external dilution. The output constraints 352 for each of the predicted values may include a maximum value for an associated predicted parameter and a minimum value for that predicted parameter. For example, the output constraints 352 may include a minimum torque, a maximum torque, a minimum CA50and a maximum CA50, a minimum COVof the IMEP and a maximum COVof the IMEP, a minimum residual dilution and a maximum residual dilution, and a minimum external dilution and a maximum external dilution.The output constraint module 364 may generally set the output constraints 352 to predetermined ranges for the associated predicted parameters, respectively. However, the output constraint module 364 may vary one or more of the output constraints 352 in some circumstances. For example, the output restriction module 364 may retard the maximum CA50, such as when knock occurs within the engine 102. As another example, the output constraint module 364 may increase the maximum COV of the IMEP under low load conditions, such as during engine idle, where a higher COV of the IMEP may be necessary to achieve a given torque request.A reference module 368 (see FIG. 2 ) generates the reference values 356 for the target values 266- 270, respectively. The reference values 356 include a reference for each of the target values 266- 270. In other words, the reference values 356 include a reference wastegate opening area, a reference throttle opening area, a reference EGR opening area, a reference intake cam phaser angle, and a reference exhaust cam phaser angle.The reference module 368 may determine the reference values 356 based on, e.g., the air torque request 265 and / or the base air torque request 308. The reference values 356 provide references for setting the target values 266- 270, respectively. As discussed below, the reference values 356 may be used to determine the cost values for possible sequences. Additionally, the reference values 356 may be used to determine possible sequences for one or more other reasons, such as by the sequence determination module 316.Instead of or in addition to generating sequences of possible target values and determining the cost of each of the sequences, the MPC module 312 may identify a sequence of possible target values having the lowest cost using convex optimization techniques. For example, the MPC module 312 may determine the target values 266- 270 using a quadratic programming (QP) solver, such as a Dantzig QP solver. In another example, the MPC module 312 may generate an area of cost values for the possible sequences of target values 266- 270 and identify a sequence of possible target values having the lowest cost based on the increase in cost area. The MPC module 312 may then test this sequence of possible target values to determine whether this sequence of possible target values satisfies the actuator constraints 348 and the output constraints 352. If so, the MPC module 312 may set the target values 266- 270 to the first of the N values of that selected possible sequence, respectively, as discussed above.If the actuator constraints 348 and / or the output constraints 352 are not satisfied, the MPC module 312 selects a different sequence of possible target values at a next lower cost and tests that sequence of possible target values for satisfaction of the actuator constraints 348 and the output constraints 352. The process of selecting a sequence and testing the sequence to satisfy the actuator constraints 348 and the output constraints 352 may be referred to as an iteration. Multiple iterations may be performed during each control loop.The MPC module 312 performs iterations until a lowest cost sequence is identified that satisfies the actuator constraints 348 and the output constraints 352. In this way, the MPC module 312 selects the sequence of possible target values with the lowest cost while satisfying the actuator constraints 348 and the output constraints 352. If no sequence can be identified, the MPC module 312 may indicate that no solution is available.The cost module 332 may determine the cost for the possible sequences of the target values 266- 270 based on relationships between: the predicted torque and the base air torque request 308, the predicted APC and a predetermined minimum APC; the possible target values and the respective actuator constraints 348; the other predicted parameters and the respective output constraints 352; and the possible target values and the respective reference values 356. The relationships may be weighted to control, for example, the effect each of the relationships has on cost.For example only, the cost module 332 may determine the cost (cost) for a possible sequence of the target values 266- 370 based on the following relationship: subject to the actuator constraints 348 and the output constraints 352. Cost is the cost of the possible sequence of target values 266- 270, TPi is the predicted engine 102 torque for the ithof the N control loops, BATR is the base air torque request 308, and wT is a weighting value associated with the relationship between the predicted torque and the base air torque request 308. APCPi is a predicted APC for the ith of the N control loops, MinAPC is the predetermined minimum APC, and wA is a weighting value associated with the relationship between the predicted APC and the predetermined minimum APC.PTTOi is a possible target throttle opening for the ith of the N control loops, TORef is the reference throttle opening, and wTV is a weighting value associated with the relationship between the possible target throttle openings and the reference throttle opening. PTWGOi is a possible target wastegate opening for the ith of the N control loops, WGORef is the reference wastegate opening, and wWG is a weighting value associated with the relationship between the possible target wastegate openings and the reference wastegate opening.PTEGROi is a possible target EGR opening for the ith of the N control loops, EGRRegr is the reference EGR opening, and a wEGR is a weighting value associated with the relationship between the possible EGR openings and the reference EGR opening. PTICi is a possible target intake cam phaser angle for the ith of the N control loops, ICPRef is the reference intake cam phaser angle, and wIP is a weighting value associated with the relationship between the possible target intake cam phaser angle and the reference intake cam phaser angle. PTECi is a possible target exhaust cam phaser angle for the ith of the N control loops, ECPRef is the reference exhaust cam phaser angle, and wEP is a weighting value associated with the relationship between the possible target exhaust cam phaser angle and the reference exhaust cam phaser angle.ρ is a weight value associated with satisfying the output constraints 352. ε is a variable that the cost module 332 can set based on whether the output constraints 352 are satisfied. For example, the cost module 332 may increase ε when a predetermined parameter (e.g., at least a predetermined amount) is greater or less than the corresponding minimum or maximum value. The cost module 332 may set ε to zero when all of the output constraints 352 are satisfied. ρ may be greater than the weight value wT, the weight value wA, and the other weight values (wTV, wWG, wEV, wIP, wEP) such that the cost determined for a possible sequence is large when one or more of the output constraints 352 are not satisfied. This may help prevent the selection of a possible sequence if one or more of the output constraints 352 are not satisfied.The weight value wT may be larger than the weight value wA and the weight values wTV, wWG, wVL, wIP, and wEP. In this way, as discussed below, the relationship between the predicted engine torque and the base air torque request 308 has a greater effect on cost and thus on the selection of one of the possible sequences. As the difference between the predicted engine torque and the base air torque request 308 increases, the cost increases, and vice versa.The weight value wA may be smaller than the weight value wT and larger than the weight values wTV, wWG, wVL, wIP, and wEP. In this way, the relationship between the predicted APC and zero has a great effect, but less than the relationship between the predicted engine torque and the base air torque request 308, on cost. As the difference between the predicted APC and the predetermined minimum APC increases, the cost increases, and vice versa. For example only, the predetermined minimum APC may be zero or another suitable value.Determining the cost based on the difference between the predicted APC and the predetermined minimum APC helps ensure that the APC is minimized. Since fueling is controlled based on the actual APC, decreasing the APC reduces fuel consumption to achieve a target air / fuel mixture. While the selection module 344 may select the one of the possible sequences having the lowest cost, the selection module 344 may select the one of the possible sequences that best achieves the base air torque request 308 while minimizing the APC. Although the example of minimizing APC is discussed, in various implementations, an efficiency parameter may be predicted and maximized. For example, the efficiency parameter may be the predicted torque divided by the predicted APC or predicted fuel consumption.The weight values wTV, wWG, wWD, wIP, and wEP may be less than all other weight values. In this way, the target values 266- 270 may each adjust near or at the reference values 356 during steady-state operation. However, during transient operation, the MPC module 312 may set the target values 266- 270 away from the reference values 356 to achieve the base air torque request 308 while minimizing the APC and satisfying the actuator constraints 348 and the output constraints 352.Referring now to FIG. 4, an example method of controlling throttle valve 112, intake cam phaser 148, exhaust cam phaser 150, wastegate 162 (and thus the turbocharger), and EGR valve 170 using MPC (model prediction control) begins at 402. At 404, the torque request module 224 determines an air torque request 265 based on the adjusted predicted torque request and the adjusted immediate torque requests 263 and 264.At 408, the torque conversion module 304 converts the air torque request 265 to the base air torque request 308 or to any other suitable torque type for use by the MPC module 312. At 408, the sequence determination module 316 determines possible sequences of the target values 266- 270 based on the base air torque request 308.At 410, the prediction module 323 determines the predetermined parameters for each of the possible sequences of target values. The prediction module 323 determines the predicted parameters for the possible sequences based on the model 324 of the engine 102, the exogenous inputs 328, and the feedback inputs 330. More specifically, based on a possible sequence of the target values 266- 270, exogenous inputs 328, and feedback inputs 330, using the model 324, the prediction module 323 generates a sequence of predicted torques of the engine 102 for the N control loops, a sequence of predicted APCs for the N control loops, a sequence of predicted amounts of external dilution for the N control loops, a sequence of predicted amounts of residual dilution for the N control loops, a sequence of predicted combustion phasing values for the N control loops, and a sequence of predicted combustion quality values for the N control loops.At 412, the cost module 332 determines the cost for the possible sequences, respectively. For example only, the cost module 332 may determine the cost (Cost)) for a possible sequence of the target values 266- 270 as discussed above based on the equation subject to the actuator constraints 348 and the output constraints 352 as discussed above.At 414, the selection module 344 selects one of the possible sequences of the target values 266- 270 based on the cost of the possible sequences. For example, the selection module 344 may select the one of the possible sequences having the lowest cost. The selection module 344 may therefore select the one of the possible sequences that best satisfies the baseline air torque request 308 while minimizing the APC. Instead of or in addition to determining possible sequences of the target values 230- 244 at 408 and determining the cost of each of the sequences at 412, the MPC module 312 may identify a sequence of possible target values having the lowest cost using convex optimization techniques as discussed above.At 416, the MPC module 312 determines whether the selected one of the possible sequences satisfies the actuator constraints 348. If the selected one of the possible sequences satisfies the actuator constraints 348, the method continues to 418. Otherwise, the method continues to 420, where the MPC module 312 selects the one of the possible sequences having the next lowest cost. The method then returns to 416. In this way, the lowest cost sequence meeting the actuator constraints 348 is used.At 418, the first conversion module 272 converts the target wastegate opening area 266 to the target duty cycle 274 to be applied to the wastegate 162, the second conversion module 276 converts the target throttle opening area 267 to the target duty cycle 278 to be applied to the throttle 112. Additionally, at 418, the third conversion module 280 converts the target EGR opening area 268 to the target duty cycle 282 to be applied to the EGR valve 170. Also, at 418, the fourth conversion module may convert the target intake cam phaser angle and the target exhaust cam phaser angles 269 and 270 to the target intake and exhaust phasing degrees to be applied to the intake cam phaser and exhaust cam phasers 148 and 150, respectively.At 422, the throttle actuator module 116 controls the throttle 112 to achieve the target throttle opening area 267, and the phaser actuator module 158 controls the intake cam phaser and the exhaust cam phasers 148 and 150 to achieve the target intake cam phaser angle and the target exhaust cam phaser angles 269 and 270, respectively. For example, the throttle actuator module 116 may apply a signal to the throttle 112 at the target duty cycle 278 to achieve the target throttle opening area 267.Additionally, the EGR actuator module 172 controls the EGR valve 170 at 422 to achieve the target EGR opening area 268, and the boost actuator module 164 controls the wastegate 162 to achieve the target wastegate opening area 266. For example, the EGR actuator module 172 may apply a signal at the target duty cycle 282 to the EGR valve 170 to achieve the target EGR opening area 268, and the boost actuator module 164 may apply a signal at the target duty cycle 274 to the wastegate 162 to achieve the target wastegate opening area 266. While the termination of the method is shown at 424, FIG. 4 may illustrate a control loop and control loops may be executed at a predetermined rate.Referring back to FIG. 3, a remedial action module 380 may monitor the amount of time that elapses when the MPC module 312 performs iterations as well as take one or more remedial action when the elapsed time is greater than a threshold. For example, the remedial action module 380 may instruct the MPC module 312 to suspend iterations when the elapsed time of iterations started during the current control loop executed by the ECM 114 is greater than or equal to a first period. The elapsed time of iterations started during the current control loop may be referred to as the current iteration time, even though the iterations may be performed during successive control loops. The first period may be predetermined to allow sufficient time for completion of other tasks before the current control loop ends. For example, if the period for each control loop executed by the ECM 114 is 25 milliseconds (ms) and the other tasks require 2 ms to complete, the first period may be set to 23 ms.The other tasks are tasks not performed by the MPC module 312 and may have a lower priority than the control loop performed by the MPC module 312. For example, the other tasks may include measuring engine coolant temperature, measuring exhaust temperature, determining generator load, and / or determining air conditioner load. The ECM 114 may assign a higher priority to a task having a faster loop rate relative to a task having a lower loop rate. For example, a task with a loop rate of 25 ms may be assigned a higher priority than a task with a loop rate of 50 ms. Additionally, the ECM 114 may assign a higher priority to synchronous-based tasks relative to time-based tasks. The loop rate of a time-based task is known when the loop rate of a synchronous-based task is unknown.Remedial action module 380 may instruct MPC module 312 to resume iterations when the other tasks are complete. If the MPC module 312 selects one of the possible sequences of the target values 266- 270 before the control loop executed by the ECM 114 ends, the remedial action module 380 allows the MPC module 312 to set the target values 266- 270 to the first of the N values of the selected sequence.If the current iteration time is greater than or equal to a second period, remedial action module 380 may instruct MPC module 312 to set target values 266- 270 for the current control loop independent of the possible sequences of target values 266- 270 for the iterations started during the current control loop. The second period may be greater than the first period and / or equal to the period of the control loop executed by the ECM 114. In one example, the remedial action module 380 may instruct the MPC module 312 to set the target values 266- 270 to the respective ones of the reference values 356 subject to the actuator constraints 348 and the output constraints. In a second example, remedial action module 380 may instruct MPC module 312 to set target values 266- 270 to the first of the N values of the possible sequence of target values 266- 270 selected during a previous control loop. In a third example, remedial action module 380 may instruct MPC module 312 to set target values 266- 270 to the second of the N values of the possible sequence of target values 266- 270 selected during the previous control loop.Additionally, if the current iteration time is greater than or equal to the second period, remedial action module 380 may instruct MPC module 312 to refrain from starting a new set of iterations during the next control loop. Subsequently, when the MPC module 312 selects one of the possible sequences of the target values 266- 270, the MPC module 312 may set the target values 266- 270 for the next control loop equal to the first of the N values of the selected sequence. In other words, the MPC module 312 may set the target values 266- 270 for the next control loop based on iterations started during the current control loop when the time of the current iteration extends into the period assigned to the next control loop.In this way, remedial action module 380 allows MPC module 312 to complete the iterations started during the current control loop. The MPC module 312 may then restart iterations during the control loop after the next control loop. If the MPC module 312 is allowed to complete the iterations started during the current control loop, this may reduce the amount of time required to complete iterations started during subsequent control loops. Additionally, the loop rate of the MPC module 312 may be decreased relative to a worst case loop rate for the iteration time expected to last longest.If the current iteration time is greater than a third period, the solution sought by the MPC module 312 may be impractical or there may be another fault in the MPC module 312. Thus, the remedial action module 380 may diagnose a fault in the MPC module 312 and generate a fault signal 384. Additionally, remedial action module 380 may reset and re-initialize MPC module 312, for example, by clearing memory in MPC module 312. Further, remedial action module 380 may activate service indicator 199 and / or set a diagnostic trouble code (DTC). The third period may be greater than the second period and may be equal to the sum of the periods of the two control loops executed by the ECM 114. Thus, the current iteration time may extend into the period assigned to the control loop after the next control loop when the current iteration time is greater than the third period.When the error signal 384 is generated, an assist module 388 may set the target values 266- 270 to the reference values 256, respectively. More specifically, the assist module 388 may set the target wastegate opening area 266 to the reference wastegate opening area, set the target throttle opening area 267 to the reference throttle opening area, set the target EGR opening area 268 to the reference EGR opening area, set the target intake cam phaser angle 269 to the reference intake cam phaser angle, and set the target exhaust cam phaser angle 270 to the reference exhaust cam phaser angle. Additionally, the assist module 388 may limit changes in the target values 266- 270 and / or limit the torque output of the engine 102 by adjusting the target values 266- 270 or disabling certain actuators. For example, the assist module 388 may limit the torque output of the engine 102 by fully opening the wastegate 162, closing the throttle valve 112 after retarding the intake and exhaust cam phasers 148 and 150, disabling fueling to one or more cylinders of the engine 102, and / or disabling spark in one or more cylinders of the engine 102. The support module 388 may set the target values 266- 270 to those set by the MPC module 312 when the error signal 384 is not generated.In various implementations, the period required to perform a single iteration may be predetermined. In these implementations, remedial action module 380 may monitor the number of iterations that MPC module 312 performs and multiply the number of iterations by the predetermined iteration period to obtain the current iteration time. Alternatively, instead of comparing the current iteration time to a first period, a second period, and a third period, remedial action module 380 may compare the number of iterations to a first value, a second value, and a third value. The first value, the second value, and the third value may be predetermined and / or may be determined by dividing the first period, the second period, and the third period by the predetermined iteration period.Referring now to FIG. 5, a method for managing a period of a control loop executed by the MPC module 312 begins with 502. At 504, the remedial action module 380 monitors the amount of time that elapses when the MPC module 312 completes iterations initiated during the current control loop executed by the ECM 114. As discussed above, the elapsed time may be referred to as the current iteration time.At 506, the remedial action module 380 determines whether the current iteration time is greater than or equal to the first period. As discussed above, the first period may be predetermined to allow sufficient time to complete other tasks before the current control loop ends. If the current iteration time is greater than or equal to the first period, the method continues to 508. Otherwise, the MPC module 312 operates normally. Thus, the method returns to 504, and the MPC module 312 continues execution of iterations until a solution is found. If the MPC module 312 selects a sequence of possible target values while the current iteration time is less than the first period, the MPC module 312 may command the next position for each engine actuator according to the selected sequence.At 508, the remedial action module 380 instructs the MPC module 312 to suspend iterations. At 510, remedial action module 380 determines whether other tasks are complete. As discussed above, other tasks are tasks that are not performed by the MPC module 312 and have a lower priority than the control loop performed by the MPC module 312. If the other tasks are complete, the method continues to 512 where the MPC module 312 resumes iterations. Otherwise, the method returns to 508 and the MPC module 312 continues an suspension of the iterations.At 514, the remedial action module 380 determines whether the current iteration time is greater than or equal to the second period. As discussed above, the second period may be greater than the first period and / or equal to the period of the control loop executed by the ECM 114. If the current iteration time is greater than or equal to the second period, the method continues to 516. Otherwise, the method returns to 512 and the MPC module 312 continues execution of the iterations until a solution is obtained.At 516, remedial action module 380 instructs MPC module 312 to set target values 266- 270 for the current control loop independent of the possible sequences of target values 266- 270 for the iterations started during the current control loop. In one example, remedial action module 380 may instruct MPC module 312 to set target values 266- 270 to the respective ones of reference values 256 subject to actuator constraints 348 and output constraints. In a second example, remedial action module 380 may instruct MPC module 312 to set target values 266- 270 to the first of the N values of the possible sequence of target values 266- 270 selected during a previous control loop. In a third example, remedial action module 380 may instruct MPC module 312 to set target values 266- 270 to the second of the N values of the possible sequence of target values 266- 270 selected during the previous control loop.Also at 516, the remedial action module 380 may instruct the MPC module 312 to refrain from starting a new set of iterations during the next control loop. Then, when the MPC module 312 selects one of the possible sequences of the target values 266- 270, the MPC module 312 may set the target values 266- 270 for the next control loop equal to the first of the N values of the selected sequence. In other words, the MPC module 312 may set the target values 266- 270 for the next control loop based on iterations started during the current control loop when the current iteration time extends into the period assigned for the next control loop.At 518, the remedial action module 380 determines whether the current iteration time is greater than the third period. As discussed above, the third period may be greater than the second period and may be equal to the sum of the periods of two control loops executed by the ECM 114. Thus, the current iteration time may extend into the period allocated for the control loop after the next control loop if the current iteration time is greater than the third period. If the current iteration time is greater than the third period, the method continues to 520. Otherwise, the method returns to 516 and the MPC module 312 continues execution of iterations until a solution is obtained.At 520, remedial action module 380 may diagnose a fault in MPC module 312 and generate a fault signal 384. Also at 520, remedial action module 380 may reset and re-initialize MPC module 312, for example, by clearing memory in MPC module 312. Also at 520, remedial action module 380 may activate service indicator 199 and / or set a diagnostic trouble code (DTC).Referring now to FIG. 6, example scenarios associated with the method of FIG. 5 are shown. The scenarios depicted include a first scenario 602, a second scenario 604, a third scenario 606, and a fourth scenario 608. Scenarios 602- 608 are plotted with respect to an x-axis 610 representing time.In all scenarios 602- 608, the ECM 114 executes a first control loop from 612 to 614, the ECM 114 executes a second control loop from 614 to 616, and the MPC module 312 begins a first set 618 of MPC iterations at 612. The time that elapses when the MPC module 312 completes the first set 618 may be referred to as the current iteration time. In the first scenario 602, when the MPC module 312 finds a solution, the MPC module 312 completes the first set 618 at 620. Thus, from 620 to 622, the ECM 114 performs other (non-MPC) tasks 624.The ECM 114 completes the other tasks 624 before a first time 626. The period of 612 at the first time 626 may be equal to the first period, as discussed above. Because the MPC module 312 completes the first set 618 of MPC iterations before the first time 626, the first scenario 602 shows normal operation of the MPC module 312. In this regard, the first scenario 602 may correspond to the case in FIG. 5 where, at 506, the current iteration time is less than the first period.At 614, the first control loop ends and the second control loop begins. Because the MPC module 312 has completed the first set 618 during the first control loop, the MPC module 312 starts a second set 628 of MPC iterations at 614. In the first and second sets 618 and 628, each square represents a single iteration.In the second scenario 604, the MPC module 312 does not complete the first set 618 prior to the first time 626. In this regard, the second scenario 604 may correspond to the case in FIG. 5 where, at 506, the current iteration time is greater than or equal to the first period. Thus, at the first time 626, the MPC module 312 suspends the first set 618 to enable completion of the other tasks 624 by the ECM 114.At 630, the ECM 114 completes the other tasks 624. Thus, the MPC module 312 resumes the first set 618 of MPC iterations. The MPC module 312 completes the first set 618 during the first control loop. Thus, at 614, the MPC module 312 starts the second set 628 of MPC iterations.In the third scenario 606, the ECM 114 does not complete the other tasks 624 through 614, at which point the MPC module 312 resumes the first set 618. Thus, the MPC module 312 does not complete the first set 618 during the first control loop. In this regard, the second scenario may correspond to the case in FIG. 5 where, at 514, the current iteration time is greater than or equal to the second period.Since the MPC module 312 has not completed the first set 618 during the first control loop, the MPC module 312 does not start the second set 628 at 614. In addition, the MPC module 312 sets the target values for the first control loop regardless of the sequence of possible target values selected upon completion of the first set 618. For example, the MPC module 312 may set the target values for the first control loop to the target values set in the last control loop. At 632, the MPC module 312 completes the first set 618 and selects a sequence of possible target values. In turn, the MPC module 312 may set the target values for the second control loop to the first of the selected sequence of possible target values.In the fourth scenario 608, the MPC module 312 does not complete the first set 618 prior to a second time 634. The period of 614 at the second time 634 may be equal to the first period. Thus, at the second time 634, the MPC module 312 suspends the first set 618 to allow the ECM 114 to complete the other tasks 624.At 616, the ECM 114 completes the other tasks, at which point the MPC module 312 resumes the first set 618 of MPC iterations. Thus, the MPC module 312 does not complete the first set 618 during the second control loop. In this regard, the fourth scenario 608 may correspond to the case in FIG. 5 where, at 518, the current iteration time is greater than or equal to the third period. Thus, at 616, remedial action module 380 may diagnose a fault in MPC module 312, reset and re-initialize MPC module 312, and / or enable service indicator 199. Alternatively, remedial action module 380 may not perform these actions until ECM 114 completes a predetermined number of control loops of greater than two.The foregoing description is merely illustrative in nature and is not intended to limit the disclosure, its application, or uses in any way. The broad teachings of the disclosure may be implemented in a variety of forms. Thus, while this disclosure includes particular examples, the true scope of the disclosure is not intended to be so limited as other changes will become apparent upon studying the drawings, the specification, and the following claims. As used herein, the phrase at least one of A, B, and C is intended to mean a logical (A or B or C) using a non-exclusive logical OR. Of course, one or more steps within a method may be performed in a different order (or simultaneously) without altering the principles of the present disclosure.In this application, including in the following definitions, the term module may be replaced by the term circuit. The term module may refer to, be part of, or include an application specific integrated circuit (ASIC); a digital, analog, or mixed analog / digital discrete circuit; a digital, analog, or mixed analog / digital integrated circuit; a combinational logic circuit; a field programmable logic array (FPGA); a processor (shared, dedicated, or group) that executes code; memory (shared, dedicated, or group) that stores code executed by a processor; other suitable hardware components that provide the described functionality; or a combination of some or all of the above, such as in a system-on-a-chip.The term code as used above may include software, firmware, and / or microcode, and may refer to programs, routines, functions, classes, and / or objects. The term shared processor includes a single processor that executes some or all of the code from multiple modules. The term group processor includes a processor that executes some or all of the code from one or more modules along with additional processors. The term shared memory includes a single memory that stores some or all of the code from multiple modules. The term group memory includes a memory that stores some or all code from one or more modules along with additional memories. The term memory may be a subset of the term computer readable medium. The term computer readable medium does not include transitory electrical and electromagnetic signals propagating through a medium and thus may be considered tangible and non-transitory. Non-limiting examples of a non-transitory tangible computer readable medium include non-transitory memory, volatile memory, a magnetic storage, and an optical storage.The apparatuses and methods described in this application may be partially or fully implemented by one or more computer programs executed by one or more processors. The computer programs include processor-executable instructions stored on at least one non-transitory tangible computer-readable medium. The computer programs may also contain and / or rely on stored data.
Claims
A method of managing a period of a control loop for controlling an engine (102) using model prediction control (MPC), comprising: executing MPC tasks performed by an MPC module (312) comprising: determining predicted operating parameters for a set of possible target values (266-270)(410); determining costs of the set of possible target values (266-270) based on the predicted operating parameters (412); selecting the set of possible target values (266-270) from a plurality of sets of possible target values (266-270) based on the costs (414); and setting target values (266-270) to the possible target values (266-270) of the selected set (418); controlling an actuator (112, 148, 150, 162, 170) of the engine (102) based on at least one of the target values (422); and monitoring or obtaining the time that elapses when the MPC module (312) performs iterations (504), wherein iterations started during a current loop are referred to as current iterations, and the time that elapses when the MCP module (312) performs the current iterations is referred to as current iteration time, when the current iteration time extends (506) into the period assigned to the next loop, instructing the MPC module (312) to set the target values (266-270) for the current loop to the target values (266-270) set (516), characterized in that, by not restarting iterations in the next loop and allowing the current iterations to complete during the next loop (516).The method of claim 1, further comprising suspending the MPC tasks when the elapsed time is greater than a first period (508).The method of claim 2, further comprising resuming the MPC tasks when other tasks are complete, the other tasks having a lower priority than the MPC tasks (512).
Citation Information
Patent Citations
Method for automated data input for controller of vehicle for improving moment prediction of vehicle drive, involves using data input to build characteristic for parameters concerning ignition angle
DE102009024544A1
Systems for optimal value control of a camshaft phaser
DE102011017414A1
Safety procedure for coordinated torque control
DE102013217929A1
Calibration procedures for controllers with predictive models
DE102014110695A1
Using model predictive control to optimize variable trajectories and system control
US20110301723A1