# User:Mtxu

(Difference between revisions)
 Revision as of 12:38, 2 February 2009 (edit)← Previous diff Revision as of 12:43, 2 February 2009 (edit) (undo)Next diff → Line 13: Line 13: I have to know the gain matrix, with is: I have to know the gain matrix, with is: - $K=R*W^-1$ + $K=R*W^(-1)$ - + - $$K=R*W^-1$$. + It's knew that: It's knew that: - $$v(x)=x'*P*x=x'*W^(-1)*x$$. + $v(x)=x'*P*x=x'*W^(-1)*x. - $$x'*(A'*P+P*A)*x-2*x'P*B*K*x<0$$. + [itex]x'*(A'*P+P*A)*x-2*x'P*B*K*x<0. - $$u(t)=-K*x(t)$$. + [itex]u(t)=-K*x(t). - $$Hij(W,R)=W*A/alfa_i '+A/alfa_i*W-B/alfa_i*R-R'*B/alfa_j '<0[\tex] + [itex]Hij(W,R)=W*A/alfa_i '+A/alfa_i*W-B/alfa_i*R-R'*B/alfa_j '<0$ and and - [tex]W=eye(2,2)*w, w \in{} R^(2x2)$$ + [itex]W=eye(2,2)*w, w \in{} R^(2x2) - $$R=eye(2,2)*w, w \in{} R^(4x2)$$. + [itex]R=eye(2,2)*w, w \in{} R^(4x2). - The ecuation must: $$min f(W,R)=min(p1)+min(p2)$$ + The ecuation must: [itex]min f(W,R)=min(p1)+min(p2) subject to: subject to: - $$wnn \leq{} p1$$ + [itex]wnn \leq{} p1 - $$-p2 \leq{} r_qn\leq{}p2$$ + [itex]-p2 \leq{} r_qn\leq{} p2 with with - $$n=1,....4, q=1...2.$$ + [itex]n=1,....4, q=1...2. - $$W=w*eye(4)$$ + [itex]W=w*eye(4) - $$R=r*eye(2,4)$$ + [itex]R=r*eye(2,4) and: and: - $$W \geq{} \epsilon1*eye(4)$$ + [itex]W \geq{} \epsilon1*eye(4) - $$Hij(W,R) \leq{} -\epsilon2*eye(4)$$ + [itex]Hij(W,R) \leq{} -\epsilon2*eye(4) Now the article says that aplaing the convex programm, it posible to solve the ecuation. Now the article says that aplaing the convex programm, it posible to solve the ecuation. Line 48: Line 46: They present the next algoritm: They present the next algoritm: 1) Initialization 1) Initialization - $$l=0, W1=W1=eye(4), R1=R2=zeros(2,4)$$ + [itex]l=0, W1=W1=eye(4), R1=R2=zeros(2,4) 2)Calculate 2)Calculate - $$\lambda(W)=\lambda min(W)$$ + [itex]\lambda(W)=\lambda min(W) - $$\lambda_Hij=\lambda max(Hij(Wi,Ri))$$ + [itex]\lambda_Hij=\lambda max(Hij(Wi,Ri)) 3)if 3)if - $$\lambda(W) \geq \epsilon1$$ + [itex]\lambda(W) \geq \epsilon1 - $$lambda_Hij \leq -\epsilon2$$ + [itex]lambda_Hij \leq -\epsilon2 STOP STOP Else Else - $$l=l+1$$ + [itex]l=l+1 calculate eigenvalues(v_w y v_Hij). calculate eigenvalues(v_w y v_Hij). calculate the constraint linear: C1(W,R) calculate the constraint linear: C1(W,R) - $$v_w'*W1*v_w \geq \epsilon1$$ if $$(\epsilon1-\lambda_w)>(\lambda_Hij+\epsilon2)$$ + [itex]v_w'*W1*v_w \geq \epsilon1 if [itex](\epsilon1-\lambda_w)>(\lambda_Hij+\epsilon2) - $$v_Hij'*Hij*v_Hij \leq -\epsilon2$$ if $$(\epsilon1-\lambda_w)\leq (\lambda_Hij+\epsilon2)$$ + [itex]v_Hij'*Hij*v_Hij \leq -\epsilon2 if [itex](\epsilon1-\lambda_w)\leq (\lambda_Hij+\epsilon2) 4)Solve 4)Solve - $$min(p1+p2)$$ + [itex]min(p1+p2) under under - $$\epsilon1\leq w_nn\leqp1$$ + [itex]\epsilon1\leq w_nn \leq p1 - $$-p2\leq r_qn\leqp2$$ + [itex]-p2\leq r_qn\leqp2 - $$C_k(W,R)$$ + [itex]C_k(W,R) - $$k=1,...z$$ + [itex]k=1,...z Now I have no idea of how to continue, or how to program the algoritm. Now I have no idea of how to continue, or how to program the algoritm.

## Revision as of 12:43, 2 February 2009

Hello,

I'm Maria Calle, I have an answer abot CVX and how to work with. I hope here is the place for answer about.

I'm one student from Spain. I'm studing engienering in automatic control. I'm in my last year and I'm making a proyect of investigacion. It's about LQR and how to sintonice it by pole assignment.

I have some problems with the initialitation of the gain matrix. I'm reading one article for know how to make it. In the article they said that it's necessary to solve by convex programm. Until last week I didn't knew anything about convex program.

So I'm begining whit CVX program and now I'm lost. Could you help me? I don't know how to continue.

I have a system, A, B and C. It have to move poles to one region, for it, I make a transform to the original system. (A_alfa, B_alfa, C_alfa).

I have to know the gain matrix, with is:

$LaTeX: K=R*W^(-1)$

It's knew that:

$LaTeX: v(x)=x'*P*x=x'*W^(-1)*x$. $LaTeX: x'*(A'*P+P*A)*x-2*x'P*B*K*x<0$. $LaTeX: u(t)=-K*x(t)$.

$LaTeX: Hij(W,R)=W*A/alfa_i '+A/alfa_i*W-B/alfa_i*R-R'*B/alfa_j '<0$ and $LaTeX: W=eye(2,2)*w, w \in{} R^(2x2)$ $LaTeX: R=eye(2,2)*w, w \in{} R^(4x2)$.

The ecuation must: $LaTeX: min f(W,R)=min(p1)+min(p2)$ subject to: $LaTeX: wnn \leq{} p1$ $LaTeX: -p2 \leq{} r_qn\leq{} p2$

with $LaTeX: n=1,....4, q=1...2.$

$LaTeX: W=w*eye(4)$ $LaTeX: R=r*eye(2,4)$

and: $LaTeX: W \geq{} \epsilon1*eye(4)$ $LaTeX: Hij(W,R) \leq{} -\epsilon2*eye(4)$

Now the article says that aplaing the convex programm, it posible to solve the ecuation.

They present the next algoritm: 1) Initialization $LaTeX: l=0, W1=W1=eye(4), R1=R2=zeros(2,4)$ 2)Calculate $LaTeX: \lambda(W)=\lambda min(W)$ $LaTeX: \lambda_Hij=\lambda max(Hij(Wi,Ri))$

3)if $LaTeX: \lambda(W) \geq \epsilon1$ $LaTeX: lambda_Hij \leq -\epsilon2$ STOP

Else $LaTeX: l=l+1$ calculate eigenvalues(v_w y v_Hij). calculate the constraint linear: C1(W,R) $LaTeX: v_w'*W1*v_w \geq \epsilon1$ if $LaTeX: (\epsilon1-\lambda_w)>(\lambda_Hij+\epsilon2)$ $LaTeX: v_Hij'*Hij*v_Hij \leq -\epsilon2$ if $LaTeX: (\epsilon1-\lambda_w)\leq (\lambda_Hij+\epsilon2)$

4)Solve $LaTeX: min(p1+p2)$ under $LaTeX: \epsilon1\leq w_nn \leq p1$ $LaTeX: -p2\leq r_qn\leqp2$ $LaTeX: C_k(W,R)$ $LaTeX: k=1,...z$ Now I have no idea of how to continue, or how to program the algoritm.

They said the method for solving it's mathematical convex program.

Thanks a lot for all, Greetings.