Approximating Differential Equation on the Basis of Measured Values

Approximating Differential Equation on the Basis of Measured Values, not physical derivation.

When starting up technical systems one can utilize a plant step transfer function for getting data like (x = time, decimal commas)

x y

0 0 0,087 0,001 0,174 0,011 0,262 0,066 0,349 0,158 0,436 0,289 0,524 0,415 0,611 0,560 0,698 0,661 0,786 0,764 0,873 0,834 0,961 0,895 1,048 0,922 1,135 0,956 1,223 0,968 1,310 0,988 1,397 0,978 1,485 0,998 1,572 0,994 1,660 1,004 1,747 0,994 1,834 1,003 1,922 0,994 2,009 1,001 2,096 0,996 2,184 1,000 2,271 0,994 2,359 1,001 2,446 0,990 2,533 1,000

I searched the internet for getting the appropriate differential equation, e.g.

F(s)=(T*s +1)^n

or

A3*y''' + A2*y'' + A1*y' + y = 1

and could'nt find a website.

T=? n=?

or

A1=? A2=? A3=?

Can someone provide the solution for comparison under the condition

n
Reply to
JCH
Loading thread data ...

This looks more like a test since we know you have a program to solve these kinds of problems. Good test though. I will work on it when I have time. It will be interesting if anyone else will be up to the challenge.

Peter Nachtwey

Reply to
pnachtwey

You've searched on the key words "system identification"?

Reply to
Tim Wescott

Can't you see? It is a test for all to try to solve. If you have looked at JCH's website you can see that he has a program that will do system identification. Yes, we are going to be playing JCH's game on his field. However, it is a worthy problem because if you can master system identification then tuning takes much less tweaking and coffee drinking. Game on.

Peter Nachtwey

Reply to
pnachtwey

I have solutions for n=3D1 to 5. I will share my solution for n=3D5 since that wasn't asked for. I don't want to spoil the game for anybody else. I will wait a while before posting my solutions to give others a chance.

For n=3D5 the solution is n=3D5 T=3D0.12305 MSE=3D0.000024 MSE is the mean squared errror. Why limit n to 3?

JCH, is figuring out the forcing function r(s) =3D 1/s and F(s) should really be 1/(T*s +1)^n part of the test?

Peter Nachtwey

Reply to
pnachtwey

I don't wish to get drawn into a 'game', so when he's being reasonable I answer his posts for the edification of others if not him, and when he gets all weird I ignore them. So far he hasn't gotten bad enough for me to plonk him, but that may come.

Game _off_.

Reply to
Tim Wescott

I have solutions for n=1 to 5. I will share my solution for n=5 since that wasn't asked for. I don't want to spoil the game for anybody else. I will wait a while before posting my solutions to give others a chance.

For n=5 the solution is n=5 T=0.12305 MSE=0.000024 MSE is the mean squared errror. Why limit n to 3?

The limit n(max)=3 was chosen because I think that companies in general would'nt use higher order implementations for control devices.

That basically means e.g. compensate/approximate 5. order with 3. order. So one must have an additional accurate approximation.

See also equations of Page 1

formatting link
think of 1 order higher.

Reply to
JCH

JCH is being reasonable. He has provided enough information to get an answer and his test data is pretty simple. Here is my partial solution: ftp://ftp.deltacompsys.com/public/NG/Mathcad%20-%20SysID%20JCH.pdf I think it is important that people give this a try. System identification is one of those things that separates the tweakers and coffee drinkers from the real control engineers. I think this is important enough that I will show how I calculate my solution sometime after the next weekend. I don't want to ruin the experience of the aha discovery experience for anyone.

Note my solution assumes that all the poles are specified by just one time constant. One may be able to get a better solution if one tries a different time constant for each pole.

Peter Nachtwey

Reply to
pnachtwey

So riddle me _this_, Peter.

If you are tuning a process that's nonlinear, and whose apparent linear model therefore necessarily changes with tuning, wouldn't it be necessary to repeat ones tests as one changes ones tuning?

And if one were smart enough to repeat ones tests to get a refined model, and refine ones tunings as a consequence of the apparent change in the plant model, wouldn't it be intellectually honest to recommend just that procedure to others?

And if this process takes time, wouldn't it be wise and kind to recommend patience in the taking of the data?

And if, in advocating patience in taking one's data, one mentioned that one needed to tweak (or in other words to re-tune based on one's refined model) and drink coffee (or in other words to not rush to an incorrect tuning based on a too-hurried measurement process), wouldn't one expect true professionals to treat this advice with respect, even if they somehow disagreed that one should engineer from complete and correct data?

And then, would one consider endless derogatory mentions of "tweaking and coffee drinking" from one of ones peers to be a bit, well, _un_professional?

Please explain _that_, while you're playing games with JCH.

Thanks in advance.

Reply to
Tim Wescott

And thank you, Tim, For so eloquently saying what I was thinking. Mathematical solutions are starting points that are suspect till proven effective by actual trials.

A control engineer who often tweaks and drinks tea, refining an approximate solutions (approximate because of linear assumptions) on nonlinear systems,

John Popelish

Reply to
John Popelish

See comparison

formatting link
Peter, your result: Fig.1

F(s)=(0.206977*s+1)^3

equivalent to

0.01042659*y''' + 0.1323628*y'' + 0.6381982*y' + y = 1.00

This is a valid but not a good result.

A better result: Fig.2

Reply to
JCH

Newsbeitragnews: snipped-for-privacy@z24g2000prh.googlegroups.com...

I question your numbers

My Mathcad computes. I just cut and pasted these number from my Mathcad.

.886679e-2*s^3+.128518*s^2+.620931*s+1. This is more than simple round off error. I agree the results for n=3 aren't very good. I think it is strange that your result for n=3 looks like my n=5. You should recheck how you calculate your numbers. 0.206977^3=0.008867 not 0.0104...

Peter Nachtwey

Reply to
pnachtwey

That's your 3rd oder result. See above.

Solutions:

Peter: 0.008867000*y''' + 0.128518*y'' + 0.620931*y' + y = 1.000 JCH : 0.009598422*y''' + 0.104815*y'' + 0.541117*y' + y = 1.000

That's the first time I show my numbers.

In addition the program finds boundary values (start values y''(0), y'(0), y(0)) so that the result in Fig.2 can be found as is shown:

formatting link

These boundary values should be used in the target filter F3(s) preventing overshooting u:

formatting link
The basic idea is best control for PT5 system.

Reply to
JCH

Newsbeitragnews: snipped-for-privacy@v23g2000prn.googlegroups.com...

Your solution has two imaginary poles. It is not in the form of 1/(T*s

+1)^n as indicated on your website. My solution current solution is limited to real poles as on your website. I see what I come up with when I allow imaginary poles too.

Peter Nachtwey

Reply to
pnachtwey

Why are you assuming that the roots are repeated? Why are you assuming that the plant transfer function has no zeros?

Reply to
Tim Wescott

Or pure delay.

Reply to
John Popelish

It is JCH's test/game. The problem is simple. Why make it harder? The problem should be kept simple until there are more people that can solve it.

You can make up your own test that includes a dead time.

Peter Nachtwey

Reply to
pnachtwey

Ok, therefore I used ???, not T.

0.009578639 y ' ' ' + 0.1046687 y ' ' + 0.5406281 y ' + y = 1.000227

Start values

y (0) = -0.000878999 y ' (0) = 0.2983399 y ' ' (0) = -10.97643

Solve this ODE and you have the solution/approximation shown Page 1 (Fig.2) and Page 2 in:

formatting link

Reply to
JCH

Look at Page 2

formatting link
I just assume that the data points (blue points) are represented best with the ODE (black line). This under the condition that the ODE shall not be of higher order than 3.

Remember that e.g. ODE of 5 would be better but much more difficult to handle.

Reply to
JCH

Newsbeitragnews: snipped-for-privacy@q5g2000prf.googlegroups.com...

STOP RIGHT THERE!!!! The forcing function and the initial conditions are not part of the model. You can't optimize them just to make your model look better for just this set of data. The model should work for any set of data and initial conditions. ( We are assuming the plant is linear now ). The goal is to find the best model, not make the model response follow the actual response at the cost of everything else. In this case it is reality. You must start your system at a quiescent state or know what the initial state is but the initial state is NOT a part of the parameters that is optimized. The same goes for the forcing function. Your initial problem set the forcing function to 1 not 1.000227. The forcing function is an input and not part of the model and should be left at one. The initial conditions should be left at 0. You were doing well. Don't go weird on us now.

Peter Nachtwey

Reply to
pnachtwey

PolyTech Forum website is not affiliated with any of the manufacturers or service providers discussed here. All logos and trade names are the property of their respective owners.