Ideal Straight Line - instrumentation HND

Click For Summary

Homework Help Overview

The discussion revolves around determining the ideal straight line equation for a temperature sensor's output, which varies from 120 to 364 ohms over a temperature range of 0 to 250 degrees. The original poster presents their data and attempts to derive a linear equation based on a subset of the data points.

Discussion Character

  • Exploratory, Mathematical reasoning, Assumption checking

Approaches and Questions Raised

  • The original poster attempts to calculate the line of best fit using a limited set of data points and questions whether they should include the entire dataset for a more accurate equation. Other participants suggest using the complete dataset and discuss the least-squares fitting method as a standard approach.

Discussion Status

Participants are exploring different interpretations of the data fitting process. Some guidance has been offered regarding the use of the least-squares method and the importance of considering all data points to avoid potential errors in the fit.

Contextual Notes

The original poster is working within the constraints of a homework assignment and is seeking clarification on the methodology for deriving the ideal straight line equation from the given sensor output data.

cps.13
Messages
40
Reaction score
1

Homework Statement


I am doing a distance HND 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.

temp output
0 = 120
50 = 178
100 = 201
150 = 249
200 = 303
250 = 364

I need to generate the ideal straight line equation.

The Attempt at a Solution



I have plotted a line of the points on a graph with the x-axis as ohms and the y-axis as temperature. Calculated the line of best fit using y = mx+C where...

m = (249-201)/(150-100)= 0.96
Using the data for a temp of 150 c = 249 - (150*.96) = 105
therefore the equation of the line is

y = 0.96x + 105

When I now calculate the ideal ohm output values they seem quite wayward of the values given.

temp ISL Temp
0 = 105
50 = 153
100 = 201
150 = 249
200 = 297
250 = 345can anyone see if I have made a mistake? should I be calculating my line equation by using the entire temperature range from 0-250?

thanks
 
Physics news on Phys.org
cps.13 said:

Homework Statement


I am doing a distance HND 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.

temp output
0 = 120
50 = 178
100 = 201
150 = 249
200 = 303
250 = 364

I need to generate the ideal straight line equation.

The Attempt at a Solution



I have plotted a line of the points on a graph with the x-axis as ohms and the y-axis as temperature. Calculated the line of best fit using y = mx+C where...

m = (249-201)/(150-100)= 0.96
Using the data for a temp of 150 c = 249 - (150*.96) = 105
therefore the equation of the line is

y = 0.96x + 105

When I now calculate the ideal ohm output values they seem quite wayward of the values given.

temp ISL Temp
0 = 105
50 = 153
100 = 201
150 = 249
200 = 297
250 = 345can anyone see if I have made a mistake? should I be calculating my line equation by using the entire temperature range from 0-250?

thanks

Google "Least Squares Fit".
 
HND = ??
ISL = ??

Please expand these acronyms so we can know what you're talking about.
 
ISL = ideal straight line as mentioned earlier in the post
HND = Higher National Diploma.
 
cps.13 said:
ISL = ideal straight line as mentioned earlier in the post
HND = Higher National Diploma.

Since you seemed to have ignored my previous response, I will expand on it a bit. First: YES, you should try to use the entire (x,y) data set, unless you have reason to suspect that some data points are seriously wrong. A simple plot in your case does not suggest any of the points to be truly anomalous, so none of them should be dropped.

A standard method for such problem is the so-called "least-squares" fitting method, where you want to minimize the total of all the squared errors in the fit. That is, in your case you have six data points, so in general there will be six "residual errors"; these are the amounts by which the y-values of the data points miss the straight line. You want some "goodness of fit" measure involving all six of the errors; furthermore, you should look at a measure that involves the absolute errors, not the actual numerical values of the errors. By this, I mean that if one residual error = (actual y) - (fitted y-value) is, for example equal to -2, you should count that as a +2, because +2 is the actual distance between the fit and the data. Positive error means the actual y lies above the fitted value, while negative error means the actual y lies below the fit. You can have positive and negative errors cancelling in total, but that does not mean the fit is perfect; there could still be a significant difference between the data and the fit. When we look, instead, at absolute errors |actual y - fitted y| we eliminate that problem, so guard against false confidence. Looking at squared errors (actual-fit)^2 also gets around the problem of false error-cancellation, and furthermore has the additional desirable property that small errors are de-emphasized, while large errors have their importance magnified. Besides, the least-squares method has been in use for over 200 years, and involves only elementary methods.

Every spreadsheet comes equipped with a least-squares fitting module, and there are also on-line sources that will do the calculations for you. Many hand-held calculators also have a "least-squares fit" button. However, the calculations are so straightforward that no fancy tools are needed, and just using the calculator for addition and multiplication is enough.
 

Similar threads

  • · Replies 2 ·
Replies
2
Views
2K
Replies
3
Views
3K
  • · Replies 9 ·
Replies
9
Views
3K
  • · Replies 14 ·
Replies
14
Views
2K
  • · Replies 1 ·
Replies
1
Views
4K
  • · Replies 20 ·
Replies
20
Views
10K
  • · Replies 2 ·
Replies
2
Views
1K
  • · Replies 152 ·
6
Replies
152
Views
11K
  • · Replies 1 ·
Replies
1
Views
3K
  • · Replies 10 ·
Replies
10
Views
7K