Merging MISO ARX models
5 views (last 30 days)
Show older comments
Giulio Cesare Mastrocinque Santo
on 31 May 2020
Answered: Rajiv Singh
on 9 Jun 2020
Hello guys, how are you doing?
I am trying to mergem multiple MISO ARX models using the merge(m1,..,mN) function, but I am receiving the following error:
Error using idParametric/merge
Models being merged must be of the same type, input-output size and structure.
I was able to merge the iddata, but not the models! Here what I am trying to do:
Estimation Data:
Ze1 = iddata(Ye1, [Ue1, Ue2, Ue3], 1);
Ze2 = iddata(Ye2, [Ue1, Ue2, Ue3], 1);
Ze3 = iddata(Ye3, [Ue1, Ue2, Ue3], 1);
Validation Data:
Zv = iddata(Yv1, [Uv1, Uv2, Uv3], 1);
The idea is to use each estimation data to model each individual input-output and then join the resulting models, as bellow:
Ye1(z) = G11(z)U1(z)
Ye2(z) = G21(z)U2(z)
Ye3(z) = G31(z)U3(z)
Y(z) = Ye1(z)+Ye2(z)+Ye3(z) =>
Y(z) = G11(z)U1(z) + G21(z)U2(z) + G31(z)U3(z)
To make that, I did the following code:
NN = struc(1:30 ,1:30 ,1:30);
N1 = selstruc(arxstruc(Ze1(:,:,1),Zv(:,:,1),NN));
arx1 = arx(Ze1, "na", N1(1), "nb", [N1(2) 0 0], "nk", [N1(3) 1 1]);
N2 = selstruc(arxstruc(Ze2(:,:,2),Zv(:,:,2),NN));
arx2 = arx(Ze2, "na", N2(1), "nb", [0 N2(2) 0], "nk", [1 N2(3) 1]);
N3 = selstruc(arxstruc(Ze3(:,:,3),Zv(:,:,3),NN));
arx3 = arx(Ze3, "na", N3(1), "nb", [0 0 N3(2)], "nk", [1 1 N3(3)]);
If I then make the merge below,
ARX = merge(arx1, arx2, arx3)
I get the error "Models being merged must be of the same type, input-output size and structure."
If, however, I joing the dataset, no errors are returned.
Ze = merge(Ze1, Ze2, Ze3)
Can anyone help me figure out what is the problem? What I really want is to merge the post-fitted ARX models!
Thanks a lot!
0 Comments
Accepted Answer
Rajiv Singh
on 9 Jun 2020
What you need is horizontal concatenation, not MERGE which is about statistical merger of identical (same I/Os and model structure) models.
ARX = [arx1, arx2, arx3]
0 Comments
More Answers (0)
See Also
Categories
Find more on Nonlinear ARX Models in Help Center and File Exchange
Products
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!