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: 

Superimpose two signals in one period

Solved!
Go to solution

Hello,

 

I am trying to superimpose two different waveforms over one period (0<t<T).

Consider that

The first waveform which is x1 = sin(wt), would be valid for 0 <= t <= T/2.

The second waveform which is x2 = square(wt), would be valid for T/2 <= t <= T.

So, in a way, I need to cut the first signal until T/2 and begin the second one from T/2 until T. 

 

I know there is a similar post here: https://forums.ni.com/t5/LabVIEW/Chopping-a-waveform-for-half-cycle-for-higher-frequencies/td-p/3896....

However, superimposing the second signal does not exist.

 

I would appreciate it if someone could provide me with an answer.

 

Thanks in advance

0 Kudos
Message 1 of 3
(243 Views)
Solution
Accepted by topic author EliioF

Have you looked at the Waveform functions (found, it turns out, on the "Waveform" Palette)?  You can use them to do the following:

  • Generate the first Waveform (look under "Analog Waveforms" and then "Generation").  Figure out what parameters you need to get the points you need for the first half.
  • Generate the second Waveform using the same procedure, changing the parameters to suit the second half.  Note that if you want the waveforms to be "continuous" at their join, you'll need to do some computations (or look at the data points) and specify a starting Phase for the second waveform.
  • Now use the Append function to join these two Waveforms together.

Bob Schor

0 Kudos
Message 2 of 3
(192 Views)

Hello Bob

 

Thank you for this insight. What I did was multiply each waveform by a corresponding square function for half the period.

However, I did notice some "discontinuities" around zero. So since you mentioned "Note that if you want the waveforms to be "continuous" at their join", I will try playing with the phase of the second waveform, then use the append function to join the two together.

 

I am commenting on my case maybe someone might have a similar issue. Thank you for your help.

 

Elio

0 Kudos
Message 3 of 3
(180 Views)