Sen Maw kuo Banner
Home Page Awards Books Journal Patents Projects
 
  Book Chapters Conference Papers Consulting Projects Courses
 

APPENDIX ABOUT THE SOFTWARE

The diskette that accompanies this book includes programs that can be used to analyze and implement the active noise control algorithms discussed in the text. Assembly language programs are provided for TMS320C25 and TMS320C30 systems, and C language programs are provided for general PC systems.The TMS320C25 assembly files have been compiled and tested with Texas Instruments' DSP Fixed Point COFF Assembler 6.40 DSPA.EXE, DSP Fixed Point COFF Linker 6.40 DSPLNK.EXE, TMS320C5x Debugger 6.40, Simulator 1.11 SIM5X.EXE.The TMS320C30 assembly files have been 

compiled and tested with Texas Instruments' TMS320C3x/4x COFF Assembler, 4.40, ASM30.EXE, TMS320C3x/4x COFF Linker, 4.40 LNK30.EXE. The ANSI C files have been compiled and tested in a number of system configurations, including compilation with the Borland C++ 4.5 BCC.EXE compiler. The executable files included on the disk 

were created with Turbo C++ 2.0 TC.EXE.

I.1 Installing the Diskette Files

The programs are divided into the three main system groups, and you may select to install any or all of the files.Altogether, the program files require 1.8 MB of hard drive space. To install the files, perform the following steps:

1. Assuming you will be using the drive A as the floppy drive for your diskette, at the A:> prompt type INSTALL.You may also type A:INSTALL at the C:> prompt.

2. Follow the instructions displayed by the installation program.The default choice for the 

installation directory is ANC and the default drive is C. There are five options to select from: 

TMS320C25 programs alone, TMS320C30 programs alone, TMS320C25 programs and TMS320C30 programs, C programs, and All. When the selected files have been installed, exit from the the install program and move to the program directory to start running the programs. 

I.2File Organization

ANCMain directory

sn.exe (signal generation program)

sg.exe (graphics program)

readme.txt (notes about programs)

C25TMS320C25 programs

 contents.txt

siminit.cmd (command file for using TMS320C25 simulator)

*.asm (assembly program source files)

C30TMS320C30 programs

contents.txt

make30.bat (batch file for assembler and linker)

*.asm (assembly program source files)

CPROGSPC programs

        srccontents.txt

*.c (C program source files)

*.asc (transfer function coefficient files in ASCII format)

exe

*.exe (executable C programs)

*.bin (transfer function coefficient files in binary format)

I.3Source Program Description

A. TMS320C25 programs

AFANC.ASM - Single-channel adaptive feedback ANC system using the FXLMS algorithm on the TMS320C25

ANFANC.ASM - Single-channel narrowband feedforward ANC system using the adaptive notch filter with the leaky FXLMS algorithm on the TMS320C25 (single-frequency example)

FURLMS.ASM - Single-channel ANC system using the filtered-U recursive LMS (FURLMS) algorithm on the TMS320C25

FXLMS-FN.ASM - Single-channel ANC system using the FXLMS algorithm with feedback neutralization on the TMS320C25

FXLMS.ASM - Single-channel ANC system using the FXLMS algorithm on the TMS320C25

B. TMS320C30 programs

AFANC.ASM - Single-channel adaptive feedback ANC system using the FXLMS algorithm on the TMS320C30

FIR-FN.ASM - Single-channel ANC system with feedback neutralization using the FXLMS algorithm on the TMS320C30 with optional leakage and/or normalization

FIRANC.ASM - Single-channel ANC system using the FXLMS algorithm on the TMS320C30 with optional leakage and/or normalization

IIRANC.ASM - Single-channel ANC system using the filtered-U recursive LMS (FURLMS) algorithm on the TMS320C30 with optional leakage and/or normalization

MC-FANC.ASM - Multiple-channel adaptive feedback ANC system (2x1 example) using the FXLMS algorithm on the TMS320C30 with optional leakage and/or normalization

MC-FIR.ASM - Multiple-channel ANC system (1x2x2 example) using the FXLMS algorithm on the TMS320C30 with optional leakage and/or normalization

MCFIR-FN.ASM - Multiple-channel ANC system (1x2x2 example) with feedback neutralization using the FXLMS algorithm on the TMS320C30 with optional leakage and/or normalization

C. C programs

AFB.C - C program simulation of single-channel adaptive feedback ANC system using the FXLMS algorithm

AFB21.C - C program simulation of multiple-channel adaptive feedback ANC system (2x1 example) using the FXLMS algorithm

AFB22.C - C program simulation of multiple-channel adaptive feedback ANC system (2x2 example ) using the FXLMS algorithm

ANF_D.C - C program simulation of single-channel narrowband feedforward ANC system using the adaptive notch filter withdirect form realization

ANF_P.C - C program simulation of single-channel narrowband feedforward ANC system using the adaptive notch filter with parallel form realization

FURLMS.C - C program simulation of single-channel ANC system using the filtered-U recursive LMS (FURLMS) algorithm

FXLMS.C - C program simulation of single-channel ANC system using the FXLMS algorithm

FXLMS_FN.C - C program simulation of single-channel ANC system using the FXLMS algorithm with feedback neutralization

HFURLMS.C - C program simulation of single-channel hybrid ANC system using the FURLMS feedforward algorithm and the FXLMS adaptive feedback algorithm

HFXLMS.C - C program simulation of single-channel hybrid ANC system using the FXLMS feedforward algorithm and the FXLMS adaptive feedback algorithm

MC-FIR.C - C program simulation of multiple-channel ANC system (1x2x2 example) using the FXLMS algorithm

MC-IIR.C - C program simulation of multiple-channel ANC system (1x2x2 example) using the filtered-U recursive LMS (FURLMS) algorithm

MCFIR-FN.C - C program simulation of multiple-channel ANC system (1x2x2 example) using the FXLMS algorithm with feedback neutralization

WSM.C - C program simulation of single-channel narrowband feedforward ANC system using the waveform synthesis method with the FXLMS algorithm

FIR.H - This function performs FIR filtering

IIR.H - This function performs IIR filtering

SHIFT.H - This function updates signal vector

URAN.H - This function generates pseudo-random numbers (see Appendix C)

I.4Testing Procedures

A. TMS320C25 programs

TMS320C25 assembly programs are implemented on the TMS320C25 simulator.Transfer function models P(z) and S(z) are supplied by the user.

1. Generate reference signal x(n) by using sn.exe.For example, type

sn n 512 .2 1. 10. xn.dat

This will generate 512 samples of x(n) in file xn.dat.

2. Convert binary file xn.dat to hexadecimal file using the executable file tisimdat.exe, which is included in the simulator package. This will generate 512 samples of x(n) in file xn.hex, stored in hexadecimal format.

3. Assemble program using TMS320 assembler.As an example, for fxlms.asm, type

dspa -v50 fxlms.asm

4. Link the program using TMS320 linker by typing

dsplnk -v50 fxlms.cmd

5. Simulate the program using the TMS320C25 simulator by typing

sim5x fxlms.out

This will generate 512 samples of e(n) in file en.hex, stored in hexadecimal format.The simulator command file is listed in file siminit.cmd.

6. Convert the output hexadecimal file en.hex to binary file using the executable file tisimdat.exe included in the simulator package. This will generate a binary file en.dat.

7. Plot en.dat by typing

sg 512 en.dat

or, plot both xn.dat and en.dat by typing

sg 512 xn.dat en.dat

B. TMS320C30 programs

TMS320C30 assembly programs are implemented on the Spectrum Signal Processing

C30 system board (and 4-channel I/O board for multiple-channel cases).

1. Load batch file called make30.bat.

2. Use make30 to assemble and link the TMS320C30 assembly program by typing

make30 firanc

3. Enter debug monitor by typing

sds30

4. Pull down "System" on menu bar, select "Load COFF", type "firanc" to load executable file.

5. Pull down "Run" on menu bar, select "Run" to run the program.

6. Pull down "Run" on menu bar, select "Halt" to halt the program.

7. Pull down "System" on menu bar, select "Quit" to terminate debug monitor.

C. C programs

1. Either compile C programs using C compiler to generate executable files or load provided compiled programs.Put in directory "exe".

2. Generate reference signal x(n) by using the signal generator program sn.exe included in the ANC directory.For example, type

sn n 256 .2 1. 10. xn.dat

and

sn n 256 .2 1.2 10. x2.dat

This will generate 256 samples in data files xn.dat and x2.dat, stored in floating-point binary format. Copy these data files to the directory ANC\CPROGS\EXE that contains executable files.

3. To execute the fxlms.c program, for example, type

fxlms xn.dat en.dat 64 .01 64 .001

This will generate 256 samples of residual error e(n) in data file en.dat

4. Plot en.dat using an included graphic routine sg.exe. For example, type

sg 256 en.dat

or, plot both xn.dat and en.dat by typing

sg 256 xn.dat en.dat

5. To test other C programs, type

afb xn.dat en.dat 64 .01 64 .001

afb21 xn.dat en.dat 128 .005 32 .001 .001

afb22 xn.dat x2.dat e1.dat e2.dat 16 .0001 .0001 .0001 .0001 128 .005

anf_d xn.dat en.dat 200 2000 1 64 .01 64 .001

anf_p xn.dat en.dat 200 2000 1 64 .01 64 .001

furlms xn.dat en.dat 64 .01 32 .001 8 .0001

fxlms xn.dat en.dat 64 .01 64 .001

fxlms_fn xn.dat en.dat 64 .01 64 .01 64 .001

hfurlms xn.dat en.dat 64 .01 32 .001 8 .0001 32 .001

hfxlms xn.dat en.dat 64 .01 32 .001 8 .0001

mc-fir xn.dat e1.dat e2.dat 128 .005 128 .0001 .0001

mc-iir xn.dat e1.dat e2.dat 128 .005 64 .0001 64 .00001

mcfir-fn xn.dat e1.dat e2.dat 128 .005 128 .005 128 .0001 .0001

wsm xn.dat en.dat 10 64 .01 10 .05

I.5 Technical Support

If your diskette has a problem, you may obtain a new diskette by calling the Wiley technical support number at 212-850-6194. If you have comments about the software, Dr. Sen Maw Kuo can be reached by e-mail at his kuo@ceet.niu.edu address and Dr. Dennis R. Morgan can be contacted at drrm@research.att.com.