From: david on 2 Jan 2010 04:12 "Bruno Luong" <b.luong(a)fogale.findmycountry> wrote in message <hhhjii$spo$1(a)fred.mathworks.com>... > "david " <david.sabine760(a)gmail.com> wrote in message <hhfkiu$oi6$1(a)fred.mathworks.com>... > > Hello all, > > If we have uncontrollable system ,how can we make it controllable in matlab ? What do we do in the matrix A,B to make the system controllable? > > where my state space system is described by > > x(k+1) =A*x(k) +B*u(k) > > y(k)= C*x(k) > > > > Is it just an academic example where you can play with A, B, C or it is from a real-world model? If it is a last case, then you are screwed. > > For the first case, you could just select A contractant (l2 norm strictly smaller than 1), B and C full rank, for example. > > I assume u is the control (?). > > Bruno Thans Bruno, It is a model for contrling the traffic on an over-saturated intersection .where u is the control variable (the green time in the traffic light) and : A=[1 0 0 0;0 1 0 0;0 0 1 0;0 0 0 1] B=[s1-q1;s2-q2;-s3;-s4] C=[1 0 0 0;0 1 0 0;0 0 1 0;0 0 0 1] D=[0]; s1=0.38; %1368 veh/h s2=0.27; %972 veh/h s3=0.19; %684 veh/h s4=0.20; %720 veh/h q1=0.5; %2160 veh/h q2=0.4; %1800 veh/h In this case how do i do to make my system controllable (the rank of controllability matrix= n )where n= the number of state variables. BEST REGARDS david
From: Bruno Luong on 2 Jan 2010 04:54 > It is a model for contrling the traffic on an over-saturated intersection .where u is the control variable (the green time in the traffic light) and : > A=[1 0 0 0;0 1 0 0;0 0 1 0;0 0 0 1] > B=[s1-q1;s2-q2;-s3;-s4] > C=[1 0 0 0;0 1 0 0;0 0 1 0;0 0 0 1] > D=[0]; > s1=0.38; %1368 veh/h > s2=0.27; %972 veh/h > s3=0.19; %684 veh/h > s4=0.20; %720 veh/h > q1=0.5; %2160 veh/h > q2=0.4; %1800 veh/h > In this case how do i do to make my system controllable (the rank of controllability matrix= n )where n= the number of state variables. > BEST REGARDS > david So everything are fixed and the system is not controllable. I can't see what else you can do beside praying for a miracle. I don't understand how you can multiply B (vector) with u (vector) and why the D? Are you sure to formulate the problem correctly? Bruno
From: david on 2 Jan 2010 05:06 "Bruno Luong" <b.luong(a)fogale.findmycountry> wrote in message <hhn53r$1lb$1(a)fred.mathworks.com>... > > > It is a model for contrling the traffic on an over-saturated intersection .where u is the control variable (the green time in the traffic light) and : > > A=[1 0 0 0;0 1 0 0;0 0 1 0;0 0 0 1] > > B=[s1-q1;s2-q2;-s3;-s4] > > C=[1 0 0 0;0 1 0 0;0 0 1 0;0 0 0 1] > > D=[0]; > > s1=0.38; %1368 veh/h > > s2=0.27; %972 veh/h > > s3=0.19; %684 veh/h > > s4=0.20; %720 veh/h > > q1=0.5; %2160 veh/h > > q2=0.4; %1800 veh/h > > In this case how do i do to make my system controllable (the rank of controllability matrix= n )where n= the number of state variables. > > BEST REGARDS > > david > > So everything are fixed and the system is not controllable. I can't see what else you can do beside praying for a miracle. > > I don't understand how you can multiply B (vector) with u (vector) and why the D? Are you sure to formulate the problem correctly? > > Bruno For u ,it is a one variable vector so we can do B*u .in the following you find my code %///////////////////////////////////////////////////////////// clear clc s1=0.38; %1368 veh/h s2=0.27; %972 veh/h s3=0.19; %684 veh/h s4=0.20; %720 veh/h q1=0.5; %2160 veh/h q2=0.4; %1800 veh/h q3=0.4; %1440 veh/h q4=0.3; %1080 veh/h %-------------------------------- c=160; rho=0.2; %x(k)=[x1(k);x2(k);x3(k);x4(k)] A=[1 0 0 0;0 1 0 0;0 0 1 0;0 0 0 1] B=[s1-q1;s2-q2;-s3;-s4] C=[1 0 0 0;0 1 0 0;0 0 1 0;0 0 0 1] D=[0]; L=[q1-s1;q2-s2;q3;q4] K=[q1;q2;0;0] e=[1;1;1;1] poles = eig(A) %//////////////////////////////////////////////////////////////// %x(k+1)= A*x(k)+B*u(k)+L*c+K*u2(k-1) %u(k)=u(k-1)+rho*((e'*x(k))/(q1+q2)); %///////////////////////////////////////////////////////////////// %///////////////// Checking controllability//////////////////////////////// co=ctrb(A,B) Controllability=rank(co) %///////////////////////////////////////////////////////////////////////// %///////////////// Checking observability///////////////////////////////// ob=obsv(A,C) Observability=rank(ob) %//////////////////////////////////////////////////////////////////////// xold=[0;0;0;0]; uold=70; for k = 1:3000 unew=uold+rho*((e'*xold)/(q1+q2)); xnew= A*xold+B*unew+L*c+K*uold; Z(:,k)=xnew; V(k)=unew; uold=unew; xold=xnew; end plot([1:3000],Z(1,:),'b',[1:3000],Z(2,:),'r',[1:3000],Z(3,:),'g',[1:3000],Z(4,:),'y') % plot([1:50],Z(1,:)) %////////////////////////////////////////the end ///////////////////////////////// the simulation results show that the system is not stable . For that i did the controlability test and i found that it is not true ?Alors i don't kno how to do for making it controllable by modyfing the matrix or by using a certain matlab commands Best regards David
From: david on 3 Jan 2010 09:51 Is there anyone help me please???
From: dpb on 3 Jan 2010 10:20 david wrote: > Is there anyone help me please??? 'Fraid not unless you change the system -- as Bruno says, and your previous description sounds like, there aren't enough DOF. --
First
|
Prev
|
Next
|
Last
Pages: 1 2 3 Prev: Searches vector Next: Windows 7 file Explorer crashing on encountering Matlab .mat files |