Skip to main content
hexfet13
Associate II
April 24, 2018
Question

Delta to WYE three phase voltages conversion

  • April 24, 2018
  • 5 replies
  • 1253 views
Posted on April 24, 2018 at 12:36

Hello to all,

I'm here to ask a question about the energy meter I've developed.

The problem concerns the 3P3W system (neutral line not available).

In this case i can measure two line to line voltages and the phase between them to reconstruct the ideal 3 vectors system(with a ideal phase of 120° between phases).

The main problem is that the alghorithm i developed is too slow on an stm32 M4 @80Mz: in a worst case it takes about 60ms to find the 3 vectors who generate the aquired two line to line voltage measurements and their phase displacement (with an

acceptable error)

.

I searched a lot without founding a method to reconstruct  3P4W from a 3P3W system(unbalanced); the uniqe useful documents i've found is this one: Calculating Line-to-Line Voltages from Line-to-Neutral Measurements with the NI 9225 - National Instruments

and is the same method i developed to construct my slow algorithm(it does a convergence to find the solution to the problem)

The question is: there's somewhere a relation or a library already developed than convert a DELTA three phase system to WYE ones just passing 2 vectors and the phase displacement?

Thanks!
    This topic has been closed for replies.

    5 replies

    AvaTar
    Senior III
    April 24, 2018
    Posted on April 24, 2018 at 13:03

    The main problem is that the alghorithm i developed is too slow on an stm32 M4 @80Mz: in a worst case it takes about 60ms to find the 3 vectors who generate the aquired two line to line voltage measurements and their phase displacement (with an

    acceptable error)

    .

    What does this algorithm consist of ?

    A Cortex M4 @ 80MHz can do an awful lot of stuff.

    Do you use double variables ?

    Do you use trigonometric functions (sin, cos), perhaps in double precision ?

    hexfet13
    hexfet13Author
    Associate II
    April 24, 2018
    Posted on April 24, 2018 at 14:36

    This alghoritm simply scan an angle from 0 to INPUT_FI and calculate the three vetctor as described inthe nationalinstruments papes; then search for that computation that has a minimum error (error related to the two argument passed, the two know data voltage magnitude of line-to-line voltage)

    I use float varialble

    There are multiple trigonometric functions for each cycle(and there are hundreds of cycles): 3 tan, several sqrt, sums divisions and multiply operations.

    Thanks

    AvaTar
    Senior III
    April 24, 2018
    Posted on April 24, 2018 at 14:47

    I would suggest to investigate where exactly most runtime is spent.

    Either with profiling support of your toolchain, or with GPIO pins and a scope.

    I use float varialble

    And have all floating point literals a size specifier ('f') ?

    ... several sqrt, sums divisions and multiply operations.

    This is native supported by the FPU (double-check you actually use the FPU ...).

    There are multiple trigonometric functions for each cycle ... : 3 tan ...

    These are not.

    A customized lookup table approach would speed up calculations.

    For comparision: an optimized float CFFT, using ARMs DSP library, achieves 5ms for a blocksize of 2048.

    hexfet13
    hexfet13Author
    Associate II
    April 25, 2018
    Posted on April 25, 2018 at 15:48

    Hi,

    i will try within few days to compare the speed after a lookup table implementation of the tangent function.

    Thanks!

    AvaTar
    Senior III
    April 25, 2018
    Posted on April 25, 2018 at 16:17

    Don't know your code, but try not to fix a problem that doesn't exist.

    I mean, make sure to first identify where most of the time is really spent.