Discussion Closed This discussion was created more than 6 months ago and has been closed. To start a new discussion with a link back to this one, click here.

Using the frequency of max value from frequency domain study as objective function

Please login with a confirmed email address before reporting spam

Hi,

I'm simulating a speaker and adjusting Cms to adjust f0 to desired frequency by optimization.

I know that coil velocity will reach it's maximum value when resonance, so I trying to use (maxop1(shell.u_tZ)-500[Hz])^2 as optimization function.

But the result seemed that every frequency is independent so maxop1() cannot get overall maximum value.

Is there any function or method to define the optimization?

Thank you in advanced.


4 Replies Last Post Nov 7, 2022, 5:11 a.m. EST
Edgar J. Kaiser Certified Consultant

Please login with a confirmed email address before reporting spam

Posted: 2 years ago Oct 14, 2022, 8:47 a.m. EDT

You may want to check this blog contribution: https://www.comsol.de/blogs/using-the-previous-solution-operator-in-transient-modeling/

I am not sure if the previous solution works in frequency domain studies. I used it successfully in time-dependent studies.

Cheers Edgar

-------------------
Edgar J. Kaiser
emPhys Physical Technology
www.emphys.com
You may want to check this blog contribution: https://www.comsol.de/blogs/using-the-previous-solution-operator-in-transient-modeling/ I am not sure if the previous solution works in frequency domain studies. I used it successfully in time-dependent studies. Cheers Edgar

Please login with a confirmed email address before reporting spam

Posted: 2 years ago Oct 16, 2022, 9:39 p.m. EDT

Hi Kaiser,

Thank you very much. I'll give it a try.

Hi Kaiser, Thank you very much. I'll give it a try.

Kristian Ejlebjærg Jensen COMSOL Employee

Please login with a confirmed email address before reporting spam

Posted: 2 years ago Oct 31, 2022, 8:31 a.m. EDT

Which optimization solver are you using? Is it gradient based or not? The max/min operators are not supported for gradient based optimization.

Which optimization solver are you using? Is it gradient based or not? The max/min operators are not supported for gradient based optimization.

Please login with a confirmed email address before reporting spam

Posted: 2 years ago Nov 7, 2022, 5:11 a.m. EST
Updated: 2 years ago Nov 7, 2022, 5:11 a.m. EST

Which optimization solver are you using? Is it gradient based or not? The max/min operators are not supported for gradient based optimization.

Hi Kristian,

Thank you for your reply, I didn't notice that, I used BOBYQA as my optimization solver, I remember this solver isn't based on gradient based optimization.

Also, I found a method that can achieve my goal perfectly, in the objective function I simply typed in "abs(Ztot)" which means absolute value of impedance, then in frequency domain step I only typed my goal frequency, for instance, 550 Hz, by this method, I can simply adjust the control varaibles to maximize my objective function.

>Which optimization solver are you using? Is it gradient based or not? The max/min operators are not supported for gradient based optimization. Hi Kristian, Thank you for your reply, I didn't notice that, I used BOBYQA as my optimization solver, I remember this solver isn't based on gradient based optimization. Also, I found a method that can achieve my goal perfectly, in the objective function I simply typed in "abs(Ztot)" which means absolute value of impedance, then in frequency domain step I only typed my goal frequency, for instance, 550 Hz, by this method, I can simply adjust the control varaibles to maximize my objective function.

Note that while COMSOL employees may participate in the discussion forum, COMSOL® software users who are on-subscription should submit their questions via the Support Center for a more comprehensive response from the Technical Support team.