State prediction equation for Kalman filter

Click For Summary
SUMMARY

The discussion focuses on implementing a Kalman filter using a state prediction equation derived from a transfer function, specifically W(s) = 4s/(4s+1). The user successfully identified the state space representation matrices A, B, C, and D using MATLAB, with A = -0.25, B = 1, C = 1, and D = 0. The conversation emphasizes the importance of understanding linear algebra and the covariance matrix of noise for effective filtering. Additionally, the user aims to simulate height changes from barometric pressure data using the Kalman filter, highlighting the need for clarity on the transfer function's role in this context.

PREREQUISITES
  • Kalman filter fundamentals
  • State space representation
  • MATLAB for matrix calculations
  • Linear algebra concepts
NEXT STEPS
  • Learn how to derive state space models from transfer functions
  • Explore MATLAB functions for Kalman filter implementation
  • Study covariance matrix estimation techniques
  • Investigate the relationship between transfer functions and state prediction equations
USEFUL FOR

Engineers, data scientists, and programmers interested in implementing Kalman filters for data filtering and state estimation in dynamic systems.

evol_w10lv
Messages
70
Reaction score
0
I have to filter data with Kalman filter. I know process error covariance Q and measurment error covariance R. Problem is with state transition matrix A, control matrix B and observation matrix H.

First of all, data goes through this transfer function:
##W(s) = \frac{4s}{4s+1}##
I can't get it how to write state prediction equation from transfer function. Maybe to write state prediction equation for Kalman filter, I need to write state space representation like HERE?
 
You need to first find out what your A,B,C, and D matricies are.
It can help to generate a block diagram of your system with the proposed measurements (ie kalman filter)
 
  • Like
Likes   Reactions: evol_w10lv
If you are working with kalman filters, you should be able to translate a transfer function to matrix form no problem. If not, you need to take a very good look at linear algebra
 
  • Like
Likes   Reactions: evol_w10lv
Sorry for late response.
I don't work in the engineering sector. I prefer programming. I am familiar with Kalman filter in programming level. Here my problem is in basics of engineering.
I found out ##A, B, C, D## with MATLAB built in function:
##x(k+1)=-0.25*x(k) + 1*u(k)##
##y(k)=1*x(k)##
##A= -0.25, B = 1, C = 1, D = 0##
Let's say I want to simulate filtering data from barometer with Kalman filter, then calculate change of height, derive it to get vertical speed. It's just imitation.. no real device.
My idea was to generate random pressure data from barometer, then calculate height using formula and use Kalman filter with parameters:
$$ A = \begin{bmatrix}
1 & dt \\
0 & 1 \
\end{bmatrix}
H=
\begin{bmatrix}
1 \\
0
\end{bmatrix}
$$
But there isn't transfer function inculded. It's not clear what are functions of TF in this case. Is it shows how barometer data changes in each iteration? So no need to use random pressure data (but use data from TF if I give initial value before) or ...?
 
evol_w10lv said:
But there isn't transfer function inculded. It's not clear what are functions of TF in this case. Is it shows how barometer data changes in each iteration? So no need to use random pressure data (but use data from TF if I give initial value before) or ...?
To be honest I have no idea what you are asking?
You already listed the transfer function W(s) above. Why are you asking me what it is?
You should have some idea of the covarience matrix of your noise. If you don't, you need to work on your model before you can make a measurement filter

You worked out what the A and B matrixes are. You should now be able to calculate your state and covarience predictions.

Then you can calculate your observations, then update the values to use in the next iteration.
 

Similar threads

  • · Replies 2 ·
Replies
2
Views
4K
  • · Replies 1 ·
Replies
1
Views
2K
  • · Replies 6 ·
Replies
6
Views
3K
  • · Replies 2 ·
Replies
2
Views
2K
Replies
9
Views
7K
  • · Replies 6 ·
Replies
6
Views
4K
  • · Replies 1 ·
Replies
1
Views
9K
Replies
2
Views
2K
  • · Replies 1 ·
Replies
1
Views
1K
  • · Replies 3 ·
Replies
3
Views
3K