کمک برای پروژه شبیه سازی متلب در درس مخابرات

USER56

عضو جدید
سلام
دوستان مهندس
من باید برای سوال زیر پروژه شبیه سازی متلب رو انجام بدم ولی
فعلا بدلیل عدم تسلط کافی خواهشا در این زمینه بنده رو کمک فرمایید
سوال برای فصل 4 مخابرات کارلسون ویرایش 5 میباشد.
کد:
">   [COLOR=#231F20][FONT=Futura-Heavy][B]Envelope detection of suppressed carrier signals[/B]
[COLOR=#231F20][FONT= ]Write a MATLAB program that emulates the envelope detector of Fig. 4.5–6a to
[COLOR=#231F20][FONT= ]have it detect a 100 percent modulated AM signal and then a D SB signal. Show why
[COLOR=#231F20][FONT= ]it is not suitable for detection of DSB signals. Use a single-tone message and plot
[COLOR=#231F20][FONT= ]the message, modulated signal, and the envelope detector output.[/FONT][/COLOR][/FONT][/COLOR][/FONT][/COLOR][/FONT][/COLOR]
[/FONT][/COLOR]
matlab emulate.jpg
من نمونه فایل رو از یکی از دوستان گرفتم فقط کافیه که یه مقدار داخلش تغییر
ایجاد کنم و برای استاد ایمیل کنم
خواهشا دوستان اهل فن بنده رو کمک کنند و تغییرات را برای ینده اعمال کنند
چون کمتر از 2 ساعت وقت برای ارسال وقت هست.
ممنون
نمونه پروژه شبیه سازی شده با متلب:
کد:
%show how an envelope detector demodulates AM and DSB signals
%Clear and initialize varables 
clear
for t=1:2000
   j(t)=t;
   xc_am(t)=0; %AM signal
   xc_dsb(t)=0; %DSB signal
   v_am(t)=0; %Rectified AM signal
   v_dsb(t)=0; %Rectified DSB signal
   y_am(t)=0; %output of envelope detector
   y_dsb(t)=0; %output of envelope detector 
   hlpf(t)=0; %LPF for envelope  detector 
end
j
fc=10^6; %carrier frequency is 10^6 Hz
fm=10^5; %message frequency is 10^5 Hz
Ts=1/(2*fc); %sample period is 1/(2*10^6) seconds
Ac=1.5; %carrier amplitude is 1.5
%Generate a signal-tone message 
for t=1:2000
    m(t)=cos(2*pi*fm*t*Ts);
end
%Generate AM and DSB modulated signals
for t=1:2000
    xc_am(t)=Ac*(1+m(t))*cos(2*pi*fc*t*Ts);
    xc_dsb(t)=Ac*m(t)*cos(2*pi*fc*t*Ts);
end
%Generate impulse response function for fifth order Butterworth
for t=1:2000
    hlpf(t)=(250000*exp(-t))/131981 - (309*exp(-(809*t)/1000)*(cos((3*38391^(1/2)*t)/1000) - (1309*38391^(1/2)*sin((3*38391^(1/2)*t)/1000))/186327))/191 - (191*exp(-(309*t)/1000)*(cos((904519^(1/2)*t)/1000) + (809*904519^(1/2)*sin((904519^(1/2)*t)/1000))/250019))/691;
end
%Demodulate the AM and DSB signals using an envelope detector 
%Rectify AM and DSB signals
for t=1:2000 
    if xc_am(t)>=0
        v_am(t)=xc_am(t);
    end
    if xc_dsb(t)>=0
        v_dsb(t)=xc_dsb(t);
    end
end 
%Low pass filter rectified signals via convolving with LPF
y_am=conv(hlpf,v_am);
y_dsb=conv(hlpf,v_dsb);
%Remove DC offset from signals [this function as the blocking capacitor]
%calculate DC offset by determining average value of signal
dc_am=0;
dc_dsb=0;
for t=1:2000 
    dc_am=dc_am+y_am(t);
    dc_dsb=dc_dsb+y_dsb(t);
end
dc_am=dc_am/2000;
dc_dsb=dc_dsb/2000;
%subtract DC offset
for t=1:2000
    y_am(t)=y_am(t)-dc_am;
    y_dsb(t)=y_dsb(t)-dc_dsb;
end
%Scale the message amplitudes
y_am=5*y_am/max(y_am);
y_dsb=5*y_dsb/max(y_dsb);
m=2*m/max(m);
%plot the modulated demodulated signals and original message and include
%adding offsets of 20,15,10,5 and 0 to signal amplitudes to enable them to
%fit on a signal figure
plot(j(1:150),xc_dsb(1:150)+20,j(1:150),y_dsb(1:150)+15,j(1:150),xc_am(1:150)+10,j(1:150),y_am(1:150)+5,j(1:150),m(1:150))
 
بالا