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

page 42

noise, or changes in system loading, found in all systems.

Go back to the original differential equation, and add a disturbance term ‘d’ that appears for a single sample,

 

d

y( t) = Kx( t) + d( t)

 

 

 

 

 

----

 

 

 

 

dt

 

 

 

 

y( T) = T

Kx( t) dt + T

d( t) dt =

 

 

–∞

–∞

 

y( T) = y0 + K( x0) T + d0T

yn = yn – 1 + K( xn – 1) T + dn – 1T

yn yn – 1 = K( xn – 1) T + dn – 1T

0

Kx( t) dt + T Kx( t) dt + T d( t) dt

–∞

0

0

assume

0

–∞ d( t) dt = 0

5.1.2 First Order System Example

• The water tank below has a small outlet, and left alone the fluid level in the tank will drop until empty. There is a valve controlled flow of fluids into the tank to raise the height of the fluid.

 

θ

qi

 

water flow in

valve

 

 

h

 

water tank

A = Area of tank (i.e., fluid surface)

water flow out

qo

page 43

• As long as the fluid levels in the tank are normal, the inlet and outlet flow rates are independent, We can model them both with simple differential equations,

The water flow rate out of the tank is approximately a function of the hydrostatic pressure caused by the water level in the tank,

qo = Koh

The inlet valve can be (very roughly) approximated with a simple equation,

qi = Kiθ

We can now relate these components to find the fluid height in the tank,

 

d

θ – Koh

 

----

V = qi qo = Adth = Ki

 

d

θ – Koh

 

----

 

Adth = Ki

 

 

d

θ – Koh

 

----

 

Adth = Ki

 

The general form of solution for this differential equation for h is, (we will review later)

t

 

 

 

 

 

 

 

 

 

 

 

 

–-----------

 

 

 

 

 

 

 

 

 

 

 

A

 

 

 

 

 

tKo

 

 

 

 

 

-----

 

K

 

 

 

–-------

 

K

 

 

 

K

 

 

i

 

 

 

i

 

 

h = Ce

o

+

 

θ

= Ce

A

+

 

θ

 

 

-----

 

-----

0

 

 

 

K

 

 

 

 

 

K

 

 

 

 

 

o

 

 

 

 

o

 

 

We can find the value of coefficient C by setting time to zero,

h

 

= Ce

0

+

Ki

θ

 

C = h

 

Ki

θ

 

0

 

-----

0

0

-----

0

 

 

 

 

K

 

 

 

K

 

 

 

 

 

 

o

 

 

 

 

 

o

 

 

The final form of this equation can be constructed, by separating out height and valve angle,

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

Ko

 

 

 

 

 

 

 

 

 

t

Ko

 

 

 

 

 

 

t

Ko

 

 

 

 

 

 

 

 

 

 

 

 

 

K

 

 

t -----

 

K

 

 

 

 

 

 

 

-----

 

 

 

 

K

 

-----

K

 

 

 

 

 

 

 

 

 

 

 

 

i

θ

 

 

A

 

i

θ

 

 

 

 

 

A

+ θ

 

i

 

A

i

h =

h

 

 

 

e

 

 

+

 

 

=

h

e

 

 

 

 

 

 

 

e

+

 

 

 

-----

 

 

-----

 

 

 

 

 

– -----

-----

 

 

 

 

 

 

 

0

 

Ko

0

 

 

 

 

 

Ko

 

0

 

 

0

 

 

 

 

 

 

0

 

Ko

 

 

Ko

 

 

 

 

 

 

 

transient + steady state

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

Put in terms of a time step, to prepare to make discrete,

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

Ko

 

 

 

 

K

 

 

 

 

Ko

 

 

K

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

A

 

 

 

 

 

A

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

T

-----

+ θ

 

 

 

i

T

-----

 

 

 

i

 

 

 

 

 

 

 

 

 

 

 

 

 

 

h

 

=

 

h

 

e

 

 

 

 

 

e

 

 

 

+

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

– -----

 

 

 

-----

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

T

 

 

 

 

0

 

 

 

 

 

 

0

 

Ko

 

 

 

 

 

 

Ko

 

 

 

 

 

 

 

 

 

 

 

 

 

 

Then to a discrete form, as a difference equation,

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

Ko

 

 

 

 

 

K

 

 

 

Ko

 

 

K

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

A

 

 

 

 

 

 

A

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

T -----

+ θ

 

 

 

 

i

T

-----

 

 

 

i

 

 

 

 

 

 

 

 

 

 

 

h

 

 

=

h

 

 

 

e

 

 

 

 

 

 

e

 

 

+

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

– -----

 

 

-----

 

 

 

 

 

 

 

 

 

 

 

n

 

 

 

n – 1

 

 

 

 

 

 

 

n – 1

 

Ko

 

 

 

 

 

Ko

 

 

 

 

 

 

 

 

 

 

 

page 44

• This difference equation can then be used to predict fluid height. If we change the valve position, this will also be reflected in the calculated values.

Use the parameters given to calculate the height of the water in the tank over time.

initial height =1 m

surface area = 2 m2

Ki = 1 liter/min/degree Ko = 2 liter/min/m valve angle = 20 degrees T = 30 sec.

egr450.0.mcd

• Now try varying the input valve angle,

page 45

Using all of the conditions outlined before, find out what happens when the valve angle is changed to 10 degrees after 10 seconds.

5.1.3 Second Order System Example

• Consider the second order example below,

page 46

First, the basic equation,

d 2

---- y = Ax dt

Second we begin to integrate, starting at time zero, to time T to get difference equations

 

d

2

 

 

 

 

 

 

 

 

 

 

 

 

 

 

----

yT = Ax0

 

 

 

 

 

 

 

dt

 

 

 

 

 

 

 

 

d

y

 

=

Ax

 

T +

d

y

 

 

 

----

T

0

 

----

 

0

 

dt

 

 

 

 

 

dt

 

 

y

 

=

Ax

 

T2

 

d

y

 

T + y

 

T

0

----- +

----

 

0

0

 

 

 

 

2

 

dt

 

 

 

 

 

 

d

y

 

d

y

 

 

=

Ax

 

T

 

 

 

----

n

 

----

n – 1

n – 1

 

 

 

dt

 

 

dt

 

 

 

 

 

 

 

 

y

 

y

 

 

 

=

Ax

 

 

T2

+

d

y

 

T

n

n – 1

n – 1

-----

 

----

n – 1

 

 

 

 

 

 

 

2

 

dt

 

 

(1)

(2)

These equations can be solved in two steps, or we can recombine them to get a single differential equation. We do this by rearranging the last difference equation, and

then we substitute this into the previous difference equation.

 

T

 

d

y

 

 

 

=

y

 

y

 

 

Ax

 

 

T2

 

 

 

 

 

 

 

 

 

(2)

 

----

n – 1

n

n – 1

 

 

-----

 

 

 

 

 

 

 

 

 

 

dt

 

 

 

 

 

 

 

 

 

 

n – 1 2

 

 

 

 

 

 

 

 

 

 

 

 

d

y

 

 

 

=

 

1

 

 

1

 

Ax

 

 

T

 

 

 

 

 

 

 

 

 

 

 

 

----

 

 

 

 

--y

 

 

--y

 

 

--

 

 

 

 

 

 

 

 

 

 

 

 

dt

 

n

 

 

T

n + 1

T

n

 

 

n 2

 

 

 

 

 

 

 

 

 

 

 

 

 

d

y

 

 

 

d

y

 

 

 

=

Ax

 

 

 

T =

1

 

1

 

 

T 1

 

1

 

(1)

 

----

 

 

 

----

 

 

 

 

 

 

--y

–--y Ax

-- – --y + --y

dt

 

 

n

 

dt

 

n – 1

 

 

 

 

n – 1

 

 

T

n + 1

T

 

n

n 2

T

n

T

n – 1

 

 

– 2yn + yn – 1 + yn + 1 = Axn

T2

 

 

 

2

 

 

T2

 

 

 

 

 

-----

Axn – 1T + Axn – 1

-----

 

 

 

 

 

2

2

 

 

 

This can then be shifted back in time one step to make it more useful.

 

– 2y

 

+ y

 

 

+ y

 

= Ax

 

 

T2

Ax

 

 

T2

n – 1

n – 2

n

n – 1

-----

n – 2

-----

 

 

 

 

 

 

 

 

 

2

 

 

2

 

y

 

= 2y

 

 

y

 

 

+ Ax

 

 

T2

Ax

 

 

T2

n

n – 1

n – 2

n – 1

-----

n – 2

-----

 

 

 

 

 

 

2

 

 

 

2

 

T

+ Axn – 1 --2

• try the following problem.

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