For sake of argument, let us say that I am using a temperature sensor. Normally the temperature (output of the A/D) is constant. When the temperature changes, I want to know the rate of change.
For sake of argument, let us say that I am using a temperature sensor. Normally the temperature (output of the A/D) is constant. When the temperature changes, I want to know the rate of change.
Hi,
You need to sample your analog signal at precise intervals. Then, to find the rate of change, it's just a matter of comparing the last reading with the new one.
At what interval you sample depends on the expected rate of change of the signal. If it's temperature you should perhaps sample once every second, minute or even hour but if it's voltage perhaps once every mS or even faster - it all depends on the application.
/Henrik Olsson.
Henrik, Hi!
Just comparing the samples, would require a lot of if then or select case commands. That is why I suggested differentiation. Also now it came to my mind that differentiation could happily be done in hardware with op-amp's. Select the proper R-C values according to the signal and then get an analog value, proportional to the rate of signal change.
I would prefer the digital way though...
Ioannis
Hi Ioannis,
OK, you lost me there.... I'm no math expert either but isn't differentiation the same as derivative ie. the difference between two samples with respect to time. (in this case)
Let's say we read a voltage once every second first reading is 2.2V second reading is 2.5V the rate of change is then 0.3V/second third reading is 4.0V, rate of change is now 1.5V/second and so on.
It may very well be that I misunderstood the original question, if so you'll have to excuse me, but he said he was looking for the rate of change.
/Henrik Olsson.
Well the derivative is a number (no units associated with). So the derivative of a function that represents volts (say the 220*sin(t)) is not volts. Is a simple number (negative or positive) that represents the direction of the change or the will of the function to do a change. The larger positive number the more steep the change is.
Hope it made it a little more clear if I understood it...!
Ioannis
Ioannis,
Really, I think we are basicly saying the same thing here, however.... You wrote:
I think this is where you are wrong. The derivative is the rate of change. But you cant just say that the rate of change is 7. You have to say 7 this per that otherwise it doensn't make sense IMO. For example 1.5V per second or 25degrees per hour or 15m/s per second etc.Well the derivative is a number (no units associated with).
I found this on Wikipedia:
Again, I believe we're meaning the same thing but without assigning units to the numbers they just doesn't make sense.In mathematics, a derivative is the rate of change of a quantity. A derivative is an instantaneous rate of change: it is calculated at a specific instant rather than as an average over time. The process of finding a derivative is called differentiation. The reverse process is integration. The two processes are the central concepts of calculus and the relationship between them is the fundamental theorem of calculus.
/Henrik Olsson.
From what I remember the derivative is the tangent of the curve described by the function and shows the gradient of the tangent line. So a tangent cannot have units.
This is how far I can go...!
I understand what you are trying to say as a rate of change (like the slew rate of an op-amp). But on functions, a derivative I am sure is just a number, showing the direction of the curve at that point.
Maybe a math guru is listening here to give a hand?
Ioannis
P.S. Since all the maths I learned was in greek language, maybe the terms I am using are not the proper ones, so.... I am sorry for that!
Bookmarks