Question: Design a controller for a temperature control lab arduino model, the input must be voltage and the output temperature, the set room is 2 3
Design a controller for a temperature control lab arduino model, the input must be voltage and the output temperature, the set room is C and the Temperature that must reach is C must raise quickly without overshoot and considers constants such as the gain of the transistor and its emissivity in reference to this model script in Matlab:
close all; clear all; clc
include tclab.m for initialization
tclab;
dispTest Heater
dispLED Indicates Temperature'
figure
ts ;
ts ;
hs ;
hs ;
initial heater values
ht;
ht;
hht;
hht;
for i :
tic;
if i
dispTurn on heater to
ht;
hht;
end
if i
dispTurn off heater
ht;
hht;
end
if i
dispTurn on heater to
ht;
hht;
end
if i
dispTurn off heaters'
ht;
ht;
hht;
hht;
end
read temperatures
t TC;
t TC;
LED brightness
brightnesst; degC off, degC full brightness
brightnesst; degC off, degC full brightness
brightness maxbrightnessbrightness;
brightness maxminbrightness; limit
ledbrightness;
plot heater and temperature data
hs hsht;
hs hsht;
ts tst;
ts tst;
n lengthts;
time linspacenn;
clf
subplot
plottimetsr'MarkerSize',;
hold on
plottimetsb'MarkerSize',;
ylabelTemperature degC
legendTemperature 'Temperature 'Location','NorthWest'
and also this matlab script:
function dTdt arduinoodetimeTheater
mass
m ; kg gm
heat transfer coefficient
h ; WmK
surface area
A ; m
heater input
alpha ; Wheater input
heat capacity
Cp ; JkgK
approximate time constant
tau mCphA;
dispTime constant: numstrtau
ambient temperature
Ta ; K
heater ;
dTdt hA Ta T alpha heatermCp;
end
subplot
plottimehsr'LineWidth',;
hold on
plottimehsb'LineWidth',;
ylabelHeater V
xlabelTime sec
legendHeater 'Heater 'Location','NorthWest'
drawnow;
t toc;
pausemaxt
end
dispTurn off heaters'
h;
h;
dispHeater Test Complete'
Step by Step Solution
There are 3 Steps involved in it
1 Expert Approved Answer
Step: 1 Unlock
Question Has Been Solved by an Expert!
Get step-by-step solutions from verified subject matter experts
Step: 2 Unlock
Step: 3 Unlock
