Question

This question should be solved by MATLAB. - Generate an analog signal. (This should be an audio, any audio can be used.) - Analyze frequency spectrum of this analog signal. - Modulate it. (AM Modulati...

This question should be solved by MATLAB.

- Generate an analog signal. (This should be an audio, any audio can be used.)

- Analyze frequency spectrum of this analog signal.

- Modulate it. (AM Modulation can be used)

- Send the modulated signal over a wireless channel. (Before sending the signal, a noise should be added.)

Thank you already for your help!

0 0
Add a comment Improve this question Transcribed image text
Answer #1

Solution:

(a)the analog audio signal contains three frequency components 1KHz,5KHz,8KHz

%%--------------------- MATLAB code -------------------------%%


dt=1/100;
dt=1/10000; %sampling rate
et=4e-2; %end of the interval
t=0:dt:et; %sampling range
%frequencies
f1=1e3;f2=2e3;f3=3e3;
y=5*sin(2*pi*f1*t)+2*sin(2*pi*f2*t)+6*sin(2*pi*f3*t); % sample the signal
%plot the time domain
subplot(2,1,1); %first of two plot
plot(t,y,'r');grid on; %plot with grid
axis([0 et -10 10]); %adjust scaling
xlabel('time') %time axis
ylabel('amplitude') %freqency axis
title('Time Domain')

%%(b)
%Analysis in Frequency spectrum
Y=fft(y); %compute the fourier transform
n=size(y,2)/2; %second half are complex conjugate
amp_spectrum=abs(Y)/n; %absolute value and normalize
subplot(2,1,2); %second of two plots
freq=(0:79)/(2*n*dt); % abscissa viewing window
plot(freq,amp_spectrum(1:80)); %plot amplitude spectrum
grid on;
xlabel('freqency') %x label frequency
ylabel('amplitude Spectrum') %y axis amplitude spectrum
title('Freqency Domain')

%%-------------------------- END --------------------------%%

plot:

Time Domain 10 0 0.005 0.01 0.015 0.02 0.025 0.03 0.035 0.04 time Freqency Domain 4 0 200 400 600 800 1000 1200 1400 1600 180

(c)modulating the message signal

%%--------------------------- MATLAB Code ---------------------------%%

Ac=input('enter carrier signal amplitude:');
%Am=input('enter message signal amplitude');
fc=input('enter carrier frequency more then 6k:');
%fm=input('enter message frequency');% fm<fc
m=input('enter modulation index:');
T=input('enter time period:');
dt=1/100;
dt=1/10000; %sampling rate
et=T*1e-2; %end of the interval
t=0:dt:et; %sampling range
%t1=linspace(0,t,1000);
%y1=sin(2*pi*fm*t1); % message signal
%frequencies
f1=1e3;f2=2e3;f3=3e3;
y1=5*sin(2*pi*f1*t)+2*sin(2*pi*f2*t)+6*sin(2*pi*f3*t); % sample the signal
y2=sin(2*pi*fc*t); % carrier signal
eq=(1+m.*y1).*(Ac.*y2);
subplot(311);
plot(t,y1);
xlabel('Time');
ylabel('Amplitude');
title('Message signal')
subplot(312)
plot(t,y2);
xlabel('Time');
ylabel('Amplitude');
title('Carrier signal');
subplot(313);
%plot(t,eq);
plot(t,eq,'r');
xlabel('Time');
ylabel('Amplitude');
title('Modulated signal');

%%----------------------------------- END -------------------------------%%

plot:

Message signal 20 20 0 0.01 0.02 0.03 0.04 0.05 0.06 0.07 0.08 Time Carrier signal 0 0.01 .02 0.03 0.04 0.05 0.06 0.07 0.08 T

Add a comment
Know the answer?
Add Answer to:
This question should be solved by MATLAB. - Generate an analog signal. (This should be an audio, any audio can be used.) - Analyze frequency spectrum of this analog signal. - Modulate it. (AM Modulati...
Your Answer:

Post as a guest

Your Name:

What's your source?

Earn Coins

Coins can be redeemed for fabulous gifts.

Not the answer you're looking for? Ask your own homework help question. Our experts will answer your question WITHIN MINUTES for Free.
Similar Homework Help Questions
ADVERTISEMENT
Free Homework Help App
Download From Google Play
Scan Your Homework
to Get Instant Free Answers
Need Online Homework Help?
Ask a Question
Get Answers For Free
Most questions answered within 3 hours.
ADVERTISEMENT
ADVERTISEMENT
ADVERTISEMENT