- #1
Fenrir
- 1
- 0
- Homework Statement
- I am doing a distance learning course and need to find the ideal straight line of a sensor output. The sensor is a temperature sensor with an OHM output.
From a temperature range of 0-250 it has an output of 120-364ohm.
0 = 120
50 = 178
00 = 201
150 = 249
200 = 303
250 = 364
I need to generate the ideal straight line equation and values.
- Relevant Equations
- y = Mx + b (Least squares)
X 0 50 100 150 200 250
Y 120 178 201 249 303 364
XY 0 8900 20100 37350 60600 91000
X^2 0 2500 10000 22500 40000 62500
∑X 750
∑Y 1415
∑XY 217950
∑X^2 137500
M = (6*217950)-(750*1415) / (6*137500) - (750)^2
M = 1643 / 1750
M = 0.9388571429
M = 0.94
b = 1415-0.94*750 / 6 = 118.333333
b = 118.33
Mx + b
0.94*0 + 118.33 = 118.33
0.94*50 +118.33 = 165.33
0.94*100 +118.33 = 212.33
0.94*150 +118.33 = 259.33
0.94*200 +118.33 = 306.33
0.94*250 +118.33 = 353.33
N = Resistance - ISL
120-118.33 = 1.67
178-165.33 = 12.67
201-212.33 = -11.33
249-259.33 = -10.33
303-306.33 = -3.33
364-353.33 = -10.67
Temp 0 50 100 150 200 250
Resistance 120 178 201 249 303 364
ISL 118.33 165.33 212.33 259.33 306.33 353.33
N 1.67 12.67 -11.33 -10.33 -3.33 10.67
I'm looking at my answers and i feel like i have gotten it wrong somewhere, is there a mistake in what i have done?
Rounding only done here to simplify.
Edited to correct ∑X^2
Y 120 178 201 249 303 364
XY 0 8900 20100 37350 60600 91000
X^2 0 2500 10000 22500 40000 62500
∑X 750
∑Y 1415
∑XY 217950
∑X^2 137500
M = (6*217950)-(750*1415) / (6*137500) - (750)^2
M = 1643 / 1750
M = 0.9388571429
M = 0.94
b = 1415-0.94*750 / 6 = 118.333333
b = 118.33
Mx + b
0.94*0 + 118.33 = 118.33
0.94*50 +118.33 = 165.33
0.94*100 +118.33 = 212.33
0.94*150 +118.33 = 259.33
0.94*200 +118.33 = 306.33
0.94*250 +118.33 = 353.33
N = Resistance - ISL
120-118.33 = 1.67
178-165.33 = 12.67
201-212.33 = -11.33
249-259.33 = -10.33
303-306.33 = -3.33
364-353.33 = -10.67
Temp 0 50 100 150 200 250
Resistance 120 178 201 249 303 364
ISL 118.33 165.33 212.33 259.33 306.33 353.33
N 1.67 12.67 -11.33 -10.33 -3.33 10.67
I'm looking at my answers and i feel like i have gotten it wrong somewhere, is there a mistake in what i have done?
Rounding only done here to simplify.
Edited to correct ∑X^2