Multifunction DAQ

cancel
Showing results for 
Search instead for 
Did you mean: 

Signal generation of A1*sin(w1t) + A2*sin(w2t)

 

Dear Sir,

 

Could you teach me how I can generate the combination of two sine waves: A1*sin(w1t) + A2*sin(w2t) ?

Thank you.

 

Soobum Lee

0 Kudos
Message 1 of 6
(4,892 Views)

Hi Soobum,

 

Provided you are using LabVIEW, I would use the Multitone Generator.vi:

 

 

 

 LocationMultiToneDesc

 

 

This will take an array of the frequencies, amplitudes, and phases that you want to use and can easily be scaled to include more than two sine waves.  Let me know if you have any questions, thanks for posting!

 

-John 

 

 

Message Edited by John P on 11-07-2008 10:08 AM
Message Edited by John P on 11-07-2008 10:09 AM
John Passiak
Download All
0 Kudos
Message 2 of 6
(4,880 Views)

I found multitone generator and tried as shown.

 

All I need to set is the amplitudes and the frequencies of two sine waves.

But when I run this it gives an error message saying:

 

Error-20002 occurred at "NI_MAPro.lvlib:m_MultitoneParamsCheck.vi" when called from "NI_MAPro.lvlib:Multitone Generator.vi:3"

Possible reason(s):

Analysis: The input sequences must be the same size.

 

How can I resolve this?

Thank you.

 

 

 

 

Soobum Lee

0 Kudos
Message 3 of 6
(4,851 Views)
You have provided only two input arrays with 2 elements and are letting the tone phases input be the default. The default has 4 elements in the array so there is a mismatch.
Message 4 of 6
(4,840 Views)

 

I added two more element for amplitude and frequency and it works. Thank you.

0 Kudos
Message 5 of 6
(4,828 Views)

Another option would be to wire the phase input with a constant array of zeroes.  The array should be the same size as your other two inputs to avoid the error you initially received.

 

-John 

John Passiak
0 Kudos
Message 6 of 6
(4,819 Views)