Some Basic Modeling Thoughts

See therefore some definitions for example in:

formatting link
Aim is compensating by approbiate means if high quality counts:

- process and controller time response: F1(s)*F2(s) => K

- set point SP and process value PV: e = PV - SP => 0

- ITAE criteria: Integral[0...t] t*Abs(e)*dt => MIN, if applicable

Open loop (feedforward): K = 1

If you have data you can approach this with a feedforward model like:

formatting link
Page 1 Controller fits to process: result v2 = u

process A1 = 0.333 A2 = 0.00106 A3 = 0.0000844 controller B1 = 0.333 B2 = 0.00106 B3 = 0.0000844

Page 2 Controller does not fit to process: result v2 ~ u

process A1 = 0.333 A2 = 0.00106 A3 = 0.0000844 controller B1 = 0.333 B2 = 0.00106 B3 = 0.0000819 -3%

In closed loop with

K=100 v2/u = 1/(1+1/(100 *0.97)) = 0.989 ~ 1 K=1000 v2/u = 1/(1+1/(1000*0.97)) = 0.999 ~ 1 K=oo v2/u = 1

Can be 'corrected' with an integrator!

Used definite filter for limiting speed v2' and acceleration v2''! This can be applied to any process values.

Page 3 Example filter (jerk 3rd order) in series

0.000033275*u''' + 0.003025*u'' + 0.11*u' + 1 = w

If MATLAB used correctly it will produce the same result as I have found. No doubt!

Used and recommended program (free usable):

formatting link

Reply to
JCH
Loading thread data ...

in:

formatting link

At feed forward is a gain that is multiplied by the set point and its derivatives. In this case there would be three feed forwards: Kv velocity feed forward Ka acceleration feed forward Kj jerk feed forward. A position feed forward is not required because it is a type 1 system.

In my example only the position set point changes. All the derivatives are 0 so there is no need for feed forwards unless one is trying to follow a different motion profile like a sine wave.

I know what the feed forward gains should be. K=1 is not right for any of the feed forwards.

like:

formatting link

Have you tried? We would like to see the script.

I think you should think about some basic models ( very basic ). Assume the plant is an RC circuit with a time constant of 1 sec so the model looks like this:

1/(s+1) The controller has a limited output from 0 to 10 volts and we want to charge the capacitor to 7 volts and then change the set point to 3 volts.

Note, one could just have the controller output 7 volts and then 3 volts but the goal is to get to the set point faster than the 1 second time constant would allow. About 3 seconds would be a good time.

Remember, the output of the controller is limited to 0 to 10 volts.

Peter Nachtwey

Peter Nachtwey

Reply to
Peter Nachtwey

You're kidding, right?

Try varying the plant in a realistic manner, say by varying the overall gain by a factor of 20%, or by adding in unmodeled dynamics that change the phase of the transfer function by 20 degrees at your desired operating frequency, or put in nonlinearities that _really_ change the behavior. Then combine that with a plant that is unstable, or marginally stable -- then see how well you do with pole-zero cancellation.

Reply to
Tim Wescott

If the system varies that much then there is no solution that isn't extremely complicated and expensive. No PID will do the job. At this point one must get the mechanical designers to do a better job of designing their systems.

Then : combine that with a plant that is unstable, or marginally stable -- then : see how well you do with pole-zero cancellation.

The plant I presented is stable but will ring. I have said before it wasn't meant to be a system that one can be easily tuned by tweaking and a lot of coffeer. I have Mathcad work sheets that show that the same system will control nicely and almost the same even if the gain, damping factor and natural frequency have a standard deviation of 5%. Have you ever done this type of analysis? I have. I have Mathcad work sheets where I can change the standard deviation and see the differences in response. I must know all of this. I know I can identify as system much better than that. Some system identification techniques return the norm or the sum of square errors. I can tell by that how well the system identification has been.

If your system varies by 20% then you should get a new mechanical desiginer. I teach course in how to make system easier to control. I don't expect perfection but there is a limit to which the control people should put up with. If your system doesn't come with a transfer function then it hasn't been designed. Yes, I am a hard ass. I will get to non-linear systems later. At this point we still need to convince JCH that there is power or energy rate limit that the controller can't exceed.

Peter Nachtwey

Reply to
Peter Nachtwey

You were doing a fine job with him on your own.

20% variations in gain and 20 degree variations in phase are extreme, but should be well within what a well-designed PID loop can handle -- at least without going unstable. I normally design for 60 degrees phase margin and 6dB (i.e. a factor of 2 variation) of gain margin; I'll go less than this, but only under protest. Even a loop that's designed to 45 degrees and 3dB gain variation would absorb the quoted variations. It wouldn't be graceful about it, but it would remain stable.

His method would blow up in his face.

I suspect that your loops would handle a 20% variation just fine -- in fact, I gather that your hydraulic actuators vary by a good fraction of that within one stroke. Sometime when you have time to spare give it a try with your current spreadsheets -- and if you fail, rethink your methodology.

Rare earth magnets vary their field strength under temperature variations, and so does the resistivity of copper wire. Nonlinear systems can be coped with (sometimes) by treating them as linear systems that vary unexpectedly. When you're designing a system to operate correctly from 0 feet to 10000, from -40 degrees to +55 C, with some of the motors driven from raw aircraft power that can vary from 21 to 32 volts, over all possible manufacturing variations as well as variations due to aging, other environmental factors and possibly poor servicing you should darn well make a robust system!

If you're using pneumatic controllers you're going to see variations in your plant performance with supply pressure, and I strongly suspect that you'll see variations in the effective spring constants with temperature as the air density changes. I'm sure you know far better than I how to design around these issues -- but I bet that once a system gets out into the field there's more variation in there than you're happy to admit to.

Reply to
Tim Wescott

Dnia 07-05-2007 o 07:25:56 Peter Nachtwey napisa³(a):

(...)

(...)

When object is stable and easy to control and disturbances are very small, and modeling error are also very small then JHC probably don't blow everything. Inversing object however is not safe technique. Why? There is a lot of literature about this and about far better methods. Whole control theory is about how to control without inversing the object (which is quite often impossible at all). And what about starting condition in his model?

Reply to
Mikolaj

Dnia 06-05-2007 o 19:37:23 Peter Nachtwey napisa³(a):

(...)

It's a very nice example for time optimal control (30 year old example or more :)).

Reply to
Mikolaj

"Peter Nachtwey" schrieb im Newsbeitrag news: snipped-for-privacy@y5g2000hsa.googlegroups.com... [...]

I used a 3rd order filter for smoothing (keep PV acceleration in limits). Then follows a 100% time compensation in sequence F2(s)=controller and F1(s)=process. So I could derive the controller output v2.

Again:

F1(s)F2(s)=1 1st modeling F2(s)F1(s)=1 2nd modeling

See Page1 (Jan) and Page 2 (Peter):

formatting link
I tried to keep the controller output in the range 0.2 to 1. This can be interpreted as of being in 2...10V or 4...20mA or just 0...100% (2V=0%! life zero). That's standard.

I haven't MATLAB. I use a program that I have written myself. The mathematics is the same!

Remark: MATLAB solves only linear differential equations! My program solves nonlinear equations as well.

Reply to
JCH

Don't you see? It is the fact that JCH combines the controller and the plant together so that power limitations are ignored! It is the fact that JCH's transfer function ends up being k/(k+1) which implies there is no lag in response. Just a little gain difference. That implies the ability to transfer huge amounts of energy which isn't reallistic..

Peter Nachtwey

Reply to
Peter Nachtwey

: > Note, one could just have the controller output 7 volts and then 3 : > volts but the goal is to get to the set point faster than the 1 second : > time constant would allow. About 3 seconds would be a good time. : >

: > Remember, the output of the controller is limited to 0 to 10 volts. : >

: > Peter Nachtwey : : It's a very nice example for time optimal control : (30 year old example or more :)). Yes, but maybe JCH will understand that the RC circuit can't be charged and discharged instantly when the control output is only 0-10 volts..

Peter Nachtwey

Reply to
Peter Nachtwey

Dnia 07-05-2007 o 16:01:20 Peter Nachtwey napisa³(a):

Yes, I see that. I'm trying to reproduce JHC's revers model method to show how bad it is. He say's he used it in practice but doesn't show any details so it's hard to guess what is he exactly doing or trying to say. He is also very chaotic and changes subject without any warning so I feel lost.

Reply to
Mikolaj

: > If the system varies that much then there is no solution that isn't : > extremely complicated and expensive. No PID will do the job. At this point : > one must get the mechanical designers to do a better job of designing their : > systems. : >

: 20% variations in gain and 20 degree variations in phase are extreme, : but should be well within what a well-designed PID loop can handle -- at : least without going unstable. I normally design for 60 degrees phase : margin and 6dB (i.e. a factor of 2 variation) of gain margin; I'll go : less than this, but only under protest. Even a loop that's designed to : 45 degrees and 3dB gain variation would absorb the quoted variations. : It wouldn't be graceful about it, but it would remain stable. : : His method would blow up in his face.

Yes, but part of that is becasue he doesn't see the flaws of implementing the plant and controller as one function. There are output limits, quantizing and sample rate limitations that are ignored. This is why I object to built in functions like Matlab and Scilab have where one can simulate the the closed loop transfer function as a whole. One doesn't worry about how good the estimate of the plants acceleration or jerk is when it is written in the s domain, but just try this in discrete time. I vary my plant parameters and truncate the estimated positions to the resolution of the feedback device I am simulating in my worksheets. I have found feedback resolution to be one of the main performance limiting factors. Direct s domain to continuous time conversion does not show this.

Peter Nachtwey

Reply to
Peter Nachtwey

Let's just 'assume' that you have to fulfill a benchmark test like:

formatting link
and your customer is happy with the tuning.

But he wants to see what happens if the setpoint is moved from 0.2...1 (0...100%):

formatting link
That seems to be realistic. Note that anything is still adjustable.

Reply to
JCH

"Peter Nachtwey" schrieb im Newsbeitrag news:xoadncjrjrmtrKLbnZ2dnUVZ snipped-for-privacy@comcast.com...

Only the 'model' is combined on the computer. Nothing else. See the red box in

formatting link
2

If you use 4...20mA the process may be 100 miles away from the controller.

Remark: The 4...20mA DC signals are independent from electrical resistence! That's the purpose using DC.

Reply to
JCH

"Mikolaj" schrieb im Newsbeitrag news:op.trym0poi3r65ff@xmasnew...

Peter is on the right track. He tries to simulates a PD2D (PD3) without I-action and found a very good result. Times ago I hadn't a computer and did the same in practice if it was necessary. I was doing it directly on a plant.

Both have the same characteristic controller behavior. He found it with the try and error method. If he would compensate the transfer funfunction as I do he would get the same results if using the data I used.

He has just to limit the leading input signal u so that acceleration is kept in limits. I used a filter of 3rd order. That's all.

Reply to
JCH

: >> Don't you see? It is the fact that JCH combines the controller and the : >> plant together so that power limitations are ignored! It is the fact : >> that : >> JCH's transfer function ends up being k/(k+1) which implies there is no : >> lag : >> in response. Just a little gain difference. That implies the ability to : >> transfer huge amounts of energy which isn't reallistic.. : >>

: >> Peter Nachtwey : >

: > Yes, I see that. : > I'm trying to reproduce JHC's revers model method : > to show how bad it is. He say's he used it in practice : > but doesn't show any details so it's hard to guess : > what is he exactly doing or trying to say. : : : Peter is on the right track. He tries to simulates a PD2D (PD3) without : I-action and found a very good result

I can do this with an integrator gain too. No problem

. Times ago I hadn't a computer and did : the same in practice if it was necessary. I was doing it directly on a : plant. : : Both have the same characteristic controller behavior. He found it with the : try and error method.

Who is he? I did NOT use trial and error!. I used pole placement.

If he would compensate the transfer funfunction as I : do he would get the same results if using the data I used.

Who is he?

: He has just to limit the leading input signal u so that acceleration is kept : in limits. I used a filter of 3rd order. That's all.

In my example I am using the pole placement to limited the acceleration. The acceleration is also limited by the fact that the controller can only output +/- 10volts and the amplifier and plant only have a gain of 3 position units per second per volt. .

Peter Nachtwey

Reply to
Peter Nachtwey

"Peter Nachtwey" schrieb im Newsbeitrag news:S_6dnb8FLbN-s9zbnZ2dnUVZ snipped-for-privacy@comcast.com...

If you have some spare time I'd like to see a solution:

Target position Actual position Control position

over time in your case 0 to 10 Volts 'without scratching' the limits. Starting at 6 Volts.

The target position should be as I showed in: Page 2, value w

formatting link
Some information about max. velocity and max. acceleration would be nice.

Thanks.

Reply to
JCH

If you look at the graph you can see I have all those values plotted.

I have another version of the same system only following a sine wave

ftp://ftp.deltacompsys.com/public/NG/Mathcad%20-%20T1C1%20PD2D%20SineWave%20NG.pdf

Nornally I use feed forwards and an integrator. The feed forwards allow tracking with very little error. The closed loop control is just there for non-linearities and changes in load. : : over time in your case 0 to 10 Volts 'without scratching' the limits. : Starting at 6 Volts.

? Perhap the sine wave work sheet will answer your question. I use both for testing. Notice that some of the other tuning solution work better when not being driven in to saturation.

: : The target position should be as I showed in: Page 2, value w :

formatting link
: Some information about max. velocity and max. acceleration would be nice. : Would you look? I plot the velocity and acceleration. I have update the original work sheet a few times now.

Peter Nachtwey

Reply to
Peter Nachtwey

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.