8 Зертханалық жұмыс



бет4/5
Дата14.12.2022
өлшемі165,93 Kb.
#162668
1   2   3   4   5
Байланысты:
№8Лаб
8 Бестерек жобасы сынып тізімі, 8 Бестерек жобасы сынып тізімі, Өздік жұмыс 1 , 8 – сынып алгебра БЖБ.3 тоқсан, 8 сынып Қаз. тар. №2. «Кеңестік, Fizika shpory, Тест Физика, Кутузова с, 9, 36 п В056 - Механика 2021 г.п., МатФак
8.2 Берілген тапсырмалар

№1 тапсырма. lab8.1.m. файлында келтірілген MATLAB кодын пайдалана отырып, жиіліктік ығысудың модуляция графигін құрастырыңыз.


Тапсырма № 1. MATLAB-та кодтау листингі. fc1=12,fc2=11,fp=43,amp=63
clc %for clearing the command window
close all %for closing all the window except command window
%for deleting all the variables from the memory
fc1=input('Enter the frequation of 1st Sine Wave carrier:');
fc2=input('Enter the frequation of 2nd Sine Wave carrier:');
fp=input('Enter the frequation of Periodic Binary pulse (Message):');
amp=input('Enter the amplitude (For Both Carrier & Binary Pulse Message):');
amp=amp/2;
t=0:0.002:2; % For setting the sampling interval
c1=amp.*sin(2*pi*fc1*t);% For Generating 1st Carrier Sine wave
c2=amp.*sin(2*pi*fc2*t);% For Generating 2nd Carrier Sine wavsubplot(4,1,1) %For Plotting The Carrier wav
subplot(4,1,1)
plot(t,c1)
xlabel('Time')
ylabel('Amplitude')
title('Carrier 1 Wave')
subplot(4,1,2) %For Plotting The Carrier wave
plot(t,c2)
xlabel('Time')
ylabel('Amplitude')
title('Carrier 2 Wave')
m=amp.*square(2*pi*fp*t)+amp;
%For Generating Square wave message
subplot(4,1,3) %For Plotting The Square Binary Pulse (Message)
plot(t,m)
xlabel('Time')
ylabel('Amplitude')
title('Binary Message Pulses')
for i=0:1000 %here we are generating the modulated wave
if m(i+1)==0
m(i+1)=c2(i+1);
else
m(i+1)=c1(i+1);
end
end
subplot(4,1,4)
%For Plotting The Modulated wave
plot(t,m)
xlabel('Time')
ylabel('Amplitude')
title('Modulated Wave')
%3 4 50 40

Сурет 8.4 — Жиілікті ығысудың модуляциясынының графигі
2 тапсырма. lab8.2.m. файлында келтірілген MATLAB кодын пайдалана отырып, жиіліктік ығысудың демодуляция графигін құрастырыңыз.
Нұсқа бойынша f1 = 120, f2 = 110, N = 75
Тапсырма №2. MATLAB-та кодтау листингі
% FSK Demodulation
t1=0;
Tb=20;
N=75;
t2=Tb;
f1=120;
f2=110;
c1=2;
c2=1;
for i=1:N
t=t1:(Tb/100):t2;
%correlator
x1=sum(c1.*sin(2*pi*f1+t));
x2=sum(c2.*sin(2*pi*f2+t));
x=x1-x2;
%decision device
if x>0
demod(i)=1;
else
demod(i)=0;
end
t1=t1+(Tb+.01);
t2=t2+(Tb+.01);
end
%Plotting the demodulated data bits.
subplot(3,1,3)
stem(demod)
title(' demodulated data')
xlabel('n---->')
ylabel('b(n)')
grid on



Сурет 8.5 — Жиілікті- жылжымалы манипуляция сигналын демодуляциялау графигі



Достарыңызбен бөлісу:
1   2   3   4   5




©www.engime.org 2024
әкімшілігінің қараңыз

    Басты бет