Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

code in matlab please During lecture we examined a case study in which we apply spline interpolation to temperature measurements as a function of time,

code in matlab please

image text in transcribed

image text in transcribed

During lecture we examined a case study in which we apply spline interpolation to temperature measurements as a function of time, however, no mention was made to how the temperature was recorded. In this Mini Project we will assume that the temperature was measured using a thermistor, which is a device with a resistance that decreases as temperature increases. In the thermistor, the relationship between the temperature and resistance is given by an empirical equation known as the Steinhart-Hart equation A B In RC InR)3, (1) where T is the temperatures in degrees elvin, R is the resistance in ohms and A, B and C are coefficients that must be determined for the thermistor being used. In most cases the thermistor resistance is not measured directly. Instead the thermistor is connected in series to a known resistor in a circuit known as a voltage divider. In Figure 1 we can see a resistor arrangement in which a resistor R1 is followed by the thermistor R(T). AVD Converter RT) V Figure 1. Schematic diagram of circuit used to measure voltage as a function of temperature. Since the two resistors share the same current delivered by the voltage source, V, they are connected in series and the voltage V will be distributed between R1 and R(T). The voltage measured at R(T) has been labeled Vo and is given by the voltage divider equation: RIT) R1 +R(T) In the Figure the voltage Vo is connected to and analog to digital (A/D) converter which is device that samples a voltage and converts it to a digital variable that is loaded to a computer and then processed using Matlab, or other programs. In particular, for the ENG6 Final Project, the voltage supply and A/D conversion is provided by an Arduino microprocessor In order to be able to use the Seinhart-Hart, and hence get useful data form the thermistor, it is necessary to calculate the calibration coefficients A, B and C. Since we have three unknowns we can measure the resistance of the thermistor at three different known temperatures and obtain the system of equations: 1 In(R) In(R1) 1 In(R In(R where R1. R2 and Ra are the temperatures measured at T1. T2 and T3. respectively. However, keep in mind that we have voltage measurements that can be converted to resistance using equation (2) 1. For the Vishay 10K NTC thermistor, using a calibrated thermometer, a thermoelectric cooler and a ohmeter we have obtained the following table Table 1. Callbration measurements for Vishay 10K NTC thermistor 282.9 352.9 R (k2) Calculate the calibration coefficients A B and C of the Steinhart-Hart equation and calculate the residuals between the predicted and experimental measurements. Use fprint to display in separate lines the coefficients and the residuals 2. Using the Arduino commands read oltage ('com#, ,,A#,. now to obtain a time stamp and a while loop we obtained the table of voltage measurements vs. time shown below Table 2: Voltage measurements as function of time for the Vishay 10K NTC thermiator in 8er188 with a 10 resistor and blased with 5V 11.585 Based on the table, do a spline fit to interpolate voltage measurements 3. Convert the interpolated voltages to resistance assuming a 10 series 4. Convert the interpolated resistances to temperature, in degrees Celsius, 5. Identify the maximum overshoot temperature and steady-state every 100 ms. resistor and 5V applied to the series arrangement and plot the temperature vs. time. Remember to label the axes. temperature and use fprints to display the values. During lecture we examined a case study in which we apply spline interpolation to temperature measurements as a function of time, however, no mention was made to how the temperature was recorded. In this Mini Project we will assume that the temperature was measured using a thermistor, which is a device with a resistance that decreases as temperature increases. In the thermistor, the relationship between the temperature and resistance is given by an empirical equation known as the Steinhart-Hart equation A B In RC InR)3, (1) where T is the temperatures in degrees elvin, R is the resistance in ohms and A, B and C are coefficients that must be determined for the thermistor being used. In most cases the thermistor resistance is not measured directly. Instead the thermistor is connected in series to a known resistor in a circuit known as a voltage divider. In Figure 1 we can see a resistor arrangement in which a resistor R1 is followed by the thermistor R(T). AVD Converter RT) V Figure 1. Schematic diagram of circuit used to measure voltage as a function of temperature. Since the two resistors share the same current delivered by the voltage source, V, they are connected in series and the voltage V will be distributed between R1 and R(T). The voltage measured at R(T) has been labeled Vo and is given by the voltage divider equation: RIT) R1 +R(T) In the Figure the voltage Vo is connected to and analog to digital (A/D) converter which is device that samples a voltage and converts it to a digital variable that is loaded to a computer and then processed using Matlab, or other programs. In particular, for the ENG6 Final Project, the voltage supply and A/D conversion is provided by an Arduino microprocessor In order to be able to use the Seinhart-Hart, and hence get useful data form the thermistor, it is necessary to calculate the calibration coefficients A, B and C. Since we have three unknowns we can measure the resistance of the thermistor at three different known temperatures and obtain the system of equations: 1 In(R) In(R1) 1 In(R In(R where R1. R2 and Ra are the temperatures measured at T1. T2 and T3. respectively. However, keep in mind that we have voltage measurements that can be converted to resistance using equation (2) 1. For the Vishay 10K NTC thermistor, using a calibrated thermometer, a thermoelectric cooler and a ohmeter we have obtained the following table Table 1. Callbration measurements for Vishay 10K NTC thermistor 282.9 352.9 R (k2) Calculate the calibration coefficients A B and C of the Steinhart-Hart equation and calculate the residuals between the predicted and experimental measurements. Use fprint to display in separate lines the coefficients and the residuals 2. Using the Arduino commands read oltage ('com#, ,,A#,. now to obtain a time stamp and a while loop we obtained the table of voltage measurements vs. time shown below Table 2: Voltage measurements as function of time for the Vishay 10K NTC thermiator in 8er188 with a 10 resistor and blased with 5V 11.585 Based on the table, do a spline fit to interpolate voltage measurements 3. Convert the interpolated voltages to resistance assuming a 10 series 4. Convert the interpolated resistances to temperature, in degrees Celsius, 5. Identify the maximum overshoot temperature and steady-state every 100 ms. resistor and 5V applied to the series arrangement and plot the temperature vs. time. Remember to label the axes. temperature and use fprints to display the values

Step by Step Solution

There are 3 Steps involved in it

Step: 1

blur-text-image

Get Instant Access to Expert-Tailored Solutions

See step-by-step solutions with expert insights and AI powered tools for academic success

Step: 2

blur-text-image

Step: 3

blur-text-image

Ace Your Homework with AI

Get the answers you need in no time with our AI-driven, step-by-step assistance

Get Started

Students also viewed these Databases questions

Question

a valuing of personal and psychological privacy;

Answered: 1 week ago