Problem with using mussv
显示 更早的评论
I have a state space representation of a system and I am interested in its frequency response. I calculate it using the function freqresp and the resulting array has dimensions: 3*(N-1)x3*(N-1)x100 (because the length of my frequency vector is 100). This works as expected, and the next thing I do is to rearrange the array that I got (by adding zeros) using the cat command to have dimensions: 3*(N-1)x9*(N-1)x100. This also works as expected. The reason for doing that is because I want to calculate bounds on the structured singular values of this rearranged array, and my uncertainty set is comprised of 3 blocks of dimensions: (N-1)x3*(N-1).
For clarification I provide a relevant part of my code:
N = 30;
R = 690;
w_vec = logspace(-5,5,100);
Blocks = [N-1,3*(N-1);N-1,3*(N-1);N-1,3*(N-1)];
state_space = ss(A,B,C_grad,D);
freq_data = freqresp(state_space,w_vec);
O = zeros(N-1,3*(N-1),length(w_vec));
freq_data_rearanged = cat(1,cat(2,freq_data(1:N-1,:,:),O,O), ...
cat(2,O,freq_data(N:2*(N-1),:,:),O), ...
cat(2,O,O,freq_data(2*N-1:3*(N-1),:,:)));
bounds = mussv(freq_data_rearanged,Blocks,'Ufs');
My problem is that I get the error: The dimensions of matrix are incompatible with the BLK dimensions.
I don't understand why this is happening, because as far as I understand my uncertainty matrix has dimensions: 3*(N-1)x9*(N-1) and the frequency response (named freq_data_rearanged in the code) has dimensions 3*(N-1)x9*(N-1)x100.
What am I doing wrong here?
采纳的回答
更多回答(0 个)
类别
在 帮助中心 和 File Exchange 中查找有关 Linearization 的更多信息
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!

