Hi! can you guide me to plot power spectra of ASK signal?

I have:
- Number of data bits (1s and 0s) = 100
- Sampling frequency, fs = 100Hz
- Number of data points (samples) = 100 X fs = 10000 data points
- Block size of the FFT, N = 4096
I solve it many days, but still I can't solve it. Could you help me as fast as possible? I really need it now ! Thanks !!!

3 件のコメント

Rick Rosson
Rick Rosson 2014 年 9 月 28 日
編集済み: Rick Rosson 2014 年 9 月 28 日
What is the data rate R (in bits per second)?
Ny Sokunthea
Ny Sokunthea 2014 年 9 月 28 日
Data rate = 10000 bps
Rick Rosson
Rick Rosson 2014 年 9 月 28 日
編集済み: Rick Rosson 2014 年 9 月 28 日
I don't think that is correct. You mentioned in the comments below that the bit time Tb is 1 second per bit. So that implies that the data rate R = 1/Tb is 1 bit per second.

サインインしてコメントする。

回答 (1 件)

Rick Rosson
Rick Rosson 2014 年 9 月 28 日
編集済み: Rick Rosson 2014 年 9 月 28 日

0 投票

Here's a start:
Tb = 1; % seconds per bit
R = 1/Tb; % bits per second
M = 100; % bits
b = ( rand(M,1) > 0.5 );
figure;
stem(0:M-1,b);
d = 1 - 2*b;
x = repmat(d,100,1);
x = x(:);
Fs = 100; % samples per second
N = Fs*M/R; % samples
dt = 1/Fs;
t = dt*(0:N-1)';
figure;
plot(t,x);

7 件のコメント

Ny Sokunthea
Ny Sokunthea 2014 年 9 月 28 日
I have: - Number of data bits (1s and 0s) = 100 - Sampling frequency, fs = 100Hz - Number of data points (samples) = 100 X fs = 10000 data points - Block size of the FFT, N = 4096 Power spectra of BASK signal produced by square wave as the modulating signal for varying modulation frequency: (a) fc 4 Hz and Tb 1 s;
The result is:
How can I get the same result to this one? Please help me as fast as possible! Thanks!!
Rick Rosson
Rick Rosson 2014 年 9 月 28 日
What have you done so far? Please post your code.
Rick Rosson
Rick Rosson 2014 年 9 月 28 日
編集済み: Rick Rosson 2014 年 9 月 28 日
Have you reviewed the code that I posted (above)? Have you tried it in MATLAB? It provides a good start on what you need to do.
This problem looks suspiciously like homework. I am not going to do your homework for you, but I am happy to help you figure it out.
Ny Sokunthea
Ny Sokunthea 2014 年 9 月 28 日
編集済み: Ny Sokunthea 2014 年 9 月 28 日
I didn't start it yet because I don't understand how to plot it. In that book introduces me to use fft algorithm.
I did look at fft function in matlab, but it seems not related to Number of data bits and Block size of the FFT, N.
Rick Rosson
Rick Rosson 2014 年 9 月 28 日
編集済み: Rick Rosson 2014 年 9 月 28 日
  1. Have you tried the code that I posted? Do you understand each line of this code and what the script is doing overall?
  2. Yes, you may want to use the fft function. Alternatively, or in addition, you may also want to consider using the pwelch function.
Ny Sokunthea
Ny Sokunthea 2014 年 9 月 29 日
Yes, I tried your code last night. I understand yours. But I don't know how to use fft function to plot power. Please guide me with this function.
Rick Rosson
Rick Rosson 2014 年 9 月 30 日
編集済み: Rick Rosson 2014 年 9 月 30 日
Based on your comment above, and according to the plot that you attached, it appears that you need to move the signal from the baseband to the passband at a center frequency of Fc = 4 Hertz. If you start with the code that I posted, you should be able to up convert the baseband signal x to the passband using a pure tone cosine wave to modulate the signal.
Once you have done that, you can then transform your passband signal from the time domain to the frequency domain using either fft or pwelch.
Good luck!

サインインしてコメントする。

カテゴリ

質問済み:

2014 年 9 月 28 日

編集済み:

2014 年 9 月 30 日

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!

Translated by