Sign in

Not a member? | Forgot your Password?

Search matlab

Search tips

Find us on Facebook!





Subscribe to matlab

Search tips

Free PDF Downloads

A Quadrature Signals Tutorial: Complex, But Not Complicated

Understanding the 'Phasing Method' of Single Sideband Demodulation

Complex Digital Signal Processing in Telecommunications

Introduction to Sound Processing

C++ Tutorial

Introduction of C Programming for DSP Applications

Fixed-Point Arithmetic: An Introduction

Cascaded Integrator-Comb (CIC) Filter Introduction

Discussion Groups

FFT Spectral Analysis Software

See Also

Embedded SystemsFPGA

Discussion Groups | Matlab DSP | FSK modulation


Technical discussion about Matlab and issues related to Digital Signal Processing.

  

Post a new Thread



Is this thread worth a thumbs up?

0

FSK modulation - John - Nov 15 21:58:00 2002

I'tyring to generate a bit stream that will be modulated using an FSK
signal. So far what I have is when I plotted the graph what I have
is not an FSK signal but a bit stream....

bit = round(rand(1,10)); % bit stream of random 1's and 0's
bitperiod = 0.1; %bit period
fs = 11025; %sampling frequency
fc = [1000 5000]; % carrier frequency
% create the FSK signal
transmitted = zeros(1,bit);
for k = 1:length(bit)
f = fc(bit(k) + 1);
transmitted(floor((k-1)*bitperiod*fs)+1: floor(k*bitperiod*fs)) =
cos(2*pi*f*(0:(bitperiod/fs):bitperiod)); % here's the trouble
% I'm having.
plot(transmitted)
end

Thanks guys for your help







Re: FSK modulation - navaneetha krishnan - Nov 17 23:11:00 2002

The code you gave gives an assignment error. Is that
your problem. You have to rework the indices for
transmitted and time values for cos(x). They both
should be of same size which in your case is 1102.
After that I got something which looks like a cosine
wave.

Navan

--- John <> wrote:
> I'tyring to generate a bit stream that will be
> modulated using an FSK
> signal. So far what I have is when I plotted the
> graph what I have
> is not an FSK signal but a bit stream....
>
> bit = round(rand(1,10)); % bit stream of random 1's
> and 0's
> bitperiod = 0.1; %bit period
> fs = 11025; %sampling frequency
> fc = [1000 5000]; % carrier frequency
> % create the FSK signal
> transmitted = zeros(1,bit);
> for k = 1:length(bit)
> f = fc(bit(k) + 1);
> transmitted(floor((k-1)*bitperiod*fs)+1:
> floor(k*bitperiod*fs)) =
> cos(2*pi*f*(0:(bitperiod/fs):bitperiod)); % here's
> the trouble
> % I'm
> having.
> plot(transmitted)
> end
>
> Thanks guys for your help __________________________________________________






Re: FSK modulation - Author Unknown - Nov 18 4:06:00 2002

Hi John, in your code, you change the frequency f once a period.

This is much too often.

You better increase the sampling rate by x20 or so
and create more samples, or in other words, vary the
carrier frequency f much slower (linear interpolation or so)

Servus

Martin ----- Original Message -----
From: "John" <>
To: <>
Sent: Friday, November 15, 2002 1:58 PM
Subject: [matlab] FSK modulation > I'tyring to generate a bit stream that will be modulated using an FSK
> signal. So far what I have is when I plotted the graph what I have
> is not an FSK signal but a bit stream....
>
> bit = round(rand(1,10)); % bit stream of random 1's and 0's
> bitperiod = 0.1; %bit period
> fs = 11025; %sampling frequency
> fc = [1000 5000]; % carrier frequency
> % create the FSK signal
> transmitted = zeros(1,bit);
> for k = 1:length(bit)
> f = fc(bit(k) + 1);
> transmitted(floor((k-1)*bitperiod*fs)+1: floor(k*bitperiod*fs)) =
> cos(2*pi*f*(0:(bitperiod/fs):bitperiod)); % here's the trouble
> % I'm having.
> plot(transmitted)
> end
>
> Thanks guys for your help >
>
> _____________________________________
> /groups.php3







Re: FSK modulation - digicomm - Nov 18 7:38:00 2002

Hi John,

Enjoy it!

bit = round(rand(1,10)); % bit stream of random 1's and 0's
bitperiod = 1; %bit period
fs = 20; %sampling frequency
fc = [1 5]; % carrier frequency
% create the FSK signal
L=length(0:(bitperiod/fs):bitperiod);
transmitted = zeros(1,L);
for k = 1:length(bit)
f = fc(bit(k) + 1);
transmitted((k-1)*L+1: k*L) = cos(2*pi*f*(0:(bitperiod/fs):bitperiod));
stem(transmitted);
end

Best regards.

digicommˇˇ

----- 2002-11-15 21:58:00 "John"<> wrote: -----

>I'tyring to generate a bit stream that will be modulated using an FSK
>signal. So far what I have is when I plotted the graph what I have
>is not an FSK signal but a bit stream....
>
>bit = round(rand(1,10)); bit stream of random 1's and 0's
>bitperiod = 0.1; bit period
>fs = 11025; sampling frequency
>fc = [1000 5000]; carrier frequency
> create the FSK signal
>transmitted = zeros(1,bit);
>for k = 1:length(bit)
> f = fc(bit(k) + 1);
> transmitted(floor((k-1)*bitperiod*fs)+1: floor(k*bitperiod*fs)) =
>cos(2*pi*f*(0:(bitperiod/fs):bitperiod)); here's the trouble
> I'm having.
>plot(transmitted)
>end
>
>Thanks guys for your help >
>
>_____________________________________
>/groups.php3
ˇˇ








Re: FSK modulation - peter yip - Dec 12 0:23:00 2002

Hi digicomm

I need help with my QPSK with a set of data bit to
extract. I am having great difficulties in modulating
and demodulating it. Would highly appreciate it if you
have a sample program for me to learn how to do it.

Your kind help is greatly appreciated.

regards
peter

--- digicomm <> wrote:
> Hi John,
>
> Enjoy it!
>
> bit = round(rand(1,10)); % bit stream of random 1's
> and 0's
> bitperiod = 1; %bit period
> fs = 20; %sampling frequency
> fc = [1 5]; % carrier frequency
> % create the FSK signal
> L=length(0:(bitperiod/fs):bitperiod);
> transmitted = zeros(1,L);
> for k = 1:length(bit)
> f = fc(bit(k) + 1);
> transmitted((k-1)*L+1: k*L) =
> cos(2*pi*f*(0:(bitperiod/fs):bitperiod));
> stem(transmitted);
> end
>
> Best regards.
>
> digicommˇˇ
>
> ----- 2002-11-15 21:58:00 "John"<>
> wrote: -----
>
> >I'tyring to generate a bit stream that will be
> modulated using an FSK
> >signal. So far what I have is when I plotted the
> graph what I have
> >is not an FSK signal but a bit stream....
> >
> >bit = round(rand(1,10)); bit stream of random 1's
> and 0's
> >bitperiod = 0.1; bit period
> >fs = 11025; sampling frequency
> >fc = [1000 5000]; carrier frequency
> > create the FSK signal
> >transmitted = zeros(1,bit);
> >for k = 1:length(bit)
> > f = fc(bit(k) + 1);
> > transmitted(floor((k-1)*bitperiod*fs)+1:
> floor(k*bitperiod*fs)) =
> >cos(2*pi*f*(0:(bitperiod/fs):bitperiod)); here's
> the trouble
> > I'm
> having.
> >plot(transmitted)
> >end
> >
> >Thanks guys for your help
> >
> >
> >
> >
> >_____________________________________
> >/groups.php3
> >
> >
>
> ˇˇ
__________________________________________________