×
INTELLIGENT WORK FORUMS
FOR ENGINEERING PROFESSIONALS

Log In

Come Join Us!

Are you an
Engineering professional?
Join Eng-Tips Forums!
  • Talk With Other Members
  • Be Notified Of Responses
    To Your Posts
  • Keyword Search
  • One-Click Access To Your
    Favorite Forums
  • Automated Signatures
    On Your Posts
  • Best Of All, It's Free!
  • Students Click Here

*Eng-Tips's functionality depends on members receiving e-mail. By joining you are opting in to receive e-mail.

Posting Guidelines

Promoting, selling, recruiting, coursework and thesis posting is forbidden.

Students Click Here

Jobs

ppm modulation - problems

ppm modulation - problems

ppm modulation - problems

(OP)
Hi everyone.

I am using Matlab to modulate a wave file using pulse position modulation (ppm) and I'm having a few problems.

When I try to use a low carrier frequency I get an error message saying Matlab is out of memory. (It works if the carrier frequency is, say 10000Hz, the wave file sample rate is 22050Hz). I don't know if this is because of a mistake on my part or whether my (quite sluggish) pc isn't up to the task.

I've also noticed that if I change the "OPT" setting (the length of each pulse) to anything lower than 0.5 the modulation fails completely and returns a flat line of 0. I don't understand why this should be the case.

Anyone have any ideas what is going wrong?
My code is:

y = wavread('sample.wav'); %Read sample
y = (y/2)+0.5; %Re-scale for ppm modulation
fs = 22050; %Sample rate
fc = 10000; %Carrier frequency
t = 0:1/fs:sample duration;
x = modulate(y,fc,fs,'ppm',0.5); %where 0.5 is the Opt setting

Thanks.

RE: ppm modulation - problems

You gave the audio sample rate as 22.05 kHz.  The help file for the modulate function says
"Fs must satisfy Fs > 2*Fc + BW"
The Fs is for the RF sample frequency, not the baseband audio.  You need to pick what sample rate you want to run your ppm at and what carrier you want.  You would need to pick a carrier above your Nyquist criteria, then you sample also has a Nyquist criteria above your carrier.
But you fundamental problem will be memory, so you might have to break up your audio file into single samples or into small vectorizable chunks and run them through a sequential simulation instead of in block mode.

RE: ppm modulation - problems

(OP)
Thanks!

Red Flag This Post

Please let us know here why this post is inappropriate. Reasons such as off-topic, duplicates, flames, illegal, vulgar, or students posting their homework.

Red Flag Submitted

Thank you for helping keep Eng-Tips Forums free from inappropriate posts.
The Eng-Tips staff will check this out and take appropriate action.

Reply To This Thread

Posting in the Eng-Tips forums is a member-only feature.

Click Here to join Eng-Tips and talk with other members!


Resources