Build a State Space model from identified Modal Parameters
3 ビュー (過去 30 日間)
古いコメントを表示
I have run the modalfit example, "ModalParametersUsingLeastSquaresRationalFunctionMethodExample.mlx" I get the modal frequencies, damping rates and mode shapes. I couldn't find a function for turning that data into a State Space model.
How do I do that?
0 件のコメント
回答 (1 件)
Star Strider
2022 年 12 月 5 日
編集済み: Star Strider
2022 年 12 月 6 日
That may be possible using the Signal Processing Toolbox invfreqz and tf2ss functions. I put the idfrd and ssest calls at the end, for comaprison.
Make appropriate changes to get the correct tranfer function order and state space realisation —
load modaldata SpaceStationFRF
frf = SpaceStationFRF.FRF;
f = SpaceStationFRF.f;
fs = SpaceStationFRF.Fs;
% nf = max(f)/fs*2*pi
Sz1 = size(frf)
figure
semilogy(f, abs(frf(:,1,1)))
grid
[b,a] = invfreqz(frf(:,1,1),f/fs*2*pi,4,4) % Transfer Function From Frequency Response
[A,B,C,D] = tf2ss(b,a) % State Space Realisation
% Extract the modal parameters of the lowest 24 modes using the least-squares rational function method.
[fn,dr,ms,ofrf] = modalfit(frf,f,fs,24,'FitMethod','lsrf');
% Compare the reconstructed FRF array to the measured one.
figure
for ij = 1:3
for ji = 1:3
subplot(3,3,3*(ij-1)+ji)
loglog(f,abs(frf(:,ji,ij)))
hold on
loglog(f,abs(ofrf(:,ji,ij)))
hold off
axis tight
title(sprintf('In%d -> Out%d',ij,ji))
if ij==3
xlabel('Frequency (Hz)')
end
end
end
% whos
FN = fieldnames(SpaceStationFRF)
FRF11_Data = idfrd(frf(:,1,1), f, 1/fs)
ss_sys = ssest(FRF11_Data)
EDIT — (6 Dec 2022 at 00:04)
Minor code change.
.
2 件のコメント
Star Strider
2022 年 12 月 6 日
My pleasure!
The System Identification Toolbox has two functions that can be used for this, those being idfrd and ssest, coded here as:
FRF11_Data = idfrd(frf(:,1,1), f, 1/fs)
ss_sys = ssest(FRF11_Data)
It’s possible to combine those into one function call:
ss_sys = ssest(idfrd(frf(:,1,1), f, 1/fs))
and perhaps even create an anonymous function to do that:
ss_frd = @(frd,f,ts) ssest(idfrd(frd, f, ts))
ss_sys = ss_frd(frf(:,1,1), f, 1/fs)
There otherwsie does not appear to be an existing function for that. If it were necessary to include other arguments to the functions within ‘ss_frd’, they would need to be added to its argument list as well, and then referenced in the appropriate functions.
.
参考
カテゴリ
Help Center および File Exchange で Linear Model Identification についてさらに検索
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!