Energy consumption from acceleration I have an interesting problem.
I have a machine which has to lift 35 kg (this is the total mass of the object and the lifting arm). The lifting is done by a servo motor.
Now I want to calculate the energy required to lift this object with a certain acceleration and deceleration (let's say $1000\:\rm mm/s^2$)
The height of lifting is $h=1000\: \rm mm$.
Now this is a servo machine, which means that for half of the height it will accelerate and for half of the height will decelerate. So at the middle of the lifting the speed will be $v_{max}=1000\:\rm mm/s$ and the total movement will be $t=2\:\rm s$.
I could also say that the average speed would be $v_{\rm avg}=500\:\rm mm/s = 0.5\:\rm m/s$
Energy formula would give me an energy of $\frac12mv^2= 0.5 \times 35\times 0.5 \times 0.5 = 4.375\:\rm J$. If I divide this by the time required (2s) I get $4.375/2 = 2.19\:\rm W$ of Power.
This doesn't make sense because definitely my machine requires more power and consumes more energy. What am I missing here?
 A: OK, let's plot it. This is speed (m/s), position (m), acceleration (m/s^2), force (N), mechanical power (W) and energy expended (J) during the movement.

Since $\ 1m/s^2 $ acceleration is much lower than gravity g, the servo has to exert force to push the lift up during the entire travel. It will exert a bit more force during acceleration and a bit less during deceleration, but it will not act as a brake (ie, work at negative power). This is an important detail because we don't know if the servo can do regenerative braking and recover energy during braking... or not.
We know the total amount of work the servo will have to do is $ mgh = 343 J$ no matter the speed or acceleration profile. 
However instantaneous power will vary since it is $ Fv $ and v is zero at the beginning and at the end, and maximum in the middle. At a constant acceleration, v will increase then decrease linearly, so power will do the same. Power is not constant so it is incorrect to estimate it with "energy/time". Likewise you can't calculate kinetic energy by using the average speed since kinetic energy varies during acceleration and deceleration.
The mistake in your calculation is to not account for the fact that the vast majority of the power is used to lift the object, not accelerate it. Look on the bottom graph, kinetic energy is tiny relative to potential energy. Kinetic e is maximum in the middle at maximum speed, then it is converted back into potential energy as the lift slows down.
A real servo will use more electrical power than the mechanical power it produces, of course. 
The motor's rotor inertia could be added to the calculation, but it would only matter if the acceleration was higher than g and the motor had to brake against its own inertia during deceleration. Here it won't matter much, since the "brake" is the weight of the object, not the motor. So the motor's inertia simply adds to the lift's kinetic energy and is converted into potential energy at the end (minus transmission losses).
The servos's output mechanical power peaks at 400W, so once we add up losses in transmission, the motor, its controller, etc, it wouldn't be surprising that electrical power would peak at much higher than that. At this power level, it won't use linear drive, rather PWM, so at least the driver should be efficient. 
Motor efficiency depends on speed (rpm) and torque. Check this link for an example efficiency map of brushless vs asynchronous motors. These are big motors, the motor in your servo will be less efficient.
Even when it does not move, and produces zero mechanical power, the servo needs torque and thus electrical power to hold the lift against the weight of the object. So electrical power might be close to zero at the beginning if the lift is bottomed out and rests on the ground, but it will draw electrical power to hold the lift in position at the top unless it has a mechanical brake, or other kind of one-way gearbox which will stop the lift from moving unless the motor turns. And in this case... this will also introduce losses.
So I think you should plot electrical power versus time if you have an instrument to measure it ; the shape of that graph will tell you more about how your servo uses power. Also check how much power it uses just to hold the lift depending on how much weight is on it.
A: It takes more energy to speed up an object from $0.5m/s$ to $1m/s$, than from $0m/s$ to $0.5m/s$. So, to calculate the average power required to speed up an object from $0m/s$ to $1m/s$, we have to find the final kinetic energy and divide it by the speeding up time.
The consumption of energy during the second (deceleration) phase of the lift is trickier, because it depends on how exactly the deceleration is done, but we can assume that it will be smaller than the energy consumed during the acceleration phase (in theory, it could be even negative).
Besides the energy required to accelerate the object, we have to take into account the energy required to increase its potential energy and and the energy spent against friction in the arm, which will further increase the average power consumption.  
Of course, we also have to take into account the efficiency of the driver circuit (could be built into the servo) and the efficiency of the motor and the drive train.
A: Would it be possible for you to draw a free body diagram of your system? Realistically, the best way to solve this problem would be to integrate the motor force output as a function of distance. This will give you the work done on the mass by the motor. Does your servo motor control the speed with proportional control? Or does it take a short cut and control the current supplied with proportional control leading to a lower net force on your mass?
We know the net work done is mg$\Delta h$, where m is the mass, g is the gravitational force, and h is the change in height. This gives us a nice lower bound for the total energy exerted by ALL of the forces along the length, not just the motor. Consider the integral below. This is the work on your mass, where $m$ is your mass, $F_m$ is the force from your motor, $F_g$ is the force from gravity, and PE is the potential energy. To go further, you can include your model for motor inefficiency in the motor force generation term, eventually bringing the model to voltage and current.
$\int_{h_0}^{h^f} F_m - F_g dh = PE$
