I plotted graph for power consumption of motor and some values were negative.
What do the negative values actually mean?
Please see the explanation below regarding negative power
Negative motor power consumption means that in order for the motor to satisfy what we tell it to do, it would need to exert a force (or torque in case of rotary motor) opposite to what we defined as positive. In a simple case, it usually means that some other force is acting on the part that is being driven by the motor, and the presence of that force is causing the motor to have to "push back" to keep the motor definition valid.
Please see the attached simple example. It's a block in an "elevator" scenario where there is gravity in the negative y direction, and a constant speed linear motor defined moving it in the positive y direction. There is then a force acting as follows:
t = 0-2 s: 500 lb force in the positive y direction ramps up, meaning that it's pushing in the same direction as the motor. At the instance the power consumption drops to zero, we have reached the force value that is required to keep the block moving at the constant speed we defined for the motor. So the motor would not need to exert any power since the force would be enough to keep the motion going at the required speed. As the force keeps ramping up, the motor needs to "apply the brakes" so to speak, counteracting the defined force because otherwise the block would accelerate and cause the block to move faster. Keep in mind that motors are at the top of the Motion element hierarchy so they must always be satisfied. Because of this, we see the power consumption in the motor adjusting to counter-act the increasing force and maintain its defined speed.
t = 2-4 s: External force ramps back to zero.
t = 4-6 s: External force now is applied in the negative y direction, as if some weight was added to our "elevator." Naturally, this means the motor will need to exert more power to maintain its constant speed.
t = 6-8 s: External force ramps back to zero.
t = 8-10 s: External force remains at zero, resulting in constant power consumption where the motor is only acting against force of gravity due to the block's own weight.
Retrieving data ...