DIAdem

cancel
Showing results for 
Search instead for 
Did you mean: 

Measurement of periodic signal parameters

Solved!
Go to solution

Hi. I need professional help. I am just starting to work with Diadem and would like to understand if it is possible to do the following.

I have periodic pulse signals. There is a task: to define the fronts and the slices of the pulse period (frequency), to calculate the mean for each steady-state value of the signal, etc.

Maybe someone has experience, please advice how is it time-consuming rr easier to do in means of LabVIEW or Excel?

0 Kudos
Message 1 of 16
(3,099 Views)
Solution
Accepted by topic author Homemaks

This is totally possible in DIAdem and will be difficult in Excel depending on the amount of data points you acquire.  There are many ways to find periodic signal programmaticaly and it all depends on specific application.  The best way to get help around here is to provide an example (maybe code, tdms file, or some screenshots) that explain your specific situation.

0 Kudos
Message 2 of 16
(3,087 Views)

I hear you. Now I will prepare the pictures. Is it possible to automate this?

0 Kudos
Message 3 of 16
(3,072 Views)

The necessary calculations are given in the file event.docx

Now all calculations occur in excel vba, but there are errors

0 Kudos
Message 4 of 16
(3,068 Views)

Definitely possible to automate in DIAdem especially since your pulse is pretty well defined.  So now it just depends on how your file looks like and what exactly you look for in a report... Is there 1 pulse or multiple pulses?  Are you looking for average value from steady state and after affects off all pulses averaged or you want an average data point per pulse?  Are t2-t1 and t5-t4 constant for every pulse or do you need to find them?  I understand your attached example, and I do cycle detection and transient response averaging in DIAdem quite often.  It's best to work with an example csv or preferably TDMS file do develop the specific scripts for the data or you can ask how to do a specific thing and get help here (for example CTNV function will clean all values above or below a certain value and ChnNovHandle will "glue" all the gaps left after running the CTNV which is most likely what I'd do).

0 Kudos
Message 5 of 16
(3,057 Views)

This is an example of a technical specification. Real pulses behave not so perfect. In fact, there may be an interference that causes a false alarm. In fact, it is necessary to measure the value of all these parameters for each pulse (with/without the first few pulses) and find the average value for the entire file. All calculations are made for the steady state of the pulse.

0 Kudos
Message 6 of 16
(3,028 Views)

I have a file tdms saved in the Excel.

1. Channel U KY2 D2    trace_fullset

2. Channel Pk2              trace_fullset

0 Kudos
Message 7 of 16
(3,017 Views)

I was able to load the file into diadem and got 8 channel groups.  Each group has 7 channels (TraceFullSet and Trace_Decim1-6).  Could you explain a little more about each channel and what is your vision for result channels after processing in a script?

0 Kudos
Message 8 of 16
(3,008 Views)

Channels U KY2 D2 and Pk2 trace_fullset need at the moment. The other channels are the same values only with fewer measurements. They are needed for a clear view of the behavior of the signal. I only need the calculations, the ones I wrote about above.

0 Kudos
Message 9 of 16
(3,002 Views)

Oki I started off by separating the channels a little bit

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

' LOAD FILE
Call Data.Root.Clear()
Dim FileLocation: FileLocation = "C:\Users\111660\Desktop\" ' CHANGE TO YOUR FILE LOCATION HERE
Call DataFileLoad(FileLocation & "for diadem.xlsx", "")

' DELETE EXTRA DATA
Dim oElementList 
Set oElementList = data.CreateElementList
Call oElementList.Add(Data.Root.ChannelGroups("U KY1 D1"))
Call oElementList.Add(Data.Root.ChannelGroups("U KY2 D1"))
Call oElementList.Add(Data.Root.ChannelGroups("Pk1"))
Call oElementList.Add(Data.Root.ChannelGroups("P in"))
Call oElementList.Add(Data.Root.ChannelGroups("Ra"))
Call oElementList.Add(Data.Root.ChannelGroups("U KY1 D2"))
'Data.Remove(oElementList)

' SETUP VARIABLES
Call Data.Root.ChannelGroups.Add("Results").Activate()
Dim pulseChnl, dataChnl
Set pulseChnl = Data.Root.ChannelGroups("U KY2 D2").Channels("Trace_FullSet")
Set dataChnl = Data.Root.ChannelGroups("Pk 2").Channels("Trace_FullSet")
DIM TenPercent, NintyPercent
Call Calculate("ch("""&pulseChnl.GetReference(eRefTypeNameName)&""") = abs(ch("""&pulseChnl.GetReference(eRefTypeNameName)&"""))")
TenPercent = pulseChnl.Maximum * 0.10
NintyPercent = pulseChnl.Maximum * 0.90

' CALCULATE CHANNELS
Call Calculate("Ch(""Results\Switch1"") = Ch("""&pulseChnl.GetReference(eRefTypeNameName)&""")*(1+CTNV(Ch("""&pulseChnl.GetReference(eRefTypeNameName)&""")<"&TenPercent&"))")
Call Calculate("Ch(""Results\Switch2"") = Ch("""&pulseChnl.GetReference(eRefTypeNameName)&""")*(1+CTNV(Ch("""&pulseChnl.GetReference(eRefTypeNameName)&""")>"&NintyPercent&"))")
Call Calculate("Ch(""Results\Pulse"") = Ch("""&pulseChnl.GetReference(eRefTypeNameName)&""")*(1+CTNV(Ch("""&pulseChnl.GetReference(eRefTypeNameName)&""")<"&NintyPercent&"))")
Call Calculate("ch(""Results\AfterEffectSwitch"") = ch(""Results\Switch1"") + ch(""Results\Switch2"") - ch(""Results\Switch2"")")
Call Calculate("ch(""Results\AftereffectData"") = (ch(""Results\AfterEffectSwitch"") / ch(""Results\AfterEffectSwitch"")) * ch("""&dataChnl.GetReference(eRefTypeNameName)&""")")
Call Calculate("ch(""Results\PulseData"") = (ch(""Results\Pulse"") / ch(""Results\Pulse"")) * ch("""&dataChnl.GetReference(eRefTypeNameName)&""")")

The actual calculations are in the last 6 lines and here are the results:

Capture111.JPGThe t4 - t5 are all separated in 1 channel and can be averaged into 1 aftereffect.  Is this the right track here?  Feel free to try the code and see if it gets you started on some automation

0 Kudos
Message 10 of 16
(2,991 Views)