Update April

This commit is contained in:
Silas Oettinghaus
2024-04-19 10:31:36 +02:00
parent 025498d120
commit ed17953407
30 changed files with 3261 additions and 1580 deletions

View File

@@ -5,7 +5,7 @@ classdef Pulseformer
properties(Access=public)
fdac
fsym
pulseform
pulse
pulselength
rrcalpha
end
@@ -18,7 +18,7 @@ classdef Pulseformer
arguments
options.fdac double
options.fsym double
options.pulseform pulseform = pulseform.rrc
options.pulse pulseform = pulseform.rrc
options.pulselength double {mustBeInteger} = 32
options.rrcalpha double = 0.05
end
@@ -44,6 +44,9 @@ classdef Pulseformer
lbdesc = 'Applied Pulseshaping';
signalclass_in = signalclass_in.logbookentry(lbdesc);
% write fs to signal
signalclass_in.fs = obj.fdac;
% write to output
signalclass_out = signalclass_in;
@@ -62,11 +65,11 @@ classdef Pulseformer
% Detailed explanation goes here
arguments(Input)
obj
data_in double
data_in
end
arguments(Output)
data_out double
data_out
end
if ~rem(obj.fdac,obj.fsym)
@@ -81,9 +84,9 @@ classdef Pulseformer
sps= up;
end
if obj.pulseform == pulseform.rrc
if obj.pulse == pulseform.rrc
%Bau das Filter (hier rrc)
racos_len = obj.pulselength*2 ;
racos_len = obj.pulselength*2;
alpha = obj.rrcalpha;
h = rcosdesign(alpha,racos_len,sps);
h = h./ max(h);
@@ -115,12 +118,13 @@ classdef Pulseformer
% %Apply Filter using Matlab build in fctn.
% data_out = upfirdn(data_in,h,up,dn);
h = rcosdesign(alpha,racos_len,sps);
h = h./ max(h);
%data_out_ = upfirdn(data_in,h,up,dn);
%
% %cut signal, which is longer due to fir filter
st = round(up/dn*racos_len/2); %we need to cut y_out
% en = round(st + (length(data_in)*up/dn) -1);
%
% data_out = data_out(st:en);
%scaling?! see pulsef module line 696