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: 

Speed up plotting load-pull power contours

Hello Everybody, 

I am using the  attached VI  to plot the load-pull power contours, it works fine but I have speed issue. actually when I used to many points to pot the contours, the VI  will consume so long time which is in the attached example about 9 seconds. 

 

Could you help me regrading this matter, I will really appreciate that, I am not sure if there is another way to implement that or may be there is an official VI to plot the power contours faster than this one.  

 

 

Thank you in advance for your attention

best Regards

Thoalfukar

0 Kudos
Message 1 of 17
(3,103 Views)

I wish if there is someone could help with this

0 Kudos
Message 2 of 17
(3,055 Views)

Well, the interpolation step (Interpolate 2D scattered.vi) takes the major part of the execution time. You can get a slight speed up, if you turn off debugging for your VI (I got 7 sec execution time instead of 9 sec).

Some relevant discussion is here (they declined the idea, did not get enough votes in 3 years):

https://forums.ni.com/t5/LabVIEW-Idea-Exchange/Improve-Interpolate-2D-Scattered-performance-with-int...

I guess it would be possible to program your own interpolation algorithm to gain some speed, but if you have large amount of data, it will eat execution time anyway...

 

I guess if altenbach or another "optimization guru" jump in the discussion, you will get some better advise than I can offer...

0 Kudos
Message 3 of 17
(3,054 Views)

Thanks for your kind reply, as you said I will be waiting for someone may have a solution for that..... Actually this problem stop me from automated the measurement I want.

0 Kudos
Message 4 of 17
(3,045 Views)

If you don't duplicate the data and use only 300 points, it is about 5x faster. Not sure if this is how the algorithm scales or if duplicate data adds more processing.

 

Let's look at the original data. you only have 300 (or 600 when duplicated) points arranged in a pretty nice spiral. The data is relatively sparse and no amount of gridding and interpolations will add anything more interesting, you actually might introduce artifacts instead. Your contours show ragged details not supported by the data at all. Certainly not contours with so many dense points.

 

Are the xy points always arranged in a similar way? (~20 points/turn). I have some ideas how to generate "reasonable" contours with little effort. I'll have a look.

0 Kudos
Message 5 of 17
(3,042 Views)

Thanks for your kind reply

 

ok , actually I need more than 600 point to plot an accurate contours, and if you ask why I duplicate the data is just because I wanted to shows the problem. I did not have much data when I uploaded the file. 

the goal from using to much data is to plot an accurate contours so whenever there is a way to plot an accurate data without having many points it would be perfect. I saw when I use 300 points it would not be as we want. 

0 Kudos
Message 6 of 17
(3,031 Views)

Are the xy points always on a spiral approximately centered on the minimum? As long as you work with the points you have, event f there are 3000, it will compute the contours in microseconds if done right. Do not generate gigantic amounts of fake data that needs to be reprocessed at great costs.

 

Here's a quick example with your 300 points assuming 20 points/turn. It would be easy to remap the data differently as the situation changes, but this should get you some ideas. For all practical purpose, it returns the same result (possibly with fewer artifacts :D)

 

See if this gives you some ideas.

 

Here's is the result compared to your result. (Colored are mine, Grey are yours)

SpiralToCoontour.png

 

 

 

 

Message 7 of 17
(3,029 Views)
Thanks for your reply, I tried to understand what you have sent me. I don't know why this one would not work with another set of data. please see the attached file I included new set of data to show the problem.
0 Kudos
Message 8 of 17
(3,013 Views)

DO NOT EVER ATTACH A MODIFIED COPY OF MY OWN VI AND GIVE IT THE SAME FILE NAME. THAT IS VERY DISRESPECTFUL! If it is a different file, it needs a new name!

 

(Now your data is no longer an inward spiral, so you would need to change a few things. See how far you get.)

0 Kudos
Message 9 of 17
(2,992 Views)

Sorry for that really, I didn’t  know about that before. 

 

Regarding the code, I thought the problem is not only with the spiral, because if you change the points / turn in your code you would see sometimes messy contours. 

 

Its amazing how fast can plot the contours comparing to my old code but I trying to understand how can I make it valid for every type and number of data. 

 

This would change alot in my system. 

 

 

 

0 Kudos
Message 10 of 17
(2,979 Views)