Continue to Site

Eng-Tips is the largest engineering community on the Internet

Intelligent Work Forums for Engineering Professionals

  • Congratulations KootK on being selected by the Eng-Tips community for having the most helpful posts in the forums last week. Way to Go!

Data driven calibration model (python)

Status
Not open for further replies.

Amine A

Mechanical
May 9, 2020
80
Hello community,
I want to formulate a data-driven calibration model between physics and simulation results. I have an a model encapsulated in an executable program (data_generator.py) that for a load 𝑃 located at 𝑦 = 𝐿, generate 𝑁𝐵 random beam widths 𝑏(𝑥) and computed the beam displacement 𝑤(𝑥) at 𝑁 positions, at locations 𝑥(𝑖) = (𝑖 − 1) ⋅ 𝐿/(𝑁 − 1) ( file attached shows the beam )
I run the two cases (simulation results 'case 1' and physical model 'case 0')
Usage: data_generator.py <case> ...
* Case 0: Physical model
Usage: data_generator.py 0 <L> <h> <b> <P> <N> <y>
- L: Beam length (default 1)
- h: Beam height (default 0.01)
- b: Beam width (default 0.01)
- P: Load (default 30)
- N: Number of steps (default 100)
- y: Position to apply load on beam (default equal to L)
* Case 1: Simulation results
Usage: data_generator.py 1 <L> <h> <b> <P> <N> <y>
- L: Beam length (default 1)
- h: Beam height (default 0.01)
- b: Beam width (default 0.01)
- P: Load (default 30)
- N: Number of steps (default 100)
- y: Position to apply load on beam (default equal to L)
it gives me results in file attached. I don't know how to proceed to do a data-driven calibration model. anyone has an idea please ?
case1_mysboj.jpg
case0_xup6uw.jpg
beam_eo5cmp.jpg
 
Replies continue below

Recommended for you

Step 1 define your goals.
Step 2 describe an algorithm.
Step 3 write a program.
 
Thanks for the reply, the question is "Design, train and validate the data-driven calibration model between physics and
simulation results for the displacement 𝑤(𝑥)" . What I understood from the question is :
goal : minimizing error for "w(x)" between the two models
but concerning the algorithm, should I search for something similar of "minimizing error" ??
Thanks [dazed]
 
Ouch. I think you are horribly close to using ML to perform addition, which mostly ends in tears. Anyway, a quadratic error function is usually robust.

Cheers

Greg Locock


New here? Try reading these, they might help FAQ731-376
 
hahah I though about both ML and RMSE error. But I think I will use RMSE and see how it will work. But the problem is how to preceed , I don't know if the concept of data-driven calibration model will require to do a mechanical model of the beam ... ??
 
This would seem to be a "student" question, possibly of the professional development type, with the purpose of learning some concepts, right?

Because as Greg has already noted, using machine learning to compare a mathematical model of something as simple as a constant section cantilever beam against physical tests wouldn't have a sound business case.

In more general terms, it seems that you want to explore how to define a parametric model that can "self tune" against physical test data.

I think you're struggling because the simple cantilever beam is too simple. The equations are explicit, and accurate. So the expected error between simulation and physical test will be minute, and there is noting for the calibration model to do.

 
In fact we want to understand more the concept of hybrid twin so we want to apply it to a simple problem. And so logically ,yes, explore how to define a parametric model that can "self tune" against physical test data is the solution for the question I think... I need to have ideas how to proceed !
 
Thus far I don't see any data that comes from a physical test.

Everything looks like the output of a computer program.
 
I know, they give us directly the data of physical tests (in the figures I showed data 0 are supposed physical tests results) and simulated results (data 1)
 
I'm not even sure what you mean by "data-driven calibration model," since ANY calibration is, by definition, data-driven; you compare measurement, "data", with a standard to do a calibration

TTFN (ta ta for now)
I can do absolutely anything. I'm an expert! faq731-376 forum1529 Entire Forum list
 
My guess, by way of trivial example:

Given:

Mathematical model: y = mx + b

Physical test data: (x, y) points: (3,4) (5,6)

Find: An algorithm to determine m and b such that when used in the model the output of the model matches the physical test data with an acceptable accuracy.

 
IRstuff even me am trying to understand this is the problem (figures below)
MintJulep thanks for the idea [smile] I will try to see if the "m" and "b" should be a function of parameters given in the problem (shown in figures below)
fig2_qznusl.jpg
fig1_pm2s6v.jpg
 
The typical paradigm for text books is that there are some number of pages providing knowledge, and them some pages with questions intended to assess the level of assimilation of the knowledge by the reader.

I recommend that you read the providing knowledge pages.
 
Yes[smile]
I am thinking about regression but here I see he is demanding it in the second question [hourglass]
 
You should have led with that; it would have saved you hours.

So, it seems to me that you would start by looking in Roarks' Formulas for Stress and Strain, find the simply supported beam with a concentrated load, parameterize the equation with unknowns and then use least squares fit to the data and solve for the unknowns.

TTFN (ta ta for now)
I can do absolutely anything. I'm an expert! faq731-376 forum1529 Entire Forum list
 
I don't know for the first question if I should consider : w1(x)=w2(x)+epsilon=ax+b+epsilon (if suppose it's linear) ; where w1 is deflection for first model and w2 for the second, and epsilon is the RMSE error. and try to do an algorithm that should minimize the epsilon.
And I am still confused if I should use the parameters done in the models(that's maybewhy you said look for stress strain relation) like L(length), h(height), b(width),P(load), N (nb of steps) and Y(position to apply load)
another point, I wanted to see the results of the two model here's the results

results_vgfv3x.jpg

according to results I thinks maybe it's not preferable to use linear approximation
 
No, to your last question, those are all the independent inputs. And no to your linear model, since your graph is obviously not linear, so model fit will fail there. Again, consult Roark; his deflection equation uses a cubic, so I would at least start with a quartic polynomial and use the data to find the 5 coefficients; hopefully, you'll wind up with a mostly cubic polynomial with perhaps a weak quartic contribution. You actually have to solve for 7 unknowns, since elastic modulus and moment of inertia are presumably unknown, as well.

TTFN (ta ta for now)
I can do absolutely anything. I'm an expert! faq731-376 forum1529 Entire Forum list
 
here's the analytical expression of w(x)

w_x_lx0iwa.jpg
 
I've just noticed that in the problem the beam width varies with x, hence the simple equation given does not apply.

Cheers

Greg Locock


New here? Try reading these, they might help FAQ731-376
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor