Then make an array of the coefficients of the numerator and denominator of the transfer function in descending order of powers. How do I find it without looking to bode plot Usually I find it by the command bode (Gp) and move the mouse over the specific gain that I want to know the phase margin on it. Method 1: Easiest stf('s') H (20000/(s+20000)) Bode(H) grid on Method 2: Annalisa’s Way (With no Control Toolbox) Expand the numerator and denominator of your transfer function by multiplying out the terms. G2 = (1.5791e08*(2*pi*fin*1j).^2)./((2*pi*fin*1j+1.257e04).^2.*((2*pi*fin*1j).^2 + 62.83*(2*pi*fin*1j) + 987)) ĥ.- ** bode ** and ** bodeplot ** are slowīode and bodeplot are useful functions but both are slow compared to working directly the the available data.Īlso the transfer function looks like a LPF but there's a notch when really close to 0Hz.ĭo you really want DC through? Perhaps not the best choice of filter. Gp tf ( 1, 1 1) G P margin (Gp) My question is what if I want to know the phase over frequency in a specific Gain Over Frequency. Manually one can check expected results :Īnd despite having the graphic handle, plot cannot direct the new trace onto the generated graph. = Īs asked there were 94 input frequencies, now you have 1e3 frequencies, but squeeze is needed to remove void dimensions because bode, for whatever reason, produces 1x1xN values, not just 1xN. I am not sure how to calculate the cutoff frequency. I was able to get the max gain values by using the getPeakGain function and then converting to dB and Hz. Ideally, each point on the bode plot would be shown by a circle with a dotted line down to the x-axis. I am trying to show the max gain and the two cutoff frequencies for both filters. I want to highlight the differences between a simulated filter and real-life filter through a MATLAB plot.
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |