# State prediction equation for Kalman filter

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?

Thanks for the post! This is an automated courtesy bump. Sorry you aren't generating responses at the moment. Do you have any further information, come to any new conclusions or is it possible to reword the post?

donpacino
Gold Member
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)

• evol_w10lv
donpacino
Gold Member
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

• 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 ...?

donpacino
Gold Member
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.