Approximating Differential Equation on the Basis of Measured Values

[...]


See PD5(PID)Z1Z2 control: http://home.arcor.de/janch/janch/_control/20071031-pd5 (pid)z1z2/
Page 1: State Observer Fig. 1 Page 2: Control without disturbance compensations Page 3: Control with disturbance compensations Page 4: Process Transfer Function F1(s) [(s)], lower range
--
Regards/Gre http://home.arcor.de/janch/janch/menue.htm
Jan C. Hoffmann eMail aktuell: snipped-for-privacy@nospam.arcornews.de
  Click to see the full signature.
Add pictures here
<% if( /^image/.test(type) ){ %>
<% } %>
<%-name%>
Add image file
Upload
Why did you change the plant time constant from 0.123 to 0.006518124? Why don't you show your calculations. Anyone can generate lines. What happen if the feedback resolution is 0.0001?
Peter Nachtwey
Add pictures here
<% if( /^image/.test(type) ){ %>
<% } %>
<%-name%>
Add image file
Upload

Peter:
Why did you change the plant time constant from 0.123 to 0.006518124?

Jan:
It fitted to the bench mark defined earlier dicussed. Just to save some time rearranging the demo.
See for T=0.123 http://home.arcor.de/janch/janch/_control/20071101-pd5 (pid)z1z2/
Page 1: State Observer Fig. 1 Page 2: Control without disturbance compensations Page 3: Control with disturbance compensations Page 4: Process Transfer Function F1(s) [(s)], lower range

Peter:
Why don't you show your calculations.

Jan:
See Page 1, equ.1 ... 3. Just solve them. Calculation is done by a program I have written. Maybe you generate some 'lines' refering to 5th order process transfer function in a loop.

Peter:
Anyone can generate lines.

Jan:
And some can't prove it.

Peter:
What happen if the feedback resolution is 0.0001?

Jan:
T=0.0001? I would change to 0.1ms interpretation if 0.0001s was meant.
--
Regards/Gre http://home.arcor.de/janch/janch/menue.htm
Jan C. Hoffmann eMail aktuell: snipped-for-privacy@nospam.arcornews.de
  Click to see the full signature.
Add pictures here
<% if( /^image/.test(type) ){ %>
<% } %>
<%-name%>
Add image file
Upload
Newsbeitrag

Not time, the feed back resolution. This means that the controller doesn't see perfect data. It sees data as if it came from a counter or AtoD converter and those counts must be scaled to provide the feed back data.
Peter Nachtwey
Add pictures here
<% if( /^image/.test(type) ){ %>
<% } %>
<%-name%>
Add image file
Upload

If you have an internal range 0.2 to 1 then 0.0001/1*100% = 0.01% resolution ist very good. If for some reason it were not then you can't make mathematics responsible for that.
The approximation error data chosen were +/- 1% max.
--
Regards/Gre http://home.arcor.de/janch/janch/menue.htm
Jan C. Hoffmann eMail aktuell: snipped-for-privacy@nospam.arcornews.de
  Click to see the full signature.
Add pictures here
<% if( /^image/.test(type) ){ %>
<% } %>
<%-name%>
Add image file
Upload

Here is everything I used to compute the estimate for JCH's test. ftp://ftp.deltacompsys.com/public/NG/Mathcad%20-%20SysID%20JCH.pdf One can see it didn't take a lot of effort. I tried n=3 first. It was easy to see the model required more poles. I tried n=5 next. The MSE is so small that it is close to the level of the noise. Minerr is a optimizing function that changes its parameters so MSE is minimized. The variable ERR is the returned MSE error that is used to provide the estimate of how good the fit it.
Peter Nachtwey
Add pictures here
<% if( /^image/.test(type) ){ %>
<% } %>
<%-name%>
Add image file
Upload

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?
JCH, is figuring out the forcing function r(s) = 1/s and F(s) should really be 1/(T*s +1)^n part of the test?
Peter Nachtwey
Add pictures here
<% if( /^image/.test(type) ){ %>
<% } %>
<%-name%>
Add image file
Upload

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 http://home.arcor.de/janch/janch/_control/20070613-pd2 (pid)z1z2/ but think of 1 order higher.
--
Regards/Gre http://home.arcor.de/janch/janch/menue.htm
Jan C. Hoffmann eMail aktuell: snipped-for-privacy@nospam.arcornews.de
  Click to see the full signature.
Add pictures here
<% if( /^image/.test(type) ){ %>
<% } %>
<%-name%>
Add image file
Upload
On Mon, 22 Oct 2007 13:45:44 +0200, JCH wrote:

Why are you assuming that the roots are repeated? Why are you assuming that the plant transfer function has no zeros?
--
Tim Wescott
Control systems and communications consulting
  Click to see the full signature.
Add pictures here
<% if( /^image/.test(type) ){ %>
<% } %>
<%-name%>
Add image file
Upload
Tim Wescott wrote:

Or pure delay.
Add pictures here
<% if( /^image/.test(type) ){ %>
<% } %>
<%-name%>
Add image file
Upload

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
Add pictures here
<% if( /^image/.test(type) ){ %>
<% } %>
<%-name%>
Add image file
Upload

Look at Page 2 http://home.arcor.de/janch/janch/_news/20071024-comparison /
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.
--
Regards/Gre http://home.arcor.de/janch/janch/menue.htm
Jan C. Hoffmann eMail aktuell: snipped-for-privacy@nospam.arcornews.de
  Click to see the full signature.
Add pictures here
<% if( /^image/.test(type) ){ %>
<% } %>
<%-name%>
Add image file
Upload
Identify this this one: ftp://ftp.deltacompsys.com/public/NG/plot1.zip The data is a CSV file format that can easily be imported into excel. The first column has units of seconds The second column is positions units in millimeters. The third column is the control output in volts. There are no more than 3 poles. There is no noise but the feed back is assumed to have a resolution of 10 microns. Have fun
Peter Nachtwey
Add pictures here
<% if( /^image/.test(type) ){ %>
<% } %>
<%-name%>
Add image file
Upload

Your data look like closed loop data (v2=volts changes).
I could have fun if I had just the process transfer function data like:
Number of data points = 20 would be ok. Just 10% step change of v2
t/seconds (e.g.) v1/millimeters (e.g.)
0 0 . . . . . . 0.48 .
--
Regards/Gre http://home.arcor.de/janch/janch/menue.htm
Jan C. Hoffmann eMail aktuell: snipped-for-privacy@nospam.arcornews.de
  Click to see the full signature.
Add pictures here
<% if( /^image/.test(type) ){ %>
<% } %>
<%-name%>
Add image file
Upload

It is open loop data. The system is also linear except for the small amount of quantizing that simulates a feed back resolution of 10 microns. .

You need to make your arrays bigger. You could use only every 20th or 25th point but that would not represent the control signal or the response very well. I doubt you can get a very good system identification if you do. Sampling must be done at small intervals in order to detect short time constants.

Exciting the system with step changes are not always permissible. From time to time we control systems in the 50 to 100 ton range and we have control much bigger loads. A step change can be very hard on machinery and excite the manager or owner more than the load. The system identification need to be able to handle an arbitrary control signal. This also makes it easy to identify systems with dead time.
Here is a hint. The answer is similar to the answer in the pdf file below. However, there is a 0.5 volt offset which causes the position to drift in the negative direction when the control output is 0. This simulates a valve being out of null or have an offset of half a volt. This is very realistic.
ftp://ftp.deltacompsys.com/public/NG/Mathcad%20-%20Sysid2A2BV70%20T02.pdf
This is an example of system identification of a real hydraulic system. I have posted a link to this pdf before. The data is taken every millisecond for 1.5 second so there are 1500 points. Notice that the control output is also not a simple step change but has many small changes instead. I ploted the velocities instead of the positions because it is easier to see the results but feedback was in position units of inches..
Think of this problem as a puzzle. Have fun.
Peter Nachtwey
Add pictures here
<% if( /^image/.test(type) ){ %>
<% } %>
<%-name%>
Add image file
Upload

Sorry Peter, I don't like puzzles. I like solving problems like described below:
State of art high precision process identification and control tools where no puzzling is necessary.
Example: Input step v2=1, output differential equation (y=v1)
Testdata: e.g.
1y''''''+6y'''''+15y''''+20y'''+15y''+6y'+1y=1 F(s)=(1s+1)^6
Result:
1,000114y''''''+6,000568y'''''+15,00114y''''+20,00114y'''+15,00057y''+6,000113y'+1y=1,000063
F(s)=(1,000019s+1)^6
Error: 0,0019% after least square approximation of data. In practice 1% would be good enough.
But last not least, all tools must be easy to use! That means without instruction manual.
For new readers: http://home.arcor.de/janch/janch/_control/20071112-pd6 (pid)z1z2/ [With benchmark scheme and automatic PID-optimisation]
--
Regards/Gre http://home.arcor.de/janch/janch/menue.htm
Jan C. Hoffmann eMail aktuell: snipped-for-privacy@nospam.arcornews.de
  Click to see the full signature.
Add pictures here
<% if( /^image/.test(type) ){ %>
<% } %>
<%-name%>
Add image file
Upload
Newsbeitrag

???????
What if the input is not a step? Then your "state of high art precision process identification" isn't very useful.

This is not very realistic. For starters, you should be able to handle
1y''''''+6y'''''+15y''''+20y'''+15y''+6y'+1y=Gain*ControlOutput(t- DeadTime)+Offset
A gain is required. Hardly any system have a gain of 1 The control output function can be any given data. It can be sampled, a forcing function like a sine wave or the control output from a PID. The dead time is used to offset the time index into the forcing function. Systems tend to drift about in open loop mode so a offset is required. The pole locations can all be different. This means there are no simple binomial relationships between the constants.
In addition to the A0...A5 time constants, one must also determine the system gain, dead time and offset.

Tools must be useful too. If is up to the programmer ( you ) to make it easy.
Peter Nachtwey
Add pictures here
<% if( /^image/.test(type) ){ %>
<% } %>
<%-name%>
Add image file
Upload

I had never problems having a step in practice and then watch what was happening?

You can choose internally a gain of Kc = 1
Example:
Transmitter: Range 0...100C
vT = 1/100C
Kc = 1 (controller: 100%output/100%input -> P-band0%)
Process: Range 0...10m^3
vP = 10m^3/1
All over chain gain v = vT*Kc*vP = 0.1m^3/C
That means e.g. you need 0.1m^3 water for changing 1C temperature.

See again Page 2, enlarged span lower figure (if reloading Fig.5) http://home.arcor.de/janch/janch/_control/20071112-pd6 (pid)z1z2/ There is enough dead time that can be controlled.
Any other alternative is not available. That means you have no chance getting a better result.
--
Regards/Gre http://home.arcor.de/janch/janch/menue.htm
Jan C. Hoffmann eMail aktuell: snipped-for-privacy@nospam.arcornews.de
  Click to see the full signature.
Add pictures here
<% if( /^image/.test(type) ){ %>
<% } %>
<%-name%>
Add image file
Upload
Newsbeitrag

The system is linear. It is open loop data. The control output is the default wave form we use to excite the system when auto tuning. Since we are often tuning hydraulic systems the process must be done extending and retracting because the surface area of the piston is different on the two sides so the gain is different in each direction.

I won't do that. Sometimes step changes aren't allowed. Imagine a 10% step change when moving 100 metric tons. That would excite the owners and managers and would test the welds and the foundations. The control input can be arbitrary becuse it often must be modified to suit the application.

In real life the people using the auto tuning don't know what the transfer function is. The auto tuning program must be able to try first order and second order under damped, critically damped and over damped etc. You must try all the models and select the best one.
In real systems one must be able to sample as fast as possible to identify those systems with very short time constants. Small motors often have time constants in the 3-5 millisecond range so fast sampling is required. I have said before we usually use about 500 to 2000 points. If 500 points are too much then you can use every 20th or 25th one but you can see that will not work well because you can't represent the control signal or the motion profile accurately using every 20th or 25th point. I think it is time to expand your arrays.
Have fun.
Peter Nachtwey
Add pictures here
<% if( /^image/.test(type) ){ %>
<% } %>
<%-name%>
Add image file
Upload

You use a wave form and I use a step, and find the process transfer function F1(s). The rest is mathematics like
Just for new readers: http://home.arcor.de/janch/janch/_control/20071112-pd6 (pid)z1z2/ [With benchmark scheme and automatic PID-optimisation]
--
Regards/Gre http://home.arcor.de/janch/janch/menue.htm
Jan C. Hoffmann eMail aktuell: snipped-for-privacy@nospam.arcornews.de
  Click to see the full signature.
Add pictures here
<% if( /^image/.test(type) ){ %>
<% } %>
<%-name%>
Add image file
Upload

Polytechforum.com is a website by engineers for engineers. It is not affiliated with any of manufacturers or vendors discussed here. All logos and trade names are the property of their respective owners.