In the second video of the AC power series the basic mathematics behind calculating the root-mean-squared (RMS) value is being explained step-by-step. Furthermore, the process is also shown in form of a Python 3 code run inside a Jupyter notebook. First we describe the general formula for a sinusoidal function, and this is being implemented for 230V AC voltage, having a value of the peak amplitude of about 325V.
For simplicity the code does not contain Numpy arrays, vectorized operations, Pandas, or even Python list comprehensions. This is done on purpose so that people who are more familiar with other programming languages like Java, Fortran90, C or Matlab can also follow the discussion. When it comes to the description of the sine wave, the phase factor is also being neglected to simplify the problem.
After we describe the AC sinusoidal voltage in our Python code, next we implement the algorithm of computing the root-mean-squared RMS value for a given voltage source. As input data points we use the sinusoidal 230V AC, and the evaluation of the RMS value is presented in detail.
Throughout the Jupyter notebook the divisions are assumed to be run as floating point divisions, which is the default for Python version 3. Thus, the same code would need to be changed accordingly when it is run in Python version 2, since the later does integer division.
Due to its nature, this video might be more interesting for students studying electronic engineering, and for people who were wondering about how an RMS value is being calculated.
In the following part we discuss how is the RMS calculation being implemented in so called True RMS DMM digital multimeters, and how does the chaper so called averaging multimeter compare to the True RMS multimeter.