05-14-2025 12:37 PM
Hi altenbach,
This is a cool solution to my problem, although the nonlinear model of the curves I generate, comes from quite a variety of different sources, like BJT, JFET and MOS and the I-V characteristics of those transistors are piecewise-defined functions, with different behavior in each region so it makes it hard to do define a correct nonlinear model.
So I'm trying to get around by finding a way to an classical approach of averaging the data, is there some resources about it in the forum?
Thank you sincerely,
Wen
05-14-2025 01:46 PM
This is a very simplistic way to average before plot. To every point, grag a subarray and average the data. Then plot XY.
05-14-2025 03:15 PM
@Whens_Wens_Day wrote:
Hi,
Cordm's solution looks amazing but I don't really understand your data flow.
What are the inputs for the sum_grid_values? And the cluster of arrays you introduce in Inicialize array is the sorted and deduplicated X values? And the other 2 inputs? Can I have a look of the vi?
Wen
The input tunnels from top to bottom are x, y, {sum, n} cluster array for summing y values for the same x, and the x-grid. Look at the wires with probes to see what is going on.
Threshold 1D array finds the closest match to the x-value on the grid, which is used to index into the summation array.
The LV 2019 version includes the map version, the LV2012 version does not.
05-14-2025 05:39 PM - edited 05-14-2025 05:48 PM
@Whens_Wens_Day wrote:
This is a cool solution to my problem, although the nonlinear model of the curves I generate, comes from quite a variety of different sources, like BJT, JFET and MOS and the I-V characteristics of those transistors are piecewise-defined functions, with different behavior in each region so it makes it hard to do define a correct nonlinear model.
A polynomial of sufficient order as shown can fit anything and does not need any theory.
You can create a VI that uses different nonlinear models based on the input. Right now, all you do is cosmetics. A real model would provide you with relevant parameters that have meaning!
("Piecewise" in nature is rare. Often a suitable model can do all regions at once. Your problem is that both x and y are quite noisy and fitting typically assumes noiseless x)