# Solving a system of nonlinear differential equations

1. Mar 23, 2010

### sumeetg

1. The problem statement, all variables and given/known data
I'm working on a problem for my robotics class and could really use some help. I am suppose to be modeling a planar scara manipulator and have managed to come up with two nonlinear differential equations that describe the system; they are shown below. $$\Theta_{1}$$ and $$\Theta_{1}$$ are time dependent.

How would I solve these two equations in matlab for $$\Theta_{1},\dot{\Theta_{1}}, \Theta_{2},$$ and $$\dot{\Theta_{2}}$$ if i am given the initial conditions of $$\Theta_{1},\dot{\Theta_{1}}, \Theta_{2},$$ and $$\dot{\Theta_{2}}$$. As well as $$\tau_{1}$$ and $$\tau_{2}$$? I am suppose to plot $$\Theta_{1}$$ and $$\Theta_{2}$$ for a time period of 30 seconds.

Any help would be appreciated

Thanks

2. Relevant equations
$$\tau_{1}= (3+cos\Theta_{2})\ddot{\Theta_{1}}+\ddot{\Theta_{2}}+\dot{\Theta_{1}^{2}}sin\Theta_{2}-(\dot{\Theta_{1}}+\dot{\Theta_{2}})^{2}sin\Theta_{2}+9.8cos(\Theta_{1}+\Theta_{2})+(\ddot{\Theta_{1}}+\ddot{\Theta_{2}})cos\Theta_{2}+19.6cos\Theta_{1}$$
$$\tau_{2}= \ddot{\Theta_{1}}+\ddot{\Theta_{2}}+\ddot{\Theta_{1}}cos\Theta_{2}+\dot{\Theta_{1}^{2}}sin\Theta_{2}+9.8cos(\Theta_{1}+\Theta_{2})$$

Last edited: Mar 23, 2010