Login| Sign Up| Help| Contact|

Patent Searching and Data


Title:
MODEL PREDICTIVE CONTROL SYSTEM AND METHOD FOR CONTROLLING OPERATION OF MACHINE
Document Type and Number:
WIPO Patent Application WO/2018/173569
Kind Code:
A1
Abstract:
A model predictive control (MPC) system for controlling an operation of a machine according to a model of the machine dynamics optimizes a cost function over a time-horizon subject to constraints to produce a sequence of control inputs to control the state of the machine over the time horizon. The machine is control using the first control input in the sequence. The cost function includes a first term defined by an objective of the MPC and a second term penalizing deviation of a state of the machine from a value satisfying an equation of dynamics of the machine.

Inventors:
KNIAZEV ANDREI (US)
MALYSHEV ALEKSANDR (US)
Application Number:
PCT/JP2018/005363
Publication Date:
September 27, 2018
Filing Date:
February 08, 2018
Export Citation:
Click for automatic bibliography generation   Help
Assignee:
MITSUBISHI ELECTRIC CORP (JP)
International Classes:
G05B13/04
Foreign References:
US20160147203A12016-05-26
US20110022193A12011-01-27
US20160147203A12016-05-26
Other References:
SARAF NILAY ET AL: "Fast model predictive control based on linear input/output models and bounded-variable least squares", 2017 IEEE 56TH ANNUAL CONFERENCE ON DECISION AND CONTROL (CDC), IEEE, 12 December 2017 (2017-12-12), pages 1919 - 1924, XP033304099, DOI: 10.1109/CDC.2017.8263930
JAMES B RAWLINGS: "Tutorial Overview of Model Predictive Control", IEEE SIGNAL PROCESSING MAGAZINE, IEEE SERVICE CENTER, PISCATAWAY, NJ, US, vol. 20, no. 3, 1 June 2000 (2000-06-01), pages 38 - 52, XP011084188, ISSN: 1053-5888
Attorney, Agent or Firm:
SOGA, Michiharu et al. (JP)
Download PDF:
Claims:
[CLAIMS]

[Claim 1]

A model predictive control (MPC) system for controlling an operation of a machine according to a model of the machine dynamics, comprising:

a memory to store a cost function including a first term defined by an objective of the MPC and a second term penalizing deviation of a state of the machine from a value satisfying an equation of dynamics of the machine;

a processor to optimize the cost function over a time-horizon subject to constraints to produce a sequence of control inputs to control the state of the machine over the time horizon; and

a controller to control the machine according to the first control input in the sequence.

[Claim 2]

The system of claim 1, wherein the second term includes a member of the equation of dynamics of the machine determined such that the optimization of the cost function performed by the processor encourages determining the state of the machine that makes the equation of dynamics of the machine true.

[Claim 3]

The system of claim 1, wherein the cost function includes a third term of the state penalizing deviation of the state from a soft constraint.

[Claim 4]

The system of claim 3, wherein the soft constraint includes one or combination of a constraint on a structure of the state and a constraint on behavior of the state.

[Claim 5]

The system of claim 3, wherein the soft constraint includes one or combination of a constraint on a sparsity of the state, a constraint on a symmetry of the state, a constraint on stability of the state, a constraint on smoothness of the state, a constraint on rate of change of the state in time.

[Claim 6]

The system of claim 1, wherein the cost function includes a third term performing data assimilation of the state within the time horizon, such that the processor produces the sequence of control inputs to move the state of the machine according to the assimilated states.

[Claim 7]

The system of claim 6, wherein the data assimilation adjusts values of the state determined using the equation of the dynamics of the machine within the time-horizon based on previous values of the state.

[Claim 8]

The system of claim 6, wherein the processor optimizes the cost function using a variant of a Kalman filter.

[Claim 9]

The system of claim 8, wherein the variant of a Kalman filter includes one or combination of a classical Kalman filter (KF), an extended Kalman filter (EKF), an unscented Kalman filter (UKF), an ensemble Kalman filter (EnKF), an ensemble Kalman Smoother (EnKS), a 4D variational model (4DVAR).

[Claim 10]

The system of claim 1, wherein the cost function balances weights of the first term and the second term in finding the sequence of control inputs using a weighted least squares method, and wherein the weights are stored in the memory of the MPC system.

[Claim 11]

The system of claim 1, wherein the processor optimizes the cost function by repeated alternating optimization for the control inputs and for the state.

[Claim 12]

The system of claim 1 , wherein the machine is a redundant laser processing machine.

[Claim 13]

A method for controlling an operation of a machine using a model predictive control (MPC) according to a model of the machine dynamics, wherein the method uses a processor coupled with stored instructions implementing the method, wherein the instructions, when executed by the processor carry out at least some steps of the method, comprising:

retrieving from a memory a cost function including a first term defined by an objective of the MPC and a second term penalizing deviation of a state of the machine from a value satisfying an equation of dynamics of the machine;

optimizing the cost function over a time-horizon subject to hard constraints to produce a sequence of control inputs to control the state of the machine over the time horizon; and

controlling the machine according to the first control input in the sequence. [Claim 14]

The method of claim 13, wherein the second term includes a member of the equation of dynamics of the machine determined such that the optimization of the cost function performed by the processor encourages determining the state of the machine that makes the equation of dynamics of the machine true.

[Claim 15]

The method of claim 13, wherein the cost function includes a third term of the state penalizing deviation of the state from a soft constraint, wherein the soft constraint includes one or combination of a constraint on a structure of the state and a constraint on behavior of the state.

[Claim 16]

The method of claim 13, wherein the cost function includes a third term performing data assimilation of the state within the time horizon, such that the processor produces the sequence of control inputs to move the state of the machine according to the assimilated states.

[Claim 17]

The method of claim 16, wherein the data assimilation adjusts values of the state determined using the equation of the dynamics of the machine within the time-horizon based on previous values of the state.

[Claim 18]

The method of claim 16, wherein the processor optimizes the cost function using a variant of a Kalman filter.

[Claim 19]

The method of claim 13, wherein the machine is a redundant laser processing machine.

[Claim 20]

A non-transitory computer readable storage medium embodied thereon a program executable by a processor for performing a method, the method comprising:

retrieving from a memory a cost function including a first term defined by an objective of the MPC and a second term penalizing deviation of a state of the machine from a value satisfying an equation of dynamics of the machine;

optimizing the cost function over a time-horizon subject to hard constraints to produce a sequence of control inputs to control the state of the machine over the time horizon; and

controlling the machine according to the first control input in the sequence.

Description:
[DESCRIPTION]

[Title of Invention]

MODEL PREDICTIVE CONTROL SYSTEM AND METHOD FOR CONTROLLING OPERATION OF MACHINE

[Technical Field]

[0001]

This invention relates generally to controlling an operation of a machine, and more particularly to controlling the operation using a model predictive control (MPC) over a receding horizon.

[Background Art]

[0002]

In machine control, a controller, which can be implemented using one or combination of software or hardware, generates commands values for input to a machine based on measurements obtained, e.g., from sensors and/or estimators, from outputs of the machine. The controller selects the input so that the machine operates as desired, for instance, the operation follows a desired reference profile, or regulates the outputs to a specific value. In several cases, the controller enforces constraints on the inputs and outputs of the machine, for instance, ensuring the corresponding variables are in some predetermined ranges to ensure safe machine operation from a physical, specification. In order to enforce such constraints, the controller often uses a model of the machine to predict what behavior the machine produces when a command, i.e., a control input, is applied. One example of a process in a controller that is capable of achieving control of a machine while enforcing constraints on the machine inputs and outputs is model predictive control (MPC).

[0003]

The MPC is based on a horizon optimization of a model of a machine dynamics and has the ability to anticipate future events to take appropriate control actions. This is achieved by optimizing the operation of the machine over a future time-horizon subject to constraints, and only implementing the control over the current timeslot. For example, the constraints can represent physical limitation of the machine, safety limitations on the operation of the machine, and performance limitations on a trajectory. A control strategy for the machine is admissible when the motion generated by the machine for such a control strategy satisfies all the constraints. For example, at time /, the current state of the machine is sampled and an admissible cost minimizing control strategy is determined for a relatively short time horizon T in the future. Specifically, an online or real-time calculation determines a cost-minimizing control strategy until time t+T. After the step of the control is implemented, the state is sampled again and the calculations are repeated starting from the now current state, yielding a new control and new predicted state path. The prediction horizon shifts forward, and for this reason MPC is also called receding horizon control.

[0004]

The MPC can be used to generate the actual trajectory of the motion of the machine based on a model of the system and the desired reference trajectory by solving an optimal control problem over a future time subject to various physical and specification constraints of the system. The MPC aims for optimizing, e.g., minimizing or maximizing, performance indices of the motion of the machine, such as an error between a reference and an actual motion of the machine, the machine energy consumption, and induced system vibration.

[0005]

Because the MPC is a model-based framework, the performance of the MPC inevitably depends on the quality of the prediction model used in the optimal control computation. However, in most cases, the model for the machine dynamics is unknown a priori, as some parameters are not measured precisely. Thus, the controller may need to estimate unknown parameters of the model of the machine, during already operation of the machine, and thus, also enforce constraints while the parameters are estimated. The methods to handle such problems include adaptive or learning-based MPC, where an MPC control problem is augmented with a closed-loop identification scheme in order to learn the unknown machine parameters. By learning the unknown parameters, the operation of the machine achieved by the controller is improved.

[0006]

However, current approaches of adaptive and learning based MPC are limited for multiple reasons. For example, while estimating the unknown parameters, constraints can be violated or the control performance may be excessively reduced in order to conservatively enforce the constraints. In fact, several existing methods, such as a method described in U.S. 2011/0022193, simply ignore the constraints and thus are incapable of producing admissible control strategies for machines subject to constraints. The method described in U.S. 2016/0147203 addresses the issue of the constraints, but still estimating the unknown parameters of the model of machine dynamics remains a difficult problem.

[0007]

Accordingly, there is a need for a method for controlling an operation of a machine using the MPC that includes uncertainty suitable for controlling the operation of the machine subject to the constraints.

[Summary of Invention]

[0008]

Some embodiments are based on recognition that parameters of a model of dynamics of a machine are rarely known exactly. Different identification and learning methods aim to update the parameters of the model to reduce the uncertainty about true values of those parameters but hardly eliminate that uncertainty. Further, in addition to the uncertainties due to lack of precise models, the uncertainties of the control can be also introduced by inaccuracies in measurements, errors caused by model reductions, and uncertainties in the state features.

[0009]

Some embodiments are based on surprising realization that various model predictive control (MPC) methods use the model of the dynamics of the machine as a hard constraint on control optimization even when the parameters of the model are not precisely known. Even if those MPC methods attempt to improve the accuracy of the model over time, inaccuracy of the model for even brief period of time can lead the machine into an undesirable state.

[0010]

Some embodiments are based on realization that the model of the dynamic of the machine in MPC should be used as a soft constraint rather than the hard constraint. In such a manner, the state of the machine that deviates from a value satisfying the model of the dynamic can be discouraged but allowed in

acknowledgment that such a state can satisfy the model of the dynamic if the parameters of the model are known precisely.

[0011]

For example, typically, a model of dynamics of a machine is represented by an equation of dynamics of the machine. Such an equation serves as a hard constraint in MPC optimization forcing the MPC to produce the control inputs controlling the operation of the machine that move the machine into the state that makes the equation of dynamics of the machine true.

[0012]

Some embodiments remove such a hard constraint on MPC by moving the equation of dynamics of the machine into a cost function of MPC served to optimize the performance of the machine. For example, in one embodiment, a cost function includes a first term of a state of the machine penalizing deviation of the state of the machine from an objective of MPC and a second term of the state of the machine penalizing deviation of the state of the machine from a value satisfying an equation of dynamics of the machine.

[0013]

The combination of those terms allows to balance the performance of the operation of the system with the degree of uncertainty of the parameters of the model. For example, lesser value of the uncertainty of the model can justify an increase of the weight of the second term in the cost function. Greater value of the uncertainty motivates decreasing the weight. For example, in one embodiment, the cost function balances weights of the first term and the second term in finding the sequence of control inputs using a weighted least squares method.

[0014]

In some implementations, the second term includes a member of the equation of dynamics of the machine determined such that the optimization of the cost function performed by the processor encourages determining the member of the equation of dynamics of the machine that makes the equation of dynamics of the machine true.

[0015]

For example, the equation of dynamics of the machine describes the time dependence of a state in a space, e.g., a geometrical space, a control space, etc. The equation of dynamics of the machine is a statement of an equality containing the state of the machine as a variable. The members of the equality can be placed on the same side to allow minimum or maximum optimization.

[0016]

For example, if the equation of dynamics of the machine is x" = v(x), such an equation can be rewritten as magnitude (χ Λ - v(x)) = 0, wherein the

"magnitude" of an argument is a nonnegative number that determines a deviation of the argument from zero. In such a manner, when the magnitude term magnitude (χ Λ - v(x)) is a part of the cost function, the minimization of the cost function also minimizes the deviation of the difference x " - v(x) from zero and thus encourages making the equation of dynamics of the machine true. Conversely, if the MPC optimization maximizes the cost function, the equation of dynamics of the machine can be rewritten as - magnitude ( - v(x)) = 0. In this example, the member of the equation magnitude (x " - v(x)) or - magnitude (x " - v(x)), which allows considering the equation of dynamics as a soft constraint rather than the equality forming the hard constraint. An example of magnitude (x" - v(x)) can be an integral (squared) of the absolute value of (χ' - v(x)).

[0017]

Some embodiments are based on realization that when the equation of dynamics of the machine is used as a soft constraint, additional soft constraint on the state of the machine can be used to further improve the accuracy of the control in the presence of uncertainties. For example, some embodiments include a third term of the state in the cost function of MPC that penalizes deviation of the state from a soft constraint, such as a constraint on a structure of the state and a constraint on behavior of the state. Examples of such a soft constraint include a constraint on a sparsity of the state, a constraint on a symmetry of the state, a constraint on stability of the state, a constraint on smoothness of the state, a constraint on rate of change of the state in time.

[0018]

Some embodiments are based on realization that when the equation of dynamics of the machine is used as a soft constraint, various data assimilation methods can be used to further improve the accuracy of the control. The data assimilation can be used for estimating the state of the system with uncertainties, both in dynamics and observations, where observations of the actual system are incorporated into the model state of a numerical model of that system.

Applications of data assimilation arise in many fields of geosciences, e.g., in weather forecasting and hydrology.

[0019]

Some embodiments are based on recognition that it is possible to use data assimilation to estimate the current state of the machine outside of the MPC future horizon optimization. However, some embodiments are based on realization that it is possible to use methods borrowed from the data assimilation inside MPC future horizon, when the equation of the dynamics of the machine is used as the soft constraint. The usage of the data assimilation within the MPC can help to resolve uncertainties and incomplete information about the system, leading to more accurate and robust control determination, compared to the traditional MPC built atop of data assimilation.

[0020]

For example, in one embodiment, the cost function includes a third term performing data assimilation of the state within the time horizon, such that the processor produces the sequence of control inputs to move the state of the machine according to the assimilated states. Because the data assimilation is used inside the MPC time horizon, the embodiment optimizes the cost function using a variant of a Kalman filter, which is suitable for the data assimilation. Examples of the variant of a Kalman filter include one or combination of a classical Kalman filter (KF), an extended Kalman filter (EKF), an unscented Kalman filter (UKF), an ensemble Kalman filter (EnKF), an ensemble Kalman Smoother (EnKS), a 4D variational model (4DVAR).

[0021]

Some embodiments are based on another realization that when the equation of the dynamics of the machine is used as a soft constraints, that equation does not have to be exact and can be simplified. For example, in one embodiment the equation of dynamics of the machine approximates an exact equation of dynamics of the machine. [0022]

Accordingly, one embodiment discloses a model predictive control (MPC) system for controlling an operation of a machine according to a model of the machine dynamics including a memory to store a cost function including a first term defined by an objective of the MPC and a second term penalizing deviation of a state of the machine from a value satisfying an equation of dynamics of the machine; a processor to optimize the cost function over a time-horizon subject to constraints to produce a sequence of control inputs to control the state of the machine over the time horizon; and a controller to control the machine according to the first control input in the sequence.

[0023]

Another embodiment discloses a method for controlling an operation of a machine using a model predictive control (MPC) according to a model of the machine dynamics, wherein the method uses a processor coupled with stored instructions implementing the method, wherein the instructions, when executed by the processor carry out at least some steps of the method. The method includes retrieving from a memory a cost function including a first term defined by an objective of the MPC and a second term penalizing deviation of a state of the machine from a value satisfying an equation of dynamics of the machine;

optimizing the cost function over a time-horizon subject to hard constraints to produce a sequence of control inputs to control the state of the machine over the time horizon; and controlling the machine according to the first control input in the sequence.

[0024]

Yet another embodiment discloses a non-transitory computer readable storage medium embodied thereon a program executable by a processor for performing a method. The method includes retrieving from a memory a cost function including a first term defined by an objective of the MPC and a second term penalizing deviation of a state of the machine from a value satisfying an equation of dynamics of the machine; optimizing the cost function over a time- horizon subject to hard constraints to produce a sequence of control inputs to control the state of the machine over the time horizon; and controlling the machine according to the first control input in the sequence.

[Brief Description of Drawings]

[0025]

[Fig. 1]

Figure 1 shows a block diagram of a control system for controlling an operation of a machine according to some embodiments.

[Fig. 2]

Figure 2 shows a block diagram of a model predictive control (MPC) system for controlling the operation of the machine according to some

embodiments.

[Fig- 3]

Figure 3 shows a schematic of a cost function used by some embodiments. [Fig. 4]

Figure 4 shows a block diagram of a method for controlling the operation of the machine executed by the modules of the control system of Figure 1 and/or Figure 2 according to some embodiments.

[Fig. 5]

Figure 5 shows a schematic of the cost function used by another

embodiment.

[Fig. 6]

Figure 6 shows a block diagram of a method for using data assimilation inside the MPC future horizon according to some embodiments.

[Fig. 7]

Figure 7 shows a block diagram of a method for implementing MPC modified with data assimilation according to one embodiment.

[Fig. 8]

Figure 8 shows an isometric view of an example laser processing machine controlled by one embodiment.

[Description of Embodiments]

[0026]

Figure 1 shows a block diagram of a control system 101 for controlling an operation of a machine 102 according to some embodiments. The control system 101 determines the control input to the machine 102 by optimizing a cost function using a model of the dynamics of the machine over a time-horizon according to principles of model predictive control (MPC). To that end, the control system 101 referred herein as an MPC system.

[0027]

The machine 102 is a device whose operation changes quantities such as positions, velocities, currents, temperatures, numerical values, in response to commands. As used herein, the operation of the machine determines a motion of the machine that changes such quantities. The control system receives a desired motion 103 for the machine, such as a desired trajectory or target point for some of the quantities, and controls the machine via control inputs 104. The control inputs can include commands to change parameters of the operation of the machine or can include actual values of the parameters such as voltages, pressures, torques, forces that affect the machine motion resulting in the generation of quantities 105 for the machine.

[0028]

The control system 101 receives information 106 about the machine motion, from sensors, hardware, or software connected directly or remotely to the machine. The information 106 includes a state of the machine. The machine uses the state for the selection of the control inputs 104. The information 106 can include some or all of the motion quantities 105 and can also include additional information about the machine. The quantities 105, the control inputs 104 or a combination thereof, can be requested to remain in some pre-defined ranges according to constraints 114 on the operation of the machine.

[0029]

Figure 2 shows block diagram of a model predictive control (MPC) system for controlling an operation of a machine according to some embodiments. The MPC system includes a memory 220 to store a cost function 212 and constraints 214. The MPC system also includes a processor 230 to optimize the cost function 212 over a time-horizon subject to constraints 214 to produce a sequence of control inputs to control the state of the machine 102 over the time horizon, and a controller 210 to control the machine according to the first control input 104 in the sequence.

[0030]

Some embodiments are based on recognition that parameters of a model of dynamics of a machine are rarely known exactly. Different identification and learning methods aim to update the parameters of the model to reduce the uncertainty about true values of those parameters but hardly eliminate that uncertainty. Further, in addition to the uncertainties due to lack of precise models, the uncertainties of the control can be also introduced by inaccuracies in measurements, errors caused by model reductions, and uncertainties in the state features.

[0031]

Some embodiments are based on surprising observation that various model predictive control (MPC) methods use the model of the dynamics of the machine as a hard constraint on control optimization even when the parameters of the model are not precisely known. Even if those MPC methods attempt to improve the accuracy of the model over time, inaccuracy of the model can lead the machine into an undesirable state, or make the MPC optimization problem over the horizon self-contradicting (infeasible), while in reality the optimal control may still exist.

[0032]

Some embodiments are based on realization that the model of the dynamic of the machine in MPC should be used as a soft constraint rather than the hard constraint. In such a manner, the state of the machine that deviates from a value satisfying the model of the dynamic can be discouraged, but allowed in

acknowledgment that such a state can satisfy the model of the dynamic, if the parameters of the model are known precisely.

[0033]

For example, typically the model of dynamics of the machine is represented by an equation of dynamics of the machine. The equation of dynamics serves as a hard constraint in MPC optimization forcing the MPC to produce the control inputs controlling the operation of the machine that move the machine into the state that makes the equation of dynamics of the machine true. Some

embodiments remove such a hard constraint on MPC by moving the equation of dynamics of the machine into a cost function of MPC served to optimize the performance of the machine.

[0034]

Figure 3 shows a schematic of a cost function 212 used by some

embodiments. The cost function includes a first term 310 defined by an objective of the MPC and a second term 320 penalizing deviation of a state of the machine from a value satisfying an equation of dynamics of the machine. Examples of MPC objectives represented by the first term 310 includes a term penalizing deviation of the state of the machine from a value defined by a reference trajectory for a time of control, and a term minimizing a cost of operation of the machine, such as time of the operation and/or the energy required for performing the operation.

[0035]

For example, the first term 310 can include a function P^ of the control inputs u ^ and a performance metric P , such that the optimization, e.g., min ,

minimization of the first term u,p optimizes, e.g., minimizes, the performance metric.

[0036]

The second term 320 is based on understanding that MPC or the model of the machine includes at least one parameter of uncertainty. For example, a model of an arm of a robot can include an uncertainty about a mass of the arm caring an object. A model for the movement of a train can include an uncertainty about a friction of the wheels with the rails in current weather conditions. To that end, in some embodiments, the second term includes a member of the equation of dynamics of the machine determined such that the optimization of the cost function performed by the processor encourages determining the state of the machine that makes the equation of dynamics of the machine true. In such a manner, the model of the machine servers as a soft constraint, which is more appropriate than the hard constraint when the model includes the uncertainty.

[0037]

In some embodiments, the equation of dynamics of the machine describes the time dependence of a state in a space, e.g., a geometrical space, a control space, etc. The equation of dynamics of the machine is a statement of an equality containing the state of the machine as a variable. The members of the equality can be placed on the same side to allow minimum or maximum optimization.

[0038]

For example, if the equation of dynamics of the machine is x" = v(x), such an equation can be rewritten as - v(x) = 0. If the difference χ - v(x) appears in the cost function, the minimization of the cost function encourages making the equation of dynamics of the machine true. However, the cost function value is a real number, while the x" - v(x) is commonly a vector function. Determining magnitude ( - v(x)) converts the vector function argument - v(x) into a nonnegative number magnitude (x" - v(x)) that characterizes a deviation of the argument - v(x) from the origin 0. For example, the magnitude of a vector can be determined as a length of the vector, while the magnitude of a function can be determined as an integral of the absolute value of the function.

[0039]

Therefore, the term magnitude (x " - v(x)) can be, for example, simply added to the cost function to be miminized. Conversely, if the MPC optimization maximizes the cost function, the equation of dynamics of the machine can be rewritten as -magnitude (χ ' - v(x)) = 0, and the term magnitude (χ Λ - v(x)) can be subtracted from the cost function to be maximized.

[0040]

In this example, the extra term in the cost function is magnitude (χ - v(x)) or - magnitude - v(x)), which allows considering the equation of dynamics as a soft constraint rather than the equality forming the hard constraint.

[0041]

Following the abovementioned example, the cost function 212 F can include

F(J(u, p) + magnitude (χ Λ - v(x)).

[0042]

Figure 4 shows a block diagram of a method for controlling an operation of the machine executed by the modules of the control system 101 according to some embodiments. The method controls the operation of the machine with control inputs determined using the model of the machine dynamics based on an optimization of a cost function that includes that model of the machine dynamics as the soft constraint. The method determines 410 a current state of the machine resulted from the controlling with a previous control input determined for a previous iteration. The method retrieves 420 from the memory soft constraints of the cost function specifying a soft constraint on the objective of the control and a soft constraint on following the model of the machine dynamic and retrieves 430 from the memory the hard constraints on optimization of the cost function.

[0043]

Next, the method determines 480 a current control input for the controlling at the current iteration by optimizing the cost function. For example, the method determines 440 a sequence of future inputs, from current time instant for a fixed amount of time in the future, long at least as the to obtain a new machine state measurement, such that the predicted future machine states and inputs satisfies the hard constraints. The first part of the input sequence, for duration equal to the amount of time needed to obtain a new measurement of the state of the machine, is applied 450 as current control input to the machine. Based on the current state of the machine, current model of the machine, and current control input to the machine, the next state of the machine is determined 460, and the controller waits 470 until a new state measurement is received.

[0044]

Figure 5 shows a schematic of a cost function used by another embodiment. This embodiment is based on realization that, when the equation of dynamics of the machine is used as a soft constraint, additional soft constraint 510 on the state of the machine can be used to further improve the accuracy of the control in the presence of uncertainties. For example, some embodiments include a third term of the state in the cost function of MPC that penalizes deviation of the state from a soft constraint, such as a constraint on a structure of the state and a constraint on behavior of the state. Examples of such a soft constraint include a constraint on a sparsity of the state, a constraint on a symmetry of the state, a constraint on stability of the state, a constraint on smoothness of the state, a constraint on rate of change of the state in time.

[0045]

Some embodiments are based on realization that when the equation of dynamics of the machine is used as a soft constraint, various data assimilation methods can be used to further improve the accuracy of the control. The data assimilation can be used for estimating the state of the system with uncertainties, both in dynamics and observations, where observations of the actual system are incorporated into the model state of a numerical model of that system.

Applications of data assimilation arise in many fields of geosciences, e.g., in weather forecasting and hydrology.

[0046]

Figure 6 shows a block diagram of a method for using data assimilation 610 inside the MPC future horizon according to some embodiments. The usage of the data assimilation within the MPC can help to resolve uncertainties and incomplete information about the system, leading to more accurate and robust control determination, compared to the traditional MPC built atop of the data assimilation. For example, in some embodiments, the data assimilation 610 adjusts values of the state determined using the equation of the dynamics of the machine according to the model 112 within the time-horizon based on previous values of the state.

[0047]

Some embodiments are based on recognition that data assimilation can be applied to estimation of the current state of the controlled system, e.g., from the past observations (history matching). However, there are evidently no state observations inside MPC over the time-horizon, since the horizon is in the future. Therefore, using data assimilation methods inside MPC future horizon

optimization appears impossible and thus meaningless.

[0048] However, some embodiments are based on recognition that data assimilation can be beneficial inside MPC for the determining of the control, where the future state observations are being replaced with additional features. The additional features may include the structure of the state, e.g., desired symmetries of the state, wherein the symmetry of the state is determined off-line, and types and parameters of the symmetry are stored in the memory of the controller. To that end, in some implementation, the data assimilation 610 can adjust the values of the state by imposing soft constraints 620 on a structure of the state and/or behavior of the state.

[0049]

For example, the type of the symmetry of the state can be is periodic in time, wherein the parameter of the symmetry in this case is a length of the period. The state may also exhibit its symmetry in space, e.g., a vector of the state may be symmetric for any time, e.g., for the state vector with 20-components, the first 10 components may be known to be the same as the second 10 components. The state may as well be known to belong to a symmetric surface, e.g., a sphere, as it changes in time, wherein the parameters of the symmetry, in this case, a center and a radius of the sphere, are known a priory and stored in the memory of the controller.

[0050]

Some embodiments are based on another recognition that a known sparsity of the state can be used in data assimilation, to substitute for the unknown future state measurements. The sparsity is determined off-line, and a pattern and parameters of the sparsity are stored in the memory of the controller. For example, the vector of the state may be sparse, i.e., having components with specific indexes in the vector vanishing, wherein the indexes represent the pattern of the sparsity, while the total number of the indexes is viewed as the parameter of the sparsity. [0051]

Additionally or alternatively, several embodiments substitute future state observations in data assimilation with the properties of the state describing a desired state behavior by one a combination of: the state satisfies conservation laws, state is smooth in time, state is consistent with a known model for a state estimator, a state tracking, following a given profile, a state stability, state boundedness. The conservation law can for example be a mass preservation of the state in some applications of MPC. The state smoothness, for example, requiring that one or a combination of derivatives of the state in time and in space is bounded by absolute value by a given tolerance of the smoothness, wherein orders of the derivatives and value of the first tolerance are stored in the controller memory.

[0052]

Some embodiments are based on another recognition that one or a combination of the stability and the boundedness of the state can also serve as the substitute in data assimilation within MPC for the unavailable measurements of the state over the future horizon. The stability of the state can be defined using a parameter of the stability, stored in the memory of the controller that bounds changes in the state with respect to changes in the model.

[0053]

Alternatively, or additionally, some embodiments determine the function of the desired state behavior off-line using one or a combination of the following properties of the control, wherein the control tracks a given profile of the control, is smooth, is stable in time, is bounded in time. Coefficients of the function of the properties of the state, determined using the properties of the control are stored in the memory of the controller.

[0054]

According to some embodiments of the invention, the cost function of MPC of the system is modified with a function of data assimilation of the state of the system, wherein the function of data assimilation penalizes for a deviation of the state from the dynamics of the state, thus relaxing the equations of the dynamics of the state in the model of the system. Additionally, the cost function of MPC of the system is modified with the function of one or combination of a structure of the state and a behavior of the state, which is given an addition to the model of the system that typically only includes the equations of the dynamics of the state and various constraints. The influence of the modifications on the MPC control solution can be explained as acting as soft constraints in the cost function, such that each control input moving the controlled system into a state is penalized, e.g., for a deviation of the state from a structure of the state and/or a behavior of the state. In such a manner, all control inputs over the time horizon jointly perform state assimilation to deal with the uncertainties in the model of the system.

[0055]

Figure 7 shows a block diagram of a method 701 for implementing MPC modified with data assimilation according to one embodiment. The cost function of MPC is modified so as the terms for the system dynamics are replaced by the terms of data assimilation including both penalization for a deviation from the model system dynamics and penalization for a deviation of the state from its structure and behavior. An optimal solution of the data assimilation problem, determined by the penalization terms, gives a predicted state over a future time horizon, which in turn is used for producing a sequence of control inputs. The first control input from this sequence is used as the control input at the current system state.

[0056]

The method 701 executes an on-line control step generating a control signal 711 for controlling the system based on the measured and/or estimated values of the current state 703 and the values 710 of state, control, and data over the horizon time for the previous time step of the control. The method determines 720 the predicted state 725 in the future horizon time according to the model of the system, admitting uncertainties by assimilating soft (uncertain) constraints 705 on the state, and then determines 750 a solution vector 755 in the horizon time according to the necessary optimality conditions. After the solution vector is determined, the method generates 760 the control signal 711 and updates the values of the state, the control and the data over the horizon time. The updated values are used by the method at the next time step of the control.

[0057]

For example, in one embodiment, the cost function includes a third term performing data assimilation of the state within the time horizon, such that the processor produces the sequence of control inputs to move the state of the machine according to the assimilated states. Because the data assimilation is used inside the MPC time horizon, the embodiment optimizes the cost function using a variant of a Kalman filter, which is suitable for the data assimilation. Examples of the variant of a Kalman filter include one or combination of a classical Kalman filter (KF), an extended Kalman filter (EKF), an unscented Kalman filter (UKF), an ensemble Kalman filter (EnKF), an ensemble Kalman Smoother (EnKS), a 4D variational model (4DVA ).

[0058]

Some embodiments are based on another realization that when the equation of the dynamics of the machine is used as a soft constraints, that equation does not have to be exact and can be simplified. For example, in one embodiment the equation of dynamics of the machine approximates an exact equation of dynamics of the machine. For example, one embodiment uses the cost function of the MPC modified using approximate equations of the dynamics of the state of the system, wherein the approximate equations are determined by a model reduction applied to exact equations of the dynamics of the state of the system. [0059]

Exemplar Embodiments

In one exemplar embodiment, MPC determines the current control input by solving a prediction model on a horizon + ^ . As a starting point for a general framework, this embodiment considers a modified variant of the prediction model, where the control U ( T ^ and a parameter vector P minimize the performance index :

min J, where

subject to the uncertain model dynamics

dx

— = f(r, x(z), (T), ρ) + η / , T G [t, t + T ,

ατ

uncertain constraint on the state

g(r, X(T), U(T), ρ) + η ! , = 0, T e [t, t + T], and the certain constraints

(3)

C(T,x(T),utr), p) L[t, t+ T = 0 >

(4)

[0060]

x(f) I _

The initial value J ~ ' for the time-dependent differential equation (1) is the current state vector x(t) ' of the dynamic system. The control vector u - U(T) ^ VV J 1 J C J 1 solves the prediction problem, is used as an input to control the dynamic system at time ^ . The components of the vector are parameters of the system. The nonlinear equation (1) describes the model system dynamic, which is used for prediction. When the time varying disturbances ^ and ^ g are of random nature, the co variance matrices c f and c g are available.

[0061]

Supplementary to the minimizing the original cost function, the performance index J( U> P) 9 the disturbance vectors ^ f and are minimized according to some embodiments of the invention using the 4DVar/MHE minimization terms by choosing a suitable solution χ(τ } over the horizon:

2

min X(T), U(T), p) - dxld- χ(τ) 2 C f

+ Pg(T, x(T), u(T), p)P 2 J,

8 where .

Throughout the remainder, we use an unconventional notation for the norms, e.g.,

P P actually means the norm off, commonly denoted by ||/||. In our test examples, we use the covariance matrices of the form C / = 1 1 and C g = μ β Ι with a = 1 and a suitable scalar P > 0 , I being the identity matrix.

[0062]

According to an embodiment of the invention, we relax the equation of the dynamics by adding the 4DVar/MHE minimization terms to the original cost function, the performance index . Minimization of the modified cost function can be performed by the alternating direction method of multipliers (ADMM) or the Alternating Minimization Algorithm (AMA), where one repeatedly alternates minimization for the control and for the disturbances, according to an embodiment of the invention. We note that the solution over the horizon has the fixed initial value x ^ in contrast to the free choice in

4DVar/MHE models.

[0063]

Continuous formulation of the horizon prediction problem stated above can be discretized on a uniform time grid over the horizon [ ( > t + T partitioned into N equal time steps of size Δγ , and the time-continuous vector functions x ^ and M ( r ) are sampled at the grid points τ > , ί = () , · · · , Ν d eno t e d by the indexed values x < and u ' respectively. The integral of the performance cost J over the horizon is approximated by means of the rectangular quadrature rule. The time derivative of the state vector is approximated by the forward difference formula.

[0064]

Before deriving the Euler equations for the NMPC formulation, this embodiment discretizes the 4DVar model with the fixed x ° :

)2

' X i+l ' c ~g: 1 '

[0065]

For further convenience, the embodiment introduces the block bidiagonal matrix

and the vectors

[0066]

In this notation, the discretized 4DVar problem takes the following min R T )R + GC-, L G.

[0067]

The gradients with respect to x of the vectors G and R equal V x g(r lt x lt u x ,p)

V7^ _ V^(T 2s X 2 2 ,/7)

V x g(? Ni x Ni u Nt p)

[0068]

Hence the solution i = l,.„ JV , of 4DVar satisfies the equation

(VR) T C l R + (VG) T C- l G = 0.

(6)

[0069] The discretized optimal control problem NMPC is then formulated as follows:

subject to the system (6) for X ', and the equality constraints

C(T i ,x i ,u i ,p) = 0, i = 0,1,..., N-l, ^

[0070]

Necessary optimality conditions for the discretized horizon problem can be derived by means of the discrete Lagrangian function

Λ

,x j ,u j ,p)AT

+ ... λ τ Ν ] [(VR) r C/-R + (VGf C- l G]A T

N-l

+ jI i C{r i ,x. , u i ,ρ)Ατ + V V(½ , P\

i=0

ΛΤ

where the variables are in two larger vectors ^ ^ , z 0, 1 , ... , iV^ an( j u = [«, Mi v pf ^ / = o,i,...,JV-i -Ifae> ι = μ ... ί isthecostate vector, " is the Lagrange multiplier vector associated with the constraint (7). The terminal constraint (8) is relaxed by the aid of the Lagrange multiplier v .

[0071]

Calculating the derivatives of the Lagrangian L obtains the necessary optimality conditions, the Kamsh-Kuhn-Tucker (KKT) stationarity conditions: L ¾ =0 L ,=° i = 0 ...,N S = ° L ,, = ° ί = 0,1 JV-1

[0072]

For example, one implementation further converts the KKT conditions into a nonlinear equation F ,x,t] = 0 ^ ^ 6Γ6 ^ e vec t 0 r ^ combines the control input " , the Lagrange multiplier μ , the Lagrange multiplier v , and the parameter p , all in one vector:

U(t) = [ul,...,u N T _ l , Z,..., N T _ l ,v T ,p T ] T .

[0073]

The vector argument x in d eno t e s the current measured or x

estimated state vector, which serves as the initial vector 0 in the following procedure, which eliminates the state variables ' and costate variables ' .

[0074]

x

One embodiment, having the current state 0 , measured or estimated, computes X ' , ' ' ~~ · ' ' ^ , by solving equations (6) instead of the forward Euler me 4thod A x i , + + l i = X i ' + f J ( xT i '> X i 1 > u » ' P r ) ' T . τ Th,en comput , es t .1he cos + ta + tes ' ,

i - N, N-l ^ fj- om system of linear equations

= o.

ox

[0075]

The value ^ N is defined by the differentiation of the term v V N'P w ith γ

respect .

[0076] Next, the embodiment calculates ^ '*'*] , using just obtained as

dL

(X,U)

du

F[U,x,t] = C(T 0 ,X 0 ,U 0 ,P)AT

C(T i ,x i ,u i ,p)Ar

dp

[0077]

The equation with respect to the unknown vector u ^

F[U(t),x(t),t] = 0

(9)

gives the required necessary optimality conditions.

[0078]

Some embodiments use the dynamic system controlled with the MPC on a uniform time grid tj ^ , . ~ 0, 1 , ... and denote Xj X ^ tj ^ . In those embodiments, Equation (9) needs to be solved at each time step tj online on the controller board, which is a challenging part of an NMPC implementation.

[0079]

The nonlinear equation F[Uj,Xj,tj] 0 reS p ect to ^ Q unknown variables ^ j ^ is equivalent to the following equation

where

[0080]

Using a small scalar h > 0 , which is, in general, different from the time steps Δ' and Δγ , we introduce the forward difference operator

F ft/ x. t ](V)

approximating the derivative u ! ' J> along the direction v . The

. F\U.,x. .] = 0. . , '

equation L J J J IS equivalent to the operator equation

a MJJh) = b h . AU . = U,.-U t ,

J J J , where 3 3 J~ .

[0081]

Let's introduce an mxm matrix ^ with the columns ^ ' ^, k - \,...,m ^ defined by the formula , where m is the dimension of the vector U e A.

and k denotes the ^-th column of the mxm identity matrix. The matrix j is an

0(h approximation of the Jacobian matrix Jacobian matrix

^ u is symmetric, i.e., the Jacobian matrix ^ t/ t^' '^ i s symmetric for all U, x , and

[0082]

Suppose that an approximate solution to the equation F[U 0 ,x 0 ,t 0 ] 0 is available. Finding sufficiently accurate approximation is crucial for success of Newton-like methods and search for it is usually a challenging operation. [0083]

JJ U X

The first block entry of 0 is taken as the input control 0 at the state 0 . The next state i ~ x ^ is either sensor estimated or computed by the formula *i = *o + / Co > x o > u o ) At ; cf. ( 1 ). At the time tj , J > l , we have the state Xj and the vector ^ j~x from the previous time . Our goal is to solve the following equation with respect to v : e,(K) =*A (13)

Then set ^ , Uj ~ + and choose the first block component of U J

X x( t ^

as the control Uj . The next system state J+l J+l is either sensor estimated or computed by the formula x J +] = xj + ¾ > ^ » "; ) Δί .

[0084]

A direct way to solve the operator equation (13) is forming the matrix J explicitly and then solving the system of linear equations ; e.g., by the Gaussian elimination. A faster alternative is solving (13) by the GMRES iterative method, where the operator a J ^^ is used without explicit construction of the matri •x A, .

[0085]

One embodiment numerically calculates a minimum-time motion from an initial state x ° to a terminal state Xf over the unit two-dimensional sphere in : The system dynamics is governed by the system of ordinary differential equations

where the control input u is subject to the inequality constraint I u 0 1- r , which we relax with the equality constraint

[0086]

u , w.

The variable a is fictitious and controlled by the scalar a introduced below. The cost function is J = P-i' w * u * , w where P = f / f- i is the time to destination, and " is a small positive constant.

[0087]

This embodiment selects the receding horizon coinciding with the interval

[t,t f ] r E Γ011

J . The horizon is parameterized by the dimensionless time L ' J by means of the linear mapping τ ~ ^ t + Ψ ^Q normalized interval t^'^-l is partitioned uniformly into the grid T ' ^ T , Z 0,1,..., N ^ W ^ ^ S - ZE

AT— l/N , ¾e discretized variables include the state 1 andcostate 7 ,the

control input and slac vara e , t e Lagrange mutp ers 1 an , the parameter P .

[0088]

The uncertain predictive model of the dynamical system on the receding horizon is the forward Euler method ρΑτ

where

The truncation error of the Euler methods is the disturbance ^ f in (1). Notably,

^ is not random here and highly correlated with the state function χ ( τ ^ . It is directly verified that the continuous system dynamics X A(u)x sa s ies me equality constraint on the state x x i - \ = 0 i = l , ... , N

. Hence the constraint

(4) has and 8 . The 4DVar approximation is designed to satisfy the constraint (4) "softly". Note that for this problem it is possible to satisfy the state constraint ' ' exactly by projecting 1+1 onto the unit sphere after every step of the Euler method.

[0089] x x s - l = 0

Yet another way to satisfy the equality constraint is to use the

so-called exponential integrator , which preserves the norm P P

j 2 . We use this exponential integrator for numerical simulation of the system dynamics for the test example.

[0090]

The discretized cost function is

One implementation selects 4DVar approximation of the state ' , with the fixed initial value ° and a scalar parameter P ≥ 0 ,

The parameter ^ determines the force of satisfying the equality constraint x T x—1 = 0 R

' ' : the larger the constant p the larger the enforcement.

[0091]

According to some embodiments, the 4DVar optimization problem is equivalent to the s stem of nonlinear equations

where

-Δ.ψΑ(η χ )-Ι I

B

ΔφΑ(μ Ν _ λ )-Ι I

[0092]

The corres onding discrete Lagrangian function has the form

N-l

+∑ f[(.u i -c†+u d 2 i -r 2 ] + v T (x N -x f ).

[0093]

The costate λ satisfies the formula

where c is the block diagonal matrix with the blocks C =blockdiag {(xj x i - 1)1 + 2x ( xf }.

The function where

U ~ [w 0 , ... , u N _ x , u d(j dN _ ,

μ 0 ,...,μ Ν ,ν,ρ] τ ,

has the followin rows from the top to bottom:

0 -c) + di ~r

(u N ^-c) 2 +u ^ x -r 2

[0094]

Some embodiments consider problems with the state constraints that derived from the system dynamics. The embodiments reduce the number of terminal constraints to the dimension of the smooth manifold determined by the equality constraint on the state. For example, in one case, the dimension of the sphere equals 2, and, therefore, the Lagrange multiplier v contains only 2 components instead of 3. If the above described reduction of the terminal constraint is not fulfilled, then the subsequent computations lead to singular Jacobians in the Newton-type iterations.

[0095]

Laser processing machine

Some embodiments provide a system and a method for controlling an operation of a redundant laser processing machine. Some embodiments control the machine using an optimization-based receding horizon control subject to constraints that guarantees the feasibility of tracking the reference trajectory with an error defined by bounds of a tracking error. A non-limited example of the receding horizon control is a Model Predictive Control (MPC).

[0096]

Figure 8 shows an isometric view of an example laser processing machine according to one embodiment of an invention. The laser processing machine is shown for illustration purpose and the design of this machine is not intended to limit the scope of the invention. The laser processing machine includes a slow actuator and a fast actuator, examples of which are provided below.

[0097] A workpiece 800 is supported on a beam dump 810 beneath a gantry 820. The gantry moves on rails 825 and 826 along a first direction, e.g., along a Y-axis. The gantry 820 is moved along the first direction by a first servo motor and a first screw 823. A platform 830 is arranged on the gentry 820 and moves with the gentry along the first direction. Also, the platform 830 is moved along a second direction, e.g., along an X-axis, by a second servo motor and a second screw 835. In this embodiment, the gentry 820, the first servo motor and the first screw 823, and the second servo motor and the first screw 835 form a motion system for moving the platform in a plane parallel to the workpiece along the first and the second direction. However, other embodiments of the invention use different types of the prismatic joints to move the platform. For example, the first prismatic joint can include a first direction linear drive motor, and the second prismatic joint can include a second direction linear drive motor.

[0098]

A galvano-assembly, e.g., a two-axis galvano scan head having two orthogonal galvano drives, i.e., a first drive 840 and a second drive 845, a first mirror 841 and a second mirror 846, is arranged on the platform 830. A third motion of the first mirror 841 caused by the first driver 840 positions the laser beam along a third direction, and a fourth motion of the second mirror 846 caused by the second driver 845 positions the laser beam along a fourth direction.

[0099]

In the context of this description, the gantry 820 is a first actuator, or the slow actuator, with large operating range, and the galvano assembly is a second actuator, or the fast actuator, with smaller operating range. However, such usage is not intended to limit the scope of the claims. For example, in some variations the first actuators is the fast actuator, and the second actuator is the slow actuator.

[0100]

In various embodiments, the galvano assembly is arranged on the platform such that the third direction is fixed with respect to the first direction, and the fourth direction is fixed with respect to the second direction. For example, in one embodiment, the first direction coincides with the third direction, and the second direction coincides with the fourth direction. In another embodiment, the first direction forms an angle of 45 degrees with the third direction, and the second direction forms the angle of 45 degrees with the fourth direction.

[0101]

The galvano assembly can be affixed to the platform in order to fix the direction of motion. Alternatively, the galvano assembly can be arranged on the platform rotationally, such that the mutual orientations of the first, the second, the third, and the fourth directions can be fixed before, or during the operation of the laser processing machine. In the context of this invention, the galvano assembly is the second stage, or fast stage, with small operating range.

[0102]

The laser processing machine can include a laser 850 for directing a cutting laser beam 860 to the first 841 and the second 846 mirrors of the galvano assembly via an optical fiber 870 and a collimator 875. In an alternative embodiment, the laser beam is directed to the galvano assembly via diagonal mirrors moving along the Y-gantry and X-axis platform. However, other variations are also possible.

[0103]

The collimated cutting laser beam 860 is directed by the mirrors through a focusing module 880 for focusing the laser beam on the workpiece, producing a combined X-axis and Y-axis galvano assembly scan area 865 on the workpiece 800, and cutting the workpiece 800. An example of the focusing module 880 is a field-flattening F-theta lens or a non-telecentric F-theta lens. A size of the workpiece 800 can be greater than the galvano scan area 865 due to the motion of the platform. [0104]

In some embodiments, the control module includes a computer numerical control (CNC) controller 895. Other embodiments can use different types of controllers. The control module may control the motion system and the galvano assembly according to precomputed G-code 890 that defines a trajectory of positions of the laser beam or can performs the computations to decide how to control the machine. For example, the computations can define successive positions for the X-axis platform 830, the Y-axis gantry X-motion galvano assembly and mirror 841, and Y-motion galvano assembly and mirror 846.

[0105]

In general the machines are built with actuators that have different dynamical behaviors. For example, the first actuator is in usually significantly slower than the second actuator, due to the difference in the displaced mass. From this difference, the indicated names of slow and fast actuators are derived.

[0106]

One embodiment model the dynamics of the slow actuator as

p(k+ l) = p(k)+ T s v(k) v(k+\) = v(k)+i(LT - v(k))

J '

where p is a position of the slow actuator, v is a velocity of the slow actuator, ris a torque of the slow actuator, T s is a control period of the machine at which a control cycle is executed, A: is an index of the control cycle, J is an inertia of the slow actuator, L is a length of a pitch of a ball screw which converts the

longitudinal motion into linear notion, and ris the torque of the slow actuator, β is a friction coefficient determining the friction torque on the slow actuator for a given angular velocity of the slow actuator.

[0107] According to embodiments of the invention, one, or both, of the equations of the dynamics can be relaxed, by adding the magnitudes of the corresponding differences to the original cost function. For example, the first equation p(k+J) = p(k) + T s v (k) is first rewritten as p(k+l) -p(k) - T s v (k) = 0 and then as magnitude (p(k+l) - p(k) - T s v (k)) = 0 wherein the "magnitude " can be, e.g., a vector (such as a 2-) norm, may be squared. The first original equation of the dynamics p(k+l) = p(k) + T s v (k) is then dropped, and the extra term magnitude (p(k+l) - p(k) - T s v (k)) is added to the original cost function. As a result, the first original equation of the dynamics p(k+l) =p(k) + T s v (k) can be violated in the MPC minimization of the modified cost function, although encouraged to be true. That can be beneficial if the parameter T s in the first original equation of the dynamics p(k+l) =p(k) + T s v (k) is uncertain.

[0108]

In general, parameters p, v, t are two dimensional vectors with x and coordinates, and are subject to constraints min ≤ PW≤ / ? max

Vmin ≤ V ( k )≤ V max

a mm- ≤ a( vk)≤ a m m n a Y x

that define lower and upper bounds on position p, velocity v, acceleration a, and torque r, and can be kept as the hard constraints, according to some embodiments of the invention.

[0109]

One embodiment expresses the model of the slow actuator as a linear difference equation x(k+l) = Ax(k)+Bu(k)

y(k) = Cx(k)

where k is a time instant when the signals are sampled, i.e., the index of the control cycle, u is the machine input, y is the machine output, x is the state of the machine, and A, B, C, are parameters of the model. For example, x=\p, v] y=p, = T, and A, B, C are matrices of appropriate dimensions, and the operation of the slow actuator is subject to linear constraints

x(k) e X, u(k) e U, /k≥0 where X, U are polyhedral sets.

[0110]

According to other embodiments of the invention, one, or both, of the equations of the dynamics can be relaxed, by adding the magnitudes of the corresponding differences to the original cost function. For example, the first equation

x(k+l) = Ax(k) + Bu(k) is first rewritten as

x(k+l) - Ax(Jc) - Bu(k) = 0 and then as

magnitude (x(k+l) - Ax(k) - Bu(k)) = 0 wherein the "magnitude " can be, e.g., a vector (such as a 2-) norm, may be square, i.e., magnitude (x(k + 1)— Ax i)— Bu(k)) = \\x(k + 1)—

Ax(k)— Bu(k) \\ 2 . The first original equation of the dynamics x(k+l) = Ax(k) + Bu(k) is then dropped, and the extra terms magnitude (x(k+l) - Ax(k) - Bu(k)) for all k are added to the original cost function. As a result, the first original equation of the dynamics x(k+l) = Ax(k) + Bu(k) can be violated in the MPC minimization of the modified cost function, although encouraged to be true. That can be beneficial if at least one of the matrices A and B in the first original equation of the dynamics x(k+l) = Ax(k) + Bu(k) is uncertain. Additionally, or alternatively, the relaxation can be beneficial if the first original equation of the dynamics x(k+l) = Ax(k) + Bu(k) is known to hold only approximately, e.g., because it approximates a more accurate nonlinear equation of the dynamics x(k+l) = F(x(k),u(k)), that cannot be directly used in MPC due to impractical computational costs of real time nonlinear minimization.

[0111]

The second equation of the dynamics y(k)=Cx(k) can be similarly

additionally or alternatively relaxed, being replaced with adding the extra terms magnitude (y(k) - Cx(k)) to the original cost function to be minimized in the real time MPC optimization over the horizon.

[0112]

Some embodiments of the invention are based on a realization that just relaxing the equations of the dynamics may lead to the situation where the optimal control solution of the MPC optimization problem is attained on the state that does exactly satisfy the original equations of the dynamics, even though they are relaxed. Such a trivial scenario might be undesirable and can be avoided, in some embodiments of the invention, by including additional terms in the cost function, describing one or a combination of desired behavior and structure of the one or a combination of the control and the state. In the laser cutter example, the additional terms can, e.g., penalize acceleration of the slow actuator, where the additional term in the cost function would be the magnitude \a\ of the acceleration a, despite of the fact that the acceleration is already hard constrained by its given upper bound.

[0113]

Some embodiments of the invention propose minimizing the modified, with the additional terms, cost function using the alternating direction method of multipliers (ADMM) or the Alternating Minimization Algorithm (AMA), where one repeatedly alternates minimization of the for the control and for the state. For example, let the original cost function be / (u, x, y) the first additional term be a||y— Cx\\ 2 , encouraging y(k)=Cx(k) for all k, and the second additional term be ?||x|| 2 , encouraging small x. Then the modified least squares cost function is

; (u, x, y) + a||y - Cx\\ 2 + β\\χ\\ 2 .

[0114]

Rather than minimizing with the respect to all variables together, one can repeatedly alternate minimization of the for the control u and for the state and the observation * and y, possibly computationally advantageous.

[0115]

The above-described embodiments of the present invention can be implemented in any of numerous ways. For example, the embodiments may be implemented using hardware, software or a combination thereof. When implemented in software, the software code can be executed on any suitable processor or collection of processors, whether provided in a single computer or distributed among multiple computers. Such processors may be implemented as integrated circuits, with one or more processors in an integrated circuit component. Though, a processor may be implemented using circuitry in any suitable format.

[0116]

Further, it should be appreciated that a computer may be embodied in any of a number of forms, such as a rack-mounted computer, a desktop computer, a laptop computer, minicomputer, or a tablet computer. Such computers may be interconnected by one or more networks in any suitable form, including as a local area network or a wide area network, such as an enterprise network or the Internet. Such networks may be based on any suitable technology and may operate according to any suitable protocol and may include wireless networks, wired networks or fiber optic networks.

[0117]

Also, the various methods or processes outlined herein may be coded as software that is executable on one or more processors that employ any one of a variety of operating systems or platforms. Additionally, such software may be written using any of a number of suitable programming languages and/or programming or scripting tools.

[0118]

Also, the embodiments of the invention may be embodied as a method, of which an example has been provided. The steps performed as part of the method may be ordered in any suitable way. Accordingly, embodiments may be

constructed in which acts are performed in an order different than illustrated, which may include performing some acts simultaneously, even though shown as sequential acts in illustrative embodiments.