Finding formula to an equation for device using ultrasonic sensors

Vitesze

New member
Joined
Sep 24, 2018
Messages
2
First off, apologies for this post as I'm a Math-noob and am failing at figuring this out myself.

For a work-related project I'm working on a device that utilizes ultrasonic sensors to estimate how full (0-100%) a 1.3m container. Initially, I used the following formula (Y: Container full-ness, X: Measured distance (cm) from sensor):

A: y = (130-X)/130 * 100

I quickly found that this led to over-estimations in the data, so I wanted to adjust it. Through trial and error in a plotter I came up with the next formula:

B: y = 12480/(78+X) - 60

While the shape resembles what I want (exponential increase of % as the container fills up more), the "curve" is too strong. Therefore, I'm looking for a graph C, that is based off of graph B, but falls right in between Graph A and B, i.e. it still intersects at 0,100 and 130,0.

I have no clue however what values I should adjust to accomplish this. I've been trying probably for more than an hour now, to no avail. Any help would be greatly appreciated.



Untitled.jpg
 
First off, apologies for this post as I'm a Math-noob and am failing at figuring this out myself.

For a work-related project I'm working on a device that utilizes ultrasonic sensors to estimate how full (0-100%) a 1.3m container. Initially, I used the following formula (Y: Container full-ness, X: Measured distance (cm) from sensor):

A: y = (130-X)/130 * 100

I quickly found that this led to over-estimations in the data, so I wanted to adjust it. Through trial and error in a plotter I came up with the next formula:

B: y = 12480/(78+X) - 60

While the shape resembles what I want (exponential increase of % as the container fills up more), the "curve" is too strong. Therefore, I'm looking for a graph C, that is based off of graph B, but falls right in between Graph A and B, i.e. it still intersects at 0,100 and 130,0.

I have no clue however what values I should adjust to accomplish this. I've been trying probably for more than an hour now, to no avail. Any help would be greatly appreciated.

Can you describe the container, so we can see why the obvious linear formula wouldn't work? Also, define "fullness": do you mean relative depth, volume, or what?
 
Can you describe the container, so we can see why the obvious linear formula wouldn't work? Also, define "fullness": do you mean relative depth, volume, or what?

Fullness - How full a container is (with content), measured from the bottom. 0% is empty, 50% is half-empty, 100% is full.

Picture of the setup is found below. Tests with this sensor have already proven that a linear function (as shown by Graph A) often leads to over-estimations due to the uneven dispersion of the content inside the container.
Untitled2.jpg
 
Top