Changes from mwork PC.

PDP 2025

MPI analysis

new focus on database and SQL
This commit is contained in:
Silas Oettinghaus
2025-03-21 08:11:40 +01:00
parent 402e491506
commit 74066d0669
36 changed files with 2234 additions and 620 deletions

View File

@@ -6,8 +6,10 @@ classdef Pulseformer
end
properties(Access=public)
fdac
fs
fsym
matched_sps
output_sps
pulse
pulselength
alpha
@@ -20,8 +22,10 @@ classdef Pulseformer
% Detailed explanation goes here
arguments
options.fdac double
options.fs double
options.fsym double
options.matched_sps double
options.output_sps double
options.pulse pulseform = pulseform.rc
options.pulselength double {mustBeInteger} = 32
options.alpha double = 0.05
@@ -50,7 +54,11 @@ classdef Pulseformer
signalclass_in = signalclass_in.logbookentry(lbdesc);
% write fs to signal
signalclass_in.fs = obj.fdac;%.* (obj.fdac./obj.fsym);
if obj.matched
signalclass_in.fs = obj.fsym .* obj.output_sps;%.* (obj.fdac./obj.fsym);
else
signalclass_in.fs = obj.fs;%.* (obj.fdac./obj.fsym);
end
% write to output
signalclass_out = signalclass_in;
@@ -77,15 +85,19 @@ classdef Pulseformer
data_out
end
if ~rem(obj.fdac,obj.fsym)
if ~isempty(obj.output_sps)
obj.fsym = obj.fsym.*obj.output_sps;
end
if ~rem(obj.fs,obj.fsym)
%ist ein Vielfaches
sps = obj.fdac / obj.fsym;
sps = obj.fs / obj.fsym;
p = sps;
q = 1;
else
%ist kein Vielfaches
p = obj.fsym / gcd(obj.fdac, obj.fsym); %upsampling p->->->
q = obj.fdac/ gcd(obj.fdac, obj.fsym); %downsampling <-q
p = obj.fsym / gcd(obj.fs, obj.fsym); %upsampling p->->->
q = obj.fs/ gcd(obj.fs, obj.fsym); %downsampling <-q
sps= q; %sps während dem pulse shaping
end
@@ -105,6 +117,7 @@ classdef Pulseformer
end
manual_cyclic_convolution = 0;
upsample_filter = 0;
upfirdn_convolution = 1;
if manual_cyclic_convolution
@@ -122,16 +135,28 @@ classdef Pulseformer
data_out=ifft( fft(symbolov.') .* repmat( H,size(data_in,1),1 ).' ).';
data_out = circshift(data_out,[0 -(obj.pulselength*sps)]);
if rem(obj.fdac,obj.fsym)
if rem(obj.fs,obj.fsym)
data_out = data_out(1:q:end);
end
end
if upsample_filter
data_out_ = upsample(data_in,p);
mfOutput = filter(h, 1, data_out_); % Matched filter output
figure()
hold on
stem(mfOutput(1:1000),'Marker','o','MarkerSize',1,'LineStyle','-','LineWidth',1);
stem(data_out_(1:1000),'Marker','o','MarkerSize',1,'LineStyle','-','LineWidth',1);
end
if upfirdn_convolution
%Apply Filter using Matlab build in fctn.
data_out_ = upfirdn(data_in,h,p,q);
%cut signal, which is longer due to fir filter