How can I estimate transfer function from frequency data?
12 次查看(过去 30 天)
显示 更早的评论
Hello, I have magnitude and phase data of a system in frequency domain:
![](https://www.mathworks.com/matlabcentral/answers/uploaded_files/996665/image.jpeg)
I want to derive its transfer fuction with the following code:
load('Magnitude.mat');
load('Phase.mat');
load('freq.mat');
data = frd(Magnitude.*exp(1j*Phase*pi/180),freq); % Frequency-response data model
np = 6; % # of poles
nz = 6; % # of zeros
iodelay = NaN;
sys = tfest(data,np,nz,iodelay);
bodeplot(sys,{2*pi*1e0,2*pi*1e6})
sys.Report.Fit
h1 = gcr;
setoptions(h1,'FreqUnits','Hz')
setoptions(h1,'MagUnits','abs')
Here is the result:
![](https://www.mathworks.com/matlabcentral/answers/uploaded_files/996670/image.jpeg)
The estimated TF does not fit well with the phase angle but fit percent report is 98% and MSE is very high (3.6e6). I tried it for any number of zeros and poles but I got even worse results.
Could you please help me to solve it?
Thanks
2 个评论
回答(1 个)
Star Strider
2022-5-13
编辑:Star Strider
2022-5-13
Change (increase) ‘np’ using only the number of poles (initially use the default value for the number of zeros and if necessary, fine-tune later with ‘nz’) until you get an appropriate fit.
EDIT — (13 May 2022 at 14:50)
Increase the system order. I was able to get an acceptable fit to both the magnitude and phase with:
ord = 22;
sys = ssest(data,ord);
Also:
figure
compare(data,sys)
% sys.Report.Fit
h1 = gcr;
setoptions(h1,'FreqUnits','Hz')
setoptions(h1,'MagUnits','abs')
.
2 个评论
另请参阅
类别
在 Help Center 和 File Exchange 中查找有关 Transfer Function Models 的更多信息
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!