WIP
This commit is contained in:
16
comm_tb.m
16
comm_tb.m
@@ -16,7 +16,6 @@ kover = 16;
|
||||
fsimu = kover * fdac ;
|
||||
|
||||
|
||||
|
||||
%SIMULATE
|
||||
|
||||
for i = 1:log2(M)
|
||||
@@ -28,7 +27,6 @@ pamData = pam_mapping(bitpattern,M,0);
|
||||
shapedData = applyPulseShaping(pamData,fsym,fdac);
|
||||
|
||||
|
||||
|
||||
awg = AWG('preset','M8196A','fdac',fdac,'kover',kover,'lpf_active',1);
|
||||
awgSignal = awg.process_channel(shapedData);
|
||||
|
||||
@@ -43,7 +41,12 @@ laserfield = eml.process(filtered);
|
||||
att = Amplifier("amplification_db",10,"amp_mode","gain","type","ideal","saturation_mode",0,'saturation_power',10);
|
||||
att_out = att.process(laserfield);
|
||||
|
||||
%fib = Fiber("fiber_length",2,"alpha",0.2,"D",17,"lambda0",1550);
|
||||
fib = Fiber("fsimu",fdac*kover,"fiber_length",20,"alpha",0.2,"D",17,"lambda0",1550);
|
||||
fib_out = fib.process(att_out);
|
||||
|
||||
phdiode = Photodiode("fsimu",fdac*kover,"dark_current",2e-08,"responsivity",1,"temperature",20);
|
||||
phdiod_out = phdiode.process(fib_out);
|
||||
|
||||
|
||||
|
||||
figure;
|
||||
@@ -53,6 +56,7 @@ plot(awgSignal,'DisplayName','skew 0');
|
||||
plot(filtered,'DisplayName','filtered');
|
||||
plot(abs(laserfield),'DisplayName','laser');
|
||||
plot(abs(att_out),'DisplayName','att_out');
|
||||
plot(abs(fib_out),'DisplayName','att_out');
|
||||
|
||||
hold off
|
||||
|
||||
@@ -139,8 +143,4 @@ function yout = applyPulseShaping(xin,fsym,fdac)
|
||||
warning('Check signal length after pulse shaping');
|
||||
end
|
||||
|
||||
end
|
||||
|
||||
function yout = applyBandwidthLimitation(xin)
|
||||
data_out=ifft(repmat(state.H,1,size(data_in,1)).*fft(data_in.')).';
|
||||
end
|
||||
end
|
||||
Reference in New Issue
Block a user