8/17/2023 0 Comments Bode matlab![]() = bode(FinalTF,freqMarkers) Īnd works great! Thanks to for the help. Now I managed to add markers to the specific frequencies I wanted like this: figure(4) Īxis() It just printed the bodeplot of the transfer function. Here is some sample code to illustrate the results. I'm using Matlab 2015, if it makes any difference.Īny help would be appreciated. But the phase at each frequency is still correct. Maybe because I'm using bodeplot instead of regular plot? I don't know how else to do it though. 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 tried using the function evalfr(), but tbh the values it returns seem a bit off.Ģ) Ignoring the previous point, even if I do the calculations by hand, I can't add them on the plot using this method, and I'm not sure what the problem is. I am currently running into two basic problems:ġ) I don't know how to get the specific dB at each frequency just by using the TF object. I know how to do it by clicking on the graph, but that will be too time consuming, as I have many plots to go through. What I want is to add markers on specific points in this plot (specifically I want to highlight the frequencies fp,fo,fs, you don't need to know what these are, they're just 3 different points on the x-axis, and the dB at each frequency) with code. Where FinalTF is the transfer function I'm talking about. ![]() Title('Butterworth LowPass Fifth Order') Setoptions(h,'FreqUnits','Hz','PhaseVisible','off') I have successfully calculated it and have plotted its bode response like this: % Butterworth Fifth Order Low Pass ![]() 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. ![]() I am currently designing a 5th order Butterworth filter and looking at its transfer function response in Matlab. 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. ![]()
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |