PI controller example - Universitas...

Post on 17-Apr-2020

1 views 0 download

Transcript of PI controller example - Universitas...

1

Modeling circuits

• Review – Kirchhoff's voltage and current laws– Concept of impedance– Use of Laplace transforms in circuit analysis

• Develop– State-variable analysis for circuits

2

PI controller example

RiRf Cf

ViVo 0

sC1R

VRV

ff

o

i

i =+

+

Node equations:

3

PI controller example

RiRf Cf

ViVo

⎟⎠⎞

⎜⎝⎛ +−=

sK

KVV i

pi

o

fii

i

fp CR

1K

RR

K ==

0

sC1R

VRV

ff

o

i

i =+

+

4

Example problemR C

v i

L

vc

dtdv

C)t(i

)t(vdtdi

L)t(iR)t(v

c

c

=

++=

5

)t(iC1

dtdv

)t(vL1

)t(vL1

)t(iLR

dtdi

c

c

=

+−−=

)t(v0L

1

)t(v)t(i

0C1

L1

LR

)t(v)t(i

dtd

cc ⎥⎥⎦

⎢⎢⎣

⎡+⎥

⎤⎢⎣

⎡⎥⎥

⎢⎢

⎡ −−=⎥

⎤⎢⎣

State variables

6

Laplace transforms

)0(Cv)s(sCV)s(I

)s(V)0(Li)s(IsL)s(IR)s(V

cc

c

−=

+−+=

If the initial conditions are zero:

)s(IsC1

sLR)s(V

)s(sCV)s(I

)s(V)s(IsL)s(IR)s(V

c

c

⎥⎦⎤

⎢⎣⎡ ++=

=

++=

or

7

Transfer functionIf the initial conditions are zero, find the ratio of the output I over the input V:

sC1sLR

1)s(V)s(I

)s(H

)s(IsC1

sLR)s(V

++==

⎥⎦⎤

⎢⎣⎡ ++=

8

LC1s

LRs

sL1

1sRC2sLC

sC

sC1sLR

1)s(V)s(I

)s(H

2 ++=

++=

++==

Express transfer functions as the ratio of two polynomials in s

9

Modeling mechanical systems• Review

– Newton's law for translational mechanical systemsdx/dt = v M dv/dt = Σ F

–Newton's law for rotational mechanical systemdθ/dt = ω J dω/dτ = Σ τ

10

Mechanical elements (linear)Mass: f = M a = M dv/dt = M dx2/dt2

Mx

f

fM a

Rigid

11

Mechanical elements (linear)Spring: f = K (x1 – x2)

K x1

ff

x2

x1

fK(x1-x2)

12

Mechanical elements (linear)Friction: f = B (v1 – v2)

B x1v1

ff

x2v2

v1

fB(v1-v2)

13

Example

f

B x

K M

)t(f)t(xKdt

)t(dxB

dt

)t(xdM

2

2=++

14

)t(fM

10

)t(v)t(x

MB

MK

10

)t(v)t(x

dtd

or

)t(vdt

)t(dx

)t(fM1

)t(vMB

)t(xMK

dt)t(dv

⎥⎥⎦

⎢⎢⎣

⎡+⎥

⎤⎢⎣

⎥⎥⎦

⎢⎢⎣

⎡−−

=⎥⎦

⎤⎢⎣

=

+−−=

15

MKsM

BsM

1

KsBsM

1)s(F)s(X

)s(F)s(X)KsBsM(

0) cond (initial functionTransfer

)t(f)t(xKdt

)t(dxB

dt

)t(xdM

22

2

2

2

++=

++=

=++

=

=++

16

Analogous rotating elements

torque τ [N m] force f [N]

angle θ [rad] position x [m]

angular speed ω[rad/s] speed v [m/s]

17

Analogous rotating elements

moment of inertia J [kg m2]

mass M [kg]

damping coeff. B [N m s/rad]

damping coeff. B [N s/m]

spring const. K [N m/rad]

spring const. K [N/m]

18

Example

B

KJ

)t()t(Kdt

)t(dB

dt

)t(dJ

2

2τ=θ+

θ+

θ

τ,θ

19

Modeling electromechanical systems

• Models for – DC Generator–DC Motor–Sensors

20

DC Generator• Drive shaft mechanically• Excite the field (sets up air-gap flux)

– Stationary field winding, or– Permanent magnets

• Armature winding rotates though the flux

21

• Commutator works as a rectifier– converts induced ac voltage to dc at

armature terminals

egea

iaRaLa

Thevenin equivalent of armature for PM generator

RL

22

)t(iR)t(e

)t(K)t(e

)t(edt

)t(diL)t(iR)t(e

aLa

g

aa

aaag

=

ωΦ=

=−−

–Assume flux Φ is constant, load inductance is negligible, speed ω is the input:

23

sLRR

KR

)s()s(E

sLRRK

)s()s(I

)s(IsL)s(I)RR()s(K

aLa

La

aLa

a

aaaLa

++

Φ=

Ω

++Φ

++=ΩΦ

– Current Ia is one possible output, and voltage Ea is another:

24

– Compare results to that of text, where speed is constant and field voltage is the input

–The same physical system will have many different models each valid under some set of assumptions

25

DC Motor• Apply a dc source to the armature• Excite the field (sets up air-gap flux)

–Stationary field winding, or– Permanent magnets

26

• Commutator works as an inverter– converts dc terminal voltage to ac

voltage on rotating armature winding

emes

ia Ra

Thevenin equivalent of armature for PM motor

τ,θJ

B

ea

RsLa

27

)t(iK)t(

)t(dt

)t(dB

dt

)t(dJ

)t(edt

)t(diL)t(i)RR()t(e

dt)t(d

Kdt

)t(dK)t(e

am

2

2

ma

aaass

mm

τ=θ

+++=

θ=

θΦ=

28

)s(IK)s(sBsJ

)s()s(

sLRR)s(E)s(E

)s(I

)s(sK)s(E

am

2

aas

msa

mm

=τ+

Τ=Θ

++−

=

Θ=

29

Es

Em

G1(s)Ia Km

τG2(s)

Θ

Km s

sBsJ

1)s(G

RRLs1

)s(G

22

asa1

+=

++=

30

Es T(s)Θ

)s(G)s(GKs1

)s(G)s(GK)s(E)s(

)s(T21

2m

21m

s +=

Θ=

assa

2msasaa

2a

3m

RRR where

)KBR(s)JRBL(sJLs

K

+=

++++=

31

La is often a small value, then a simpler transfer function is found:

assa

2msasa

2m

RRR where

)KBR(sRJs

K)s(T

+=

++=

32

Sensors• Text describes several sensors:

– Position sensor is optical encoder or potentiometer

– Speed sensor is a tachometer: a dc generator or encoder (if the speed is non-zero)

– Accelerometers based on displacement of an inertia

33

Optical encoder

Reference window LED and light sensors

count angle increments

34

Speed measurement• Count encoder pulses per unit time or

measure time between pulses– Inaccurate at small speeds when very few

pulses occur• PM DC generator eg = K ω

35

Accelerometer• Ideally:

– Isolated mass (known value) with force measurement a = f/m

• Example in text:– Piezoelectric crystal e = Ka f = Ka M a or a = e/(Ka M)

36

Modeling some other systems

• Models for –Transformers–Gears

• Analogs

37

• Ideal transformer– Lossless two-winding device

e1 e2

1

2

2

1

2

1

2

1

NN

ii

NN

ee

==

38

• Ideal gear train– Lossless two shaft rotating device

τ1,θ1τ2,θ2

2

1

2

1

1

2

2

1

2

1

rr

rr

=ττ

=θθ

=ωω

r2

r1

39

One axis robot arm• Motor with gear train on output shaft

driving one-axis robot arm

MotorGearTrain Arm

θL

40

Ea

Em

Ia Kt

τ ωm

Km

Model of one axis robot arm

n

θm

θL

mm RsL1+ BsJ

1+

ωm

s1

θmModel of MotorGear

41

Analog systems• Systems with equations of the same

type are analogs of each other– Example: compare the differential

equations for a mass-spring-friction mechanical system to an RLC series circuit