FlexPro
HistoryBase
Engineering
Training
Downloads
FlexPro Support
Knowledge
Community
About us
References
Jobs
General Contact
List Of Retailers
FlexPro Support
EN
DE
FR
Placeholder
Products and Solutions
Support and Downloads
Company
Magazine
Contact Us
Language
MyWeisang

Account settings

Topic

How to create an "accumulate" view of a periodic signal?

Home page Community FPScript How to create an "accumulate" view of a periodic signal?

Viewing 5 posts - 1 through 5 (of 5 total)
  • Author
    Posts
  • #33381

    The signal i have to examine is similar to a dirty rectangular periodic signal.
    I want to extract successive rectangles and paste one upon the other in one diagram.
    The extraction period of one wave may start by an trigger point. The extraction periode lenght can be fixed by no. of indices or time on the x- axis.
    The the diagram has one x-axis for all rectangles, relatively scaled to the start of the extraction periode.
    The view i like to generate is commonly called “accumulate view” at digital storage oszilloscopes.
    I think this should be possible with FPScript.

    #33378
    Bernhard Kantz
    Participant

    In FPScript there are different possibilities to solve this problem. For example you can write a for-loop where you can collect the data of a period. Or you can change the y dataset into a matrix with n values each data series. n is equal to the number of values per interval. If you create a lines diagram the periods lie one upon the other.

    [code]
    //period length: no. of indices
    dim trigger, period, s, dx, i, result
    trigger = 10
    period = 120

    s = Signal[trigger,-1] // signal begins at the trigger point
    Reshape(s.y,{NumberOfValues(s)/period,period})

    //period length: time
    period = 1 //1 second
    dX = Mean(s.x[1, -1] – s.x[0, -1])
    period = Integer32(period / dX)
    Reshape(s.y,{NumberOfValues(s)/period,period})
    [/code]

    #33379

    Thank you, smart, i tried that.
    Unfortunately, i think i did not detail enuogh.

    The e.g. rectangular signal waves are not spaced equidistant!
    With equidistant, sucessive extraction windows the signal overlays sweep through the accumulate view diagramm.

    What i need is that EACH extraction Periode starts at the index (or time) of a LevelCrossing

    #33377

    The signal i have to examine is similar to a dirty rectangular periodic signal.
    I want to extract successive rectangles and paste one upon the other in one diagram.
    The extraction period of one wave may start by an trigger point. The extraction periode lenght can be fixed by no. of indices or time on the x- axis.
    The the diagram has one x-axis for all rectangles, relatively scaled to the start of the extraction periode.
    The view i like to generate is commonly called “accumulate view” at digital storage oszilloscopes.
    I think this should be possible with FPScript.

    #33380
    Bernhard Kantz
    Participant

    Please try the following approach:
    [ol]
    [li]Use LevelCrossings() to find the index positions of all waves. The number of waves is the length of the index series minus one.[/li]
    [li]Use Maximum(idx[1, – 1] – idx[0, -1]) to compute the maximum wave length.[/li]
    [li]create a series with maximum length times number of waves void values.[/li]
    [li]Loop across the source signal, extrace each wave and put it into to proper possion in the result series.[/li]
    [li]Reshape the series into a data matrix.
    The matrix could have one wave in each column. At the end of each column may be some void values.[/li]
    [/ol]

Viewing 5 posts - 1 through 5 (of 5 total)
  • You must be logged in to reply to this topic.