1
$\begingroup$

I am new to this field and yesterday I began a project for BPSK modulation. So this is what i did:

$\ x(t) = 0 $ or$\ 1 $ binary data

$\ Fs = 15 $ sampling frequency kHz

$\ Fc = 10 $ carrier frequency kHz

BPSK modulation

$\ BPSK(t) = A.sin(2.\pi.Fc.t + \pi.x(t) ) $ enter image description here

BPSK demodulation

$\ S(t) = BPSK(t) . (Ac.sin(2.\pi.Fc.t))$ enter image description here

low pass filter

void lowPassFrequency(float input[], float fs, float output[], int points)
{
  float  CUTOFF = 2 * Fc;
  float RC = 1.0/(CUTOFF*2*M_PI);
  float dt = 1.0/fs;
  float alpha = dt/(RC+dt);
  output[0] = input[0];

  for(int i = 1; i < points; ++i)
  {
      output[i] = output[i-1] + (alpha*(input[i] - output[i-1]));
  }
}

enter image description here

it seems to me that the filtering part is not as it should be ... it supposed to be smoothed so i can get values like -1 and 1 ... Any ideas please?

$\endgroup$
1
  • $\begingroup$ I'd say your filter doesn't have enough out-of-band rejection. $\endgroup$
    – MBaz
    Apr 25, 2018 at 14:03

1 Answer 1

1
$\begingroup$

You must use a sampling frequency of at least the Nyquist rate, which is greater than 15 kHz in this case. It should be greater than $2(f_c + W/2) = 2 (10~\text{kHz} + W/2)$, being $W$ the signal's bandwidth.

You did not specify the bit rate, which also must be considered to determine the signal's bandwidth, and thus the Nyquist rate.

You signal is probably having time-aliasing. More details in the answers to the following question: A voice signal is band-limited to 3.3 kHz. What is the Nyquist frequency?

$\endgroup$

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.