Problems with function frestimate
3 次查看(过去 30 天)
显示 更早的评论
Hi,
I also have problems with this function. I use the frestimate function as follows:
logdata = logsout{1}.Values;
sys_estim = frestimate(logdata,simu.w,'rad/s');
size(sys_estim)
and I get the following error:
Index exceeds the number of array elements (8).
Error in freblkData2Frd (line 80)
uThisFreq = uts.Data(beginFreqPoints(ct):endEstimationPoints(ct));
Error in frestimate (line 78)
varargout{1} = freblkData2Frd(data,w,units);
Error in Auswertung_Simulink_Stromregelung_o_par (line 38)
sys_estim = frestimate(logdata,simu.w,'rad/s');
I analyze my model for 10 frequencies.
But when I look in the function freblkData2Frd, I noticed that
nw 10 is (according to the number of frequencies)
but the arrays "startEstimationPoints", "endEstimationPoints" and "beginFreqPoints"
%% find start, end and samples for each frequency
startEstimationPoints = find(diff(rts.Data)>0);
endEstimationPoints = find(diff(rts.Data)<0);
beginFreqPoints = [0;endEstimationPoints(1:end-1)] + 1;
sampsPerPeriod = round(2*pi/Ts./w);
only have 9 elements.
But I don't know why they have only 9 elements.
For the analysis I use the "FrequencyResponseEstimator" block in Simulink. The simulation time is longer than the necessary time given by the block.
What is the cause of this problem?
Thanks a lot!
0 个评论
回答(0 个)
另请参阅
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!