Reading the continuously changing temperature

Go To Last Post
24 posts / 0 new
Author
Message
#1
  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

I already display the temperature with Arduino Uno

Temperature has a fluctuation

1.  I need to display this minimum and maximum level of this period

2.  I need to display minimum fluctuation period of time (steady state period)

 

Could you please guide me

Attachment(s): 

This topic has a solution.
Last Edited: Fri. Jun 24, 2022 - 11:24 PM
  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

Glamo wrote:
steady state period

 

Unclear. We all witness daily period (the most famous one), so this period of yours: what it is for, please.

 

Do you have any reference to clarify terms, please.

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

Do you have any hard limits for what determines "Your Steady State" ? For example: (ΔT < 1°C) for minimum of 1min.

You should think clearly about this because otherwise you may get false results generated by small amounts of noise.

 

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

 of this period

What are you talking about?  The temp you show is not periodic (does not repeat)

Are you not paying attention to what you write?

(steady state period)

What are you talking about?? When do you consider your graph to be steady state?

You need to start over with your explanations and why you need this. 

 

When in the dark remember-the future looks brighter than ever.   I look forward to being able to predict the future!

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

avrcandies wrote:

What are you talking about?...

Are you not paying attention to what you write?...

What are you talking about??...

 

Why so rude?

#1 Hardware Problem? https://www.avrfreaks.net/forum/...

#2 Hardware Problem? Read AVR042.

#3 All grounds are not created equal

#4 Have you proved your chip is running at xxMHz?

#5 "If you think you need floating point to solve the problem then you don't understand the problem. If you really do need floating point then you have a problem you do not understand."

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

N.Winterbottom wrote:

Do you have any hard limits for what determines "Your Steady State" ? For example: (ΔT < 1°C) for minimum of 1min.

You should think clearly about this because otherwise you may get false results generated by small amounts of noise.

 

Thank you very much.

Please review my attachment.

I have no hard limits. I need to find it.

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 1

But if you plan to be an engineer you have to understand "specifications". You do need to set a limit for what's meant by "steady state". Do you mean (for example) "the length of time the temp is relatively stable and does not vary by more than one degree up or down"? (you set that 1 degree as your specification - perhaps it's +/- 2deg? Perhaps it's only +/- 0.5deg?). Once you have made a specification for what you want to achieve, what your limits are and so on then start to think, if there were no computer involved in this, how you'd do it yourself. Say yo are reading the temperature every 5 seconds if it start at 21.3 (C) then 5 seconds later if it's 21.4 (C) (which would actually be a pretty rapid change of temperature so maybe every 5 seconds is too fast?) then it's only changed 0.1 so you can consider the current "steady state" to be "two ticks" (10 seconds long) perhaps it just varies up and down by 0.1's over the next 18 readings so "steady state" has lasted 20 periods (100 seconds) but now maybe it is 22.4. That is 1.1 above where you started counting this period so the steady state has ended and the longest so far is 20 readings. But now start again with the new 22.4 as "middle" so it can Vary down to 21.4 and up to 23.4. Maybe 37 readings later it's out of this range so start over but now the lobgest "steady state" you've seen is 37 not 20 readings long (37 * 5s is 185 seconds, just over 3 minutes). Perhaps the next period with variance not going outside +/- is only 17 readings so 37 remains the longest.

 

All this started by you specifying the limit for what you consider "steady". Only you can do that based on your knowledge of how the temperature fluctuates. Maybe we're talking about a furnace that varies 20C to 1500C and it can jump 17C in one 5 second period? In that case +/- 1 may not be appropriate and, equally, 5 seconds between readings may not be appropriate.

 

So you "specify" , then you "design", maybe running the same kind of "thought experiment" as I just did and when you finally have a clear view and plan for what needs to be achieved and how you'll do it you can start writing program code. 

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

Brian Fairchild wrote:

avrcandies wrote:

What are you talking about?...

Are you not paying attention to what you write?...

What are you talking about??...

 

Why so rude?

Thank you 

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

Brian Fairchild wrote:

avrcandies wrote:

What are you talking about?...

 

Why so rude?

+1

 

We've been here before.

 

The simple rule is that we are only here to help, so only post something if it actually helps the OP towards their goal.

 

We were all beginners once and we all had to learn. 

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

 of this period

What are you talking about?  The temp you show is not periodic (does not repeat)

This response makes complete sense since the signal is not periodic, so what are you talking about asking about the min and max of the period?

 

(steady state period)

What are you talking about?? When do you consider your graph to be steady state?

This response makes complete sense since the graph does not appear to be steady state, so what are you talking about?

 

It appears OP needs to start over with some more sensible or detailed explanations that actually match what he is showing

There was nothing rude asking him how he inferred these things from the graph.

 

When in the dark remember-the future looks brighter than ever.   I look forward to being able to predict the future!

Last Edited: Sun. Jun 26, 2022 - 03:23 PM
  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

clawson wrote:
stable

Thank you very much Clawson.

First off all English is not my native language.

I'm sorry for using "steady state" term.

I may say "lowest fluctiation" .

Temperature maximum level is 500°C.

Fluctiation may vary 5°C to 50°C. I need to find time duration for minimum fluctuation. Also need to find the minimum and maximum temperature at that time period.

 

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

Fluctiation may vary 5°C to 50°C. I need to find time duration for minimum fluctuation. Also need to find the minimum and maximum temperature at that time period.

Well, what you are now talking about already makes much more sense, however it is a tricky problem, since a min fluctuation must be evaluated over a non-stop rolling set of data.  You need to record the  maximum min and the minimum max and each of their times in a continual sense.  Time to dwell a bit to think of clever ways.

 

Also, why do you need this--a rather odd thing to look for?

 

display the temperature with Arduino Uno

Ok, fine, but then your graph mentions at the end of time...what are you talking about since there is no ending (or do the temperature readings stop)?  

When in the dark remember-the future looks brighter than ever.   I look forward to being able to predict the future!

Last Edited: Fri. Jun 24, 2022 - 08:09 PM
  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

If those fluctuations in your graph are really 5°C to 50°C then perhaps you are sub-sampling the temperature. Look - every single data point is a point-of-infection.

 

      dT

Ie.   --  Changes sign at every data point. 

      dt

 

Can you post a small table of actual readings worthy of analysis ?

 

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0


inflection... btw. temperature is not a monotone function, thus: more fun.

 

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

Note also that

You need to record the A) maximum min and the B) minimum max and each of their times in a continual sense. 

You also need some type of state machine or state progression logic, since these items (A & B) need to be seen "together" in one cycle & not separated into different parts of the wave.

 

you could prob have some logic to find the max or min (whichever is encountered first)  using a "typical" implementation followed by finding the opposite half

When in the dark remember-the future looks brighter than ever.   I look forward to being able to predict the future!

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

avrcandies wrote:

Fluctiation may vary 5°C to 50°C. I need to find time duration for minimum fluctuation. Also need to find the minimum and maximum temperature at that time period.

Well, what you are now talking about already makes much more sense, however it is a tricky problem, since a min fluctuation must be evaluated over a non-stop rolling set of data.  You need to record the  maximum min and the minimum max and each of their times in a continual sense.  Time to dwell a bit to think of clever ways.

 

Also, why do you need this--a rather odd thing to look for?

 

display the temperature with Arduino Uno

Ok, fine, but then your graph mentions at the end of time...what are you talking about since there is no ending (or do the temperature readings stop)?  

Thank you Avrcandies,

"At the end of time= 10 second

This reply has been marked as the solution. 
  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

So start at the beginning:

  • Find the first min or max peak (which can be tricky, but you will choose some common method)   ,also record the time (datapoint)
  • Find the next corresponding opposite (max or min), also record the time (datapoint)
  • Now take the absolute (positive) difference between these two points height, this is the delta.
  • If delta is larger than the current champion pair, delta, ignore these points.
  • If smaller, then put these points (and times) in the champion storage.
  • Continue on with the previous steps, until looked at all data
  • Crown the champion pair.  The time period is the difference in their time values

 

You can also do this with nonstop streaming data, though it is somewhat more challenging to keep track of everything.  Part of the trouble is you might still consider the champion from one hour ago  to be the current champion, when you really desire to forget about him and find a more recent one.  

You might think that you could just look at the time & if the current champ is more than 10 seconds old, clear him out.  However, that is not quite right since the newer champ might have occurred 7 seconds ago and you overlooked him (he wasn't winning) since you are only now clearing out the old winner and the 7 sec winner has already gone home.  

When in the dark remember-the future looks brighter than ever.   I look forward to being able to predict the future!

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

avrcandies wrote:

So start at the beginning:

  • Find the first min or max peak (which can be tricky, but you will choose some common method)   ,also record the time (datapoint)
  • Find the next corresponding opposite (max or min), also record the time (datapoint)
  • Now take the absolute (positive) difference between these two points height, this is the delta.
  • If delta is larger than the current champion pair, delta, ignore these points.
  • If smaller, then put these points (and times) in the champion storage.
  • Continue on with the previous steps, until looked at all data
  • Crown the champion pair.  The time period is the difference in their time values

 

You can also do this with nonstop streaming data, though it is somewhat more challenging to keep track of everything.  Part of the trouble is you might still consider the champion from one hour ago  to be the current champion, when you really desire to forget about him and find a more recent one.  

You might think that you could just look at the time & if the current champ is more than 10 seconds old, clear him out.  However, that is not quite right since the newer champ might have occurred 7 seconds ago and you overlooked him (he wasn't winning) since you are only now clearing out the old winner and the 7 sec winner has already gone home.  

Thanks again Avrcandies ,it is 01a.m.I will write tomorrow 

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

If you have streaming, nonstop data, you can form a 10  second in-out buffer (always contains the last 10 sec of data), then rerun the entire method over and over, each second (or whenever you get a new sample). That is sort of brute force, since you are redoing a lot of the same work (finding peaks) in an overlapping sense.  With more complicated arrangement, it could prob be done with less waste.

 

BEWARE: this suggestion and the earlier one may be fooled by chopping off old and incoming data.  You must never treat the oldest or newest data point as a peak (min or max) it must be preceded or followed by a data point the is not at the peak...for example, say the data just barely started to rise from 1 then got cut off at 3 by the ending.  It may look like a small delta of 2, but in fact was actually still rising up to 8, but got cut off. So it may not be proper to say it was the smallest change, it just never had time to finish changing.

When in the dark remember-the future looks brighter than ever.   I look forward to being able to predict the future!

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

Beware, all that should be in a stationary state, otherwise you may have monotone situations as in my pictures.

 

Good luck, and good logic!

 

Edit: For lowest fluctuation of yours, choose time period in seconds, and in one period do average.

 

Calculate Delta T = abs (Tpeak - Taverage) ), the period with the smallest Delta T is a winner.

Last Edited: Sat. Jun 25, 2022 - 07:21 AM
  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

N.Winterbottom wrote:
Can you post a small table of actual readings worthy of analysis ?

  1. Do generate some repeatable test data and run your trial algorithm on that instead of live data. You'll detect and fix bugs; far, far, quicker that way.
  2. Write the algorithm on the PC instead of AVR. Again; you'll detect and fix bugs; far, far, quicker that way.

 

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

avrcandies wrote:

If you have streaming, nonstop data, you can form a 10  second in-out buffer (always contains the last 10 sec of data), then rerun the entire method over and over, each second (or whenever you get a new sample). That is sort of brute force, since you are redoing a lot of the same work (finding peaks) in an overlapping sense.  With more complicated arrangement, it could prob be done with less waste.

 

BEWARE: this suggestion and the earlier one may be fooled by chopping off old and incoming data.  You must never treat the oldest or newest data point as a peak (min or max) it must be preceded or followed by a data point the is not at the peak...for example, say the data just barely started to rise from 1 then got cut off at 3 by the ending.  It may look like a small delta of 2, but in fact was actually still rising up to 8, but got cut off. So it may not be proper to say it was the smallest change, it just never had time to finish changing.

 

Thank you again Avrcandies,

You say "With more complicated arrangement, it could prob be done with less waste." Please explain, do you have any I idea about complicated arrangement.

And you say "BEWARE..." I think this may key point also. Mentioned data must be settle down to "our" reasonable level within 5 seconds approx. if not, say, within 10sec, means operation is faulty. 

 

I understand "grohote's" "Delta T", I have the same. Maybe I'm a little hasty, but I would appreciate it if you help with the code

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

I am late to the party... is this a furnace controller which switches power to the heater at optimum timing to reduce temperature variations?

Ross McKenzie, Melbourne Australia

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

valusoft wrote:

I am late to the party... is this a furnace controller which switches power to the heater at optimum timing to reduce temperature variations?

Hello Ross,

Thank you very much for your interest.

Actually I have no detailed information about the requirement. My friend ask if it is possible. As far as I know that they are dealing with aluminum coating and there is no closed place for the heat stability. Since the specs of the organic material used in the coating may vary, and they want to know this measurement for adjustment supply speed of coating material and etc.