How can I improve the accuracy of Excel's SOLVER add-on for curve fitting?

  • Thread starter flash
  • Start date
In summary, the conversation discusses the use of Excel and its Solver add-on to find the best fitting cosine function for a set of data points. However, the Solver does not always provide the expected results and may only find a local minimum instead of the global minimum. The conversation also mentions an alternative optimization Excel Add-in that may be more effective.
  • #1
flash
68
0
Hi
I'm trying to use Excel to find a cosine function, f(x)=a cos n (x-b) + c, that best fits a whole lot of data points. I'm doing this using the Solver add-on in Excel. I have it set up to minimise the sum of the squared differences between each data point and the function's value. I'm pretty confident that its all set up correctly.
The problem is, solver does NOT do what it claims to do. It says it minimises the value in the cell by changing variables a, n, b and c but I can manually input variables that give a much lower value. Solver gives a different value depending on what is initially in the cells of variables a, n, b and c. I believe it is finding some kind of local minimum which is not the overall minimum.
Any ideas? I was hoping someone might have come across this problem with solver and know a workaround :smile:
 
Physics news on Phys.org
  • #2
I know the question was several months ago, but this reply might have some use, even if for future activity. I haven't been very impressed with the Excel Solver, however I am very happy with the optimization Excel Add-in you can get from here:

http://digilander.libero.it/foxes/SoftwareDownload.htm

scroll down the page until you find "Didactic Optimization Tool for EXCEL".

Having said that, I'm not sure any tool can do a very good job on finding a global minimum. I think they all will provide a different answer depending on the starting point. Global optimization is very difficult. As a professor friend of mine told me: "finding the global optimum requires trying all possibilities".
 
  • #3


I understand your frustration with the limitations of Excel's SOLVER add-on. It is important to note that while SOLVER can be a useful tool for optimization problems, it is not a perfect solution and may not always give the desired results. In this case, it seems like SOLVER may be finding a local minimum instead of the overall minimum, which is a common issue with optimization algorithms.
One workaround could be to try different starting values for your variables a, n, b, and c to see if that leads to a better solution. You could also try using a different optimization algorithm or a different software specifically designed for curve fitting, such as MATLAB or Python libraries like SciPy or NumPy.
It is also important to carefully check your data and the setup of your optimization problem to ensure that everything is correct and there are no errors or inconsistencies that could be affecting the results.
Overall, while Excel's SOLVER add-on can be a useful tool, it is important to be aware of its limitations and to explore alternative methods when necessary.
 

Related to How can I improve the accuracy of Excel's SOLVER add-on for curve fitting?

What is the SOLVER add-on in Excel?

The SOLVER add-on in Excel is a tool that allows users to find optimal solutions to complex problems by changing certain variables in a worksheet. It uses mathematical algorithms to find the best possible solution based on the given constraints.

How do I access the SOLVER add-on in Excel?

The SOLVER add-on can be accessed by clicking on the "Data" tab in the Excel ribbon, then selecting "Solver" from the "Analyze" group. If the add-on is not visible, it can be enabled by going to "File" > "Options" > "Add-ins" and selecting "SOLVER" from the list of add-ins.

What types of problems can be solved using the SOLVER add-on?

The SOLVER add-on can be used to solve linear and nonlinear optimization problems, as well as problems with multiple constraints and variables. It can also be used for regression analysis and decision-making situations.

What are the limitations of the SOLVER add-on?

The SOLVER add-on has a few limitations, such as not being able to handle problems with more than 200 variables, and not being able to solve problems with integer or binary constraints. It also may not always find the global optimum solution, but rather a local optimum solution.

How do I interpret the results from the SOLVER add-on?

The SOLVER add-on provides the optimal values for the changing variables, as well as a report on the sensitivity of the solution to changes in the constraints. It also provides a summary of the solution and any potential issues that may have occurred during the solving process.

Similar threads

  • Introductory Physics Homework Help
Replies
28
Views
1K
  • Computing and Technology
Replies
10
Views
1K
  • Set Theory, Logic, Probability, Statistics
Replies
4
Views
953
  • Precalculus Mathematics Homework Help
Replies
8
Views
936
  • Linear and Abstract Algebra
Replies
4
Views
879
  • Set Theory, Logic, Probability, Statistics
Replies
16
Views
2K
  • Introductory Physics Homework Help
Replies
7
Views
1K
  • MATLAB, Maple, Mathematica, LaTeX
Replies
11
Views
26K
  • General Math
Replies
6
Views
800
  • STEM Educators and Teaching
Replies
5
Views
695
Back
Top