Showing results for 
Search instead for 
Did you mean: 

Space Vector PWM Labview (3-ph)

Go to solution




I am actually trying the matrix methods since its easy to follow.


however, i would like to know if its possible to put changing values in the matrices. I want to put (sin and cosine values in the matrices, the angle is the control knob with 360dg limit.
how to wire the matrices so that you can connect variable values to each row or column.


I wonder if its possible using labview.




0 Kudos
Message 11 of 18
Accepted by topic author jackferz

Hi jackferz, 


Yes you can continuously change your matrix using a "Set Matrix Elements" block, which is located on the Matrix Palette. You can input your angle control into the "new element" terminal and your angle matrix into the "matrix" input. If you want to output to the same matrix, you can just create a local variable of the angle matrix and connect that to the "output matrix" output terminal. You can also need to specify which matrix element (the row and column) that you want to modify. Hope this helps! 

Julianne K
Systems Engineer, Embedded Systems
Certified LabVIEW Architect, Certified LabVIEW Embedded Systems Developer
National Instruments
0 Kudos
Message 12 of 18

Thanks for that. It was quite helpful.

Is there a possibilty if one can convert the decimal to Fractional form e.g. if i want to convert 0.33 to 1/3.

Secondly, i am no clear how to plot x axis waveform chart in terms of 360 degrees. e.g. 60, 120, .... 360.



0 Kudos
Message 13 of 18

Hello jackferz,


There is a Number to Fractional String vi, and then a Fract/Exp String to Number vi so playing around with those should get the result you seek.


So you're working with just a regular waveform chart, correct? I see on previous posts Julianne showed how to set the x axis to be a function of frequency. As of right now, I don't think it's possible to set the x-axis to be anything other than a manipulation of time, but I'll look into it more closely. Would it be feasible for you to just use the conversion 180/pi?



Deborah Y.

Deborah Burke
NI Hardware and Drivers Product Manager
Certified LabVIEW Architect
0 Kudos
Message 14 of 18

I am workign with wavefomr chart. But i assume there must be some kind of plot where x axis can be define in such a manner, 60, 120, 180, ....300, 360.


basically i am working with Compass Plot VI which has 360degress values. I want my waveform graph or chart, basically to have same 360 values limit in X axis of the plot so that i can plot sinusoidal signals. But the plot must be in above mentioned sequence.


Secondly, ur suggestion to use number to fraction and then Fraction to number, is that going to convert the decimal to fraction form. I basically want to feed the fractional format in the matrix array. For example instead of manually putting 0.33 in the matrix array, is it possible to put 1/3 which means i need the expression to be in fractional form and all the results should be in fractional form. If this is not achievable i will stick to the decimal number. Just curious to know if there was an easy way to do this. Do you have any example to show me.



0 Kudos
Message 15 of 18

Hello Jackferz,


If you go into the properties of an XY graph, you can change the name from time to angle and then instead of autoscale, set the minimum and maximum values (here 0-360). Using the chart property nodes you can then select the specific tick marks to be constant (60, 120, etc.). Have you tried just making those scale changes yet? If that doesn't work wit the inputted data, it may mean only functions of time are an option. If you choose the graph functionality and not the chart, the values will write over each other cycling through the angles each time. Also, just for future reference have you seen the functionality of the polar plot and/or this example? This might just be something to consider along with this community example that shows how to center the Compass plot.


Yes, you should stick with the decimal format and then if you do any post-processing on the data outside of LabVIEW you could convert to fraction there. To do it in the code you'd first have to determine if it's repeating or not, multiply by 1000, find the lowest possible denominator, etc. which may take more than it's worth.



Deborah Y.

Deborah Burke
NI Hardware and Drivers Product Manager
Certified LabVIEW Architect
0 Kudos
Message 16 of 18

Hi all,

I think the similar project that I am doing now, except I need to apply FPGA, and acquired the vector data from FIFO of FPGA.


Therefore, I need to compile VI under the target rather than MY COMPUTER. In this case, it seems that the compass plot could not be used anymore, so is there


anyother alternative way for displaying the space vector which received from FIFO?


I am totally a beginner on labVIEW and FPGA.

Thanks a lot!


0 Kudos
Message 17 of 18

Hi Sam,


Most of what has been explained on this forum is not applicable until you are able to get the data from your FPGA. Depending on your FPGA target you will either be passing from the FPGA to the Real Time OS or the Windows PC. If you comment with which FPGA product you are working with I will be able to explain in a bit more detail. Either way you will be using a DMA FIFO to transfer the data and once the data is to your Windows Operating system the rest of what is listed here should be enough to get everything working. You did mention that you are receiving data from a FIFO; does that mean that you already have the DMA FIFO setup? 


More information on DMA FIFOs:

Patrick H | National Instruments | Software Engineer
0 Kudos
Message 18 of 18