Добавил:
Опубликованный материал нарушает ваши авторские права? Сообщите нам.
Вуз: Предмет: Файл:
(EOD).Mechatronics.pdf
Скачиваний:
81
Добавлен:
23.08.2013
Размер:
5.07 Mб
Скачать

page 52

5.2.2 Integral Control

Integral controllers tend to respond slowly at first, but over a long period of time they tend to eliminate errors.

The integral controller is based on a simple integration.

First we write the general equation for the integrator,

 

m = Kt

 

ASIDE

edt

0

 

integral

In discrete form this becomes,

n

 

 

 

 

mn = K

Tej

 

 

 

j = 1

 

 

 

sum

 

 

 

 

Putting this into the difference equation yields,

 

n

n – 1

 

 

mn mn – 1

= K

Tej K

Tej

= KTen

j = 1

j = 1

 

finally,

 

Note: now the value of the equa-

mn = mn – 1 + KTen

 

tion form become obvious.

 

 

 

 

 

If the constant K is small, the longer term error will slowly drop off. If K is large the long term error will be reduced quickly. Too large a K value will result in a signal that grows out of control.

Try controlling the water tank with the I controller,

page 53

 

 

 

 

 

T

Ko

 

 

 

 

K

 

 

Ko

K

 

 

 

 

A

 

 

 

 

A

 

 

 

 

e

-----

+ θ

 

 

 

 

i

 

T -----

i

h

 

= h

 

 

 

 

 

e

+

 

 

 

 

 

-----

-----

 

n

 

n – 1

 

 

 

 

n – 1

 

 

Ko

 

 

Ko

5.2.3 Differential Control

When there is a sudden change in the system the differential controller will be able to compensate. But in terms of long term effects the controller will allow huge steady state errors.

The control equation can be derived as,

First, the basic equation,

 

 

 

 

 

 

 

 

 

 

 

 

m = K

 

d

e

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

----

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

dt

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

Next, this can be written with the backwards difference equation,

 

 

 

 

m

 

 

 

 

en

en – 1

 

 

 

 

 

 

 

 

 

 

 

 

 

= K ----------------------

 

 

 

 

 

 

 

 

 

 

 

 

 

n

 

 

 

 

T

 

 

 

 

 

 

 

 

 

 

 

 

 

 

We then apply the difference equation, and put in final form,

 

 

 

 

 

m

 

m

 

 

 

= K

 

en en – 1

K

 

en – 1 en – 2

K

 

– 2

K

 

K

 

 

 

 

 

 

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

 

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

= ---e

 

---e

 

+ ---e

 

 

n

 

n – 1

 

T

 

 

T

 

T

n

 

T

n – 1

T

n – 2

mn = mn – 1 +

Kd

Kd

 

 

Kd

 

 

 

 

 

 

 

 

-----

-----

 

 

-----

 

 

 

 

 

 

 

 

T en – 2

T en – 1 + T en – 2

 

 

 

 

 

 

 

 

page 54

This larger the value of K the faster this controller will compensate for a change in the system.

Try controlling the water tank level with the D controller,

 

 

 

 

 

T

Ko

 

 

 

 

K

 

 

Ko

K

 

 

 

 

A

 

 

 

 

A

 

 

 

 

e

-----

+ θ

 

 

 

 

i

 

T -----

i

h

 

= h

 

 

 

 

 

e

+

 

 

 

 

 

-----

-----

 

n

 

n – 1

 

 

 

 

n – 1

 

 

Ko

 

 

Ko

5.2.4 Proportional, Integral, Derivative (PID) Control

The functions of the individual proportional, integral and derivative controllers are complementary. When combined we get a system that responds quickly to change (derivative), generally track required positions (proportional), and will eventually reduce errors (integral).

To get this we combine the expressions from the three individual controllers. Subscripts will be added to distinguish the ‘K’ gain values for each controller.

page 55

Recall the equations for the three controllers

 

 

 

 

 

 

 

 

 

 

 

mn

=

mn – 1 + Kpen Kpen – 1

 

 

 

 

proportional

 

 

 

 

mn

=

mn – 1 + KiTen

 

 

 

 

 

 

 

integral

 

 

 

 

 

 

 

 

 

Kd

 

 

 

Kd

 

Kd

 

 

derivative

 

 

 

 

mn = mn – 1 +

-----

 

– 2

-----

 

-----

 

 

 

 

 

 

T en

T en – 1

+ T en – 2

 

 

 

 

 

 

 

 

 

 

The three differences are added for a new difference equation,

 

 

 

 

 

mn mn – 1 = ( Kpen Kpen – 1)

+ (

 

 

 

Kd

 

Kd

 

 

Kd

 

 

 

-----

 

-----

 

+

-----

KiTen) +

T en

– 2 T en – 1

T en – 2

Rearranging results in,

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

m

 

= m

 

+ e

 

K

 

+ K

T +

Kd

+ e

 

K

 

Kd

+ e

 

 

Kd

 

 

n – 1

 

-----

n – 1

 

2-----

 

-----

 

 

n

 

 

n

 

p

i

 

T

 

 

 

p

 

T

 

n – 2

T

 

• Quite often the three constants are made the same, giving us the simpler equation below.

m

 

= m

 

+ e

 

 

 

K

+ e

 

 

K – 2

K

+ e

 

 

K

n

n – 1

n

K + KT + ---

n – 1

 

---

n – 2

 

---

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

T

 

 

 

 

 

 

T

 

 

 

T

 

 

 

 

 

 

 

 

1 + T +

1

 

 

 

 

– 1 –

2

 

 

1

mn = mn – 1 + K

en

--

+ en – 1

--

+ en – 2

--

 

 

 

 

 

 

 

 

 

T

 

 

 

 

 

T

 

 

 

T

This controller now allows us to vary the three different gains, and as a result we will change the performance of the system.

Consider the examples below,

Соседние файлы в предмете Электротехника