How to generate 2-FSK signal from the bit stream(symbols)

fsk

I’m trying to generate a 2-FSK Signal, Let’s just consider the following,

Symbol Rate : 1 MS/s
Sample Rate : 10 MHz,
Frequency Deviation: 150 KHz & -150 KHz

And assume I’ve 100 symbols : {1,0,0,0…..0}

Now, I want to generate a FSK signal from the above parameters, along with a Gaussian filter. How do I start from here?

Edit:

I’m trying to implement this on C#, I found the following formula,

enter image description here

from the formula, f1 & f2 are the frequency deviations but I'm not sure about the t?

Thanks for your time..:)

Best Answer

Your modulated signal needs to look like this

$$s(t)=A\sin[2\pi(f_0\pm \Delta f)t]$$

where you choose the positive sign for a '1' and the negative sign for a '0' (or the other way around). \$\Delta f\$ is the frequency deviation from the mean frequency \$f_0\$. The independent time variable \$t\$ is sampled in your case, so \$t=n/f_s\$, \$n=0,1,\ldots\$, where \$f_s\$ is the sampling frequency.

Note that with your symbol rate one symbol interval lasts \$10^{-6}\$ seconds. The difference between the two frequencies of the FSK signal is \$2\Delta f=300\$ kHz. This means that within 1 symbol interval, the higher frequency signal traverses \$0.3\$ cycles more than the lower frequency interval. This is definitely not enough. Normally, the minimum frequency distance should be such that the higher frequency signal traverses 1 cycle more per symbol interval than the lower frequency signal. This means the the frequency difference should be \$2\Delta f=1\$ Mhz (if your symbol rate is 1 Mbaud).

EDIT: In the comments to this answer it was pointed out that I might not have sufficiently motivated my statement that the frequency separation suggested by the OP is insufficient. I'll try to fix this in the following paragraphs. (Please note that this topic usually fills several pages of books on digital communications, so excuse me if you feel I'm being too concise or not clear enough.)

If \$T\$ denotes the length of a symbol interval, and \$s_1(t)\$ and \$s_2(t)\$ are the two FSK signals with frequencies \$f_1=f_0-\Delta f\$ and \$f_2=f_0+\Delta f\$, then their similarity can be measured in terms of their correlation coefficient \$r\$. It can be shown (e.g., Digital Communications by Glover and Grant) that $$r = \frac{2}{T}\int_{0}^T\cos(2\pi f_1t)\cos(2\pi f_2 t)dt$$

Ideally, \$s_1(t)\$ and \$s_2(t)\$ should be orthogonal (i.e., \$r=0\$). Then the FSK modulated signal can be detected coherently with minimum possible error probability. However, a small correlation coefficient is also important for non-coherent detection. In traditional binary FSK ("Sunde's FSK") the frequency separation \$2\Delta f\$ is chosen as \$2\Delta f=1/T\$ (this is what I referred to above). In this case orthogonality is guaranteed. For successful coherent as well as for non-coherent detection of FSK, a minimum frequency separation of \$2\Delta f=1/T\$ is recommended (cf. Digital Communications by Glover and Grant).

(A last side note: MSK (minimum shift keying) is a special case of continuous phase FSK which achieves the absolute minimum frequency separation of \$2\Delta f=1/(2T)\$ while still guaranteeing orthogonality of the signals.)

Related Topic