Upload
kamel
View
251
Download
1
Embed Size (px)
Citation preview
8/14/2019 Control Systems Simulation using Matlab and Simulink
1/10
U N I V E R S I T Y O F C A L I F O R N I A A T B E R K E L E Y
D e p a r t m e n t o f M e c h a n i c a l E n g i n e e r i n g
M E 1 3 4 A u t o m a t i c C o n t r o l S y s t e m s
S p r i n g 2 0 0 2
R e p o r t D u e : T u e s d a y , F e b r u a r y 2 6 O n e r e p o r t p e r g r o u p i s r e q u i r e d .
Control Systems SimulationUsing Matlab and Simulink
1 Introduction
I n M E 1 3 4 , w e w i l l m a k e e x t e n s i v e u s e o f M a t l a b a n d S i m u l i n k i n o r d e r t o d e s i g n , a n a l y z e a n d
s i m u l a t e t h e r e s p o n s e o f c o n t r o l s y s t e m s .
2 Control of Second Order System
W e w i l l s i m u l a t e t h e o p e n l o o p a n d c l o s e d l o o p s t e p r e s p o n s e o f t h e d y n a m i c s y s t e m d e s c r i b e d b y
t h e s t a t e a n d o u t p u t e q u a t i o n s
d
d t
x
1
= . 1 x
1
+ . 1 x
2
( 1 )
d
d t
x
2
= . 2 x
2
+ . 1 u
y = x
1
( 2 )
a n d t r a n s f e r f u n c t i o n
G ( s ) =
. 0 1
s
2
+ . 3 s + . 0 2
( 3 )
Y ( s ) = G ( s ) U ( s )
H e r e u i s t h e i n p u t , y i s t h e o u t p u t , a n d x
1
a n d x
2
a r e t h e t w o s t a t e s o f t h e s y s t e m .
T h e t w o t a n k fl u i d s y s t e m s h o w n i n F i g . 1 c a n b e m o d e l e d b y t h e a b o v e s t a t e a n d o u t p u t
e q u a t i o n s a n d / o r t r a n s f e r f u n c t i o n .
2.1 Open loop unit-step response
C o n s i d e r t h e o p e n l o o p u n i t - s t e p i n p u t r e s p o n s e o f t h i s s y s t e m . T h e u n i t - s t e p i n p u t i s g i v e n b y
u ( t ) = ( t ) , w e r e
( t ) : =
0 i f t
8/14/2019 Control Systems Simulation using Matlab and Simulink
2/10
F i g u r e 1 : fl u i d s y s t e m
L o a d t h e s i m u l i n k fi l e t a n k o p e n . m . U s i n g s i m u l i n k , m o d i f y t h e s y s t e m t o t h e o b t a i n t h e o p e n
l o o p u n i t - s t e p i n p u t r e s p o n s e o f t h i s s y s t e m . P l o t t h e o p e n l o o p r e s p o n s e o n a p l o t .
2.2 Continuous Time (C.T.) closed loop unit-step response
C o n s i d e r n o w t h e c l o s e d l o o p u n i t - s t e p i n p u t r e s p o n s e o f t h i s s y s t e m . T h e c o n t r o l s y s t e m i s
d e s c r i b e d b y t h e b l o c k d i a g r a m i n F i g . 2 w h e r e t h e c o n t r o l l e r i s a P I D t y p e c o n t r o l l e r g i v e n b y t h e
F i g u r e 2 : f e e d b a c k c o n t r o l s y s t e m
t r a n s f e r f u n c t i o n
C ( s ) = K
p
+
K
i
s
+ K
d
s
U ( s ) = C ( s ) E ( s ) .
I n t h e t i m e d o m a i n t h e P I D c o n t r o l a c t i o n c a n b e d e s c r i b e d b y
u
p
= K
p
e ,
d
d t
u
i
= K
i
e , u
d
= K
d
d
d t
e
u = u
p
+ u
i
+ u
d
w h e r e e = r y a n d t h e r e f e r e n c e i n p u t i s a u n i t - s t e p r ( t ) = ( t ) . ( N o t i c e t h a t p u r e D a c t i o n i s
u n r e a l i z a b l e a n d m u s t b e a p p r o x i m a t e d b y n u m e r i c a l d i ff e r e n t i a t i o n . )
U s i n g s i m u l i n k , m o d i f y t h e s y s t e m i n t h e fi l e t a n k c o n t i n u o u s . m s o t h a t t h e c o n t i n u o u s t i m e
( C . T . ) P I D c o n t r o l b l o c k i s c o n n e c t e d i n t h e f e e d b a c k l o o p . R u n s i m u l a t i o n s o f t h e c l o s e d l o o p
u n i t - s t e p i n p u t r e s p o n s e o f t h i s s y s t e m f o r d i ff e r e n t c o m b i n a t i o n s o f t h e P I D g a i n s . T r y fi r s t P
a c t i o n o n l y ( i . e . K
i
= 0 ) a n d o b s e r v e h o w t h e r e s p o n s e o f t h e c l o s e d l o o p s y s t e m v a r i e s w h e n K
p
i s i n c r e a s e d . S u b s e q u e n t l y a n a l y z e t h e e ff e c t o f i n t r o d u c i n g t h e I a n d D a c t i o n s i n t h e f e e d b a c k
c o n t r o l s y s t e m . T r y a t l e a s t t h e f o l l o w i n g c a s e s :
2
8/14/2019 Control Systems Simulation using Matlab and Simulink
3/10
8/14/2019 Control Systems Simulation using Matlab and Simulink
4/10
F i g u r e 3 : s p r i n g - m a s s s y s t e m
T h e r e f e r e n c e t r a j e c t o r y i s d e n o t e d b y r e f ( t ) . T h e o b j e c t i v e o f t h e c o n t r o l s y s t e m i s t o m a k e
t h e p o s i t i o n o f m
2
, w h i c h i s x
3
, f o l l o w t h e r e f e r e n c e t r a j e c t o r y a s c l o s e a s p o s s i b l e . H e n c e , w e c o u l d
d e fi n e a n e r r o r a t e a c h t i m e t b y
e r r o r ( t ) : = r e f ( t ) x
3
( t ) ( 4 )
I n a d i s k - d r i v e s y s t e m ( w h i c h w e u s e d t o m o t i v a t e t h i s e x a m p l e ) t h e r e f e r e n c e t r a j e c t o r y w o u l d
b e a s t a i r c a s e - l i k e s i g n a l , a n d x
3
w o u l d b e t h e p o s i t i o n o f t h e r e a d / w r i t e h e a d . T h e r e a d / w r i t e
h e a d m u s t b e m o v e d t o a p a r t i c u l a r t r a c k , a n d h e l d t h e r e f o r a s h o r t t i m e t o e i t h e r r e a d o r w r i t e ,
a n d t h e n m o v e d t o a d i ff e r e n t t r a c k . T h e h e a d m u s t b e v e r y s t i l l b e f o r e t h e r e a d / w r i t e p r o c e s s
c a n t a k e p l a c e . H e n c e , t h e r e s p o n s e o f t h e h e a d p o s i t i o n d u e t o a s t e p - c h a n g e i n d e s i r e d p o s i t i o n
i s i m p o r t a n t .
I n t h i s i n v e s t i g a t i o n , w e w i l l s i m p l y u s e a u n i t - s t e p r e f e r e n c e t r a j e c t o r y , r e f ( t ) = ( t ) , w h e r e
( t ) : =
0 i f t
8/14/2019 Control Systems Simulation using Matlab and Simulink
5/10
1 . T h e fi l e t w o m a s s . m i n S i m u l i n k c o n t a i n s t h e m o d e l o f t h e m e c h a n i c a l s y s t e m d e s c r i b e d a b o v e
a n d t h e d y n a m i c c o n t r o l l e r . T h i s fi l e i s n o t c o m p l e t e a n d h a s s o m e e r r o r s . Y o u a r e a s k e d
fi r s t t o c h e c k t h e d i m e n s i o n s o f t h e s y s t e m m a t r i c e s a n d i n s e r t s o m e o f t h e m i s s i n g e l e m e n t s
i n t h e fi l e . S e c o n d l y , y o u a r e a s k e d t o t e s t t h e r e s p o n s e o f t h e f e e d b a c k c o n t r o l s y s t e m d u e
t o a u n i t - s t e p r e f e r e n c e i n p u t o f 1 m e t e r f o r e a c h o f t h e f o l l o w i n g 5 c o n t r o l g a i n s e l e c t i o n s :
a
c
b
c
c
c
d
c
c o n t r o l l e r 1 5 - 4 1 1
c o n t r o l l e r 2 5 - 4 4 4
c o n t r o l l e r 3 5 - 4 8 8
c o n t r o l l e r 4 5 - 4 1 6 1 6
c o n t r o l l e r 5 5 - 4 2 0 2 0
N o t i c e t h a t , f o r t h e a b o v e c o n t r o l g a i n s e l e c t i o n s , t h e c o n t r o l l e r t r a n s f e r f u n c t i o n c a n b e
w r i t t e n a s f o l l o w s
C ( s ) = K
s + b
1
s + a
1
, U ( s ) = C ( s ) E ( s )
w h e r e K = c
c
= d
c
, a
1
= a
c
a n d b
1
= a
c
+ b
c
.
B e s u r e t o s a v e a s o u t p u t t h e p o s i t i o n o f e a c h m a s s , a s w e l l a s t h e c o n t r o l f o r c e ( i e . , t h e
o u t p u t o f c o n t r o l l e r ) u s e d t o c a u s e t h e m o t i o n .
2 . C o m p a r e t h e p e r f o r m a n c e o f e a c h c o n t r o l l e r . K e e p i n m i n d t h a t t h e m o t o r w h i c h i s a c t u a l l y
p r o v i d i n g t h e f o r c e o n M A S S 1 i s p r o b a b l y l i m i t e d i n t h e t o t a l a m o u n t o f f o r c e i t c a n g e n e r a t e ,
a s w e l l a s t h e r a t e a t w h i c h i t c a n d e v e l o p f o r c e .
3 . T r y a c o n s t a n t - g a i n c o n t r o l l e r ( n o d y n a m i c s ) o f t h e f o r m
u ( t ) = K ( r e f ( t ) x
1
( t ) )
( y o u g e t t o p i c k t h e v a l u e o f K ) . A r e y o u a b l e t o a c h i e v e g o o d p e r f o r m a n c e w i t h s u c h a
s i m p l e c o n t r o l l e r ?
4 . M o d i f y t h e c o n t r o l s t r u c t u r e s o t h a t t h e e r r o r w h i c h i s f e d t o t h e c o n t r o l l e r i s
e = r e f x
3
.
T e s t t h e p e r f o r m a n c e o f t h e 5 c o n t r o l l e r s d e s c r i b e d i n 1 . a b o v e w h e n t h e p o s i t i o n o f t h e
s e c o n d m a s s x
3
i s m e a s u r e d i n s t e a d o f t h e p o s i t i o n o f t h e fi r s t m a s s x
1
. C o m m e n t o n t h e
r e s u l t s o b t a i n e d .
4 Ball-and-Beam
C o n s i d e r t h e B a l l - a n d - B e a m s y s t e m s h o w n i n F i g . 4 :
A b a l l o f m a s s m s l i d e s o n a b e a m w h i c h h a s m o m e n t o f i n e r t i a J a b o u t i t s c e n t e r o f m a s s .
T h e c o n t r o l t o r q u e u i s a p p l i e d t o t h e b e a m a t i t s c e n t e r o f m a s s . T h e e q u a t i o n s o f m o t i o n f o r t h i s
s y s t e m a r e :
m r m r
2
+ m g s i n ( ) + b r = 0
J
T
+ 2 m r r
+ m g r c o s ( ) u = 0 ,
5
8/14/2019 Control Systems Simulation using Matlab and Simulink
6/10
F i g u r e 4 : b a l l - a n d - b e a m
w h e r e J
T
= J + m r
2
a n d b i s t h e c o e ffi c i e n t o f v i s c o u s f r i c t i o n b e t w e e n t h e b a l l a n d t h e b e a m .
T h e s t a t e v e c t o r f o r t h i s s y s t e m i s
x =
r r
T
.
T h e o b j e c t i v e o f t h e c o n t r o l s y s t e m i s t o b r i n g t h e s t a t e t o x = 0 .
1 . L o a d t h e fi l e b a l l n b e a m . m u s i n g s i m u l i n k . T h i s fi l e c o n t a i n s a s i m u l i n k m o d e l o f t h e b e a m -
a n d - b a l l s y s t e m i n t h e b l o c k l a b e l e d b a l l a n d a l i n e a r s t a t e - f e e d b a c k c o n t r o l l e r . T h i s
c o n t r o l l e r i s o f t h e f o r m
u ( t ) = k
r
r ( t ) + k
r
r ( t ) + k
( t ) + k
( t )
= k
r
x
1
( t ) + k
r
x
2
( t ) + k
x
3
( t ) + k
x
4
( t )
w h e r e t h e c o n s t a n t g a i n s k
r
, k
r
, k
a n d k
a r e r e a l n u m b e r s c h o s e n b y t h e c o n t r o l s y s t e m
d e s i g n e r t o a c h i e v e t h e o b j e c t i v e , w h i c h i n t h i s c a s e i s t o r e g u l a t e t h e b a l l / b e a m s y s t e m a t
t h e p o i n t
r
r
=
0
0
0
0
.
S i m u l a t e t h e r e s p o n s e o f t h e f e e d b a c k s y s t e m f o r t h e f o l l o w i n g i n i t i a l c o n d i t i o n s :
x ( 0 ) =
1
0
0
0
,
0
2
0
0
,
0
0
1
0
,
0
0
0
2
,
I n w o r d s , w h a t d o e a c h o f t h e s e i n i t i a l c o n d i t i o n s r e p r e s e n t ?
2 . F i n d i n i t i a l c o n d i t i o n s o f t h e f o r m
x ( 0 ) =
r
o
0
0
0
, x ( 0 ) =
0
0
0
o
,
f o r w h i c h t h e c o n t r o l l e d s y s t e m i s u n s t a b l e ( i e . , w h e n s t a r t e d f r o m t h i s i n i t i a l c o n d i t i o n , t h e
s y s t e m d o e s n o t r e s t o r e a l l o f t h e s t a t e s t o 0 ) . F o r e a c h c a s e t r y t o fi n d b o t h a s t a b l e i n i t i a l
c o n d i t i o n a n d a n u n s t a b l e i n i t i a l c o n d i t i o n t h a t a r e w i t h i n 1 0 t o 2 0 p e r c e n t o f e a c h o t h e r .
6
8/14/2019 Control Systems Simulation using Matlab and Simulink
7/10
3 . F i n d t h e c o n s t a n t i n p u t t o r q u e
T , s u c h t h a t t h e s t a t e x =
1
0
0
0
i s a n e q u i l i b r i u m p o i n t .
5 Report: ( One report per group)W r i t e a s m a l l r e p o r t d e s c r i b i n g y o u r fi n d i n g s w h e n p e r f o r m i n g t h i s l a b .
5.1 Recommended Form for Lab Reports:
A b s t r a c t - T h i s i s a s h o r t ( 1 / 2 t o 1 p a g e ) s y n o p s i s o f t h e i n t e n t a n d r e s u l t s o f t h e e x e r c i s e . O f t e n
t h e m o s t d i ffi c u l t p a r t o f t h e r e p o r t t o d o c o r r e c t l y , i t m a y b e p r u d e n t t o w r i t e i t l a s t .
I n t r o d u c t i o n - I n t h i s s e c t i o n t h e o b j e c t i v e s h o u l d b e s t a t e d a n d b a c k e d u p w i t h d e t a i l s . A s s u m p -
t i o n s t o b e m a d e s h o u l d b e l i s t e d a n d e x p l a i n e d . T h e b o u n d a r i e s o f t h e e x p e r i m e n t , ( i . e . ,
w h a t t h e e x p e r i m e n t w i l l e n c o m p a s s ) s h o u l d b e c l e a r l y d e fi n e d . T h e a p p a r a t u s a n d / o r m o d e l
s h o u l d a l s o b e d e s c r i b e d .
T h e o r y - A n y r e l e v a n t t h e o r y c a n b e i n c l u d e d h e r e . P r o o f s a r e r e c o m m e n d e d , a g a i n , i f r e l e v a n t .
D i s c u s s i o n - T h i s i s t h e m a i n b o d y o f t h e r e p o r t . I n t h i s s e c t i o n s h o u l d b e d i s c u s s e d t h e q u e s t i o n s
a s k e d i n t h e l a b o r a t o r y h a n d o u t s .
R e s u l t s - A n y p e r t i n e n t r e s u l t s s h o u l d b e i n c l u d e d h e r e . T a b u l a r f o r m s o f p r e s e n t i n g r e s u l t s a r e
e n c o u r a g e d . P l o t s o r g r a p h s s h o u l d b e p l a c e d i n a n o r g a n i z e d m a n n e r a t t h e e n d o f t h i s
s e c t i o n .
C a l c u l a t i o n s - A s i m p l i e d b y t h e h e a d i n g , r e l e v a n t c a l c u l a t i o n s a r e i n c l u d e d h e r e . I n c a s e s o f
m u l t i p l e s i m i l a r c a l c s . , o n l y o n e e x a m p l e n e e d b e p r e s e n t e d .
C o n c l u s i o n - T h e g e n e r a l c o n c l u s i o n s f o r t h e e x p e r i m e n t s h o u l d b e s u m m a r i z e d h e r e . R e m e m b e r ,
h a r d n u m b e r s c a r r y w e i g h t , e . g . T h e o v e r s h o o t w a s 3 0 s p e c i fi c a t i o n , i s b e t t e r t h a n T h e
o v e r s h o o t w a s u n s a t i s f a c t o r y .
N o t e : W h i l e I r e a l i z e t h a n m a n y w i l l h a v e o t h e r f o r m a t s f o r t h e t h e w r i t i n g o f l a b r e p o r t s , i t
w i l l b e a p p r e c i a t e d i f s t u d e n t s a t t e m p t t o f o l l o w t h e a b o v e p l a n .
5.2 Helpful Hints
T h e r e p o r t s h o u l d b e c o m p r e h e n s i v e , s o t h a t a n y o n e c o u l d r e a d a n d u n d e r s t a n d i t w i t h o u t
h a v i n g t h e l a b h a n d o u t i n f r o n t o f t h e m . F o r e x a m p l e , i n t h e fi r s t l a b i n s t e a d o f w r i t i n g I n
p a r t B o f t h i s l a b w e d i d . . . , i t s h o u l d b e A f t e r a p p l y i n g a u n i t s t e p r e f e r e n c e i n p u t , i t w a s
f o u n d t h a t . . . . I n o t h e r w o r d s , t h e r e p o r t s h o u l d s t a n d a l o n e . T r y t o w r i t e t h e r e p o r t a s i f
t h e r e a d e r k n o w s t h e m a t e r i a l , b u t d o e s n t k n o w t h e s p e c i fi c d e t a i l s o f y o u r p r o j e c t .
F i g u r e t i t l e s s h o u l d b e a s d e s c r i p t i v e a s i s r e a s o n a b l y p o s s i b l e s o t h e fi g u r e s c a n s t a n d a l o n e .
F o r e x a m p l e , t h e t i t l e D i g i t a l P I D C o n t r o l o f t h e H u b b l e T e l e s c o p e ( w i t h a c c o m p a n y i n g
p a r a m e t e r v a l u e s ) i s b e t t e r t h a n P I D C o n t r o l o r O u t p u t v s . T i m e . B e s u r e t o l a b e l t h e
a x e s a n d i n c l u d e u n i t s .
7
8/14/2019 Control Systems Simulation using Matlab and Simulink
8/10
0 20 40 60 80 100 1200
0.2
0.4
0.6
0.8
1
1.2
1.4
time (secs)
position
Step Response of second order system
F i g u r e 5 : S t e p R e s p o n s e o f s e c o n d o r d e r s y s t e m
6 Hands-on Design of Control Systems
H a n d s o n D e s i g n s y s t e m s r e f e r s t o d i r e c t l y w o r k i n g w i t h t h e s y s t e m t o b e c o n t r o l l e d a n d t r y i n g
a v a r i e t y o f c o n t r o l l e r s a n d c o n t r o l p a r a m e t e r s .
6.1 Performance Specification
O n e o f t h e fi r s t t h i n g s t h a t m u s t b e d o n e d u r i n g h a n d s - o n d e s i g n i s d e c i d i n g u p o n a c r i t e r i o n f o r
m e a s u r i n g h o w g o o d a r e s p o n s e i s . F o r e x a m p l e , w h e n w e d e a l w i t h s y s t e m s w h e r e w e a r e n o t
b o t h e r e d w i t h t h e a c t u a l d y n a m i c s o f h o w t h e s t e a d y s t a t e i s r e a c h e d , b u t o n l y c a r e a b o u t t h e
s t e a d y s t a t e i t s e l f , a g o o d m e a s u r e w i l l b e t h e s t e a d y s t a t e e r r o r o f t h e s y s t e m d e fi n e d b y
e = x
f i n a l
x
r e f
( 6 )
H o w e v e r , i n d y n a m i c s y s t e m s w h e r e t h e t r a n s i e n t b e h a v i o u r i s a l s o i m p o r t a n t , i t b e c o m e s
i m p o r t a n t t o i n t r o d u c e s e v e r a l o t h e r c r i t e r i o n . T h e m o s t c o m m o n a r e :
S e t t l i n g T i m e : T h i s i s a m e a s u r e o f h o w l o n g i t t a k e s f o r t h e s y s t e m t o s t a b i l i z e i n i t s n e w fi n a l
v a l u e a n d i s u s u a l l y d e fi n e d b y t h e t i m e i t t a k e s f o r t h e s y s t e m r e s p o n s e t o c o m e w i t h i n a
s p e c i fi e d t o l e r a n c e b a n d o f t h e s e t p o i n t v a l u e a n d s t a y t h e r e .
O v e r s h o o t : T h i s i s t h e m a x i m u m d i s t a n c e b e y o n d t h e fi n a l v a l u e t h a t t h e r e s p o n s e r e a c h e s . I t
i s u s u a l l y e x p r e s s e d a s a p e r c e n t a g e o f t h e c h a n g e f r o m t h e o r i g i n a l v a l u e t o t h e fi n a l , s t e a d y
s t a t e v a l u e .
8
8/14/2019 Control Systems Simulation using Matlab and Simulink
9/10
S t e a d y S t a t e E r r o r : T h i s i s a m e a s u r e o f h o w f a r t h e fi n a l v a l u e r e a c h e d i n t h e s t e p r e s p o n s e
i s f r o m t h e a c t u a l d e s i r e d v a l u e .
6.2 Feedback Control
I n f e e d b a c k c o n t r o l , w e a r e i n t e r e s t e d i n d e s i g n i n g a C o n t r o l L a w w h i c h o p e r a t e s o n t h e p r e s e n t
e r r o r o f t h e s y s t e m ( x
d e s i r e d
x
a c t u a l
) a n d p r o v i d e s a n a c t u a t i o n ( u ) w h i c h w i l l a c t u p o n t h e s y s t e m
a n d b r i n g i t n e a r e r t o t h e d e s i r e d v a l u e .
W e a r e i n t e r e s t e d i n t h r e e t y p e s o f c o n t r o l l e r s :
6 . 2 . 1 P r o p o r t i o n a l C o n t r o l ( P - c o n t r o l ) :
T h i s i s t h e s i m p l e s t t y p e o f c o n t i n u o u s c o n t r o l l a w . T h e c o n t r o l l e r o u t p u t i s m a d e p r o p o r t i o n a l t o
t h e e r r o r . T h e p r o p o r t i o n a l i t y c o n s t a n t i s c a l l e d t h e g a i n .
u
p
= K
p
e ( 7 )
w h e r e u
p
i s t h e o u t p u t a n d K
p
i s t h e g a i n .
O n e i m p o r t a n t t h i n g t o b e n o t e d a b o u t P r o p o r t i o n a l C o n t r o l i s t h a t i s i n c a p a b l e o f m a i n t a i n i n g
t h e o u t p u t s t e a d y s t a t e v a l u e a t t h e d e s i r e d v a l u e . T h i s i s c l e a r f r o m t h e e q u a t i o n a b o v e . W e c a n
s e e t h a t a s l o n g a s a n o n - z e r o a c t u a t i o n i s r e q u i r e d t o m a i n t a i n t h e s y s t e m a t t h e d e s i r e d v a l u e , t h e
e r r o r c a n n o t b e z e r o . M a t h e m a t i c a l l y , u
p
= 0 , t h e r e f o r e e = u
p
/ K
p
= 0 . A s w e i n c r e a s e t h e v a l u e
o f t h e g a i n , w e c a n s e e t h e s t e a d y s t a t e e r r o r w i l l d e c r e a s e . H o w e v e r , K
p
i s l i m i t e d b y t h e d y n a m i c s
o f t h e s y s t e m . T h e r e f o r e t h e v a l u e o f K
p
w i l l h a v e t o b e a r r i v e d a t b y c o m p r o m i s i n g b e t w e e n t h e
s t e a d y s t a t e e r r o r a n d t h e d y n a m i c s t a b i l i t y o f t h e s y s t e m .
6 . 2 . 2 I n t e g r a l C o n t r o l ( I - c o n t r o l ) :
I f w e w a n t a z e r o s t e a d y s t a t e e r r o r , w e w a n t a c o n t r o l m o d e t h a t i s a f u n c t i o n o f t h e h i s t o r y o f
e r r o r a c c u m u l a t i o n . T h e l o n g e r t h e e r r o r p e r s i s t s , t h e s t r o n g e r t h e c o n t r o l a c t i o n s h o u l d b e t o
c a n c e l i t . T h e m a t h e m a t i c a l o p e r a t i o n o f i n t e g r a t i o n i s a m e a n s o f i m p l e m e n t i n g t h i s a c t i o n .
M a t h e m a t i c a l l y ,
u
i
= K
i
t
0
e ( ) d ( 8 )
I t c a n b e s e e n t h a t t h e i n t e g r a l a c t i o n i s c a p a b l e o f r e d u c i n g t h e s t e a d y s t a t e t o z e r o . T h i s i s
b e c a u s e e v e n t h o u g h t h e s t e a d y s t a t e e r r o r i s r e d u c e d t o z e r o , t h e i n t e g r a l c o n t r o l l e r i s s t i l l c a p a b l e
o f m a i n t a i n i n g s o m e a c t u a t i o n ( i . e u
i
= 0 ) b e c a u s e o f t h e p a s t h i s t o r y o f e r r o r v a l u e s .
I n t e g r a l c o n t r o l i s u s u a l l y c o m b i n e d w i t h P r o p o r t i o n a l C o n t r o l t o g i v e a P I c o n t r o l l e r .
u
p i
= K
p
e + K
i
t
0
e ( ) d ( 9 )
T h e P I c o n t r o l l e r h a s t w o t u n i n g p a r a m e t e r s , n a m e l y K
p
a n d K
i
. T h e e a s i e s t w a y t o t u n e
t h e c o n t r o l s y s t e m i s t o s t a r t w i t h t h e i n t e g r a t o r t u r n e d o ff , i . e K
i
= 0 . a n d fi n d a r e a s o n a b l e
p r o p o r t i o n a l g a i n , a s d e s c r i b e d i n P - c o n t r o l . T h e i n t e g r a l g a i n ( K
i
) c a n t h e n b e s l o w l y i n c r e a s e d
u n t i l t h e s t e a d y s t a t e e r r o r i s b r o u g h t t o z e r o i n a r e a s o n a b l e a m o u n t o f t i m e .
I t s h o u l d b e n o t e d t h a t t h e I n t e g r a l a c t i o n h a s a d e - s t a b i l i z i n g i n fl u e n c e o n t h e s y s t e m a n d
t h e r e f o r e i t m a y b e n e c e s s a r y t o r e d u c e t h e p r o p o r t i o n a l g a i n s o m e w h a t i f t h e i n t e g r a l a c t i o n
c a u s e s t o o m u c h o s c i l l a t i o n . I d e a l l y , w e m a y h a v e a m e c h a n i s m w h e r e b y t h e i n t e g r a l a c t i o n d o e s
9
8/14/2019 Control Systems Simulation using Matlab and Simulink
10/10