Approximating Coefficients for Line Approximation from Experimental Data

  • Context: Graduate 
  • Thread starter Thread starter Zurtex
  • Start date Start date
Click For Summary
SUMMARY

The discussion focuses on approximating coefficients for a line defined by the equation y = a_0 + a_1 sin x + a_2 sin 2x + b_1 cos x + b_2 cos 2x using experimental data points. The method proposed involves constructing a matrix M with specific sine and cosine terms and applying the least squares approximation to minimize the sum of the squares of the differences between the observed data points and the model. The coefficients can be determined by solving the linear system (M^T M)A = M^T Y, where A represents the coefficients vector. This approach is effective even with limited data points, such as five values for x and y.

PREREQUISITES
  • Understanding of linear algebra, specifically matrix operations
  • Familiarity with least squares approximation techniques
  • Basic knowledge of trigonometric functions (sine and cosine)
  • Proficiency in programming for data analysis (e.g., Python or MATLAB)
NEXT STEPS
  • Study the implementation of least squares approximation in Python using NumPy
  • Explore matrix operations and linear systems in MATLAB
  • Learn about the application of trigonometric functions in data modeling
  • Investigate advanced regression techniques for fitting experimental data
USEFUL FOR

Researchers, data analysts, and engineers involved in experimental data analysis and modeling, particularly those interested in applying trigonometric functions for curve fitting.

Zurtex
Science Advisor
Homework Helper
Messages
1,118
Reaction score
1
I've got a situation where I can approximate a line by the function:

[tex]y = a_0 + a_1 \sin x + a_2 \sin 2x + b_1 \cos x + b_2 \cos 2x[/tex]

From experimental data I will be able to find certain values for x and y, namely yn and xn for some value of n. Now I can easily write a computer program which could work out the co-efficients in this problem if I have 5 values for y and 5 values for x. However, being a particle situation and wanting as many results as possible or perhaps not being able to gain that many results due to constraints, how would I be able to approximate these co-efficient please?
 
Mathematics news on Phys.org
How about least squares approximation?

Let the ith row of an n by 5 matrix [tex]M[/tex] be given by [tex][ 1\ \sin(x_i)\ \sin(2x_i)\ \cos(x_i)\ \cos(2x_i)][/tex], and let [tex]Y=[y_1,\ldots,y_n]^T[/tex].

Then coefficients that will minimize the sum of the squares of the differences of your data points to [tex]y = a_0 + a_1 \sin x + a_2 \sin 2x + b_1 \cos x + b_2 \cos 2x[/tex] will be any column [itex]A=[a_0,a_1,a_2,b_1,b_2]^T[/itex] which satisfies the linear system [itex](M^{T}M)A=M^{T}Y[/itex]
 
Thanks I haven't seen that method yet (well I've researched it but not been able to make sense of it). Thanks a lot, just need to try and make sense of it, but I think I can :smile:
 

Similar threads

  • · Replies 3 ·
Replies
3
Views
3K
  • · Replies 3 ·
Replies
3
Views
3K
  • · Replies 11 ·
Replies
11
Views
3K
  • · Replies 8 ·
Replies
8
Views
2K
  • · Replies 7 ·
Replies
7
Views
2K
  • · Replies 5 ·
Replies
5
Views
6K
  • · Replies 2 ·
Replies
2
Views
6K
  • · Replies 14 ·
Replies
14
Views
2K
  • · Replies 30 ·
2
Replies
30
Views
3K
  • · Replies 4 ·
Replies
4
Views
4K