A light-emitting diode lighting unit incorporating a power harmonics correction circuit comprising a first node; a second node; a first current path extending from the first node to the second node; a second current path extending from the first node to ground; a third current path extending from the first node to the second node; a sense resistor electrically connected to the second node and to ground, wherein the voltage across the sense resistor has a waveform whose shape and phase represent the shape and phase of the waveform of a current on the first current path; a differential circuit comprising a first input, a second input, and an output, wherein the first input is electrically connected to the second current path and the second input is electrically connected to the sense resistor; and a transistor comprising a gate that is electrically connected to the output of the differential circuit, a drain that is electrically connected to the third current path, and a source that is electrically connected along the third current path so that transistor provides feedback to the second input of the differential circuit; wherein, during operation of the power harmonics correction circuit, when the current waveform changes, the change is reflected as a voltage change at the first input of the differential circuit; the differential circuit is configured to drive the transistor so as to equalize the voltage at the first and second inputs, resulting in a current waveform whose phase and shape are matched to that of the voltage waveform; and wherein the power harmonics correction circuit further comprises a first divider resistor electrically connected along the second current path and a second divider resistor electrically connected along the second current path, a third node being defined between the first and second resistors, wherein the first input of the differential circuit is electrically connected to the third node. a first node; a second node; a first current path extending from the first node to the second node; a second current path extending from the first node to ground; a third current path extending from the first node to the second node; a sense resistor electrically connected to the second node and to ground, wherein the voltage across the sense resistor has a waveform whose shape and phase represent the shape and phase of the waveform of a current on the first current path; a differential circuit comprising a first input, a second input, and an output, wherein the first input is electrically connected to the second current path and the second input is electrically connected to the sense resistor; and a transistor comprising a gate that is electrically connected to the output of the differential circuit, a drain that is electrically connected to the third current path, and a source that is electrically connected along the third current path so that transistor provides feedback to the second input of the differential circuit; wherein, during operation of the power harmonics correction circuit, when the current waveform changes, the change is reflected as a voltage change at the first input of the differential circuit; the differential circuit is configured to drive the transistor so as to equalize the voltage at the first and second inputs, resulting in a current waveform whose phase and shape are matched to that of the voltage waveform; and wherein the power harmonics correction circuit further comprises a first divider resistor electrically connected along the second current path and a second divider resistor electrically connected along the second current path, a third node being defined between the first and second resistors, wherein the first input of the differential circuit is electrically connected to the third node. when the current waveform changes, the change is reflected as a voltage change at the first input of the differential circuit; the differential circuit is configured to drive the transistor so as to equalize the voltage at the first and second inputs, resulting in a current waveform whose phase and shape are matched to that of the voltage waveform; and wherein the power harmonics correction circuit further comprises a first divider resistor electrically connected along the second current path and a second divider resistor electrically connected along the second current path, a third node being defined between the first and second resistors, wherein the first input of the differential circuit is electrically connected to the third node.