I'm trying to build dc motor in simscape
I used the command ssc_dcmotor
to get the example
I added controlled voltage source instead of voltage source and s-ps converter and made input port ... i replaced scope with output port
I made this to get linear model of speed of dc motor using [A, B, C, D]=linmod('dcmotor')
When I get eig(A)
I see poles at zero which means system is not stable
What is the bug in my understanding here?
The state of the system returned by linmod
includes the states of all it's blocks (even if these states are empty or constant). Try executing
sstr= linmod('dcmotor1');
disp(sstr.StateName);
and you will see
[1x50 char] [1x50 char] 'dcmotor1/DC Motor/Inertia' 'dcmotor1/DC Motor/Rotor Inductance' 'dcmotor1/Sensing/Ideal Rotational Motion Sensor' 'dcmotor1/DC Motor/Friction' 'dcmotor1/DC Motor/Rotor Resistance' [1x50 char] [1x50 char]
Obviously, we don't need the states of DC Motor/Friction
, Rotor Resistance
, Ideal Rotational Motion Sensor
and their equations of the form dx/dt= 0.
However, it is easy to remove the unused states (The Control System Toolbox is needed):
sys= ss(A,B,C,D); % create the state space model
sys= minreal(sys) % remove the unnecessary states
pole(sys) % now we can calculate the poles