Skip to main content
1-Visitor
September 7, 2022
Solved

How to use Mathcad to create a flow chart

  • September 7, 2022
  • 2 replies
  • 8270 views

Hi Experts,

 

I am a beginner to use Mathcad.

and I have a question about the flow chart.

Please see the below figure, I can do the below figure by using Matlab, but I am confused about how to use Mathcad to do the same thing, can someone give an example of how to do it, thanks.

JC_10409281_0-1662563509747.png

 

Best answer by terryhendicott

Hi,

Here is the total solution from the article. It uses a solve block instead of the flow chart in steps 3 and 4

Problem inputs

Capture.JPG

Steps 3 and 4 are the flow chart iterations.  In Mathcad they can be done using a solve block it takes care of all the iteration to a closed solution.

Capture2.JPG

Cheers

Terry

2 replies

25-Diamond I
September 7, 2022

I would suggest that you start a try and then post the (probably not correctly working) worksheet here for corrections to be made.

 

There may be some modifications necessary because Mathcad unfortunately does not provide a loop with end-condition (something like do ... while, or repeat ... until). And of course Mathcad supports no  goto   😉

 

You would also have to specify what "select ..." and "Find ..." and "solve for ..." would actually mean, how much m should be in/decreased, etc.

It might be that a solve block with "find" or "minerr" could be more appropriate to get the value of K.max (or rather m may be the value of interest?), but as a start here is a possible outline of the function. Arguments may be Qmax and m (so you won't need the first two lines). The third line is just to make sure that for the first time the condition of the while loop will fail.

Werner_E_0-1662564917324.png

Note that there is a slight difference here to the flow chart: When "Find Kmax" found a value equal to gain.required, the value of m is increased (which is not the case when we follow the flow chart. If this is an issue, an easy way to fix it would be to decrease m after the loop and before "solve for resonant ...".
Another way would be to replace "else" for "elseif Kmax > ganin.required".

 

1-Visitor
September 7, 2022

Hi @Werner_E

Ok, I will put my worksheet next time when I have questions.

 

Based on your suggestions, I will try to do it and see if it could work or not.

 

because Matlab if more sensitive to me, it is hard for me to transfer to Mathcad.

 

and thanks for your help, I am very appreciate it.

 

 

 

21-Topaz II
September 7, 2022

Hi,

Can you elaborate on the equations using Qmax and m to calculate Fxmin, Kmax. What is the required gain

Mathcad can use a root function or solve block that can iterate the value of m to solve the problem without using programming 

21-Topaz II
September 7, 2022

Hi,

Are you using Mathcad 15 or Prime 8?

Cheers

Terry

21-Topaz II
September 7, 2022

Hi The web  is a marvelous thing have found the article with the flow chart ,  So have the equations and example.

Application Note AN 2012-09
V1.0 September 2012
Resonant LLC Converter: Operation and Design
250W 33Vin 400Vout Design Example
Sam Abdel-Rahman
Infineon Technologies North America (IFNA) Corp

https://www.infineon.com/dgdl/Application_Note_Resonant+LLC+Converter+Operation+and+Design_Infineon.pdf?fileId=db3a30433a047ba0013a4a60e3be64a1

Please be patient