Continue to Site

Welcome to EDAboard.com

Welcome to our site! EDAboard.com is an international Electronics Discussion Forum focused on EDA software, circuits, schematics, books, theory, papers, asic, pld, 8051, DSP, Network, RF, Analog Design, PCB, Service Manuals... and a whole lot more! To participate you need to register. Registration is free. Click here to register now.

Help me make a graph of ASK PSK FSK in Matlab

Status
Not open for further replies.

Girly_girl

Full Member level 2
Joined
Oct 14, 2009
Messages
143
Helped
9
Reputation
18
Reaction score
8
Trophy points
1,298
Location
UK
Activity points
2,125
Hello guys

I have been reading on FSK , PSK and ASK and have been asked to produce a graph ( attached ) by writing few lines of Matlab code.. :|

Could any one possibly tell me how to get started on this please?

Thanks guys
 

Attachments

  • 1.bmp
    2 MB · Views: 158

Re: Ask psk fsk - matlab

ASK shown in the diagram is actually OOK(on-off keying). Generate input sq.wave. Then Generate a carrier(cosine wave) with a higher frequency as compared to sq.wave.. just multiply both u will get ASK..
 
Re: Ask psk fsk - matlab

Many thanks , I will try this for ASK , but do u have any other idea for the PSK and FSK?

Thank you
 

Re: Ask psk fsk - matlab

For ASK input square wave should have levels 0 and 1.. Change the levels to -1 and +1.. follow the similar procedure to obtain PSK.. For FSK u have to generate two carriers(sinusoidal and triangular as in the diagram).. Using an if loop switch the output depending on whether the input is 1 or 0..
 
Re: Ask psk fsk - matlab

Hello again
For ASK do i need to use a Cosine or a sine waveform? as some txt books say cosine and others say sine..
which one do i use?

---------- Post added at 22:19 ---------- Previous post was at 21:05 ----------

Guys why does it keep giving thsi error when i try to multiply the two waves together?
??? Error using ==> mtimes
Inner matrix dimensions must agree.

BUt i made sure they are the same dimensions! I dono what the problem is!

ur help would be appriciated
 

Re: Ask psk fsk - matlab

U can use either since it is merely concerned with the generation of a waveform..

---------- Post added at 12:05 ---------- Previous post was at 12:04 ----------

TRy .* operator instead of *
 
Re: Ask psk fsk - matlab

Hello Ill post my code here, would u mind having a look at it please
thanks

This is for ASK


% Generating a input square wave
x1 = 0:(pi/100):(10*pi);
y1 = square(x1);
A = plot(x1,y1);
figure(1),A,title( 'Square wave');xlabel('x'); ylabel('y');ylim([0,1]);grid;

% Generating a carrier(cosine wave) with a higher frequency as compared to sq.wave
f=0.8
t = 0:(pi/100):(10*pi);
y2 = cos(2*pi*f*t);
figure(2),B = plot(t,y2),title( 'Sine wave');xlabel('x'); ylabel('y');ylim([-2,2]); xlim([0,35]);grid;

ASK = A.*B;
figure(3),plot(t,ASK),title('ASK');xlabel('x'); ylabel('y');ylim([-2,2]); xlim([0,35]);grid;
 

Re: Ask psk fsk - matlab

ANY ONE? help?
 

Re: Ask psk fsk - matlab

A and B are jus plots.. you have to multiply y1 and y2.. Also for the referred diagram square wave should have levels 1 and 0 instead of 1 and -1.
 
can anyone tell me abt the comparison of ASk,FSK and PSK in terms of their performance with mathematical equations
 
i think your problem is in coding. there are lot of blogs giving sugetions and direct programs or codes i think this will help u
kemppro.blogspot.com
 

Status
Not open for further replies.

Similar threads

Part and Inventory Search

Welcome to EDABoard.com

Sponsor

Back
Top