From Friday, April 19th (11:00 PM CDT) through Saturday, April 20th (2:00 PM CDT), 2024, ni.com will undergo system upgrades that may result in temporary service interruption.

We appreciate your patience as we improve our online experience.

LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Finding Time Constant of First Order Model

Hi,

 

I am relatively new to curve fitting in LabVIEW. I am currently working on a project where I gather data from over RS485. This data comes from a sensor which exhibits a first order system behaviour and thus has a time constant equal to RC. Thus, the data that I am gathering, y, is of the form:

 

y = k(1 - e^(-t/T)) 

 

where T is the time constant which I need to find. I have tried using Exponential fit but obviously I cannot since it fits the data in a different way than I want it to. 

How can I fit such data in LabVIEW and then find the time constant from it? I have searched this forum multiple times but I didn't find a satisfactory solution for my question. I have also researched the subject on the internet to no avail. Please help!

 

Thanks.

0 Kudos
Message 1 of 3
(2,956 Views)

@racdar92 wrote:

Hi,

 

I am relatively new to curve fitting in LabVIEW. I am currently working on a project where I gather data from over RS485. This data comes from a sensor which exhibits a first order system behaviour and thus has a time constant equal to RC. Thus, the data that I am gathering, y, is of the form:

 

y = k(1 - e^(-t/T)) 

 

where T is the time constant which I need to find. I have tried using Exponential fit but obviously I cannot since it fits the data in a different way than I want it to. 

How can I fit such data in LabVIEW and then find the time constant from it? I have searched this forum multiple times but I didn't find a satisfactory solution for my question. I have also researched the subject on the internet to no avail. Please help!

 

Thanks.


 

"I have tried using Exponential fit but obviously I cannot since it fits the data in a different way than I want it to. "

 

Please enlighten the obvious for me. [From the LabVIEW Help screens] The exponential fit VI fits points to the following equation:

 

y[i] = aebx[i] + c

 

Your equation, y = k(1 - e^(-t/T)) easily rearranges to  y(t) = -k e^( (1/T) t ) + k , so a=-k , b=1/T , c=k=-a (one less variable to solve for!)

 

Looks the same here.

 

Cameron

 

To err is human, but to really foul it up requires a computer.
The optimist believes we are in the best of all possible worlds - the pessimist fears this is true.
Profanity is the one language all programmers know best.
An expert is someone who has made all the possible mistakes.

To learn something about LabVIEW at no extra cost, work the online LabVIEW tutorial(s):

LabVIEW Unit 1 - Getting Started</ a>
Learn to Use LabVIEW with MyDAQ</ a>
Message 2 of 3
(2,939 Views)

Hi,

Since I am too new to this problem, I was facing similar trouble. The problem can easily resolved by selecting appropriate parameter bounds as input. For example default min max values of offset i.e in your case k is 0. This needs to be changed to appropriate values to obtain required graphs.

 

Regards,

Athul 

0 Kudos
Message 3 of 3
(2,655 Views)