Current work is on MLSE and SD Decoding etc. MLSE is currently not 100% working, the scalings are maybe off?!
26 lines
786 B
Matlab
26 lines
786 B
Matlab
function Scpe_sig = preprocessSignal(Scpe_sig, Symbols, fsym)
|
|
% PREPROCESSSIGNAL Performs standard preprocessing on a signal
|
|
%
|
|
% Inputs:
|
|
% Scpe_sig - Input signal
|
|
% Symbols - Reference symbols for synchronization
|
|
% fsym - Symbol frequency
|
|
%
|
|
% Outputs:
|
|
% Scpe_sig - Preprocessed signal
|
|
|
|
% Resample to 2x symbol rate
|
|
Scpe_sig = Scpe_sig.resample("fs_out", 2*fsym);
|
|
|
|
% Synchronize with reference
|
|
[Scpe_sig, ~] = Scpe_sig.tsynch("reference", Symbols, "fs_ref", fsym, "debug_plots", 0);
|
|
|
|
% Apply Gaussian filter
|
|
% Scpe_sig = Filter('filtdegree', 4, "f_cutoff", Symbols.fs.*0.6, ...
|
|
% "fs", Scpe_sig.fs, "filterType", filtertypes.gaussian, ...
|
|
% "active", true).process(Scpe_sig);
|
|
|
|
% Remove DC offset
|
|
Scpe_sig = Scpe_sig - mean(Scpe_sig.signal);
|
|
|
|
end |