Could someone explain me what I must change in my model?
The error messages are pretty clear and self-explanatory. The reason you get the error is because B
is of dimension 4x2
and you are trying to do B * Xr
where Xr
is of dimension 1. According to your equation, you need to do B*U
where U = [dXr/dt; Xr];
. However, using the derivative block is never a good idea in Simulink if you can avoid it, especially with a step input. Think about how you want to formulate the inputs to your state-space.