Presentation is loading. Please wait.

Presentation is loading. Please wait.

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.

Similar presentations


Presentation on theme: "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."— Presentation transcript:

1 Topic 1 modelling of sensors systems ETEC 6419

2 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.

3 solution

4 Example 2 The voltage entering into the PLC/MCU is related to temperature by a power series relationship Y=ax 2 +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? T2T2 V 3050 80100 200220 300600

5 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

6 Generalised regression equation In transposing a matrix, the rows of the matrix X are rearranged to become the columns of X T. The columns of X are rearranged to become the rows of X T. e.g. e.g. X= X T =

7 Matrix inverse

8 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

9 Thermocouples The temperature voltage relationship of thermocouples is non-linear and can be expressed as a polynomial T = a o + a l v + a 2 v 2 +... + a n v n where T is the temperature (°C), a 0, a l, a 2,…, a n 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.

10 Thermocouple a n 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

11 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 = c o + c 1 T + c 2 T 2 +…+ c n T n where V is the thermocouple voltage, T is the temperature, and c o,c 1,c 2,…,c n are the thermocouple coefficients.

12 Thermocouple ci coefficients Temperature coefficients for the inverse regressive model for popular thermocouples. 10 power series terms are used in the inverse regressive model.

13 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

14 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

15 Analogue sampling

16 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.

17 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

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

19 Quantisation equations

20 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?

21 Characterisation of sensors The formula for the mean is X where n is number of samples in the set and X i 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.,


Download ppt "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."

Similar presentations


Ads by Google