Top Banner
SMART SENSOR INTERFACE: OPTIMIZING AND INCREASING THE ACCURACY OF SELF-CALIBRATING ALGORITHM PRESENTED BY: THUTA AUNG (ZACK CHEN)
20

Smart Sensor Interface: Optimizing and increasing the ...ziyang.eecs.umich.edu/iesr/lectures/proj7.pdf · •Increased popularity of internet of things and sensor networks has led

Jun 08, 2020

Download

Documents

dariahiddleston
Welcome message from author
This document is posted to help you gain knowledge. Please leave a comment to let me know what you think about it! Share it to your friends and learn new things together.
Transcript
Page 1: Smart Sensor Interface: Optimizing and increasing the ...ziyang.eecs.umich.edu/iesr/lectures/proj7.pdf · •Increased popularity of internet of things and sensor networks has led

SMART SENSOR INTERFACE: OPTIMIZING AND INCREASING THE ACCURACY OF SELF-CALIBRATING ALGORITHM

PRESENTED BY: THUTA AUNG (ZACK CHEN)

Page 2: Smart Sensor Interface: Optimizing and increasing the ...ziyang.eecs.umich.edu/iesr/lectures/proj7.pdf · •Increased popularity of internet of things and sensor networks has led

MOTIVATION

• Increased popularity of internet of things and sensor networks has led to

increased amount of diverse sensors being integrated into wireless

networks.

• In order to accommodate different kinds of manual sensors for collecting

raw data from the external stimulus, a smart sensor interface that is

wireless, cheap and accurate has been proposed.

Page 3: Smart Sensor Interface: Optimizing and increasing the ...ziyang.eecs.umich.edu/iesr/lectures/proj7.pdf · •Increased popularity of internet of things and sensor networks has led

APPLICATIONS

• Audio Sensing: Requires 40kHz of sampling rate.

• pH sensor: Glass electrode requires a high impedance measuring device in order to load

the output signals.

Figure 1: Summary of different needs from signal path conditioning for different kinds of sensors

Page 4: Smart Sensor Interface: Optimizing and increasing the ...ziyang.eecs.umich.edu/iesr/lectures/proj7.pdf · •Increased popularity of internet of things and sensor networks has led

RELATED WORKS

• Microcontroller sensor array that uses DAC as a feedback path, but their

algorithm is via a lookup table specifically tailored towards temperature

measurement [1]

• Assigning confidence values to different sensors for more rigorous self-

calibration algorithm

• Specific hardware architecture for specific application, but majority of them does

not have a standard architecture and a standardized algorithm [2]

Page 5: Smart Sensor Interface: Optimizing and increasing the ...ziyang.eecs.umich.edu/iesr/lectures/proj7.pdf · •Increased popularity of internet of things and sensor networks has led

HARDWARE ARCHITECTURE

Figure 2: High level diagram of our hardware architecture. Red arrows show the short circuit path

calibration while the blue arrow shows the full path calibration

Page 6: Smart Sensor Interface: Optimizing and increasing the ...ziyang.eecs.umich.edu/iesr/lectures/proj7.pdf · •Increased popularity of internet of things and sensor networks has led

DYNAMIC GAIN

• Dynamically adjust gains of the input signals to exploit the full-scale range of the

ADC

• By using a multiplexer with 8 different values of 1% accurate resistors, it is

possible to achieve 2^n gains where n = 1 to 7

• Resistor’s values for specific gains can be found by using RG= 9.9kohms/(Gain-1)

• Reduces cost and complexity of the device as in place of a PGA

• ADC detects the input analog signal and decides to either step up or step down

the gain. However, the minimum gain is 1

Page 7: Smart Sensor Interface: Optimizing and increasing the ...ziyang.eecs.umich.edu/iesr/lectures/proj7.pdf · •Increased popularity of internet of things and sensor networks has led

SHORT CIRCUIT PATH CALIBRATION

• DAC is used to help map the expected representation of m-DAC bits to

n-ADC bits by bypassing the preconditioning signal path and directly

feeding the DAC output towards the ADC output.

• Through realizing the relationship between the DAC and the ADC a linear

model can be created to accurately map the representation of m-DAC

bits to n-ADC bits.

• Path is denoted by red arrows in the figure 2

Page 8: Smart Sensor Interface: Optimizing and increasing the ...ziyang.eecs.umich.edu/iesr/lectures/proj7.pdf · •Increased popularity of internet of things and sensor networks has led

FULL PATH CALIBRATION

• Sweeping the m-DAC bits through the entire signal conditioning

path to characterize how the expected data bits would have drifted

or changed

• The only difference in software aspect of the calibration is the use

of linear model from the short circuit path to characterize the noise

and offsets introduced within the full signal path calibration

• Path is denoted by the arrows in Figure 2

Page 9: Smart Sensor Interface: Optimizing and increasing the ...ziyang.eecs.umich.edu/iesr/lectures/proj7.pdf · •Increased popularity of internet of things and sensor networks has led

SOFTWARE ALGORITHM FOR CALIBRATION

• Simple Linear Regression: y = ax +b; where a = Cov(x,y)/var(x) and b =

mean(y)-a*mean(x).

• Worst case runtime: O(n)

• Average memory complexity: O(1)

• Polynomial Regression

• Python libraries such as sklearn DBSCAN, scipy, HDBSCAN exists.

• Average case runtime: O(n^2) [1]

• Average memory complexity: O(n*(n-1)/2) ~ O(n^2)

• Multiple Piecewise Linear Regression

Page 10: Smart Sensor Interface: Optimizing and increasing the ...ziyang.eecs.umich.edu/iesr/lectures/proj7.pdf · •Increased popularity of internet of things and sensor networks has led

MULTIPLE PIECEWISE LINEAR REGRESSION

• Binary search concept using RMS threshold error to decide

whether more piecewise linear curves would be between

different halves of the data points.

Page 11: Smart Sensor Interface: Optimizing and increasing the ...ziyang.eecs.umich.edu/iesr/lectures/proj7.pdf · •Increased popularity of internet of things and sensor networks has led

uint8_t PWbuilder(………){

gradOut = gradient(…..);

fillLinReg(………); O(n)

if(RmsOk(….) || endIndex - startIndex < 2){ O(n)

int32_t vectorIndex = findIndexVectorPW(……);

if(vectorIndex == -1){

PW.push_back(std::pair<uint16_t,double>

(startIndex,gradOut));

sortPW(PW); O(n)

}

else{

PW[vectorIndex].second = gradOut; }}

//can combine this into above if statement

if(RmsOk(……)){ O(n)

RmsOkIndex = endIndex;

cout << "ems error good" << endl;

return 1; }

if(endIndex - startIndex < 2){

cout << "start and end is close: " <<endIndex -startIndex<< endl;

RmsOkIndex = endIndex;

return 1;

}

double grad;

uint16_t mid = (RmsOkIndex + endIndex)/2;

uint8_t good = PWbuilder(…………..);// ok to midO(logn)

// only if RmsOkIndex change

if(good){

yReg.clear();

std::pair<double, double> lastPoint = fillLinReg(grad, x, y, yReg, RmsOkIndex, mid, lastPointIn);

PWbuilder(……….);// new ok to end O(logn)

}

return 0;}

Page 12: Smart Sensor Interface: Optimizing and increasing the ...ziyang.eecs.umich.edu/iesr/lectures/proj7.pdf · •Increased popularity of internet of things and sensor networks has led

RUNTIME AND MEMORY COMPLEXITY OF MPL

• Worst case runtime complexity: O(nlogn)

• Best case runtime complexity: O(n*1)

• Average case memory allocated: O(n)

Page 13: Smart Sensor Interface: Optimizing and increasing the ...ziyang.eecs.umich.edu/iesr/lectures/proj7.pdf · •Increased popularity of internet of things and sensor networks has led

SIMPLE LINEAR REGRESSION

Figure 3: Short Circuit vs Full Path using linear regression Figure 4: Difference between short circuit and full path

calibration using simple linear regression

Page 14: Smart Sensor Interface: Optimizing and increasing the ...ziyang.eecs.umich.edu/iesr/lectures/proj7.pdf · •Increased popularity of internet of things and sensor networks has led

POLYNOMIAL REGRESSION WITH POWER OF 2

Figure 5: Full Path Calibration using Polynomial Regression

of power 2

Figure 6: Difference between short circuit path from Figure

3 and full path calibration from figure 5

Page 15: Smart Sensor Interface: Optimizing and increasing the ...ziyang.eecs.umich.edu/iesr/lectures/proj7.pdf · •Increased popularity of internet of things and sensor networks has led

MULTIPLE PIECEWISE LINEAR REGRESSION WITH RMS ERROR = 0.05

Figure 7: Full Path Calibration using Multiple Piecewise

Linear Regression with RMS error of 0.5

Figure 8: Difference between short circuit path from Figure

3 and full path calibration from figure 7

Page 16: Smart Sensor Interface: Optimizing and increasing the ...ziyang.eecs.umich.edu/iesr/lectures/proj7.pdf · •Increased popularity of internet of things and sensor networks has led

DISCUSSION

• Frequency dependent noises are still of a major problem as they require

more computationally heavy algorithms like Fourier Transforms

• Thermal Dependency is not a very big factor as most of the major

components’ error range was lesser than 1LSB of the ADC.

• Passive components such as 5% accurate resistors used in Vref of the

ADC and IA gains could be an issue.

• This can be resolved using 1% accurate resistors or apply multivariable weighted

linear regression to the calibration algorithm

Page 17: Smart Sensor Interface: Optimizing and increasing the ...ziyang.eecs.umich.edu/iesr/lectures/proj7.pdf · •Increased popularity of internet of things and sensor networks has led

CONCLUSION

• A generalized system that supports a variety of sensors has been established through the

team’s work.

• Using DAC as a feedback path for self-calibration using MPL regression model allows us

to accommodate various kinds of sensors to our interface.

• Usage of Instrumentational amplifier instead of PGAs allowed us to cheaply hook up

various kinds of sensor to a sensor network for various kinds of conditions.

Page 18: Smart Sensor Interface: Optimizing and increasing the ...ziyang.eecs.umich.edu/iesr/lectures/proj7.pdf · •Increased popularity of internet of things and sensor networks has led

FUTURE RESEARCH DIRECTIONS

1. Testing out the circuitry on the actual PCB and an application

2. Characterizing other sources of noises such as humidity, and environmental factors as

the sensor nodes tend to operate in harsh conditions

3. Refining multiple piecewise linear regression to reduce the RMS error to smaller than

or equal to that of 1LSB of a 16bit ADC.

Page 19: Smart Sensor Interface: Optimizing and increasing the ...ziyang.eecs.umich.edu/iesr/lectures/proj7.pdf · •Increased popularity of internet of things and sensor networks has led

ACKNOWLEDGEMENTS

• Special Thanks to: Professor Robert Dick, Siva Aduri, Kyle May, and Brian Purnomo

References

1. P. T. Kolen, "Self-calibration/compensation technique for microcontroller-based sensor arrays," in IEEE Transactions on

Instrumentation and Measurement, vol. 43, no. 4, pp. 620-623, Aug. 1994.

2. A Novel Dynamic Compensated Interface for Lumber Moisture Content Sensor - IEEE Conference Publication,

ieeexplore.ieee.org/stamp/stamp.jsp?tp=&arnumber=1714074.

3. J. M. Dias Pereira, O. Postolache and P. M. B. Silva Girao, "A Digitally Programmable A/D Converter for Smart Sensors Applications," in

IEEE Transactions on Instrumentation and Measurement, vol. 56, no.1, pp. 158-163, Feb. 2007.

4. “Benchmarking Performance and Scaling of Python Clustering Algorithms.” Benchmarking Performance and Scaling of Python Clustering

Algorithms - Hdbscan 0.8.1 Documentation, hdbscan.readthedocs.io/en/latest/performance_and_scalability.html.

5. ftp://ftp.ni.com/evaluation/signal_conditioning/20712_Benefits_of_Integrated_SC_WP_HL.pdf

6. https://pdfs.semanticscholar.org/913d/e703dda29eafd014201387a761ee8604f8d7.pdf

Page 20: Smart Sensor Interface: Optimizing and increasing the ...ziyang.eecs.umich.edu/iesr/lectures/proj7.pdf · •Increased popularity of internet of things and sensor networks has led

QUESTIONS?