How to plot Specific data points on individual bode plots.
Show older comments
Hi, so I am analysing a DC motor speed using a PI controller.
Anyway I have collected data for the amplitude ratio of the achieved amplitude against the command amplitude aswell as the time period, time difference between peaks and thus the phase angle in degrees. Here is me defining the data in MATLAB.
Fq = [5 10 50 100 500 1000]; %Command Frequencies
Ar = [0.75472144 0.54075 0.11894 0.054723 0.005801 0.00157]; %Amplitude ratio (Achieved/Command)
Ph_deg = [-2.036864964 -5.388668069 -56.78613362 -68.88060233 -120.9170132 -144.9197795]; %Phase angle (Deg)
Ph_rad = Ph_deg*(pi/180); %Phase angle (Rad)
I have then estimated the transfer function for this system and have plotted a bode plot using:
zfr = Ar.*exp(sqrt(-1)*Ph_rad);
data = frd(zfr, Fq);
nz = 1;
np = 2;
Gc = tfest(data,np,nz);
bode(Gc)
Obviously I have my experimental data from my simulations I.e. the frequencies for x axis and the magnitude in dB that I can calculate from the ratio and the phase angle in degrees I have.
How can I choose which graph (Magnitude or Phase angle) and how can I plot these specific experimental data points onto the bode plots?
I have tried many different solutions but none have come to achieve what I require.
Accepted Answer
More Answers (0)
Categories
Find more on Plot Customization in Help Center and File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!