function [eq_package] = duobinary_target(eq_, mlse_,M, rx_signal, tx_symbols, tx_bits, options) arguments eq_ mlse_ M rx_signal tx_symbols tx_bits options.precode_mode db_mode options.showAnalysis = 0; options.eth_style_symbol_mapping = 0; end %Duobinary Targeting [eq_signal, eq_noise] = eq_.process(rx_signal,Duobinary().encode(tx_symbols)); % dir = [1,1]; mlse_sig_sd = mlse_.process(eq_signal); mlse_sig_hd = PAMmapper(M,0,"eth_style",options.eth_style_symbol_mapping).quantize(mlse_sig_sd); % precoding to mitigate error propagation, most prominently used in % combination with duobinary signaling to avoid catastrophic error % behavior (see J.W.M. Bergmans, Digital Baseband Transmission and Recording -> partial response signaling) % takes: % -> eq_signal_hd: hard decision signal after eq % -> tx_symbols: that where used as reference for eq switch options.precode_mode case db_mode.db_emulate mlse_sig_hd = Duobinary().encode(mlse_sig_hd,"M",M); mlse_sig_hd = Duobinary().decode(mlse_sig_hd,"M",M); tx_symbols_precoded = Duobinary().encode(tx_symbols); tx_symbols_precoded = Duobinary().decode(tx_symbols_precoded); tx_bits = PAMmapper(M,0,"eth_style",options.eth_style_symbol_mapping).demap(tx_symbols_precoded); case db_mode.db_discard % normal dsp for precoded sequence == discard/omit/ignore precode tx_bits = PAMmapper(M,0,"eth_style",options.eth_style_symbol_mapping).demap(tx_symbols); case db_mode.db_encoded % normal DB encoded data (only for 10KM) case db_mode.db_precoded mlse_sig_hd = Duobinary().encode(mlse_sig_hd,"M",M); mlse_sig_hd = Duobinary().decode(mlse_sig_hd,"M",M); end % M = numel(unique(tx_symbols.signal)); rx_bits = PAMmapper(M,0,"eth_style",options.eth_style_symbol_mapping).demap(mlse_sig_hd); [~,numErrors,ber,~] = calc_ber(rx_bits.signal,tx_bits.signal,"skip_front",100,"skip_end",150,"returnErrorLocation",1); eq_package.ber = ber; if options.showAnalysis eq_noise = eq_noise - mean(eq_noise.signal); rx_signal.spectrum("normalizeTo0dB",1,"fignum",250,"displayname","Rx Spectrum"); Duobinary().encode(tx_symbols).spectrum("normalizeTo0dB",1,"fignum",250,"displayname","DB encoded reference"); showEQNoisePSD(eq_noise,"fignum",250,"displayname",'Duobinary Target Noise after Equalization'); fprintf('DB tgt BER: %.2e \n',ber); end end