Você está na página 1de 19

Amirhossein Haghpanah

IVEZOO
software engineering
control engineering homework

The given values are:


m

L0

Y0

0.9

1.2e-4

0.03

0.7

0.5

and Value of gravity acceleration g = 9.81m/ s 2 .

+
[
0

0
0

0
0 ].()= ()

0
+
/

1. Use the above expressions to get the linear state equation of the crane and the
transfer functions Wr, f (s) and Wl,(s) . Use the parameter values from Table 1 to get
the state equation and the transfer functions numerically as well. Compute the
eigenvalues and the poles!

+
[
0

0
0

0
0 ].()= () =>

0
+
/

()= [
0

0
0 1

0
0 ] . () =>

0
+
/

1
2 + 0.9 2 0.7
0

2
2

0.7
0
()= [
] . (2 (9.81) ) =>
1.2104

0
0
2+(
)
/0.03
0.032

2.9 1.4
0 1
()= [ 2 1.4
0 ] . (19.62) =>
/0.03
0
0 2.133

By using inverse function in matlab: inv() we get:


1

1.11
1.11
0
()= [1.5873 2.3016
0 ] . (19.62) =>
/0.03
0
0
0.4688

1.11 + 21.77

= +

, x= , u=( ), y=( )
()= (1.58 45.15), {

= +

15.62

( )
So now we find the values of A,B,C,D from them:

0
0
1
0
0
0
21.77 0
A= 0
0 45.15 0
0
0
0
(0
0
0

C=(1 0 0

0
1
0
0
0
0

0
0
0
0
0
0
0
0 , B= 1.11
0
1.58
0
1
0
0
( 0
0)
15.62)

0
0
0
0
0
0

1 0) , D=0

For simpler calculation we can see that the state space could be separated into
two SiSo systems:

x= so

( )

x1=( ) and

x2=( )

u=( ) so

u1=()

and

u2=()

y=( ) so

y1= ()

and

y2=( )

so we will get these values after separation:


0
0
A1=(
0
0

0
0
21.77
45.15

1
0
0
0

0
1
0 1
) , A2=(
)
0
0 0
0

0
0
0
B1=(
) , B2=(
)
1.11
15.62
1.58
C1=(1 0 0

0) , C2=(1

Wr,f (s) = 1 ( 1 )1 1 +
Wl, (s) = 2 ( 2 )1 2 +

0)

For finding Wr,f we will use the values of the first system by the matlab commands bellow:

And for finding Wl, we use the values of the second system with matlab
commands as bellow:

For finding eigen values we can use the matlab command eig(A1)and eig(A2)
and we will get:

2. Design a state-space controller in continuous time which includes a state feedback, a


state observer and gains to take into consideration the reference signals. Use the
following specification for the design:

First of all with substituting the values in the given equations we get the following results:

a=

(2+0.9)9.81
20.7

= 4.5

w0=a/2=2.25

xi=0.7

sc= -4.5

so= -9

Using this formula we will find the values of S1 and S2 (poles)using matlab as bellow:

State feedback design:


In the case of state feedback the control architecture is:

u= -Kx

Where
As we separated two systems we will have two different K values (K1,K2) that are for
system1 and system2 and we can compute their values by matlab but first regarding to the
formula we will need to find () for both systems:
To do so we need to know the dimension of A1 and A2 which are:
Dim(A1)=4, Dim(A2)=2 so,
(1)= (s1,s2, sc, sc) we called this in matlab as phic1
(2)= (s1,s2) we called this in matlab as phic2

And now we can find the values of K1 and K2 from the ackers formula using matlab
command as bellow:

Using Simulink command in matlab we are able to construct the diagram which I have
done in the following way separately for each of systems:

sysRFss:

sysLTss:

State observer design:

The observer pole : so= -9

Then For sysRFss we have the following diagram:

And For sysLTss:

State Feedback with using Tracking Reference Signal:

We should set the values independently as we have 2 separated systems:


sysRFss:

sysLTss:

Y0= 0.5

L0= 0.7

T=1

are given.

As we have 2 separated systems we can define the values (graphs) of

From our first system by the reference signal:


= 0.1*0.5*(1-e-t/1)= 0.05(1-e-t)
And the initial value is only one: x(0)=(0,0,0,0)T
Where the block diagram of the first system with reference signal is as bellow:

This diagram has been saved as :sys1eqninput


After running this diagram we are able to see the values of Y,F,r and r hat,theta and theta hat.

Here are they:


Y(t):

r and r hat:

We see that they are the same!

F:

Theta and theta hat:

Now the values of

Can be find from the second system where the reference is


But we have 2 different initial values:

XLT1=(0,0)T and XLT2(0)=(0.35,0)T


For LT1 we have the following diagram:

As the initial value is zero we can see that we get the same graph for Y and I and I hat and
Tau as bellow:

For LT2 we have the following diagram:

Now we can measure the values of the Y, Tau, l and l hat.

Y:

Tau:

L and l hat:

The End.

Você também pode gostar