Sign In

Don't have a Xilinx account yet?

  • Choose to receive important news and product information
  • Gain access to special content
  • Personalize your web experience on Xilinx.com

Create Account

Username

Password

Forgot your password?
XClose Panel
Xilinx Home
Reply
Regular Visitor
weilings
Posts: 56
Registered: ‎03-08-2012
0
Accepted Solution

amplitude or envelope

When I connect 'sine wave' module directly to the 'scope'module and all the parameters were set as the follow picture ,why the scope shows that the wave's envelope is a sine wave ,not the wave itself is a sine wave?

QQ截图20120420195410.png
Super Contributor
vlavruhin
Posts: 195
Registered: ‎12-08-2010

Re: amplitude or envelope

Hi.

 

And welcome to the wonderful world of digital signal processing! :-)


weilings wrote:

When I connect 'sine wave' module directly to the 'scope'module and all the parameters were set as the follow picture ,why the scope shows that the wave's envelope is a sine wave ,not the wave itself is a sine wave?


Short answer: it's wave itself (not envelope). And it's perfect digital sine wave (in sense of Nyquist–Shannon sampling theorem). Set Sample Time of 'Sine Wave' block equal to 2*pi / 100 (for example). Does it look better?

 

The issue is connected with Sample Time for this particular case.

Sample time of 'Sine Wave' block (i.e., time period of sampling values of sine function) is zero. It means that Simulink will try to guess (or propagate from other blocks) proper sample time for your model. But there are no clues. Except one: frequency of Sine Wave.

 

Have a look at Scope waveform. Sample time is time between two peaks of "amplitude modulated triangles" (as we see it; but actually it's sine) in that case.

Question: how to choose proper sample time in order to be able to represent analog sine wave (which has frequency W rad/sec) by discrete samples? Answer is given by Nyquist–Shannon sampling theorem.

Short and simple answer (not considering non-baseband sampling) is following:

W / (2*pi) < fs/2,

fs=1/ts - sampling frequency in Hz,

ts - sample time:

 

ts < pi / W.

 

If we have sine wave with frequency W rad/sec and would like to sample it with N samples per period, then we should choose sample time using following equation:

ts = 2*pi / (W * N).

 

If N>2, then we can perfectly reconstruct (in theory) analog sine wave from its discrete samples.

 

Well, try to play with different ts settings using this equation and get the idea. In your case frequency W = 1 rad/sec, so you can choose different number of samples N per sine period. But remember, that in theory even N=3 is enough to represent sine wave (though it looks strange).

 

Hope, this explanation will help you to understand sampling process...

Best Regards,
Vitaly.
Regular Visitor
weilings
Posts: 56
Registered: ‎03-08-2012
0

Re: amplitude or envelope

Thank you for your exellent and patient answer....