Averaging Hysteresis Data - how to do it?
27 Ansichten (letzte 30 Tage)
Ältere Kommentare anzeigen
Giuseppe Naselli
am 16 Dez. 2013
Kommentiert: Fede
am 7 Feb. 2024
Hi All,
below damper Force Vs Velocity for a typical 2-way adjustment damper is shown and as expected a typical hysteresis shape is obtained. We could imagine the data as the sum of 2 curves: one curve is given when the velocity goes from NEGATIVE to POSITIVE and the other is obtained when the velocity goes from POSITIVE to NEGATIVE
I want to use this damper data on my vehicle dynamics model and in order to speed up the processing time (as there are 4 dampers) I would like to extrapolate a curve with the following features
- Only one line
- This line should pass the middle of the two curves (a sort of average, an ideal damper with no hysteresis)
I would appreciate some suggestions on how to tackle this problem. how would you do that?
Many thanks for you help
(DATA attached)
Thanks in advance
G
0 Kommentare
Akzeptierte Antwort
Mischa Kim
am 4 Jan. 2014
Hello Guiseppe, try to use curve fitting. In MATLAB, go to the Apps tab and find the Curve Fitting app (in the math, statistics and optimization folder). Select as X and Y data Velocity and Force, respectively. Smooth Splines will probably work pretty well, you can also adjust the smoothness/roughness of the fit.
3 Kommentare
Fede
am 7 Feb. 2024
Let's assume you have your datain (x,f) format, meaning displacement and force:
% First, I calculate the index at which the data turns, to separate up and down curves:
% hystereis turning point:
[x_turning, idx] = max(x_data);
x_up = x_data(1:idx);
f_up = f_data(1:idx);
x_down = x_data(idx:end);
f_down = f_data(idx:end);
% plot(x_up, f_up, 'o')
% plot(x_down, f_down, 'x')
% Then, Filter to only keep unique values:
%Keep unique values:
[x_up,ia,~] = unique(x_up);
f_up = f_up(ia);
% plot(x_up,f_up, '.');
[x_down,ia,~] = unique(x_down);
f_down = f_down(ia);
% plot(x_down,f_down, '.');
% Fit curves for each segment:
nQueryPoints= 100;
xx_up = linspace(min(x_up), max(x_up), nQueryPoints); % Generating points for smooth curve
yy_up = interp1(x_up,f_up,xx_up);
% plot(xx_up, yy_up, 'r');
xx_down = xx_up; % Note: I take the same query points as xx_up, to be ale to later calculate average value :)
yy_down = interp1(x_down,f_down,xx_down);
% plot(xx_down, yy_down, 'g');
% Calculate Average value:
xx_avg = xx_up;
yy_avg = (yy_up+yy_down)./2;
plot(xx_avg, yy_avg, '--b');
It doesn't give you a spline, but it's something!
Weitere Antworten (0)
Siehe auch
Kategorien
Mehr zu Interpolation finden Sie in Help Center und File Exchange
Produkte
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!