<!DOCTYPE article PUBLIC "-//NLM//DTD JATS (Z39.96) Journal Archiving and Interchange DTD v1.0 20120330//EN" "JATS-archivearticle1.dtd">
<article xmlns:xlink="http://www.w3.org/1999/xlink">
  <front>
    <journal-meta>
      <journal-title-group>
        <journal-title>SMARTINDUSTRY -</journal-title>
      </journal-title-group>
    </journal-meta>
    <article-meta>
      <title-group>
        <article-title>Resolving the issue of incorrect use of the averaging formula for calculating the power of conduction current pulses and how this is relevant to robotics⋆</article-title>
      </title-group>
      <contrib-group>
        <contrib contrib-type="author">
          <string-name>Pavlo Bratiuk</string-name>
          <xref ref-type="aff" rid="aff0">0</xref>
        </contrib>
        <contrib contrib-type="author">
          <string-name>Leonid Ozirkovskyi</string-name>
          <xref ref-type="aff" rid="aff0">0</xref>
        </contrib>
        <aff id="aff0">
          <label>0</label>
          <institution>Lviv Polytechnic National University</institution>
          ,
          <addr-line>S. Bandera str. 12, Lviv, 79013</addr-line>
          ,
          <country country="UA">Ukraine</country>
        </aff>
      </contrib-group>
      <pub-date>
        <year>2025</year>
      </pub-date>
      <volume>2</volume>
      <fpage>03</fpage>
      <lpage>05</lpage>
      <abstract>
        <p>By means of practical examples, the methodological incorrectness of using the formula of the average value of a function in original form to calculate the power of conduction current rectangular pulses in the active resistance is demonstrated, which persists to this day. The cause of this incorrectness is revealed and, in order to eliminate it, an empirically generalized formula is proposed which includes its original form as a special case. The proposed formula will help to improve the accuracy of the evaluation of energy consumption and the efficiency of its conversion in robotic devices, especially in switching voltage converters. This should contribute to increasing the duration of continuous operation and the likelihood of robotic devices completing tasks, as well as to the overall needs of global energy saving.</p>
      </abstract>
      <kwd-group>
        <kwd>eol&gt;duty cycle</kwd>
        <kwd>pulsed power</kwd>
        <kwd>average power</kwd>
        <kwd>elementary function</kwd>
        <kwd>composite function</kwd>
        <kwd>physical quantity</kwd>
      </kwd-group>
    </article-meta>
  </front>
  <body>
    <sec id="sec-1">
      <title>-</title>
      <p>operating time of robotics, identifies the cause of the contradiction between the real efficiency of
SVCs and the existing evaluations of the efficiency of energy accumulation in their reactive
components. It lies in the overly idealised theoretical provisions on which these evaluations are
based. Primarily these relate to the energy losses in the active resistance of the batteries, without
which it is impossible to adequately evaluate the efficiency of the SVCs.</p>
      <p>And when applying the conclusions of [1] to the results of previous studies [2], the incorrect
practice of using the formula of the average value of the function to calculate the power of
rectangular pulses of conduction current was revealed, which can lead to inaccurate efficiency
evaluations in designing not only SVCs, but also other pulse devices.</p>
      <p>For example, such an incorrectness was found in the Multisim simulator (version: 11.0.278) from
National Instruments Corp, which has many users.</p>
      <p>This incorrectness is of a methodological nature, and to prevent it, it is necessary to observe the
type of function that describes the value being calculated and the scope of the formula for averages,
which is derived in its original form for elementary functions.</p>
      <p>For this, we propose a formula which is adapted to ensure the correct calculation of average
values of composite functions in the form of a product of elementary functions.</p>
      <p>The power of the conduction current, in particular in the active resistance losses of the
batteries, is precisely such a composite function. Therefore, the use of the proposed formula will
help to improve the accuracy of evaluating the efficiency of not only SVCs based on the PWM
principle, but also any other composite indicators of various pulse nodes of robotics, etc.</p>
      <p>2.A brief overview of the practice of using the average value of
a function formula to calculate the parameters of rectangular
pulses
In mathematics, a formula exists for calculating the values commonly referred to as the average (or
mean) value of a function, which in its original form is as follows, for example in [3, p. 542]:
where f(x) is integrated and continuous on the interval [a, b] functions.</p>
      <p>In many fields of radio electronics, including robotics, this formula is used in a structurally
unchanged form to calculate the average values of the parameters of rectangular pulses of physical
quantities of various nature, most commonly voltage, current and power in an active resistance.
Only the mathematical notation is replaced by the notation of the parameters of pulses from the
field of application in which the formula is used.</p>
      <p>
        For example, by the equivalent transformation of formula (
        <xref ref-type="bibr" rid="ref1">1</xref>
        ), the calculation is performed that
combines such parameters of a rectangular pulse sequence as pulse power Pi and average power
Pavg through the pulse duty cycle D [4], which corresponds to the interval [a, b] in (
        <xref ref-type="bibr" rid="ref1">1</xref>
        ):
(
        <xref ref-type="bibr" rid="ref1">1</xref>
        )
where  is the pulse duration time and T is the pulse repetition period.
      </p>
      <p>The graphical representation of the values of pulse power Pi over the pulse duration time and
average power Pavg over the pulse repetition period is shown in Figure 1. These values are
calculated using the familiar methods of integral calculus.
where P(t) is a function that describes the change in power over time, in this case, during the
time of the rectangular pulse .</p>
      <p>And finally, the average power of rectangular pulses over their repetition period T:
(4)</p>
      <p>
        Formula (4) is the same as (
        <xref ref-type="bibr" rid="ref1">1</xref>
        ), except that it uses the notation of rectangular impulse parameters
instead of the notation commonly used in mathematics. In this form, this formula is used in [5, p. 6]
to calculate the pulse power of the optical radiation of pulsed lasers, and in [6] - the average
voltage value to evaluate the distortion of the pulse signal.
      </p>
      <p>
        As further will show, in [5] and [6] we have examples where the physical nature of the
quantities to be calculated and the mathematical function describing them correspond to the scope
of formula (
        <xref ref-type="bibr" rid="ref1">1</xref>
        ) in its original form and its form (4).
      </p>
      <p>
        Instead, the same calculation error that can be observed in the Multisim simulator is given by
the incorrect use of formula (4) and its equivalent transformation according to Ohm's law in [7, p.
4] for calculating the average power of rectangular pulses on a linear resistor:
(
        <xref ref-type="bibr" rid="ref3">3</xref>
        )
      </p>
      <p>
        It should also be noted that formulas similar to (
        <xref ref-type="bibr" rid="ref1">1</xref>
        ) are given in the section on the method of
digitization and power calculation in the review of digital analyzers and meters manufactured by
Yokogawa Corporation, according to which the instantaneous voltage value is multiplied by the
instantaneous current value and then integrated over a certain period [8, pp. 13, 14]. However,
these devices are designed to measure industrial frequency alternating current, and we had neither
the opportunity nor the need to test them, as this is beyond the scope of our work.
      </p>
      <p>
        The reviewed sources do not cover all the areas of electronics in which the formulae (
        <xref ref-type="bibr" rid="ref1">1</xref>
        ) - (5) are
applied. However, they are sufficient to discuss the consequences and causes of the identified
incorrectness in the use of these formulae, which persists to this day.
      </p>
      <p>3.An example of a discrepancy in the results of calculating the
average power of rectangular conduction current pulses using
different formulas
Let us compare the results of the average power calculation using formula (4) and a similar formula
in [7, p. 4] with the results of the calculation according to Ohm's law.</p>
      <p>For this purpose, we will use the voltage and current values measured on the SVC prototype
described in [2] according to the scheme in Figure 2, and the voltage, current and power values
obtained by simulation in Multisim.
where U = 12 V is the amplitude of voltage pulses equal to the voltage of the source Vin.</p>
      <p>As expected, considering the precision of the supply voltage and duty cycle settings and the
measurement accuracy, the measured value of Avg = 6.12 V with an error of 2% corresponds to the
calculated value of Uavg (calc) = 6 V, which was used for further calculations.</p>
      <p>And then, according to Ohm's law, we calculate the average value of the current pulses Iavg (calc),
which flows through the resistor R:</p>
      <p>And from the values of Uavg (calc) and Iavg (calc) calculated in (6) and (7), we find the calculated value
of the average pulse power, which is equal to:
(7)</p>
      <p>The calculations of the average values of voltage and current (6) and (7) are confirmed by
simulation in Multisim, the results of which are shown in Figure 4.</p>
      <p>The value of Pavg (sim) in (9) coincides with the result of the power Pavg (calc) calculated in (8) based
on the average voltage Avg = 6.12 V measured on the SVC prototype, which is shown in Figure 3.</p>
      <p>Instead, the XWM1 wattmeter reading Pavg (XWM1) in Figure 4 is twice as high as the Pavg (calc) result
in (8) and the Pavg (sim) result in (9).</p>
      <p>This reading of Pavg (XWM1) = 725.153 mW from the XWM1 wattmeter coincides with the result of
the average power calculation using formula (4) and the formula (5) for the average power of
positive rectangular pulses in [7, p. 4], and its equivalent transformation according to Ohm's law
based on the amplitude of the voltage U of the pulses:
(9)
(10)</p>
      <p>And on the ammeter U1 we have a current reading Iavg (sim) of 0.06 A, which is equal to the
average current Iavg (calc) calculated in (7).</p>
      <p>Thus, the average value of the power obtained by the simulation is:</p>
      <p>
        Therefore, we have reason to believe that the Multisim software is using formula (
        <xref ref-type="bibr" rid="ref1">1</xref>
        ) in its
original form, or in a writing similar to (4), or in [7, p. 4] as (5), to calculate the readings from the
XWM1 wattmeter, which gives an overestimated result of 0.72 W.
      </p>
      <p>
        4.Discussion of the cause of the discrepancy in the calculation
results and their possible consequences for practice
The formula (
        <xref ref-type="bibr" rid="ref1">1</xref>
        ) is derived in mathematics for functions that are integrated and continuous over
some interval, but their type is not explicitly defined, as for example in [3, pp. 541-552].
      </p>
      <p>Nevertheless, from the descriptions of the formula in known sources, for example [9], it can be
concluded that the scope of its application is limited to elementary functions explicitly defined by a
single formula, the argument of which must be an independent variable.</p>
      <p>
        Furthermore, for practical calculations of physical quantities such as current, voltage and
power, formula (
        <xref ref-type="bibr" rid="ref1">1</xref>
        ) should be used not only according to the rules of mathematics, but also
according to the provisions of the International System of Units (SI) and the International System
of Quantities (ISQ) [10].
      </p>
      <p>They determine seven basic physical quantities: length, mass, time, current, thermodynamic
temperature, amount of matter and light intensity, which cannot be derived from other quantities.
All other physical quantities are derived from the basic ones and are determined from them by
relationship equations that are independent of the units of measurement.</p>
      <p>Obviously, mathematical equivalents of basic physical quantities should be functions that are
not derived from functions describing other quantities. In mathematics, such functions are called
elementary. And for the derivatives of physical quantities, mathematical equivalents in the form of
composite or elementary functions can be used in the equations of relationship.</p>
      <p>Voltage is therefore a derivative of a basic physical quantity and is described as the product of
an elementary function - current - and a constant, which is the value of the active resistance
through which this current flows. In other words, it is described by an elementary function.</p>
      <p>Instead, by definition, power is a composite function of the product of separate elementary
functions - current and voltage. And only for the ease of calculation, it can be reduced to one of
these functions by equivalent transformations using Ohm's law, but not vice versa.</p>
      <p>
        That is, they are related by the logical operation of implication as a basis and a consequence:
So, to calculate the average values of current or voltage described by elementary functions, it is
legitimate to use formulae (
        <xref ref-type="bibr" rid="ref1">1</xref>
        ) - (5), as is the case in [6], as well as in the software of the ammeter
and voltmeter in Multisim, and the DSO2000 oscilloscope for the voltage 'Avg'.
      </p>
      <p>
        Instead, it is incorrect to calculate the average power value, which is a composite function of the
product of current and voltage according to formulae (
        <xref ref-type="bibr" rid="ref1">1</xref>
        ) - (5).
      </p>
      <p>As an illustration of a similar division in the methodology of mathematics, let us consider the
operations of finding the derivatives of elementary and composite functions.</p>
      <p>The derivatives of elementary functions of the form f(x) are defined as the limit of the ratio of
the increment of the function f(x) to the increment of its argument x, which tends to zero (if
such a limit exists).</p>
      <p>And conversely, there is a special rule for finding the derivatives of composite functions of the
form f(g(x)). Namely: the derivative of a composite function is equal to the product of the derivative
of the external function in the intermediate argument and the derivative of the internal function in
the argument x.</p>
      <p>According to this rule, the derivative of the product of functions (u · v) is found by the formula,
in which each function is differentiated separately:
(11)
(12)</p>
      <p>Whereas the direct differentiation of the product (u · v) after performing the operation of
multiplication of the functions (u · v) is incorrect.</p>
      <p>
        Therefore, similar to the rule for differentiating composite functions, the calculation of the
average pulse power, which is a composite function in the form of the product of elementary
voltage and current functions, should not be performed by formula (
        <xref ref-type="bibr" rid="ref1">1</xref>
        ) in the original form or its
form (4) and (5), but by a special formula.
      </p>
      <p>In fact, the average power of rectangular pulses should be calculated not by the first power of
the duty cycle D, as in formulae (4) and (5), but by its square, namely:</p>
      <p>This is exactly what corresponds to the equivalent transformations of formula (11) for
calculating power based on Ohm's law, where D2 is implicitly included through u(t)2 or i(t)2.</p>
      <p>Because the D2 is included in the average power Pavg as a result of the operations with the
average values of current Iavg and voltage Uavg, already calculated by the duty cycle D:
(13)
(14)</p>
      <p>And when we perform calculations for D2 and the amplitude values of the current I and voltage
U using formula (13) and its equivalent transformations based on Ohm's law according to (11), the
result will coincide with the calculations for the average values of the current Iavg and voltage Uavg.</p>
      <p>For example, according to formula (13):
And by formula (14):</p>
      <p>
        Thus, the discrepancy in the results of (8), (9) and (10) is caused by a methodological error,
namely that the pulse power Pi in (
        <xref ref-type="bibr" rid="ref1">1</xref>
        ) - (5) is considered as a basic physical quantity described by an
elementary function, whereas it is a derived quantity described by a composite function.
      </p>
      <p>Hence, the square of the duty cycle D in (13) restores the relationship lost in (4) and (5) to
Ohm's law and the equivalent transformations of the equations for calculating power (11).</p>
      <p>For example, according to (11), halving the current and/or voltage reduces the power by a factor
of four. And according to (13), halving D also reduces the average power by a factor of four,
whereas according to (4) and (5) it only reduces it by a factor of two.</p>
      <p>
        So the relative error Ecalc in the calculation power due to the incorrect use of (
        <xref ref-type="bibr" rid="ref1">1</xref>
        ) - (5) is:
For example, for D = 0.9, the error is:
      </p>
      <p>And for D = 0.5, which is the middle of the range of values most commonly used in practice for
building PWM principle SVCs, it is:
(19)</p>
      <p>The value error Ecalc in (19) corresponds exactly to the discrepancy between the results of
calculations (8) and (9) and calculation (10) and the readings of the XWM1 wattmeter in Figure 4.</p>
      <p>To illustrate one aspect of the practical consequences of the above calculation error, we will use
the preface in [7]. They state: “The power and thermal behavior of fixed linear resistors are mostly
based on DC or RMS loads, but pulse loads, like single energy pulse or a continuous flow of pulses,
become more and more an important factor in professional electronics”.</p>
      <p>And an overestimated result of calculating the power and thermal behavior of resistors will lead
to the choice of a higher resistor power than would otherwise be possible.</p>
      <p>This facilitates the mode of operation of resistors and increases the reliability of electronic
devices.</p>
      <p>That is, in this case, the consequence of an overestimated calculation result can be seen as
'positive'. This is most likely the reason why it has not been paid attention to so far.</p>
      <p>However, in other practical applications, the consequences of this error can be negative. This is
mainly concerned with energy losses, especially in the active resistance of primary power sources
and other SVCs components, as it makes it impossible to accurately evaluate their efficiency.
Consequently, this can slow down their development.
(15)
(16)
(17)
(18)</p>
      <p>At the same time, the existing approach of idealizing the conditions in order to evaluate the
energy accumulation efficiency, for example in capacitors, which is reviewed in [1], leads to the
fact that the shown error has not been detected so far.</p>
      <p>
        This has also been facilitated by the fact that the use of formulae (
        <xref ref-type="bibr" rid="ref1">1</xref>
        ) - (5) is legitimate for
voltage and current, masking the fact that their use is incorrect for power.
      </p>
      <p>
        5.An example of the correct use of the average value formula
according to the type of function describing the physical
quantity being calculated
As an example of how the physical nature of the calculated parameter and the function by which it
is described should correspond to the scope of formula (
        <xref ref-type="bibr" rid="ref1">1</xref>
        ) in its original form and its writing (4), (5)
for applied calculations, we can have a look at the formulas given in [5, p. 6] for calculating the
power and energy of light pulses emitted by a laser.
      </p>
      <p>These formulae are similar to formula (4), (5) and involve calculations using the first power of
the duty cycle D. But in this case, there is no incorrectness in the use of formulas.</p>
      <p>This is because, unlike the impulse power of the conduction current, which is a composite
function of voltage and current product, the impulse power of the main physical quantity SI and
ISQ, the intensity of light, is described by an elementary function of the type f(x).</p>
      <p>The power of light pulses depends on the intensity of the photon flux in a region of space, just
as the power of a current depends on the intensity of the electron flux in an electric circuit.</p>
      <p>But there is a difference between them, namely that the intensity of the flow of electrons
depends on the voltage applied to the same part of the circuit for which the power is calculated.
Therefore, both voltage and current are included in formulae (11) and (14) to calculate the power.</p>
      <p>Instead, the intensity of the photon flux is proportional to the current under the influence of the
voltage applied to the laser working body only during its excitation. And once the photons have
escaped into space outside the laser working body, the effect of this voltage ends. Therefore, this
voltage is not taken into account when calculating the power and energy of laser light pulses,
which are determined solely by the intensity of the photon flux outside the laser working body.</p>
      <p>
        Hence, the average power of light pulses is described by an elementary function whose
argument is the intensity of the photon flux in space, and its calculation should be performed using
formula (
        <xref ref-type="bibr" rid="ref1">1</xref>
        ) in its original form, or its writings for applied calculations, as (4) and (5).
      </p>
      <p>
        6.Proposed formula for calculating the average power of
rectangular conduction current pulses in a linear active
resistance
To correctly apply formula (
        <xref ref-type="bibr" rid="ref1">1</xref>
        ) for composite functions of the form f(g(x)) on some interval [a, b], it
is necessary to consider that they are formed by separate elementary functions of the form f(x).
Therefore, each of these elementary functions must be separately averaged over the interval [a, b].
      </p>
      <p>
        Consequently, for composite functions in the form of a product of elementary functions, an
empirical generalization of the original form of formula (
        <xref ref-type="bibr" rid="ref1">1</xref>
        ) can be proposed as follows:
where n - serial number of the elementary function.
      </p>
      <p>
        Therefore, formula (
        <xref ref-type="bibr" rid="ref1">1</xref>
        ) in its original form, or as it is written for applied calculations in the form
of (4) and (5), is a particular case of (20) for n = 1.
      </p>
      <p>Formula (20) is a generalization of the empirically obtained formula (13). It is applicable to
composite functions which are the product of elementary functions or their higher powers and
rectangular impulses. The work on the justification of the analytically rigorous derivation of
formula (20) is ongoing. It is also likely that other formulae will need to be derived for other
operations on elementary functions or for pulses of other shapes, but that is beyond the scope of
this article.</p>
      <p>And to calculate the average power of rectangular pulses of conduction current, in particular in
the active resistance of batteries, to evaluate the efficiency of SVCs designed according to the PWM
principle, we propose formula (20) in written by (13).</p>
      <p>7.Conclusion
To this day, practical calculations of the average power of rectangular pulses of conduction current
in the active resistance, which is described by a composite function in the form of the product of
voltage and current, are performed using the formula, which in its original form was derived in
mathematics by default for elementary functions.</p>
      <p>As a consequence of such a methodologically incorrect use of this formula, the results of the
average power calculation are overestimated. In some cases, this overestimation does not have
critically negative consequences, as it leads to more cautious than necessary decisions. However, it
may hinder the search for ways to further develop, for example, SVCs based on the PWM principle
or other pulse nodes of robotics, renewable and solar energy sources, etc.</p>
      <p>In order to eliminate the existing methodological incorrectness, a formula is proposed for
calculating the average power of rectangular conduction current pulses, which can also be used for
other parameters described as a product of elementary functions.</p>
      <p>At the same time, the issue of establishing the need for further generalization of the formula for
calculating average values for parameters described by composite functions of all types, or for
deriving separate formulae for specific composite functions and impulses of any shape, not just
rectangular, remains unresolved.</p>
      <p>Declaration on Generative AI
The authors have not employed any Generative AI tools.
[4]Wikipedia, Duty cycle. URL: https://en.wikipedia.org/wiki/Duty_cycle
[5]Pulsed Lasers. Introduction to Power and Energy Calculations. Thorlabs Inc. URL:
https://www.thorlabs.com/images/tabimages/Laser_Pulses_Power_Energy_Equations.pdf
[6]J. Hribik, M. Boriš, P. Fuchs, Average Value Evaluation of the Distorted Pulse Signal, 19th
Symposium IMEKO TC 4 Symposium and 17th IWADC Workshop Advances in
Instrumentation and Sensors Interoperability, July 18-19, 2013, Barcelona, Spain. URL:
https://www.imeko.org/publications/tc4-2013/IMEKO-TC4-2013-032.pdf
[7]Pulse Load Handling for Fixed Linear Resistors, Technical Note, Vishay intertechnology, Inc.</p>
      <p>URL: https://www.vishay.com/docs/28810/pulseloadhandling.pdf
[8]Fundamentals of Electrical Power Measurement, Yokogawa Electric Corporation.</p>
      <p>URL: https://www.snia.org/sites/default/files/Emerald%20Training%20%20Fundamentals%20of%20Electrical%20Power%20Measurement.pdf
[9]E. W. Weisstein, Arithmetic Mean, From MathWorld – A Wolfram Web Resource.</p>
      <p>URL: https://mathworld.wolfram.com/ArithmeticMean.html
[10]ISO 80000-1:2009, Quantities and units – Part 1: General, Switzerland: International
Organization for Standardization.
URL: https://www.iso.org/obp/ui/#iso:std:iso:80000:1:ed-1:v1:en</p>
    </sec>
  </body>
  <back>
    <ref-list>
      <ref id="ref1">
        <mixed-citation>
          [1]
          <string-name>
            <given-names>P.</given-names>
            <surname>Bratiuk</surname>
          </string-name>
          ,
          <string-name>
            <given-names>L.</given-names>
            <surname>Ozirkovskyi</surname>
          </string-name>
          ,
          <article-title>A controversial aspect of the theory of assessment and practice of measuring the efficiency of energy accumulation in reactive components of switching voltage converters, Proceedings of the II International scientific and practical conference Information and measuring technologies</article-title>
          , ІVT-2024, Lviv Polytechnic Publishing House, Lviv,
          <year>2024</year>
          , p.p.
          <fpage>85</fpage>
          -
          <lpage>86</lpage>
          . URL: https://science.lpnu.ua/ivt-2024
          <source>/proceedings</source>
        </mixed-citation>
      </ref>
      <ref id="ref2">
        <mixed-citation>
          [2]
          <string-name>
            <given-names>P.</given-names>
            <surname>Bratiuk</surname>
          </string-name>
          , L. Ozirkovskyi,
          <article-title>Method of increasing efficiency, mean of control and tool of analysis of the use energy of power source pulse laser range finder</article-title>
          ,
          <source>Automation of Technological and Business Processes</source>
          ,
          <volume>15</volume>
          (
          <issue>3</issue>
          ),
          <year>2023</year>
          ,
          <fpage>9</fpage>
          -
          <lpage>19</lpage>
          . URL: https://doi.org/10.15673/atbp.v15i3.
          <fpage>2620</fpage>
        </mixed-citation>
      </ref>
      <ref id="ref3">
        <mixed-citation>
          [3]
          <string-name>
            <given-names>E.</given-names>
            <surname>Herman</surname>
          </string-name>
          , G. Strang, Calculus, Volume
          <volume>1</volume>
          ,
          <issue>OpenStax</issue>
          , Rice University, Houston,
          <year>2016</year>
          . URL: https://openstax.org/details/books/calculus-volume-
          <volume>1</volume>
        </mixed-citation>
      </ref>
    </ref-list>
  </back>
</article>