<< Chapter < Page
  From matlab and simulink to real     Page 3 / 3
Chapter >> Page >

Select View ->Library Browser ->Signal Processing Blockset ->Filtering->Adaptive Filters.

Highlight “Adaptive Filters”. Drag-and-drop the “LMS Filter” block onto the model.

Adding an LMS Filter Block

Setting the lms filter parameters

The most critical variable in an LMS filter is the “Step size (mu)”.

If “mu” is too small, the filter has very fine resolution, but reacts too slowly to the audio signal.

If “mu” is too great, the filter reacts very quickly, but the error also remains large.

We will start with 0.005.

Setting the Parameter “Set size (mu)”

Adding a delay

From the “Signal Processing Blockset”, highlight “Signal Operations”. Drag-and-drop the “Delay” Since we are working with frames, the delay from “Discrete Components” library will not work! block onto the model.

Adding a Delay

Setting the delay parameters

Because we are working with frames of 64 samples, it is convenient configure the delay using frames. Double-click on the “Delay” block.

Change the “Delay units” to Frames.

Set the “Delay (frames)” to 1. This makes the delay 64 samples.

Setting the Delay Size

Adding a dip switch and led

So we can hear the difference without LMS denoising and with LMS noise reduction, we will use a DIP switch of the DSK6713.

Adding a Switch and LED

Select View ->Library Browser ->Embedded Target for TI C6000 DSP. Highlight “DSK6713 Board Support”.

Drag-and-drop the “Switch” block onto the model. Also drag-and-drop the “LED” block onto the model.

Dip switch settings

The DIP switch needs to be configured. Double-click on the “Switch” block.

Select all the boxes and set “Data type” to Integer. The “Sample time” should also be set to “–1”.

Setting up the DIP Switch Values

Adding a constant, switch and relational operator

We now need to setup a way to switch between straight through without noise reduction and with LMS noise reduction.

Select View ->Library Browser ->Simulink. Highlight “Commonly Used Blocks”.

Drag-and-drop a “Constant” onto the model.

Drag-and-drop a “Switch” block onto the model.

Drag-and-drop a “Relational Operator” block onto the model.

Selecting the Commonly Used Blocks

Setting the constant value

The switch values lie between 0 and 15. We will use switch values 0 and 1. Double-click on the “Constant” block. Set the “Constant value” to 1 and the “Sample time” to “inf”.

Setting the Echo Delay Gain

Setting the constant data type

Click on the “Signal Data Types” tab. Set the “Output data type mode” to “int16”. This is compatible with the DAC on the DSK6713.

Data Type Conversion to 16-bit Integer

Setting the relational operator type

Double click on the “Relational Operator” block. Change the “Relational operator” to “==”. Click on the “Signal Data Types” tab.

Changing the Relational Operator

Setting the relational operator data type

Set the “Output data type mode” to “Boolean”. Click on “OK”.

Changing the Output Data Type

Joining the blocks

Move the blocks and join them as shown in the Figure below.

Joining the Blocks

Returning to the parent system

From the Toolbar, select the “Up Arrow” icon. This returns you to the next higher level.

Returning to the Parent System

Building the model

Selecting real-time workshop

Select Tools ->Real-Time Workshop ->Build Model.

Building the Model

Frames displayed on model

When built, the single lines are replaced by double lines. This shows frames.

Frames

The completed model running on code composer studio

From the folders on the left, select the source code for the project.

The Completed Model Running in Code Composer Studio

Different settings on the dsk6713

Microphone straight through to loudspeakers

To check out the microphone and loudspeakers, set the DIP switches on the DSK6713 as follows:

Switch Position 0

The microphone is fed directly to the loudspeakers. There is no LMS noise reduction.

Switch position for lms noise reduction

To run the “LMS Noise Reduction” subsystem, set the DIP switch to 1.

Switch Position 1 for LMS Noise Reduction

Some things to try

You may wish to experiment with different settings. Here are some suggestions.

Experiment with lms filter settings

Change the value of “Step size (mu)” between 0.0001 and 0.5. This is the critical value.

Low values of mu give good resolution, but a slow reaction time.

High values of mu give less resolution, but faster reaction times.

Find the best value of mu for noise reduction on the TI DSK6713.

Configuring the LMS Filter Block Parameter

Experiment with lms filter settings

Try different value of “Filter Length”. What is the minimum value that will allow the filter to work correctly?

Change from lms filter to rls filter

Inside the “Adaptive Filters” are different LMS types. Which are suitable for LMS denoising and which are not?

Available Adaptive Filter Types

Figure 40 –

MATLAB and Simulink are registered trademarks of The MathWorks, Inc. See www.mathworks.com/trademarks for a list of additional trademarks. Other product or brand names may be trademarks or registered trademarks of their respective holders.

Questions & Answers

it is the relatively stable flow of income
Chidubem Reply
what is circular flow of income
Divine Reply
branches of macroeconomics
SHEDRACK Reply
what is Flexible exchang rate?
poudel Reply
is gdp a reliable measurement of wealth
Atega Reply
introduction to econometrics
Husseini Reply
Hi
mostafa
hi
LEMLEM
hello
Sammol
hi
Mahesh
bi
Ruqayat
hi
Ruqayat
Hi fellas
Nyawa
hey
Sammol
hi
God
hello
Jahara
Good morning
Jorge
hi
abubakar
hi
Nmesoma
hi
Mahesh
Hi
Tom
Why is unemployment rate never zero at full employment?
Priyanka Reply
bcoz of existence of frictional unemployment in our economy.
Umashankar
what is flexible exchang rate?
poudel
due to existence of the pple with disabilities
Abdulraufu
the demand of a good rises, causing the demand for another good to fall
Rushawn Reply
is it possible to leave every good at the same level
Joseph
I don't think so. because check it, if the demand for chicken increases, people will no longer consume fish like they used to causing a fall in the demand for fish
Anuolu
is not really possible to let the value of a goods to be same at the same time.....
Salome
Suppose the inflation rate is 6%, does it mean that all the goods you purchase will cost 6% more than previous year? Provide with reasoning.
Geetha Reply
Not necessarily. To measure the inflation rate economists normally use an averaged price index of a basket of certain goods. So if you purchase goods included in the basket, you will notice that you pay 6% more, otherwise not necessarily.
Waeth
discus major problems of macroeconomics
Alii Reply
what is the problem of macroeconomics
Yoal
Economic growth Stable prices and low unemployment
Ephraim
explain inflationcause and itis degre
Miresa Reply
what is inflation
Getu
increase in general price levels
WEETO
Good day How do I calculate this question: C= 100+5yd G= 2000 T= 2000 I(planned)=200. Suppose the actual output is 3000. What is the level of planned expenditures at this level of output?
Chisomo Reply
how to calculate actual output?
Chisomo
how to calculate the equilibrium income
Beshir
Criteria for determining money supply
Thapase Reply
who we can define macroeconomics in one line
Muhammad
Aggregate demand
Mohammed
C=k100 +9y and i=k50.calculate the equilibrium level of output
Mercy Reply
Hi
Isiaka
Hi
Geli
hy
Man
👋
Bahunda
hy how are you?
Man
ys
Amisha
how are you guys
Sekou
f9 guys
Amisha
how are you guys
Sekou
ys am also fine
Amisha
fine and you guys
Geli
from Nepal
Amisha
nawalparasi district from belatari
Amisha
nd u
Amisha
I am Camara from Guinea west Africa... happy to meet you guys here
Sekou
ma management ho
Amisha
ahile becheclor ho
Amisha
hjr ktm bta ho ani k kaam grnu hunxa tw
Amisha
belatari
Amisha
1st year ho
Amisha
nd u
Amisha
ahh
Amisha
kaha biratnagar
Amisha
ys
Amisha
kina k vo
Amisha
money as unit of account means what?
Kalombe
A unit of account is something that can be used to value goods and services and make calculations
Jim
all of you please speak in English I can't understand you're language
Muhammad
I want to know how can we define macroeconomics in one line
Muhammad
it must be .9 or 0.9 no Mpc is greater than 1 Y=100+.9Y+50 Y-.9Y=150 0.1Y/0.1=150/0.1 Y=1500
Kalombe
Mercy is it clear?😋
Kalombe
hi can someone help me on this question If a negative shocks shifts the IS curve to the left, what type of policy do you suggest so as to stabilize the level of output? discuss your answer using appropriate graph.
Galge Reply
if interest rate is increased this will will reduce the level of income shifting the curve to the left ◀️
Kalombe
Got questions? Join the online conversation and get instant answers!
Jobilize.com Reply

Get Jobilize Job Search Mobile App in your pocket Now!

Get it on Google Play Download on the App Store Now




Source:  OpenStax, From matlab and simulink to real-time with ti dsp's. OpenStax CNX. Jun 08, 2009 Download for free at http://cnx.org/content/col10713/1.1
Google Play and the Google Play logo are trademarks of Google Inc.

Notification Switch

Would you like to follow the 'From matlab and simulink to real-time with ti dsp's' conversation and receive update notifications?

Ask