Transfer function extraction from frequency response

38 次查看(过去 30 天)
Hello,
I am trying to get a step response to a system whose magnitude and impulse reponse data for different frequencies are known.
num= xlsread('C:\Users\PrasadNGanes\Desktop\Try4_TF.xlsx');
FrequencyVector= num(:,1);
mag = num(:,2);
phase = num(:,3);
phase = deg2rad(phase);
ResponseData = horzcat(mag, phase);
sys = frd(ResponseData,FrequencyVector);
[num,den] = bode(sys);
H = tf(num,den);
step(H);
I am getting an error stating :
Error using DynamicSystem/bode
The "bode" command operates on a single model when used with output arguments.
How to resolve this error.

采纳的回答

Star Strider
Star Strider 2024-2-20
You will need to use the System Identification Toolbox for this.
Then:
ResponseData = mag.*exp(1j*phase);
data = idfrd(ResponseData,FrequencyVector,SamplingInterval);
H = tfest(data)
And proceed from there.
See the documentation on idfrd for details.
.
  17 个评论
Star Strider
Star Strider 2024-2-27
My pleasure.
Apparently that has some system defined in it, however I was unable to determine what the system was, or how it was defined. If it is a plant or filter, you may be able to get the information you want from it.
Ganesh Prasad
Ganesh Prasad 2024-2-27
The system(A probe in my case) is defined in the form of Scattering parameter(S2P) matrix.
The theory i read in the internet is that impulse response is the IFFT of S21 vector(transmission coefficients) and the input is determined by the convolution of output with derived inverse impulse response.
However, that theory is not working in my case.

请先登录,再进行评论。

更多回答(1 个)

Aquatris
Aquatris 2024-2-20
First of all, bode command does not give you numerator and denominator. It gives you magnitude and phase of the system, or FRD in your case.
In order to get a step response with the 'step' function, you need to provide a transfer function or state space representation of a system to the step function.
That is why you first need to fit a model to your FRD. You can use the system identification toolbox if you have access to it. Alternatively, if you know the structure of your model, you can also formulate a simple optimization problem or manually try to fit a model by adjusting the parameters.
Once you fit a model to your FRD, then you can use the step function to obtain the step response.

类别

Help CenterFile Exchange 中查找有关 Polynomials 的更多信息

产品


版本

R2023b

Community Treasure Hunt

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

Start Hunting!

Translated by