Bode Plot to Transfer Function
42 vues (au cours des 30 derniers jours)
Afficher commentaires plus anciens
Muhammad
le 27 Juil 2023
Commenté : Star Strider
le 28 Juil 2023
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 commentaires
Réponse acceptée
Star Strider
le 27 Juil 2023
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 commentaires
Plus de réponses (0)
Voir également
Catégories
En savoir plus sur Transfer Function Models dans Help Center et File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!