Code covered by the BSD License
-
ec_load_data_dictionary()
Opens a dialog for user to choose a data dictionary file to load
-
ec_scopes(mode)
Copyright 2008 The MathWorks, Inc.
-
example_sel2html(fn,new)
Convert example_sel text files to HTML documents
-
lms_driver
Copyright 2008 The MathWorks, Inc.
-
lms_driver(rin_record,sin_rec...
Copyright 2008 The MathWorks, Inc.
-
lms_fixed(rin, sinp)
Copyright 2008 The MathWorks, Inc.
-
lms_fixed(rin, sinp)
Copyright 2008 The MathWorks, Inc.
-
lms_fixed_use_emlc(rin, sinp)
Copyright 2008 The MathWorks, Inc.
-
near_to_mic_filt_ws_0p6
NEAR_TO_MIC_FILT_WS_0P6 Returns a discrete-time filter object.
-
slblocks
See also FINDBLIB, LIBBROWSE.
-
ec_concept_data.m
-
ec_data_concept.m
-
ec_data_definitions.m
-
ec_data_fixpt_sc.m
-
ec_data_single.m
-
ec_fixed_setup.m
-
ec_fixed_setup_structures.m
-
ec_single_vs_fixed_data.m
-
hfk_pp.m
-
myec_lct_script.m
-
myec_lct_script_dbl.m
-
myec_lct_script_single.m
-
plot_logged_data.m
-
run_exsel.m
-
to_header.m
-
ec_concept
-
ec_config_subsys
-
ec_datadict_buses
-
ec_fixed_config_subsys
-
ec_fixed_eml_simple
-
ec_fixed_lct_tb1
-
ec_fixed_packngo
-
ec_fixed_slm_16bit_tb1
-
ec_fixed_slm_hardcode
-
ec_fixed_slm_structures
-
ec_fixed_slm_verify
-
ec_fixed_slm_with_bypass
-
ec_fixed_slm_with_bypass_reset
-
ec_fixed_slp_brute_force
-
ec_fixed_slp_fb_better
-
ec_fixed_slp_sb
-
ec_fixed_slp_sb_autoscaled
-
ec_fixed_slp_sb_with_mask
-
ec_lib
-
ec_playback
-
ec_single_vs_fixed
-
ec_single_vs_fixed
-
ec_single_vs_fixed_autoscale
-
ec_using_config
-
echo_cancel_library_enabled
-
mulaw1
-
mulaw2
-
must_init_outputs_in_for_loops
-
playback_wav
-
record_wav
-
to_from_soundcard
-
View all files
from
Echo Canceller Workbook targeting a dsPIC
by Kerry Schutz
This set of models and word documents show an echo canceller development workflow.
|
| ec_fixed_setup_structures.m |
%% Echo Cancellation Data Specification
% This file is best navigated using "Show cell titles"
% Note that this is an m-script which means all variables
% are evaluated in the base workspace.
%
% Signal Objects Note:
% Since multiple signals in model will have this name it is
% important to explicitly resolve these signals in the model's
% Configuration Parameters Dialog
% Diagnostics -> Data Validity -> Explicit Only
% This variation of the setup file uses custom storage classes and
% structures for the rin_linear, sin_linear, and sout_linear signals.
% Copyright 2008 The MathWorks, Inc.
%% Model parameters
load sm_filt; % spkr_to_mic_filter coefficients
sm_length = length(spkr_to_mic_filter); % variable from sm_filt mat file
spkr_to_mic_delay = spkr_to_mic_delay; % also part of sm_file file
pic_frame_size = 80;
Fs = 8000;
Ts = 1/Fs;
mpt_dimensions = [pic_frame_size 1];
%% Input Signal: rin_linear
rin_linear = mpt.Signal;
rin_linear.SamplingMode ='Frame based';
rin_linear.Dimensions = mpt_dimensions;
rin_linear.Description = 'Far End Voice';
rin_linear.DataType = 'fixdt(1,16,14)';
rin_linear.RTWInfo.StorageClass = 'Custom';
rin_linear.RTWInfo.CustomStorageClass = 'Struct';
rin_linear.RTWInfo.CustomAttributes.StructName = 'ec_struct';
%% Input Signal: sin_linear
sin_linear = mpt.Signal;
sin_linear.SamplingMode ='Frame based';
sin_linear.Dimensions = mpt_dimensions;
sin_linear.Description = 'Near end voice plus echo';
sin_linear.DataType = 'fixdt(1,16,14)';
sin_linear.RTWInfo.StorageClass = 'Custom';
sin_linear.RTWInfo.CustomStorageClass = 'Struct';
sin_linear.RTWInfo.CustomAttributes.StructName = 'ec_struct';
%% Input Signal: sout_linear
sout_linear = mpt.Signal;
sout_linear.SamplingMode ='Frame based';
sout_linear.Dimensions = mpt_dimensions;
sout_linear.Description = 'Echo Cancelled Output (near end)';
sout_linear.DataType = 'fixdt(1,16,14)';
sout_linear.RTWInfo.StorageClass = 'Custom';
sout_linear.RTWInfo.CustomStorageClass = 'Struct';
sout_linear.RTWInfo.CustomAttributes.StructName = 'ec_struct';
%% Input Signal: step_size
step_size = Simulink.Parameter;
step_size.Description = 'Echo Canceller Step Size';
step_size.DataType = 'auto'; % must use auto, fixpt doesn't work here
step_size.RTWInfo.StorageClass = 'Custom'; % originally 'Auto'
step_size.RTWInfo.CustomStorageClass = 'Define';
step_size.RTWInfo.Alias = 'STEP_SIZE';
step_size.Value = 300/32768;
%% Input Signal: ec_length
ec_length = Simulink.Parameter;
ec_length.Description = 'Echo Canceller Length';
ec_length.DataType = 'auto'; % must use auto, fixpt doesn't work here
ec_length.RTWInfo.StorageClass = 'Custom'; % originally 'Auto'
ec_length.RTWInfo.CustomStorageClass = 'Define';
ec_length.RTWInfo.Alias = 'EC_LENGTH';
ec_length.Value = 32;
%% Input Signal: Echo Cancellor Weights (Wts)
Wts = mpt.Signal;
Wts.SamplingMode ='Sample based';
Wts.Dimensions = ec_length.Value;
Wts.Description = 'Echo Cancellor Taps';
Wts.DataType = 'fixdt(1,16,15)';
Wts.RTWInfo.StorageClass = 'Auto';
%% LMS Parameters
temp = eval(Wts.DataType);
LMS_Wts_WordLen = temp.WordLength;
LMS_Wts_FracLen = temp.FractionLength;
LMS_Prod_WordLen = 16;
LMS_Prod_FracLen = 15;
LMS_Accum_WordLen = 32;
LMS_Accum_FracLen = 20;
LMS_Parms_WordLen = 16;
LMS_StepSize_FracLen = 15;
LMS_Leakage_FracLen = 15;
%% Input Signal: bypass
bypass = mpt.Signal;
bypass.SamplingMode = 'Sample based';
bypass.Dimensions = 1;
bypass.Description = 'Enable the Echo Canceller';
bypass.DataType = 'int16';
bypass.RTWInfo.StorageClass = 'Auto';
%% Input Signal: reset
reset = mpt.Signal;
reset.SamplingMode = 'Sample based';
reset.Dimensions = 1;
reset.Description = 'Clear the echo canceller taps to all zeros';
reset.DataType = 'int16';
reset.RTWInfo.StorageClass = 'Auto';
|
|
Contact us at files@mathworks.com