⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 dfecator.m

📁 基于Matlab
💻 M
📖 第 1 页 / 共 2 页
字号:
% feedback filters.
% 
% 
%
% "Ad. Clus."
% ------------------
% Evolution of (adaptation) cluster plot in time. 
%
%
% "Fin. Clus."
% ------------------
% Cluster plot associated with final equalizer.
%
%
% "Final Imp"
% ------------------
% Impulse responses of filters and combinations of filters and channel
% resulting from adaptation.
%
%
% "Final Freq"
% ------------------
% Frequency responses of filters and combinations of filters and channel
% resulting from adaptation.
%
%
% "Help"
% ------------------
% Helps.
%
%
% "Quit"
% ------------------
% Quits.
%
%
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%%   The DFEcator written by:    Raul A. Casas                           %
%%                               raulc@ee.cornell.edu                    %
%%                               Blind Equalization Research Group       %
%%                               (http://backhoe.ee.cornell.edu/BERG/)   %
%%                               Cornell University                      %
%%                               February 1998                           %
%%                                                                       %
%%                               Copyright 1998-2000 Cornell University  % 
%%                                                                       %
%%   last updated 03/30/99                                               %
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%

function [] = DFEcator();
dfec_global; 
ui_private_global;


% Advise use of dfec_global to look
% at variables
disp('Type "dfec_global" at prompt to look at design variables'); 
disp('(use "who" command). Type "help dfec_global for descriptions.'); 

%%%%%%%%%%%%%%%%%%%
% Declare figures %
%%%%%%%%%%%%%%%%%%%
% Declare output figure numbers and clear them
fig_chan  =  1;
fig_freq  =  2;
fig_imp   =  3;
fig_mse   =  4;
fig_ser   =  5;
fig_cluster   =  6;
fig_ep    =  7;
fig_fimp  =  8;
fig_ffreq =  9;
fig_acluster  = 10;
fig_fcluster  = 11;
fig_aerr  = 12;
fig_traj  = 13;
if ishandle(fig_imp),   delete(fig_imp);   end;
if ishandle(fig_freq),  delete(fig_freq);  end;
if ishandle(fig_mse),   delete(fig_mse);   end;
if ishandle(fig_ser),   delete(fig_ser);   end;
if ishandle(fig_cluster),   delete(fig_cluster);   end;
if ishandle(fig_ep),    delete(fig_ep);    end;
if ishandle(fig_chan),  delete(fig_chan);  end;
if ishandle(fig_fimp),  delete(fig_fimp);  end;
if ishandle(fig_ffreq), delete(fig_ffreq); end;
if ishandle(fig_acluster),  delete(fig_acluster);  end;
if ishandle(fig_fcluster),  delete(fig_fcluster);  end;
if ishandle(fig_aerr),  delete(fig_aerr);  end;
if ishandle(fig_traj),  delete(fig_traj);  end;


%%%%%%%%%%%%%%%%%%%%%%%%%%%
% Allocate control window %
%%%%%%%%%%%%%%%%%%%%%%%%%%%
if exist('fig_menu'), if ishandle(fig_menu), delete(fig_menu); end; end;
fig_menu = figure('IntegerHandle', 'off', 'Name', 'The DFEcator',...
                  'NumberTitle', 'off', 'MenuBar', 'none', 'Resize', 'off');
                  
pos = get(fig_menu, 'Position');
set(fig_menu, 'Position', [pos(1)+100 pos(2)-300 440 720]);
clf;


%%%%%%%%%%%%%%%%%%%%%%
% Channel Parameters %
%%%%%%%%%%%%%%%%%%%%%%
uicontrol('Style', 'frame', 'Position',[170 500 250 200]); 
uicontrol('Style', 'text', 'Position', [180 670 160 20], 'String',...
          'CHANNEL PARAMETERS');

uicontrol('Style', 'text', 'Position', [180 640 100 20], 'String',...
          'Channel Type');
h_chan = uicontrol('Style', 'popupmenu', 'Position', [180 620 100 20],...
                   'String', '8-tap|3-tap|Custom|From file',...
                   'Callback', 'ui_params,ui_chan');

uicontrol('Style', 'text', 'Position', [180 580 100 25], 'String',...
          'Coefficients');
h_coefs = uicontrol('Style', 'edit', 'Position', [180 560 140 25],...
                    'BackgroundColor', [1 1 1], 'Callback',...
                    'ui_params,ui_chan');

h_norm = uicontrol('Style', 'checkbox', 'Position', [180 520 100 20],...
                   'String', 'Normalize',  'Value', 1, 'Callback',...
                   'ui_params,ui_chan');

h_resp = uicontrol('Style', 'checkbox', 'Position', [330 520 80 20],...
                   'String', 'Display', 'Callback', 'ui_chan');

uicontrol('Style', 'text', 'Position', [330 640 75 25], 'String',...
          'Source');
h_source = uicontrol('Style', 'popupmenu', 'Position', [330 620 85 20],...
                   'String',... 
                   ['BPSK|4-PAM|8-PAM|16-PAM|32-PAM|QPSK',...
                   '|16-QAM|64-QAM|256-QAM|1024-QAM'],...
                   'Callback', 'ui_params');

uicontrol('Style', 'text', 'Position', [340 580 50 25 ], 'String', 'dB SNR');
h_SNR = uicontrol('Style', 'edit', 'Position', [340 560 50 25],...
                    'String', '30', 'BackgroundColor', [1 1 1],... 
                    'Callback', 'ui_params');

%%%%%%%%%%%%%%%%%%%%%%%%
% Equalizer Parameters %
%%%%%%%%%%%%%%%%%%%%%%%%
uicontrol('Style', 'frame', 'Position', [170 280 250 200]);
uicontrol('Style', 'text', 'Position', [180 450 180 20], 'String',...
          'EQUALIZER PARAMETERS');

uicontrol('Style', 'text', 'Position', [180 420 100 25], 'String',...
          'Nf+Nd or [Nf,Nd]');
h_len = uicontrol('Style', 'edit', 'Position', [180 400 100 25],...
                  'String', '[32 8]', 'BackgroundColor', [1 1 1],...
                  'Callback', 'ui_params');

uicontrol('Style', 'text', 'Position', [180 370 80 20], 'String', 'Spacing');
h_spa = uicontrol('Style', 'popupmenu', 'Position', [180 350 80 20],...
                    'String', 'BSE|FSE', 'Callback', 'ui_params,ui_chan');

h_bias = uicontrol('Style', 'checkbox', 'Position', [180 300 80 20],...
                   'String', 'Unbiased', 'Callback', 'ui_params');


uicontrol('Style', 'text', 'Position', [330 420 80 20], 'String',... 
          'Cursor Delay');
h_deltype = uicontrol('Style', 'popupmenu', 'Position', [330 400 80 20],...
                    'String', 'Opt|Max|End|Center Spike|Range',...
                    'Callback', 'ui_params');

uicontrol('Style', 'text', 'Position', [330 370 80 20], 'String', 'Range');
h_del = uicontrol('Style', 'edit', 'Position', [330 350 80 25],...
                  'BackgroundColor', [1 1 1], 'String', '1',...
                  'Callback', 'ui_params');

uicontrol('Style', 'text', 'Position', [330 320 80 20], 'String',... 
          'Proc. Delay');
h_proc = uicontrol('Style', 'edit', 'Position', [330 300 60 25],...
                  'BackgroundColor', [1 1 1], 'String', '1',...
                  'Callback', 'ui_params');


%%%%%%%%%%%%%%%%%%%%%%%%%
% Adaptation Parameters %
%%%%%%%%%%%%%%%%%%%%%%%%%
uicontrol('Style', 'frame', 'Position', [170 20 250 240]);
uicontrol('Style', 'text', 'Position', [180 230 180 20], 'String',...
          'ADAPTATION PARAMETERS');


uicontrol('Style', 'text', 'Position', [180 205 110 20], 'String',...
          'Algorithm');
h_alg = uicontrol('Style', 'popupmenu', 'Position', [180 185 110 20],...
'String', ['DFE-LMS|DFE-DD|DFE-CMA|DFE-LMS+DD|DFE-LMS+CMA|IIR-LMS|IIR-DD|IIR-CMA|IIR-LMS+DD|IIR-LMS+CMA'],'Callback', 'ui_params');

h_reg = uicontrol('Style', 'checkbox', 'Position', [300 185 100 20],...
                   'String', 'Exact gradient',  'Value', 1, 'Callback',...
                   'ui_params,ui_chan');


uicontrol('Style', 'text', 'Position', [180 145 75 20], 'String',...
          'Initialization');
h_init = uicontrol('Style', 'popupmenu', 'Position', [180 125 75 20],...
     'String', ['Zero|Center Spike|Double Spike|DFE-MMSE|IIR-MMSE|End Spike|Previous|Custom|From file'], 'Callback', 'ui_params');

uicontrol('Style', 'text', 'Position', [255 145 40 20], 'String',...
          'f0');
h_f0 = uicontrol('Style', 'edit', 'Position', [285 145 120 25],...
                  'BackgroundColor', [1 1 1],...
                  'Callback', 'ui_params');

uicontrol('Style', 'text', 'Position', [255 125 40 20], 'String',...
          'd0');
h_d0 = uicontrol('Style', 'edit', 'Position', [285 125 120 25],...
                  'BackgroundColor', [1 1 1],...
                  'Callback', 'ui_params');


uicontrol('Style', 'text', 'Position', [180 80 30 20], 'String',...
          'Data');
h_data = uicontrol('Style', 'popupmenu', 'Position', [215 85 90 20],...
     'String', ['Simulation|Sim.-Loops|From file'],...
     'Callback', 'ui_params');


uicontrol('Style', 'text', 'Position', [180 55 120 20], 'String',...
          '[Tr,Bl,Reps] or file');
h_sim  = uicontrol('Style', 'edit', 'Position', [180 30 120 25],...
                  'String', '[100 900 10]', 'BackgroundColor', [1 1 1],...
                  'Callback', 'ui_params');


uicontrol('Style', 'text', 'Position', [330 70 80 20], 'String',...
          'Stepsize [Tr,Bl]');
uicontrol('Style', 'text', 'Position', [300 45 30 20], 'String',...
          'muf');
h_muf = uicontrol('Style', 'edit', 'Position', [330 45 80 25],...
                  'String', '[1e-2,0]', 'BackgroundColor', [1 1 1],...
                  'Callback', 'ui_params');

uicontrol('Style', 'text', 'Position', [300 25 30 20], 'String',...
          'mud');
h_mud = uicontrol('Style', 'edit', 'Position', [330 25 80 25],...
                  'String', '[1e-2,0]', 'BackgroundColor', [1 1 1],...
                  'Callback', 'ui_params');


%%%%%%%%%%%%%%%%%
% Text messages %
%%%%%%%%%%%%%%%%%
h_msg = uicontrol('Style', 'text', 'Position', [10 20 140 20],...
                  'BackgroundColor', [0.8 0.8 0.8], 'String',...
                  'click a button...');


%%%%%%%%%%%%%%%%%%
% Action Buttons %
%%%%%%%%%%%%%%%%%%
h_design = uicontrol('Style', 'pushbutton', 'Position', [20 670 130 30],...
                  'Callback', 'ui_design', 'String', 'Design!');
h_imp = uicontrol('Style', 'checkbox', 'Position', [20 630 130 30],...
                  'Callback', 'ui_imp', 'String', 'MMSE Imp');
h_freq = uicontrol('Style', 'checkbox', 'Position', [20 590 130 30],...
                  'Callback', 'ui_freq', 'String', 'MMSE Freq');
h_mse = uicontrol('Style', 'checkbox', 'Position', [20 550 130 30],...
                  'Callback', 'ui_mse', 'String', 'MSE vs Params');
h_cluster = uicontrol('Style', 'checkbox', 'Position', [20 510 130 30],...
                  'Callback', 'ui_cluster', 'String', 'MMSE Cluster');
h_ep= uicontrol('Style', 'checkbox', 'Position', [20 470 130 30],...
                  'Callback', 'ui_ep', 'String', 'Error Propagation');
h_ser = uicontrol('Style', 'checkbox', 'Position', [20 430 130 30],...
                  'Callback', 'ui_ser', 'String', 'SER Curves');

h_adapt = uicontrol('Style', 'pushbutton', 'Position', [20 320 130 30],...
                  'Callback', 'ui_adapt', 'String', 'Adapt!');
h_traj = uicontrol('Style', 'checkbox', 'Position', [20 280 130 30],...
                  'Callback', 'ui_traj', 'String', 'Trajectories');
h_aerr = uicontrol('Style', 'checkbox', 'Position', [20 240 130 30],...
                  'Callback', 'ui_aerr', 'String', 'Adaptation Error');
h_acluster = uicontrol('Style', 'checkbox', 'Position', [20 200 60 30],...
                  'Callback', 'ui_acluster', 'String', 'Ad. Clus.');
h_fcluster = uicontrol('Style', 'checkbox', 'Position', [90 200 60 30],...
                  'Callback', 'ui_fcluster', 'String', 'Fin. Clus.');
h_fimp = uicontrol('Style', 'checkbox', 'Position', [20 160 130 30],...
                  'Callback', 'ui_fimp', 'String', 'Final Imp');
h_ffreq = uicontrol('Style', 'checkbox', 'Position', [20 120 130 30],...
                  'Callback', 'ui_ffreq', 'String', 'Final Freq');

h_help = uicontrol('Style', 'pushbutton', 'Position', [20 70 60 30],...
                  'Callback', 'helpwin dfecator', 'String', 'Help');
h_quit = uicontrol('Style', 'pushbutton', 'Position', [90 70 60 30],...
                  'Callback', 'ui_quit', 'String', 'Quit');


set(fig_menu, 'HandleVisibility', 'off');

ui_params;
ui_design;

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -