Добавил:
Опубликованный материал нарушает ваши авторские права? Сообщите нам.
Вуз: Предмет: Файл:
Jack H.Dynamic system modeling and control.2004.pdf
Скачиваний:
73
Добавлен:
23.08.2013
Размер:
5.61 Mб
Скачать

multiaxis motion - 16.11

The distance covered during acceleration, the area under the curves, is,

 

 

 

 

 

 

 

 

 

 

 

 

tacc

2

 

 

 

 

 

 

t

 

 

 

 

 

 

 

2

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

-------

α max

2

 

 

 

acc

 

 

 

 

α

max

 

 

 

2

 

 

 

 

 

2

 

 

 

 

 

 

 

 

 

 

 

 

 

2

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

θ acc

=

 

---------------

 

t dt + tacc

ω max

---------------

( t

 

 

– 2tacc t + tacc) dt

 

 

 

 

 

 

0

4ω

max

4ω

max

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

-------

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

tacc

 

 

 

2

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

-------

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

tacc

 

 

 

 

 

 

θ

 

 

 

=

 

α max2

 

3

 

2

+

 

ω

 

 

 

 

 

α

max2

t3

t

 

 

t

2

+ t

2

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

------------------t

 

 

 

 

 

 

 

 

t – ---------------

---

 

 

 

 

t

 

 

 

 

 

 

 

 

 

acc

 

12ω max

 

 

0

 

 

 

 

max

 

4ω

max

 

3

 

 

 

 

acc

 

 

 

acc

 

tacc

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

-------

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

2

 

=

α

max2

tacc3

+ ω

 

 

t

 

 

α

max2

tacc3

t

3

 

 

+ t

3

 

 

 

 

tacc

 

 

 

α

max2

tacc3

 

tacc3

 

------------------ -------

 

 

 

 

---------------

-------

 

 

 

 

 

ω

 

 

-------

 

+ --------------- -------

– -------

acc

 

12

ω max

8

 

max

 

acc

 

4ω

max

3

 

acc

 

 

acc

 

max

2

 

 

 

 

4

ω

 

max 24

4

 

 

 

 

 

 

θ

acc

=

α

max2

3

 

ω

 

maxtacc

 

α

max2

3

 

 

 

 

 

7α max2

3

 

 

 

 

 

 

 

 

------------------tacc

+ --------------------

– ------------------tacc

– ------------------tacc

 

 

 

 

 

 

 

 

 

 

 

 

 

 

96

ω max

 

 

 

 

 

 

 

2

 

 

 

12

ω max

 

 

 

 

 

96

ω max

 

 

 

 

 

 

 

 

 

θ

acc

=

–14α max2

3

 

ω

 

max tacc

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

--------------------tacc +

--------------------

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

96ω max

 

 

 

 

 

2

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

so the time required at the maximum velocity is,

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

tmax =

( θ

– 2θ acc)

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

--------------------------

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

ω

max

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

t3

acc

+ -------

2

Figure 16.11 A smooth velocity profile example (cont’d)

16.2.2 Position Profiles

A motion can be described using position points along a path. These methods are normally used when a controller does not have any velocity or acceleration limits. The method shown in Figure 16.12 controls motion using a parametric function ’p(u)’. The function value varies from 0 to 1 as the parameter ’u’ varies from 0 to 1. However, the parameters of the function are selected so that the motion starts and stops with a velocity of zero. In this case the final polynomial equation, (3), is fairly simple. This equation can then be used in equation (1) to generate a smooth motion path between any arbitrary start

multiaxis motion - 16.12

and end point, with arbitrary start and end times.

θ ( t)

= θ start + ( θ end θ start) p

 

 

t tstart

 

 

-------------------------

 

 

 

t

end

t

start

 

 

 

 

 

 

where,

θ start, θ end = start and end positions of motion tstart, tend = start and end times for the motion

p( u) = Au3 + Bu2 + Cu + D

The constraints for the polynomial are,

(1)

(2)

p( 0) = 0

p( 1) = 1

d

d

( 1) = 0

----

----p

dtp( 0) = 0

dt

 

These can be used to calculate the polynomial coefficients,

0 = A0

3

+ B0

2

+ C0 + D

 

D = 0

 

 

 

 

 

0 = 3A0

2

+ 2B0 + C

 

C = 0

 

 

 

 

 

 

2

 

 

 

 

B =

3

0 = 3A1

+ 2B1

–-- A

 

 

 

2

1 = A13 + B12 + ( 0) 0 + 0

A = –2

 

 

 

 

 

 

 

B = 3

p( u) = –2u3 + 3u2

 

 

(3)

Figure 16.12 Generating smooth motion paths

The example in Figure 16.13 shows the use of a trigonometric function, instead of a polynomial. This function was used to generate the points in the following sample program in Figure 16.14.

multiaxis motion - 16.13

where,

p( u) = A sin ( Bt + C) + D

The coefficients can be calculated using the conditions used previously,

d

= AB cos ( B( 0) + C)

 

 

----

= 0

π

dtp( 0)

cos ( C) = 0

 

C = –--

 

2

d

= AB cos ( B( 1) + C)

 

 

----

= 0

 

dtp( 1)

 

 

cos ( B + C)

 

= 0

 

 

 

 

π

 

 

 

 

B + C = --2

 

 

π

 

p( 0)

= A sin

B( 0)

+ D = 0

 

 

 

 

 

2

 

 

 

 

 

π

 

p( 1)

= A sin π ( 1)

--

+ D = 1

2

 

A( 1) + A = 1

 

 

The final relationship is,

p( u)

=

1

 

π

 

1

-- sin

 

π t – --

 

+ --

 

 

2

2

2

B =π

A = D

1 A = --2

Figure 16.13 Generating smooth motion paths

The program in Figure 16.14 generates a motion table that can then be used to update setpoints. The function ’table_init()’ must be called once when the program starts to set up global time and table values. When a new target position has been specified the ’table_generate()’ function is called to generate the setpoint table. The ’table_update()’ function is called once every interrupt scan to check the setpoint table, and update the global setpoint variable, ’point_current’ at scheduled times. This function also includes a simple clock to keep track of the system time.