# BFSK modulation coding on MATLAB

Like for BPSK we generate random bits and then

data= round(rand(1,num_bit)); %Generate binary data
bpskModulated = 2*data-1 % mapping to -1 and +1

Can we do same for BFSK like

data= round(rand(1,num_bit));  %Generate binary data
s=data+j*(~data); %Baseband BFSK modulation


as constellation of BFSK is on 1+0*j [1,0,0] and other on entirely on imganary plane [0,1,0] ? If for BPSK it's according to constellation then why not FSK ?

• seriously, I've written multiple comments that your s is not BFSK. Exactly as Dan wrote to your last question already: it can't be FSK if you just switch phase according to your current symbol; that's PSK. – Marcus Müller May 18 at 19:02
• @MarcusMüller You have written such a great answer and I am thankful to you Muller however I had to show it to one of my colleague and I thought writing a separate question would be good, Thank you Muller, I think you need not to downvote me, I already need votes here for comments and understanding kinds of stuff and you have to support such young and new researcher in this community – good_omen92 May 18 at 21:08

## 1 Answer

BFSK is done by selecting between two frequencies for each symbol (Binary Frequency Shift Keying). What the OP is showing is samples from M-PSK (Phase Shift Keying); selecting between M phases for each symbol (which would result in two distinct dots on the IQ constellation). Here the two symbols selected are phases 0° and 90°, so these could be 2 of the 4 symbols for QPSK.

To do any form of FSK, the phase must transition over the course of the symbol, given that frequency is by definition the derivative of phase. Thus if one symbol is at a fixed frequency, the phase would vary linearly with time over the duration of that symbol. On an IQ constellation we would see the phasor rotate at a constant rate from one dot to the next (rotating counter-clockwise to represent a positive frequency and clock-wise to represent a negative frequency).

MSK (Minimum Shift Keying) is the case of the phase rotating ±90° over the symbol duration, as this would be the minimum frequency offset between symbols where the symbols would still be orthogonal. Out of band emissions can be reduced by smoothing the phase from one symbol to the next (generally abrupt transitions in phase or magnitude have high spectral content), which is the intention for GMSK (Gaussian Minimum Shift Keying) where instead of linear phase ramps going up and down according to the symbol used, the phase trajectory is filtered with a Gaussian filter such that the transitions are continuous in the first derivative, meaning the frequency transitions smoothly from one symbol to the next.