Sorry, it's not a DLL (Why would you want a DLL anyway?), but I hope it works for you.
Two functions are important, they are in the collapsed area at the top:
phasor(V,Fs,fS,h) which takes a vector of signal sample values from a single phase signal and computes the phasor data from it as a complex number. It needs the sampling frequency fS, at which the data was sampled and the (base) frequency at which the signal is periodic (Generally that would be 50 Hz in your case). It will output the phasor as a complex number for the harmonic h you specify. h=0 designates the base frequency (50 Hz ?), h=1 is the 1st harmonic (100 Hz..) etc.
Fortescue(V) computes all Fortescue transforms from a vector of 3 phasors and outputs them in a 3x3 matrix.
Then there is a small utility function v_(V), to plot a vector (or complex number) as a line starting from the origin.
See the file (Prime4) for an example.
I hope it runs for you without errors.
(It was developed in Prime express, with my own implementations of dft(), Re(), Im(), and arg().)
Success!
Luc
Hi,
Look at this web page. Has simple matrix equations for Fortescue Transformations.
https://au.mathworks.com/help/physmod/sps/ref/symmetricalcomponentstransform.html
Cheers
Terry
The following listing with examples in Mathcad may also be useful to you.
Sorry, it's not a DLL (Why would you want a DLL anyway?), but I hope it works for you.
Two functions are important, they are in the collapsed area at the top:
phasor(V,Fs,fS,h) which takes a vector of signal sample values from a single phase signal and computes the phasor data from it as a complex number. It needs the sampling frequency fS, at which the data was sampled and the (base) frequency at which the signal is periodic (Generally that would be 50 Hz in your case). It will output the phasor as a complex number for the harmonic h you specify. h=0 designates the base frequency (50 Hz ?), h=1 is the 1st harmonic (100 Hz..) etc.
Fortescue(V) computes all Fortescue transforms from a vector of 3 phasors and outputs them in a 3x3 matrix.
Then there is a small utility function v_(V), to plot a vector (or complex number) as a line starting from the origin.
See the file (Prime4) for an example.
I hope it runs for you without errors.
(It was developed in Prime express, with my own implementations of dft(), Re(), Im(), and arg().)
Success!
Luc
Thanks. That's sort of what I do now with the calc in a locked area. Locked areas cause problems when converting files as they have to be unlocked. But maybe DLLs in different versions will also be an issue. Your solution will work fine for me - I'll just leave all calculations unlocked - the problem is people "fiddle" with it!