Build a State Space model from identified Modal Parameters

조회 수: 3 (최근 30일)
Alan
Alan 2022년 12월 5일
댓글: Star Strider 2022년 12월 6일
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?

답변 (1개)

Star Strider
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)
Sz1 = 1×3
1000 3 3
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
b = 1×5
1.0e-04 * 0.1052 0.0348 -0.2793 0.0478 0.0948
a = 1×5
1.0000 -2.0241 0.1291 1.8385 -0.9435
[A,B,C,D] = tf2ss(b,a) % State Space Realisation
A = 4×4
2.0241 -0.1291 -1.8385 0.9435 1.0000 0 0 0 0 1.0000 0 0 0 0 1.0000 0
B = 4×1
1 0 0 0
C = 1×4
1.0e-04 * 0.2478 -0.2929 -0.1457 0.1941
D = 1.0524e-05
% 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)
FN = 3×1 cell array
{'FRF'} {'f' } {'Fs' }
FRF11_Data = idfrd(frf(:,1,1), f, 1/fs)
FRF11_Data = IDFRD model. Contains Frequency Response Data for 1 output(s) and 1 input(s). Response data is available at 1000 frequency points, ranging from 0.01592 rad/s to 159.2 rad/s. Sample time: 0.003125 seconds Status: Created by direct construction or transformation. Not estimated.
ss_sys = ssest(FRF11_Data)
ss_sys = Continuous-time identified state-space model: dx/dt = A x(t) + B u(t) + K e(t) y(t) = C x(t) + D u(t) + e(t) A = x1 x2 x3 x4 x1 -0.001584 0.1563 1.977e-07 -3.976e-05 x2 -0.6433 -0.001584 -0.0008179 0.1629 x3 -1.083e-10 -6.133e-10 -0.0006166 0.1563 x4 9.888e-10 -8.261e-10 -0.09739 -0.0006166 B = u1 x1 2.587e-08 x2 -7.953e-05 x3 -7.629e-05 x4 0.3125 C = x1 x2 x3 x4 y1 -0.001145 -6.471e-06 -4.126e-06 0.0007976 D = u1 y1 0 K = y1 x1 0 x2 0 x3 0 x4 0 Parameterization: FREE form (all coefficients in A, B, C free). Feedthrough: none Disturbance component: none Number of free coefficients: 24 Use "idssdata", "getpvec", "getcov" for parameters and their uncertainties. Status: Estimated using SSEST on frequency response data "FRF11_Data". Fit to estimation data: 90.97% FPE: 2.13e-07, MSE: 2.096e-07
EDIT — (6 Dec 2022 at 00:04)
Minor code change.
.
  댓글 수: 2
Alan
Alan 2022년 12월 6일
Thanks for the answer. But this seems to involve two "fitting" steps. The first to get the modal parameter from modalfit and the second using invfreqz. I think we could have skipped a step.
I was looking for a function that would create the state space matrices from the modal parameters and vectors directly. I think I would know how to do that; I was hoping MATLAB had a function already (which I hadn't been able to find.)
Star Strider
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 CenterFile Exchange에서 Linear Model Identification에 대해 자세히 알아보기

제품


릴리스

R2022b

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!

Translated by