# Automatic optimization of high order control loops

Automatic optimization of high order control loops - using State observer.
I developed a simple algorithm that optimizes closed loops in time domain by
using the criteria:
Integral abs|e| dt > MIN (any other criteria could also be used)
The algorithm consists of a 3 dimensional grid for Kc, Ki and Kd that calculates all combinations of them and finds the lowest value (MIN), generally called brute force method.
Maybe someone can find a better solution and can show it.
The best I can do you can see on http://home.arcor.de/janch/janch/_control/20071103-pd5 (pid)z1z2/ Page 2 Optimal feedback control !!!
--
Jan C. Hoffmann eMail aktuell: snipped-for-privacy@nospam.arcornews.de
âœ–
<% if( /^image/.test(type) ){ %>
<% } %>
<%-name%>

What happens if the initial error changes? If have found the optimal gains exist only for the current conditions. The optimizer should find gains that keep the control output in saturation much of the time when responding to a step jump. I didn't see the control output going into saturation during a response to a step change. I think you must be using the target filter. You shouldn't use the target filter when optimizing PID gains.
To keep the control output from wanting to saturate all the time you can try minimuizing the control output too.
There are many minimization functions. SSE, IAE, ITAE.

There are better ways of findimg the minimum. They involve finding a gradient at a point and using that to go down hill. See Levenberg Marquardt or BFGS. Numerical Recipes in C has these routines.

First you must optimize PID gains WITHOUT the target filter and feed forwards. Tuning your 5 repeated poles without a feed forwards is not easy.
Peter Nachtwey
âœ–
<% if( /^image/.test(type) ){ %>
<% } %>
<%-name%>
wrote:

See Page 4 http://home.arcor.de/janch/janch/_control/20071104-pd5 (pid)z1z2/
The initial error e = 0
That's usually done by changing from manual to automatic operation.

v2 is desinged to get fully 'open' but not more. The red line covers partly the blue line. That's why you can't see it.

It's an all over evaluation that also optimizes. Compare to Page 7 http://home.arcor.de/janch/janch/_control/20071104-pd5 (pid)z1z2/

Yes, but it is in this case not necessary. Maybe in special cases.

Yes, but it will be more difficult. One has 3 parameters (PID) to optimize.

I don't tune it. I all calculated. If designed Ai=Bi=Ci then it's best. If differently designed then the computer will also do the work in the same manner. It's just a different solution.
Example
F3(s) = (0,3000031 s + 1)^3 equivalent to 0,02700085 y''' + 0,2700056 y'' + 0,9000094 y' + y = 0,3993063
F3(s) is chosen with slower performance. Otherwise it would exceed the ranges (<0,2 and >1).
Optimisation is calculated automatically.
See Page 6 http://home.arcor.de/janch/janch/_control/20071104-pd5 (pid)z1z2/
Note: Be aware that all is very realistic because the process transfer function is based on real data, made from measured data points not physically derived. It would be hard work to derive a 5th order process tranfer function without few assumptions.
--
Jan C. Hoffmann eMail aktuell: snipped-for-privacy@nospam.arcornews.de
âœ–
<% if( /^image/.test(type) ){ %>
<% } %>
<%-name%>

3 parameters is easy but what if you need more gains? Using a grid limits your gain resolution

Only after figure out the difference between a type 0 and type 1 plant. What you call positin should be velocity.

Ah, this points out my complaint about IAE, ITAE or SSE tuning. The optimal gains are only optimal for one set of conditions.

What do you do if you come across a real system that is faster or slower?

How can that be? The relationship beween the control and the velocity is not right.
For the past year you have confused positions with velocity. When the control signal goes to 0 the velocity will go to 0 not the position. In your examples the position goes back to 0 when the control output goes to 0. That isn't right
Peter Nachtwey
âœ–
<% if( /^image/.test(type) ){ %>
<% } %>
<%-name%>
wrote:

Refering to http://home.arcor.de/janch/janch/_control/20071104-pd5 (pid)z1z2/ Where did I say that? Page ?

Refering to http://home.arcor.de/janch/janch/_control/20071104-pd5 (pid)z1z2/ I defined it clearly in Page 2.

Refering to http://home.arcor.de/janch/janch/_control/20071104-pd5 (pid)z1z2/ The process (transfer function) is defined in Pages 2,3,4,5,6,7
And the Target Filter is defined as constant: Example 1: Page 4 Example 2: Page 6
Another process will have another process transfer function.

Refering to http://home.arcor.de/janch/janch/_control/20071104-pd5 (pid)z1z2/ v1 and v2 could refer to any physical value.
--
Jan C. Hoffmann eMail aktuell: snipped-for-privacy@nospam.arcornews.de
âœ–
<% if( /^image/.test(type) ){ %>
<% } %>
<%-name%>
Do you understand the difference between a type 0 ( non integrating ) and type 1 ( integrating ) system?
Peter Nachtwey
âœ–
<% if( /^image/.test(type) ){ %>
<% } %>
<%-name%>

MATHEMATICAL DEFINITIONS
Refering to http://home.arcor.de/janch/janch/_control/20071104-pd5 (pid)z1z2/ and all Pages before:
v1 can be 'any' physical value (process value PV).
Examples
v1''''' = d^5 v1/dt^5, the 5th derivative of v1
v1'''' = Integral v1''''' dt + C4 v1''' = Integral v1'''' dt + C3 ... v1 = Integral v1' dt + C0
Ci = initial values
These are the definitions I work with.
Refering to Page 5 (y=v1) http://home.arcor.de/janch/janch/_control/20071104-pd5 (pid)z1z2/
2,786423E-05 y''''' + 0,001135031 y'''' + ... + y = 1,00095 or equivalent F(s) = (0,1227466 s + 1)^5
--