Changes for page How to do with Linear Calibration?
Last modified by Mengting Qiu on 2024/09/02 17:23
From version 5.1
edited by Mengting Qiu
on 2024/09/02 12:01
on 2024/09/02 12:01
Change comment:
There is no comment for this version
To version 7.1
edited by Mengting Qiu
on 2024/09/02 14:14
on 2024/09/02 14:14
Change comment:
There is no comment for this version
Summary
-
Page properties (1 modified, 0 added, 0 removed)
Details
- Page properties
-
- Content
-
... ... @@ -15,38 +15,47 @@ 15 15 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 +(% 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. 18 18 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.We can make a coordinate axis as below:20 +We can make a coordinate axis as below: 20 20 21 -1. Yaxis is the real value, from 022 -1. Xaxis is the probe output , from 4~~20mA22 +1. (% style="color:#4f81bd" %)**Y**(%%) axis is the real value, from 0~~10 meters 23 +1. (% style="color:#4f81bd" %)**X**(%%) axis is the probe output , from 4~~20mA 23 23 24 -We use two points to make the linear line: point1(x1,y1) = (4,0),point2(x2,y2)= (20,10).Since the reading is linear, all probe output and real value is on this line, so we can calculate the real value by probe output in two steps:25 +We use two points to make the linear line: Point1(x1,y1) = (4,0), Point2(x2,y2)= (20,10). 25 25 26 -S tep1:Getk(Slope)forthe line:k=(y2-y1)/(x2-x1)=(10-0)/(20-4)=10/16=0.62527 +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: 27 27 28 -Step 2: Getrealvaluey):29 +* **Step1:** Get (% style="color:#4f81bd" %)**realk(Slope)**(%%) for the line: 29 29 30 -k=(y-y1)/(x-x1) 31 + k=(y2-y1)/(x2-x1) = (10-0)/(20-4) =10/16= 0.625 31 31 32 - ~-~->y=k*(x-x1)+y1= 0.625* (x-4)+0.33 +* **Step2:** Get (% style="color:#4f81bd" %)**real value( y )**(%%): 33 33 34 - ~=0.625*(x-4)35 + k =(y-y1)/(x-x1) 35 35 36 - Whenx=12mA,y=5meters37 + ~-~-> y = k*(x-x1)+y1 = 0.625 * (x-4) + 0. 37 37 38 - Whenx=8mA,y=2.5meters39 + ~= 0.625 * (x-4) 39 39 41 +Thus, we can introduce x-values to the already obtained equations to derive the corresponding y-values: 40 40 43 +When x=12 mA , y=5 meters 44 + 45 +When x=8 mA, y=2.5 meters 46 + 47 + 41 41 A more general formular: 42 42 43 -Y=(y2-y1)/(x2-x1)* (x-x1) + y1 50 +(% style="color:#4f81bd" %)**Y=(y2-y1)/(x2-x1)* (x-x1) + y1** 44 44 45 45 46 - [[image:image-20240902114541-1.png||height="492" width="874"]]53 +Calibration Curve Schematic: 47 47 55 +[[image:image-20240902114541-1.png||height="479" width="851"]] 48 48 49 49 58 + 50 50 = 3. Case examples = 51 51 52 52 ... ... @@ -53,33 +53,26 @@ 53 53 Some case for example which we can use Linear Calibration: 54 54 55 55 56 -Case 1: Calibrate Microwave Radar Readling. 65 +(% style="color:blue" %)**Case 1: Calibrate Microwave Radar Readling.** 57 57 58 58 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. 59 59 60 60 61 -Case 2: Calibrate the Soil EC base on SE01 soil sensor raw EC reading. 70 +(% style="color:blue" %)**Case 2: Calibrate the Soil EC base on SE01 soil sensor raw EC reading.** 62 62 63 63 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 64 64 65 65 66 -Case 3: use water level probe to calibrate for oil. 75 +(% style="color:blue" %)**Case 3: use water level probe to calibrate for oil.** 67 67 68 68 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 69 69 70 70 71 -Notice for Linear Calibrate: 80 +(% style="color:red" %)**Notice for Linear Calibrate:** 72 72 73 73 1. k(Slope) is very important, We can measure more points to calculate the most accuracy k. 74 -1. Make sure the mapping is linear, and choose two calibrate points as “far”as possible.83 +1. Make sure the mapping is linear, and choose two calibrate points as "far" as possible. 75 75 76 76 77 77 78 - 79 - 80 - 81 - 82 - 83 - 84 - 85 85