How can I get a time response from FRD model
19 visualizzazioni (ultimi 30 giorni)
Mostra commenti meno recenti
I have a model in FRD mode, I want to a) get a time response of this model, b) implement it in Simulink (both seems to be unavailable in Matlab)
0 Commenti
Risposta accettata
Sam Chak
il 8 Dic 2023
There isn't a direct function called 'frd2ss()' for the conversion you're looking for. However, you can estimate a state-space model from available frequency response data (FRD) using the 'ssest()' function. This function will provide you with the estimated state-space model, which you can then use in Simulink for simulation. This will allow you to obtain the time response of the equivalent FRD model.
%% Dummy state-space for FRD generation
ssA = [0 1; -1 -2];
ssB = [0; 1];
ssC = [1 0];
ssD = 0*ssC*ssB;
ss_Sys = ss(ssA, ssB, ssC, ssD);
%% Obtain Frequency-Response Data model
w = logspace(-2, 2, 50);
frdSys = frd(ss_Sys, w)
bode(ss_Sys,'b', frdSys,'r--'), grid on
%% Convert Frequency-Response Data model to Linear Time-Invariant System
ltiSys = ssest(frdSys)
%% Extract matrices and store in Workspace for State-space block in Simulink
A = ltiSys.A; % state matrix
B = ltiSys.B; % input matrix
C = ltiSys.C; % output matrix
D = ltiSys.D; % direct matrix
%% Time response of the equivalent FRD model
step(ltiSys), grid on
0 Commenti
Più risposte (0)
Vedere anche
Categorie
Scopri di più su PID Controller Tuning in Help Center e File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!