LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

How to denormalize a normalized vector in LabVIEW

Solved!
Go to solution

Hello,

I use the Normalize node to normalize a list of numbers and then to do some mathematical processing.

Now I would like to convert back to the unnormalized numbers after the processing.

I could not find a node to do this automatically.

Any ideas?

0 Kudos
Message 1 of 9
(2,877 Views)

Hi ziedhosni,

 


@ziedhosni wrote:

I use the Normalize node to normalize a list of numbers and then to do some mathematical processing.

Now I would like to convert back to the unnormalized numbers after the processing.


Can you provide the mathematical formula for that denormalize calculation of "unnormalized numbers"?

Best regards,
GerdW


using LV2016/2019/2021 on Win10/11+cRIO, TestStand2016/2019
0 Kudos
Message 2 of 9
(2,875 Views)

Just use the number you had before you used the Normalize node, you already have the values no need to "unnormalize".

 

Ben64

0 Kudos
Message 3 of 9
(2,869 Views)

@ziedhosni wrote:

Hello,

I use the Normalize node to normalize a list of numbers and then to do some mathematical processing.

Now I would like to convert back to the unnormalized numbers after the processing.

I could not find a node to do this automatically.

Any ideas?


are you using this:

https://zone.ni.com/reference/en-XX/help/371361R-01/lvanls/normalize/

 

or that:

https://zone.ni.com/reference/en-XX/help/371361R-01/lvanls/scale/

 

?

0 Kudos
Message 4 of 9
(2,842 Views)

I need the unormalized values after the mathematical processing.

The vector contains a subset of a range [-180,180] and a subset of [1.2,1.6].

I would like to add +x lets say +0.5 to the normalised full set ranging [-1,1].

 

Adding +0.5 to all original unnormalised values will not have the same effect as when I used the normalization.

0 Kudos
Message 5 of 9
(2,840 Views)
0 Kudos
Message 6 of 9
(2,839 Views)

Hi ziedhosni,

 


@ziedhosni wrote:

I need the unormalized values after the mathematical processing.

The vector contains a subset of a range [-180,180] and a subset of [1.2,1.6].

I would like to add +x lets say +0.5 to the normalised full set ranging [-1,1].


Can you provide an example VI containing your example data?

It is not clear (to me) how all those ranges fit together (-180…180, 1.2…1.6, -1…1)…

Best regards,
GerdW


using LV2016/2019/2021 on Win10/11+cRIO, TestStand2016/2019
0 Kudos
Message 7 of 9
(2,822 Views)

Here is an example snippet of what I would like to run.

normalize.png

0 Kudos
Message 8 of 9
(2,791 Views)
Solution
Accepted by topic author ziedhosni

If you read the Help for the Normalize function, it tells you exactly what computation it performs to do the normalization, which involves computing the mean and standard deviation of the original data, then "normalizing" using these two quantities.  It does this by subtracting the mean and dividing by the standard deviation.

 

If you retain the original mean and s.d., you can easily reverse the process -- multiply your normalized values by the standard deviation and add back the original mean.

 

Please read the LabVIEW Help.

 

Bob Schor

 

P.S. -- I hope you understand "what you are doing".  I'm suspicious of a data set that is described as -180 .. 180, as it sounds like "polar angles" for which "taking the mean" might not make sense!  There are ways to treat "direction data", but this is something of a specialized topic.

Message 9 of 9
(2,778 Views)