The present disclosure relates to the field of optimization-assisted automatic control technology. In particular, it proposes a method where multiple optimization processes are allocated a predetermined time period to solve an optimal-control problem (OCP), after which a comparison singles out the best solution and/or eliminates insufficiently converged solutions. The method can be applied to the control allocation problem in an electric vehicle, which is typically underdetermined.
In vehicles like battery-electric vehicles or fuel-cell vehicles, several actuators in the powertrain are available to perform a required motion. The powertrain is normally an over-actuated system (more controlled inputs than outputs), so that its control represents an under-determined problem (fewer equations than unknowns), and a coordination of the actuators for motion is required. This coordination can be referred to as control allocation. It would be desirable to use optimization-assisted automatic control techniques, and more precisely to treat and solve the control allocation problem as an OCP. While the processing power sufficient to repeatedly solve the evolving OCP at runtime can normally be ensured today, the usefulness of optimization techniques is still restrained by the fact that numerical optimization solvers incidentally produce erroneous outputs due to convergence problems, artefacts, instabilities and the like. At instances when no control signal is available to be fed to the actuators, it may be necessary to trigger an emergency stop or to apply a predetermined ‘safe’ substitute control signal. Neither of these strategies is satisfactory from a usability point of view.
Specifically, in order to comply with a required Automotive Safety Integrity Level (ASIL), the potential hazards caused by malfunctioning electrical or electronic systems should be eliminated or reduced. When optimization processes based on iterative methods are used in critical control strategies, there is always a concern that the optimizers will not be able to compute a good solution in the scheduled time in an electronic control unit (ECU) of the vehicle. Moreover, being compelled to use a sub-optimal solution could impact energy consumption, mechanical wear, ride comfort and drivability.
One objective of the present disclosure is to make available a method for controlling a technical system in real time. To be suitable for this use case, such a method will need to provide a reliable control signal virtually always, that is, it will need to have a controlled and very low failure rate λ. It is a further objective to provide a method suitable for controlling an electric vehicle, and a battery-electric vehicle in particular. A still further objective is to provide a device and computer program with these abilities.
At least some of these objectives are achieved by the invention as defined by the independent claims. The dependent claims relate to advantageous embodiments of the invention.
In a first aspect, there is provided a method for controlling a technical system in real time, comprising: sensing a state of the technical system; with the sensed state, initiating independent executions of a plurality of optimization processes P1, P2, P3, . . . configured to solve a predefined optimization problem related to optimal control of the technical system; after a predetermined delay, extracting a current solution vector u1, u2, u3, . . . from each optimization process; computing differences dij˜∥ui−uj∥ for pairs of the solution vectors; and, on the basis of the differences, selecting at least one of the solution vectors for use in controlling the technical system.
By considering differences between pairs of the solution vectors, on the one hand, it is possible to discover ‘outliers’ among the solution vectors, which likely correspond to unreliable solutions. An optimization process of the iterative type which has not converged sufficiently in the predetermined delay generally delivers an unreliable solution. Although the proposed consideration of the differences is merely an indirect indication, it is much simpler in practical cases than trying to establish the degree of reliability by directly evaluating the past execution of the optimization process concerned, e.g., by inspecting internal variables. On the other hand, the availability of the differences enables various cooperative decision-making schemes, by which the relatively most promising solution(s) can be found.
The difference-based processing constitutes a meaningful way of leveraging the availability of multiple optimization processes P1, P2, P3, . . . , in a manner that is certain to lower the failure rate λ of the control method as a whole. It is worth mentioning that this advantage would not be achieved by redundancy alone, say, if the difference-based approach according to the invention was replaced by straightforwardly applying a linear average of the respective solution vectors u1, u2, u3, . . . as the control signal to the technical system. Not only could the unreliable solutions have a strong negative influence on such an average, notably because of their considerable deviation from the set of healthy solutions. But even a pair of healthy solutions could correspond to two radically different control strategies, by which two widely separated trajectories (in the state space of the technical system) have been chosen from the sensed initial state of the system to the desired final state. Indeed, none of the optimization processes has endorsed the operating the system at the intermediate points in state space, there is no certainty that the cost of carrying out the average-based trajectory is similar to that of the solution vectors, and the average-based trajectory could be unachievable under the dynamics that apply for the technical system.
In some embodiments, the method according to the first aspect includes a further step of obtaining a quality indicator q1, q2, q3, . . . relating to the execution of each optimization process. Needless to say, it is the execution which produced the solution vectors that is of interest here, i.e., normally the most recent one when the method is used in a real-time control application. The quality indicator is used to weight the differences between solution vectors in accordance with the respective quality indicators. This embodiment is primarily useful in a context where all or some of the optimization processes provide a quality indicator, such as a final step size or another convergence indicator, or a flag which if positively valued indicates that a problem or failure has occurred during the execution. The weighting shall be such that a difference relating to a solution vector with relatively inferior quality is increased, whereby the likelihood increases that this solution vector will be treated as unreliable. For example, the weights may be applied as inverse weighting coefficients of the difference in a setup where high qi represents high quality, as follows:
In some embodiments, the selection of said one of the solution vectors includes performing a dimensionality reduction or dimension reduction. Such techniques are useful for exposing the degree of similarity of different solution vectors in visual or numerical form. It may also contribute to reducing the computational complexity of a task, later in this method, of grouping the solution vectors.
In other embodiments, the selection of said one of the solution vectors includes executing a voting scheme. The voting scheme may be one in which clusters of the solution vectors are formed and the solution vector to be used is selected from the largest one of the clusters. Various clustering techniques can be applied for this purpose, whether in accordance with an ordinary implementation or with the specific adaptations to be described below.
In one embodiment, at least one of the optimization processes is a trained prediction model. The trained prediction model may be an artificial neural network which has been exposed to training data comprising problem-solution pairs, where each pair includes an optimization problem of the relevant type and a solution vector to this problem that an optimization solver (e.g., software implementing an iterative or non-iterative algorithm) has provided. The optimization problem and its solutions are represented in numerical form. A problem-solution pair may be verified for use as training data by checking, for each solution vector, that the optimization solver executed without problems and had sufficient time to converge as expected. The trained prediction model will mimic the behavior of the optimization solver on which it was trained, though generally at a much lower computational cost, and may thus be described conceptually as a virtual solver.
In one embodiment, the technical system to be controlled is a propulsion system (or powertrain, or drivetrain) in a road vehicle. The controlled inputs include inputs to a plurality of electric drives, which may have different gear ratios and/or different acceleration/regeneration power limits. In the present disclosure, the term “road vehicle” shall include cars, buses, long-haul trucks, as well as light and heavy construction equipment and all-terrain vehicles. The term excludes rail vehicles and various types of suspended vehicles.
In a second aspect of the invention, there is provided a controller configured to control a technical system in real time. The controller may be implemented as a general-purpose computer executing suitable software. For example, it may comprise memory, a signal interface and processing circuitry configured to perform the method of the first aspect of the invention. The second aspect of the invention generally shares the effects and advantages of the first aspect, and it can be embodied with a corresponding degree of technical variation.
The invention further relates to a computer program containing instructions for causing a computer, or the controller in particular, to carry out the above method. The computer program may be stored or distributed on a data carrier. As used herein, a “data carrier” may be a transitory data carrier, such as modulated electromagnetic or optical waves, or a non-transitory data carrier. Non-transitory data carriers include volatile and non-volatile memories, such as permanent and non-permanent storage media of magnetic, optical or solid-state type. Still within the scope of “data carrier”, such memories may be fixedly mounted or portable.
Generally, all terms used in the claims are to be interpreted according to their ordinary meaning in the technical field, unless explicitly defined otherwise herein. All references to “a/an/the element, apparatus, component, means, step, etc.” are to be interpreted openly as referring to at least one instance of the element, apparatus, component, means, step, etc., unless explicitly stated otherwise. The steps of any method disclosed herein do not have to be performed in the exact order described, unless explicitly stated.
Aspects and embodiments are now described, by way of example, with reference to the accompanying drawings, on which:
The aspects of the present disclosure will now be described more fully hereinafter with reference to the accompanying drawings, on which certain embodiments of the invention are shown. These aspects may, however, be embodied in many different forms and should not be construed as limiting; rather, these embodiments are provided by way of example so that this disclosure will be thorough and complete, and to fully convey the scope of all aspects of the invention to those skilled in the art. Like numbers refer to like elements throughout the description.
An overreaching purpose of the controller 120 is to provide a control signal u which causes the system 110 to evolve in such manner that the setpoint signal r is achieved or approximately achieved. Accordingly, the controller 120 realizes a mapping from r to u, which mapping may have a dependence on past and/or current values of y. The setpoint signal r can be provided by an operator, an executing software process, a networked computer; in the particular case of a vehicle, it may be provided by the driver. The setpoint signal r can be expressed as a value of the observation signal, in which case it is achieved when r(t)=y(t). Alternatively, the setpoint signal r can be expressed in terms of one of the state variables of the system (i.e., as one of the components of x) or a combination of these which is of relevance to the person or device which provides the setpoint signal r. The task of generating a control signal u by which the technical system 110 achieves the setpoint signal r in time |t0−tƒ in the most economical manner may be referred to as an optical control problem. It may be formulated, in discrete or continuous time, as the minimization of a cost functional J subject to the system dynamics and various further constraints C1, C2, . . . :
The minimization is performed over the set of admissible solution vectors of the form u=[u(t0) u(t0+Δt) u(t0+2Δt) . . . u(tƒ)], where Δt denotes a time step and each component u(t0+nΔt), n∈, can be either a scalar or a vector of scalars. A continuous-time representation of the solution vector may be u={u(t):t0≤t≤tƒ}. The further constraints may be equality or inequality constraints, such as
To implement these or similar operations, the controller may comprise memory 121, processing circuitry 123, signal interfaces 122, 125, and one or more optimization processes 126. The memory 121 may be suitable for storing an executable computer program 124 and optionally configuration data, historic data and the like.
Many control problems in a vehicle electronic control unit (VCU) involve solving an optimization problem: a function to be minimized (for example energy losses), subject to some constraints like the actuator limits. One example of a control problem is the vehicle motion control for actuator coordination. In some embodiments, the technical system 110 is a propulsion system 310 of a road vehicle 300 (see
When the control optimization problem is formulated as a quadratic problem (QP), it can be solved by an arbitrary one of several methods which exist in the literature, such as interior-point (IP) method, active-set (AS) method, and Alternating Direction Method of Multipliers (ADMM). The optimization processes 126 in the controller 120 may implement one or more of these methods. Further, one or more of the of the optimization processes 126 may be a so-called virtual solver, a trained prediction model mimicking the behavior of an optimization solver on which it has been trained. Different optimization methods have different properties, and for some problems there can be differences in the execution time, speed of convergency, solution accuracy, etc. The previous properties are particularly relevant for control optimizers running in embedded systems in vehicles, with limitations like the precision of the floating-point arithmetic used.
To set up an optimization problem for the actuator coordination of the motion control problem, the inputs are vehicle parameters like mass, inertia, tire radius, tire cornering stiffness, and desired control targets like desired longitudinal and lateral forces, target service brake power and target powertrain power. The result of this setup stage can be formulated as a set of time-invariant matrices H, f, ū, u, A, b, Aeq, Beq of a standard QP problem:
The formulation as a standard QP problem may represent a linearization of a nonlinear vehicle model which is valid at a working point corresponding to a current state of the vehicle. As mentioned, several available optimizers are capable of solving this optimization problem. The output of an optimizer can be a solution vector u, which is—or can be transformed into—an actuator vector including for instance brake torques, electric machine torques, engine torques, and steering angles.
From a safety compliance perspective, it is important to guarantee that the optimization-based control method will give a good solution after a certain time; this is one way of achieving a low failure rate λ. Towards this goal, the embodiments in the present disclosure provide redundancy in solving an optimization problem and a decision-making stage to select a correct control output for safety compliance. As will be described in greater detail, a same optimization task is performed multiple times in the software using different code, using different algorithms or “virtual” optimizers or different instantiations of these. As explained, a virtual optimizer is a function which has been trained to predict what a conventional optimizer would give, based on its previous outputs.
In a first step 210 of the method 200, a state of the system 110 is sensed. The sensing may be based on one or more values of the observation signal y fed to the controller 120, from which the state x can be completely or partially reconstructed, or based on data from or other sensors (not shown). The state x may be reconstructed by means of filtering, e.g., using a Kalman filter or an observer filter.
With the sensed state, in a second step 212, multiple independent executions of the optimization processes P1, P2, . . . , Pm are initiated, wherein each process is configured to solve a predefined optimization problem related to optimal control of the technical system. The executions of the optimization processes P1, P2, . . . , Pm may be independent in the sense that they do not exchange data among themselves; this however does not preclude the possibility that the executions are run in parallel on a common processor or on a common set of connected processors or processor cores. The optimization processes P1, P2, . . . , Pm are generally speaking numerical in nature or include a numerical part. They can include iterative algorithms and/or virtual solvers in the sense discussed above.
The optimization problem to be solved by the optimization processes P1, P2, . . . , Pm is predefined in the sense that it represents input data to the method 200 and/or it does not change over one execution of the method 200. In more detail, the governing equations are usually proper to the technical system—and thus substantially unchanged at runtime—and are to be combined with the sensed current state of the system before the optimization processes are initiated in the second step 212. At this point, the current state can be used to assign an initial value (e.g., valid at time t0) to the optimization problem. If the system is time-variable and/or non-linear, the current state may as well be needed as arguments to the functions ƒ, g (or to compute the matrices H, f, ū, u, A, b, Aeq, Beq) discussed above.
In a third step 214, a current solution vector is extracted from each optimization process after a predetermined delay. The solution vector from the ith optimization process Pi may be denoted ui. If the optimization process Pi is iterative, the extracting may include reading a current iterate from a memory. More generally, the extracting may include issuing a command for the optimization process Pi to output an approximate solution to the optimization problem which is based on the totality of information that the optimization process Pi currently has at its disposal. The predetermined delay may have been determined in view of the real-time character of the control of the technical system, and more precisely in view of the need to update the control signal u at suitable interval as the state of the system evolves. For example the predetermined delay may be included in the separation of two control-signal update points, and it may be configured so as to end sufficiently early that the controller 120 is able to generate a control signal u from one of the solution vectors u1, u2, u3, . . . extracted from the optimization processes P1, P2, . . . , Pm. This can be practically achieved my measuring the processing time for the step of generating the control signal.
In an optional fourth step 216, one or more quality indicators q1, q2, q3, . . . associated with an execution of a respective one of the optimization processes are obtained. The quality indicators will be used for weighting differences between pairs of the solution vectors u1, u2, . . . , um. It is not essential to obtain quality indicators for all m optimization processes; instead neutral values (placeholders) can be used to weight any differences which involve one or two solution vectors without quality indicators. A quality indicator may be a final step size or another convergence indicator, or a flag which if positively valued indicates a problem or failure during the execution. Further still, the quality indicator could represent the status of the associated optimization process in its last iteration (e.g., based on a task watchdog timer), or the quality indicator could estimate the quality of the solution vector based on a plausibility check.
In a fifth step 218 of the method 200, differences dij for pairs of the solution vectors are computed. The differences dij may be proportional to a norm of the difference ∥ui−uj∥, wherein the norm may be an Lp or p norm with p≥1. Of particular interest are differences based on the Euclidean norm (p=2) and the maximum norm (p=∞). The differences may be collected in a similarity matrix, which is generally real, nonnegative, symmetric and has all zero diagonal elements.
The computation may optionally include an initial step of rescaling 218.1 the solution vectors to be mutually comparable. For example, if the solution vector extracted from the optimization process is denoted ũi, the rescaled solution vector may be equal to
Optionally, if the formulation of the optimization problem allows the solution vectors to have different durations (tƒ is not fixed), the substep 218.1 may optionally include a temporal rescaling, by which it is ensured that all solution vectors u1, u2, . . . , um have equal duration, so that differences can be formed by subtraction.
In a further optional step 218.2, which can be executed if one or more quality indicators q1, q2, q3, . . . have been obtained, the differences are weighted by the quality indicators q1, q2, q3, . . . . For example, if high qi represents high quality, the weights may be applied as inverse weighting coefficients of the difference:
In a sixth step 220, on the basis of the differences dij, at least one of the solution vectors is selected for use in controlling the technical system 110.
The sixth step 220 may for example include performing a dimensionality reduction 220.1, such as a multidimensional scaling (MDS) operation or a principal coordinate analysis (PCoA). The output of the dimensionality reduction 220.1 is fed to the next step; it may optionally be used to visualize the similarity between different outputs as well.
Based on the output of the dimensionality reduction 220.1, a voting scheme 220.2 is executed. The voting scheme 220.2 may include forming clusters of the solution vectors u1, u2, . . . , um and selecting the solution vector to be used from the largest one of the clusters. In a particular implementation, there is initially formed a single (k=1) cluster of solution vectors, and it is checked whether a point-to-centroid distance is within a predefined tolerance. The centroid can be the barycenter of the cluster in reduced-dimension coordinate space. The grouping of the solution vectors u1, u2, . . . , um into clusters may be performed by executing a k-means clustering algorithm. If the point-to-centroid distance is too large, the number k is incremented by one unit, and a new grouping into k clusters is formed. The point-to-centroid distance is calculated for the new grouping, and for each cluster. If it still does not meet the predefined threshold, k can be incremented further until it reaches a limit of m−1, where m is the number of solution vectors, beyond which it is no longer meaningful to form clusters. Otherwise, when a grouping has been achieved where the point-to-centroid distance is below the predefined threshold for all clusters, the cluster with the largest number of solution vectors is selected; in that cluster, the solution vector closest to the centroid is selected for use in controlling the technical system 110.
If there is a draw, i.e. two or more clusters include the same number of solution vectors and this is the largest number, then a heuristic is used to choose one cluster. One heuristic it to choose the solution vector that resembles a previous solution (or multiple previous solutions) from the optimization processes P1, P2, . . . , Pm most closely. The resemblance may be measured by a norm of the difference. Another heuristic is based on a comparison with the output of a virtual solver of the type introduced; with this information available, the cluster providing the solution vector that resembles the output of the virtual solver most closely may be selected as the winner of the voting scheme 220.2.
To illustrate this implementation of the selection step 220, it is assumed that m=4 optimization processes are executed and each solution vector includes five variables:
A dimensionality reduction 220.1 followed by a grouping operation provide the two clusters seen in
It is noted for completeness that the selection step 220 may include a voting scheme 220.2 on its own, that is, without preprocessing the solution vectors u1, u2, . . . , um by a dimensionality reduction.
In one example, the respective optimization processes 412 implement an interior-point (IP) QP solver 412.1, an active-set (AS) QP solver 412.2, an ADMM QP solver 412.3 and a QP solver of a further type. The optimization processes 412 output solution vectors and quality indicators, which are fed to a solution similarity calculation section 414. The solution similarity calculation section 414 provides the differences dij, which are calculated in accordance with step 218 of the method 200 and which may be formatted as a similarity matrix. Then the solution similarity calculation section 414 supplies them to a decision-making section 416, which is responsible for the execution of step 220.
The aspects of the present disclosure have mainly been described above with reference to a few embodiments. However, as is readily appreciated by a person skilled in the art, other embodiments than the ones disclosed above are equally possible within the scope of the invention, as defined by the appended patent claims.
Filing Document | Filing Date | Country | Kind |
---|---|---|---|
PCT/EP2022/054258 | 2/21/2022 | WO |