Search All of the Math Forum:

Views expressed in these public forums are not endorsed by NCTM or The Math Forum.

Notice: We are no longer accepting new posts, but the forums will continue to be readable.

Topic: control system
Replies: 5   Last Post: Sep 11, 2013 7:31 PM

 Messages: [ Previous | Next ]
 Nasser Abbasi Posts: 6,677 Registered: 2/7/05
Re: control system
Posted: Sep 11, 2013 7:31 PM

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

Date Subject Author
9/9/13 ROHIT MISHRA
9/10/13 Nasser Abbasi
9/10/13 ROHIT MISHRA
9/10/13 Nasser Abbasi
9/11/13 ROHIT MISHRA
9/11/13 Nasser Abbasi