Modeling PMDC Motor & Mechanical System

Click For Summary
SUMMARY

This discussion focuses on modeling a Permanent Magnet Direct Current (PMDC) motor and its associated mechanical system using MATLAB. The user is attempting to graph the time histories of three differential equations (DEs) related to the system's dynamics. The equations involve parameters such as resistance (R), inductance (L), motor constant (km), damping coefficient (B), moment of inertia (J), mass (M), spring constant (k), and radius (r). The user encountered issues with the equations when substituting variable values but resolved the confusion independently.

PREREQUISITES
  • Understanding of PMDC motor dynamics
  • Familiarity with MATLAB programming
  • Knowledge of first-order differential equations
  • Basic concepts of mechanical systems and control theory
NEXT STEPS
  • Explore MATLAB's ODE solvers for simulating differential equations
  • Learn about state-space representation in control systems
  • Investigate the impact of varying parameters on PMDC motor performance
  • Study graphical representation techniques for dynamic systems in MATLAB
USEFUL FOR

Electrical engineers, control system designers, and students involved in motor control and mechanical system modeling will benefit from this discussion.

Quadruple Bypass
Messages
120
Reaction score
0
alright I've got to model a PMDC motor and a mechanical system attached to it

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)

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];

the bolded part is where the problem is. if i substitute it for a constant number, say 10, the graphs are good.

i suck at matlab, never understood it, I am confused, what do i do?
 
Physics news on Phys.org
never mind, my mind kicked in in the clutch and i got it.
 

Similar threads

  • · Replies 8 ·
Replies
8
Views
3K
  • · Replies 7 ·
Replies
7
Views
3K
  • · Replies 1 ·
Replies
1
Views
2K
  • · Replies 2 ·
Replies
2
Views
4K
  • · Replies 6 ·
Replies
6
Views
4K
  • · Replies 5 ·
Replies
5
Views
4K
  • · Replies 5 ·
Replies
5
Views
4K
  • · Replies 1 ·
Replies
1
Views
2K
Replies
1
Views
1K
  • · Replies 18 ·
Replies
18
Views
4K