DIAdem

cancel
Showing results for 
Search instead for 
Did you mean: 

Finding a Voltage Glitch

Solved!
Go to solution

If someone could help, I would greatly appreciate it.

 I'm trying to find the time it takes for  the first voltage glitch ("Clutch Amps")  from when the "Clutch Voltage" drops .  

Also the Voltage at the point of the glitch of the "Clutch Amps" .  Has anyone run into this type of problem before?

 

Thank you in advance for any help!

 

I have attached the  file and a graphic of what I'm looking to do..

 

 

 

Thanks  !!

SDuff

Download All
0 Kudos
Message 1 of 5
(4,162 Views)

Hello SDuf,

could you please post the complete TDM data set ? Its a pair of files. (TDM+TDX). The TDM file provides only the metadata.

Andreas

0 Kudos
Message 2 of 5
(4,148 Views)

Sorry ..Here they are.

 

Thanks for looking..

 

 I had to Zip the file....

 

 

 

SDuff

0 Kudos
Message 3 of 5
(4,128 Views)
Solution
Accepted by topic author SDuff

Hello SDuf,

please see the little script below providing a suggestion how to solve this :

'-------------------------------------------------------------------------------
'
'-------------------------------------------------------------------------------
Option Explicit  'Forces the explicit declaration of all the variables in a script.

Call LogFileDel()
Call Main()
'-------------------------------------------------------------------------------
'
'-------------------------------------------------------------------------------
Function Main()
  Dim     sgDataFile  : sgDataFile = CurrentScriptPath & "Clutch_do_sn001_02-19-2016_11-05-43-505.tdm"
  Dim     oGroupR,oChnSignal,oChnSmooth,oChn1Der
  Dim     FreqLimit,FilterDegree,oaEvents
  '----------------------------------------------------------
  '
  '----------------------------------------------------------
  Call Data.Root.Clear()
  Call DataFileLoad(sgDataFile,"TDM","Load")
  '----------------------------------------------------------
  '
  '----------------------------------------------------------
  Set oGroupR     = Data.Root.ChannelGroups.Add("Results")
  Set oChnSignal  = Data.GetChannel("Clutch (amps)")
  Set oChnSmooth  = oGroupR.Channels.Add(oChnSignal.Name&"_Smooth",DataTypeChnFloat64)
  Set oChn1Der  = oGroupR.Channels.Add(oChnSignal.Name&"First_Der",DataTypeChnFloat64)
  
  '----------------------------------------------------------
  ' Preprocess clucth (amps) signal
  '----------------------------------------------------------
  FreqLimit     =  100.
  FilterDegree  = 4
  Call ChnFiltCalc("",oChnSignal,oChnSmooth,"IIR","Bessel","Low pass",FilterDegree,FreqLimit,0,0,1.2,25,"Hamming",1,1)
  Call ChnSmooth(oChnSignal,oChnSmooth,50,"maxNumber")  
  Call ChnSmooth(oChnSmooth,oChnSmooth,50,"maxNumber")  
  '  calculate first derivative to then identify the area 
  ' where the amps signal value decreases
  Call ChnDeriveCalc("",oChnSmooth,oChn1Der)
  ' pre-process derivative to better identify the area we're looking for
  Call ChnFiltCalc("",oChn1Der,oChn1Der,"IIR","Bessel","Low pass",FilterDegree,FreqLimit,0,0,1.2,25,"Hamming",1,1)
  Call ChnSmooth(oChn1Der,oChn1Der,50,"maxNumber")  
  Call ChnSmooth(oChn1Der,oChn1Der,50,"maxNumber")  
  ' calculate area where first derivative is negative
  oaEvents = ChnEventDetectionWindow(,oChn1Der,NULL,-0.05,0.05,0.05)
  LogFileWrite("Intervall Indices:     "&oaEvents(0,0)& vbTab &oaEvents(0,1))
  LogFileWrite("Intervall time values: "&Str(oaEvents(0,2),"autoadj")& vbTab &str(oaEvents(0,3),"autoadj"))
End FUnction
Message 4 of 5
(4,116 Views)

AndreasH_Ha 

 

Thank you so much for your help. This works perfictly !!!

 

This Forum is always a great source of help!!

 

Thanks Again !!!!!!

 

SDuff

 

0 Kudos
Message 5 of 5
(4,092 Views)