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: 

A simple problem in Wave Generation

Hi there,

             

              I am new to LabVIEW. 

 

              I just want to generate a wave whose frequency is higher than fs/2 using the signal Generation VI and take 10 samples. 1.jpg

 

 

 

When I raised the frequency above 500Hz, the Generator on the top refused to work, giving me an erro.

 

Could anyone give me a hand?

 

Thanks in advance.

0 Kudos
Message 1 of 5
(2,776 Views)

@Dirichlet123 wrote:
[...]whose frequency is higher than fs/2 [...]

Ever heared of Nyquist theorem? If not, read about it. It explains the background and is a physical constraint.

Be glad that the waveform generation VI prevents you from trying by throwing an error.

 

Norbert

Norbert
----------------------------------------------------------------------------------------------------
CEO: What exactly is stopping us from doing this?
Expert: Geometry
Marketing Manager: Just ignore it.
0 Kudos
Message 2 of 5
(2,768 Views)

Uhm... I did know that. I intended to violate the Nyquist theorem to see the aliasing.

I just want to take 10 discrete samples from the underlying signal. Thanks anyway!

 

0 Kudos
Message 3 of 5
(2,762 Views)

To see aliasing, you have to "acquire" a signal. What you can do:

Create a signal with higher frequency and the use "resampling" breaking Nyquist.

 

Norbert

Norbert
----------------------------------------------------------------------------------------------------
CEO: What exactly is stopping us from doing this?
Expert: Geometry
Marketing Manager: Just ignore it.
0 Kudos
Message 4 of 5
(2,757 Views)

Thanks, it works. But is there a way to generate an array consisting 10 samples regardless of what sampling frequency I use?

 

Say I have a analog signal y=sin(2*pi*f0*t) ,I take 10 samples using the sampling frequency fs, so the outputs are y[k]=sin(2*pi*f0*k/fs). 

0 Kudos
Message 5 of 5
(2,747 Views)