Method for controlling a mechatronic system
Patent Information
- Application Number
- EP2023790377
- Authority / Receiving Office
- EP · EP
- Patent Type
- Applications
- Current Assignee / Owner
- Priority Date
- 2022-09-27
- Filing Date
- 2023-09-20
- Publication Date
- 2025-08-06
AI Technical Summary
Current control methods for mechatronic systems, such as gyro-stabilized viewfinders, face challenges in achieving stable and adaptive control while adhering to high-level requirements and environmental variations, often requiring reinitialization and validation processes, which are time-consuming and costly, and fail to account for manufacturing non-conformities and changes in specifications during the use phase.
A method for controlling mechatronic systems based on a prediction model that integrates barrier functions into a cost function, using the Nelder-Mead method to optimize polynomial coefficients for determining control commands, allowing for high sampling frequencies and adaptive control that respects constraints and environmental changes.
This approach enables stable and adaptive control of mechatronic systems at high sampling frequencies, reducing calculation time and facilitating self-adaptive capabilities that account for changes in high-level requirements and environmental conditions, while minimizing energy consumption and ensuring compliance with performance specifications.
Smart Images

Figure 1.1
Abstract
Description
DESCRIPTION TITLE: Method for controlling a mechatronic system TECHNICAL FIELD OF THE INVENTION
[0001] The technical field of the invention is that of automation and in particular mechatronic systems.
[0002] The present invention relates to a method for controlling a mechatronic system and in particular to a method for controlling a mechatronic system based on a model for predicting the behavior of the mechatronic system. TECHNOLOGICAL BACKGROUND OF THE INVENTION
[0003] The field of mechatronics combines mechanics, electronics, automation, and real-time computing. The focus of this interdisciplinary engineering field is to design automated systems and enable the automatic control of complex systems.
[0004] A mechatronic system comprises at least two subsystems: an operative part and a control part. For example, a mechatronic system comprises an electric motor carrying a mechanical load, which corresponds to the operative part of the system, whose position and / or speed is measured with a position and / or speed sensor. In this example, the operative part will be the electric motor, the mechanical load as well as the sensors. In order to actuate the motor, a control voltage, expressed for example in volts, is applied to the motor. The actuation of the motor causes a change in the position of the mechanical load. The control part may for example comprise a corrector, which, based on a measurement, will determine the command(s) sent to the operative part. The so-called adaptive corrector will also adapt the corrector's parameters to have an operation that depends on environmental conditions in order to follow a setpoint.In addition, this corrector will reject external disturbances determined from one or more measurements in order to allow the mechatronic system to follow an instruction by generating one or more commands sent to the operative part. For the sake of simplicity, the term "mechatronic system" can be used to designate the operative part of the mechatronic system when the command is applied to the operative part.
[0005] An example of a mechatronic system is the gyro-stabilized sight. A gyro-stabilized sight is an optronic system that allows observation at very large distances in a specific direction. The gyro-stabilized sight can, for example, be mounted on a vehicle. The purpose of the sight is, in this case, to keep the orientation of a mechanical load (for example, an optronic device such as a camera) carried by motors, fixed despite the movements of the vehicle. Several sight architectures are possible [Masten M., 2008, Inertially stabilized platforms for optical imaging systems: Tracking dynamic targets with mobile sensors. Control Systems, IEEE. 28. 47 - 64. 10.1109 / MCS.2007.910201], which is incorporated by reference in the application.One of the most common sight architectures is to use inertial sensors, such as gyrometers, carried by the mechanical load in order to control the absolute speed of the mechanical load; thus, the load becomes inertial except for imperfections and disturbances linked to environmental conditions.
[0006] Viewfinders, and in particular single-stage stabilization viewfinders, are a typical application of adaptive control, notably because of: - the variety of the employment environment which is the seat of disturbances which can destabilize this targeted inertia, - system wear, - dispersion on assembly lines, - the cost of developing the servos for these sights, which is significant in the event of a change in mechanical definition and high-level specifications.
[0007] An active mini-stick, a flap actuation system, a horizontal plane actuation system, a spoiler rotary actuator, a reverse actuator such as the eTRAS model (for "Electrical Thrust Reverser Actuation System") manufactured by the Safran group, a camera autofocus and an inertial sight are other examples of mechatronic systems.
[0008] In order to control the mechatronic system, a trajectory setpoint is provided to the system. A trajectory setpoint is a sequence of states that the mechatronic system must follow. A trajectory setpoint can be defined, for example, by a target position and / or speed that the mechanical load of the system mechatronics must follow. In the case of the gyro-stabilized sight, a trajectory instruction is the precession speed profile that the sight must follow.
[0009] The tracking of this trajectory instruction by the mechatronic system requires the implementation of a control loop. The general principle of a control loop is to compare the trajectory instruction and the state of the system in order to correct it effectively. Thus, from the difference between the trajectory instruction and the current state of the system, a corrector calculates the next command to apply to the motor so that the mechatronic system follows the trajectory instruction. For a gyro-stabilized sight, an example of a command is the voltage, in volts, applied to the motor terminals.
[0010] The way in which the mechatronic system must follow this instruction can be constrained. This constraint is for example defined by high-level requirements and / or more generally by product specifications. A high-level requirement is a constraint, formulated by the user, on the behavior of the mechatronic system during the use phase. A high-level requirement can result directly from the product specifications. A high-level requirement can correspond to the required stability of the mechatronic system or to the power consumption of the mechatronic system while following the trajectory instruction. In the case of a gyro-stabilized sight, examples of high-level requirements can consist of: - limit the standard deviation of the position error obtained by integrating the absolute speed tracking error, - limit the peak value of the position error obtained by integrating the absolute speed tracking error, - limit the standard deviation of the motor voltage, and - limit the peak value of the motor voltage.
[0011] A high-level requirement can have different objectives. For example, for the gyro-stabilized sight, the high-level requirement "bound the standard deviation of the position error obtained by integrating the velocity tracking error" ensures that the sight is sufficiently precise so that the target seen by the optical or optronic device is sharp, while "bound the peak value of the motor voltage" ensures the integrity of the motor.
[0012] The current state of the system may be evaluated from at least one measurement. For example, the current state of a mechatronic system may be evaluated from measurements including a measurement of its absolute position and / or velocity. For a gyro-stabilized sight, a measurement used may be, among other measurements such as motor current, the absolute speed of the sight, measured by a gyrometer.
[0013] In order to evaluate the current state of a system, it is known to use an observer. The role of an observer is, for example, to allow the current state of a system to be reconstructed or estimated in real time from the available measurements. Thus, it is possible that the measurements obtained cannot be processed directly by the control part of the mechatronic system and that an observer must be added to estimate the state of the system. It should be noted that an observer also makes it possible to estimate the unmeasured states of a system, and also to replace expensive or difficult-to-maintain sensors. Using an observer, the current state of the system can be evaluated from position and / or speed measurements alone.
[0014] In order to servo a mechatronic system, and in particular a gyro-stabilized sight, while respecting high-level requirements, the sampling frequency of the servo loops and the bandwidth of the mechatronic system must be sufficiently high. For example, the minimum necessary sampling frequency can be at least 50 hertz (Hz), 500 hertz (Hz) or any frequency between 50 and 500 hertz (Hz). The computation time of the corrector is often critical to obtain a sufficiently high sampling frequency. It is also known in the field of mechatronic systems that the sampling frequency of the servo loops must be at least 10 times higher than the bandwidth of the mechatronic system and preferably at least 20 times higher than the bandwidth of the mechatronic system.
[0015] To achieve a sufficiently high sampling frequency, the control of a mechatronic system is usually achieved using a static digital corrector. A static digital corrector is a corrector whose parameters are defined before use and which do not change during use. Thus, it is common for the parameters of these correctors to be defined during design and then not modified during use.
[0016] Techniques have already been implemented to optimize the parameters of the correctors, based in particular on modeling of the mechatronic system. These parameterization techniques are used during the development and fine-tuning phases of the mechatronic system, but are not integrated into the control loops and used during the use phase. The correctors thus developed are defined to cover a range of ignorance of the system to be controlled and its evolution over time, for requirements fixed before the use phase, or even before the development phase of the mechanical system.
[0017] In addition, a mechatronic system must ensure sufficient stability. For a simple definition, a system is stable if, in response to a bounded input, the system's output is bounded. In order to guarantee the stability of the servo system, the correctors are designed in such a way as to give the resulting servo loop significant stability margins, thus limiting the performance of the mechatronic system.
[0018] In order to have a functional control over the entire life of the system, it is necessary to develop a robust control, with respect to its potential evolutions, assumed to be limited. This robustness is obtained at the expense of the system's performance. The commonly used correctors are thus developed specifically for a product and are suboptimal in order to increase the robustness of the control. In other words, by implementing suboptimal correctors it is possible to obtain robust correctors that can be used despite the appearance of different scenarios during their use such as the dispersion of the system components, variations in the external environment, aging of the system to be controlled, etc. This is the principle of increasing the robustness of the corrector by reducing the system's performance.
[0019] To better account for environmental variations, such as variations in temperature, pressure, vibration, etc., it is possible to use additional sensors and / or observers. These additional sensors or observers will provide additional data to feed adaptive robust techniques. Thus, these methods make it possible to obtain robust correctors that adapt to environmental variations. However, with current correctors, when a system to be controlled is changed platform on on which it is based or when the high-level requirements are modified, the corrector must be readjusted in order to adapt it to the new environment and / or the new high-level requirements. Thus, the transition from the use of a gyro-stabilized sight on an airplane to use on a helicopter is not immediate because the vibration spectra are different, that is to say that from the point of view of the mechatronic system comprising the sight, its disturbances, in this case the vibrations, are different and the mechatronic system requires a new initialization phase. An initialization phase is a phase during which the parameters of the corrector are initialized so that its behavior is adapted during the following phase of use.
[0020] A well-known example of a robust adaptive technique is the Linear Parameter Varying (LPV) formalism. A first drawback of the LPV formalism is the difficulty in proving the stability of this technique in the presence of observers. In addition, the LPV formalism does not adapt to variations in high-level requirements: when these change, it is then necessary to restart a design and tuning process of the corrector, as well as a whole validation and qualification phase, which is very time-consuming and costly. In other words, the LPV formalism does not allow to obtain a so-called self-adaptive corrector with the capacity to adapt to both variations in the environment and variations in constraints linked to high-level requirements and / or specifications during the use phase of the mechatronic system.With gyro-stabilized sights, it is not possible with current control methods to perform self-adaptive control.
[0021] In addition, manufactured and / or assembled mechatronic systems may exhibit performance non-conformities, particularly due to part tolerancing issues. This may require costly rework or even rejects. Conventional corrections do not, or only very little, compensate for manufacturing defects that cause non-conformities to performance requirements.
[0022] A known control method for servo-control of a mechatronic system is predictive control described in [Rawlings, J.B., Mayne, D.Q., and Diehl, M. (2017). Model Predictive Control: Theory, Computation, and Design. Nob Hill Publishing. Reble, M. and Allg], which is incorporated by reference into the present application. A predictive control is a process which, for each sampling period, determines a sequence of future commands making it possible to obtain an optimal predicted future behavior, with respect to a specification, of the mechatronic system. Thus, a predictive control aims to solve online a constrained optimization problem, potentially non-linear, making it possible to define the best command to apply to achieve control of the system. The behavior is predicted using a prediction model of the mechatronic system. The behavior considered optimal is evaluated by minimizing a cost function by an optimization algorithm. The cost function makes it possible to determine what is considered optimal for the behavior of the system: following the trajectory instruction by following a reference trajectory while best satisfying the constraints reflecting the high-level requirements.Thanks to the minimization of the cost function, the optimization algorithm used in predictive control therefore makes it possible to determine the optimal future control sequence in view of compliance with the constraints.
[0023] A prediction horizon is a duration in the future for which the trajectory setpoint to be followed is known. It can, for example, be a multiple of the sampling period. In practice, the prediction horizon is generally at least 20 times greater than the duration of the sampling period. For a prediction horizon of n sampling periods, the sequence of commands to be determined consists of n commands, one per sampling period. Figure 6 is a graph showing an example of command values (C) as a function of time (T). The present time is represented by the hatched line 600 and the prediction horizon is the duration between the hatched line 600 and the hatched line 690. The commands 610 have already been applied to the system. The commands 620, 630, 640, 650, 660 and 670 are the commands predicted at the present time so that the mechatronic system follows the trajectory setpoint for the prediction horizon.Thus in Figure 6, the prediction horizon is made up of 6 sampling periods.
[0024] For each sampling period, the rolling horizon principle is applied: only the first command in the determined command sequence is applied to the mechatronic system. This rolling horizon principle ensures that the command is ultimately optimal at the current time.
[0025] It should be noted that the predictive control as presented in Rawlings et al., 2017, cannot address the problem of variations in constraints related to high-level requirements and / or specifications during the use phase of the mechatronic system. Indeed, the predictive control as presented in Rawlings et al., 2017 does not take into account any type of high-level requirements and / or complex and potentially non-derivable specifications. Thus, in order to add new functionalities integrating a sight within a more complex and intelligent system, it is not possible to recalibrate the sight during its use phase in case of changes in specifications.
[0026] Other techniques derived from artificial intelligence, such as reinforcement learning techniques, exist to control a mechatronic system. However, taking into account high-level requirements is very complex and stability is absolutely not guaranteed by these techniques.
[0027] There is therefore a need to provide a method for controlling mechatronic systems that addresses the problems mentioned above. SUMMARY OF THE INVENTION
[0028] The invention offers a solution to the problems mentioned above, by making it possible to control a mechatronic system in a stable manner and at a high sampling frequency.
[0029] One aspect of the invention relates to a method for controlling a mechatronic system, based on a model for predicting the behavior of the mechatronic system and a cost function ensuring that constraints are respected by the mechatronic system for following a trajectory instruction during a prediction horizon, the method comprising: - reformulate the constraints into barrier functions and integrate the barrier functions into the cost function; and - for each sampling period of a sequence of sampling periods: o obtain the trajectory setpoint and at least one measurement of the mechatronic system in a current state; o determine coefficients of a polynomial of order m by a Nelder-Mead method optimizing the cost function based on the prediction model, the determination taking as input the trajectory instruction and at least one measurement of the mechatronic system obtained; o calculate a command by evaluating the polynomial; and o apply the command to the mechatronic system.
[0030] Thanks to the invention, the calculation time of the control depends on the order m of the polynomial which can be determined by a user according to the sampling frequency necessary for the proper functioning of the servocontrol. The use of the Nelder-Mead method [Nelder and Mead, 1965: “a simplex method for function minimization”, Computer Journal, vol. 7, no. 4, p. 308-313] to determine the coefficients of the polynomial makes it possible to obtain a sufficiently high sampling frequency, due to the reduction in calculation time that the Nelder-Mead method allows, for the servocontrol of a mechatronic system for an order m less than or equal to 3 with an Intel® Core™ i7 processor. Thus, the implementation of this control method in an embedded system is facilitated. In addition, the use of the Nelder-Mead method makes it possible to obtain a stable control method.Finally, the cost function integrating barrier functions as described in the present application allows the mechatronic system to comply with the constraints when following a trajectory instruction. In other words, the use of a Nelder-Mead method, possibly under constraints, is an essential characteristic of the invention in order in particular to obtain a sufficiently high sampling frequency.
[0031] In addition to the characteristics which have just been mentioned in the preceding paragraph, the control method according to one aspect of the invention may have one or more additional characteristics among the following, considered individually or according to all technically possible combinations: - the control method further comprises a prior step of initializing the prediction model comprising a determination of the values of a set of parameters of the prediction model using an identification algorithm taking as input a sequence of commands in random amplitude and duration steps and a set of measurements of the mechatronic system, each measurement of the set of measurements of the mechatronic system being carried out after the application of each command of the sequence of commands to the mechatronic system, - the Nelder-Mead method optimizing the cost function is based on a polytope of m + 1 vertices, with m the order of the polynomial, whose m + 1 vertices are constrained within a predetermined range of values [xmin, xmax] for any evolution of the polytope during optimization, - the order m of the polynomial is between 2 and 20, preferably 3, When the order m of the polynomial is between 2 and 20, the coupling between the Nelder-Mead method with the polynomial for interpolation of the control sequence makes it possible to improve the performance of the method according to the invention, in particular by reducing the calculation times. - obtaining the trajectory instruction and at least one measurement of the mechatronic system in a current state further comprises a real-time estimation of a current state of the mechatronic system from the at least one measurement of the mechatronic system obtained, the estimation being carried out by an observer included in the mechatronic system, - the control method further comprises, for at least one sampling period of the sequence of sampling periods different from a first sampling period of the sequence of sampling periods, the steps of: o before determining the coefficients of the polynomial, replacing the barrier functions with new barrier functions, the new barrier functions being a reformulation of new constraints; o after obtaining the trajectory setpoint and the at least one measurement of the mechatronic system and before determining the coefficients of the polynomial, a step comprising: • save at least one measurement of the mechatronic system obtained in a first variable; determining a value of the parameters of the prediction model based on an identification algorithm taking as input: at least a part of the at least one measurement of the mechatronic system obtained during previous sampling periods saved in the first variable; and at least a part of the first commands applied to the mechatronic system during previous sampling periods saved in a second variable; and • replace a current value of the parameters of the prediction model with the determined value; and o after the calculation of the command: • save the calculated command in a second variable.
[0032] Another aspect of the invention relates to a mechatronic system comprising: - a processor implementing the control method according to the invention; and - a system suitable for obtaining at least one measurement of the mechatronic system.
[0033] Another aspect of the invention relates to a gyro-stabilized sight comprising - a processor implementing the control method according to the invention; and - a system suitable for obtaining at least one measurement from the gyro-stabilized viewfinder.
[0034] In addition to the characteristics just mentioned in the last two paragraphs, the mechatronic system and / or the gyro-stabilized sight may also include a memory allowing data to be saved, this memory being coupled to the processor. This memory is for example adapted to store the first and second variables of the steps of saving the at least one measurement of the mechatronic system obtained in a first variable and the calculated command in a second variable.
[0035] Another aspect of the invention relates to a computer program product comprising instructions which, when the program is executed by a computer, cause the latter to implement the method according to the invention.
[0036] Another aspect of the invention relates to a computer-readable recording medium comprising instructions which, when executed by a computer, cause the computer to implement the method according to the invention.
[0037] The invention and its various applications will be better understood by reading the following description and examining the accompanying figures. BRIEF DESCRIPTION OF THE FIGURES
[0038] The figures are presented for information purposes only and in no way limit the invention. - Figure 1 shows a schematic representation of the method of controlling a mechatronic system according to the invention. - Figures 2 to 5 show a schematic representation of variants of the invention. - Figure 6 is a graph showing an example of command values (C) as a function of time (T). - Figure 7 is a graph showing an example of command values (C), calculated by evaluating a polynomial, as a function of time (T). DETAILED DESCRIPTION
[0039] Unless otherwise specified, the same element appearing in different figures has a single reference.
[0040] Figure 1 shows a schematic representation of the method 100 for controlling a mechatronic system according to the invention.
[0041] The control method 100 may be implemented by a computer or by a processor. By “computer implemented” is meant that the steps, or substantially all of the steps, are performed by at least one computer or processor or other similar system. Thus, steps are performed by the computer, possibly fully automatically, or semi-automatically. In examples, the triggering of at least some of the method steps may be carried out by user-computer interaction. The level of user-computer interaction required may depend on the intended level of automation and balanced against the need to implement the user's wishes. In examples, this level may be user-defined and / or predefined.
[0042] A typical example of a computer implementation of a method is to execute the method with a system adapted for this purpose. The system may include a processor coupled to a memory and a graphical user interface (GUI), the memory having recorded thereon a computer program comprising instructions for implementing the method. The memory may also store a database. Memory is any hardware adapted for such storage, possibly comprising several distinct physical parts.
[0043] The control method 100 is based on a model for predicting the behavior of the mechatronic system. The prediction model is a mathematical model of the mechatronic system to be controlled. Several prediction models exist, such as those based on neural networks or linear models. The invention can be used with these existing prediction models. The model for predicting the behavior of the mechatronic system allows the simulation of the actual behavior of the mechatronic system. Thus, the prediction model makes it possible, from one or more input values, to obtain a prediction of an output corresponding to the state in which the mechatronic system would be if the input values were actually applied to it. For example, in the case of a gyro-stabilized sight, the input and output types of the prediction model are identical to those of the sight: - the input is the voltage applied to the motor terminals, - the output used is the absolute speed of the sight measured by a gyrometer.
[0044] Regarding the output used for a gyro-stabilized sight, it is also possible to measure the absolute angular position of the gyro-stabilized sight
[0045] The control method 100 is also based on a cost function ensuring that constraints are respected by the mechatronic system for monitoring a trajectory instruction during a prediction horizon. The cost function used in the present invention makes it possible to ensure that constraints are respected by the mechatronic system for monitoring a trajectory instruction because it integrates barrier functions as described in [Wills, AG and Heath, WP (2004). Barrier function based model predictive control. Automatica, 40(8), 1415-1422], which is incorporated by reference into the application.
[0046] The term "constraints" here refers to the high-level requirements that arise from the system specifications and / or directly from the system specifications.
[0047] Trajectory instruction tracking here corresponds to a reduction of the difference between the n predicted states of the mechatronic system and the sequence of the next n trajectory instructions. The difference between these two elements is then minimized over the entire prediction horizon.
[0048] The cost function reflects the constraints that the mechatronic system must respect. The cost function also reflects an optimization of the tracking. Thus, the cost function makes it possible to determine what is considered optimal for the behavior of the system: following the trajectory instruction by approaching a reference trajectory as closely as possible while ensuring compliance with the constraints.
[0049] The method 100 comprises reformulating 10 the constraints into barrier functions and integrating the barrier functions into the cost function. Thus, the constraints, provided by the user, are reformulated into barrier functions in order to be taken into account in the cost function. In one example, each constraint is reformulated into a barrier function. Wills and Heath, 2004 presents a control method including weighted barrier functions in the cost function. The barrier functions, as presented in Wills and Heath, 2004, ensure that the constraints are strictly satisfied. The reformulation method presented in Wills and Heath, 2004 is compatible with the invention.
[0050] Steps 20, 30, 40 and 50 of the method 100 are performed for each sampling period of a sequence of sampling periods. The sequence of sampling periods corresponds to the usage phase of the mechatronic system or at least to a part of this usage phase. Each sampling period must therefore be reduced, for example less than 0.01 second or 0.001 second or even 0.0002 second.
[0051] The method 100 comprises obtaining 20 the trajectory setpoint and at least one measurement of the mechatronic system for the current sampling period. The trajectory setpoint can be provided by the user or determined semi-automatically or even automatically. It can be constant or different for several consecutive sampling periods or even for the entire sequence of sampling periods. In the case of a gyro-stabilized sight, the trajectory setpoint is the precession speed imposed on the sight, i.e. the speed profile that the sight must follow.
[0052] The at least one measurement of the mechatronic system can be obtained using one or more sensors. For example, the measurement used for a gyro-stabilized sight is the absolute speed of the sight measured by a gyrometer. The at least one measurement of the mechatronic system used by the corrector can also be calculated, i.e., reconstructed or estimated, using an observer.
[0053] The method 100 comprises the determination 30 of the coefficients of a polynomial of order m by a Nelder-Mead method optimizing the cost function based on the prediction model, the determination taking as input the trajectory setpoint and the at least one measurement of the mechatronic system for the current sampling period.
[0054] During this step 30, the m coefficients of the polynomial are determined. The determination is carried out by optimizing the cost function described previously. The optimization is carried out by the Nelder-Mead method, described in the document Nelder and Mead (1965)], which is incorporated by reference in the application. The Nelder-Mead method allows to optimize complex cost functions. The principle of the Nelder-Mead method is as follows: in order to minimize a function (x), with x constrained in the interval [x min , x max], a simplex is a polytope of s + 1 vertices in an s-dimensional space, s is therefore the dimension of the optimization problem, i.e. the size of the vector x. Starting initially from such a simplex, it undergoes simple transformations during the iterations depending on what it discovers about the function (x). The simplex deforms, for example by undergoing expansions and / or contractions and / or reflections, it moves and shrinks progressively until its vertices approach a point where the function (x) is locally minimal.
[0055] In other words, at each iteration, the optimization algorithm determines the parameters of the polynomial that make it possible to obtain the predicted behavior of the system as close as possible to the reference trajectory. Thus, the optimization algorithm contains three steps. The first step consists of determining the coefficients of the polynomial; these coefficients are the search parameters of the optimization algorithm and evolve at each iteration. The second step consists of evaluating the commands from the polynomial. The number of commands can correspond to the number of sampling periods included in the prediction horizon. The third step of the optimization algorithm consists of applying these commands to the prediction model. The fourth step consists of evaluating the cost function, i.e., comparing the predicted trajectory with the reference trajectory and taking into account the constraints in the form of barrier functions.
[0056] The determination 30 of the m coefficients of the polynomial takes as input the trajectory setpoint, the prediction model and at least one measurement of the mechatronic system for the current sampling period. It is thus possible to evaluate the difference between the prediction of the system state and the trajectory setpoint.
[0057] Determining the m coefficients of the polynomial makes it possible to obtain a polynomial whose evaluation ensures obtaining the sequence of n commands to be applied to the mechatronic system so that the system reaches the trajectory setpoint for the prediction horizon. The sequence of commands is made up of as many commands as the prediction horizon includes sampling periods. For example, if the prediction horizon is made up of n sampling periods, then the sequence of commands is made up of n commands. The evaluation of the polynomial can therefore make it possible to obtain the value of the n commands for the n sampling periods.
[0058] The method 100 comprises calculating 40 a sequence of commands by evaluating the polynomial. Thus, by evaluating the polynomial for the prediction horizon, the value of the command to be applied at the present time is determined.
[0059] Figure 7 is a graph showing an example of command values C as a function of time T. The present time is represented by the hatched line 600. The prediction horizon is the time between the hatched line 600 and the hatched line 690. The commands 610 have already been applied to the system. The evaluation of the polynomial 680 makes it possible to determine the commands 620, 630, 640, 650, 660 and 670 predicted at the present time so that the mechatronic system follows the trajectory setpoint over the entire prediction horizon.
[0060] The method 100 comprises applying 50 the command to the mechatronic system. The applied command 50 is the command to be applied at the present time. In other words, the applied command is the first command in the sequence of commands to be applied so that the mechatronic system follows the trajectory setpoint for the prediction horizon 690. In addition, the command is optimized to minimize the energy required when following the trajectory setpoint. With reference to FIG. 7, the command applied in step 50 is command 620.
[0061] In the context of a gyro-stabilized sight, the method 100 for controlling a gyro-stabilized sight is based on a model for predicting the behavior of the gyro-stabilized sight and a cost function ensuring that constraints are respected by the gyro-stabilized sight for tracking a trajectory instruction for a prediction horizon. The method comprises: - reformulate 10 the constraints into barrier functions and integrate the barrier functions into the cost function; - for each sampling period of a sequence of sampling periods: o obtain 20 the trajectory setpoint and at least one measurement of the gyro-stabilized sight at a current state; o determine 30 of the coefficients of a polynomial of order m by a Nelder-Mead method optimizing the cost function based on the prediction model, the determination taking as input the trajectory setpoint and the at least one measurement of the gyro-stabilized sight obtained 20; o calculate 40 a command by evaluating the polynomial; and o apply 50 command to the gyrostabilized viewfinder.
[0062] The invention therefore aims to determine the coefficients of a polynomial whose evaluation makes it possible to obtain the control sequence to be applied so that the mechatronic system follows the trajectory setpoint during the prediction horizon. This thus makes it possible to obtain a mechatronic system control method whose calculation time depends on the number of polynomial coefficients to be determined, which influences the calculation time required for the method. The user can therefore, depending on the calculation time he wishes to allocate to the control method, determine the order m of the appropriate polynomial. This determination of the order m of the polynomial could also be carried out semi-automatically or even automatically. In addition, the invention makes it possible to obtain a sequence of commands to be applied which minimizes the energy required when following the trajectory setpoint.
[0063] Figure 2 shows a schematic representation of a first variant. In this variant, the control method 100 further comprises a preliminary step 60 of initializing the prediction model. The initialization 60 comprises a determination of the values of a set of parameters of the prediction model using an identification or learning algorithm taking as input a sequence of step commands of random amplitude and duration and a set of measurements of the mechatronic system. Each measurement of the set of measurements of the mechatronic system is carried out after the application of each command of the sequence of commands to the mechatronic system. The correspondence between each measurement carried out and each command applied is known. Thus, there is for each command a corresponding measurement, which can for example be grouped in pairs.These “command-measurement” pairs can be provided to the identification or learning algorithm for determining the values. In this application, it is considered that the terms “learning” and “identification” designate any method aimed at obtaining a prediction model which “behaves like” the mechatronic system.
[0064] The initialization 60 can be carried out in different steps. Figure 3 shows a schematic representation of the different steps of the initialization 60. The initialization 60 of the prediction model is carried out at least in part during an initialization phase of the mechatronic system, different from the use phase of the mechatronic system. The first two steps 61 and 62 can be carried out before the mechatronic system starts, i.e. before the initialization phase. The following three steps 63, 64 and 65 are performed during the initialization phase, which requires the mechatronic system to start.
[0065] Step 61 includes a user definition of high-level requirements from the product specification and the order m of the polynomial. The definition of high-level requirements and / or the order m of the polynomial could also be performed semi-automatically or even automatically.
[0066] Step 62 includes, for example, defining the type of prediction model to be used. Different types of prediction models may be used, such as neural networks or linear models. For example, if the chosen model is a neural network, the type of neural network used and the number of neurons are determined in this step 62. If a linear model is chosen, the order of the linear model is determined in this step 62. The choice of the type of prediction model to be used may be determined algorithmically or be defined by the user.
[0067] Step 63 includes defining a sequence of random amplitude and duration step commands. It should be noted that the maximum amplitude and maximum duration of each command in the sequence of commands must be consistent with the maximum amplitude admissible by the system and its response time. In other words, the maximum amplitude of each command in the sequence of commands must be less than a ratio of the maximum amplitude admissible by the system, the ratio being between ]0; 1], The maximum duration of each command in the sequence of commands must be greater than or equal to 5 times the time constant of the system. If a linear model was chosen in step 62, the sequence of random amplitude and duration step commands may consist of a pseudo-random binary signal.A pseudo-random binary signal can be defined as a signal consisting of a sequence of elements, each of the elements having a binary value exhibiting a pseudo-random character: the binary value of each of its elements is independent of the others, but it is a periodic sequence, which makes it deterministic.
[0068] In step 64, the command sequence determined in step 63 is applied to the mechatronic system and at least one measurement of the state of the system is performed after the application of each command of this sequence of commands. In one example, the at least one measurement of the state of the system corresponds to the same at least one measurement that will be performed during step 20. For example, if the at least one measurement during step 20 consists of measuring the absolute speed of the sight measured by a gyrometer, a measurement of the absolute speed of the sight measured by a gyrometer will be performed after the application of each command of this sequence of commands during this step 64.
[0069] During step 65, the sequence of commands determined in step 63 and the sequence of the at least one corresponding measurement are used as input data to determine the parameters of the prediction model.
[0070] In one example, the model initialization is performed based on a recurrent neural network that can represent dynamic systems. It is trained using a gradient-based optimization algorithm of the Levenberg-Marquardt type. It is also possible to use a recurrent neural network with a linear activation function, and in this case, the model initialization consists of identifying a linear model using a recursive least squares algorithm.
[0071] In a second variant, compatible with the previous variant, the m + 1 vertices of the polytope on which the Nelder-Mead method is based are constrained within a predetermined interval of values [xmin, xmax] for any evolution of the polytope during the optimization with for example xmin = -10 6 and xmax = 10 6. The Nelder-Mead method as described in Nelder and Mead (1965) is unconstrained. In this second variant, the decision variables are constrained to remain in a well-defined search space in order to promote convergence. The Nelder-Mead method is then said to be constrained. Thus, for any evolution of the polytope described in Nelder and Mead (1965), the vertices of the latter are constrained to remain in the interval [xmin, xmax]. In other words, if xj is one of the vertices then: xj = min (max xj, x min ), x max ), for j = 1, ... , s + 1 for any evolution of the polytope.
[0072] With this second variant, the convergence time of the constrained Nelder-Mead method is reduced. Thus, the calculation time of the control process using the constrained Nelder-Mead method can be further reduced.
[0073] In another implementation variant, compatible with the previous variants, the order m of the polynomial is between 2 and 5 and preferably equal to 3. The order m of the polynomial influences the computation time required by the control process for each sampling period. Thus, the larger the order m of the polynomial, the greater the computation time.
[0074] The prediction horizon for a mechatronic system is for example at least equal to 20 sampling periods. Thus, for a conventional control method in which the sequence of commands to be determined comprises 20 commands, the optimization algorithm searches for all future commands to be applied to the system, i.e. 20 parameters. In the present invention, for a prediction horizon of the same duration, with a polynomial of order 3, only 3 parameters are searched for by the Nelder-Mead method or the constrained Nelder-Mead method. Thus the calculation time for determining the parameters is reduced compared to the conventional control method.
[0075] An implementation on an Intel® Core™ i7 processor of the control method for a gyro-stabilized sight using a constrained Nelder-Mead method with an order m of polynomial equal to 3 is compatible with a sampling frequency at least equal to 400 Hertz.
[0076] In a variant, compatible with the preceding variants, obtaining 20 of the control method 100 further comprises a real-time estimation of a current state of the mechatronic system from the at least one measurement of the mechatronic system for the current sampling period carried out by an observer included in the mechatronic system. For example, the observer will make it possible to interpret the at least one measurement of the mechatronic system which is not necessarily directly interpretable by the corrector. Thus, the observer will make it possible to determine the state initiating the prediction of the system in the optimization process.
[0077] An implementation variant of the method 100, compatible with the preceding variants, comprises several additional steps, for at least one sampling period of the sequence of sampling periods different from the first period of the sequence. In a first implementation example, all the sampling periods, except the first sampling period, of the sequence of sampling periods contain the steps 20, 30, 40, 50, 70, 80 and 90 or contain at least the steps 20, 30, 40 and 50, 81 and 90. In a second For example, an alternation between one or more sampling periods containing steps 20, 30, 40 and 50 and one or more sampling periods containing steps 20, 30, 40, 50, 70, 80 and 90 may be predetermined automatically. The alternation may also be triggered automatically or by user-computer interaction. Another example implementation could be alternating between one or more sampling periods containing steps 20, 30, 40 and 50, 81 and 90 and one or more sampling periods containing steps 20, 30, 40, 50, 70, 80 and 90. Figure 4 shows a schematic representation of this implementation variant.
[0078] In this variant, a first replacement step 70 is added before the determination 30 of the coefficients of the polynomial. This replacement step 70 consists of replacing the barrier functions of step 10 with new barrier functions, the new barrier functions being a reformulation of new constraints. These new constraints replace the constraints initially provided. In other words, in this implementation variant, constraints different from those initially defined are integrated into the cost function during the use phase of the mechatronic system. The integration into the cost function in step 70 can be carried out in the same way as during reformulation 10.
[0079] In this variant, a second step 80 is added after obtaining 20 the trajectory instruction and the at least one measurement of the mechatronic system and before determining 30 the coefficients of the polynomial. Step 80 can comprise 3 steps 81, 82 and 83. This step 80 can be carried out before or after step 70. Figure 5 shows a schematic representation of the different steps of step 80.
[0080] Step 81 consists of saving the at least one measurement of the mechatronic system for the current sampling period in a first variable.
[0081] Step 82 consists of determining a value of the parameters of the prediction model. In other words, in step 82, each parameter of the prediction model is defined by assigning it a value. This determination requires as input at least a part of the at least one measurement of the mechatronic system obtained during previous sampling periods saved in the first variable and at least a part of the first commands applied to the mechatronic system during previous sampling periods saved in a second variable. The at least one measurement of the mechatronic system obtained during previous sampling periods is saved in step 90. In order to use this data as input, the correspondence between each measurement of the mechatronic system and an applied command must be known. In other words, a “command - measurement” pair with the measurement that corresponds to the at least one measurement of the mechatronic system made after the command of the pair has been applied to the mechatronic system can for example be constructed and used by the identification algorithm. The determination 82 can be carried out in a similar manner as the initialization 60, in particular the same identification algorithm can be used.
[0082] In a first exemplary implementation of step 82, all measurements saved in step 81 and all commands saved in step 90 are used as input data. In a second exemplary implementation of step 82, only the measurements saved in step 81 for the last sampling periods and the commands saved in step 90 for the last sampling periods are used as input data. For example, only the measurements saved in step 81 and the commands saved in step 90 of the last 10,000 sampling periods are used for determination 82.
[0083] Step 83 consists of replacing a current value of the parameters of the prediction model with the determined value of the parameters of the prediction model in step 82. In other words, a new value, which was determined in step 82, for each parameter of the prediction model is assigned to the different parameters of the prediction model. Thus the current values of the different parameters of the prediction model are replaced.
[0084] A third step 90 is added after the calculation 40 of the command sequence. Step 90 consists of saving the first command of the command sequence calculated for the current sampling period in a second variable.
[0085] This implementation variant comprising steps 70, 80 and 90 makes it possible to obtain a self-adaptive control method. Thus, this variant implementation has the ability to adapt to both environmental variations and variations in constraints related to variations in high-level requirements and / or specifications during the use phase of the mechatronic system. Indeed, the computation time remains sufficiently low even when a sampling period includes steps 20, 30, 40, 50, 70, 80 and 90. An implementation of this variant on an Intel® Core™ i7 processor of the control method for a gyro-stabilized sight using a constrained Nelder-Mead method with a polynomial order m equal to 3 has a sampling frequency at least equal to 400 Hertz.
Claims
CLAIMS
1. Method (100) for controlling a mechatronic system, based on a model for predicting the behavior of the mechatronic system and a cost function ensuring that constraints are respected by the mechatronic system, for the mechatronic system to follow a trajectory instruction during a prediction horizon, the method comprising the steps of: - reformulate (10) the constraints into barrier functions and integrate the barrier functions into the cost function; and - for each sampling period of a sequence of sampling periods: o obtain (20) the trajectory setpoint and at least one measurement of the mechatronic system at a current state; o determine (30) coefficients of a polynomial of order m by a Nelder-Mead method optimizing the cost function based on the prediction model, the determination taking as input the trajectory setpoint and the at least one measurement of the mechatronic system obtained (20); o calculate (40) a sequence of commands by evaluating the polynomial; and o apply (50) the first command of the sequence of commands to the mechatronic system.
2. Control method (100) according to claim 1 further comprising a prior step of initializing (60) the prediction model comprising a determination of the values of a set of parameters of the prediction model using an identification algorithm taking as input a sequence of step commands of random amplitude and duration and a set of measurements of the mechatronic system, each measurement of the set of measurements of the mechatronic system being carried out after the application of each command of the sequence of commands to the mechatronic system. [Claim s] A control method (100) according to any preceding claim wherein the Nelder-Mead method optimizing the cost function is based on a polytope of m + 1 vertices, with m the order of the polynomial, whose m + 1 vertices are constrained within a predetermined range of values [xmin, xmax] for any evolution of the polytope during optimization.
4. Control method (100) according to any one of the preceding claims in which the order m of the polynomial is between 2 and 20, preferably 3. [Claim s] Control method (100) according to any one of the preceding claims in which obtaining (20) the trajectory setpoint and at least one measurement of the mechatronic system in a current state further comprises a real-time estimation of a current state of the mechatronic system from the at least one measurement of the mechatronic system obtained (20), the estimation being carried out by an observer included in the mechatronic system. [Claim s] A control method (100) according to any preceding claim wherein at least one sampling period of the sequence of sampling periods different from a first sampling period of the sequence of sampling periods further comprises the steps of: - before the determination (30) of the coefficients of the polynomial, the replacement (70) of the barrier functions by new barrier functions, the new barrier functions being a reformulation of new constraints; - after obtaining (20) the trajectory instruction and the at least one measurement of the mechatronic system and before determining (30) the coefficients of the polynomial, a step (80) comprising: o saving (81) the at least one measurement of the mechatronic system obtained (20) in a first variable; o determine (82) a value of the parameters of the prediction model based on an identification algorithm taking as input: - at least a portion of the at least one measurement of the mechatronic system obtained (20) during previous sampling periods saved (81) in the first variable; and - at least a part of the first commands of the calculated command sequences (40) to the mechatronic system during previous sampling periods saved (90) in a second variable; o replace (83) a current value of the parameters of the prediction model by the determined value; and - after calculating (40) the command: o save (90) the first command of the calculated command sequence in a second variable.
7. Mechatronic system comprising: - a processor implementing the control method according to claims 1 to 6; and - a system suitable for obtaining at least one measurement of the mechatronic system.
8. Gyro-stabilized sight comprising: - a processor implementing the control method according to claims 1 to 6; and - a system suitable for obtaining at least one measurement from the gyro-stabilized viewfinder.
9. A computer program product comprising instructions which, when the program is executed by a computer, cause the latter to implement the method according to any one of claims 1 to 6.
10. A computer-readable recording medium comprising instructions which, when executed by a computer, cause the computer to carry out the method of any one of claims 1 to 6.