MATLAB Solving coupled ode in matlab help

  • Thread starter cjh12398
  • Start date
Problem: Model the coupled ode system for a motor:
Equations:
dVc/dt=(-1/C)*Il+(1/C)Is
dIl/dt=(1/L)*Vc-(R/L)*Il

I have been given the values of L=1e-3, R=50, Is=10.0A and C is to be designed by trial and error.
I have been able to write out the function, by assigning Vc=x(1) and Il=x(2), and then I wrote dxdt= [dVc/dt;dIl/dt];

But when I have my script, I'm having trouble in how to define the initial conditions. The task says that all currents and voltages are zero at the beginning and I have therefore written that x1=0 and x2=0.

However, when I plot the result, the current value is way lower than what is expected.
I suspect there is a problem in the way I am defining the initial conditions.
Any help would be greatly appreciated.
 

Want to reply to this thread?

"Solving coupled ode in matlab help" You must log in or register to reply here.

Physics Forums Values

We Value Quality
• Topics based on mainstream science
• Proper English grammar and spelling
We Value Civility
• Positive and compassionate attitudes
• Patience while debating
We Value Productivity
• Disciplined to remain on-topic
• Recognition of own weaknesses
• Solo and co-op problem solving
Top