Community Tip - Your Friends List is a way to easily have access to the community members that you interact with the most! X
Hi,
How can I draw the ASYMPTOTIC bode plot of this function in more automatical way? Is it possible? I mean I know that this asymptotic bode plot can be draw after some manual analysis, but is it possible to make a program that can draw automatically this thing?
I am expecting something like that (red plot):
Solved! Go to Solution.
So, after some fumbling I was able to improve the automatic asymptote generation for bode plots.
The function should work fine for most real-world examples of filters,
as an example:
or, another example:
The option to supply H as a 2-column vector should work well if you import data from a circuit simulation program (Spice) to plot.
See attached file, which also works in Prime express. (Yes, all it took was a one-liner.)
Success!
Luc
@Cornel wrote:
Hi,
How can I draw the ASYMPTOTIC bode plot of this function in more automatical way? Is it possible? I mean I know that this asymptotic bode plot can be draw after some manual analysis, but is it possible to make a program that can draw automatically this thing?
Depending on those "some manual analysis" it may be possible to turn exactly those calculation into a program.
BTW, the third argument of the "logspace" function is dimensionless, its the number of entries created. I wonder why Prime does not throw an error when you chose 800 Hz as argument but rather seems to simply ignore the unit.
I see that Matlab has some function that can do this:
https://www.mathworks.com/matlabcentral/fileexchange/97627-asymptotic-bode-diagrams-extended?s_tid=FX_rc3_behav
@Cornel wrote:
I see that Matlab has some function that can do this:
So you should rather use Matlab instead of Mathcad for your tasks.
Matlab has a wealth of features and capabilities that Mathcad lacks.
Here is a bold attempt done with Mathcad. Sure not generic and not a 1-button-push solution.
You may use it as a starting point for your own attempts.
Prime 10 sheet attached
We've seen this before, like here: https://community.ptc.com/t5/Mathcad/Asymptotic-Bode-Plot-Issue-in-Mathcad-Prime-7/m-p/838849#M203772
I've had another look at it and....How's this:
Or, for another
this:
I should like to see the translation to Prime...
Success!
Luc
Hm
Or if we put like this, the error is this:
Just change logspace from function to variable, i. e. the program function Luc made.
OK, now it works.
@LucMeekes Do you have any idea how to make also for the phase of bode plot a program that draw asymptotes?
Somehow like green plot:
@LucMeekes I made a simple example also including the phase of the bode plot drawn in asymptotic manner in order to see what I want to achieve.
So, for magnitude seems ok your program. Now a program for phase will be good to have...something like your program Asymptotes but modified for phase in order to have the result like PhaAsymp.
It's getting close:
But not completely there yet:
Luc
Luc, can you attach your worksheet? It seems pretty ok at first view. Do not not sure why you said that "is not completely there yet"
See what happens if you change the lower bound of the frequency range from 10^-3 to 10^-1 (or higher).
Luc
I see that at least asymptotical magnitude bode plot works ok (see below). Why do you think its not ok?
I cannot say anything about asymptotical phase bode plot because you did not post until now your file to see how you implemented this asymptotical phase bode plot in order to see if changing the lower bound of the frequency range have an influence or not on phase plot.
This is with 10^-3:
This is with 10^-1:
This is with 10^2:
Ah, you're right.
I'm talking about this:
Compare that with the previous plot, where frequency started at 10^-3.
I'm still working on this problem.
Luc
Hm...I see what you are trying to explain (below with orange). Do not know what to say about this. There is some difference, but not so big (at least for the function on which this example is based).
It could be also something like below to draw a straight line at each root, but I do not know how to automatically take into account this.
Because for a system like below there will be a -90deg drop:
But anyway, when you finish your program to draw also the asymptotic phase plot post here. And even if you not finish the program post anyway here (maybe these differences will not be so big)
@LucMeekes wrote:
Ah, you're right.
I'm still working on this problem.
Luc
Hi Luc, could you post the asymptotic phase bode plot? (of course as it is by now)
So, after some fumbling I was able to improve the automatic asymptote generation for bode plots.
The function should work fine for most real-world examples of filters,
as an example:
or, another example:
The option to supply H as a 2-column vector should work well if you import data from a circuit simulation program (Spice) to plot.
See attached file, which also works in Prime express. (Yes, all it took was a one-liner.)
Success!
Luc
Ok, Thanks Luc very much.