- Subscribe to RSS Feed
- Mark Topic as New
- Mark Topic as Read
- Float this Topic to the Top
- Bookmark
- Subscribe
- Printer Friendly Page
amplitude or envelope
- Mark as New
- Bookmark
- Subscribe
- Subscribe to RSS Feed
- Highlight
- Email to a Friend
- Report Inappropriate Content
04-20-2012 05:01 AM
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?
Solved! Go to Solution.
Re: amplitude or envelope
- Mark as New
- Bookmark
- Subscribe
- Subscribe to RSS Feed
- Highlight
- Email to a Friend
- Report Inappropriate Content
04-20-2012 06:50 AM
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...
Vitaly.
Re: amplitude or envelope
- Mark as New
- Bookmark
- Subscribe
- Subscribe to RSS Feed
- Highlight
- Email to a Friend
- Report Inappropriate Content
04-21-2012 04:21 AM
Thank you for your exellent and patient answer....











