+ All Categories
Home > Documents > Topic 1 modelling of sensors systems ETEC 6419. Calibration methods We have a RTD sensing the...

Topic 1 modelling of sensors systems ETEC 6419. Calibration methods We have a RTD sensing the...

Date post: 12-Jan-2016
Category:
Upload: olivia-hunt
View: 213 times
Download: 0 times
Share this document with a friend
21
Topic 1 modelling of sensors systems ETEC 6419
Transcript
Page 1: Topic 1 modelling of sensors systems ETEC 6419. Calibration methods We have a RTD sensing the temperature. The integer of the sensor inside the PLC is.

Topic 1 modelling of sensorssystems

ETEC 6419

Page 2: Topic 1 modelling of sensors systems ETEC 6419. Calibration methods We have a RTD sensing the temperature. The integer of the sensor inside the PLC is.

Calibration methods

• We have a RTD sensing the temperature. The integer of the sensor inside the PLC is 50 counts corresponding to a temperature of 30°. The integer value of 690 corresponds to 430°, what is the temperature corresponding to 400 counts.

• A solution can be found using Y=mx+c, however if the relationship is not linear a more powerful technique is required.

Page 3: Topic 1 modelling of sensors systems ETEC 6419. Calibration methods We have a RTD sensing the temperature. The integer of the sensor inside the PLC is.

solution

Page 4: Topic 1 modelling of sensors systems ETEC 6419. Calibration methods We have a RTD sensing the temperature. The integer of the sensor inside the PLC is.

Example 2• The voltage entering into the PLC/MCU is related to

temperature by a power series relationship Y=ax2+bx+c, where Y is V and X is T

• This can be obtained by regression, however other methods exist to relate V(Y) to T(X)

Exercise: identify the constants a, b, c using regression and a power series for the above data with Excel and Matlab?

T2 V30 5080 100200 220300 600

Page 5: Topic 1 modelling of sensors systems ETEC 6419. Calibration methods We have a RTD sensing the temperature. The integer of the sensor inside the PLC is.

• This particular problem is known as a function approximation problem.

• The problem can be solved suing the following methods.

• Neural Networks• Fuzzy logic Artificial intelligence methods

• Genetic algorithms• Ordinary least squares regression• Principal components regression• Partial least squares regression• Huber/bisquare regression

Page 6: Topic 1 modelling of sensors systems ETEC 6419. Calibration methods We have a RTD sensing the temperature. The integer of the sensor inside the PLC is.

Generalised regression equation

• In transposing a matrix, the rows of the matrix X are rearranged to become the columns of XT. The columns of X are rearranged to become the rows of XT. e.g.

• e.g.• X= XT=

Page 7: Topic 1 modelling of sensors systems ETEC 6419. Calibration methods We have a RTD sensing the temperature. The integer of the sensor inside the PLC is.

Matrix inverse

• This method only works for 2x2 matrix’s.• Consider • Step 1. First rearrange the matrix’s leading diagonal

elements.• Step 2. Change the sign of the other two elements.• Step 3. Find the determinant for the matrix.• Step 4. Multiply the result of step 2 by 1/|x| • Step 5 check that X X-1 =I• where I is the identity matrix

Page 8: Topic 1 modelling of sensors systems ETEC 6419. Calibration methods We have a RTD sensing the temperature. The integer of the sensor inside the PLC is.

Power series model

• See microcontroller based temperature monitoring and control by Doug Ibraham pp71-79

• Assuming we have enough data points in each of two linear vectors then any two linear vectors can be correlated with each other using regression and a power series.

• Consider the relationship between temperature detected by a thermocouple and the voltage output from a thermocouple

Page 9: Topic 1 modelling of sensors systems ETEC 6419. Calibration methods We have a RTD sensing the temperature. The integer of the sensor inside the PLC is.

Thermocouples

• The temperature voltage relationship of thermocouples is non-linear and can be

• expressed as a polynomial• T = ao + alv + a2v2 +... + anvn where T is the temperature

(°C), a0, al, a2,…, an are coefficients which are determined using regression and v is the thermocouple voltage.

• In the case of the thermocouple the first 10 coefficients in the power series are supplied for a particular thermocouple type.

Page 10: Topic 1 modelling of sensors systems ETEC 6419. Calibration methods We have a RTD sensing the temperature. The integer of the sensor inside the PLC is.

Thermocouple an coefficients

• Temperature in °C voltage in μV• For the above data a 10 coefficient power series

model for a thermocouple will yield a model accurate to 0.05°C or less

Page 11: Topic 1 modelling of sensors systems ETEC 6419. Calibration methods We have a RTD sensing the temperature. The integer of the sensor inside the PLC is.

Inverse temperature model• In some applications the temperature is

known and we may want to calculate the thermocouple voltage. This can be done by using the inverse thermocouple polynomial:

• Again this can be achieve if we have a sufficiently large set of data points in two linear vectors

• V = co + c1T + c2 T2+…+ cn Tn

• where V is the thermocouple voltage, T is the temperature, and co,c1,c2,…,cn are the thermocouple coefficients.

Page 12: Topic 1 modelling of sensors systems ETEC 6419. Calibration methods We have a RTD sensing the temperature. The integer of the sensor inside the PLC is.

Thermocouple ci coefficients

• Temperature coefficients for the inverse regressive model for popular thermocouples.

• 10 power series terms are used in the inverse regressive model.

Page 13: Topic 1 modelling of sensors systems ETEC 6419. Calibration methods We have a RTD sensing the temperature. The integer of the sensor inside the PLC is.

Regressive modelling dataset size• For a power series ordinary least squares regressive model, a relationship

exists between the number of power series terms in the model and the number of data points.

• Assuming two linear vectors are correlated using a power series ordinary least squares regression then the number of data points in a single linear vector should be 5 times more than the number of terms in the OLS model.

• This rule is not a fixed rule and sample set size to model complexity is a grey area.

• Co-linearity occurs as the number of model terms approaches the sample set size.

• Principle components regression and partial least squares regression methods both use OLS regression but the data is transformed into a data space where most of the data is compressed into a few components. The regression takes place on the transformed data space and then the model is transformed back into the original space. Using the method of transforming data into a new space where regression takes place allows models where the number of model terms can be of the same dimension as the sample set

Page 14: Topic 1 modelling of sensors systems ETEC 6419. Calibration methods We have a RTD sensing the temperature. The integer of the sensor inside the PLC is.

Quantisation of analogue values

• When a PLC or computer reads an analogue signal it needs to be converted to a digital signal, because a CPU reads signals that are digital.

• This process is known as Analogue to Digital conversion. For PLC’s there are special cards for this.

• For Microcontrollers the range is set by the special functions register used to configure the analogue port

Page 15: Topic 1 modelling of sensors systems ETEC 6419. Calibration methods We have a RTD sensing the temperature. The integer of the sensor inside the PLC is.

Analogue sampling

Page 16: Topic 1 modelling of sensors systems ETEC 6419. Calibration methods We have a RTD sensing the temperature. The integer of the sensor inside the PLC is.

Sampling frequency

• The sampling time is the actual time the signal is being read by the A/D converter.

• The sampling frequency is the frequency or number of times the signal is read each second.

• The sampling frequency is measured in hertz (unit S-1)• (Hertz) Sampling frequency =1/T• For example an A/D converter reads 5 signals in 1

second.• • It’s sampling frequency = 5Hz.

Page 17: Topic 1 modelling of sensors systems ETEC 6419. Calibration methods We have a RTD sensing the temperature. The integer of the sensor inside the PLC is.

Aliasing and nyquist sampling• The Nyquist criterion specifies that sampling frequencies

should be at least twice the frequency of the signal being measured, otherwise aliasing will occur.

• The example in Figure violated this principle, so the signal was aliased

Page 18: Topic 1 modelling of sensors systems ETEC 6419. Calibration methods We have a RTD sensing the temperature. The integer of the sensor inside the PLC is.

problem

• If a pulse goes high 200 times a second, what frequency should the hardware sample the pulse at?

Page 19: Topic 1 modelling of sensors systems ETEC 6419. Calibration methods We have a RTD sensing the temperature. The integer of the sensor inside the PLC is.

Quantisation equations

Page 20: Topic 1 modelling of sensors systems ETEC 6419. Calibration methods We have a RTD sensing the temperature. The integer of the sensor inside the PLC is.

problems

• 1) For a 12 bit A/D we have a signal of 3.2145V coming in to an analogue card (0-10V). What is the PLC integer after the voltage has been digitised?

• 2) Assuming a PLC integer of 200 is then sent to a 10 bit D/A output card that used (0-10V). What will be Vout?

• 3) If the same PLC integer after the voltage has been digitised is then sent to a 10 bit D/A card that used (0-10V). What will be Vout?

Page 21: Topic 1 modelling of sensors systems ETEC 6419. Calibration methods We have a RTD sensing the temperature. The integer of the sensor inside the PLC is.

Characterisation of sensors• The formula for the mean is X

where n is number of samples in the set and Xi is a data point I in the set

• Repeatability is measured by standard deviation s (sometimes denoted ơ)

• After calculating s the t statistic can be calculated

For 95% C.I.,

For 99% C.I.,

2

1

2

1s

N

XXs

N

i

i


Recommended