How to predict using state space model identified using system identification? (to be used in excel)

6 views (last 30 days)
Hello All, I am a beginner and I have used experimental data (4 inputs and 1 output) from an exothermic reactor to identify the model of the system. I used system identification tool and obtained the following state space model. However I am unable to use it effectively in excel. How do I do the step wise calculations in excel? I tried simplt substituting the values in an excel table, but I get no fit with actual values and the error keeps increasing exponentially!
x(t+Ts) = A x(t) + B u(t) + K e(t)
y(t) = C x(t) + D u(t) + e(t)
where,
A is
x1 x2 x3 x4
x1 0.99912 -0.0070421 -0.00031249 7.7892e-005
x2 -0.063971 0.83586 0.32571 -0.29828
x3 -0.021337 -0.074777 0.87549 0.53156
x4 -0.0010908 0.1197 0.061085 0.60444
B is
u1 u2 u3 u4
x1 1.7668e-007 -8.4364e-008 1.3983e-006 9.3092e-006
x2 -1.22e-005 6.8841e-005 0.0036294 0.0055134
x3 4.7894e-005 1.6459e-005 0.0055848 0.012066
x4 -3.8301e-005 8.3878e-005 -0.0018173 -0.0067679
C is
x1 x2 x3 x4
temp 866.56 -2.8526 -0.48543 0.3932
D is
u1 u2 u3 u4
temp 0 0 0 0
K is
temp
x1 0.0016648
x2 -0.2073
x3 -0.087051
x4 0.025893
and x(0) is
x1 0.088771
x2 0.27148
x3 -0.62389
x4 -1.4389
Estimated using N4SID from data set of 8 merged experiments
Loss function 0.00272453 and FPE 0.00279113
Sampling interval: 1
In Matlab the model shows a good fit of close to 92% for 1 step prediction. However when I try to manually check the same in excel I am getting no fit. The first 5 predictions are close to actual values, but the error keeps increasing exponentially.
Where am I going wrong? Please help!

Answers (0)

Products

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!