From Friday, April 19th (11:00 PM CDT) through Saturday, April 20th (2:00 PM CDT), 2024, ni.com will undergo system upgrades that may result in temporary service interruption.

We appreciate your patience as we improve our online experience.

LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

calculate symmetrical components of voltage and current

Solved!
Go to solution

Hi, all. i am working on the calculation of symmetrical components of voltage and current in Labview. I have attached the relationship between symmetrical component and sequence voltage as picture 1. I will use this calculation for several times, so I wonder if anyone have some better ideas bc so far I just wired so many things together to realize the expression. It looks aweful. Any suggestion? such as built-in function to realize this function? thanks   

0 Kudos
Message 1 of 8
(3,198 Views)

It is hard to suggest something better when you haven't shown us what you have now.

 

It looks like math on matrices.  So look at the matrix functions in the Arrays >> Matrix functions and the Mathematics >> Linear Algebra palettes.

0 Kudos
Message 2 of 8
(3,181 Views)

Hi, Ravensfan, thank you for your reply. here is my method to solve the caculation of the symmetrical components, it looks so huge, i really want something to be very tiny and clean. Thanks 

0 Kudos
Message 3 of 8
(3,160 Views)

Learn to use subVIs. For example you do the same calculation twice on different data. If you make a subVI of the core part of the calculation, then you just drop two copies of the subVI on your diagram.

 

Also, you may be able to simplify things further by using arrays. The three inputs and the three ouputs could be elements of arrays so you would only need one control and one indicator on the panel of youy subVI.  Some of the Adds, the final Multiply, and the Z to R, Theta all will work on arrays.

 

An additional advantage - and one that is more important than the cosmetic issue you raised - is that is is easier to test the subVI separately and if you find an error or ever need to change the calculation, you only need to make the change and verify it in one place.

 

Lynn

0 Kudos
Message 4 of 8
(3,153 Views)

Hi, Lynn, I wrote another code by using the matrix computation. it didn't seem to be easaier. Maybe bc there is a lot of calculations, so it got to be huge. 

0 Kudos
Message 5 of 8
(3,147 Views)

Please attach the actual VIs instead of pictures. Thanks! 😄

0 Kudos
Message 6 of 8
(3,141 Views)

@acewong7 wrote:

Hi, Lynn, I wrote another code by using the matrix computation. it didn't seem to be easaier. Maybe bc there is a lot of calculations, so it got to be huge. 


As Lynn already said, you can use the operations from the linear algebra palette. Most take complex arrays directly and will do most of your needs in few operations.

0 Kudos
Message 7 of 8
(3,134 Views)
Solution
Accepted by topic author acewong7

Let's look at your formula (you don't say what's complex, etc., so modify as needed)

 

 

 

For example here's how you would create the A matrix from a given alpha.

 

 

Similarly, you can create the A^(-1) matrix (your definition of A and A^(-1) seem inconsistent, else you could just take the matrix inverse of A). After that, you can multiply with you V123 vector using AxB.

 

0 Kudos
Message 8 of 8
(3,125 Views)