Start Commit

start implementation of class based simulation of a IM/DD communication system. Mostly based on Move-It but cleaned up and with focus on direct detection, however I try to keep the versatility of move-it alive.
This commit is contained in:
Silas Oettinghaus
2023-05-12 15:28:23 +02:00
parent 69df41340f
commit 6d53823466
109 changed files with 1824 additions and 0 deletions

48
Classes/Signal.m Normal file
View File

@@ -0,0 +1,48 @@
classdef Signal
%SIGNAL Summary of this class goes here
% Detailed explanation goes here
properties
signal
fsym
fsimu
end
methods
function obj = Signal(signal, fsym, fsimu)
%SIGNAL Construct an instance of this class
% Detailed explanation goes here
obj.signal = signal;
obj.fsym = fsym;
obj.fsimu = fsimu;
end
function [e_sig, nase, lambda_nm] = Electricalsignal(obj)
if isa(obj,'Opticalsignal')
%convert to electrical
disp("Convert signal: opt. -> elec. Fetch all properties (e.g. nase)!");
nase = obj.nase;
lambda_nm = obj.lambda_nm;
e_sig = Electricalsignal(obj.signal,obj.fsym, obj.fsimu);
end
end
function o_sig = Opticalsignal(obj)
if isa(obj,'Electricalsignal')
%convert to optical
disp("Convert signal: elec. -> opt.!");
o_sig = Opticalsignal(obj.signal,obj.fsym, obj.fsimu);
end
end
function outputArg = method1(obj,inputArg)
end
end
end