Skip to main content
1-Visitor
June 6, 2017
Solved

Optimization of bandwidth and phase margin of a transfer function

  • June 6, 2017
  • 3 replies
  • 5635 views

Hi all, I have a question regarding the selection of a proper value for a parameter from a list based on the evaluation of its transfer function.

As shown here, if I have a variable a, whose value can be selected from a list. A transfer function TF(s,a) is an s-domain function including this variable. We can calculate bandwidth and phase margin of a selected value of "a". I am wondering if it is possible to specify the criteria for the bandwidth and phase margin, and let Mathcad follows these criteria and select the optimized value of "a" from the list?

Thank you!

optimize BW and PM.JPG

Best answer by LucMeekes

I've extended the ranges of a, b and c values to 9 values each, and made a few changes to the code to allow it to deal with imaginary numbers.

It takes a little while to calculate all 729 results, but you've got something to choose from !

Success!
Luc

3 replies

25-Diamond I
June 7, 2017
yhuang-31-VisitorAuthor
1-Visitor
June 8, 2017

Hi Werner, thank you for much for your help! Your solutions works well. Now can I ask for a more complicated scenario, by extending the numbers of variables to 3? Thank you!


3 variables for BW PM optimization.PNG

25-Diamond I
June 8, 2017

In this case, if you continue the brute force way of trying all combinations, you would make TF a function of b an c as well  -> TF(s,a,b,c):=...

The pickValue routine would have three options as arguments (one for a, b and c) and instead of the one for loop you would use three nested for loops (for a-options, b-options and c-options) and innermost again the same statements which calculates BW_OK and PM_OK and jumps out at the very first fitting combination found.

23-Emerald IV
June 7, 2017

OK. Now solve:

Hope this helps.

Success!
Luc

25-Diamond I
June 8, 2017

Heres the modified version for my brute force attack which stops at the first fit.

Encounter a floating point error.

have no time to look at at the moment - maybe later

yhuang-31-VisitorAuthor
1-Visitor
June 8, 2017

Thank you Werner! I can solve my problems now using Luc's method.