Skip to main content
19-Tanzanite
July 5, 2024
Solved

How to construct asymptotic bode plot in a more automatical way?

  • July 5, 2024
  • 2 replies
  • 5717 views

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?

 

Cornel_1-1720175191607.png

I am expecting something like that (red plot):

Cornel_2-1720175219089.png

Best answer by LucMeekes

So, after some fumbling I was able to improve the automatic asymptote generation for bode plots.

LucMeekes_0-1723498762802.png

The function should work fine for most real-world examples of filters,

as an example:

LucMeekes_1-1723498840000.png

or, another example:

LucMeekes_2-1723499032989.png

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

2 replies

25-Diamond I
July 5, 2024

@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.

Cornel19-TanzaniteAuthor
19-Tanzanite
July 5, 2024
25-Diamond I
July 5, 2024

@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.

Werner_E_0-1720188334681.png

Prime 10 sheet attached

 

23-Emerald IV
July 6, 2024

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:

LucMeekes_0-1720301312424.png

Or, for another

LucMeekes_1-1720301356913.png

this:

LucMeekes_2-1720301399853.png

I should like to see the translation to Prime...

 

Success!
Luc

 

 

Cornel19-TanzaniteAuthor
19-Tanzanite
July 8, 2024

Hm

Cornel_0-1720421454206.png

 

Or if we put like this, the error is this:

Cornel_0-1720421810894.png

ttokoro
21-Topaz I
21-Topaz I
July 8, 2024

Just change logspace from function to variable, i. e. the program function Luc made. 

image.png

t.t.