LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Need Help on How to creating Park transformation using MathScript Node?

Solved!
Go to solution

Hi,

I want to generate a Park transformation using MathScript Node. But there is an error message which confusing me. Please anyone can help me to take a look of my program? Thanks!

 

The error message is "Error -90011 occurred at Error in function mtimes at line 1.  The sizes of the input matrices are incompatible.
 Verify that the matrices have the same size or that one is a scalar.

Possible reason(s):

LabVIEW:  The sizes of the input matrices are incompatible.  Verify that the matrices have the same size or that one is a scalar."

0 Kudos
Message 1 of 4
(3,018 Views)
Solution
Accepted by topic author spwm
Hello,

The problem is that all of your inputs to the MathScript node are vectors.  All vector inputs to the MathScript node become row vectors.  A multiplication of two row vectors produces a dimension mismatch error.  If you really intend to output a scalar from this multiplication (by computing the vector inner product), then you need to transpose either your 'a,' 'b,' and 'c' vectors or your 'x' vector.  If you simply want to multiply your vectors elementwise and produce a vector output, then you need to use the elementwise multiplication operator '.*' (dot times).  Use this operator between your 'a,' 'b,' and 'c' vectors and your sin computation.  For example, on your first line,
d = (2/3)*a.*(sin(x))+(2/3)*b.*(sin(x-(2*pi/3)))+(2/3)*c.*(sin(x+(2*pi/3)));

Remember to also change your output variables to a 1D array of DBL.  You can do this by right clicking on the output variable and selecting "Choose Data Type."

Grant M.
Staff Software Engineer | LabVIEW Math & Signal Processing | National Instruments
Message 2 of 4
(3,004 Views)
Thank you for your help! I understand now.
0 Kudos
Message 3 of 4
(2,999 Views)

The inputs to a,b,c in that math script node is data acquired from three stator currents.but what ll be the input that should be practically given to that x(theta) in mathsript node in the program parktransform.vi

0 Kudos
Message 4 of 4
(2,679 Views)