Community Tip - Want the oppurtunity to discuss enhancements to PTC products? Join a working group! X
Hello folks,
I have a weird problem: for some measurement data I'm trying to find the roots. This data appears to be best approximated by a sine function. As MathCad's roots/polyroots function works with rational functions only (or am I wrong on this one?) I tried to use the MATCH function together with the control parameter "near".
Weird enough, it finds only a few of the roots (see graph in the attached MC 11 file). Why doesn't it work and how could I improve this?
Thanks in advance
Raiko
Solved! Go to Solution.
Slightly different approach and I have used your match function.
Mike
Your fitting functions doesn't look right, have you tried using the smoothing functions with Mathcad?
Mike
Hello Mike,
yes this fitting function is an approximation by utilising a sine-function. I tried smoothing, but I'm more confident with the sine function.
Nonetheless, this doesn't solve my problem: finding the roots. Do you believe that MATCH might work better with a smoothed data set?
Thanks
Raiko
You don't have the correct x-axis for the zero points.
The data doesn't look very sinusoidal to me. If you look at the spectrum there's at least two main frequency components. I think even two frequency components could not model that data very well though.
I have included a different approach to find the zeros using a function that finds the maxima or minima in data (I've posted this function before).
Hello Richard,
you're correct in guessing that this isn't a pure sinusoidal function. It is a oscillator who's hampered by a second oscillator ; coupled therefore.
However, with this fit it is easier to determine the frequency of the oscillation. I still don't get it why the match function fails! Any idea?
Anyhow, thanks a lot for your time. Your approach yields better results.
Raiko
The match isn't failing. You are just plotting the dots with the wrong x-axis, so they are off the graph.
you're correct in guessing that this isn't a pure sinusoidal function. It is a oscillator who's hampered by a second oscillator ; coupled therefore.
Hence the two frequency components
However, with this fit it is easier to determine the frequency of the oscillation.
Is that the end goal? To get the frequency?
Richard,
only now I realized that you have send another post.
Yes, I wanted to check the frequency and I ventured to assume that by determining the roots of my fitting function might be the easiest way. But then I noticed the zero points being off.
Raiko
But you can just calculate the frequency of the fitting function from j/n.
Also, I think you should be fitting the sum of two decaying sinusoids, rather than only one. You should do that only for the points above about 100 seconds, and you shoud do it by least squares, rather than manually.
Slightly different approach and I have used your match function.
Mike
Hello Mike, Hello Richard
thank you for your help. This did the trick!
Raiko
Raiko,
I forgot to mention it a while back - where is the Match function defined in your worksheet? I have never seen the 'near' argument used.
Mike
Hello Mike,
what a persistence ! 😉
You'll find the "near" in Match at the Zeros function. Match(=,fir,"near") is assigned to Q.
Cheers
Raiko
You'll find the "near" in Match at the Zeros function. Match(=,fir,"near") is assigned to Q.
I take it the "near" is used to instruct the Match function to find scalars close to zero?
Where did you find the use for this? Can't see it in any of the help folders?
Mike
Mike,
a description of the available parametrs (i.e. control parameters) for the Match function is given in "Data Analysis Estension Pack" in the Matching and Lookup section of the e-book.
Raiko
P.S. Sorry, couldn't copy it from the e-book. Have a look yourself
a description of the available parametrs (i.e. control parameters) for the Match function is given in "Data Analysis Estension Pack" in the Matching and Lookup section of the e-book. Raiko
P.S. Sorry, couldn't copy it from the e-book. Have a look yourself
Cheers.
Learn something new every day hey!!!!
Cheers
Mike