Feko optimization engine management (feko's own engine)

Andrew_21618
Andrew_21618 Altair Community Member
edited June 13 in Community Q&A

After years of working in HFSS, I am trying to master FEKO, and looking how to do the same things I was able to do in the former software.

Of particular concern is the optimization engine. Here please allow me to ask four questions

1)when I define a goal, let's say Maximize: (log(avg(Focus)))*(10), where focus is a realized gain in single defined direction, when I plot this partial goal cost and the gain dB together, the numbers do not match. See the image.
So, what is the cost of a single defined goal then?

image

(here the direction is a far-field point, therefore the average function, to workaround if there are more than one point by occasion)

2)Is it possible to plot a requested parameter, like Gain versus iteration? not against frequency, or angle, but the optimization step.

3)When I have the cost vs. iteration plot, and see the iteration I think acceptable, and know its number:
 Is it possible to apply the values to the model from that particular iteration, by the number I choose?
 
4)How a simple quasi-newton method (gradient descent with extrapolation, etc) is called in FEKO? When the area of solution locking is known, Quasi-newton methods work the best.

Answers

  • Jaehoon
    Jaehoon
    Altair Employee
    edited May 31

    Hello Andrew,

    Please see my answers.

    Q1 & Q2

    -> Please see the attached pdf file (Bent dipole optimization) and its Feko model. (The pdf file is for the Feko introduction training, and the Feko model is the corresponding model.) 

    If you run the Feko model with "Optimization", you will display the Gain as shown below.

    image

     

    Q3)

    -> I think you are looking for the following feature (Restart from solver run) in the component launch option.

    image

    image

    Q4)

    -> Please also see the Feko user guide for the Feko optimization algorithm as shown below.

    image

     

    Regards,

    Jaehoon

  • Andrew_21618
    Andrew_21618 Altair Community Member
    edited June 7

    Hello Andrew,

    Please see my answers.

    Q1 & Q2

    -> Please see the attached pdf file (Bent dipole optimization) and its Feko model. (The pdf file is for the Feko introduction training, and the Feko model is the corresponding model.) 

    If you run the Feko model with "Optimization", you will display the Gain as shown below.

    image

     

    Q3)

    -> I think you are looking for the following feature (Restart from solver run) in the component launch option.

    image

    image

    Q4)

    -> Please also see the Feko user guide for the Feko optimization algorithm as shown below.

    image

     

    Regards,

    Jaehoon

    Dear Mr. Kim

     

    Thank you for kindly responding. As you can see from the results, I have folowed the manual for setting up and running the optimization.

    1) However it is not explained there WHY the goal, which is defined as 10 log (Realized Gain -phi) is 2 orders lower than the same Realized Gain -phi in dB in plot next to it, in the same simulation!

    The obvious conclusion is that the actual computed goal(cost function) value is NOT the same as the expression characterizing it. So WHAT IS IT?

    There is also no exoplanation why, when maximizing (Realized Gain -phi), and minimizing (Realized Gain -theta), the optimization does not ubuquintuously converge to the maximum of (Realized Gain -phi), but floats somewhere in diagonal polarization.

    2) The above should explain you why the plot you have shwn to me is not the Gain, but a cost function which is something different. Therefore I was attempting to plot explicitly "the Gain", but versus the iteration number. Feko offers me only frequensy or angle as a horizontal axis, or I missed something.

    3) No. I do not need to restart the optimization. After running the optimization for a few hours, I will get a cost plot with multiple optimal candidates. Because of discrete nature of the problem, the lwest cost is not necessary the best engineering solution.

    Therefore it is important to explore multiple good solutions for determining the best configuration. In HFSS it is performed simply bu clicking at a point of the cost-plot. I wonder, how can I recall here the requested iteration, to display it in the POSTFEKO, and then to pass it to CADFEKO as a solution.

    **) btw, is there a button to apply a solution to CADFEKO? Is it updated when uptimizing only to the base project.CFX file on each run until stopped?

     

    Q4) unfortunately these original names do not ring any bell to me. Which of them is the simplest Newton/Quasi-Newton method?

  • Jaehoon
    Jaehoon
    Altair Employee
    edited June 10

    Dear Mr. Kim

     

    Thank you for kindly responding. As you can see from the results, I have folowed the manual for setting up and running the optimization.

    1) However it is not explained there WHY the goal, which is defined as 10 log (Realized Gain -phi) is 2 orders lower than the same Realized Gain -phi in dB in plot next to it, in the same simulation!

    The obvious conclusion is that the actual computed goal(cost function) value is NOT the same as the expression characterizing it. So WHAT IS IT?

    There is also no exoplanation why, when maximizing (Realized Gain -phi), and minimizing (Realized Gain -theta), the optimization does not ubuquintuously converge to the maximum of (Realized Gain -phi), but floats somewhere in diagonal polarization.

    2) The above should explain you why the plot you have shwn to me is not the Gain, but a cost function which is something different. Therefore I was attempting to plot explicitly "the Gain", but versus the iteration number. Feko offers me only frequensy or angle as a horizontal axis, or I missed something.

    3) No. I do not need to restart the optimization. After running the optimization for a few hours, I will get a cost plot with multiple optimal candidates. Because of discrete nature of the problem, the lwest cost is not necessary the best engineering solution.

    Therefore it is important to explore multiple good solutions for determining the best configuration. In HFSS it is performed simply bu clicking at a point of the cost-plot. I wonder, how can I recall here the requested iteration, to display it in the POSTFEKO, and then to pass it to CADFEKO as a solution.

    **) btw, is there a button to apply a solution to CADFEKO? Is it updated when uptimizing only to the base project.CFX file on each run until stopped?

     

    Q4) unfortunately these original names do not ring any bell to me. Which of them is the simplest Newton/Quasi-Newton method?

    Hello Andrew,

    I am sorry, but I don't fully understand all of your questions without any simulation results.


    Let me give you some answers as below.
    Q: is there a button to apply a solution to CADFEKO? Is it updated when optimizing only to the base project.CFX file on each run until stopped?
    -> As far as I know, you will have ~_optimum.cfx file generated automatically by Feko after finishing all the optimization running.
     
    Q: Which of them is the simplest Newton/Quasi-Newton method?

    -> As far as I understand none of the standard optimization methods is related to the Newton / Quasi-Newton method.

     

    Regards,

    Jaehoon

  • Andrew_21618
    Andrew_21618 Altair Community Member
    edited June 11

    optimum.cfx. Oh, so you cannot manually stop the infinite optimization which got dwelling in the valey of uncertainties? In HFSS the optimizer goes to some valey, where you may point-and-click at every multi-variable set solution and choose the most appropriate... I was hoping to see something at least close to browsing the solutions against the cost.

     

    Ok, more about the problem so you can get the overall image. It is a test, where I want to see how adequately it optimizes. Very simple rectangular waveguide with a parametric slit in its broad wall. Starting from a small diagonal aperture it should converge to a long moderately wide transverse aperture.

    image

    If I have mistaken phi with theta, coordinate systems may differ from what you are accustomed to, it still would produce some result.

    The main point is that I want to see the cost function is equal to the realized Gain calculated in the requested property repotr. It should be. But it is not.

  • Jaehoon
    Jaehoon
    Altair Employee
    edited June 12

    optimum.cfx. Oh, so you cannot manually stop the infinite optimization which got dwelling in the valey of uncertainties? In HFSS the optimizer goes to some valey, where you may point-and-click at every multi-variable set solution and choose the most appropriate... I was hoping to see something at least close to browsing the solutions against the cost.

     

    Ok, more about the problem so you can get the overall image. It is a test, where I want to see how adequately it optimizes. Very simple rectangular waveguide with a parametric slit in its broad wall. Starting from a small diagonal aperture it should converge to a long moderately wide transverse aperture.

    image

    If I have mistaken phi with theta, coordinate systems may differ from what you are accustomed to, it still would produce some result.

    The main point is that I want to see the cost function is equal to the realized Gain calculated in the requested property repotr. It should be. But it is not.

    Hello Andrew,

    I understand that your goal (or cost) function is  "realised gain" in that direction in your optimization.

    However, I still don't know when you are seeing something different. Please try to plot the realised gain in your right hand-side figure (above).

    Could you please sharing your Feko models showing the problem? (My email is jaehoon@altair.com.)

    Best regards,

    Jaehoon

  • Andrew_21618
    Andrew_21618 Altair Community Member
    edited June 13

    Hello Andrew,

    I understand that your goal (or cost) function is  "realised gain" in that direction in your optimization.

    However, I still don't know when you are seeing something different. Please try to plot the realised gain in your right hand-side figure (above).

    Could you please sharing your Feko models showing the problem? (My email is jaehoon@altair.com.)

    Best regards,

    Jaehoon

    The first image is exactly what you are asking. On the right, the point is a realized gain. It is a point because I take only broadside for both, the gain calc and for optimization (besically the same source). Then in the optimization I take 10Log, and for Gi I take dB(i). But the numbers are very different. And that was very unexpected.

     

    Sorry, the exact feko model was modified while we were discussing. I proceed to the coax configuration, and there many other bugs/or/features appeared. So today I am planning to do the same with coax and will share it later.