How To Approch

pirate959

New member
Joined
Mar 2, 2016
Messages
4
I have a issue that I would like to solve and am hoping someone can help me with how to approach this. I am really looking for the approach and not just the answer. In the end I could make a look up table in excel provide me my answer.

In the graph below, I want to develop the function to calculate for any value on the red line it outputs the coorolating value on the blue line. Although not perfectly correlated, it is close enough that I am hoping to approximate this behavior.

If your interested in the problem I am trying to solve, here it is. I have a light source under a opaque plastic surface with a graphic on it. The red line is the distance of the light source to the plastic. The blue line is the electrical current required to meet the intensity requirement on other side of plastic. I am hoping to make a function for this behavior so that I can quickly determine the current I need based on a changing distance. So as the light source moves, I can keep the intensity the same for the person viewing it. Hope this is fun for someone. Thanks in advance for the help.

attachment.php
 

Attachments

  • Region.jpg
    Region.jpg
    21.2 KB · Views: 25
I have a issue that I would like to solve and am hoping someone can help me with how to approach this. I am really looking for the approach and not just the answer. In the end I could make a look up table in excel provide me my answer.

In the graph below, I want to develop the function to calculate for any value on the red line it outputs the coorolating value on the blue line. Although not perfectly correlated, it is close enough that I am hoping to approximate this behavior.

If your interested in the problem I am trying to solve, here it is. I have a light source under a opaque plastic surface with a graphic on it. The red line is the distance of the light source to the plastic. The blue line is the electrical current required to meet the intensity requirement on other side of plastic. I am hoping to make a function for this behavior so that I can quickly determine the current I need based on a changing distance. So as the light source moves, I can keep the intensity the same for the person viewing it. Hope this is fun for someone. Thanks in advance for the help.

attachment.php
You can't get an exact fit as a y(x) [the blue line] equal to some f(t(x)) [t(x) being the red line] since, for one thing there are values of t(x) for which there are two values of y(x). However, you can play with some functions which might do a decent job. Just for the heck of it look at
f(x) = y(x) / t(x)
and maybe try to fit f(x) to a straight line [use a spread sheet to get the regression line f(x) = a x + b]. Then if that fit looked pretty good you would have Y1(x) as a pretty good fit to y(x)
Y1(x) = (ax+b) t(x)
A good fit would essentially say y(x) is a scaled version of t(x) but the scale factor can change [in a linear fashion] with x.

You could continue, as a next step, by letting
e(x) = y(x) - Y1(x) = A x + B,
getting the A and B from the regression line to get
Y2(x) = Y1(x) + A x + b = t(x)/(ax+b) + A x + B
and that would (hopefully), be a better match for y(x).

Plotting f(x), Y1(x), e(x) might give a different idea about what to choose as fitting parameters at each stage. Maybe a quadratic or cubic or even an exponential might be suggested by the data. However, I would try to keep it fairly simple.
 
You can't get an exact fit as a y(x) [the blue line] equal to some f(t(x)) [t(x) being the red line] since, for one thing there are values of t(x) for which there are two values of y(x).
Are you seeing both of the lower lines as being blue? Because I'm seeing the "flatter" one as being green.... :oops:
 
Are you seeing both of the lower lines as being blue? Because I'm seeing the "flatter" one as being green.... :oops:
I'm seeing 3 lines. The top red one. Then the bottom pair; the blue looking like maybe a 'lowered and scaled' red line plus the flat green line. I just figured the flat green line was for some sort of reference.
 
Are you seeing both of the lower lines as being blue? Because I'm seeing the "flatter" one as being green.... :oops:


Ignore the green line, this is not relevant for the topic. I should have removed it but forgot. I reorganized the data to make a better view. This is probably more helpful. for the most part I am linear but as distance becomes shorter than 14.mm (red line), slope of the line changes a lot. Sort of a log behavior if you will.

Sorry if my way of explaining is bad, I am not very strong with my math theory.

attachment.php
 

Attachments

  • Region1.jpg
    Region1.jpg
    19.3 KB · Views: 20
attachment.php


I am new to the blog and might be replying twice, but because I am not seeing it I think i just replied to one person.

First, ignore the green line, this is data I should have removed. I reorganized the data to get a better view of current versus distance. If ignore measurement 4, I almost see a log behavior. Slope of the line changes at 14.1mm (red line).

I do expect that each light source i have to use produces similar results. Maybe I just need to make a simple worksheet to apply a different slope depending on the distance and then just charicterize the light sources to find the distance where different slope must be applied?

I apologize if I use wrong terms or descriptions, my math theory is very week. Thanks for all the help so far.
 

Attachments

  • Region1.jpg
    Region1.jpg
    19.3 KB · Views: 20
Do you maybe have a table of the data which generated the two lines? Thank you! ;)
 
Do you maybe have a table of the data which generated the two lines? Thank you! ;)


attachment.php


I could not attach the excel file, so here is a screen shot. Sorry for the delay, I was in India and came back home to a pile of work. :)
 

Attachments

  • Region3.jpg
    Region3.jpg
    21.9 KB · Views: 12
Top