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!