It is part of the Signal Processing Toolbox. 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. But the phase at each frequency is still correct. Semilogx(ww,20*log10(abs(H2(1:NFFT/2+1))),w,20*log10(abs(mag))) dbode () callse bode (), which in turn has an algorithm that tries to 'unwrap' the phase by adding multiples of 360 deg across the frequency range. I suggest you do the same thing when taking the FFT: L = length(ym(t>=10)) This gives the following plot (in Octave): You'll notice that I have discarded the time values before 10 and shifted the response values down by about 2.2. Num= %// Numerator of z-transform of impulse response of systemÄen= %// Denominator of z-transform of impulse response of system Use the bodeoptions command to create a BodeOptions object to customize Bode plot appearance. bode automatically determines frequencies to plot based on system dynamics. When invoked without left-hand arguments, margin produces a Bode plot and displays the margins on this plot. The gain and phase margins indicate the relative stability of the control system when the loop is closed. The plot displays the magnitude (in dB) and phase (in degrees) of the system response as a function of frequency. margin calculates the minimum gain margin, phase margin, and associated crossover frequencies of SISO open-loop models. 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) Description example bode (sys) creates a Bode plot of the frequency response of a dynamic system model sys.
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |