Algorithm for detecting a change in the motion mode of an object moving along a complex trajectory

The present paper solves the problem of quick detection of a change in the motion mode of an object moving along a complex trajectory. The process of the object movement is described by a hybrid stochastic model. To solve the problem, a sequential probability ratio criterion is applied. A distinctive feature of the proposed algorithm is the ability to make decisions on a limited set of values of the likelihood ratio function. The results of numerical experiments confirm the efficiency of the developed algorithm.

In [14] the method of detection and identication of faults in the class of linear stochastic control systems in the ltering process, guaranteed by the probability of type I and type II errors, is obtained. With M possible modes of functioning of the system, the decision is made on a limited set containing M likelihood ratio function values.
In this paper, we propose the development of the idea of modeling and estimating the motion of an object along a complex trajectory using a hybrid stochastic model, which is a set of discrete linear stochastic models responsible for various pieces of the trajectory of an object motion [7] [16]. To solve the problem, the method obtained in [14] is used.

A model of an object motion along a complex tra jectory
Suppose that the trajectory of an object can be divided into separate suciently long pieces, on each of which its motion can be represented by a linear stochastic model that describes either a uniform linear motion or a uniform circular motion counterclockwise/clockwise (left/right turn) with a given radius.
Let us consider three models of this kind. Then the motion of the object along the entire trajectory can be described by a hybrid stochastic model: where k is a discrete time instance, p is the number of the motion mode, is the vector of motion parameters of the object, in which x 1 is the coordinate of the object along the axis Ox (m), x 2 is the velocity v x along the axis Ox (m/s), x 3 is the coordinate of the object along the axis Oy (m), x 4 is the velocity v y along the axis Oy (m/s). We write down all the matrices of the model (1).
• Uniform linear motion (the number of the motion mode p = 0): • Uniform circular counterclockwise motion with a given radius r 1 (the number of the motion mode p = 1) or uniform circular clockwise motion with a given radius r 2 (the number of the motion mode p = 2): cos ω 2 τ , Here the matrices B 1 and B 2 determine a left or right rotation, τ is the sampling period, ω 1 = |v s |/r 1 > 0, ω 2 = |v s |/r 2 > 0 is the angular velocity at the moment of the motion mode change, the module of the velocity vector |v s | • For all motion modes, the transfer matrix of discrete white noise w(k) ∼ N (0, Q) is The hybrid model (1) allows us to model the motion of an object along a complex trajectory using the algorithm described in [7].
Provided that only the spatial coordinates of the object are measured, the corresponding measurement model can be written as follows: where v(k) is the measurement error vector, v(k) ∼ N (0, R).

Detection of a change in the motion mode
Let us suppose that the moment of a possible transition of a system from one given mode to another is a priori unknown. Consider two motion modes (p = 0, 1). We assume that the initial state of the system corresponds to the nominal motion mode p = 0. It is necessary according to the measurement results Z(i) = [z(1), . . . , z(i)] T , i = 1, . . . , N , to conrm or deny the fact that the system switches to motion mode p = 1.
A solution to this problem can be obtained using Wald's sequential probability ratio test. The choice of two hypotheses is determined by the decision rule:    If λ k ≥ A, the test is completed with the choice of the hypothesis H 1 . If λ k ≤ B, the test is completed with the choice of the hypothesis H 0 . If A > λ k > B, the test is continued for the next k.
II. Filtering: The residuals and their covariance matrix are calculated as follows: However, since the possible moment of the motion mode change is a priori unknown, instead of one alternative hypothesis H 1 we have to introduce a set of hypotheses H 1 , H 2 , . . . , H i , which suggests a possible change in the motion mode at any given time from the beginning of the observation.
To solve the problem on a limited set of values of the likelihood ratio function, we use the following result: Theorem 1. [14] Let the moment of occurrence of a possible motion mode change in the system (1), (2) be a discrete random variable θ, uniformly distributed over the segment [0, i]. Then the ratio of the likelihood functions in the decision rule (3) is calculated by the expressions: Considering the fact that in an optimal lter each random residual vector ν j (i)|H p ν p j (i) is normally distributed with zero mean and covariance matrix Σ j (i)|H p Σ p j (i), calculated by equations (5) (subscript j means the discrete instance in time at which the lter F j starts working), we can rewrite the expression for ψ 1 j (k) as: , k ≥ j .

Numerical experiments
Let us carry out a computer simulation to verify the operability and eciency of the proposed algorithm. First, it is necessary to obtain model measurements data of the object coordinates when it moves along a certain trajectory. Let us simulate the data of trajectory measurements with the following motion scheme: the object moves rectilinearly and uniformly for the rst 20 cycles, then the object moves uniformly in a circular path for the next 20 cycles when turning right with a given turning radius r 2 = 5 m. The initial parameters of the object motion x = [0, 0, 0, 2] T , the covariances of the Gaussian noise in the state equation and in the measurement scheme are equal to Q = diag(0.001, 0.001) and R = diag(0.1, 0.1), respectively.
The computer simulation was carried out in Matlab. The results are presented in gure 1. It is seen that the likelihood ratio λ k crosses the upper threshold A, which means accepting the hypothesis of a change in the motion mode. The decision time took 12 discrete-time cycles. The obtained method of detecting a change in the motion mode of an object in the process of measurement data ltering is computationally ecient and guaranteed by the probability of errors of type I and II. It was assumed that the moment of change in the motion mode is unknown. The solution is based on the representation of the trajectory of the object motion by a hybrid stochastic model, the application of the Wald's sequential probability ratio test, and the Kalman ltering algorithm. The eectiveness of the method lies in the fact that the decision is made on a limited set of values of the likelihood ratio function. Further research will be aimed at solving the problem of identifying the motion mode of an object when the moment of changing the motion mode is unknown.

Acknowledgments
The study was carried out with the financial support of RFBR and the Government of the Ulyanovsk Region in the scope of scientific projects No 18-41-732001 and No 18-41-732003.