An anomaly affected discrete LTI systems: a moving horizon approach for estimating position and temperature measurements

A real-time system may be subjected to various anomalies that can affect the quality of the observations. The main motivation of the article arises from the need in addressing challenges posed by the presence of anomalies in discrete linear time-invariant (LTI) systems with a focus on the estimation processes, in the context of position and temperature measurements. The proposed approach leverages the properties of discrete LTI systems and takes advantage of the predictive capabilities of the moving horizon strategy (MHS). It operates recursively updating estimates of new measurement while fairly considering its past estimates that occur within the window of the moving horizon. The estimation framework will be designed to handle disturbances and provide robust estimates, to ensure the effectiveness of the system. In order to validate the proposed approach simulation studies were conducted on different and only scenarios in different order LTI system. Comparative studies with different estimation techniques demonstrate the capability of the proposed approach in terms of performance and efficiency. The proposed approach can be applied to systems with changing system dynamics. Future research may be conducted to utilize this strategy in other domains to mitigate anomalies while enhancing performance.


Introduction
The discrete linear time-invariant (LTI) system accepts a sequence of discrete inputs, linearly processes them, and outputs a sequence of discrete outputs.It is a mathematical representation of the behaviour of a system, the behaviour of which is exclusively governed by its inputs and outputs, both present and past [1].This indicates that the system's behaviour is linear and time-invariant, and it is independent of present-day inputs or outputs.When a system is linear, it indicates that it fulfils the superposition principle, which states that if an input is a linear combination of numerous other inputs, the corresponding linear combination of the outputs produced by each individual input will be the output [2].These systems are time-invariant, which implies that their behaviour remains constant across time.As a result, if the input signal is advanced in time, the output signal will also be advanced by the same amount of time [3].Digital signal processors, control systems, and filters are a few examples of discrete LTI systems.Applications for these systems include robotics, image processing, and audio processing.Digital signal processing, communication systems, control systems, and audio processing are all applications of discrete LTI systems [4].
A deviation or irregularity in the behaviour of the system that cannot be explained by the system's mathematical model is referred as an anomaly in discrete linear time-invariant systems [5].These anomalies can be brought on by a number of things, such as measurement mistakes, outside disturbances, system nonlinearities, and model restrictions [6].When an anomaly happens, the system may exhibit unexpected behaviour or make inaccurate predictions, which may cause users to make poor decisions or take inappropriate actions based on the output of the system [7].Many methods, including as statistical analysis, machine learning algorithms [8], and adaptive control strategies, can be used to identify and manage anomalies in discrete linear time-invariant systems.These methods can assist in determining the root causes of the abnormalities, making real-time corrections for them, and enhancing the output of the system's correctness and dependability [9].
The moving horizon strategy is a type of control that makes use of a dynamic model of a system to forecast future behaviour and optimize control actions over a limited amount of time [10].It is a dynamic optimization method for resolving optimization issues with time-variant constraints.The approach entails segmenting the issue into more manageable sub-problems, each with a shorter time horizon, and resolving them one at a time [11].By adding new restrictions and deleting existing ones, new sub-problems are created as the time horizon extends.The decision variables are updated for the following time horizon using the solution found in the time horizon [12].
To find the optimum solution for a specific set of constraints, it continually updates a finite time horizon of the future.To determine the control actions, an optimization problem that attempts to minimize a cost function while considering system restrictions must be solved [13].Over the course of the horizon which is finite in nature, the problem of optimization is repeatedly resolved, and during every step of time, the system is subjected to the first control action while a fresh calculation is calculated on the problem of optimization and built subject to changes in the state of the system [14].
The fundamental principle of Moving Horizon Estimation (MHE) is to predict the system's response to a control action over a finite time horizon and to optimize the control action to achieve the desired performance while taking into consideration the system's restrictions.A cost function that penalizes deviations from desired set points, control effort, or other performance measurements can be used to formulate the optimization problem [15].Due to its capacity to manage system limitations and nonlinear dynamics, MHE is frequently utilized in the process control, robotics, automotive, and aerospace industries [16].In systems with rapid actuators and slow dynamics, where the control action must be carefully planned to prevent overshoots and other undesirable effects, it is very helpful [17].It helps to optimize the use of resources by enabling decisionmakers to modify their plans and strategies in real-time in response to shifting circumstances.The method is often referred to as "reclining horizon control".MHE does have some drawbacks, though.The computational difficulty of tackling the optimization problem, which can be prohibitively expensive for large-scale systems [18] or high-frequency control applications, is one of the key challenges.Moreover, MHE calls for precise system dynamics models, which might be challenging to come by in real-world applications [19].Finally, MHE might not function well when the control objectives or system dynamics are constantly changing.
The establishment of accurate geodesic coordinates in a common Earth-wide coordinate system is a significant scientific problem with a very evident application in daily life [20].Nowadays, multi-satellite global positioning systems can be used to successfully resolve this issue for the majority of those practical difficulties.The effectiveness of the grouping of global positioning satellites is supported by ongoing measurements of each satellite's orbital parameters, and it necessitates accurate determination of the satellite's spatial position that is on par with measurements made using ground coordinates [21].

Contributions of the proposed manuscript
(i) The propose method operates recursively updating estimates of new measurement while fairly considering its past estimates that occur within the window of the moving horizon.(ii) MHE approach effectively handles nonlinearities and anomalies in GPS position estimation by employing a moving horizon optimization scheme.(iii) A Kalman filter is used to determine the real temperature data from the noisy observations when random outliers are added to the simulated temperature measurements.

Organization of the paper
The paper is organized as follow.The related works on position and temperature measurements for anomaly affected discrete LTI systems are covered in section 2.
In section 3, the proposed methodology is explained.
The section 4 presents an experimental analysis of the proposed work.The conclusion part of the research is finally displayed in section 5 with future directions.

Literature review
To effectively characterize the temporal dependence among contaminated data, propose TopoMAD, a stochastic seq2seq model in [22].To aggregate measures from various component and use sliding window over metrics continually obtained to represent temporal dependence, authors add system topological information.A cluster analysis technique was presented in [23] for finding anomalies.The process condenses the data collected through the automation system to selected unique operational patterns.Visualizing such unique patterns, can help energy managers to find as well as understand abnormalities.A novel dictionary learningbased ML approach for anomaly identification was presented in [24] for telemetry time data.The technique can handle simultaneously processed mixed discrete and continuous values, allowing potential correlations between these parameters to be captured.A methodology for general-purpose anomaly detection that focuses on micro-services architectures and uses spatial service query traces and temporal service execution logs was proposed in [25].It is compatible with well-performing LSTM models, doc2vec and tracing matrices, and unsupervised anomalies identification techniques, but is not confined to them.Data obtained from real-time physical process is tested in the model in [26].The detection of anomalies in time-series that are represented by two-state variables has not yet been the subject of any investigations.A novel technique for the analysis of multivariate electroencephalogram (EEG) signals abnormalities is presented in [27].The authors evaluate the EEG data for patterns and anomalies using the Koopman operator theory, a mathematical framework for studying dynamical systems.The authors point out the drawbacks of these strategies, such as their reliance on pre-made models, and suggest using the Koopman operator theory as a substitute strategy.The authors in [28] suggests unique hybrid convolutional auto encoder architecture for unsupervised anomaly detection in log file system.The need for labelled data, sensitivity to data preparation and inability to handle complicated temporal correlations are just a few of these techniques' drawbacks that the authors point out.The performance of unsupervised anomaly identification in log files is enhanced by the hybrid CAE-VAE architecture that has been proposed.
Support Vector Regression (SVR) algorithm-based framework for real-time anomaly identification for commercial aviation safety monitoring is discussed in [29].The dataset is preprocessed to address sampling rate and noise concerns that limit direct use of historical flight data.After performing correlation-based feature subset selection, the feature is then used to train a SVM (support vector machine) that forecasts flight performance.A cutting-edge method for filtering systems vulnerable to impulsive measurement anomalies is discussed in [30].To ensure that the filter output remains confined inside a specified region despite the presence of impulsive measurement outliers, the approach makes use of an eventually bounded constraint.The problem of filtering systems vulnerable to impulsive measurement outliers which significantly reduce performance and cause instability, is introduced in the beginning of the work.A unique method for finding anomalies in time series data using a fine-grained Markov model is suggested in [31].The method entails creating a Markov model for each of the time series' data's individual granules after breaking it into a collection of chunks.The method is assessed using a number of realworld datasets and contrasted with other cutting-edge anomaly detection techniques.
A live anomaly detection technique called GPR which stands for Gaussian process regression and GA which stands for genetic algorithm is described in [32] to effectively identify an anomalous condition.Using GPR, to build the normal output range, the DC/DC output signal is mapped, and seven statistical factors are taken into account as the detection indices.Algebraic state space theory (ASST) is an approach that uses the semi-tensor product (STP), which is a matrix analysis tool.ASST can be applied to dynamic systems, finite-valued systems, and discrete dynamic systems.The application of ASST to the field of finite state machines (FSMs) is discussed in [33].The application is reviewed in various categories, like deterministic, nondeterministic, probabilistic, networked and controlled FSMs.

Research gap
The work that has been presented still has some unresolved concerns.For example, to obtain estimates for general discrete-time linear systems with time variations, the method is simply can be expanded.The work can be extended in the future by concentrating on developing and expanding the suggested method to estimation for higher order nonlinear systems and in the presence of multiple anomalies.

Methodology
A series of discrete inputs are received by the discrete linear time-invariant (LTI) system, which then linearly processes the sequence of inputs to produce a series of discrete outputs.It is a mathematical depiction of a system's behaviour, which is solely determined by its inputs and outputs -past and present.A system is said to be linear if it satisfies the superposition principle, which says that if an input is a linear combination of many other inputs, then the output will be the equivalent linear combination of the outputs generated by each individual input.Because these systems are time-invariant, their behaviour is assumed to be constant over time.Because of this, the output signal will advance by the same length of time if the input signal advances in sync.A discrete LTI system's block diagram representation is depicted in Figure 1.It consists of blocks that stand in for mathematical operations such as multiplication, addition, and delay.The system receives the input signal, the blocks process it, and then the output signal is produced.
This mathematical equation represented in (1) can be used to depict a discrete LTI system.At time n, y[n] denotes the output, x[n] is the input and a, b are the coefficients that control behaviour system.The temperature response of a heater to variations in the applied power is modelled using a first-order dynamic system.The system uses a transfer function of the following shape to connect the input signal (heater power) to the output signal (temperature) In the above Equation ( 2), the Laplace variable is represented by "s", whereas the gain of the system is defined by "K", and "T" represents the time constant.The system's response time to input signal changes is measured by the time constant.When the time constant is larger, the reaction is slower and when it is smaller, the answer is faster.The input signal for this system is a linearly spaced vector of 30 values in the range of 0-50, which represents the supplied power to the heater.By simulating the system's reaction to the input signal, the output signal is calculated.
The equation for the noiseless pseudo-range ρ, in GPS is as follows: Based on Equation (3), the time as indicated by the receiver's clock is termed as receiver's clock time which is denoted by t r , the term receiver clock bias denoted by Δt r would refer to the distinction between the values of GPS time in s and receiver clock time.Time of the signal transmission by the transmitter refers to the time at which the signal was transmitted as measured by the GPS satellite's clock which is denoted by t t , Transmitter clock bias denoted by Δt t refers to the difference between GPS time and the clock of a GPS satellite, Light-speed limit is denoted by c is the equivalent of speed of light in vacuum.The distance between the GPS receiver satellite, as determined by the arrival time of signal, is known as the pseudo-range.Unfortunately, the actual range measurement is impacted by a variety of inaccuracies and noise sources.Hence, the pseudorange is a guess at the genuine range and could be inaccurate.The geometry of the satellite constellation or the location of the receiver is not taken into consideration by the pseudo-range equation, which merely provides an approximation of the distance between the GPS receiver and the satellite.A GPS receiver must measure the pseudo-ranges to several satellites and solve for its position using methods like trilateration or multilateration in order to determine its exact location.The following gives the measurement vector equation for GPS pseudo-range: In the Equation (4), ρ is the observed pseudo-range between the GPS receiver and satellite, dt refers to error of receiver clock, which represents the distinction between the GPS clock time of receiver's and the GPS satellite's clock time, is the measurement error, which includes errors caused by atmospheric effects, P refers to the position of the GPS satellite at a known system of coordinates, X is the GPS receiver position in the same coordinate system, whereas c refers to light speed in vacuum.Because it does not account for the signal's temporal delay as it travels through the atmosphere, which can lead to measurement mistakes, the pseudo-range is known as "pseudo."Other measurements, such as differential or precise-point positioning methods, are utilized to account for this.Moving Horizon Estimation (MHE) is a technique used to estimate how a system will react to an action being controlled over a finite time horizon and optimize the control action to maximize performance while accounting for system constraints.MHE is superior to conventional control methods in a number of ways.It can manage system restrictions including input caps, state caps, and safety restrictions.Also, a wide variety of performance requirements, including set point tracking, disturbance rejection, and energy efficiency, can be incorporated.It can also manage uncertain systems, time-varying systems, and nonlinear dynamics.There are five basic steps in the MHE algorithm for discrete-time linear system with measurements subjected to anomaly.Defining the system model in terms of state, input, and output variables is the first stage in MHE.The linear difference equations of the following kind can be used to represent this model: In Equation ( 5) and ( 6), A, B, and C are the indication of the system dynamics, w(k) is termed as the noise included in the process, and v(k) is the noise mdf measurement, and the state vector is represented by the termed x(k), whereas the input vector is defined by the term u(k), and lastly output vector can be represented by the term y(k).The objective function can be defined at the second phase.Subject to a set of restrictions, blur the line between the estimated state and the measurements, the goal function is used in MHE.The following is how the objective function is stated: In Equation (7) if R (i|k) denotes the noise measurement covariance matrix at time i and Q (i|k) denotes the process noise covariance matrix, N denotes the prediction horizon.The constraints must then be defined.The MHE constraints make sure that the estimated input and state trajectories are in line with the system model.The limitations are expressed as follows in Equations ( 8)-( 10): x(k|k) = x (10) where x represents the state vector's initial estimation.
In order to address the optimization problem, objective function is minimized using the MHE technique while taking the limitations into consideration, using a numerical optimization approach.An estimation of the state and input trajectories over the prediction horizon is provided by the best solution.The estimation updating process is then completed.After the optimization issue has been solved, the best solution is used to update state vector estimation at time k.The estimate is then used as the starting point for the algorithm's following iteration.For each new measurement, the MHE algorithm is run again, this time estimating the state and input trajectories over the prediction horizon using a sliding window of recent data.A first-order system is a common system type in the likes of control theory and engineering, where the output and input are connected by a first-order differential equation.A system of this nature can be used to simulate a variety of physical and artificial systems, such as temperature systems, chemical processes, electrical circuits, and more.The parameters of a statistical model are estimated using sequential data using the recursive estimating approach.If new data become available, the estimations must be updated.Traditional recursive estimation techniques, however, can be extremely susceptible to anomalies in the presence of anomalies and result in erroneous estimations.Here, we talk about simulating location estimation when LTI system anomalies taint the pseudo measure (Figure 2).
The system is modelled as shown by Equations ( 11) and (12).where As shown in Equation ( 11), b is the clock bias, and vi is an unidentified pseudo-range measurement noise that is zero-mean Gaussian, with the exception of anomalies, which are unpredictable and have an unidentified and very high covariance.The state's definition is as follows The velocities are represented in vx, vy, and vz as shown in (13), whereas the clock drift is represented as d, when a position is represented in x, y, and z coordinates.Here, a case where the assessment of position is paired with a fictitious range measurement is taken into consideration.Let's define the covariance matrix as: S g T (16) As represented in Equations ( 14)-( 16), where the power spectral densities for frequency drift noise, clock bias noise, and speed noise, respectively, are Sg, Sf, and Svx.The initial values of X and f (.) are selected, and the measurement noise covariance R is set.The MHF (moving horizon filter) configuration with additive running criterion is the same as what is shown in [34].

Results and discussion
MHE approach effectively handles nonlinearities and anomalies in GPS position estimation by employing a moving horizon optimization scheme.It can adapt to dynamic and uncertain environments, resulting in improved robustness and accuracy.Traditional estimation methods may struggle to handle significant nonlinearities and anomalies, leading to less accurate estimates and potential divergence in challenging scenarios.MHE takes into account measurement noise and model uncertainties within the optimization framework, making it more robust in the presence of noisy GPS measurements and other uncertainties.
The predictive nature of MHE enables it to consider multiple measurements over a finite horizon, leading to more accurate estimates, particularly in cases where anomalies and disturbances are present.Traditional estimators might suffer from reduced accuracy in dynamic and uncertain environments due to their reliance on linearization assumptions and limited consideration of past measurements.The computational complexity of MHE can be higher compared to Kalman Filters.However, advancements in optimization techniques and hardware capabilities have made real-time MHE implementation feasible in many practical applications.Kalman Filters generally have lower computational requirements, making them more attractive for systems with stringent computational constraints.MHE's moving horizon approach enables it to adapt to changing system dynamics and constraints, making it flexible for various GPS position estimation scenarios.MHE approach will be designed to be suitable for real-time applications, making it ideal for time-critical GPS position estimation tasks, such as autonomous vehicles or real-time tracking systems.The predictive nature of MHE enables it to consider multiple measurements over a finite horizon, leading to more accurate estimates, particularly in cases where anomalies and disturbances are present.The positioning estimation with anomalies is shown in Figure 3 for a period of 25 s.The estimation solves x t−N,t = x k(t) t−N , where k * t argminJ k t (x t−N,t ) for k = 0, 1, . . .N + 1.For the duration of 25 s, we replicate the pseudorange and satellite position of a GPS receiver at a fixed point.At receiving time t = 9 s, a pseudo-range measurement has a synthetic anomaly added to it.The window size N is 4 and the tuning parameter µ is 0.6.The simulation run T is taken as 25.The case in which the pseudo range measurements are contaminated by anomalies is shown in Figure 4 for a case of a synthetic anomaly with a random value and fixed position at t = 9s.The result of simulation shows that the proposed moving horizon filter is more robust to anomalies still the effect of anomalies is observed for the measurements following the time step of the anomaly occurrence, which can be improved with more simulation runs and careful choice of the tuning parameter.
A Kalman filter is used to determine the real temperature data from the noisy observations when random outliers are added to the simulated temperature measurements.The observation matrix and transfer function of the Kalman filter (KF) are used to map the system dynamics to the measured temperature.First-order linear system and then uses a moving horizon filter (MHF) to estimate the temperature measurements.The RMSE between the true and estimated measurements is calculated, and the true and estimated measurements are plotted along with the measurements with outliers.The filter's effectiveness in estimating the states of a linear dynamic system is shown in the KF graph for first order linear system.
The performance metrics such as robustness, accuracy, convergence, cost function, efficiency, and complexity are explicitly calculated.Figure 5 shows the output signal with and without outliers, and then applies a KF to estimate the system state from output signal with noise also shows linear temperature estimation.To assess the filter's effectiveness, the output is compared to the original output signal.
A variant of the KF, the Extended Kalman Filter (EKF), handles non-linear systems by linearizing them at each time step.From the noisy output signal, EKF is used to infer the system's state.The time updates are calculated to predict the next state of the system, and the measurement update is calculated to adjust the state estimate based on the latest measurement.The true and estimated measurements are plotted along with the measurements with outliers.The filter's effectiveness in state estimation of linear and non-linear dynamic system is seen in the KF graph for first order linear systems.The specifications of the filter, such as its computational efficiency, complexity, cost and convergence are analysed.A variety of applications for the EKF include, including control systems, navigation, and signal processing.However, the EKF's performance may degrade if the system is highly non-linear or if the noise statistics are unknown.It identifies the difference between the Extended Kalman Filter's estimated output signal (temperature) and the actual output signal (temperature).
The discrepancy between a model's projected values and the actual values is measured by RMSE (Root Mean Square Error).It is frequently used to assess a regression model's precision.Because it estimates the typical error between the actual values of measurements and predicted values of measurement, RMSE is important.The Table 1 shows that the above suggested model offers a practical technique for lowering RMSE values.The system seems to be efficient in comparison (Figure 6).
To determine the control action at each time step in the moving horizon technique, an optimization algorithm is used.The control strategy's performance in controlling the output of a linear dynamic system is shown in the graph of first order linear systems employing moving horizon method.The specifications of the strategy, such as its ability to track setpoints, robustness to disturbances, and control effort, can be analysed from the graph.It is well suited for systems with constraints on the inputs or outputs and can handle both steady-state and transient behaviour.The optimization algorithm chosen, the control parameters chosen, and the precision of the system model may all have an impact on how well the strategy performs.
As seen in the Table 2, the proposed model offers greater accuracy when compared to the EKF mechanism.Robustness refers to the ability of a system or process to remain stable and perform consistently      even in the presence of unexpected or challenging conditions.The system seems to be more robust in comparison (Figures 7 and 8).
The MHF algorithm is compared to other estimation algorithm namely the Kalman Filter (KF) and the Extended Kalman Filter (EKF) in terms of computing efficiency.Second-order nonlinear systems refer to systems of differential equations with second-order derivatives that also contain nonlinear terms.Secondorder systems are those that involve second-order derivatives of the output, while nonlinear systems are those that cannot be represented as a linear combination of input and output.The lowest-order system capable of oscillating in response to a step input is the second-order system.Two distinct and separate types of energy storage are required by second-order systems with possible oscillatory responses.The Figure 9 shows the temperature estimation in second order linear systems using KF, and MHS.From the Tables 1-3 it can be evaluated that proposed system provides better performance for first order linear systems.

Conclusion
We have developed a unique method based on a moving-horizon strategy, for which stability and robustness have been shown, to handle the issue of position and temperature estimation for both types of systems namely linear and nonlinear which contains measurements impacted by anomalies.MHE is a well-established method in control and estimation, its specific application to GPS position estimation is innovative.By formulating the GPS position estimation as an optimization problem, MHE is harnessed to leverage real-time measurements, constraints, and prediction models, leading to a robust and accurate position estimation in GPS navigation.The paper demonstrates the viability of implementing MHE in real-time systems, emphasizing its potential to deliver accurate and dynamic position estimates.The effectiveness of the proposed strategy has been shown through simulations, where a slight increase in computational load is required to compensate for the improved robustness to anomalies and increased estimation precision.The method is intended for usage in a variety of scenarios, including those involving nonlinear sensor use and data quantization for rate-limited network transmission.

Figure 5 .
Figure 5. (a) First order linear temperature estimation using KF (b) First order linear temperature estimation using MHF.

Figure 6 .
Figure 6.(a) First order nonlinear temperature estimation using EKF (b) First order nonlinear temperature estimation using MHF.

Figure 7 .
Figure 7. (a) First order linear temperature estimation using MHF (b) First order nonlinear temperature estimation using MHF.

Figure 8 .
Figure 8.(a) First order linear KF and (b) Second order linear KF.

Figure 9 .
Figure 9. Second order linear system using MHF.

Table 1 .
Comparison of performance evaluation of MHS with KF in first order linear system.

Table 2 .
Comparison of performance evaluation of MHS with EKF in first order nonlinear system.

Table 3 .
Comparison of performance evaluation of MHF with KF in second order linear system.