System Identification toolbox bug?

2 views (last 30 days)
Antoine
Antoine on 25 Sep 2014
Greetings,
I am stuck with the following problem:
io.Input = randn(m1.nb,1);
io.Output = zeros(m1.na,1);
opt.InitialCondition = io;
opt.AddNoise = true;
opt.NoiseData = nsd*randn(nc,1);
What happens here is: an ARX model of order [na,nb,1] needs to be simulated using some input. This example works without the last two lines. That or the input field of the initial condition is changed to an empty array.
Important: yes, the io fields are initialized using randn and zeros, but at some point the system parameters change and I employ the same initialization, this time recycling values from a time series.
I receive the error:
Dimensions of matrices being concatenated are not consistent.
Error using idParametric/sim (line 114)
Error in ls_recursive_impl (line 36)
out = sim(m1,in,opt);
I do not see the problem. At some time instant nc, the equation for the first model are
y(nc) = -a1*y(nc-1) -a2*y(nc-2) + u(nc) + b1*u(nc-1) + b2*u(nc-2) + e(nc)
then the switch is made
y(nc+1) = -c1*y(nc-1) -c2*y(nc-2) + u(nc) + d1*u(nc-1) + d2*u(nc-2) + e(nc+1)
How can this be solved?
Thank you very much.

Answers (0)

Categories

Find more on Linear Model Identification 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!