alright ive got to model a PMDC motor and a mechanical system attached to it(adsbygoogle = window.adsbygoogle || []).push({});

this is what i have so far for the equations part, which is where the problem is (im trying to graph the time histories of the 3 DE's)

the bolded part is where the problem is. if i substitute it for a constant number, say 10, the graphs are good. function Xdot=project(t,X)

global R L km B J M b k r

V=10; % step function: 10 Volts

% State equations (1st order differential equations)

% X(1) = theta = angular displacement of pinion

% X(2) = theta dot = angular velocity of pinion

% X(3) = I = current

% X(4) = I dot

Xdot1= X(2);

Xdot2= (1/(J-M*r^2))*(-B*X(2)+km*X(3)+b*r^2*X(2)+k*r^2*X(1));

Xdot3= (V-R*X(3)-km*X(2))/L;

% The differential equations must be put in a column vector

Xdot=[Xdot1; Xdot2; Xdot3];

i suck at matlab, never understood it, im confused, what do i do?

**Physics Forums - The Fusion of Science and Community**

Dismiss Notice

Join Physics Forums Today!

The friendliest, high quality science and math community on the planet! Everyone who loves science is here!

The friendliest, high quality science and math community on the planet! Everyone who loves science is here!

# Matlab question

Loading...

Similar Threads for Matlab question | Date |
---|---|

MatLab function question | Sep 5, 2015 |

Contour question in matlab | Feb 9, 2015 |

LaTeX Concept and subject of latex and its usage and related questions on latex | Sep 25, 2014 |

MATLAB A question on linear algebra(also Matlab related) | Jun 23, 2014 |

Computing question 1st year Engineering-MATLAB | Apr 22, 2014 |

**Physics Forums - The Fusion of Science and Community**