# Energy consumed by a two-link planar manipulator with feedback control

I was carrying out a problem in which I have a fully actuated two link manipulator, so with an independent servo motor for each link that allows rotation in one direction and another (positive for counterclockwise rotation and negative for clockwise rotation).

Let's assume we start from a certain initial condition and arrive at a final condition through a feedback control of the torques applied to each motor. To do this, a counter-clockwise torque is first applied to each servo, then a clockwise torque to "brake" (no dissipation) the system.

Assuming a time interval of 10 seconds, at each sampling instant (suppose it is 0.1 seconds) I have a different torque and / or angular velocity value (suppose we always have a positive angular velocity). Consequently, by projecting the $$P = \tau \omega$$ products, I obtain instant by instant the value of power generated by each motor.

Now, I have two doubts. The first one concerns the power value. Is it correct to obtain a negative power value, obtained by possibly multiplying a negative torque value for the angular velocity? Or should i consider the torque absolute value? And then, is it correct to calculate the total energy value as the integral between 0 and 10 seconds of the power curve?

Of course I know that the model is very approximate and I have not even presented the dynamics and kinematics of the manipulator in question, but I would simply like to have a clear idea of the concept of power and energy.

• absolute. Your car uses power in reverse. Dec 10, 2021 at 13:30
• ok, what about energy? Is it correct to calculate energy as time integral of absolute power? Dec 10, 2021 at 14:03
• yes it is and i have to put more characters Dec 10, 2021 at 14:49
• I am unclear what you mean by "Assuming a time interval of 10 seconds, at each sampling instant (suppose it is 0.1 seconds) ". Dec 11, 2021 at 15:45
• Uhm, just think about Simulink. With a 0.1 s step time, i would have a certain torque and a certain angular speed value for each sampling instant Dec 13, 2021 at 7:59

Just some general notes. In general when one deals with dynamics problems vectors and their products can be quite a burden and a hassle.

My advice is clear up the notions of cross $$\times$$ and dot product $$\cdot$$ for vectors, and in early problem try to use summation of the moments which are calculated by vector form (this is especially true for 3d problems, although starting from simpler 2d like this one is the same).

In your particular example, $$P = \vec{T}\cdot \vec\omega$$ is a simple dot product so the only thing that matters about the sign is that they have the same direction.

When the Torque and the angular velocity are in the same direction then the member will rotationally accelerate, while if one is opposite to the other then the magnitude of the angular velocity will decrease.

So depending of how your convention is the sign of power will indicate if energy is added to the system or not.

## Alternative approach (work and energy)

I can't help noticing that in this particular problem, instead of integrating torque and angular velocity, it might be easier to use work and energy principle. I.e. you can easily write the Langrangian of this system and calculate the total energy of the system based on the position, and from that derive the energy at different configurations. Then based on the time interval required to move from one to the other configuration you can estimate the total energy required.

• "So depending of how your convention is the sign of power will indicate if energy is added to the system or not." With a negative torque value I would have a rotation in the opposite direction, so why should I subtract the energy value? I am not wasting energy due to passive elements such as springs, but I am delivering power to rotate the mechanism clockwise. Dec 13, 2021 at 8:02
• About lagrangian approach: thank you! I did not think about it. In the calculation I should always consider the final position of the mechanism, right? If I had axis of rotation passing through the center of mass of the link, I would have kinetic energy equal to $\mathcal{T} = \frac{1}{2} m v^2 + \frac{1}{2}I\dot{\theta}^2 = \frac{1}{2} m v^2$, with $v = \dot{x}^2 + \dot{y}^2$, so joint angle-dependent. But as i was saying before: should i consider final joint angle value? Dec 13, 2021 at 8:28
• "I am not wasting energy due to passive elements such as springs", when you lower the manipulator you might let the gravity do the work, however you need to apply force to brake and maintain the position. So the potential energy that is being converted to kinetic energy will be lost (for the most part even if you use a regenerative braking system). Dec 13, 2021 at 8:49
• Regarding the Langrangian approach, yes, you should only consider the initial and final state, although that implies that you disregard non concervative forces (e.g. friction). Dec 13, 2021 at 8:50
• Ok, thank you! So, if I want to calculate the overall energy by integrating the power signal over time, I must consider the net result and not the gross one. Taking the following power curve as an example ( i.imgur.com/8SHVgEc.png ), whose value (positive or negative) depends on the applied torque Dec 13, 2021 at 9:41

You do not have a source of energy storage in your systems like a spring or flywheel. That would give you restoring force and you need to calculate positive and negative work.

But in your case, you deal with absolute power and torque. let's look at one rod on top rotating counterclockwise for simplicity and assume the other one is not moving.

$$\tau_{motor2}= F*L_{orange}$$ In order to stop it and force it to rotate clockwise, you need to apply

$$-F \quad \text{which will give negative}\quad -\tau$$

But the negative is just the convention, you need to apply positive F but in reverse direction. Same with the energy, you are using enrgy both ways. The sum of energy is the sum of absolute values of energy on each direction.

## Edit

I need to modify my answer . Due to conservation of kinetic energy and angular momentum forces of your motors are acting as a force function and need to be added to the inertial motion of the system.
Say your mechanism's equation of motion is Ft at time t. if you apply torque at this time you have to add this torque by some Duhamel integral or numerical method.