The present invention relates to the field of servo-controlled systems, such as mechatronic systems or electromechanical systems.
In such a system, the input and the output of the system are linked together by a transfer function. In a system comprising an actuator for servocontrolling the output of the system by taking account of a measurement of that output, the output depends both on the input to the system and also on disturbances that may be internal or external, on defects in the control train and/or in the feedback loop, and/or in the actuator . . . , such that it can be difficult to determine the transfer function of the system. However, knowledge of that transfer function makes it possible to obtain more accurate operation of the system that is thus looped by the actuator and the sensor(s) measuring the output of the system.
In order to determine the transfer function, it is known to connect an analyzer or an oscilloscope for performing mathematical or signal-processing functions between the input and the output of the mechatronic or electromechanical system. Nevertheless, that needs it to be possible for external equipment to be connected, possibly via interfaces such as an analog-to-digital converter (ADC) or a digital-to-analog converter (DAC). Determining the transfer function thus requires operation of the system to be interrupted in order to open the feedback loop and undertake a maintenance operation, which requires the intervention of an operator.
A particular object of the invention is to enable at least one of the transfer functions of an electromechanical or mechatronic system to be determined, and to do so with limited impact on its operation and with equipment that is limited.
To this end, according to invention, there is provided a device comprising at least one electromechanical system having an input and at least one output, and an electronic control unit comprising both a servo control loop connecting together the input and the output of the electromechanical system, and also a digital corrector. The device includes a software module having an input connected to the output of the electromechanical system and an output connected to an input of the electromechanical system, and, for each frequency in a set of frequencies that are to be analyzed, the software module is programmed:
The device of the invention thus makes it possible to determine the following transfer functions for a given system:
These transfer functions can be determined by the device of the invention without any need to interrupt the servo control loop, and the computations necessary for making the estimates are relatively simple and do not require major computation resources as a result of using:
By way of example, the invention can be used in a system for orienting and stabilizing the aiming line of an optronic device by controlling the motors of a gyro-stabilized platform on which the optronic device is mounted.
It is also possible to use invention in other actuator systems, such as a system for actuating the control surfaces of an aircraft.
Other characteristics and advantages of the invention appear on reading the following description of a particular and nonlimiting embodiment of the invention.
Reference is made to the accompanying drawings, in which:
With reference in particular to
The motors 3 and 4, and the associated angle sensors 3bis and 4bis are connected to a control device 10 that issues respective commands m1 and m2 to the motors 3 and 4, and that receives respective measurements c1 and c2 from the angle sensors 3bis and 4bis.
The optical sensor 1 is provided with at least one inertial angle sensor 5 in order to detect an angular velocity c3 of the aiming axis v relative to a first reference axis that is collinear with the elevation axis y, and an angular velocity c4 of the aiming axis v relative to a second reference axis that is perpendicular to the aiming axis v and to the elevation axis y. In this example, the inertial angle sensor is a gyro having two sensing axes, such as the gyro produced under the trademark GSL by the Applicant. In a variant, any other angle measuring device could be used, and for example it is possible to use two inertial sensors, each having a respective sensing axis, such as the device produced under the trademark QUAPASON by the Applicant. The inertial sensor could be a mechanical sensor having a vibrating resonator, e.g. a hemispherical resonator, or use could be made of other technologies, such as optical fibers (a so-called fiber-optic gyro (FOG) sensor).
The inertial sensor 5 is also connected to the control device 10, and it transmits the measurement signals c3 and c4 thereto.
With reference also to
For each linear system referenced H, the control device 10 includes an electronic control unit 11 having a servo control loop that connects together the input and the output of the linear system by means of a digital corrector 12. The electronic control unit 11 is thus arranged to act via the digital corrector 12 to control the motors as a function of commands coming from a user interface 20 (visible in
m=K*(setpoint−c) and c=H*m.
This mode of operation is conventional and is not described in greater detail herein.
The control device 10 exchanges data with memory modules 30 and 40. The memory module 30 comprises a table of the frequencies fp that are to be scanned, of the amplitudes P0 of the associated excitation signals, and of the vectors of the associated Kalman gains Kf.
The control device 10 includes a software module 13 having an output p connected to an output e3 of the digital corrector 12, at least one first measurement input e1 connected upstream from an input of the digital corrector 12, and two measurement inputs e2 and e3 connected to the output of the digital corrector 12 respectively downstream and upstream from the connection between said output of the digital corrector 12 and the output p of the software module 13. Thus, the output p added to the output e3 of the digital corrector 12 gives the command e2 that is to be applied to the motor via the digital-to-analog converter and the signal m.
The software module 13 is programmed:
The software module 13 is arranged to scan a plurality of frequencies, recovering for each frequency the excitation amplitude and the gains of the Kalman filters stored in a memory (30 see
By way of example, the software module 13 is arranged to be capable of estimating a plurality of transfer functions, which are identified as FT1 to FT6 in
The principle of the invention for determining one of the transfer functions is described below in its three main stages: generating a sinusoidal excitation signal at the frequency fp, bandpass filtering using a Kalman filter about the frequency fp, and multiplying by a rotation matrix in order to obtain the real and imaginary parts of the transfer function between the excitation and the measurement under consideration at the frequency fp.
The excitation signal (disturbance) is a sinusoidal signal, for example a cosine of amplitude P0 at the frequency fp, and it can be modelled in the form of a vector that is representative of a complex number and that rotates at a constant speed {dot over (θ)}=2π·fP (known as a “Fresnel representation”). At the instant tk, the complex number is written as follows:
{circumflex over (P)}
k
P
0·exp(i·2π·fP·tk)=P0·exp(i·θk)=P0·cos(θk)+i·P0·sin(θk)
The voltage disturbance that is actually injected may be expressed as being the real part of the complex number, i.e.:
P
k
=P(tk)=P0·cos(θk)=Re{P0·exp(i·2π·fP·tk)}
While the imaginary part of the complex number is left free:
P
0·sin(θk)=Im{P0·exp(i·2π·fP·tk)}
This can be written in matrix form as follows:
For a constant frequency fp, the transition matrix between two sampling periods Te corresponds to rotation through the angle Δθ=θk+1−θk=2π·fP·Te, where Te is the sampling period of the calculation means (Te=tk+1−tk). The transition matrix is written as follows:
The matrix relationship between two consecutive instants is thus:
Below, it should be understood that the rotation matrix at the instant k is the product of k transition increments:
It should be observed that the inverse rotation matrix is simply the transpose. It too is calculated using the components of the excitation vector:
The notation (●)n designates the “nth” component of the vector representative of the disturbance.
Taking the disturbance Pk as the first component of the state vector, the following discrete dynamic system is obtained:
in which B=D=0 and C=[1 0].
As shown in
The matrix form of the dynamic system is adapted for performing Kalman filtering. P0 is taken as the initial amplitude condition of the excitation signal (disturbance) associated with a phase of zero, such that the initial vector is:
Concerning the frequency response of the electromechanical system and the matrix product, a formulation in the form of a linear dynamic system makes it possible to treat the physical system as a linear filter that receives the disturbance Pk as input to give the measurement Mk as output. Using the z transform and the notation {circumflex over (F)}(z) for the transfer function that is to be estimated, the following is obtained:
{circumflex over (M)}(z)={circumflex over (F)}(z){circumflex over (P)}(z)
When the delay operator z−1=exp(−i·2π·f·Te)∀f, this gives:
M
k−1
=z
−1
·M
k
For a linear system excited with a pure cosine at the frequency fp, the measurement is a cosine of amplitude MP and of phase ψP, and it takes the following matrix form:
The measurement that is directly accessible is Mk=C·XkM, whereas it is the following that is being looked for:
This can be written in matrix form:
Where the “matrix” measurement XkM and the transfer function XF are associated by the following trigonometrical relationships (see the Fresnel diagram of
I.e., on being inversed:
The real and imaginary components of the transfer function are obtained merely by a matrix product of the ideal measurement signal multiplied by a single rotation matrix of components that have already been calculated by generating the excitation signal:
{circumflex over (F)}(fP)=(XF)1+i(XF)2
where i is the imaginary unit such that i2=−1.
There follows a description of the bandpass filtering by Kalman filtering.
In order to estimate the real part and the imaginary part of the measurement XkM from the real measurement Mk, use is made of a converged-gain Kalman filter that acts as a selective bandpass filter about the excitation frequency:
In which:
The variance of the measurement noise is V=E[vk2].
The variance matrix of the model noise is:
W=BE[wk2]BT
The filter may be represented in the form of the following state representation:
The matrix Kf is the converged-gain matrix of the Kalman filter, such that:
K
f
=ZC
T(CZCT+V)−1
and
ΔAZ(ΔA)T−Z−ΔAZCT(CZCT+V)−1CZ(ΔA)T+W=0
In which Z is the solution of the Riccati equation.
In practice, in order to determine the transfer function of the linear system in real time, the following are known, the frequency fP of each disturbance signal, the amplitude P0, the duration of the filtering Tf, and the gain of the Kalman filter, i.e.:
In order to scan all of the frequencies in a given interval, the following algorithm is performed:
XF=[real FT,imag FT]T for each frequency and for each measurement.
It should be observed that in this example, the equations of the Kalman filter are put in the form of a recursive filter with a single state vector, as in equation 2.31 of the document “Introduction to Kalman filtering” by D. Alazard. Nevertheless, it is also possible to write them in the prediction/updating form with two state vectors (see equations 2.23 and 2.25 of that document) as in the description below of the continuous component.
Estimates are thus obtained of at least three transfer functions of the looped system, between the excitation signal and at least three measurements, such that
without any need for operator intervention in order to separate the servo control loop from the actuator.
The various transfer functions of the loop are then determined as follows.
With the notation of
a/ For the current frequency, storing for the current frequency the real parts of at least the following three closed loops:
b/ Calculating the open loop with:
c/ Calculating the transfer function of the electromechanical portion:
There follows a description of a preferred embodiment, making use of reformulation and extension in order to take the continuous components of the measurements into account.
In the preferred embodiment, it is not a cosine that is injected, but rather an excitation sine having a predetermined frequency fP in hertz (Hz).
When a sine type excitation signal is injected into a linear system, the system responds with a sine line that is amplified by a gain
and phase shifted by a phase Ψp.
The state representation of the sinusoidal line of the measurement without a continuous component thus has two dimensions and is given by:
where
The state vector represents the cosine (plotted along the x-axis) and the sine (plotted along the y-axis) on a circle of radius Mp=GpP0 for a vector rotating at the frequency fp and starting from an initial position determined by the angle Ψp.
Thus, the following matrices are obtained for the state representation of the Fresnel vector:
where, in conventional manner for state representation, ΔA is the transition matrix, B is the control matrix, C is the observation matrix, and D is the direct action matrix.
Nevertheless, in practice, it is probable that the response of the system also includes a continuous component corresponding to the operating point about which the system is excited.
This continuous component constitutes a bias that has the following discrete representation:
By adding this representation to the state representation of the sine line, the state representation is obtained for a sine having a continuous component in three-dimension for the various measurements, namely:
where:
There is no need for the excitation generator to have a continuous component. In order to design the sinusoidal excitation generator, it suffices to simulate the model described by the state representation of the sine line. The amplitude and the phase are selected by imposing initial conditions on the model. A phase of zero is selected for the sine wave that is to be generated so as to start excitation of the system progressively (sin(t=0)=0). A generator of a sine wave of amplitude P0 is obtained as follows:
X
k+1
P
=ΔA
P
X
k
P
P
k
=C
P
X
k
P
Each measurement from a sensor is a sine line PGP-including a continuous component, from which the state of the Fresnel vector is estimated by using a Kalman filter constituting an estimator corresponding to a bandpass filter about the frequency fp for the first two components of the state vector, and a lowpass filter for the continuous portion, based on the models (1) and (2).
Once this state has been estimated, it is possible to estimate the corresponding transfer function between the excitation (input) and the measurement (output).
At the output from the transfer function estimator, there are obtained directly in the real part and the imaginary part of the transfer function at the frequency fp.
The model of the augmented Kalman estimator takes the following general form:
With:
Since the matrices BM, DM are zero, it is possible to simplify the model:
The notation V[1×1] and W[3×3] is used for the covariance matrices of the measurement noise vk and of the model noise wk, which noise is assumed to be Gaussian for a linear Kalman estimator. The steady state of the estimator is determined solely by the selected covariance matrices V and W. Given that the estimator is implemented with converged gain, it is possible to set V=1 arbitrarily without loss of generality. W, the covariance matrix of the noise of the model, is selected as follows:
Thus, selecting the variance pair (σline2 σbias2) serves to define completely the steady state of the Kalman estimator.
A state representation of the estimator is written:
The following is then obtained:
where:
K
f
=ZC
M
T(CMZCMT+V)−1
In this representation, Z is the only solution that stabilizes the algebraic Riccati equation:
Z=ΔAZ(ΔA)T−ΔAZCMT(CMZCMT+V)−1CMZ(ΔA)T+W
It should be observed that this equation presents a singularity in the event that the frequency fp is equal to half the sampling frequency Fe=1/Te. In the general case, this equation can be solved for example using the “dare” function of the “Matlab” language that also serves to determine the eigenvalues of Ak that enable the time constant τK of the bandpass filter to be determined for the first two components of the state vector and of the lowpass filter of the continuous component.
As mentioned above, the settings of the estimator (i.e. the width of the band about fp, and the cut-off frequency for the lowpass filter) are obtained by selecting the pair of variances (σline2 σbias2) that enable the steady state Kalman estimator to be defined completely.
Assuming that the variance σbias2 is fixed, then reducing the variance σline2 gives rise to a reduction in the width of the bandpass filtering, and thus to a better estimate of the sine line as a result of better filtering of the noise and of any nonlinearities of the system. If the time constant τK of the filter is equal to the time constant of the line, then this reduction in the variance σline2 is accompanied by an increase in the time constant of the filter. It is therefore necessary to seek a compromise between the quality of the estimate (narrowness of the filter) and the convergence time of the estimator.
Assuming that the variance σline2 is fixed, then a reduction in the variance σbias2 give rise to a deterioration in the filtering of low frequencies for the cosine and sine components. In addition, the cut-off frequency of the response corresponding to the continuous component (bias) decreases when the variance σbias2 decreases (which amounts to increasing measurement noise relative to the noise of the model), giving rise to filtering that is more conservative.
By way of example, for a given sampling frequency Fe, for given minimum and maximum frequencies fmin and fmax of the excitation signal, and for a number Npoints of frequencies to be identified in this frequency range, it is proposed to set the estimator as follows:
In the present example, (σline2 σbias2)=(10−4 10−2) is selected for a sampling frequency Fe of 3 kHz. By way of example, this setting is appropriate for aiming an optronic device. For some other application, the above-mentioned values can serve as starting points for converging on settings that are more appropriate for said application.
In particular, such an application might require a sampling frequency that is different. However, it is known that for a given setting of the pair (σline2 σbias2), the width of the bandpass filter increases with increasing sampling frequency: identification is thus faster but of poorer quality. This problem can be solved by recalculating the values of the (σline2 σbias2) pairs so as to guarantee a time constant that is almost identical and a frequency response that is equivalent when changing from one sampling frequency to another.
In a variant, it is possible to reduce the calculation burden by making use of an estimator that is no longer in the form of a state representation
as described above (i.e. in the form of a recursive filter having a single state vector, but rather in the prediction/updating form with two state vectors, by using the notation {circumflex over (X)}k+1|kM for the predicted state and {circumflex over (X)}k+1|k+1M for the updated state (output from the estimator), with the recurrence equations of the filter at instant k+1 being:
The Kalman gain Kf is the same as that defined above. This implementation is mathematically equivalent to the preceding implementation, but less expensive in calculation time.
The transfer function estimator calculates the real and imaginary parts of the transfer function {circumflex over (F)}, between the sinusoidal excitation signal and the measurement that is obtained, for one of the following three closed loops:
It is thus sought to estimate the following (where i is the imaginary unit such that i2=−1):
{circumflex over (F)}(fp)=Rp+i Ip=Gp(cos(Ψp)+i sin(Ψp))
The state of the excitation generator at instant k is written XkP, and the process estimated by the Kalman filter on the basis of the measurement is written {circumflex over (X)}k|kM. The following is obtained:
The pair
is obtained from the state of the process {circumflex over (X)}k|kM by a matrix T constructed using the terms XkP and P0:
As before;
is a rotation matrix.
This gives:
giving rise to estimates of the real part Rp and of the imaginary part Ip such that:
This estimation should not be performed until the Kalman estimator has converged sufficiently. In order to be sure that it has, a length of time is allowed to elapse that is equal to several times the characteristic time constant τK of the estimator before estimating the transfer function. By taking a length of time that is equal to six times the characteristic time constant τK, it is ensured that the estimation error has convergence of 0.25%.
In order to ensure that the bias of the mechanical system (e.g. associated with the presence of unbalance or of a return member in a movement transmission) does not disturb determination the transfer function, it should be observed that it is necessary to ensure that the amplitude of the sinusoidal signal is sufficient to be able to ignore the effects that are not generated by the sinusoidal signal.
With reference to
Naturally, the invention is not limited to the implementation described, but covers any variant coming within the ambit of the invention as defined by the claims.
In particular, the invention is applicable to any type of electromechanical system that can be modelled by means of a linear transfer function, and it is therefore not limited to an application to an airplane control surface or to a device for aiming and stabilizing an optical sensor. In particular, the invention can be used with any device including an actuator controlled by servocontrol and measurements that are accessible to calculation means.
Other modelling parameters may be selected as a function of the intended application. The sampling frequency, the variances, the number of frequencies to be estimated, . . . .
The term “sinusoidal signal” is used to cover both a sine signal and a cosine signal.
The software module may receive as input the measurement of the output variable of the linear system and/or the difference between the measurement of the output variable of the linear system and the control setpoint.
Although in the embodiments described the rotation matrix is defined as a function of the components of the vector representative of the sinusoidal excitation signal, which is advantageous in terms of simplifying calculation, that is not essential.
Furthermore, it should be observed that in the embodiment described, account is taken of three measurements e1, e2, and e3:
In contrast, if it is desired to measure simultaneously both inertial speeds, the positions of the two coders, and both motor currents, it is possible to use e4, e5, and e6 in addition to e1.
The matrix T may have various different forms:
Number | Date | Country | Kind |
---|---|---|---|
2001504 | Feb 2020 | FR | national |
Filing Document | Filing Date | Country | Kind |
---|---|---|---|
PCT/EP2021/053388 | 2/11/2021 | WO |