Content uploaded by John Masse

Author content

All content in this area was uploaded by John Masse on Feb 16, 2022

Content may be subject to copyright.

Relaxc tuning

09/2021

Relaxc is controller software or block function under ‘EULA’ license. It is a copyrighted work of APPEDGE 1 / 16

Relaxc: Tuning for

Automation.

John Masse

Relaxc@appedge.com

Version 1

Keywords: Relaxc, Calibration, PID, dead time, auto tuning, graphic tuning, Naslin, Broida,

Strecj, Ziegler-Nichols, Sharwze, Huzovic, UAV, double integrating. Deep learning,

Stochastic gradient.

To cite this article: John Masse Relaxc revisited: tuning experiment case. September 2021,

Research gate.

Relaxc tuning

09/2021

Relaxc is controller software or block function under ‘EULA’ license. It is a copyrighted work of APPEDGE 2 / 16

Content

1 INTRODUCTION ........................................................................................................................... 3

2 THE GRAPHIC RULES. ............................................................................................................... 3

3 RELAXC SUMMARY ON THE SIMPLIFIED TUNING .......................................................... 4

RELAXC: RULE FOR ALL THE STABLE PROCESSES ..................................................................... 5 3.1

3.1.1 INTERPRETATION ......................................................................................................................... 5

3.1.2 RELAXC ANALYTIC RULES FOR STABLE PROCESS........................................................................ 5

3.1.3 A LITTLE TUNING STORY ............................................................................................................. 6

3.1.4 PRACTICAL EXAMPLE ON STABLE PROCESS: SECOND ORDER (SOPD) ........................................ 6

3.1.1 EXPERIMENT CURVE TOWARD PHYSICAL PARAMETERS .............................................................. 6

3.1.2 SIMULATION CLOSED LOOP RESPONSE DELAY = 4S. ................................................................... 7

3.1.1 SAME EXAMPLE: RELAXC VS PID WITH DELAY=0S .................................................................... 7

3.1.2 OTHER FEATURES OF RELAXC ..................................................................................................... 8

RELAXC: RULE FOR ALL INTEGRATING PROCESS ...................................................................... 9 3.2

3.2.1 INTERPRETATION ....................................................................................................................... 10

3.2.2 RELAXC ANALYTIC RULES FOR INTEGRATING PROCESS ............................................................ 10

PRACTICAL EXAMPLE ON SECOND ORDER INTEGRATING PROCESS ........................................ 10 3.3

3.3.1 EXPERIMENT CURVE TOWARD PHYSICAL PARAMETERS ............................................................ 11

3.3.2 SIMULATION CLOSED LOOP TD=0.5S. ........................................................................................ 11

RELAXC: RULE FOR INSTABLE PROCESS ................................................................................... 13 3.1

3.1.1 AN EXAMPLE: DOUBLE INTEGRATING PROCESS PLUS DELAY ................................................... 13

3.1.2 EXPERIMENT CURVE TOWARD PHYSICAL PARAMETERS ............................................................ 13

3.1.3 DOUBLE INTEGRATING PROCESS WITHOUT DELAY ................................................................... 15

4 CONCLUSION .............................................................................................................................. 16

Relaxc tuning

09/2021

Relaxc is controller software or block function under ‘EULA’ license. It is a copyrighted work of APPEDGE 3 / 16

1 Introduction

This paper explores new simplified tuning of Relaxc to help Relaxc users to find a quick

tuning from step-response experiment. This tuning, that depends explicitly on the process

physical parameters, establishes a good starting point to control effortlessly and without

overshoot complex processes including non-minimal phase, small and large pure delay,

unstable processes, variable static gain, strong non-linearities, constraints on U, speed

saturations, discontinuities, load disturbances, etc. while minimizing the operational costs,

the energy peaks of U with a more reliable control.

Relaxc is useful toolbox for the control. We can use it, as Kalman filter or time differentiator

operator, to deal correctly with the speed or control saturation, to twist as we want the control

and to decouple the trajectory of the response of its active load disturbance rejection.

If we assume that a good control is that the steady state should stay closer to the set point,

then this article shows the effectiveness of the Relaxc methodology and the benefit of

replacing all the kind PID by a unique Relaxc. We compare it at the state-of- art of PID

design: PID(z) tuner of Simulink® (PIDTuner).

So, we can conclude that whatever the effort (mathematics/studious or tedious tuning) that we

do to tune well all the kinds of PID, Relaxc seems and always stays the best solution with its

disruptive methodology which is implemented on MODICON and Raspberry equipment.

2 The graphic rules.

The principle is to apply a step in Open Loop at the input of the process that we name

Experiment curve because relaxc is an online method. Of course, it is possible to extend these

rules to the Relay Feedback if the dead time is not too large and other methods etc.

To apply these rules we don’t need to identify the mathematical equations as linear transfer

function. But just, we need to identify on the experiment curve sampling at Te the apparent

delay (td), the apparent constant (tm) and the lag (tlag) time, speed vm and the gain (km) of

the process in order to compute the Relaxc parameters , ,.Relaxc equation:

Relaxc

=

=

(,)

+

(

+

)

=1

+ 1

=

•

: Pure delay

• v : absolute process max speed

• : Global reactivity time that wraps

• :

Dynamic of the reference trajectory that

wraps

• ks: Relaxc gain

Don’t forget in closed loop that the parameter ks sets the initial value of ==

with the set point.

Relaxc tuning

09/2021

Relaxc is controller software or block function under ‘EULA’ license. It is a copyrighted work of APPEDGE 4 / 16

3 Relaxc Summary on the simplified tuning

Process

Graphic Identification

Formulas

Stable process

=( )

( )

with p

=

=(,)

Integrating process

=( )

( )

with p

=

=

Relaxc tuning

09/2021

Relaxc is controller software or block function under ‘EULA’ license. It is a copyrighted work of APPEDGE 5 / 16

Relaxc: Rule for all the stable processes 3.1

PLANT

=( )

( ) with p

Figure 1 Relaxc Tuning for Open Loop on a stable

process

3.1.1 Interpretation

The slope is the tangent at the inflexion point of coordinate (ti,yi). Plot the curve

to

find easier this point.

We assume that t0=0 and = 1, the normalized step used for the open loop response. If

1 divide (normalized) vi, yi , km by Usp before to use them.

The Figure 1 gives a lot of relations between the variables km, tm, vi, td, tlag . We choose:

t1 =ti ()

, t2 =

+ , ti t1 = 2 tlag =tit1

2 =

and t2 ti =tm =

. The last relation +=1 gives =t1 tlag.

Note: At 95% of steady state we have 95% =

and km

In the case of non minimal phase we replace the parameter v of ks by

=|| else we take =

or = for a first order.

The tuning proposed here is more coarse than [1] but it’s just as effective (reliable and

robustness). To adjust moves the dynamic of the closed loop response.

3.1.2 Relaxc analytic rules for stable process

Table 1 Relaxc Stable generic tuning

Identification of constants

Relaxc tuning (stable process)

Relaxc tuning

09/2021

Relaxc is controller software or block function under ‘EULA’ license. It is a copyrighted work of APPEDGE 6 / 16

=t2 ti

=

=

=t1 tlag

=( ,

)

Minimal values

,

,

> 3

=

3+=

=(,)

if <

else

Note: The true ks equation is ks =

(

)

This tuning rule gives two interesting results: We deduce that the equivalent transfer function

in open loop is: ()

(

) with =/ and the forecast behavior in closed

loop is

(). with a right ks.

3.1.3 A little tuning story

With a minimum physical expertise of its process, Relaxc is an easier method to tune a

process: At a step response you note when the Pv begins to move then you obtain

( )

( ) When the process stops to move at the time

t you get = ()/3 or = 1/ (if you know the max speed of your process) and

km and you set = 1/(10 ) and you increase or decrease ks until you are satisfied by the

closed loop response. That’s it!

3.1.4 Practical example on stable process: Second order (SOPD)

=

()() with Te=10ms, km=1, =4, = 0.7, = 1

3.1.1 Experiment curve toward physical parameters

Table 2 Identification of coefficients

Identification of constants of the Open

Loop response (Figure 2)

Relaxc tuning ( stable process)

ti=4.84 ; yi=0.26 ; vi=0.43

km=1; t2=6.56; t1=4.23

=t2 ti = 1.72

=

=

=0.30

=t1 tlag

=3.93

=

=1.61

=(,)=.=

=

=.

Relaxc tuning

09/2021

Relaxc is controller software or block function under ‘EULA’ license. It is a copyrighted work of APPEDGE 7 / 16

Figure 2 Open loop response (step of 1)

3.1.2 Simulation Closed loop Response delay = 4s.

Figure 3 Comparison Relaxc vs PID (Stable process)

The comparison of Relaxc (basic tuning) with respect to the PID Tuner (= 2.76,=

0.026,= 5.98), shows that the PID looses control over load disturbances and the Relaxc

time rise here is better without overshoot.

3.1.1 Same example: Relaxc vs PID with delay=0s

In the case where td=0 (Figure 4) for approximatively the same energy at t=0, Relaxc

gives a similar PID time rise without overshoot with a better disturbance rejection at t=20s.

So, we confirm that the PID mathematical structure is not able to decouple the time rise of the

dynamic rejection. In this example, we reduce the waste of disturbances and improve the

Relaxc tuning

09/2021

Relaxc is controller software or block function under ‘EULA’ license. It is a copyrighted work of APPEDGE 8 / 16

performance of the control process by 500% on the same equipment, just by switching the

PID by Relaxc!

The parameters of Relaxc are ti=0.84 => ks=0.51*4=2, tre=0.28, tg=0.84.

Figure 4 Closed loop delay = 0s

3.1.2 Other features of Relaxc

This formula

() predicts the

behavior of the process

closed loop response which

depends on the Relaxc

tuning parameters (see Table

2)

It is useful to do predictive

maintenance or to do

diagnostic online!

Figure 5

Relaxc tuning

09/2021

Relaxc is controller software or block function under ‘EULA’ license. It is a copyrighted work of APPEDGE 9 / 16

This formula

()

()

(

) gives approximatively

the behavior of the process in

open loop (Table 2).

Of course, the choice =

/~ gives a better result!

Figure 6 Identification n=1

Figure 7 n=2

Relaxc: Rule for all integrating process 3.2

PLANT

=( )

( ) with p

Figure 8 Relaxc Tuning for Open Loop on a

stable process

Relaxc tuning

09/2021

Relaxc is controller software or block function under ‘EULA’ license. It is a copyrighted work of APPEDGE 10 / 16

3.2.1 Interpretation

The slope = is the tangent at when the speed becomes constant at the point (,).

We assume that t0 = 0 and = 1 the normalized step used for the open loop response. If

1 divide (normalized) vi, yi by Usp before using them.

The Figure 1 gives lot of relations between the variables km, tm, vi, td, tlag. We choose:

vi =km, , ti t1 = 2 tlag =tit1

2 =

, 1 = 2

The last relation +=1 gives =t1 tlag.

In the case of non-minimal phase we replace the parameter v of ks by

=|| else we take =.

3.2.2 Relaxc analytic rules for integrating process

We propose this tuning which gives a good compromise between the energy of the control

and the response time.

Table 3 Relaxc : Integrating generic tuning

Identification of constants

Relaxc tuning ( stable process)

= yi

2km

1 = 2

=t1 tlag

=( ,)

Minimal values ,,

=(+/,)

=

We can reduce the control stress with the

following tuning

=

=

This tuning rule gives two interesting results: We deduce that the equivalent transfer function

in open loop is: ()

() and the forecast behavior in closed loop is

()

.

Practical example on Second order integrating process 3.3

=

()() with Te=10ms, km=2, =0.5s ,= 0.7, = 1

Relaxc tuning

09/2021

Relaxc is controller software or block function under ‘EULA’ license. It is a copyrighted work of APPEDGE 11 / 16

3.3.1 Experiment curve toward physical parameters

Identification of constants of the Open Loop

response (Figure 10.)

Relaxc tuning ( stable process)

= 4.5 ; == 2, = 4.7;

=

yi

2km =

4.7

4= 1.17

1 = 2= 2.15

=t1 tlag = 0.98 Apparent dead time

=+

2,= 1.56

= 3 tre = 4.68

ks 1

km tg = 0.13

Figure 9 Open loop response integrating process

(step of 1)

3.3.2 Simulation Closed loop td=0.5s.

The PID Tuner finds a PD controller with a small integrating term (= 0.2, =

0.00075,= 0.28) which gets a good time rise but is not able to reject actively the

disturbance at t=20s. The PD controller at t=0s gives a large value of control =11. It

is 110 times higher than ~0.1 for almost the same response time.

Relaxc tuning

09/2021

Relaxc is controller software or block function under ‘EULA’ license. It is a copyrighted work of APPEDGE 12 / 16

Figure 10 Comparison of Relaxc vs PID tuner on integrating process

The Figure 11 shows also that the PD controller is not able to stay close to the set point even

without noise and to keep a steady state constant (bias appears with time). The PID tuner

highlights the limits of classical control theory.

Figure 11 Zoom : Comparison Relaxc vs PID tuner on integrating process

Relaxc tuning

09/2021

Relaxc is controller software or block function under ‘EULA’ license. It is a copyrighted work of APPEDGE 13 / 16

Relaxc: Rule for instable process 3.1

We propose a good trade-off to start the tuning with the generic graphic and well-balanced

Relaxc (=) which show good capability between performance and robustness. Note

that for a pure triple integrator we need to use 2 Relaxc in cascade.

Table 4 Relaxc: unstable generic tuning to Relaxc

Tuning unstable process from scratch

3.1.1 An example: Double integrating process plus delay

To control a double integrating process plus delay (DIPTD) is a challenging control problem

in dynamic positioning systems of ships and other vessels, robotic, satellites, spacecrafts,

rotary crane motion, etc

We study =

with = 1,= 1, ( )= 0.01.

3.1.2 Experiment curve toward physical parameters

Table 5 tuning DIPTD delay=1s

Identification of constants of the

Open Loop response (Figure 13.)

Tuning (unstable process) from scratch

Intersection of the response with the

step=1

ti=2.4, vi=1.4, yi=1

=4.8

=.

= 0.074

Relaxc tuning

09/2021

Relaxc is controller software or block function under ‘EULA’ license. It is a copyrighted work of APPEDGE 14 / 16

The experiment curve in open loop with a step of 1

Figure 12

In Figure 14,we plot the solution of PID Tuner which is not able to reject the disturbance

effectively because it is a PD controller but gives a good reference time rise with a large peak

on the control U=12 at t=0 against 0.12 for Relaxc. We compare it (Figure 13) at 2 tunings of

Relaxc: case 1 (values of the Table 5), case 2: we chose =tg ti=2.4. Despite that

the large dead time imposes the final dynamic without degree of freedom for twisting U,

Relaxc gives excellent results effortlessly.

Relaxc tuning

09/2021

Relaxc is controller software or block function under ‘EULA’ license. It is a copyrighted work of APPEDGE 15 / 16

Figure 13 DIPTD delay=1s

3.1.3 Double integrating process without delay

For this example, to use Relaxc on drones (UAV), frees you from the hassle of laborious PID

tuning, modeling and thus gives you the opportunity to build quickly a versatile drone.

Relaxc is the solution to design a race Drone, control the Load suspended, Bounder the

control, manage the battery energy or increase the flight time

We study =

with =,= 1, ( )= 0.01

We compare (Figure 13) 3 tunings of Relaxc: case 1,2,3 with respect to the PID Tuner

solution.

The case 3 gives a better time rise than the PID found by complex optimization algorithms

and an amazing perturbation rejection. The perturbation is vanished at t=20s (green curve).

When we have no delay, or no time lag the only Relaxc limits are the level of the control U at

0 and the sample time we choose.

Table 6 tuning for the case 1, 2, 3

Identification of constants

Case 1

Case 2

Case 3

ti=1.4, vi=1.4, yi=1

ks

1

vi tg 30 = 5

3ti=4.2

3ti = 4

.2

ti = 1.4

ks

1

vi tg 30 =15

ti=1.4

0.5 ti = 0.7

ks

1

vi tg 30 =31

0.5 ti=0.7

Relaxc tuning

09/2021

Relaxc is controller software or block function under ‘EULA’ license. It is a copyrighted work of APPEDGE 16 / 16

4 Conclusion

Theses several examples show that we can see Relaxc as a Stochastic Gradient Descent

on a time dependent process or Time Varying Parameters plus Delay: (SGDTVPD). The

varying parameter here is the control and the gain is the learning rate i.e., the

step or ratio of the speed convergence.

In other words, in this context only the main physical parameters of the process: position

speed and time are used to calibrate online Relaxc. The Relaxc paradigm avoids using the

classic way in control theory as margin gain, phase or algebraic and numerical manipulations

as LQG, MPC, pole placement, etc. and especially to avoid identifying a transfer function,

disturbance or modeling the process for the sole purpose to control it.

Stay tuned with Relaxc.

References:

[1] J.Masse Practical tuning of Relaxc :

https://www.researchgate.net/publication/344070376_Practical_tuning_of_Relaxc_v2-1

[2] J.Masse Relaxc vs Kalman :

https://www.researchgate.net/publication/347510415_Relaxc_vs_Kalman

[3] J.Masse Relaxc vs MPC

https://www.researchgate.net/publication/353637426_Relaxc_Vs_MPC

[4] All articles : https://www.researchgate.net/publication/344219560_Relaxc_Bibliography_v2