- #1
StumpyHuck29
- 2
- 0
I truly have no idea what I am doing and I am awful at MATLAB. My senior elective Digital Communications course has been plaguing me with it.
Use MATLAB to implement a binary continuous-phase FSK modulator. Make the symbols 100 samples long and the carrier have 10 samples/cycle. One approach is to first generate a data signal, data(k), in which each bit value(+1 or -1) is repeated 100 times. Next, generate the phase of the FSK signal as:
phi(k)=phi(k-1)+2*pi/10+data(k)*h*pi/100
where the second term on the right is the phase increment for each sample due to the carrier and the third term is the phase increment due to the data. The FSK signal is s(k)=cos[phi(k)]
a)Generate Sunde's FSK(h=1) for 10000 random data bits. Plot and estimate the power spectrum of the signal, i.e. plot 20*log10(abs(fft_output))
All shown above
My attempt:
h=1;
data= [1 -1 1 -1 1 -1 1 1 -1 1
1 -1 1 -1 -1 1 -1 1 1 1
-1 -1 -1 1 1 1 -1 1 -1 1
-1 1 -1 1 1 1 -1 -1 1 -1
1 1 -1 1 -1 -1 1 -1 1 1
-1 1 -1 1 1 1 -1 -1 -1 -1
1 -1 1 -1 1 -1 -1 1 -1 1
1 -1 -1 -1 1 -1 1 1 1 1
1 1 1 1 -1 1 -1 1 1 -1
-1 1 1 -1 1 -1 1 -1 -1 -1];
phase=data-1+2*pi/10+data*h*pi/100;
s=cos(phase);
fs=fft(phase);
plot(fs);
Homework Statement
Use MATLAB to implement a binary continuous-phase FSK modulator. Make the symbols 100 samples long and the carrier have 10 samples/cycle. One approach is to first generate a data signal, data(k), in which each bit value(+1 or -1) is repeated 100 times. Next, generate the phase of the FSK signal as:
phi(k)=phi(k-1)+2*pi/10+data(k)*h*pi/100
where the second term on the right is the phase increment for each sample due to the carrier and the third term is the phase increment due to the data. The FSK signal is s(k)=cos[phi(k)]
a)Generate Sunde's FSK(h=1) for 10000 random data bits. Plot and estimate the power spectrum of the signal, i.e. plot 20*log10(abs(fft_output))
Homework Equations
All shown above
The Attempt at a Solution
My attempt:
h=1;
data= [1 -1 1 -1 1 -1 1 1 -1 1
1 -1 1 -1 -1 1 -1 1 1 1
-1 -1 -1 1 1 1 -1 1 -1 1
-1 1 -1 1 1 1 -1 -1 1 -1
1 1 -1 1 -1 -1 1 -1 1 1
-1 1 -1 1 1 1 -1 -1 -1 -1
1 -1 1 -1 1 -1 -1 1 -1 1
1 -1 -1 -1 1 -1 1 1 1 1
1 1 1 1 -1 1 -1 1 1 -1
-1 1 1 -1 1 -1 1 -1 -1 -1];
phase=data-1+2*pi/10+data*h*pi/100;
s=cos(phase);
fs=fft(phase);
plot(fs);