A better zoom-in we can see at frequency near 5.5 Rad/s we can se that we have amplitude about 1. This is the closes as I can get the ideal bode plot. It is part of the Signal Processing Toolbox. plot(w, abs(H)) This have the same magnitude and frequencies as a bode plot Do bode without phase bodemag(G) The frequency response. tfestimate would be a better choice to estimate the transfer based on the measurement data (again remember to pre-process the data the same way as I have just done here). The DC level of the transfer function is correct, but the poor FFT technique yields too much noise at (relatively) higher frequencies. There is also a fine in the repository called BodeMagPaper.m that creates only a magnitude plot. Download it and save it so that MatLab can find it (from the Matlab menu you can go to FileSet Path and include the directory where you stored the BodePaper.m file.). I suggest you do the same thing when taking the FFT: L = length(ym(t>=10)) The program described here, BodePaper.m, can be used to make paper. num9.18 den (10e3) (5e-9) lowpass tf (num,den) bode (lowpass) I think i have missed up with the brackets but can't tell unfortunately, and i know another command which is easier to generate the required graph, but i have been ask to do this one as it shows the correct form of the transform function. Bode Plot of a Transfer Function Chinmaya A.S.V 8 years ago How to easily edit a plot, add labels and title, change plot color in MATLAB without writing codes Rafiul Shihab 2.3K views 1. This gives the following plot (in Octave): If sys.TimeUnit is 'seconds' and you frequencies are in Hertz, use w 2pif, where f are the frequencies you need. To calculate the magnitude at certain frequencies, use mag bode (sys,w) where w are the frequencies in radians per sys.TimeUnit. You'll notice that I have discarded the time values before 10 and shifted the response values down by about 2.2. I want to plot bode diagram of the following system both using bode and fft: // System info num0 1 // Numerator of z-transform of impulse response of system den1 -0. Plot it using plot (f,mag), then hold on and plot your markers. Num= %// Numerator of z-transform of impulse response of systemÄen= %// Denominator of z-transform of impulse response of system I looked at your data and compared it with the theoretical transfer function in the time-domain and it isn't a bad fit if you ignore some of the data: t = 1:length(u)
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |