Hi,
I noticed that in Camacho's Model Predictive Control G is built like:
g1,zeros;
g2,g1,zeros;
...
however it seems like here in dmc.m it is built like:
g0,zeros;
g1,g0,zeros;
...
Is that a flaw or am I missing something?
The filter function produces y=[y0,y1, ...]', right?
And since input is X=[1,1,1, ...]' we could say that y=g=[g0,g1, ...]' and according to Camacho we would use g(2:P+1) for building G but in mpc.m it is used p.sp=(1:P) which would be g(1:P) in books notation.
Comment only