Bode Plot to Transfer Function
42 次查看(过去 30 天)
显示 更早的评论
Hello, I take experimental data of my plant (Which is Atomic Force Microscopy PZT Actuator and Frame).
I have .DAT File, which contains following information Freuency (Hz), Magnitude dB, Phase Degree.
I want to estimate the transfer function of my AFM system from that bode plot, How can I do this in the MATLAB. I am not sure which order my plant is and either it is linear or non linear, I am new to the control system.
I have attached the .csv file of my data and Bode Plot image.
I
0 个评论
采纳的回答
Star Strider
2023-7-27
If you have the System Identification Toolbox, this is (relatively) straightforward, however your data requires a bit of pre-processing. Start with the idfrd function and then use tfest. (The Signal Processing Toolbox has similar functions, however I usually use the System Identification Toolbox functions for these problems).
Try this —
figure
imshow(imread('Bode Plot_AFm.JPG'))
T1 = readtable('HH8.csv')
Ts = 0; % Fill With Actual Sampling Frequency
FHz = T1.F;
for k = 1:size(T1,1)-1
if FHz(k+1) == FHz(k)
FHz(k+1) = FHz(k+1)+0.5; % 'Brute Force' Interpolation
end
end
Mag = T1.G;
PhDeg = T1.P;
Response = Mag.*exp(1j*deg2rad(PhDeg)); % Complex Vector
sysfr = idfrd(Response, FHz, Ts, 'FrequencyUnit','Hz')
tfsys = tfest(sysfr,18)
figure
compare(sysfr, tfsys)
Experiment to get desired results. Having the actual sampling frequency would likely improve this.
.
6 个评论
更多回答(0 个)
另请参阅
类别
在 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!