{
 "cells": [
  {
   "cell_type": "markdown",
   "metadata": {},
   "source": [
    "# Average Power, Apparent Power, and Power Factor for Sinusoidal Excitation\n",
    "Ig $v(t) = V_m cos(\\omega t)$, then then because we have a non-linear impedance, $i(t) = \\sum c_n cos(n \\omega t + \\phi_n)$.  The cause of harmonics can be seen if we take a simple I-V curve that has clipping for the current.  You can write the current as a power series (using Taylor's work), and from that you can see how it is the same as a Fourier series with harmonics caused by the clipping.  The resulting waveform is periodic, but now has frequency components at $n\\omega$.  ![Cause of Harmonics](Cause_of_Harmonics.png)\n",
    "\").\n"
   ]
  },
  {
   "cell_type": "markdown",
   "metadata": {},
   "source": [
    "In the linear load situation, $\\bar V = V_m$ and $\\bar I = V_m/(|Z|e^{j\\theta})$ where $\\theta$ is the angle of the impedance.  Remember that the root mean square concept allowed you to say $$P=V_{rms} I_{rms} cos(\\theta) =1/2V_m V_m/|Z| cos(-\\theta) = Re[\\mathbf S]$$  From Circuits you remember with the linear load, you have:"
   ]
  },
  {
   "cell_type": "markdown",
   "metadata": {},
   "source": [
    "$$I_m = V_m/|Z|$$  The complex power was $\\mathbf S$.  The magnitude of the complex power is the apparanent power,$S$.  \n",
    "$$|\\mathbf S|=S=1/2V_m I_m = V_{rms} I_{rms}$$ \n",
    "$$P=1/2V_m I_m cos(\\theta)=V_{rms} I_{rms} cos(\\theta)$$\n",
    "$$p.f. = cos(\\theta) =1/2V_mI_m/S = P/S$$"
   ]
  },
  {
   "cell_type": "markdown",
   "metadata": {},
   "source": [
    "For the non-linear load, we use the definition for the power factor: $$ p.f. = P/S$$"
   ]
  },
  {
   "cell_type": "markdown",
   "metadata": {},
   "source": [
    "where $P$ is the power in the fundamental.  Note that average power in other frequencies is zero.  The voltage of the fundamental multiplied by the current of a harmonic aerages to zero, because $$\\int_T cos(2\\pi t/T) cos(2\\pi n t/T + \\phi_n) dt = 0$$"
   ]
  },
  {
   "cell_type": "markdown",
   "metadata": {},
   "source": [
    "For example, ask Wolfram alpha, and get this: ![Wolfram thinks it is zero](harmonic_power_zero.png) Thus the power in the harmonics is reactive power.  \n",
    "It is reflected back and forth between the source and load, and reduces the power factor.  There is a more complete write up, see [this.](https://www.a-eberle.de/sites/default/files/media/I022-1-D-1-001-04_Infobrief%20Nr%2022-EN.pdf)"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": null,
   "metadata": {},
   "outputs": [],
   "source": []
  }
 ],
 "metadata": {
  "kernelspec": {
   "display_name": "Python 3",
   "language": "python",
   "name": "python3"
  },
  "language_info": {
   "codemirror_mode": {
    "name": "ipython",
    "version": 3
   },
   "file_extension": ".py",
   "mimetype": "text/x-python",
   "name": "python",
   "nbconvert_exporter": "python",
   "pygments_lexer": "ipython3",
   "version": "3.8.2"
  }
 },
 "nbformat": 4,
 "nbformat_minor": 4
}
