How to fit damped oscillation curves
59 views (last 30 days)
Show older comments
Hey folks,
I'm currently trying to get some oscillation characteristics (first/second/third max/min, logarithmic decrement, damping ratio) out of some data I've measured.
My attempts haven't led to useful results yet, most probably due to the non-sinusoidality, noise and/or parasitic sub-peaks of the graphs.
Is there a good way to handle this in matlab? I'm quite a newbie on this.
I would appreciate any help on this topic! Thank you very much in advance!
0 Comments
Answers (4)
Star Strider
on 21 Jul 2015
I’m not certain how closely you want to fit it. One option for fitting a sine curve is Curve fitting to a sinusoidal function.
In the context of my Answer there, the ‘fit’ function and fminsearch call for your data become:
fit = @(b,x) b(1).*exp(b(2).*x).*(sin(2*pi*x./b(3) + 2*pi/b(4))) + b(5); % Function to fit
s = fminsearch(fcn, [yr; decay; per; -1; ym]) % Minimise Least-Squares
with the addition of ‘decay’, the exponential decay constant. An appropriate initial estimate for it is -1. My function is a ‘smoothed’ sinusoidal function, so the fit will be approximate.
I would do a fft of your data to see what other frequency components are in it. You could then create a regression function that would approximate it more closely.
18 Comments
Star Strider
on 25 Jul 2015
Simulating RLC circuits is not the problem, but modeling a specific RLC circuit requires that we know how the components are configured. Is it series, parallel, or some combination? That has a decisive effect on its characteristics and frequency-dependent impedance.
If we can’t at least approximate R(t) with some sort of function, then any attempt at modeling its behaviour is impossible. Spark gaps are not new, and formed the basis of wireless transmitters up to about a century ago. It amazes me that there is no mathematical model of the electrical characteristics of one.
In any event, without knowing the configuration of the RLC circuit model of your system, and having a realistic model of R(t). I can go no further.
the cyclist
on 21 Jul 2015
Edited: the cyclist
on 21 Jul 2015
If you have the Statistics and Machine Learning Toolbox, I would suggest that you look at using the nlinfit function to do a fit like this. You can define your own specific functional form, and fit to that. There are examples on that page that can help you with syntax.
0 Comments
John D'Errico
on 24 Jul 2015
Is there a good way to handle a hard problem where you have no model for the process, where there is nasty, non-normal noise, random bumps, discontinuities? Hmm. not really.
Personally, I'd start by building a shape that does reflect this process. A sine wave, because it is symmetrical, does not do so, even though it is periodic. The ramp up and ramp down behaviors are clearly not the same here. So, were it for me to do (I have seen no actual data, so I cannot even play around with what you have) I would break that curve you have shown into 5 distinct segments. Essentially, I would
1. Locate where the curve crosses zero between each segment.
2. Then shift each piece on top of each other, translating them in time so they now overlap.
3. Now, create a model of this "process". I'd probably play with a principle components solution, that would allow me to model these 5 curves, and find one characteristic curve that represents the overall shape. The PCA analysis would find a basic curve shape, then scaled by a different amount for each segment.
4. I would then build a spline model from that estimated curve. My SLM toolbox would be useful to do this, since I would constrain the curve to pass through zero at each end, use periodicity constraints, etc.
5. Finally, I would now model the entire curve as a piecewise amalgamation of those segments.
I can't suggest much more than that without any actual data.
1 Comment
Star Strider
on 24 Jul 2015
See Also
Categories
Find more on Manage System Data in Help Center and File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!