Phase Difference Measurement

      After the timer 1 is stopped, the value TCNT1 immediately saved to memory. Furthermore, the timer run again for detecting the phase difference. This timer is run in CTC mode (Clear Timer on Compare Match), which means the timer will be reset when the count equals to the OCR1 register value. OCR1 value assigned half of the value of the first count results as Equation 1.

 
    (Eq. 1)
 

     This timer will be stopped again when the voltage value v1' move to rise above 2.5 V as Figure 3. To be able to detect v1’, just after the timer run again, the ADC input multiplexer is changed to channel 2.  This timer will count for the duration of time °Δt2. In theory, the phase difference (θ) for the case that the current lags behind the grid voltage is calculated using Equation 2.
    (Eq. 2)


Figure 3
     In  the program, TCNT11 is the result of a count by the timer during t1, TCNT12 is the result of a count by the timer during t2, and calculating the phase angle difference following the Equation 3. 
 
   (Eq. 3)
 

     The equation above can not be applied to cases that current precedes the grid voltage. In this case, the timer run until at v1' move falls below 2.5 V as Figure 4. Calculating the phase difference following the Equation 4.
    (Eq. 4)

Figure 4
     In  the program, TCNT11 is the result of a count by the timer during t1, TCNT12 is the result of a count by the timer during t2, and calculating the phase angle difference following the Equation 5.


    (Eq. 5)
      Since the equation for calculating the phase difference in the case where the current lagging against grid voltage and currents precede the grid voltage is different, then there must be an algorithm that can check the occurrence of such current. For that, after the timer is run a second time, the microcontroller immediately check the voltage at v1'. If
Δt2 starts with the value of voltage is less than 2.5 V as Figure 3, the current lags behind voltage considered.  Phase difference calculation was done using Equation 3. However, if Δt2 begins with a voltage value equal to or greater than 2.5 V as Figure 4, it is considered current precedes the voltage. Phase difference calculation was done using Equation 5.
Special cases the use of Equation 5 occurs when the current in phase with voltage.  This case resembles the illustration in Figure 4, voltage value slightly more than 2.5 V. In this case, the value of Δt2 will be equal to Δt1/2, so that according to Equation 5, the value of phase difference θ = 0.



The Need for Phase Difference Measuring Instrument
Measure the Frequency of Grid Voltage rather than Measure the Frequency of Current
Voltage and Current Converter
The Signal Conditioning
The use of the microcontroller ADC
Frequency Measurement

Output Display Format

No comments:

Post a Comment