Discover MakerZone

MATLAB and Simulink resources for Arduino, LEGO, and Raspberry Pi

Learn more

Discover what MATLAB® can do for your career.

Opportunities for recent engineering grads.

Apply Today

Thread Subject:
control system

Subject: control system

From: ROHIT MISHRA

Date: 9 Sep, 2013 15:09:10

Message: 1 of 6

A=[0 1;2 3] ,B=[0 ; 1] and initial condition is x0=[1;0]
how to find the forced response of the above system using the above matrix in state space analysis of control system.
plz tell me how to do this problem.

Subject: control system

From: Nasser M. Abbasi

Date: 10 Sep, 2013 06:58:47

Message: 2 of 6

On 9/9/2013 10:09 AM, ROHIT MISHRA wrote:
> A=[0 1;2 3] ,B=[0 ; 1] and initial condition is x0=[1;0]
> how to find the forced response of the above system using the above matrix in state space analysis of control system.
> plz tell me how to do this problem.
>

may be

----------------------------
clear all
A = [0 1;2 3]; B = [0 ; 1]; x0 = [1;0];
sys = ss(A,B,[0 1],[]);
initial(sys,x0,16.4)
----------------------

Subject: control system

From: ROHIT MISHRA

Date: 10 Sep, 2013 14:14:10

Message: 3 of 6

"Nasser M. Abbasi" wrote in message <l0mfv5$9g9$1@speranza.aioe.org>...
> On 9/9/2013 10:09 AM, ROHIT MISHRA wrote:
> > A=[0 1;2 3] ,B=[0 ; 1] and initial condition is x0=[1;0]
> > how to find the forced response of the above system using the above matrix in state space analysis of control system.
> > plz tell me how to do this problem.
> >
>
> may be
>
> ----------------------------
> clear all
> A = [0 1;2 3]; B = [0 ; 1]; x0 = [1;0];
> sys = ss(A,B,[0 1],[]);
> initial(sys,x0,16.4)
> ----------------------
i want value of X1(t) and x2(t) not the plot....your help was appreciated

Subject: control system

From: Nasser M. Abbasi

Date: 10 Sep, 2013 17:36:58

Message: 4 of 6

On 9/10/2013 9:14 AM, ROHIT MISHRA wrote:
> "Nasser M. Abbasi" wrote in message <l0mfv5$9g9$1@speranza.aioe.org>...
>> On 9/9/2013 10:09 AM, ROHIT MISHRA wrote:
>>> A=[0 1;2 3] ,B=[0 ; 1] and initial condition is x0=[1;0]
>>> how to find the forced response of the above system using the above matrix in state space analysis of control system.
>>> plz tell me how to do this problem.
>>>
>>
>> may be
>>
>> ----------------------------
>> clear all
>> A = [0 1;2 3]; B = [0 ; 1]; x0 = [1;0];
>> sys = ss(A,B,[0 1],[]);
>> initial(sys,x0,16.4)
>> ----------------------


> i want value of X1(t) and x2(t) not the plot....your help was appreciated
>

Then why not simply solve the differential equation?

You have the differential equation right there? You defined it.
use ode45 if all what you want is the solution.

I have not played with control systems for sometime. Did you
try to read the documentation to find if there is away to
find x(t) direclty from state space?

--Nasser

Subject: control system

From: ROHIT MISHRA

Date: 11 Sep, 2013 15:20:15

Message: 5 of 6

"Nasser M. Abbasi" wrote in message <l0nlbl$ps2$1@speranza.aioe.org>...
> On 9/10/2013 9:14 AM, ROHIT MISHRA wrote:
> > "Nasser M. Abbasi" wrote in message <l0mfv5$9g9$1@speranza.aioe.org>...
> >> On 9/9/2013 10:09 AM, ROHIT MISHRA wrote:
> >>> A=[0 1;2 3] ,B=[0 ; 1] and initial condition is x0=[1;0]
> >>> how to find the forced response of the above system using the above matrix in state space analysis of control system.
> >>> plz tell me how to do this problem.
> >>>
> >>
> >> may be
> >>
> >> ----------------------------
> >> clear all
> >> A = [0 1;2 3]; B = [0 ; 1]; x0 = [1;0];
> >> sys = ss(A,B,[0 1],[]);
> >> initial(sys,x0,16.4)
> >> ----------------------
>
>
> > i want value of X1(t) and x2(t) not the plot....your help was appreciated
> >
>
> Then why not simply solve the differential equation?
>
> You have the differential equation right there? You defined it.
> use ode45 if all what you want is the solution.
>
> I have not played with control systems for sometime. Did you
> try to read the documentation to find if there is away to
> find x(t) direclty from state space?
>
> --Nasser




> i hav solved the problem by solving the entire equation of x(t) which involves integral and non integral terms.since the length of the solution became huge so i was trying to find a shorter way...i hav seen the ode45 command but didnt used it ...i will definitely try to solve the state equation using it...thanks 4 d help.......................ROHIT

Subject: control system

From: Nasser M. Abbasi

Date: 11 Sep, 2013 23:31:08

Message: 6 of 6

On 9/11/2013 10:20 AM, ROHIT MISHRA wrote:

>>>>
>>>> ----------------------------
>>>> clear all
>>>> A = [0 1;2 3]; B = [0 ; 1]; x0 = [1;0];
>>>> sys = ss(A,B,[0 1],[]);
>>>> initial(sys,x0,16.4)
>>>> ----------------------

>
>> i hav solved the problem by solving the entire equation of x(t) which involves
>integral and non integral terms.since the length of the solution became
>huge so i was trying to find a shorter way...i hav seen the ode45
>command but didnt used it ...i will definitely try to solve the
>state equation using it...thanks 4 d help.......................ROHIT

I do not know what the difficulties you had. But the state
equation can be easily used for ode45.

 From above, just write the odes, they are

x1' = x2
x2' = 2*x1 + 3*x2 + 1*u(t)

You can even backtrack the second order ODE from the above, like
this:

Let x2=y' and x1=y, then

     y''=3*y'+2*y+u(t)
or

     y''-3*y'-2*y = u(t)

This is a second order ODE. btw, one can see right away,
this is not stable ode. So, your model is wrong if this
is meant to be a real physical model. Stiffness term
can't be negative in real system.

You do not even need ode45 to solve this. You can solve
it by hand depending how complicated the forcing function
is. For siusodial, simply do (using syms, to get
exact analytical solution)

------------------------
syms y(t) t
dy=diff(y);
sol=dsolve(diff(y,2)-3*diff(y)-2*y==sin(t), y(0)==1, dy(0)==0)
ezplot(sol)
-------------------------

This is your x1(t), which is y(t)

--Nasser

Tags for this Thread

No tags are associated with this thread.

What are tags?

A tag is like a keyword or category label associated with each thread. Tags make it easier for you to find threads of interest.

Anyone can tag a thread. Tags are public and visible to everyone.

Contact us