You are on page 1of 103

Mn hc

M HNH HA V NHN DNG H THNG


Ging vin: TS. Hunh Thi Hong
B mn iu Khin T ng,
ng Khoa in in T
i hc Bch Khoa TP.HCM
Email: hthoang@hcmut.edu.vn,
hthoang hcmut@yahoo com
hthoang.hcmut@yahoo.com
Homepage: http://www4.hcmut.edu.vn/~hthoang/

12 October 2010

H. T. Hong - HBK TPHCM

Chng 3

NHN DNG M HNH KHNG THAM S

12 October 2010

H. T. Hong - HBK TPHCM

Noi dung chng 3


Gii thiu
thi
Phn tch p ng qu
Phn tch tng quan
Phn tch p ng tn s
Phn tch Fourier
Phn tch ph

12 October 2010

H. T. Hong - HBK TPHCM

Noi dung chng 3


Tham kho:
Th
kh
[1] L. Ljung (1999), System Identification Theory for the user.
chng 2 v chng 66.
[2] R. Johansson (1994), System Modeling and Identification.
chngg 2 v chngg 4.
[3] N. D. Phc v P. X. Minh (2001), Nhn dng h thng iu
khin (chng 2)

12 October 2010

H. T. Hong - HBK TPHCM

Gii thiu

12 October 2010

H. T. Hong - HBK TPHCM

Bi ton nhn dng h thng


Nhn dng h thng l xy dng m hnh ton hc ca h thng da
trn d liu vo ra quan st c.

u(t)
()

He thong

y(t)
(t)
tn hiu ra

tn hiu vo

Ty theo phng php nhn dng m ta chn tn hiu vo thch hp.


Tn hiu xung dirac
Tn hiu hm nc
Tn hiu hnh sin
Tn hiu ngu nhin

12 October 2010

H. T. Hong - HBK TPHCM

Bi ton nhn dng h thng


v(t)
u(t)

y(t)

H thng
u(k)

y(k)

K hiu tp hp N mu d liu quan st c l:

Z N = {y (1), u (1), K , y ( N ), u ( N )}
V mt
ton
hc,
h nhn
h dng
d
h thng
h l tm
nh
h x:
TM : u ( k ) a y ( k )
khi bit tp d liu Z N
12 October 2010

H. T. Hong - HBK TPHCM

H thng tuyn tnh bt bin


Hm truyn:
H
t Hm
H ttruyn
ca
h ri
i rc l t s gia
i bin
bi i Z ca

tn hiu ra v bin i Z ca tn hiu vo khi iu kin u bng 0

Y ((zz )
G( z) =
U ( z)
Y ( z) =

y (k ) z

k =

U ( z) =

k
u
(
k
)
z

k =

12 October 2010

H. T. Hong - HBK TPHCM

H thng tuyn tnh bt bin


p ng

xung: p
ng
xung l p
ng
ca
h thng
th khi tn
t hiu
hi
vo l hm dirac.
U (z
( z) = 1

Y ( z) = G( z)

y (k ) = g (k ) = Z 1{G ( z )}
g(k) gi l p ng xung ca h thng

12 October 2010

H. T. Hong - HBK TPHCM

H thng tuyn tnh bt bin


T h p
Tnh
ng
ca
h thng
th dda vo

p
ng xung:

y (k ) = g (k ) u (k )
y (k ) =

g (l )u (k l )

l =

i vi h nhn qu: g(k) = 0, k < 0, ta c


+

y (k ) = g (l )u (k l )
l =0

12 October 2010

H. T. Hong - HBK TPHCM

10

H thng tuyn tnh bt bin


K hiu q l ton t lm sm 1 chu k ly mu:
q.u (k ) = u (k + 1)
v q1 l ton t lm tr 1 chu k ly mu:

q 1.u (k ) = u (k 1)
p ng ca h thng trong min thi gian c th vit li l:
+

y (k ) = g (l )q l u (k )
l =0

y (k ) = G (q)u (k )
+

G (q ) = g (k )q k = G ( z ) z =q
k =0

12 October 2010

H. T. Hong - HBK TPHCM

11

H thng tuyn tnh bt bin


c tnh

t h tn
t s:
c
tnh
t h tn
t s l i
i lng
l
cho
h bit t l v bin
bi
v lch pha gia tn hiu ra trng thi xc lp v tn hiu vo
hnh sin.

G ( e j ) = G ( z ) z = e j

Nu
tn hiu vo l:

u (k ) = U m sin kT

v tn hiu ra xc lpp l:

y (k ) = Ym sin((kT + )

Th:

Ym
= G ( e j )
Um

= G (e j )
12 October 2010

H. T. Hong - HBK TPHCM

12

H thng tuyn tnh bt bin


v(t)
()
u(t)

y(t)

H thng

y(k)

u(k)

H thngg c nhiu: Mi
h thngg thc
u b nh hngg bi nhiu
(nhiu o lng, nhiu do cc tn hiu vo khng kim sot
c,). Gi thit nhiu tc ng vo h thng l nhiu cng. Tn
hiu ra ca h thng c nhiu l:
+

y (k ) = g (l )u (k l ) + v(k )
l =0
l=

n gin, gi s nhiu c th m t bi:

v(k ) = h(l )e(k l )


l =0

trong {e(k)} l nhiu trng (nhiu trng l chui bin ngu nhin
c lp xc nh bi mt hm mt xc sut no ).
12 October 2010

H. T. Hong - HBK TPHCM

13

Nhn dng m hnh khng tham s


Phng php nhn dng m hnh khng tham s l phng php
xc nh trc tip p ng xung g(k) hoc c tnh tn s G(ej) ca
h thng (m khng cn s dng gi thit v cu trc m hnh ca h
thng).
h )
Cc PP nhn dng m hnh khng tham s c th chia lm 2 nhm:
(k ) )
Phng php trong min thi gian (c lng g (k
Phng php phn tch qu (phn tch p ng xung, phn
tch p ng nc)
Phng php phn tch tng quan
Phng php trong min tn s (c lng G (e j ) )
Phng php phn tch p ng tn
s
Phng php phn tch Fourier
Ph php
Phng
h phn
h tch
t h ph
h
12 October 2010

H. T. Hong - HBK TPHCM

14

Qu trnh ngu
nhin

12 October 2010

H. T. Hong - HBK TPHCM

15

nh ngha bin ngu nhin


Bin ngu nhin l bin m gi tr ca n l ngu nhin,
nhin khng d
on trc c.
Bin ngu nhin X c gi l bin ngu nhin lin tc nu:
Tp hp cc gi tr ca X c th lp y mt hay mt s khong
ca trc s, thm ch lp y trc s.
X sut
Xc
t X nhn
h mt
t gi
i tr
t c th no
lun
l lun
l bng
b 0,
0
ngha l vi mi s a ta c P{X = a} = 0 .
Hm mt
xc sut: Hm s f X ((x) xc nh
trn ton b trc
s
c gi l hm mt xc sut ca bin ngu nhin lin tc X nu:
f X ( x) 0, x
+

f X ( x)dx = 1

P{a < X < b} = f X ( x)dx, a < b


a

12 October 2010

H. T. Hong - HBK TPHCM

16

K vng (Expectation
xpectation))
nh ngha k vng: Gi tr trung bnh,
bnh hay k vng ca X,
X k hiu
l E(X) c nh ngha nh sau:
E( X ) = =

xf X ( x)dx

Tnh cht k vng:


Cho X v Y l hai bin ngu nhin v hai s bt k a v b, gi s
E(X) v E(Y) tn ti, th th:
E (aX
X + bY ) = aE
E ( X ) + bE (Y )

Nu X l bin ngu nhin lin tc c hm mt phn b xc


+
sut fX(x) th:
E[ g ( X )] =

g ( x). f X ( x)dx

Nu X v Y l hai bin ngu nhin c lp th:


E ( XY ) = E ( X ).E (Y )
12 October 2010

H. T. Hong - HBK TPHCM

17

Phng sai (Variance)


Variance)
nh ngha phng sai: Phng sai ca bin ngu nhin X,
X k hiu
Var(X) l:
Var( X ) = E[( X ) 2 ]
trong : = E ( X )
Tnh cht phng sai:
Nu X l bin ngu nhin c =E(X) v E(X2)< th:
Var( X ) = E ( X 2 ) 2

Nu X l bin ngu nhin, a v b l cc hng s th:


Var(aX + b) = a 2 Var( X )

Nu X v Y l hai bin ngu nhin c lp th:


Var ( X + Y ) = Var ( X ) + Var (Y )
12 October 2010

H. T. Hong - HBK TPHCM

18

Hip phng sai v h s tng quan


Hip phng sai (Covariance): Cho X v Y l hai bin ngu nhin,
nhin
hip phng sai ca X v Y l:
Cov ( X , Y ) = E[( X X )(Y Y )] = E ( XY ) X Y

trong : X = E ( X ), Y = E (Y )
H s tng quan (Correlation coefficient): H s tng quan ca
hai bin ngu nhin X v Y l:
=

Cov( X , Y )

XY

trong : X = Var ( X ) , Y = Var (Y )


Hai bin ngu nhin X v Y khng tng quan nu Cov( X , Y ) = 0
12 October 2010

H. T. Hong - HBK TPHCM

19

Qu trnh ngu nhin


Qu trnh ngu nhin:
Mt hm x(t)=X(t,) ph thuc vo bin ngu nhin gi l qu
trnh ngu nhin. Vi gi tr t xc nh gi tr hm ch ph thuc
vo , do n l bin
ngu
nhin. Vi gi tr xc nh ca ,
ch ph thuc vo t, do n l hm bin thc thng thng.
i vi h ri rc,
rc qu trnh ngu nhin l chui {x(k)}
Nhiu trng:
Nhiu trng l chui bin ngu nhin c lp {e(k)} c E[e(k)]=0
v Var[e(k)]= .

12 October 2010

H. T. Hong - HBK TPHCM

20

Hm hip phng sai


Hm t hip phng sai (Auto Covariance Function)
Cho {x(k)} l qu trnh ngu nhin, hm t hip phng sai (Auto
Covariance Function) ca {x(k)} l:
Rx (k1 , k2 ) = Cov xx (k1 , k2 ) = Cov[ x(k1 ), x(k2 )]

Nu E[x(k1)]. E[x(k2)]=0 th:

Rx (k1 , k2 ) = E[ x(k1 ) x(k2 )]

Hm hip phng sai cho (Cross Covariance Function)


Cho {x(k)} v {y(k)} l hai qu trnh ngu nhin, hm hip phng
sai cho gia {x(k)} v {y(k)} l:
Rxy (k1 , k 2 ) = Cov xy (k1 , k2 ) = Cov[ x(k1 ), y (k 2 )]

Nu E[x(k1)]. E[y(k2)]=0 th:


Rxy (k1 , k2 ) = E[ x(k1 ) y (k 2 )]
12 October 2010

H. T. Hong - HBK TPHCM

21

Qu trnh ngu nhin dng


{x(k)} c gi l qu trnh ngu nhin dng (stationary) nu:
E[x(k)] khng ph thuc vo k v
Rx((k1,,k2) ch pph
thuc
vo =k1k2
Khi hm t hip phng sai c k hiu l:
Rx ( ) = Cov[ x(k ), x(k )]

{x(k)} v {y(k)} c gi l hai qu trnh ngu nhin tng quan


dng (stationary corelation) nu:
E[x(k)], E[y(k)] khng ph thuc vo k v
Rxy(k1,k2) ch ph thuc vo =k1k2
Khi
hi
hm
h t hip
hi phng
h
saii c k
k hiu
hi l:
l
Rxy ( ) = Cov[ x(k ), y (k )]

Ch :
12 October 2010

Rx ( ) = Rx ( )

Rxy ( ) = Rxy ( )

H. T. Hong - HBK TPHCM

22

Qu trnh ngu nhin gn dng (quasi(quasi-stationary)


{{x(k)}
(k)} c

gii l qu trnh
h ngu
nhin
hi gn
dng
d nu:

E[x(k)] = mx(k), |mx(k)| C, k


E[x(k1),
) x(k2)] = Rx(k1,kk2),
) |Rx(k1,kk2)| C v
1 N
lim E[ x(k ) x(k )] = Rx ( )
N N k =1
1 N
K hiu: E[ x(k ) x(k )] = lim E[ x(k ) x(k )]
N N
k =1
{x(k)} v {y(k)} c gi l hai qu trnh ngu nhin tng quan gn
dng (stationary corelation) nu {x(k)} v {y(k)} l hai qu trnh
ngu nhin gn dng, ng thi:
E[ x(k ) y (k )] = Rxy ( ),
)
12 October 2010

H. T. Hong - HBK TPHCM

23

Ph cng sut
{{x(k)}
(k)} l tn
hiu
hi ngu
nhin
hi gn
dng,
d ph
h cng
sut
ca
{x(k)}
{ (k)} l
bin i Fourier ca hm t hip phng sai:
x ( ) = F {Rx ( )} =

j
R
(

)
e
x

{x(k)} v {y(k)} hai tn hiu ngu nhin lin kt gn dng, ph cng


sut cho ca {x(k)} v {y(k)} l bin i Fourier ca hm hip
phng sai cho:
xy ( ) = F {Rxy ( )} =

12 October 2010

j
R
(

)
e
xy

H. T. Hong - HBK TPHCM

24

Phn tch p ng qu

12 October 2010

H. T. Hong - HBK TPHCM

25

Phn tch p ng xung


v(t)
H thng
g

u(t)

y(t)
y(k)

u(k)
+

Gi s HT m t bi: y (k ) = G0 (q )u (k ) + v(k ) = g 0 (l )u (k l ) + v(k )


l =0

Tn hiu vo l hm dirac: u (k ) = (k )
+

Tn hiu ra: y (k ) = g 0 (l ) (k l ) + v(k ) = g 0 (k ) + v(k )


l =0
l=

p ng xung ng:

g 0 (k ) =

p ng xung c lng:

g (k ) =

12 October 2010

y (k )

y ((kk )

v(k )

H. T. Hong - HBK TPHCM

26

Phn tch p ng xung


Kt
lun:
p ng xung ng:

g 0 (k ) =

p ng xung c lng:

g (k ) =

y (k )

v(k )

y (k )

Nhn xt:
Phng
Ph
php
h n
gin.
i
Sai s nhn dng l v(k)/.
Nhiu h thng vt l khng cho php xung tn hiu vo c bin
ln v(k)/ nh.
Ngoi ra tn hiu vo c bin ln c th lm gy ra cc nh
hng phi tuyn lm mo dng m hnh tuyn tnh ca h thng.
12 October 2010

H. T. Hong - HBK TPHCM

27

Th d nhn dng p ng xung ca ng c DC


Gi s
ng
c m t bi m hnh
h h ton
(s
( dng
d
m phng):
h )
di (t )
R
K
1
= i (t ) b y (t ) + u (t )
dt
L
L
L
dy (t ) K m
B
=
i (t ) y (t )
J
dt
J

R = 1 ( )
K e = 0.02

L = 0.03 (H)
K m = 0.02

J = 0.02 (kg.m 2 )
B = 0.05 (Nms)

Trong : u(t): in p phn ng (tn hiu vo);


y(t):
y(
) tc qquayy ca ng
g c ((tn hiu
ra);
);
i(t): dng in phn ng
Dng pp phn tch p ng xung, nhn dng p ng xung ca ng
c. Gi s chu k ly
mu l T=0.01s, tn hiu o tc
b nh
hng bi nhiu cng c gi tr trung bnh l v phng sai l .
So snh p ng xung nhn dng c vi p ng xung chnh xc
tnh da vo m hnh ton hc.
12 October 2010

H. T. Hong - HBK TPHCM

28

M phng th nghim thu thp d liu

M pphngg th nghim
g
thu thpp d liu ca
ng c DC vi tn hiu vo l hm dirac
12 October 2010

H. T. Hong - HBK TPHCM

29

Kt qu c lng p ng xung ng c DC
0.08

0.1

ghat
g0

0.07

ghat
h t
g0
0.08

0.06
0.06
0 05
0.05
0.04
0.04
0.02
0.03
0

0.02

-0.02

0.01
0

20

40

60

80

100

120

140

160

180

200

(a) Khng nhiu ( = 0; =0)


= 10

-0.04

20

40

60

80

100

120

140

160

180

200

(b) C nhiu ( = 0; =102)


= 10

Nu khng c nhiu nhn dng chnh xc p ng xung


C nhiu p ng xung nhn dng khng chnh xc nu tn hiu
vo c bin b
12 October 2010

H. T. Hong - HBK TPHCM

30

Kt qu c lng p ng xung ng c DC
0.08

0.09
ghat
g0

0.07

0.08

0.06

0.07

0.05

0.06

0.04

0.05

0.03

0.04

0.02

0.03

0.01

0.02

0.01

-0.01

20

40

60

80

100

120

140

160

180

(c) C nhiu ( = 0; =102)


= 100

ghat
h t
g0

200

20

40

60

80

100

120

140

160

180

200

(d) C nhiu ( = 0.5; =102)


= 100

Bin tn hiu vo cng ln nhiu cng t nh hng n p ng


g c

xungg c lng
Nhiu c mc DC p ng xung nhn dng b sai lch
12 October 2010

H. T. Hong - HBK TPHCM

31

Th d nhn dng p ng xung ca tay my


K hiu

n v

Gi tr

M
m
l
lC
B
g

kg
kg
m
m
N.m.s/rad
m/s
/2

3.5
0.6
14
1.4
0.5
0.01
9 81
9.81

M hnh ton hc m t tay my (s dng m phng):


( MlC2 + ml 2 )&&(t ) + B&(t ) + (ml + MlC ) g sin (t ) = u (t )

Dng pp phn tch p ng xung, nhn dng p ng xung ca h


q
im lm vic = / 4 . Gi s chu k lyy mu l
thngg quanh
T=0.1s, tn hiu o tc b nh hng bi nhiu cng c gi tr trung
bnh l v phng sai l .
So snh p ng xung nhn dng c vi p ng xung chnh xc
tnh da vo m hnh ton hc.
12 October 2010

H. T. Hong - HBK TPHCM

32

M phng th nghim thu thp d liu

S m
S
phng
h th
h nghim
hi thu
h thp
h d liu
li vo
ra quanhh
im vic tnh ca h tay my vi tn hiu vo l hm dirac
u~ = u u
D liu dng nhn dng m hnh tuyn tnh: ~y = y y
12 October 2010

H. T. Hong - HBK TPHCM

33

Kt qu c lng p ng xung h tay my quanh im tnh


0.02

0.015

ghat
g0

ghat
g0
0.015

0.01

0.01
0.005
0.005
0
0
-0.005
-0.005
0 005
-0.01

-0.015

-0.01

20

40

60

80

100

120

140

160

180

(a) Khng nhiu ( = 0; =0)


=1

200

-0.015

20

40

60

80

100

120

140

160

180

200

(b) C nhiu ( = 0; =105)


=1

Nu khng c nhiu nhn dng chnh xc p ng xung


C nhiu p ng xung nhn dng khng chnh xc nu tn hiu
vo c bin b
12 October 2010

H. T. Hong - HBK TPHCM

34

Kt qu c lng p ng xung h tay my quanh im tnh


0.02

0.02

ghat
g0

ghat
g0

0.015

0.015

0.01

0.01

0.005

0.005

-0.005

-0.005

-0.01

-0.01

-0.015

20

40

60

80

100

120

140

160

180

200

-0.015

20

40

60

80

100

120

140

160

180

200

(c) C nhiu ( = 0; =105)


(d) C nhiu ( = 0; =105)
=5
= 25
Tng bin tn hiu vo gim nh hng ca nhiu n p ng
xung c lng c
Bin tn hiu vo ln qu p ng xung nhn dng b sai lch do
tnh phi tuyn ca i tng
12 October 2010

H. T. Hong - HBK TPHCM

35

Phn tch p ng nc
v(t)
H thng
g

u(t)

y(t)
y(k)

u(k)
+

Gi s HT m t bi: y (k ) = G0 (q )u (k ) + v(k ) = g 0 (l )u (k l ) + v(k )


l =0

Tn hiu vo l hm nc:

u (k ) = .1(k )

l =0

l =1

Tn hiu
hi ra: y (k ) = g 0 (l ) .1(k l ) + v(k ) = g 0 (l ) + v(k )

12 October 2010

y (k ) y (k 1) = g 0 (k ) + v(k ) v(k 1)

H. T. Hong - HBK TPHCM

36

Phn tch p ng nc
Kt
lun:
p ng xung ng:
p ng xung c lng:

g 0 (k ) =

g (k ) =

y (k ) y (k 1)

v(k ) v(k 1)

y (k ) y (k 1)

Nhn xt:
Phng
Ph
php
h n
gin.
i
Sai s nhn dng l [v(k) v(k 1)] /, loi mc DC ca nhiu
Nhiu h thng vt l khng cho php tn hiu vo c bin
ln [v(k) v(k 1)] /, nh.
Ngoi ra tn hiu vo c bin ln c th lm gy ra cc nh
hng phi tuyn lm mo dng m hnh tuyn tnh ca h thng.
12 October 2010

H. T. Hong - HBK TPHCM

37

Th d nhn dng p ng xung ca ng c DC


Gi s
ng
c m t bi m hnh
h h ton
(s
( dng
d
m phng):
h )
di (t )
R
K
1
= i (t ) b y (t ) + u (t )
dt
L
L
L
dy (t ) K m
B
=
i (t ) y (t )
J
dt
J

R = 1 ( )
K e = 0.02

L = 0.03 (H)
K m = 0.02

J = 0.02 (kg.m 2 )
B = 0.05 (Nms)

Trong : u(t): in p phn ng (tn hiu vo);


y(t):
y(
) tc qquayy ca ng
g c ((tn hiu
ra);
);
i(t): dng in phn ng
Dng pp phn tch p ng nc, nhn dng p ng xung ca ng
c. Gi s chu k ly
mu l T=0.01s, tn hiu o tc
b nh
hng bi nhiu cng c gi tr trung bnh l v phng sai l .
So snh p ng xung nhn dng c vi p ng xung chnh xc
tnh da vo m hnh ton hc.
12 October 2010

H. T. Hong - HBK TPHCM

38

M phng th nghim thu thp d liu

M pphngg th nghim
g
thu thpp d liu ca
ng c DC vi tn hiu vo l hm nc
12 October 2010

H. T. Hong - HBK TPHCM

39

Kt qu c lng p ng xung ng c DC
0 08
0.08

01
0.1
ghat
g0

0.07

ghat
g0
0.08

0.06
0.06
0.05
0.04
0.04
0.02
0.03
0

0.02

-0.02

0.01
0

20

40

60

80

100

120

140

160

180

200

(a) Khng nhiu ( = 0; =0)


= 10

-0 04
-0.04

20

40

60

80

100

120

140

160

180

200

(b) C nhiu ( = 0; =102)


= 10

Nu khng c nhiu nhn dng chnh xc p ng xung


C nhiu p ng xung nhn dng khng chnh xc nu tn hiu
vo c bin b
12 October 2010

H. T. Hong - HBK TPHCM

40

Kt qu c lng p ng xung ng c DC
0.08

0.08
g
ghat
g0

0.07

0.07

0.06

0.06

0.05

0.05

0.04

0.04

0.03

0.03

0.02

0.02

0.01

0.01

-0.01

20

40

60

80

100

120

140

160

180

ghat
g0

200

-0.01

20

40

60

80

100

120

140

160

180

200

(c) C nhiu ( = 0; =102)


(d) C nhiu ( = 0.5; =102)
= 100
= 100
Bin tn hiu vo cng ln nhiu cng t nh hng n p ng
xung c lng c
Nhi c mc
Nhiu
DC mc
DC kh
khng nh
h hng
h n
p
ng
xung
nhn dng c.
12 October 2010

H. T. Hong - HBK TPHCM

41

Th d nhn dng p ng xung ca tay my


K hiu

n v

Gi tr

M
m
l
lC
B
g

kg
kg
m
m
N.m.s/rad
m/s
/2

3.5
0.6
14
1.4
0.5
0.01
9 81
9.81

M hnh ton hc m t tay my (s dng m phng):


( MlC2 + ml 2 )&&(t ) + B&(t ) + (ml + MlC ) g sin (t ) = u (t )

Dng pp phn tch p ng nc, nhn dng p ng xung ca h thng


qquanh im lm vic = / 4 . Gi s chu k lyy mu l T=0.1s, tn
hiu o tc b nh hng bi nhiu cng c gi tr trung bnh l
v phng sai l .
So snh p ng xung nhn dng c vi p ng xung chnh xc
tnh da vo m hnh ton hc.
12 October 2010

H. T. Hong - HBK TPHCM

42

M phng th nghim thu thp d liu

S m
S
phng
h th
h nghim
hi thu
h thp
h d liu
li vo
ra quanhh
im vic tnh ca h tay my vi tn hiu vo l hm nc
u~ = u u
D liu dng nhn dng m hnh tuyn tnh: ~y = y y
12 October 2010

H. T. Hong - HBK TPHCM

43

Kt qu c lng p ng xung h tay my quanh im tnh


0.015

0.015

ghat
g0

ghat
g0
0.01

0.01

0.005

0.005

-0.005

-0.005

-0.01

-0.01

-0.015

-0.015
0

20

40

60

80

100

120

140

160

180

(a) Khng nhiu ( = 0; =0)


= 0.2

200

20

40

60

80

100

120

140

160

180

200

(b) Khng nhiu ( = 0; =0)


=1

Nu khng c nhiu:
nhn
dng
g chnh xc p
p ng
g xung
g nu bin
tn hiu
vo b
kt qu nhn dng p ng xung b sai lch nu bin tn hiu vo ln
12 October 2010

H. T. Hong - HBK TPHCM

44

Kt qu c lng p ng xung h tay my quanh im tnh


0.02

0.02
ghat
h t
g0

0.015

ghat
g0
0.015

0.01
0.01
0 005
0.005
0.005
0
0
-0.005
-0.005

-0.01

-0.01

-0.015
-0.02

20

40

60

80

100

120

140

160

180

200

-0.015

20

40

60

80

100

120

140

160

180

200

(c) C nhiu ( = 0; =105)


(d) C nhiu ( = 0; =105)
=1
=5
C nhiu p ng xung nhn dng khng chnh xc do nh hng
ca nhiu
Bin tn hiu vo ln qu p ng xung nhn dng b sai lch do
tnh phi tuyn ca i tng
12 October 2010

H. T. Hong - HBK TPHCM

45

Phn tch tng quan


v(t)
H thng

u(t)

y(t)
y(k)

u(k)
+

Gi s HT m t bi: y (k ) = G0 (q )u (k ) + v(k ) = g 0 (l )u (k l ) + v(k )


l =0

Tn hiu vo u(k) l chui ngu nhin gn dng:


E[u (k )] = mu (k ), mu (k ) C , k

E[u (k1 )u (k2 )] = Ru (k1 , k2 ),


) Ru (k1 , k2 ) C
1 N
E[u (k )u (k )] = Ru ( ) lim Ru (k , k ) = Ru ( )
N N k =1

v khng tng quan vi nhiu: E[u (k )v(k )] = 0


12 October 2010

H. T. Hong - HBK TPHCM

46

Phn tch tng quan (tt)


Th nh
Theo
h l 2.2
2 2 (Ljung,
(Lj
1999 trang 40):
40)
+

E[ y (k )u (k )] = R yu ( ) = g 0 (l ) Ru (l )
l =0
0

Nu tn hiu vo c chn l nhiu trng sao cho Ru ( ) = 0


p ng xung chnh xc:

g 0 ( ) =

c lng p ng xung: g ( ) =
trong :

12 October 2010

R yu ( )

1
N
R yu
( ) =
N

N
R yu
( )

y(k )u (k )

k =

H. T. Hong - HBK TPHCM

47

Phn tch tng quan (tt)


Kt lun:
p ng xung c lng:

g ( ) =

N
R yu
( )

Nhn xt:
Phng php n gin.
N
Sai s nhn dng l chnh bng sai s c lng R yu
( ) , sai s ny
cng gim khi s mu d liu s dng nhn dng cng tng.
Bin tn hiu nh hng khng ng k n cht lng nhn
d
dng.
Phng php phn tch tng quan c bit thch hp nhn dng
p ng xung trong trng hp h thng c nhiu o lng ngu
nhin v bin tn hiu vo gii hn.
Nhn dng tt p ng xung ca h phi tuyn quanh im lm vic
tnh.
12 October 2010

H. T. Hong - HBK TPHCM

48

Th d nhn dng p ng xung ca ng c DC


Gi s
ng
c m t bi m hnh
h h ton
(s
( dng
d
m phng):
h )
1
di (t )
R
K
= i (t ) b y (t ) + u (t )
dt
L
L
L
dy (t ) K m
B
=
i (t ) y (t )
dt
J
J

R = 1 ( )
K e = 0.02

L = 0.03 (H)
K m = 0.02

J = 0.02 (kg.m 2 )
B = 0.05 (Nms)

Trong : u(t): in p phn ng (tn hiu vo);


y(t):
y(
) tc qquayy ca ng
g c ((tn hiu
ra);
);
i(t): dng in phn ng
Dng pp phn tch tng quan, nhn dng p ng xung ca ng
c. Gi s chu k ly
mu l T=0.01s, tn hiu o tc
b nh
hng bi nhiu cng c gi tr trung bnh l v phng sai l .
So snh p ng xung nhn dng c vi p ng xung chnh xc
tnh da vo m hnh ton hc.
12 October 2010

H. T. Hong - HBK TPHCM

49

M phng th nghim thu thp d liu

M pphngg th nghim
g
thu thpp d liu ca
ng c DC vi tn hiu vo ngu nhin
12 October 2010

H. T. Hong - HBK TPHCM

50

D liu nhn dng p ng xung dng pp tng quan


10

Volta
age

5
0
-5
-10

02
0.2

04
0.4

06
0.6

08
0.8

0.2

0.4

0.6

0.8

12
1.2

14
1.4

16
1.6

18
1.8

1
1.2
Time (sec)

1.4

1.6

1.8

3
2
Speed

1
0
-1
1
-2

p ng ca ng c DC vi tn hiu vo ngu nhin


12 October 2010

H. T. Hong - HBK TPHCM

51

Kt qu c lng p ng xung ng c DC
0 08
0.08

0 08
0.08
ghat
g0

0.07
0.06

0.06

0 05
0.05

0 05
0.05

0.04

0.04

0.03

0.03

0 02
0.02

0 02
0.02

0.01

0.01

-0.01
0 01

20

40

60

80

100

120

140

160

180

200

(a) C nhiu ( = 0; = =102)


= 1,
1 N=1000
N 1000

12 October 2010

ghat
g0

0.07

-0.01
0 01

20

40

60

80

100

120

140

160

180

200

(b) C nhiu ( = 0; =102)


= 1,
1 N=10000
N 10000

H. T. Hong - HBK TPHCM

52

Kt qu c lng p ng xung ng c DC
0 08
0.08

0 08
0.08
ghat
g0

0.07

0.07

0.06

0.06

0 05
0.05

0 05
0.05

0.04

0.04

0.03

0.03

0 02
0.02

0 02
0.02

0.01

0.01

-0.01
0 01

20

40

60

80

100

120

140

160

180

200

(c) C nhiu ( = 0; = =102)


= 10,
10 N=1000
N 1000

12 October 2010

ghat
g0

-0.01
0 01

20

40

60

80

100

120

140

160

180

200

(d) C nhiu ( = 0; =102)


= 1,
1 N=100000
N 100000

H. T. Hong - HBK TPHCM

53

Th d nhn dng p ng xung ca tay my


K hiu

n v

Gi tr

M
m
l
lC
B
g

kg
kg
m
m
N.m.s/rad
m/s
/2

3.5
0.6
14
1.4
0.5
0.01
9 81
9.81

M hnh ton hc m t tay my (s dng m phng):


( MlC2 + ml 2 )&&(t ) + B&(t ) + (ml + MlC ) g sin (t ) = u (t )

Dng pp phn tch tng quan, nhn dng p ng xung ca h thng


qquanh im lm vic = / 4 . Gi s chu k lyy mu l T=0.1s, tn
hiu o tc b nh hng bi nhiu cng c gi tr trung bnh l
v phng sai l .
So snh p ng xung nhn dng c vi p ng xung chnh xc
tnh da vo m hnh ton hc.
12 October 2010

H. T. Hong - HBK TPHCM

54

M phng th nghim thu thp d liu

S m
S
phng
h th
h nghim
hi thu
h thp
h d liu
li vo
ra quanhh
im vic tnh ca h tay my vi tn hiu ngu nhin
u~ = u u
D liu dng nhn dng m hnh tuyn tnh: ~y = y y
12 October 2010

H. T. Hong - HBK TPHCM

55

D liu nhn dng p ng xung dng pp tng quan

Input to Line
earized Model

20
18
16
14

u
0

100

200

300

400

500

600

700

800

900

Robot Output
R

1
0.9
0.8

07
0.7
0.6

100

200

300

400

500
600
Sample

700

800

D liu o lng

900

4
2
0

1000

u~ = u u

-2
-4

1000

Output of Linearized Model

Robo
ot Input

22

100

200

300

400

500

600

700

800

900

1000

500
600
Sample

700

800

900

1000

02
0.2
0.1
0

~
y = yy

-0
0.1
1
-0.2

100

200

300

400

D liu vo/ra m hnh tuyn tnh

p ng ca tay my vi tn hiu vo ngu nhin


12 October 2010

H. T. Hong - HBK TPHCM

56

Kt qu c lng p ng xung h tay my quanh im tnh


0.02

0.015
ghat
g0

ghat
g0

0.015
0.01
0.01
0.005
0.005
0
0
-0.005
-0.005

-0.01

-0.01

-0.015

20

40

60

80

100

120

140

160

180

(a) C nhiu ( = 0; =105)


= 1,
1 N=1000

12 October 2010

200

-0.015

20

40

60

80

100

120

140

160

180

200

(b) C nhiu ( = 0; =105)


= 1,
1 N=10000

H. T. Hong - HBK TPHCM

57

Kt qu c lng p ng xung h tay my quanh im tnh


0 015
0.015
ghat
g0
0.01

0 005
0.005

-0.005
0 005

-0.01

-0.015
0 015

20

40

60

80

100

120

140

160

180

200

(c) C nhiu ( = 0; =105)


= 1,
1 N=100000
N 100000

12 October 2010

H. T. Hong - HBK TPHCM

58

Phn tch p ng tn
s

12 October 2010

H. T. Hong - HBK TPHCM

59

Kim tra sng sin


v(t)
u(t)=cos(t)

H thng

y(t)
y(k)

u(k)=.coskT
Tn hiu vo hnh sin: u (k ) = cos kT

Tn hiu vo ra:
y (k ) = Ym cos(kT + ) + v(k ) + yq (k )
trong thnh phn qu yq (k ) 0 khi k .
Nu b qua nhiu, tn hiu ra t.thi xc lp : y (k ) = Ym cos(kT + )

12 October 2010

G0 (e j ) =

Ym

G0 (e j ) =

H. T. Hong - HBK TPHCM

60

Kim tra sng sin (tt)


Kt lun:
l n:

Y
G (e j ) = m

G (e j ) =

Thc hin th nghim vi thay i trong min tn s quan tm, ta


s c lng c c tnh tn s G (e j ) trong min tn s ny.
Nhn xt:
Phng php n gin.
Phi thc hin nhiu th nghim mt nhiu thi gian.
Nhiu h thng vt l khng cho php tn hiu vo l tn hiu hnh
sin khng p dng c phng php phn tch p ng tn s
ny.
g c
G (e j ) trongg min tn s qquan tm.
Ch c lng
c tnh tn s c lng b nh hng bi nhiu.
12 October 2010

H. T. Hong - HBK TPHCM

61

Th d nhn dng c tnh tn s ng c DC


Gi s
ng
c m t bi m hnh
h h ton
(s
( dng
d
m phng):
h )
1
di (t )
R
K
= i (t ) b y (t ) + u (t )
dt
L
L
L
dy (t ) K m
B
=
i (t ) y (t )
dt
J
J

R = 1 ( )
K e = 0.02

L = 0.03 (H)
K m = 0.02

J = 0.02 (kg.m 2 )
B = 0.05 (Nms)

Trong : u(t): in p phn ng (tn hiu vo);


y(t):
y(
) tc qquayy ca ng
g c ((tn hiu
ra);
);
i(t): dng in phn ng
Dng pp kim tra sng sin, nhn dng c tnh tn s ca ng c.
Gi s chu k ly
mu l T=0.01s, tn hiu o tc
khng c
nhiu.
So snh c tnh tn s nhn dng c vi c tnh tn s chnh
xc ca h thng.
12 October 2010

H. T. Hong - HBK TPHCM

62

M phng th nghim thu thp d liu

M pphngg th nghim
g
thu thpp d liu ca ngg c DC vi
tn hiu vo hnh sin u (k ) = 10 sin kT
12 October 2010

H. T. Hong - HBK TPHCM

63

10

10

Voltage

Voltage

D liu nhn dng c tnh tn s dng pp kim tra sng sin

0
-5

-5

0.2

0.4

0.6

0.8

1.2

1.4

1.6

1.8

-10

15

10

Speed

Speed

-10

0
-5
-10

0.2

0.4

0.6

0.8

0.2

0.4

0.6

0.8

1.2

1.4

1.6

1.8

1
1.2
Time (sec)

1.4

1.6

1.8

0
-2

0.2

0.4

0.6

0.8

1
1.2
Time (sec)

1.4

1.6

(a) = 2
222 (rad/sec)

1.8

-4

(b) = 2
244 (rad/sec)

pp ngg ca ng
g c DC vi tn hiu
vo hnh sin
(trng hp khng c nhiu o lng)
12 October 2010

H. T. Hong - HBK TPHCM

64

10

10

Vo
oltage

Vo
oltage

D liu nhn dng c tnh tn s dng pp kim tra sng sin

0
-5
-10

0
-5

0.2

0.4

0.6

0.8

1.2

1.4

1.6

1.8

-10

0.2

0.4

0.6

0.8

0.2

0.4

0.6

0.8

1.2

1.4

1.6

1.8

1
1.2
Time (sec)

1.4

1.6

1.8

3
2

Speed

Speed

1
0
-1
1

-2

0.2

0.4

0.6

0.8

1
1.2
Time (sec)

1.4

1.6

(a) = 2
266 (rad/sec)

1.8

-2

(a) = 2
288 (rad/sec)

pp ngg ca ng
g c DC vi tn hiu
vo hnh sin
(trng hp khng c nhiu o lng)
12 October 2010

H. T. Hong - HBK TPHCM

65

c lng c tnh tn s

V th, ta c c tnh tn s gn ng
trong min tn s va kho st.

12 October 2010

H. T. Hong - HBK TPHCM

66

Phn tch p ng tn s bng phng php tng quan


v(t)
u(t)= cos(t)

H thng

y(t)
y(k)

u(k)=. coskT
Tn hiu vo hnh sin: u (k ) = cos kT

Tn hiu vo ra:
y (k ) = Ym cos(kT + ) + v(k ) + yq (k )
trong thnh phn qu yq (k ) 0 khi k .
Tn hiu ra t.thi
t thi xc lp : y (k ) = Ym cos(kT + ) + v(k )
Thnh lp hai i lng:
1 N
I C ( N ) = y (kk)) cos kT
k
N k =1
12 October 2010

1 N
I S ( N ) = y (k ) sin kT
N k =1

H. T. Hong - HBK TPHCM

67

Phn tch p ng tn s bng phng php tng quan


D dng chng minh c:
Y
I C ( N ) = m cos
2
Y
I S ( N ) = m sin
2

khi

khi

Do , c th tnh c chnh xc bin v lch pha ca tn


hiu ra, bt chp tn hiu o c nhiu:

Ym = 2 I C2 ( N ) + I S2 ( N )
1 I S ( N )

= tan

I
(
N
)
C

Sau suy ra c tnh tn s theo cch thc hin phng php


kim tra sng sin.
12 October 2010

H. T. Hong - HBK TPHCM

68

Th d nhn dng c tnh tn s ca tay my


K hiu

n v

Gi tr

M
m
l
lC
B
g

kg
kg
m
m
N.m.s/rad
m/s
/2

3.5
0.6
14
1.4
0.5
0.01
9 81
9.81

M hnh ton hc m t tay my (s dng m phng):


( MlC2 + ml 2 )&&(t ) + B&(t ) + (ml + MlC ) g sin (t ) = u (t )

Dng pp phn tch tng quan, nhn dng c tnh tn s ca h thng


qquanh im lm vic = / 4 . Gi s chu k lyy mu l T=0.1s, tn
hiu o tc b nh hng bi nhiu cng c gi tr trung bnh l
v phng sai l .
So snh c tnh tn s nhn dng c vi c tnh tn s chnh xc
tnh da vo m hnh ton hc.
12 October 2010

H. T. Hong - HBK TPHCM

69

M phng th nghim thu thp d liu

M pphngg th nghim
g
thu thpp d liu ca tayy myy vi
tn hiu vo hnh sin quanh im tnh u (k ) = 17.966 + 0.1sin kT
12 October 2010

H. T. Hong - HBK TPHCM

70

Nhn dng c tnh tn s tay my


p ng ca tay my tn hiu vo hnh sin quanh im tnh
Input to Line
earized Model

18.1

18
17.95
17.9
17.85

500

1000

1500

2000

2500

3000

0 84
0.84
Robot Output
R

0.82
0.8
0.78
0.76
0.74

500

1000

1500
Sample

2000

2500

(a) D liu vo ra h tay my

3000

Output o
of Linearized Model

Robo
ot Input

18.05

0.2
0.1
0
-0.1
-0.2

500

1000

1500

2000

2500

3000

500

1000

1500
Sample

2000

2500

3000

0.04
0.02
0
-0.02
0 02
-0.04

(b) D liu vo ra MH tuyn tnh

S dng d liu t mu 1501 tr i (h thng xc lp), tnh c


Ym = 0.0256
.
vv = 141.66
. 0
Lp li th nghim ti cc tn s khc G (e j )
12 October 2010

H. T. Hong - HBK TPHCM

71

Phn tch Fourier

12 October 2010

H. T. Hong - HBK TPHCM

72

Nhc li: Ly mu tn hiu


Ly mu tn hiu lin tc x(t) vi chu k ly
mu Ts (tn s ly mu l fs) ta c tn hiu
x(t)
ri rc x(k)=x(kTs).

Ts
x(k)

Xt x(t) l tn hiu hnh sin

x(t ) = X m sin(t ) = X m sin( 2ft )

Tn hiu ri rc sau khi ly


mu
l:
x(kTs ) = X m sin(kTs ) = X m sin( 2

f
f =
fs
= 2f

f
k)
fs

l tn s chun ha (normalized frequency)


l tn s ggc chun ha
x(k ) = X m sin( 2fk ) = X m sin( k )

Ch :

12 October 2010

1
1
< f <
2
2

< <
H. T. Hong - HBK TPHCM

fs 2 f
73

Nhc li: Bin i Fourier tn hiu ri rc


Cho chui tn hiu ri rc x(k) gm v hn mu (<k< +).
+) Phn
tch Fourier tn hiu x(k) l:
X ( ) =

j k
x
(
k
)
e

k =

Nhn xt:
Ph tn
t s ca
tn
t hiu
hi ri
i rc tun
t hon
h vi
i chu
h k 2,
2 do
d
X ( + 2 ) =

x ( k )e

k =

j ( + 2 ) k

j k
x
(
k
)
e
= X ( )

k =

Ph bin i xng qua trc tung, ph pha i xng qua gc


ta , do
X ( ) =

x ( k )e

j k

k =

X ( ) =

x ( k )e

k =

12 October 2010

j k

x(k )[cos( k ) + j sin( k )]

k =

)[ ( k ) j sin(
i ( k )]
x(k )[cos(

X ( ) = X * ( )

k =

H. T. Hong - HBK TPHCM

74

Nhc li: Ph tn s ca tn hiu ri rc


X ( )

X ( )

12 October 2010

H. T. Hong - HBK TPHCM

75

Nhc li: Bin i Fourier ri rc (DFT)


Cho chui tn hiu ri rc x(k) gm N mu (1kN).
(1kN) Phn tch
Fourier ri rc (DFT) tn hiu x(k) l:
N

X ( ) = x(kk))e j k
k =1

t
trong

2l
N

(l = 0,..., N 1)

X ( )

12 October 2010

H. T. Hong - HBK TPHCM

76

Nhn dng c tnh tn s dng pp phn tch Fourier


v(t)
H thng

u(t)

y(t)
y(k)

u(k)

Tn hiu vo u(k) l chui tn hiu ngu nhin, y(k) l tn hiu ra


Phn tch Fourier ri rc tn hiu vo v tn hiu ra:
N

U N ( ) = u (k )e j k
k =1

Suy ra:

Y ( )

G N (e j ) = N
U N ( )

YN ( ) = y (k )e j k
k =1

( =

2l
; l = 0,1,...N 1)
N

G N (e j ) c gi l hm truyn c lng thc nghim (Emperical

Transfer Function Estimate ETFE)


12 October 2010

H. T. Hong - HBK TPHCM

77

Tnh cht ca hm truyn c lng thc nghim

Hm truyn
c lng thc nghim G N (e j ) ch xc nh ti cc tn

s:

2l
; l = 0,1,...N 1
N

K vng ca G N (e j ) tim cn bng G0 (e j ) khi N.

1 ( N )

j
j
E[GN (e )] = G0 (e ) +
U N ( )
C1
1 ( N )
N

C1 = 2 kg 0 (l ) . max u (k )
l =1

12 October 2010

H. T. Hong - HBK TPHCM

78

Tnh cht ca hm truyn c lng thc nghim (tt)


Phng sai ca G N (e j ) tim cn bng
t s
nhiu
trn tn hiu
khi N.

c lng G N (e j ) ti cc tn

s
khc nhau tim cn khng tng
quan.

j
j
E[GN (e ) G0 (e )][GN (e j ) G0 (e j )] =
1 2 [ v ( ) + 2 ( N )] neu =
U N ( )
= (N)
2l
2
neu =
, l = 1, N 1
U N ( )U N ( )
N

C2
2 ( N )
N

C2 = C12 +
12 October 2010

R ( )

l =

H. T. Hong - HBK TPHCM

79

Th d nhn dng c tnh tn s ng c DC dng pp phn tch Fourier

Gi s
ng
c m
t bi m
hnh
h h ton
(s
( dng
d
m phng):
h )
1
di (t )
R
K
= i (t ) b y (t ) + u (t )
dt
L
L
L
dy (t ) K m
B
=
i (t ) y (t )
dt
J
J

R = 1 ( )
K e = 0.02

L = 0.03 (H)
K m = 0.02

J = 0.02 (kg.m 2 )
B = 0.05 (Nms)

Trong : u(t): in p phn ng (tn hiu vo);


y(t):
y(
) tc
quay
q y ca ng
g c ((tn hiu
ra);
);
i(t): dng in phn ng
Dng pp phn tch Fourier, nhn dng c tnh tn s ca ng c.
Gi s chu k ly
mu l T=0.01s, tn hiu o tc
b nh hng
bi nhiu cng c trung bnh bng 0 v phng sai bng 0.01.
So snh c tnh tn s nhn dng c vi c tnh tn s chnh
xc ca h thng.
12 October 2010

H. T. Hong - HBK TPHCM

80

c tnh tn s ca ng c DC tnh t m hnh ton hc


Bode Diagram
g

0
Magn
nitude (dB)

20

-20
-40
40
-60

-20
-40
40
-60

-80
0

-80
0

-45

-45
Phase (deg)

Phase (deg)

Magnitude (dB)

Bode Diagram
20

-90
-134
-180
-225

-90
-135
-180
-225

-270
270

-270
270
-1

10

10

10

10

10

-1

10

Frequency (rad/sec)

10

10

10

Frequency (rad/sec)

(a) c tnh tn s tnh t m


hnh ton hc lin tc

12 October 2010

10

(b) c tnh tn s tnh t m


hnh ton hc ri rc

H. T. Hong - HBK TPHCM

81

M phng th nghim thu thp d liu

M p
phng
g th nghim
g
thu thp
p d liu ca ng
g c
DC vi tn hiu vo ngu nhin
12 October 2010

H. T. Hong - HBK TPHCM

82

D liu nhn dng c tnh tn s dng pp phn tch Fourier


10
5
u

0
-5
-10

10

5
6
Time (sec)

10

2
0
-2
-4

p ng ca ng c DC vi
i tn hiu
hi vo
o ng
ngu nhin
(chu k ly mu Ts = 0.01 sec, N = 1000 mu d liu)
12 October 2010

H. T. Hong - HBK TPHCM

83

Kt qu nhn dng c tnh tn s ca ng c DC


20

0
Magnitude (dB)

Magnitude (dB)

Bode Diagram

20

-20
-40
-60

-40
-60

1500

-80
0

1000

-45
45
Phase (deg)

Phase (deg)

-80

-20

500
0
-500
-1000
-1
10

-90
-135
-180
-225
-270

10

10
Frequency (rad/sec)

10

10

-1

10

10

10

10

10

Frequency (rad/sec)

(a) c tnh tn s c lng


dng pp phn tch Fourier

(b) c tnh tn s tnh t m


hnh ton hc ri rc

Nhn xt: Do nhiu o lng tp trung min tn s cao nn c tnh


tn s nhn dng b sai s kh ln min tn s cao
12 October 2010

H. T. Hong - HBK TPHCM

84

Kt qu nhn dng c tnh tn s ca ng c DC

Magniitude (dB)

10

-10
-20

-10
-20

-30

-30
0

-50

-45

Phase (deg)

Phase (deg)

Magnitude (dB)

Bode Diagram
g

10

-90
-135
-180
0

10

-90
-135
-180

10
Frequency (rad/sec)

10

10

Frequency (rad/sec)

(a) c tnh tn s c lng


dng pp phn tch Fourier

(b) c tnh tn s tnh t m


hnh ton hc ri rc

Nhn xt: min tn s thp (nh hn tn s ly mu 5-10 ln) c


tnh tn s nhn dng c kh chnh xc
12 October 2010

H. T. Hong - HBK TPHCM

85

Th d nhn dng c tnh tn s ca tay my dng pp phn tich Fourier


K hiu

n v

Gi tr

M
m
l
lC
B
g

kg
kg
m
m
N.m.s/rad
m/s
/2

3.5
0.6
14
1.4
0.5
0.01
9 81
9.81

M hnh ton hc m t tay my (s dng m phng):


( MlC2 + ml 2 )&&(t ) + B&(t ) + (ml + MlC ) g sin (t ) = u (t )

Dng pp phn tch phn tch Fourier, nhn dng c tnh tn s ca h


thng
g quanh
q
im lm vic = / 4 . Gi s chu k
ly
y mu l
T=0.01s, tn hiu o tc b nh hng bi nhiu cng c gi tr
trung bnh l = 0 v phng sai l = 0.00004.
So snh c tnh tn s nhn dng c vi c tnh tn s chnh xc
tnh da vo m hnh ton hc.
12 October 2010

H. T. Hong - HBK TPHCM

86

c tnh tn s ca tay my quanh im tnh tnh t MH ton hc


Bode Diagram
g
0

-20

-20

Magn
nitude (dB)

Mag
gnitude (dB)

Bode Diagram
0

-40
-60
-80

-60
-80
-100
0

Phase (deg)

Phase (deg)

-100
0

-40

-90

-180

-270
270
-1

10

10

10

10

-90

-180

-270
270
-1

10

Frequency (rad/sec)

10

10

Frequency (rad/sec)

(a) c tnh tn s tnh t m


hnh tuyn tnh lin tc

12 October 2010

10

(b) c tnh tn s tnh t m


hnh tuyn tnh ri rc

H. T. Hong - HBK TPHCM

87

M phng th nghim thu thp d liu

S m
S
phng
h th
h nghim
hi thu
h thp
h d li
liu vo
ra quanhh
im vic tnh ca h tay my vi tn hiu ngu nhin
u~ = u u
D liu dng nhn dng c tnh tn s tuyn tnh: ~y = y y
12 October 2010

H. T. Hong - HBK TPHCM

88

D liu nhn dng c tnh tn s dng pp phn tch Fourier


22

20
18
16
14

10

20

30

40

10

20

30

40

50

60

70

80

90

100

50
60
Time (sec)

70

80

90

100

0.85
0.8
0.75
0.7

p ng ca tay
ta my
m quanh
q anh im tnh vi
i tn hiu
hi vo
o ng
ngu nhin
(chu k ly mu Ts = 0.01 giy, N =10000 mu d liu)
12 October 2010

H. T. Hong - HBK TPHCM

89

Kt qu nhn dng c tnh tn s quanh im tnh ca tay my


Bode Diagram
0

-20
Magnittude (dB)

M a g n iit u d e (d B )

-40
-60
60
-80

-100

-150

5000

-200
0

-45
Phase (deg)
P

P has e (deg)

-100

-50

-5000
-10000
10000

-90
-135
-180
-225

-15000
-1
10

10

10
Frequency (rad/sec)

10

10

-270
-1

10

10

10

10

10

Frequency (rad/sec)

(a) c tnh tn s c lng


(b) c tnh tn s tnh t m
dng pp phn tch Fourier
hnh ton hc ri rc
Nhn xt: Do nhiu o lng tp trung min tn s cao nn c tnh
tn s nhn dng b sai s kh ln min tn s cao
12 October 2010

H. T. Hong - HBK TPHCM

90

Bode Diagram

-10

-10
Magniitude (dB)

M agniitude (dB )

Kt qu nhn dng c tnh tn s quanh im tnh ca tay my

-20
-30
30
-40

-30
-40

-50
45

-50
45

0
Phase (deg)
P

Phase (deg)
P

-20

-45
-90
-135
-180
-1
10

-45
-90
-135
-180

10
Frequency (rad/sec)

-1

10

10

Frequency (rad/sec)

(a) c tnh tn
s c lng
(b) c tnh tn
s tnh t m
dng pp phn tch Fourier
hnh ton hc ri rc
Nhn xt: min tn s thp (khong 00.1-8
1-8 rad/sec) c tnh tn s
ca tay my quanh im tnh nhn dng c kh chnh xc
12 October 2010

H. T. Hong - HBK TPHCM

91

Phn tch ph

12 October 2010

H. T. Hong - HBK TPHCM

92

Phn tch ph
v(t)
H thng

u(t)

y(t)
y(k)

u(k)

Tn hiu vo u(k) l chui tn hiu ngu nhin, y(k) l tn hiu ra


Bn cht phng php phn tch ph l trn ha c tnh tn s c
lng thc nghim ETFE (nhc
li: ETFE c c bng
cch p
dng phng php phn tch Fourier.
tnh
c
t h tn
t s
ca
h thng
th nhn
h dng
d
d p phn
dng
h tch
t h ph:
h
N ( )

yu
G N (e j ) = N
( )

12 October 2010

H. T. Hong - HBK TPHCM

93

Phn tch ph

Trong :

( ) =

N
u

j
N

w
(

)
R
(

)
e
u

Nyu ( ) =

j
N

w
(

)
R
(

)
e
yu

w ( ) = W ( )e j d

R ( ) =
2
N
u

R ( ) =
2
N
yu

12 October 2010

( ) e

1
d =
N

( )U N ( )e

u (k )u (k )
k =1

1
d =
N

H. T. Hong - HBK TPHCM

y(k )u (k )
k =1

94

Hm ca s

Bartlett:

W ( ) =

1 sin / 2

2 sin / 2

w ( ) = 1

Parzen:

2(2 + cos ) sin / 4


W ( ) =

ssin / 2
6 2
1 2 1

w ( ) =
3
21 ,

12 October 2010

, 0 / 2

/ 2

H. T. Hong - HBK TPHCM

95

Hm ca s

Hamming:
W ( ) =

1
1
1
D ( ) +
D ( / ) +
D ( + / )
4
8
8

sin( + 1 / 2)
D ( ) =
sin / 2


1
w ( ) = 1 cos
2

12 October 2010

(0 )

H. T. Hong - HBK TPHCM

96

Hm ca s
08
0.8

0.4

W ()

Bartlett
Parzen
Hamming

0
-3

0
(rad/s)

Cc ca s tn s ng vi thng s = 5
12 October 2010

H. T. Hong - HBK TPHCM

97

Hm ca s
2
2.5

=5
=10
=15

W ()

1.5

0.5

-0.5

-3

0
(rad/s)

Hm ca s Hamming vi cc thng s khc nhau


12 October 2010

H. T. Hong - HBK TPHCM

98

Th d nhn dng c tnh tn s ng c DC dng pp phn tch ph

Gi s
ng
c m
t bi m hnh
h h ton
(s
( dng
d
m phng):
h )
1
di (t )
R
K
= i (t ) b y (t ) + u (t )
dt
L
L
L
dy (t ) K m
B
=
i (t ) y (t )
dt
J
J

R = 1 ( )
K e = 0.02

L = 0.03 (H)
K m = 0.02

J = 0.02 (kg.m 2 )
B = 0.05 (Nms)

Trong : u(t): in p phn ng (tn hiu vo);


y(t):
y(
) tc qquay
y ca ng
g c ((tn hiu
ra);
);
i(t): dng in phn ng
Dng pp phn tch ph, nhn dng c tnh tn s ca ng c. Gi
s chu k ly
mu l T=0.01s, tn hiu o tc
b nh hng bi
nhiu cng c trung bnh bng 0 v phng sai bng 0.01.
So snh c tnh tn s nhn dng c vi c tnh tn s c
lng thc nghim ETFE v c tnh tn s chnh xc ca h thng.
12 October 2010

H. T. Hong - HBK TPHCM

99

M phng th nghim thu thp d liu

M p
phngg th nghim
g
thu thpp d liu ca ngg c
DC vi tn hiu vo ngu nhin
12 October 2010

H. T. Hong - HBK TPHCM

100

D liu nhn dng c tnh tn s dng pp phn tch ph


10
5
u

0
-5
-10

10

5
6
Time (sec)

10

2
0
-2
-4
4

p
p ng
g ca ng
g c DC vi tn hiu
vo ngu
g nhin
12 October 2010

H. T. Hong - HBK TPHCM

101

Nhn dng c tnh tn s ca ng c DC


F
From
u1
1 tto y1
1

Amplitude

Amplitude

10

10

-2

10

-4

10

10

-2

10

-4

-2

10

-1

10

10

10

10

-2

10

-2000

-200

Phase (de
egrees)

Phase (de
egrees)

From u1 to y1

10

-4000
-6000
-2

10

-1

10

10
Frequency (rad/s)

10

-1

10

10

10

-400
-600
-800
-1000
-2
10

-1

10

10
Frequency (rad/s)

10

(a) c tnh tn s c lng dng pp phn tch Fourier


(b) c tnh tn s trn
trn c lng dng pp phn tch ph
Ch : Kt qu nhn dng (b) ph thuc vo hm ca s v gi tr
12 October 2010

H. T. Hong - HBK TPHCM

102

Nhn dng c tnh tn s ca ng c DC


From u1 to y1

10

Am
mplitude

10

-1

10

-2

10

-3

10

-1

10

10

Phase (d
degrees)

-100

-200

-300

-1

10

10
Frequency (rad/s)

min tn s thp, TTS c lng dng pp phn tch ph (xanh)


gn nh trng khp vi TTS chnh xc tnh t MH ton hc ri rc
() . Kt qu nhn dng ph thuc vo hm ca s v gi tr
12 October 2010

H. T. Hong - HBK TPHCM

103