viernes, 27 de febrero de 2015

The Pulse Width Modulation and the eLeaf iStick 20W

Warning and disclosure!:

You might not like the maths. You might not need the maths. Anyway, apropos the premiere of the eLeaf iStick 20W in later September 2014, some people had to stay in touch, again, with the PWM problem.

It appears that the same, more or less, happened with some VAMO and other early VW Chinese mods in 2012/2013..... but eLeaf / iSmoka did not attend the meeting.....

How about the voltage on screen does not reflect the power felt in vaping with an iStick 20W? Because that one uses average volts in its screen, and not Root Mean Squared volts, the ones valid to calculate power with the famous formula:
 
So, knowing that the output of the iStick 20 W is a PWM (Pulse Width Modulation), seems fair to ask about what  is that.....and how to convert to the relevant parameters.
Let's see into what a squared PWM really is....



In that graphical description of a squared PWM wave, Vmax is the peak voltage, T is the period of the wave, which is related to its frequency as υ = 1/T. X is the time of each cycle of T duration in which the Vmax voltage is engaged. Precisely as X gets wider or thinner, the power output is changed.

In the iStick, it seems that Vmax is about 5,7 V at full charge of the battery, and 4,8 V when it is depleted under 60 %. The frequency of the PWM wave is about 48,5 Hz, like in an Innokin VTR, and a bit bigger than the usual Chinese VV/VW with PWM, like VAMO's, Sigeleis and Smoks, which usually work at 33 Hz. Hence the sometimes felt 'rattle-snake' effect.... At 48,5 Hz, this means that each working cycle lasts about 21 ms... (T).

If we change a bit the actual parameters, a quick calculation will bring up the problem. Let's say, for the sake of simplicity, that the frecuency is 1 Hz, or that the cycle lasts one second. And that Vmax is 4 volts. and that the duty cycle is 50 % (half the time at 4 V, half the time off at 0 V).

Supose that we fire up our imaginary mod for about five seconds over a coil of 1 Ω. It's firing at 4 V half the time, so it seems fair to conclude that the average voltage is 2 V....

And if we use our well know formula for power, that means that the power should be
2*2/1 = 4 W.....but it is not. Let's think of power only when our mod fires.....Working at 4 V, the power should be 16 W (4*4/1), but as it is working half the time, then the correct answer is 8 W.

How about that? We cannot get 8 W with our average voltage. That's why the 20w iStick fails (in an epic fail) using those averages for its calculations and showing them out of any shame!

The answer lays on the concept of Root Mean Squared, or RMS, which is just another way of computing a mean. Instead of just adding data and divide by the number of data, we add the squared data, divide by the number of data, and finally we take the squared root. In our imaginary mod, that's averaging 16 (4*4) half the time, that is, 8, and then taking the squared root:
If we use that Vrms of 2,8284... V on the formula of power..., we get 8W....Eureka!
So we must use Vrms to get proper wattages on waves, and a PWM output is just another wave.....the full mathematical explanation should use integrals to get all possible waves, but those integrals are really easy to manage, if you are an engineer, a mathematician, someone in touch with that....and in our PWM they are even easier, because the PWM is a case of constant funtion (the easiest to integer) just interrupted periodically. Those with enough curiosity can continue reading, those who lack of it, just jump to the end....

We can mathematically describe a function which satisfies that waveform, and it's quite simple, remember the illustration of a generic PWM wave:

f(t) =

The average voltage is defined by:



The root mean squared voltage is:


From (1); ; and in (2):



Apropos power, between 0 and x, it is a flat DC current, and beyond x, is zeroed, so the power will be also 0, over a resistor R, we can calculate the mean power as:


which is the same as calculating the power using the classical DC formula but with V = Vrms...

The same result can be obtained if we consider the energy output over an entire cycle. The energy released would be:



But all that energy would be released in a time of T, so the power over the entire cycle would be:, which is the equation (3).


(3) tells us that the power is related to the peak voltage and the duty cycle, defined as:
 (as fraction, or ), so
For those who jumped at the end, the relevant formulas without more fuss are:
And how to apply all this to the iStick 20W? Well, you can recalculate things from the values shown in its screen to the real ones, using the next graphs. They have been prepared with the supposition of a maximum current fed by the mod of 4 A, which seems to be a true statement, according to those who had check it out with oscilloscopes:
Or you can just start at the minimum power setting possible, and working it out raising your power setting until your taste gets affected. If you cannot reach anything meaningful, perhaps it will be time of checking the charts to see if your atomizer needs even less power than the actual fed by the iStick, regardless what it might show on its screen.... In that case, a bigger resistor coil in your atomizer might help...