cancel
Showing results for 
Search instead for 
Did you mean: 
cancel
Showing results for 
Search instead for 
Did you mean: 

Efficiency Optimization

WeiXu
Regular Member

Efficiency Optimization

Hi Guys,

I have one question about how to use mathcad prime 6 to optimize two parameters in order to get a highest efficiency. For example, I have two variables A and B as input, and I already wrote one efficiency calculation file that using this two as variables, and output an fixed efficiency result. How can I use the optimization function in prime 6 that can help me get a highest efficiency (3D curve) when the two input A and B vary in a specific range?

If you have any examples, please let me know. Thanks.

10 REPLIES 10

Re: Efficiency Optimization

Please attach your Prime worksheet.

That should help us to help you.

 

Success!

Luc

Re: Efficiency Optimization

Hi, attached is my calculation file for a set of fixed variables, such as switching frequency fs=15kHz and inductance Lpri=35uH.

 

WeiXu_0-1606929044708.png

And the final efficiency curve is showed in the second last section. Attached is the efficiency curve, but I can do one more step calculation. I can use only one value to represent the final optimization target, efficiency index.

For example, CEC Efficiency = 0.04 x Eff10% + 0.05 x Eff20% + 0.12 x Eff30% + 0.21 x Eff50% + 0.53 x Eff75%. (California Energy Commission (CEC) has proposed another weighting, which is now specified for some inverters used in the US.)

WeiXu_1-1606929123874.png

What I want to achieve is that I can vary the switching frequency into a specific range, such as 15kHz to 100kHz, and also specify Lpri ranging from 20uH to 100uH. Then I should be able to get a 3D matrix that has variable fs, Lpri as inputs and efficiency as output.

Hope you can take a look at this file. I know it's a bit complicated, but I can try to simplify the calculation algorithm. If you have any idea about how to use prime 6 to achieve this kind of optimization methodology, please let me know. Thanks.

 

 

Re: Efficiency Optimization

You should use one of the functions maximize() or minimize(). I guess in your case you want to maximize efficiency.

What you need is a function (yes, a function) that you want to optimize, e.g. Efficiency(fs,Lpri).

Then you can use a solve block to set constraints and use maximize.

I cannot find an optimization problem example in the help for Prime with more than one variable, so...

Here's an example (of a former Mathcad), that you should be able to build in Prime to gain experience, and then you should know what to do to rebuild your system for optimization:

LucMeekes_0-1606933777486.png

LucMeekes_1-1606933829252.png

Now comes the solve block:

LucMeekes_3-1606933926347.png

Success!

Luc

Re: Efficiency Optimization

Hi,

I draw a graph like the below, do you know how to generate a image with high resolution that I can use for publishing a paper?

Thanks.

 
 

Capture.JPG

 

 

Re: Efficiency Optimization

The lack of high resolution graphics in Mathcad has been a complaint before PTC bought it; I don't recall seeing a useful solution.

Re: Efficiency Optimization

Thanks.

Re: Efficiency Optimization

What do you (or the publishing paper) consider to be 'high resolution'?

Note that you can increase the size of the plot in Prime, make sure you remove the background grid, use a large computer screen (2560x1440 pixels is affordable currently) and grab the picture off the screen to a .PNG picture. When printed at a width of 6 inches, you get over 400 dpi (2560/6=427).

Other options are to save the graph data to a file and plot it with other software.

 

Success!

Luc

 

P.S. How's the optimization going?

Re: Efficiency Optimization

Still working on the optimization. 

"Other options are to save the graph data to a file and plot it with other software."

I tried to export my graph into excel and then use MATLAB to re-plot it, looks good.

But do you know what should I do if it's 3D graph (like the one attached below)? Do you have any example?

I know for the f(x,y) below, we can easily re-write the function and plot it using MATLAB, but what if it's a more complicated calculation result that can only generated by MathCAD? 

 
 

Capture.JPG

 

Re: Efficiency Optimization

"I know for the f(x,y) below, we can easily re-write the function and plot it using MATLAB, but what if it's a more complicated calculation result that can only generated by MathCAD?"

 

The Mathcad functions "CreateMesh" and "CreateSpace" both result in "three nested matrices."  So the output of these is a data set of numbers; these could be exported to a file, read by the plotting software of your choice, and you're good to go!  

Re: Efficiency Optimization

Prime 5.0 and above have other plotting features that can make a nice looking graph.  Or you can always export to excel or other plotting programs.

Announcements