I have a state space model and am getting different responses between using compare and sim command. I want to be able to model correctly with just input data, but I cannot get an accurate response.
Show older comments
Below is my state space model. When I use the compare command with input/output data I get a response very close to the actual output. However when I use the sim command with only input data, my response is does not match the measured output. I tried setting initial conditions with the sim command but still fail to get an accurate response. Why does the sim command not give the same answer? I need to be able to accurately model using only input and cannot at this point.
ys3_L1 = Discrete-time identified state-space model: x(t+Ts) = A x(t) + B u(t) + K e(t) y(t) = C x(t) + D u(t) + e(t)
A =
x1 x2 x3 x4 x5
x1 1.022 -0.00318 0.005019 -0.01857 -0.01896
x2 0.01044 0.9989 0.01821 -0.04077 -0.03857
x3 -0.003853 -0.0198 0.9973 -0.007014 -0.05084
x4 0.01359 0.0237 0.0235 0.9923 -0.05736
x5 0.0325 0.02983 0.04684 0.06782 1.002
x6 -0.008547 -0.04397 0.05131 0.03622 -0.03691
x7 0.003606 0.04205 -0.03639 0.02476 -0.0576
x6 x7
x1 0.009543 -0.02097
x2 0.06469 -0.06807
x3 -0.0612 0.02442
x4 -0.03271 -0.02684
x5 0.02944 0.04288
x6 0.9943 -0.009728
x7 0.006838 0.9974
B =
u1
x1 -0.001269
x2 -0.005218
x3 0.0009404
x4 -0.001774
x5 -0.007058
x6 -0.007754
x7 0.0001633
C =
x1 x2 x3 x4 x5 x6 x7
y1 -46.98 14.22 7.889 -2.671 -0.9139 0.484 -3.026
D =
u1
y1 0
K =
y1
x1 -27.77
x2 531
x3 -1145
x4 1419
x5 1208
x6 986.2
x7 -1520
Sample time: 1e-06 seconds
Parameterization: FREE form (all coefficients in A, B, C free). Feedthrough: none Disturbance component: estimate Number of free coefficients: 70
4 Comments
Andrew Felber
on 5 Feb 2018
WenYong Zhang
on 1 Jul 2020
hello, have you figure out this problem yet?
alok dhaundiyal
on 17 Jan 2023
Try to incorporate the initial states.
It will work.
Answers (0)
Categories
Find more on Simulink Design Optimization in Help Center and File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!