• No results found

Department of Electrical Engineering Petter Krus

N/A
N/A
Protected

Academic year: 2021

Share "Department of Electrical Engineering Petter Krus"

Copied!
36
0
0

Loading.... (view fulltext now)

Full text

(1)

Structure

Svante Gunnarsson

y

Department of Electrical Engineering Petter Krus

z

Department of Mechanical Engineering Linkoping University, S-58183 Linkoping, Sweden

Abstract

Control of a hydraulic crane is considered. Due to the oscillatory character of the system smooth the operation of the crane is a demanding task. In order to improve the handling properties feedback control of the crane is studied. Based on linearized models feedback regulators of both LQG and PID type are designed.

The feedback is based on position, pressure and acceleration measurements. Since the properties of the system change with load and operating point adaptive control is also introduced. The use of accelerometer signals for impact detection is also discussed. The proposed solutions are tested in both simulations and experiments on a real crane.

This work was sponsored by the CENIIT at Linkoping University. Report no. LiTH-ISY-R-1961

y

Phone: +46-13-281747. Fax: +46-13-282622. E-mail: svante@isy.liu.se

z

Phone: +46-13-281792. E-mail: petkr@ikp.liu.se

1

(2)

1 Introduction

There is a clear trend to introduce more automation in mechanical system controlled by uid power actuators. This is an eect of the development of sensor and computer technology together with higher performance requirements of many types of system.

See e.g. 1] and 2]. This is also the case for applications like excavators, cranes, forest machines, etc, and there are several factors behind this development. One is that the expected productivity would increase, if the operator was provided with suitable support. Furthermore, on many markets these kinds of machinery are often operated by unskilled labour, and nally, there is an increased technical feasibility. The advent of cheaper and more reliable transducers for pressure, acceleration and position makes it possible to introduce accurate position control in mobile hydraulic systems also in these kind of systems. However, such machineries are usually characterized by having long arms with considerable exibility in the mechanical structure which makes them very oscillatory and dicult to control. These properties makes these system a challenging application for modern control theory, and control of exible mechanical structures is an active research eld, ranging from control of large space structures to control of industrial robots and other robot like devices. 3], 4] and 5]

In this paper we shall consider control of a hydraulic crane, shown in Figure 1, which has been considered in a number of previous papers. See, for example, 6], 7], 8] and

9].

u

Figure 1: Hydraulic crane

2

(3)

The crane has four actuators to control boom, arm, the telescopic extension of the arm and nally the rotation of the whole crane. Using the vocabulary from the robotics eld the crane can be seen as a robot with three rotational and one prismatic joint.

See e.g. 10]. The study presented here has been concentrated to control of one single joint, namely the actuator for the boom piston, since this is the function most aected by the compliance in the system.

The transducers that have been adopted on the crane are position transducers on the pistons, pressure sensors in the pistons, and nally an accelerometer at the crane tip measuring the acceleration perpendicular to the arm, i.e. the vertical acceleration when the arm is at a horizontal position.

The conventional way of controlling the crane is by manually operating the control valves to the dierent actuators. This requires considerable experience in order to avoid violent oscillations and to achieve sucient accuracy. In robots there is position feedback but in order to have accuracy the structure is usually made very sti, thereby reducing the eect of oscillations. However, using position control in a large exible structure as a crane puts high demands on the control system. The behavior of the crane also vary a great deal depending on geometry and load, which imply that some sort of adaptive control strategy is desirable.

In this paper we shall present some eorts that has been made to address this problem.

The main contributions is the adoption of adaptive control methods using sensor signals for position, acceleration and load pressure. Furthermore, the use of accelerometers both for the design of the feedback and for detection and estimation of external forces resulting from impacts with surrounding objects. Detection and estimation of external forces has at least two potential uses. First, it can be used for safety reasons to avoid too high stresses in the structure, and second, it can be used in the identi cation algorithm to decide whether the parameters should be updated or not.

The paper is organized as follows. In Section 2 a linearized mathematical model for the system is derived and its properties are evaluated for a relevant set of parameter values.

The linear model is then used in Section 3 to design controllers of both state space and PID-type. In Section 4 it is discussed how the relevant parameters needed for the controller design can be identi ed on-line. The complete adaptive control system is then evaluated in Section 5 on the real crane. In Section 6 the problem of deformation estimation and compensation is treated while impact detection is discussed in Section 7. Finally Section 8 contains some conclusions.

3

(4)

2 Mathematical Model

2.1 Basic equations

Piston and load

The dynamics of the piston and the load will be modeled by a simpli ed linear model based on Figure 2. We have then assumed that the exibility is concentrated to the arm of the crane, and that we only consider the main resonance frequency. See also

11] for a discussion of this type of model.

A 1 A 2 C 2

C 1

P 1 B p P 2 X p

B 1 X L

K 1

M 1 M 2

Figure 2: Simpli ed mechanical model.

In Figure 2 the following notations are used:

p

1

- pressure in chamber one p

2

- pressure in chamber two A

1

- piston area in chamber one A

2

- piston area in chamber two C

1

- capacitance in chamber one C

2

- capacitance in chamber two

M

1

M

2

- masses BB P - friction coecients

K - stiness f - external force

x P - piston position x L - load position Table 1: Notations in gure 2

Using Figure 2 we obtain the force balances

M

1

x  P = A

1

p

1;

A

2

p

2;

B P x _ P + K ( x L

;

x P ) + B (_ x L

;

x _ P ) (1) and M

2

x  L =

;

K ( x L

;

x P )

;

B (_ x L

;

x _ P )

;

f (2) respectively. It should be stressed here that we only include linear friction forces.

This is of course a signi cant simpli cations since the friction force typically exhibits nonlinear behavior.

4

(5)

Oil volume

The mathematical models of the oil volumes in the cylinder are based on mass balances of the type

q = d

dt ( V  ) (3)

where  is the density of the oil, q is the volume ow and V is the volume. Linearization of equation (3) in some operating point gives the equations

q

1

= A

1

x _ P + C

1

p _

1

(4)

and q

2

= A

2

x _ P

;

C

2

p _

2

(5)

respectively. Here q

1

and q

2

denote the ow into chamber one and chamber two re- spectively, while C

1

and C

2

are capacitances of the two chambers. They are given

by C

1

= A

1

l

2  C

2

= A

2

l

2  (6)

where l is a nominal chamber length and  is the bulk modulus of the oil. For a thorough discussion of the modeling and linearization steps we refer to standard text book like, e.g., 12] or 13].

Valve

The oil ow through the valve is described by an equation of the type q = C q dx V

s

1

2   p (7)

where the constants C q and d depend on the geometry of the valve and x V is the valve opening. Furthermore  p denotes a pressure dierence between, for example, supply pressure and the pressure in chamber one. Equation (7) is also linearized in some operating point, and such an operation yields the linear equations

q

1

= K q x V

;

K c p

1

(8)

and q

2

= K q x V + K c p

2

(9)

respectively. Here K q and K c denote ow gain and ow-pressure coecient respectively.

See 13] or 12] for details. To model the dynamic properties of the valve we also introduce the equation

x  V + 2 ! v  v x _ V + !

2

v x V = !

2

v u: (10) where u denotes the input signal to the valve and ! v and  v represent the resonance frequency and damping of the valve.

5

(6)

2.2 State space model

A convenient form for studying the problem is to use a state space description, since it oers a systematic method for handling several measured signals. See, for example,

14] for an introduction.

The natural choice of state variables is position and velocity of piston, load and valve respectively and the pressure in each chamber, i.e.

x

1

= x P  x

2

= _ x P  x

3

= x L  x

4

= _ x L  x

5

= p

1

 x

6

= p

2



x

7

= x V  x

8

= _ x V : (11) Using these state variables and the linear equations for the oil volumes and the valve the system can be described by

x _ = Ax + Bu + B f f (12) where

A =

0

B

B

B

B

B

B

B

B

B

B

B

B

B

B

@

0 1 0 0 0 0 0 0

;

K

M

1 ;

B

+

M B

1

P K

M

1

B

M

1

A

1

M

1 ;

A

2

M

1

0 0

0 0 0 1 0 0 0 0

M K

2

B

M

2 ;

K

M

2 ;

B

M

2

0 0 0 0

0

;

A C

11

0 0

;

K C

1

c 0 K C

1

q 0 0 A C

22

0 0 0

;

K C

2

c

;

K q

C

2

0

0 0 0 0 0 0 0 1

0 0 0 0 0 0

;

!

2

v

;

2  v ! v

1

C

C

C

C

C

C

C

C

C

C

C

C

C

C

A

(13)

B = (0 0 0 0 0 0 0 !

2

v ) T (14)

and B f = (0 0 0

;

1

M

2

0 0 0 0) T : (15)

The measured signals are piston position

y

1

= x P (16)

eective load pressure

y

2

= p Le = p

1;

A

2

A

1

p

2

(17)

and load acceleration

y

3

=  x L (18)

6

(7)

respectively. Collecting the output signals in a vector y gives

y = Cx + D f f (19)

where

C =

0

B

@

1 0 0 0 0 0 0 0

0 0 0 0 1

;

A A

21

0 0

M K

2

B

M

2 ;

K

M

2 ;

B

M

2

0 0 0 0

1

C

A

(20)

and

D f =

0

B

@

0 0

;

M

12 1

C

A

: (21)

2.3 Transfer function model

An obvious way to derive transfer functions for the system is to use the state space description derived in the previous section. The transfer functions from valve input and external force to piston position, eective pressure and load acceleration are given

by

0

B

@

X P ( s ) P Le ( s ) A L ( s )

1

C

A

= C ( sI

;

A )

;1

BU ( s ) + C ( sI

;

A )

;1

B f F ( s ) : (22) where A L ( s ) denotes the Laplace transform of the load acceleration. To illustrate the character of the system we show, in Figures 3 - 5, the Bode diagrams of the transfer functions from valve input to piston position, eective load pressure and load acceleration respectively. The transfer functions are evaluated for the set of parameters given in Appendix B.

100 101 102

10−2 10−1 100 101

100 101 102

−400

−350

−300

−250

−200

−150

−100

−50

Figure 3: Valve input to piston position

7

(8)

100 101 102 101

102 103 104

100 101 102

−200

−150

−100

−50 0 50 100

Figure 4: Valve input to eective load pressure

100 101 102

100 101 102 103

100 101 102

−350

−300

−250

−200

−150

−100

−50 0 50 100

Figure 5: Valve input to load acceleration

In these gures we see that if we restrict the attention to the low frequency range the transfer functions can be fairly well approximated by the transfer functions

X p ( s ) = K x

s U ( s ) (23)

P Le ( s ) = K p

1

s + K p

2

s

2

=!

02

+ 2 

0

s=!

0

+ 1 U ( s ) (24)

and A L ( s ) = K a s

s

2

=!

02

+ 2 

0

s=!

0

+ 1 U ( s ) (25) respectively.

8

(9)

3 Control System Design

We shall consider two alternative approaches to the problem of designing a control system for the crane. One approach is to start from the state space model presented above and develop a feedback control system using state space methods. The alter- native approach is the use the simpli ed transfer functions given by equations (23) to (25) and develop a control system of PID type.

3.1 Control design using state space models

A systematic method to compute a feedback control law for a system given on state space form is to use state feedback and state estimation. In particular it is useful in our problem since we can handle the measurement signals in a systematic way. See 14]

for a general introduction to the topic, and 6] for further discussions of the application to the crane.

Extended state space model

The starting point is the state space model in equations (12) and (19)

x _ = Ax + Bu + B f f (26)

y = Cx + D f f (27)

A basic requirement when designing the control system is that it shall be able to position the piston without any steady state error, and to achieve this we need a regulator with integral action. We therefore introduce the extra state

x n

+1

=

Z

t

0

( x r ( )

;

x p ( )) d (28)

where n denotes the model order, which in our case is eight. This means

x _ n

+1

= x r

;

C

1

x (29) where C

1

is the rst row of C . This gives the following extended state space model

X _ =  AX +  Bu +  B r x r +  B f f (30)

y =  CX + D f f (31)

where

A  =



A 0

;

C

1

0

!

B  =



B 0

!

B  r =



0 1

!

B  f =



B f

0

!

(32)

C  = ( C 0) (33)

9

(10)

Feedback from estimated states

The control signal is generated as

u =

;

L  X ^ + l

0

x r (34) where ^ X is an estimate of the extended state vector and x r is a reference signal. The gain vector L is computed by minimizing the quadratic criterion

J =

Z 1

0

X T Q

1

X + u T Q

2

udt (35) where Q

1

and Q

2

are symmetric matrices. Furthermore Q

1

and Q

2

have to be positive semide nite and positive de nite respectively. The gain vector that minimizes the criterion (35) is given by

L  = Q

;12

B  T S (36) where the matrix S is obtained from the quadratic matrix equation

0 =  A T S + S A  T + Q

1;

S BQ 

;12

B  T S (37) The estimate of the (extended) state vector is obtained by and state estimator (ob- server)

X _^ =  A X ^ +  Bu +  B r x r +  K ( y

;

C  X ^ ) (38) where  K is a gain matrix. By describing the system in a statistical framework we can use a systematic way to compute  K such that an optimal state estimator (Kalman lter) is obtained. See 14] for further information. In the Kalman lter the gain matrix is given by

K  = P C  T R

;12

(39) where P is given by

0 =  AP + P A  T + R

1;

P C  T R

;12

CP  (40) The matrices R

1

and R

2

are positive semide nite and positive de nite respectively, and they represent the covariances of the disturbances acting on the states and on the measurements respectively. The feedback obtained by using (34) together with a state estimate generated by a Kalman lter is often denoted LQG (linear quadratic Gaussian) regulator, since the Kalman lter is the optimal state estimator provided the disturbances are Gaussian.

Regulator transfer functions

Deriving the transfer functions corresponding to the LQG feedback designed above useful insight can be achieved. Inserting equation (34) into equation (38) gives

X _^ = (  A

;

B  L 

;

K  C  ) ^ X + (  Bl

0

+  B r ) x r +  Ky (41)

10

(11)

Using the Laplace transform we get

X ^ ( s ) = ( sI

;

A  +  B L  +  K C  )

;1

((  Bl

0

+  B r ) X r ( s ) +  KY ( s )) (42) which gives

U ( s ) = F X r ( s ) X r ( s )

;

F y ( s ) Y ( s ) (43) where

F X r ( s ) = ( l

0

+  L ( sI

;

A  +  B L  +  K C  )

;1

(  Bl

0

+  B r )) (44) Furthermore

F y ( s ) =  L ( sI

;

A  +  B L  +  K C  )

;1

K  (45) which is a row vector with three elements. To make this clearer F y ( s ) can be written as F y ( s ) = ( F X p ( s ) F p ( s ) F A ( s )) (46) where the elements represent the feedback from piston position, load pressure and load acceleration respectively. The structure of the control system is shown in gure 6 where the inner feedback loop represents the position feedback. Simulations and experiments, see 15] and 16], have indicated that pressure and acceleration feedback give comparable dynamic properties of the closed loop system. Figure 6 therefore contain one outer loop representing the pressure or acceleration feedback.

Σ System

F

Xr

F

Xp

F

p

/ F

A

Figure 6: LQG control system structure

For practical reasons is is however convenient to rearrange the control system slightly and instead consider the structure shown in gure 7 where

F

2

( s ) = F X p ( s ) F X r ( s )

;1

F

3

( s ) = F p ( s ) F X r ( s )

;1

(47) By the modi cation the behavior of the integrator is more easily handled, for example in case of input saturation.

11

(12)

Σ

F F F 1

2

3

System

Figure 7: Modi ed LQG control system structure

Example

To illustrate the properties of the LQG controller we present an example of a design for the linear model presented above with the parameter values given in the appendix.

In this particular case we apply the LQG methodology to the situation where we use the measurements of the piston position and load pressure in the feedback loop. The design variables were chosen as

Q

1

= diag(0  0  0 : 4  0 : 04  0  0  0  0  1) Q

2

= 1 (48) and R

1

= diag(0 : 01  0  0 : 01  1  0  0  0  0  0) R

2

= diag(10

;4

 10) (49) The resulting feedback is illustrated below in terms of the amplitude curves of the transfer functions F

1

( s ) F

2

( s ) and F

3

( s ).

3.2 Control design using transfer function models

The starting point is the control system in gure 11 where F PI ( s ) is a PI-regulator F PI ( s ) = ( ! I =s + 1) K P (50) and the pre- lter F f ( s ) is used to cancel the overshoot usually caused by a PI-regulator.

In the low frequency range the transfer function from input to piston position can be approximated by an integration, i.e.

X p ( s )



G x ( s ) U ( s ) (51)

12

(13)

10−1 100 101 102 103 10−1

100 101 102

Angular frequency

Amplitude

F1

Figure 8: Amplitude curve where

G x ( s ) = K x

s (52)

Using this expression for G x ( s ) the closed loop transfer function becomes G c ( s ) = F f ( s )( ! I =s + 1) K P G x ( s )

1 + ( ! I =s + 1) K P G x ( s ) (53) Introducing

K P K x = ! c (54)

yields

G c ( s ) = F f ( s )( ! s I + 1)

s

2

! c ! I + ! s I + 1 (55)

The parameters ! c and ! I can be chosen so that only real real poles are obtained G c ( s ) = F f ( s )( ! s I + 1)

( ! s

22

a + 2 !  a a s + 1) (56) If F f ( s ) is chosen as

F f ( s ) = ! s a + 1

! s I + 1 (57)

we get

G c ( s ) = ! s a + 1

( ! s

22

a + 2 !  a a s + 1) (58) i.e. the zero at ! I is replaced with a zero at ! a . In this way the overshoot is determined solely by  a . If  a = 1 there is only one (real) pole at ! a , and there is consequently no

13

(14)

10−1 100 101 102 103 10−2

10−1 100 101

Angular frequency

Amplitude

F2

Figure 9: Amplitude curve

overshoot A faster response, with only little overshoot, is obtained if  a is in the range 0.7-0.8. Identi cation of the parameters in equations (55) and (56) yields

! a

2

= ! c ! I (59)

2  a =! a = 1 =! I (60)

and hence

! c = 2 ! a  a ! I = ! a

2  a (61)

Let us now consider a slight rearrangement of the block diagram in gure 11 and instead consider the structure in Figure 12, where we also have introduced pressure feedback.

It should be noticed that this is the same structure as for the LQG regulator after the rearrangement. See gure 7.

The rearrangement is motivated by considerations regarding saturation. In the original scheme the pre lter is useless if the valve is saturated, and it is unable to prevent the overshoot. For a similar reason the ltered pressure signal is fed through the PI-regulator instead of directly to the valve. This procedure allows the PI-regulator to handle saturation and anti-wind up in a consistent way. The cuto frequency of the PI-regulator is also lower than the range where the pressure feedback is eective.

Consequently, the PI-regulator will behave like a constant gain in this range.

In gure 12 the transfer functions are given by F

1

( s ) = F PI ( s ) F f ( s ) = ( ! a

s + 1) K

1

(62)

where

K

1

= ! c

2  a K x (63)

14

(15)

10−1 100 101 102 103 10−5

10−4 10−3 10−2

Angular frequency

Amplitude

F3

Figure 10: Amplitude curve

Σ

F F

- 1 x

p

f PI System

Figure 11: PID control system structure and F

2

( s ) = F f

;1

( s ) = ! s I + 1

! s a + 1 (64)

Furthermore the pressure feedback is given by

F

3

( s ) = K

3

s ( !

131

+ !

132

)

( s=!

31

+ 1)( s=!

32

+ 1) (65)

The eect of the pressure feedback F

3

( s ) on the damping can be studied by closing the pressure feedback loop, assuming K p

2

= 0, which yields

P Le ( s ) = K p

1

sF

1

( s )( X r ( s )

;

F

2

( s ) X p ( s ))

s

2

=!

02

+ 2 

0

s=!

0

+ 1 + F

1

( s ) F

3

( s ) K p

1

s (66) For simplicity we assume that F

3

( s ) = K

3

and that F

1

( s ) = K

1

which implies

P Le ( s ) = K p

1

sK

1

( X r ( s )

;

F

2

( s ) X p ( s ))

s

2

=!

02

+ (2 

0

=!

0

+ K

1

K

3

K p ) s + 1 (67) Introducing the eective damping 

0

e gives

P Le ( s ) = K p

1

sK

1

( X r ( s )

;

F

2

( s ) X p ( s ))

s

2

=!

02

+ 2 

0

e s=!

0

+ 1 (68)

15

(16)

Σ

F F F 1

2

3

System

Figure 12: Modi ed PID control system structure

and K

3

= 2( 

0

e

;



0

)

!

0

K

1

K p

1

(69)

The damping 

0

is low compared to the value of 

0

e that is wanted in order to ensure stability. Therefore it is neglected (or assumed to have a constant but small value).

Hence

K

3

= 2 

0

e

!

0

K

1

K p

1

(70)

A normal value for the desired damping is 

0

e = 1. There is however a risk with too large values of K

3

. The hysteresis in the valves may cause such a phase shift that higher resonance frequencies can be unstable, see 17], and in order to reduce the inuences of higher frequencies low pass ltering is included in F

3

( s ). Since there furthermore is a steady state level in the load pressure, this will generate an error signal in steady state unless the signal is high pass ltered. The high pass ltering in F

3

( s ) is hence used to remove the inuence of higher resonants. The lter cuto frequencies !

31

and !

32

could be spaced symmetrically around the resonant frequency !

0

. In this way there will be no phase shift at the resonant frequency and the damping will be eective. This feedback is also consistent with the LQG-control design. The upper cuto frequency

!

32

can sometimes be omitted since the valve itself has a limited bandwidth that will act as low pass lter.

16

(17)

4 Identication

4.1 Introduction

The regulators derived above all require models of the system. In order to implement the full order LQG regulator a large number of parameters are needed, while a low order approximation of the LQG regulator and also the PID approach require less parameters. The natural tool to use for nding estimates of the system parameters is system identi cation, and we will here discuss some aspects of the application of system identi cation to the hydraulic crane. For a thorough introduction to the area of system identi cation in general and recursive identi cation in particular we refer to 18] and

19]. Even though we are primarily interested in the coecients of the continuous- time description we will consider discrete-time models in the general discussion. The starting point is hence the following dierence equation

y t + a

1

y t

;1

+ ::: + a n y t

;

n = b

1

u t

;1

+ ::: + b n u t

;

n + v t (71) where u t and y t denote the input and output signals while v t is a disturbance signal.

For notational convenience we introduce

' t = (

;

y t

;1

:::

;

y t

;

n u t

;1

:::u t

;

n ) T (72)

and = ( a

1

:::a n b

1

:::b n ) T (73)

which gives the compact expression

y t = ' Tt + v t (74)

We now want to nd the parameter vector that gives the best description of the real system, and this is done by minimizing the criterion

V t ( ) =

X

t

k

=1

( y k

;

' Tk )

2

(75)

It is then straightforward to show that the minimizing vector can be computed recur- sively as

^ t = ^ t

;1

+ P t ' t " t (76) where

" t = y t

;

' Tt ^ t

;1

(77) and P t = P t

;1;

P t

;1

' t ' Tt P t

;1

1 + ' Tt P t

;1

' t (78)

These equations de ne the well known recursive least squares (RLS) method. For a thorough discussion of this algorithm we refer to, for example 19]. There are however some factors that prevent a direct use of the RLS algorithm, and we will discuss these problems and some methods to handle them.

17

(18)

4.2 Parameter tracking

The rst problem is that P t , updated according to equation (78), will tend to zero.

This will then stop the updating of the parameters, and this is of course an undesirable property in applications, e.g. the hydraulic crane, when the dynamics change during operation. There exist several methods for handling this problem, and the perhaps most common one is to introduce a so called forgetting factor. Using the forgetting factor equation (78) becomes

P t = 1  t

"

P t

;1;

P t

;1

' t ' Tt P t

;1

 t + ' Tt P t

;1

' t

#

(79) Here the forgetting factor  t is chosen in the interval 0 <  t



1. Choosing  t



1 we come back to the original RLS algorithm, equation (78), which means that there is no forgetting in the system i.e all values are equally weighted for the parameter identi cation. The choice  t < 1, on the other hand, means that there is an exponential weighting of the measurements in such a way that old measurements are given less weight less than new ones. There is however a trade-o in the choice of forgetting factor. Choosing a \small" value of  t gives good ability to follow varying dynamics, but it also implies high sensitivity to disturbances. The choice of forgetting factor will be further discussed below. One feature of the forgetting factor is that the dynamics of the parameter adjustment can be approximated by a rst order system with a time constant ,that can be calculated from  . An approximate value of is given by

= T= (1

;

 ) (80)

where T is the sampling interval.

Instead of tending to zero P t will, for a constant forgetting factor, stay around a mean level

P t



(1

;

 ) Q

;1

(81)

where Q is the mean value of the matrix ' t ' Tt , i.e.

Q = E' t ' Tt (82)

4.3 Robustness

The introduction of mechanisms to ensure that the algorithm maintains ability to track varying parameters however results in a new problem that has to be considered. In the discussion above we have assumed that the signals involved are persistently exciting, i.e. that they \contain suciently many frequencies". If we focus on the forgetting factor modi cation of the RLS algorithm it is a well known fact that when the signals

18

(19)

are not persistently exciting and we use a forgetting factor less than one the matrix P t

will start growing exponentially, a phenomenon often denoted covariance blow-up. See for example 20]. We hence have to introduce some safety mechanism that prevents P t from tending to in nity, and one method is to monitor and adjust P t such that its trace, i.e. sum of diagonal elements, remains constant.

A further problem that has to be dealt with is caused by poor excitation in combina- tion with disturbances. Even though we manage to keep P t bounded during periods with poor excitation the parameters may drift away due to disturbances acting on the system. This phenomenon can be handled by introducing a dead zone that stops the updating of the parameters when the error " t is too small. The parameter update equation are then modi ed into

^ t = ^ t

;1

+ a t P t ' t " t (83) where where the positive scalar a t can be used to turn o the updating. Introducing a t into the equation for P t yields

P t = 1  t

"

P t

;1;

a t P t

;1

' t ' Tt P t

;1

 t + ' Tt P t

;1

' t

#

(84) The main problem with this approach is of course that we need some rule for how a t

should be chosen.

4.4 Adjustable forgetting factor

The idea that we propose in this paper is to let a t and  t be adjusted according to the performance of the system. The forgetting factor  t is calculated as

 t = 1

;

(1

;



0

)1

;

; t

; max ] (85)

where ; t is the trace of P t . In this way it drives the trace of the P t towards ; max , which ensures that P t stays bounded. Note that apart from the choice of a t there are only two parameters to set for this type of identi cation, 

0

and ; max . To start up the algorithm it is suitable to initialize P t with a diagonal matrix with the trace ; max . The variable a t can be controlled either by information of the input signals in the system or by the trace of P t such that a large ; t yields a small a t . It can not be set to zero, however, since this would turn the identi cation o completely. One possible way of calculating a t is exempli ed by equation (86).

a t = 1

;

; t

; max 

0

(86)

19

(20)

Note also that there are only two parameters to be set the lower bound on the forgetting factor 

0

and the maximum value of the trace of P t , i.e. ; max , which also can be used for initialization of P t . This is not more parameters than are needed for RLS with x forgetting factor. In order to avoid identi cation using signals with too low amplitude

; max should be low enough to increase  t as soon as the signals start to diminish.

The upper limit ; max is not a very natural parameter for the user. It does, however, reect an estimate of the noise level in the system, and this is a property which it is rather easy to give a rough estimate of. From (81)we have that P t ,in stationarity, approximately can be by expressed as

P t = (1

;

 )( E'' T )

;1

(87) If we for a moment assume that the components of ' t are independent this means that

; = (1

;

 ) = (

X

N

i

=1

E' 1

2

i ) (88)

where here ' i denotes the i :th component of ' . If the noise level is known a value for

; max can be calculated that limits P t when the signal level goes below that value. The relationship can be described as

; max = (1

;



0

) = (

X

N

i

=1

x

2

min 1 ) (89)

The value of 

0

is a function of id

0

which is the lower limit of the time lag in the parameter adjustment and can be calculated by rearranging equation (80) into



0

= 1

;

T= id

0

(90)

Obviously, the choice of id

0

represents some kind of rough estimate of the system dynamics, since id

0

should be longer than the interesting time constants of the system.

There are some additional considerations that have to be taken into account for the implementation. Using the discrete time representation above the identi cation is strongly dependent on the step size. The sampling rate must be high enough to monitor the dynamic variations in the system. On the other hand, a too small time step could lead to numerical problems. The identi cation is based on the dierence between values in dierent time steps, and a small time step can reduce the dierence between two samples to the order of the noise level.

4.5 Filtering

One very ecient way to improve the convergence characteristics is to lter the input and output signals to the identi er with identical lters. In this way the transfer

20

(21)

function remains unchanged since the two lters cancel each other. Here a state-space representation is used where the highest derivative is calculated and the other states are integrated using the trapezoidal rule (corresponding to bilinear transform). A byproduct of the ltering is that the derivatives of the lter outputs are obtained. The identi cation algorithm can then work on the time continuous system instead of the time discrete representation. This is very attractive since the underlying system is time continuous. The models used for the identi cation here, are dierential equation of the following form

d n y

dt n + a

1

d n

;1

y

dt n

;1

+ ::: + a n y = b

0

d n u

dt n + b

1

d n

;1

u

dt n

;1

+ ::: + b n u (91) In order to obtain all the necessary derivatives from the lter they have to be at least of order n . A suitable choice is to set the order to n + 1. In this way all derivatives are low pass ltered compared to the input signal and no numerical problems due to dierentiation are to be expected. These choice of the lter cuto frequencies reects an estimate of the range of the system dynamics. The cuto frequency of the high pass lter ! hp should be lower than any of the system dynamics. The cuto frequency of the low pass lter ! lp on the other hand should be higher than the system bandwidth.

In the applications of interest here, hydraulic servo systems, the interesting frequency range is usually within a range of one or two decades. Therefore, a typical value of ! lp

would be

! lp = 30 ! hp (92)

! lp must, however, be less than the Nyquist frequency 1 = (2 T )

4.6 Identication of crane dynamics

We start by recalling the simpli ed models for the relationship between valve input and piston position equation (23)

X p ( s ) = K x

s U ( s ) (93)

and between valve input and load pressure equation (24) P Le ( s ) = K p

1

s + K p

2

s

2

=!

02

+ 2 

0

s=!

0

+ 1 U ( s ) (94) respectively. The regulator design requires the open loop gain K x , the resonance fre- quency !

0

, the damping 

0

and the gain K p

1

from input signal to pressure at the resonance frequency. The parameters !

0

, 

0

and K p

1

can be obtained from identi ca- tion of the transfer function between input signal and pressure, while the parameter K x can be obtained from identi cation of the transfer function between input signal

21

(22)

τ

id0

x

min

ω

lp

, ω

hp

, (T

)

a(t ) λ(t ) P

0

Γ(τ) RLS-manager

RLS

Lowpass filter of order n+1

y

f

with derivatives

u

f

Highpass

filter u

y

External override of a (t ) ω

lp

ω

hp

User supplied

inputs

ω

id

Θ (t )

Figure 13: Structure of the RLS implementation

and piston position, equation (93) provided that the pre lters have a low upper cuto

frequency corresponding to the range where equation (93) is valid. The structure of the identi cation is shown in gure 13.

The RLS manager controls the values of  t and a t . The user supplied inputs are a lower limit for the identi cation time constant id

0

, a value of a typically small signal amplitude x min .

Since there are two identi cations in parallel there should be twice as many parameters to set. Some of them can, however, be taken to be the same. The only one that diers is the cuto frequency of the low pass lters. When ltering the piston position x p a much lower cuto frequency is used since the model is valid in the low frequency range only. The X min values could be dierent, but both input signals are the same and they dominate the magnitude ; t , since it is much smaller than the derivatives of the output signals. Therefore X min are taken to be the same for both identi cations. Dierent values for id

0

could also be used, but for simplicity the same value is used for both.

It should once again be stressed that it is very important to avoid running the identi- cation when severe nonlinearities are encountered. There are two ways to avoid this.

The rst is to override the control variable a t and set it to zero when known nonlinear regions are reached such as the end stroke of pistons. Another way is to control the system in such a way that the nonlinear regions are avoided altogether, i.e avoid the re- gion close to the end stroke of pistons. Another phenomenon that was encountered was the eect of pump saturation. This eect is similar to saturation in the valve. When the system is saturated a lower gain K x is identi ed which means that the control gain

22

(23)

K

1

is increased which drives the system even more into the saturated region. In order to avoid this behavior of the gain the input signals must be limited in the software in such a way that the system (valve/pump) never becomes saturated and that the limited signals are sent into the identi er. This is particularly important when several actuators are supplied by the same pump.

5 Adaptive Control

At rst the adaptive controller was tested against a simulation model of the crane.

The simulations where carried out in the HOPSAN simulation package where the com- plete nonlinear equations for the dierent components can be simulated including the mechanical structure of the crane. The modeling technique is described in 21]. In this simulated yet nonlinear environment the algorithm performed perfectly. When the algorithm had been tested, the same program could be used to control the real system.

The experiments where carried out in a full size lorry crane. It was equipped with pressure and position sensors. The control valves where electrically controlled mobile proportional valves. The dead band in the valves was considerable and therefore dead band compensation in the software was implemented.

Figure 14 shows the reference position, actual position of the piston and the eective load pressure. The identi cation starts immediately but at rst the controller used is a simple proportional control. At 10 seconds the adaptive regulator is introduced. The behavior is thereafter smooth and the position error is driven to zero. The controller is also able to handle saturation in the control signal which is demonstrated here since the control signal is saturated most of the transition between the steps as can be seen in gure 15.

23

(24)

Time (sec)

xp, xpr [m] pLe [MPa]

xpr xp

pLe

Figure 14: Reference position, actual position of the piston and the eective load pressure

Time [sec]

u

Figure 15: Input signal to the valve

24

(25)

The identi cation of some of the parameters are shown in gure 16. The inverse of the identi cation time constant, the identi cation bandwidths ! idp and ! idp is shown in gure 17. The corresponding forgetting factors are shown in gure 18. The parameters used for the identi cation where:

id

0

= 1 s] X min = 0 : 03

# hp = 3 rad/s] # lp = 20rad/s]

# hx = 3 rad/s] # lx = 3 rad/s]

T = 0 : 02 rad/s]

Of the estimated parameters, it seems to be very easy to nd the resonance frequency (and the damping, although not shown). The pressure gains on the other hand is much more dicult. The reason for this is probably that the dead band region of the valve is not very well de ned. Although dead band compensation is used (after u ) it cannot be cancelled completely. Therefore the corelation between input signal and pressure are not very strongly correlated at small input signals. The imperfect valve characteristics also degrades the transient response. A much better overall result would therefore be expected if valves with characteristics closer to servo valves where used.

Time (sec)

ω 0 Ks

ω 0

Ks

Figure 16: Estimated resonance frequency and estimated velocity gain

25

(26)

Time [sec]

ω

idp

, ω

idx

[rad/s]

ω

idp

ω

idp

Figure 17: Identi cation bandwidths

Time [sec]

λ

p,

λ

x

λ

p

λ

x

Figure 18: Forgetting factors

26

(27)

Time [sec]

Kp1 Kp2 Kp2

Kp1

Figure 19: Estimated pressure gains

6 Deformation Compensation

Hydraulic actuators are often used in systems with position feedback. In order to keep the position error small the position should be measured at the point that is to be positioned. However, in many cases this is dicult, and this is particularly true when it comes to positioning of exible arms, such as robot arms. In order to avoid excessive position errors due to deformations the arm has to be made very sti and thus rather heavy. If the position of the tip of the arm could be measured instead, the arm could be made more slender and lighter which could be used to increase the performance of the robot. We shall here discuss a method to estimate the position and compensate for position errors due to deformations.

6.1 Transfer function approach

Introducing

 x = ( x P

;

x L ) (95)

equation (2) gives that when the external force f is constant the equations

K  x = f (96)

holds in steady state. The external force is not available and instead we can use equation (2) which in steady state gives

K  x = A

1

p Le (97)

27

(28)

A rough estimate of the deformation is then given by

^ x = A

1

K p Le (98)

where we have to keep in mind that this expression has been derived using steady state relationships. In this equation the parameter A

1

(cross section area of the cylinder) is typically known, while K (stiness) is unknown. We will however discuss a method for estimating this parameter. The method is presented in more detail in 22].

We start by considering the transfer functions G xp ( s ) = P Le ( s )

X P ( s ) (99)

and G m ( s ) = Q L ( s )

P Le ( s ) (100)

where p Le is the eective load pressure, x P is the measured piston position and

Q L ( s ) = A

1

sX P ( s ) (101)

We hence have the relationship

G xp ( s ) = A

1

s

G m ( s ) (102)

The transfer function G m ( s ) is given by

G m ( s ) = C Le s ( ! s

2

mt

2

+ 2 !  mt mt s + 1) ( ! s m

22

1

+ 2 !  m m

11

s + 1)( ! s

2

h

2

+ 2 !  h h s ) + 2 ! h  ! h

2

m

2

s

3

(103)

where

! m

1

=

s

K

M

1

 m

1

= B! m

1

2 K (104)

! h =

s

A

21

C Le M

2

 h = C Le B p ! h

2 A

21

(105)

! mt =

s

K

M

1

+ M

2

 mt = B! mt

2 K (106)

When M

1

<< M

2

(and hence !

1

>> ! mt ) and  h is small the transfer function can be approximated in the frequency interval of interest by

G m ( s ) = C Le s ( ! s

2

mt

2

+ 2 !  mt mt s + 1)

( ! s

22

h + 2 !  h h s ) (107)

28

(29)

This gives

G xp ( s ) = A

1

( ! s

22

h + 2 !  h h s )

C Le ( ! s

2

mt

2

+ 2 !  mt mt s + 1) (108)

or G xp ( s ) = K a s

2

+ K b s

( ! s

2

mt

2

+ 2 !  mt mt s + 1) (109) where

K a = A

1

C Le ! h

2

= M

2

A

1

(110)

From the de nition of the mechanical resonance it follows that the stiness K can be calculated as

K = ! mt

2

( M

1

+ M

2

) (111)

which yields

K = !

2

mt (1 + M

1

M

2

) M

2

(112)

Equation (110) in equation (112) gives

A K

1

= ! mt

2

(1 + M

1

M

2

) K a (113)

and introducing the new constant K px and assuming that M

1

<< M

2

yield K px = K

A

1 

K a ! mt

2

(114)

By estimating the parameters K a and ! mt we can obtain an estimate of the constant K Px needed in order to estimate the deformation of the structure.

6.2 State space approach

The state space approach also oers a way to handle the problem with position errors caused by an external load. This is discussed in more detail in 15], and we will only discuss the topic briey here. The idea is to, in analogy with the approach in Section 3, introduce an extended state vector containing two extra states, the integral of the piston position error and the disturbance signal respectively, i.e.

X = ( x T

Z

t

0

x r

;

x p d f ) T (115)

and to form a state space model for X . By then applying the LQG technique presented in Section 3 we obtain a regulator that eliminates the steady state error of the piston

29

(30)

When the piston position is correct we know that the error in the load position is only caused by the compression of the spring. From equations (95) and (96) we have

K  x = K ( x P

;

x L ) = f (116)

Using the spring stiness and the estimate of the force we obtain an estimate of  x

from ^ x = 1 K f ^ (117)

which then can be added to the piston position reference signal. The integrator state is then formed according to

_^

x n

+2

=

Z

t

0

( 1 K f ^ ( s )

;

x P ( s )) ds (118) Applying this idea results in a regulator that is able to control the load position without any steady state error. This is illustrated by simulations in 15]. The same reference also shows the Bode diagrams of the resulting regulator transfer functions. Of particular interest is the transfer function from load pressure to estimated spring compression.

The corresponding Bode diagram shows that this transfer function has the character of a low pass lter with bandwidth around 3 rad/sec, i.e. almost an order of magnitude below the resonance frequency of the system. It is also interesting to note that the amplitude curve has two small notches where the transfer function form input to load pressure has resonance peaks, see 23].

30

(31)

7 Impact Detection

We have in Section 3 how the accelerometer signal can be used in the control of the crane for obtaining good damping properties. In this section we shall discuss a further use of this signal, by considering the problem of detecting contacts with objects in the working area and possibly also estimating the magnitude of the contact forces. The ideas that will be discussed below are also presented in 9].

Initially, we shall investigate how the acceleration measurement can be used to detect impacts. The idea, which is very simple, is just the monitor the load acceleration and detect when it exceeds a given limit. To illustrate the idea some experiments have been carried out on the real crane. The tip of the crane is moved downwards until it hits a wooden structure on the oor. The measured acceleration is shown in gure 20.

30.0

20.0

10.0

0.0

-10.0

20.0 15.0

10.0 5.0

0.0

Time [sec]

Acceleration [m/s2]

Figure 20: Acceleration during impact

The gure shows that the frequency content of the acceleration signal is higher when an impact occurs than during normal operation. This property can be used in the detection procedure by ltering the acceleration signal through a high pass lter. Figure 21 shows the signal after ltering it through a high pass lter with cut o frequency 60 rad/s.

31

(32)

20.0

10.0

0.0

-10.0

-20.0

20.0 15.0

10.0 5.0

0.0

Time [sec]

Filtered acceleration [m/s2]

Figure 21: High pass ltered acceleration signal used for impact detection.

Finally gure 22 shows the desired and actual piston position together with the load pressure. When the impact is detected the valve is closed and the piston stops at a position over the desired one. There is also a dierence in the pressure level caused by the contact force from the wooden structure. The corresponding deformation of the wooden structure was about 1 centimeter.

Figure 22: Piston position reference position and load pressure (dotted). Adaptive control with acceleration feedback and impact detection is engaged at 10 sec.

The next step will now be to try to estimate the force caused by impacts with sur- rounding objects. We start by considering the simpli ed model of the exible structure, shown in gure 2. Using the force balances in equations (1) and (2) and applying the Laplace transform to these equations we obtain the following expression for the rela-

32

References

Related documents

It is available to call other function blocks in OB1 (FB, FC). FC1 is designed to control the alarm system. FC2 is designed to control the spreader system. FC3 is designed to

To test for impairment the company has to calculate the recoverable value of the goodwill asset, and if this value is less than the carrying value of the goodwill, perform

The literature suggests that immigrants boost Sweden’s performance in international trade but that Sweden may lose out on some of the positive effects of immigration on

The increasing availability of data and attention to services has increased the understanding of the contribution of services to innovation and productivity in

Support for the topographic control of the fronts in the Southern Ocean is provided by the strikingly similar posi- tions of the Southern Ocean frontal features in the inde-

With the help of dasa5 system equipment which is provided by Dasa Company, we build the user interface for the desired algorithm developed in Code Composer Studio (CCS) for

It shows an evident coupling between the systems (4a) and (4b) with oscil- lations in β v initiated by the rotation, but it also shows that a linear controller like (9) can be used

Keywords : angular measurements, bang-bang control, cascade control, minimum time control, oscillation, pole placement, real time control software, rotary cranes,