Estimation of Sensor Temperature Drift using Kalman Filter

DOI : 10.17577/IJERTV3IS20455

Download Full-Text PDF Cite this Publication

Text Only Version

Estimation of Sensor Temperature Drift using Kalman Filter

Nikhina Mariyam Rajan

PG Student

Department of Electronics and Instrumentation Engineering Karunya University, Coimbatore

  1. Rajalakshmy

    Assistant Professor

    Department of Electronics and Instrumentation Engineering Karunya University, Coimbatore

    Abstract – The aim of this paper is to minimize the sensor noise in a temperature process station. Kalman filter is an optimal estimator that provides an efficient computational means to estimate the state of a process. The designed Kalman filter algorithm will minimize the noise and extract the true value of the process. The Kalman filter uses the two key features such as PREDICTION and UPDATION to give the optimal output. The thermocouple reading which is corrupted by Gaussian noise can be presented to the Kalman filter algorithm. The estimated value is compared with the true value, by computing the Integral Absolute Error (IAE)

    Keywords: Kalman filter, EKF, Sensor Drift, Lab VIEW, Optimal Estimator, Filtering.

    1. INTRODUCTION

      The Kalman filter is an optimal estimator that can estimate the variables of a wide range of processes. Kalman filter also estimates the states of a linear system. The Kalman filter is theoretically attractive because apart from all possible filters, it minimizes the variance of the estimation error. Kalman filters are implemented in control systems because in order to control a process, it is required that an accurate estimate of the process variables.

      Filtering is desirable in many situations in engineering and embedded systems. For example, many radio communication signals are corrupted with noise. A good filtering algorithm can be used to remove the noise from electromagnetic signals while retaining the useful information. Another example we can consider is power supply voltages. Filtering, the ability to selectively suppress or enhance particular parts of a signal is perhaps the most important tool for signal processing.

      The analog filter prototypes are the most common used method in order to transform analog to discrete time signals. In noise cancellation technique, various techniques are available. One of them is Bayesian filter. Bayesian filtering uses the available noisy observations to estimate the system state. A Bayesian filter uses prediction-correction technique. The time update model describes how the state updates from one time sample to the next. The measurement model

      describes how the observed data is related to the internal state of the system. This approach overcomes the major limitation of the adaptive filtering technique. Adaptive filtering is a commonly used method in biomedical signal processing in order to remove the unwanted recorded artifacts that contaminate the desired measured physiological signals. An adaptive filter will modify its filter coefficients according to a given optimization algorithm in order to remove the undesired noise from a recorded signal. The filter utilizes additional external sensors as a reference for the added noise with the assumption that the added artifact and the desired signal are uncorrelated. Thus the filter will remove all its artifacts from the recorded signals by using the reference to the artifact input. Thus, the choice of reference is of very important when utilizing the adaptive filter technique. The algorithm is very simple to implement and it doesnt requires any calibration but the requirement of a reference signal and additional sensors increases the hardware costs. The decision of adaptive algorithm is dependent on the computational resources available to the system in operation. The Bayesian filter technique does not require any reference to be used and additional sensors.

      Kalman filter operates on a prediction-correction technique. The Kalman filter has two layers of calculations; time update equations and measurement update equations and these equations require a prior knowledge of the process and measurement models. One of the main assumptions of the Kalman filter is that the initial uncertainty is Gaussian and that the system dynamics are linear functions of the state. As most systems are not strictly linear the other form of Kalman filter is used that is Extended Kalman Filter. The Kalman filter main advantage over other methods is in the computational efficiency of the algorithm due to its efficient use of matrix operations allowing for longer real-time artifact removal.

    2. KALMAN FILTER

The kalman filter was developed by Rudolph Kalman, although Peter Swerling developed a very similar algorithm in 1958. The filter is named after Kalman because he published his results in a more prestigious journal and his work was

more general and complete. Sometimes the filter is referred to the Kalmam-Bucy filter because of Richard Bucys early work on the topic, conducted jointly with kalman [2].

The Kalman Filter (KF) is the best possible optimal estimator for a large class of systems with uncertainty and a very effective estimator for an even larger class. it is one of the most well-known and often-used tools for so called stochastic state estimation from noisy sensor measurements. On certain assumptions, the KF is an optimal, recursive data processing or filter algorithm [7].

  • The KF is optimal, because it can be shown that, under certain assumptions; the KF is optimal with respect to virtually any criterion that makes sense for example the mean squared error. Kalman filter assumes a multivariate Gaussian distribution [5]. One of the reasons the filter performs optimally is because it uses all available information that it gets. It does not matter about the accuracy it just an overall best estimate of a state, i.e., the values of the variables of interest. The KF is recursive, which brings the useful property that not all data needs to be kept in storage and re-processed every time when for example a new measurement arrives.

  • The KF is a data processing algorithm or filter, which is useful for the reason that only knowledge about system inputs and outputs is available for estimation purposes. A filter tries to obtain an optimal estimate of variables from data coming from a noisy environment.

The filter also supports in the estimations of past, present and also the future states, and it can do so when the precise nature of the modeled system is unknown. Mathematically, the filter estimates the states of a linear system. The gain, noise covariance and prediction covariance are assumed initially. Using these values, the Kalman gain has been calculated and it predicts the estimated value to update the co variances. The estimates produced by this method makes the true values equal to the original measurements. Figure 1 shows the concept of Kalman filter

Figure1: Concept of kalman filter

The Kalman filter uses a system's dynamics model, known control inputs to that system, and measurements (such as from sensors) to form an estimate of the system's varying quantities (its state) that is better than the estimate obtained by using any

one measurement alone. Hence, it is a common sensor fusion algorithm.

    1. The Kalman Filter Algorithm

      The Kalman Filter is a state estimator which produces an optimal estimate in the sense that the mean value of the sum of the estimation errors gets a minimal value. The Kalman Filter gives the following sum of squared errors:

      x

      x1

      E [e T (k) ex (k)] = E [e 2 (k) ++exn 2 (k)] a minimal value. Here,

      ex (k) = x est (x) x(k)

      is the estimation error vector. (The Kaman Filter estimate is sometimes denoted the least mean-square estimate). This assumes that the model is linear, so it is not fully correct for nonlinear models. It is assumed that the system for which the states are to be estimated is excited by random (white) disturbances (or process noise) and that the measurements (there must be at least one real measurement in a Kalman Filter) contain random (white) measurement noise.

      The Kalman Filter has many applications, e.g. in dynamic positioning of ships where the Kalman Filter estimates the position[3] and the speed of the vessel and also environmental forces. These estimates are used in the positional control system of the ship. The Kalman Filter is also used in soft- sensor systems used for supervision, in fault-detection systems, and in Model-based Predictive Controllers (MPCs) which is an important type of model-based controllers.

      The Kalman Filter algorithm was originally developed for systems assumed to be represented with a linear state-space model. However, in many applications the system model is nonlinear. Furthermore the linear model is just a special case of a nonlinear model. Therefore, I have decided to present the Kalman Filter for nonlinear models, but comments are given about the linear case. The Kalman Filter for nonlinear models is denoted the Extended Kalman Filter (EKF) because it is an extended use of the original Kalman Filter. However, for simplicity we can denote it the Kalman Filter, dropping extended in the name. The Kalman Filter will be presented without derivation.

    2. Kalman Filter State Estimation

      1. This step is the initial step and the operations here are executed only once. Assume that the initial guess of the state is xinit. The initial value xp(0) of the predicted state estimate xp (which is calculated continuously as described below) is set equal to this initial value:

        Initial state estimate xp(0) = xinit

      2. Calculate the predicted measurement estimate from the predicted state estimate:

        Predicted measurement estimate: yp(k) = g [xp(k)]

      3. Calculate the so-called innovation process or variable it is actually the measurement estimate error as the difference between the measurement y(k) and the predicted measurement yp(k):

        Innovation variable:

        e(k) = y(k) yp(k)

      4. Calculate the corrected state estimate xc(k) by adding the corrective term Ke(k) to the predicted state estimate xp(k):

        Corrected state estimate: xc(k) = xp(k) + Ke(k)

        Here, K is the Kalman Filter gain. The calculation of K is described below.

      5. Calculate the predicted state estimate for the next time step, xp (k + 1), using the present state estimate xc (k) and the known input u(k) in process model:

        Predicted state estimate: xp (k + 1) = f [xc(k), u(k)]

    3. Flowchart Of Kalman Filter

Figure 2 shows the flowchart of Kalman filter. Initially, the noise covariance and prediction covariance are assumed. The Kalman gain is calculated then the innovation error is been calculated. Using Kalman gain obtained and initialized noise covariance[3] the priori covariance estimate is done. The priori estimate is performed using the Kalman gain, innovation vector and initial state of the system. The new system is formed by updating the posterior estimate and posterior covariance estimate. The settling point is been checked- if yes the settling point remains the same otherwise the state is increased and cycle is again repeated until the settling point is reached.

Figure 2: Flowchart for the Concept of Kalman Filter

    1. SYSTEM DESCRIPTION

        1. Block diagram:

          Figure 3: Block diagram of the proposed method

          In the proposed method, a Kalman filter is used inorder to minimize the noise[6] and extract the true value of the process. Here, the thermocouple reading which is corrupted by Gaussian noise is given to the Kalman filter algorithm as shown in Figure 3. The estimated value is compared with the set value, by computing the Integral Absolute Error (IAE).

        2. Process Description:

      Figure 4: Block Diagram of the Temperature Process

      In this process, the thermocouple senses the temperature and the output in mill volt range is amplified to 0-5 V. Then, the process temperature will be given to the PC where the process temperature and the set point is compared and the error will be given to the controller. The control signal produced by the controller will act as a gate pulse for the SCRs in the thyristor based power control circuit which will control the 230 V given to the heater as shown in the Figure 4. By controlling voltage given to the SCR from 0-5V the temperature of the air flowing through the process tube can be controlled from room temperature to 100C.

    2. RESULTS AND DISCUSSIONS:

      There has been a great amount of research work on the tuning of PI, PID controllers, since these types of controllers have been widely used in industries for several decades. Here, Zeigler Nichols tuning method is used for tuning the parameters of PI, PID controllers.

      The transfer function obtained from the open loop response

      Figure 5: Response of PI controller without using Kalman Filter

      Figure 6: Response of PI controller using Kalman Filter

      The Figure 5 and Figure 6 shows the front panel of a LabVIEW simulator of a temperature estimator. In this

      for the given temperature system is

      9.81

      225s 1

      e20s

      simulation the setpoint is varied and the Kalman filter estimates the correct steady state value without any noise.

      The state space parameters obtained for the process is A = -0.0014

      B = 1

      C = 0.04

      D = 0

      Thus the state space equation is, = -0.0014 x(t) + 1 u(t)

      y = 0.04 x(t)

      The tuning parameters obtained for PI controller are Kp=0.8868, Ki=0.01183 and for PID controller are Kp=1.182, Kd=13.29, Ki=0.0262.

      This section presents the results and discussion of the response when Kalman Filter is being used.

      Also the PI controller is replaced with a PID controller and the response is evaluated next.

      Figure 7: Response of PID controller using Kalman Filter

      While comparing the responses in Figure 6 and Figure 7, it is clear that the settling time has been significantly reduced. So PID controller has a better settling time when compared to the PI controller.

      4.1 Comparison:

      The comparison between the responses of the PID controller with and without Kalman filter is done based on the parameters as listed in Table1.

      TABLE I

      COMPARISON OF RESPONSES

      Parameters

      PID controller response(without Kalman Filter)

      PID controller response(with Kalman Filter)

      IAE

      1.996

      0.044

      Rise time

      30sec

      15 sec

      Settling time

      40sec (with noise)

      40 sec

      Hence it is concluded that, by using a Kalman Filter, the settling time is less, Integral Absolute Error is very less and the Rise time is also comparatively less.

    3. CONCLUSION AND FUTURE WORK:

Using the Kalman filter algorithm, the noise in the system was eliminated and the estimation of temperature was done. The tuned parameters of PID controller were used for simulation to find out the response. From the responses it is viewed that, by using Kalman filter the noise was minimized. The

parameters such as IAE, rise time and Settling time were compared for with and without Kalman filter and found that Kalman filter gives the better response.

The future work includes simulation and real time implementation of Kalman filter in the temperature process station in order to minimize the noise.

8. REFERENCES:

  1. Shimin Yin, Jin Hee Na, Jin Young Choi , Songhwai Oh.Hierarchical Kalman-particle filter with adaptation to motion changes for object Tracking, Science Direct journal of Computer Vision and Image Understanding 115 (2011)

  2. T.L. Chen, R.Z. You.A novel fault-tolerant sensor system for sensor drift compensation, Science Direct Journal of Sensors and Actuators A 147 (2008)

  3. Yan Lianga, De Xi Anb, Dong Hua Zhoub, Quan Pana. A finite-horizon adaptive Kalman filter for linear systems with unknown disturbances, Science Direct Journal of Signal Processing 84 (2004)

  4. P. K . Dash, R . K . Jena , G. Panda and Aurobindo Routray, An Extended Complex Kalman Filter for Frequency Measurement of Distorted Signals, IEEE Transactions On Instrumentation and Measurement , Vol.42, No. 4 , August 2000.

  5. Magdi S. Mahmoud , Nasser F. Al-Muthairi, S. Bingulac. Robust Kalman filtering for continuous time-lag systems, Science Direct Journal of Systems & Control Letters 38 (1999)

  6. Suwanchai sangsuk and Thomas e. bullock. Analysis of Continuous-time Kalman Filtering Under Incorrect Noise Covariances, International Federation of Automatic Control, Science Direct, 1988

Leave a Reply