Control of Optoelectronic Scanning and Tracking Seeker by Means the LQR Modiﬁed Method with the Input Signal Estimated Using of the Extended Kalman Filter

: The paper presents the concept of controlling the designed optoelectronic scanning and tracking seeker. The above device is intended for the so-called passive guidance of short-range anti-aircraft missiles to various types of air maneuvering targets. In the presented control method, the modiﬁed linear-quadratic regulator (LQR) and the estimation of input signals using the extended Kalman ﬁlter (EKF) were used. The LQR regulation utilizes linearization of the mathematical model of the above-mentioned seeker by means of the so-called Jacobians. What is more, in order to improve the stability of the seeker control, vector selection of signals received by the optoelectronic system was used, which also utilized EKF. The results of the research are presented in a graphical form. Numerical simulations were carried out on the basis of the author’s own program developed in the programming language C++.


Introduction
One of the most important components of an anti-aircraft self-guiding infrared missile is the optoelectronic self-guiding seeker. This type of device is still the subject of intensive research in many scientific centers around the world [1 -15]. The issue of this article refers to the publications [16,17] and is a continuation of the research conducted on the designed optoelectronic scanning and tracing seeker, presented in Figure 1.
The drive system of the designed scanning and tracking seeker is the rotor shown in Figure 1a. It is suspended in two rotating housings forming the so-called Cardan joint (Figure 1c). The rotor axis is the optical axis of the search and tracking system for a detected target. By means of the motors mounted in the individual housings (Figure 1b), control moments are applied to the rotating rotor, which makes it possible to change the position of its axis in space and thus to control the seeker. Figure 1d shows a 3D visualization of the complete seeker. Thanks to the 3D software, the mathematical and dynamics model and problem of moving parts are easier to solve [18]. Figure 2 shows the seeker set in the first operating mode in which the device scans the air space with the so called large angle of scanning β = 1.92 • . Figure 3 shows the area of the airspace scanned by the seeker set in the first operating mode (the plane is scanned perpendicularly to the head axis). Figure 4 shows the seeker set in the second operating mode, where the device scans the air space with a so-called small scanning angle β = 0.28 • . Figure 5 shows the area of air space scanned by the seeker set in the second operating mode (the plane scanned is perpendicular to the seeker axis). The drive system of the designed scanning and tracking seeker is the rotor shown in Figure 1a. It is suspended in two rotating housings forming the so-called Cardan joint ( Figure 1c). The rotor axis is the optical axis of the search and tracking system for a detected target. By means of the motors mounted in the individual housings (Figure 1b), control moments are applied to the rotating rotor, which makes it possible to change the position of its axis in space and thus to control the seeker. Figure 1d shows a 3D visualization of the complete seeker. Thanks to the 3D software, the mathematical and dynamics model and problem of moving parts are easier to solve [18]. Figure 2 shows the seeker set in the first operating mode in which the device scans the air space with the so called large angle of scanning   Figure 3 shows the area of the airspace scanned by the seeker set in the first operating mode (the plane is scanned perpendicularly to the head axis).    Figure 3 shows the area of the airspace scanned by the seeker set in the first operating mode (the plane is scanned perpendicularly to the head axis).     Figure 5 shows the area of air space scanned by the seeker set in the second operating mode (the plane scanned is perpendicular to the seeker axis). The detailed principle of operation and innovation of the seeker is presented in [16,19]. At the present stage of research, a mathematical model of the dynamics of the presented device has been developed, various algorithms of control of the seeker's optical axis have been analysed in [16,[20][21][22][23], and optimal operating parameters of the seeker have been determined while maintaining the stability conditions specified by the so-called Lapunov method [24]. In the course of the above-mentioned research, problems with precise control of the device axis in the so-called second operating mode of the seeker (Figure 4), in which the seeker tracks the previously detected air target with the small scanning angle ( Figure 5).It should be noted that this type of solution for detection (space scanning) and tracking of the maneuvering air target is not described in the available literature. After a deeper analysis of the problem, it turned out that it is caused by too many pulses from infrared radiation emitted by the target that are received by the optoelectronic system. Too many detection pulses cause unfavorable overdriving of the seeker axis. It was, therefore, advisable to carry out additional filtering of signals received by the optoelectronic system. For this purpose, the so-called vector selection of signals received by the optoelectronic system was used, with a Kalman filter added [25][26][27][28]. Moreover, the so-called modified LQR control method was used to increase the precision of the seeker axis control. The results of this work are presented in subsequent points of this paper.   The detailed principle of operation and innovation of the seeker is presented in [16,19]. At the present stage of research, a mathematical model of the dynamics of the  Figure 6 shows the scanning seeker diagram together with the adopted coordinate systems and markings of individual angles of rotation of the respective systems in relation to each other. The origins of all coordinate systems are located at the intersection of the axis of rotation of the outer housing with the axis of rotation of the inner housing of the seeker. The movement of the seeker axis can be induced by moments of external forces M Z and M W forces generated by control motors or by moments of friction forces M TW and M TZ forces generated in the bearings of particular seeker housing as a result of angular displacement of the missile deck.

Mathematical Model of the Scanning Seeker
Angular movements of a missile are treated as external disturbances and are determined by the angular ω x P , ω y P , ω z P velocities that cause the missile to rotate around the individual axes of the system x P y P z P at the appropriate angles α x α y α z . Angles ψ, ϑ are measured with fiber optic sensors ( Figure 4) and angle ϕ is measured with the rotor position sensor (Figure 2).  Angular movements of a missile are treated as external disturbances and are determined by the angular velocities that cause the missile to rotate around the individual axes of the system .Angles ϑ ψ , Figure 6. Seeker diagram with adopted coordinate systems.
The following coordinate systems have been introduced: x K y K z K -a coordinate system associated with the reference direction established in space; x R y R z R -a mobile coordinate system associated with the rotor; x CW y CW z CW -a mobile coordinate system associated with the inner housing; x CZ y CZ z CZ -a mobile coordinate system associated with the outer housing; x P y P z P -a mobile coordinate system associated with a missile; The following marking of the angles of rotation has been adopted: ψ-angle of rotation x CZ y CZ z CZ relative to x K y K z K around axis z CZ ; ϑ-angle of rotation x CW y CW z CW relative to x K y K z K around axis x CW ; ϕ-angle of rotation x R y R z R relative to x K y K z K around axis y R ; α x -angle of rotation x P y P z P relative to x K y K z K around axis x P ; α y -angle of rotation x P y P z P relative to x K y K z K around axis y P ; α z -angle of rotation x P y P z P relative to x K y K z K around axis z P ; The following were assumed as given values: ψ, here: c w is a coefficient of friction in the inner bowl bearing and c z is a coefficient of friction in the outer bowl bearing.
Using the Lagrange II equation, the following gyroscope motion equations have been derived [29]: (1) where the components of the angular velocity of the outer housing: ψ + ω z P and the components of the angular velocity of the inner housing: Assuming that external kinematic impacts are negligible, we will obtain the following system of equations of motion of the seeker:

LQR Control of the Scanning Seeker
In this article, the authors proposed to control the seeker axis by means of a modified linear-quadratic regulator (LQR). This method can be used to determine such control that minimizes the integral quality indicator, given by the formula: where Q = matrix of state variable weights, R = matrix of control weights, x=state vector, u = [M W − M TW ] T -control vector. Q and R matrices are diagonal weight matrices that can be used to change the influence of particular state variables and controls on the presented quality criterion. The advantage of this method is that the entire state vector is the set point value, not just its selected values, as is the case with other controllers (e.g., PID) [30][31][32][33].
LQR regulation requires linearization and discretisation of state equations. Jacob's matrix-a matrix of successive partial derivatives-was used in the process of linearization.
To Equations (3) and (4), we introduce the signs: thanks to which we get a nonlinear system of equations: where: Then, in the above system, the components dependent on the so-called owndynamics of the system (state variables) and the components dependent on external actions (control moments) will be separated, as shown below: where: f i = a component dependent on the own dynamics of the system, z i = a component dependent on control and external interference: The control law takes the form: where x Z is the matrix of set state variables, while the matrix of amplification is calculated from the dependency: where P matrix is the solution to Riccati discrete equation [34,35]: Selection of LQR regulator settings consists in the determination of the Q and R weights matrices. The LQR algorithm does not have a universal method for selecting the above parameters and they are usually iteratively selected. In this paper, when selecting the initial values of Q and R matrices, the authors used the Bryson [36] rule, which suggests the selection of the following input parameters: where i-means another element of the state vector; x ii -these are the maximum values for individual elements of the state vector x; u ii -these are the maximum control moments. The maximum operating parameters of the seeker were determined using the Lapunov method [24], and they are respectively: The P matrix was determined by numerically solving Riccati discrete equations according to the formula: Matrix P j−1 , according to the above formula, is calculated iteratively from the back. P j = Q is assumed as the input value. Jacobians were used to determine the state matrix A and control matrix B [37]. The individual elements of the matrix A are given according to the dependency: After calculating the partial derivatives, further elements of the matrix A were determined, represented by the following equations: x 2 x 4 2 sin x 1 cos x 1 sin 2x 1 +J s2 J y R nx 2 cos 2 x 1 2 sin x 1 (J s3 +J s2 sin 2 x 1 ) The individual elements of the matrix B are given according to the dependency: After calculating the partial derivatives, the individual elements of the control matrix B were obtained, represented by the following equations:

Vector Filtration of Control Signals by Means of the Extended Kalman Filter
The accurate angle measurement of the detected object has a significant impact on the accuracy of its tracking [38][39][40][41][42]. In order to correctly determine the angular position of the detected object, it should be determined the law of airspace scanning by the optoelectronic system.
The law of airspace scanning by the optoelectronic system of the seeker is presented in the paper [19]. On its basis, linear equations describing the model of the scanning process were derived: β X (t) = a tan(tan(β(t)) · cos(a sin(z zp (t)/ x zp (t) 2 + z zp (t) 2 )) (17) β Z (t) = a tan(tan(β(t)) · sin(a sin(z zp (t)/ x zp (t) 2 + z zp (t) 2 )) (18) where: β X (t), β Z (t)-angular coordinates of the detected target relative to the axis of the scanning seeker; β(t)-resultant angle of deflection of the light beam from the optical axis: x zp , z zp -the components of the position of the light beam on the plane of the original mirror.
Angular coordinates of the detected target β X , β Z are measured with respect to the optical axis of the seeker. These coordinates are the position desired to control the axis of the seeker so that it tracks the detected target.
Due to the high scanning density, especially in the second operating mode of the seeker (see Figure 5), there is a large number of pulses received from the infrared detector, which causes an unfavorable overdriving of the seeker axis. For the reasons mentioned above, it was necessary to apply appropriate filtration. Although a large number of control signals do not cause losing track of the target, it has a negative effect on the precision of the control. The method of filtering signals received by the optoelectronic system of the seeker presented in the paper is divided into two stages: selecting the maximum signal (pulse), -performing additional filtration of the determined maximum signals using the EKF. Figure 7 shows a diagram of filtering the signals received by the optoelectronic system of the seeker. signals do not cause losing track of the target, it has a negative effect on the precision of the control. The method of filtering signals received by the optoelectronic system of the seeker presented in the paper is divided into two stages: -selecting the maximum signal (pulse), -performing additional filtration of the determined maximum signals using the EKF. Figure 7 shows a diagram of filtering the signals received by the optoelectronic system of the seeker. Based on the series of pulses from the infrared detector, only those for which the voltage value is the highest, i.e., theoretically the closest to the source of infrared radiation, are taken into account. These are the so-called maximum pulses marked in Figure 7 with the symbol B. At the next stage of selection, the Kalman filter was used, in which a variable coefficient ∆β was adopted as one of the quality criteria (see Figure 7), depending on the value of the V WC velocity vector. The coefficient ∆β varies from 1.5 Ra to 6 Ra, where Ra is the radius of the visual field of the seeker corrective lens system. The algorithm according to which the Kalman filter works is divided into two stages. The first stage is called prediction and the second stage is called correction. During prediction, the velocity vector of the detected target is estimated based on the previous coordinates of the detected target [43][44][45].
Estimated values of the direction and orientation of the target velocity vector are additional quality criteria for filtering those maximum signals whose vectors have the opposite direction and orientation compared to the V WC vector. Vectors of measurement signals are marked with the "r i " symbol in Figure 7.
The prediction of the direction and orientation values of the target velocity vector is based on the matrix of coordinates of the detected target: where i = number of target detection pulses.
Equations describing the estimated velocity vector of a detected air target: where: ν WC = estimated value of the target velocity vector, γ WC = estimated direction of the target velocity vector, t i = time of measurement of consecutive pulses from the infrared detector, ∆t = reverse time interval (in numerical simulations, it is the time of about 10 detection pulses).
In the next stage of filtration, called correction, the final control signal is determined (Figure 7, point E), for which the value of the determined "r i " vector is greater than or equal to the quality ∆β coefficient. Signals selected in this way β X , β Z have been used to control the seeker axis and thereby track the detected air target, as described in the next chapter of the paper.

Results
The studies were carried out for different air situations. Numerical simulations were carried out on the basis of the author's own program developed in the C++ language.

Scanning Seeker Parameters
Moments of rotor inertia: J x R = 0.00114143 (kg · m 2 ; J y R = 0.00157911 (kg · m 2 ; J z R = 0.00158234 (kg · m 2 Moments of inertia of the complete inner housing: J x CW = 0.0016663 (kg · m 2 ; J y CW = 0.0011666 (kg · m 2 ; J z CW = 0.0011463 (kg · m 2 ) Moments of inertia of the complete outer housing: J x CZ = 0.0003383 (kg · m 2 ) ; J y CZ = 0.0002213 (kg · m 2 ; J z CZ = 0.0002583 (kg · m 2 ) Rotational speed of the rotor: n = 600(rad/s) (The speed and torque of the motor depend on the strength of the magnetic field generated by the energized windings of the motor, which depends on the current through them-may slightly differ from the fixed value [46]).
The coefficient of friction in the inner housing bearing: The coefficient of friction in the outer housing bearing: Figure 8 shows a computer simulation image of the tracking of an air target moving at a speed of 350 m/s, located at a distance of 1600 m from the firing position, without the use of a filtration of pulses received by the optoelectronic system of the seeker. Figure 9 shows a computer simulation image of tracking the same air target but using the signal filtering presented in Chapter 4. In both cases, the seeker axis is controlled by the method described in Chapter 3, using a modified linear-quadratic regulator (LQR).  Figure 9 shows a computer simulation image of tracking the same air target but using the signal filtering presented in Chapter 4. In both cases, the seeker axis is controlled by the method described in Chapter 3, using a modified linear-quadratic regulator (LQR). For a better comparison of the simulations shown above, Figure 10 shows the set trajectory TZ and the trajectory TR pursued by the seeker axis when tracking a detected air target without signal filtering.  Figure 9 shows a computer simulation image of tracking the same air target but using the signal filtering presented in Chapter 4. In both cases, the seeker axis is controlled by the method described in Chapter 3, using a modified linear-quadratic regulator (LQR). For a better comparison of the simulations shown above, Figure 10 shows the set trajectory TZ and the trajectory TR pursued by the seeker axis when tracking a detected air target without signal filtering. For a better comparison of the simulations shown above, Figure 10 shows the set trajectory T Z and the trajectory T R pursued by the seeker axis when tracking a detected air target without signal filtering. Figure 11 shows the same trajectories after signal filtering. Figure 12 shows a computer simulation image of the seeker axis control in the airspace search phase and in the phase of tracking the detected target. Target speed: 250 m/s, target distance from fire station: 1100 m.

Results of the Simulation
Description of the markings used in Figures 12-14: A, scanning lines; B, trajectory of seeker axis motion in the programmatic airspace search phase; C, phase of seeker axis shifting to the detected target; D, tracking of the detected target. Figure 13 shows the differences between the set trajectory and the trajectory pursued by the seeker axis when controlled with the use of the PID method, while Figure 14 shows the differences between the set trajectory and the trajectory pursued by the seeker axis when controlled with the use of modified LQR method.  Figure 11 shows the same trajectories after signal filtering. Figure 11. TZ set trajectory and pursued TR trajectory of the seeker axis with the filtration of signals received from the infrared detector. Figure 12 shows a computer simulation image of the seeker axis control in the airspace search phase and in the phase of tracking the detected target. Target speed: 250 m/s, target distance from fire station: 1100 m.  Figure 11 shows the same trajectories after signal filtering. Figure 11. TZ set trajectory and pursued TR trajectory of the seeker axis with the filtration of signals received from the infrared detector. Figure 12 shows a computer simulation image of the seeker axis control in the airspace search phase and in the phase of tracking the detected target. Target speed: 250 m/s, target distance from fire station: 1100 m.  Description of the markings used in Figures 12-14: A, scanning lines; B, trajectory of seeker axis motion in the programmatic airspace search phase; C, phase of seeker axis shifting to the detected target; D, tracking of the detected target. Figure 13 shows the differences between the set trajectory and the trajectory pursued by the seeker axis when controlled with the use of the PID method, while Figure 14 shows the differences between the set trajectory and the trajectory pursued by the seeker axis when controlled with the use of modified LQR method.

Conclusions
The paper presents the application ofmodified LQR control and the estimation of input signals using Kalman filter for the process of detection and tracking of air targets.
LQR regulation uses linearization of the mathematical model of the tested scanning seeker with the use of the so-called Jacobians, while in order to improve the stability of the seeker's operation, vector selection of signals received by the optoelectronic system, which utilizes, among others, an extended Kalman filter, was used.
Computer simulations have shown that tracking of the maneuvering air target by the seeker being studied, using a Jacobian in a closed-loop control, is more precise than using the classical PID control method. The results also confirm the effectiveness of the developed method of filtering the signals received by the optoelectronic system of the presented seeker. After applying the vector selection of signals and Kalman's linear filter, we can clearly see a significant improvement in the stability of the trajectory of seeker axis motion.
In further research, statistical results will be presented and analyzed, which will be compared with the results obtained in this article. Moreover, in the future, it is planned to conduct research on the use of a more powerful filter, the "unscented Kalman filter", which was widely discussed in articles [47][48][49][50][51].