Solved Pressure to volume calculation, piecewise-LIN
-
I have a pressure transducer generating an analog signal which in turn generates a signal (integer between 0-32767). The transducer measures the pressure in the bottom of an irregularly shaped vessel and thus I can't use a formula to calculate volume. The medium I which to measure the volume of is water.
I have a table (also known as a map) with integers and corresponding volume levels and now I need to do a piecewise linear interpolation of the signal. I could only find the LIN-block but I would need a piecewise-LIN-block. I began using the REL-block together with SSW-block to try and split the signal according to my table and apply the LIN-block on each segment but this seem very convoluted. I guess this must be a common problem and I'm missing some ready made block? Is there a piecewise linear interpolation block or mapping-block for these occasions? Or some other way of achieving this?
Thanks in advanced for your input!
-
@pocket_brewing Hi Emil, thank you for your question. Have a look at FB called CNDR - Nonlinear conditioner (docs: https://www.rexygen.com/doc/PDF/ENGLISH/BRef_ENG.pdf#page=111).
It should do the job.Let us know if it worked for you. Good luck with your project!
Kind Regards,
Tomas -
@cechurat Thank you Tomas,
This exactly what I was looking for. Works a charm!It didn't show up when I searched for "interpolation" or "piecewise" in the block library.
-
@pocket_brewing Thanks for getting back to us. I'm glad I could help.
Kind Regards,
Tomas