Changes for page How to do with Linear Calibration?
Last modified by Mengting Qiu on 2024/09/02 17:23
From version 14.1
edited by Mengting Qiu
on 2024/09/02 16:22
on 2024/09/02 16:22
Change comment:
There is no comment for this version
To version 6.1
edited by Mengting Qiu
on 2024/09/02 13:49
on 2024/09/02 13:49
Change comment:
There is no comment for this version
Summary
-
Page properties (1 modified, 0 added, 0 removed)
-
Attachments (0 modified, 0 added, 5 removed)
Details
- Page properties
-
- Content
-
... ... @@ -16,113 +16,74 @@ 16 16 In some case, the measurement and real value are in different range, but they are both linear, we have to calculate the real value with the measurement we can use a simple Linear Calibration. 17 17 18 18 19 - ==2.1 Solve thelinear relationshipmanually==19 +**Example:** we have a water level probe, the measurement range is 0 ~~ 10 meters, and the output is 4~~20mA, this means the when the water level is 0 meter, the output is 4mA, when the water level is 10 meters, the output is 20mA. 20 20 21 - 22 -(% style="color:blue" %)**Example:**(%%) we have a water level probe, the measurement range is 0 ~~ 10 meters, and the output is 4~~20mA, this means the when the water level is 0 meter, the output is 4mA, when the water level is 10 meters, the output is 20mA. 23 - 24 24 We can make a coordinate axis as below: 25 25 26 -1. (% style="color: #4f81bd" %)**Y**(%%) axis is the real value, from 0~~10 meters27 -1. (% style="color: #4f81bd" %)**X**(%%) axis is the probe output , from 4~~20mA23 +1. (% style="color:blue" %)**Y**(%%) axis is the real value, from 0~~10 meters 24 +1. (% style="color:blue" %)**X**(%%) axis is the probe output , from 4~~20mA 28 28 29 29 We use two points to make the linear line: Point1(x1,y1) = (4,0), Point2(x2,y2)= (20,10). 30 30 31 -Since the reading is linear, all (% style="color: #4f81bd" %)**probe output**(%%) and (% style="color:#4f81bd" %)**real value**(%%) is on this line, so we can calculate the real value by probe output in two steps:28 +Since the reading is linear, all (% style="color:blue" %)**probe output**(%%) and (% style="color:blue" %)**real value**(%%) is on this line, so we can calculate the real value by probe output in two steps: 32 32 33 -* **Step1:** Get (% style="color: #4f81bd" %)**realk(Slope)**(%%) for the line:30 +* **Step1:** Get (% style="color:blue" %)**k(Slope)**(%%) for the line: 34 34 35 35 k=(y2-y1)/(x2-x1) = (10-0)/(20-4) =10/16= 0.625 36 36 37 -* **Step2:** Get (% style="color: #4f81bd" %)**real value(34 +* **Step2:** Get (% style="color:blue" %)**kreal value(y)**(%%): 38 38 39 - 36 +k=(y-y1)/(x-x1) 40 40 41 - 38 +~-~-> y = k*(x-x1)+y1 = 0.625 * (x-4) + 0. 42 42 43 - 40 + ~= 0.625 * (x-4) 44 44 45 - Thus, wecanintroducex-valuestothe alreadyobtained equations to derive the correspondingy-values:42 +When x=12mA , y=5 meters 46 46 47 -When x= 12mA44 +When x=8mA, y= 2.5 meters 48 48 49 -When x=8 mA, y=2.5 meters 50 50 51 - 52 52 A more general formular: 53 53 54 - (% style="color:#4f81bd" %)**Y=(y2-y1)/(x2-x1)* (x-x1) + y1**49 +Y=(y2-y1)/(x2-x1)* (x-x1) + y1 55 55 56 56 57 - Calibration CurveSchematic:52 +[[image:image-20240902114541-1.png||height="492" width="874"]] 58 58 59 -[[image:image-20240902114541-1.png||height="336" width="596"]] 60 60 61 61 62 -= =2.2 Performinglinear calibration curvesin Excel==56 += 3. Case examples = 63 63 64 64 65 - In addition, we can also performcalibration curvesin Excelanddirectlyobtainlinearequationsby statisticsof X and Y values.59 +Some case for example which we can use Linear Calibration: 66 66 67 -Citing the same example above, (% style="color:#4f81bd" %)**X**(%%) and (% style="color:#4f81bd" %)**Y**(%%). 68 68 62 +Case 1: Calibrate Microwave Radar Readling. 69 69 70 - ===Step1:Create chart===64 +The microwave radar reading might effect by the OUM(Object Under Measured), but the reading still linear. In this case, we can measure the closest(x1,y1) and the farthest point(x2,y2). Where the x is reading in platform, y is the real value. And use above method to calibrate. 71 71 72 72 73 - Asimplespreadsheetwithtwocolumns:Xvalues andYvalues.67 +Case 2: Calibrate the Soil EC base on SE01 soil sensor raw EC reading. 74 74 75 - [[image:image-20240902160516-1.png||height="404"width="561"]]69 +The SE01 probe is calibrated via mineral soil. The reading for other soil will be different by still in linear, In this case, we can measure two points (x1,y1) and (x2,y2). Where the x is reading of Raw EC, y is the real EC for the soil. And use above method to calibrate 76 76 77 -* Start by selecting the data you want to plot in the chart. 78 -* First, select the X-Value column cell, then press the Ctrl key, and finally click the Y-value column cell. 79 79 80 - [[image:image-20240902160755-2.png||height="394"width="562"]]72 +Case 3: use water level probe to calibrate for oil. 81 81 82 -* Go to the "Insert" TAB, navigate to the "Chart" menu, and then select the first option in the "Scatter" drop-down list. 83 -* A chart will appear with the data points in the two columns. 74 +Oil has different density vs water, but we can still use the immersion type water level pressure sensor to get the oil level. In this case, we can measure two points (x1,y1) and (x2,y2). Where the x is reading of water level, y is the oil level. And use above method to calibrate 84 84 85 -[[image:image-20240902161202-3.png||height="453" width="824"]] 86 86 87 - * Right-click on oneofthe blue dotsand select the “Add Trendline” option.77 +Notice for Linear Calibrate: 88 88 89 -[[image:image-20240902161711-4.png||height="490" width="681"]] 79 +1. k(Slope) is very important, We can measure more points to calculate the most accuracy k. 80 +1. Make sure the mapping is linear, and choose two calibrate points as “far” as possible. 90 90 91 -* A straight line will appear on the chart. 92 -On the right side of the screen, the Format Trendline menu will appear. Check the boxes next to “Show formulas on chart” and “Show R-squared values on chart”. 93 -The R-squared value is a statistic that tells you how well the line fits the data. The best R-squared value is 1.000, which means that every data point touches the line. 94 94 95 -Because the ideal data example is used, the R-squared value in this case is 1. As the difference between the data points and the line increases, the R-squared value decreases, with 0.000 being the lowest possible value. 96 96 97 -[[image:image-20240902161857-5.png]] 98 98 99 99 100 100 101 101 102 -= 3. Case examples = 103 103 104 - 105 -Some case for example which we can use Linear Calibration: 106 - 107 - 108 -(% style="color:blue" %)**Case 1: Calibrate Microwave Radar Readling.** 109 - 110 -The microwave radar reading might effect by the OUM(Object Under Measured), but the reading still linear. In this case, we can measure the closest(x1,y1) and the farthest point(x2,y2). Where the x is reading in platform, y is the real value. And use above method to calibrate. 111 - 112 - 113 -(% style="color:blue" %)**Case 2: Calibrate the Soil EC base on SE01 soil sensor raw EC reading.** 114 - 115 -The SE01 probe is calibrated via mineral soil. The reading for other soil will be different by still in linear, In this case, we can measure two points (x1,y1) and (x2,y2). Where the x is reading of Raw EC, y is the real EC for the soil. And use above method to calibrate 116 - 117 - 118 -(% style="color:blue" %)**Case 3: use water level probe to calibrate for oil.** 119 - 120 -Oil has different density vs water, but we can still use the immersion type water level pressure sensor to get the oil level. In this case, we can measure two points (x1,y1) and (x2,y2). Where the x is reading of water level, y is the oil level. And use above method to calibrate 121 - 122 - 123 -(% style="color:red" %)**Notice for Linear Calibrate:** 124 - 125 -1. k(Slope) is very important, We can measure more points to calculate the most accuracy k. 126 -1. Make sure the mapping is linear, and choose two calibrate points as "far" as possible. 127 - 128 128
- image-20240902160516-1.png
-
- Author
-
... ... @@ -1,1 +1,0 @@ 1 -XWiki.ting - Size
-
... ... @@ -1,1 +1,0 @@ 1 -31.2 KB - Content
- image-20240902160755-2.png
-
- Author
-
... ... @@ -1,1 +1,0 @@ 1 -XWiki.ting - Size
-
... ... @@ -1,1 +1,0 @@ 1 -29.0 KB - Content
- image-20240902161202-3.png
-
- Author
-
... ... @@ -1,1 +1,0 @@ 1 -XWiki.ting - Size
-
... ... @@ -1,1 +1,0 @@ 1 -74.0 KB - Content
- image-20240902161711-4.png
-
- Author
-
... ... @@ -1,1 +1,0 @@ 1 -XWiki.ting - Size
-
... ... @@ -1,1 +1,0 @@ 1 -66.9 KB - Content
- image-20240902161857-5.png
-
- Author
-
... ... @@ -1,1 +1,0 @@ 1 -XWiki.ting - Size
-
... ... @@ -1,1 +1,0 @@ 1 -48.1 KB - Content