- 1

- 0

I am having trouble writing the code for the following:

The two Dynamic Equilibium Equations for an electric motor are:

dia/dt=(1/La)*(Va-ia*Ra-ea);

dw/dt=(1/J)*(Tem-TL-B*w);

Where:

Ra=0.6;

La=2e-3;

K*Phi=0.076;

TL=0.041893;

B=1e-4;

J=0.0024624;

Va=42;

Tem=K*Phi*ia;

ea=K*Phi*w;

Time span= 5 sec;

How do I write a code that solves these two equations simultaneously? I am required to plot ia and w versus time. I am also required to change the initial conditions and change TL to see how the plots change.

Thanks.