Build a State Space model from identified Modal Parameters
3 views (last 30 days)
Show older comments
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 Comments
Answers (1)
Star Strider
on 5 Dec 2022
Edited: Star Strider
on 6 Dec 2022
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 Comments
Star Strider
on 6 Dec 2022
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.
.
See Also
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!