An Investigation of Active Control of Turbo-Prop Cabin Noise and
Vibration Using Piezoelectric Actuators
by
Weiping Xu, B.Eng., M. Eng.
Northwestern Polytechnic University
A thesis submined to the Faculty of Graduate Snidies and Research
in partial fulf ihent of the requirements for the degree of
Master of Engineering
Department of Mechanical and Aerospace Engineering
Ottawa-Carleton Institute
for Mechanical and Aeros~ace Engineering
Carleton University Ottawa, Ontario
02, September 1998 @Copyright
1998, Weiping Xu
National Library of Canada
Bibliothèque nationale du Canada
Acquisitions and Acquisitions et Bibliographie Services services bibliographiques
395 Wellington Street 395, rue Wellington Ottawa ON K1 A ON4 Ottawa ON KI A ON4 Canada Canada
Your fi& Votre relerence
Our file Notre rëfdrence
The author has granted a non- L'auteur a accordé une licence non exclusive licence allowing the exclusive permettant à la National Library of Canada to Bibliothèque nationale du Canada de reproduce, loan, distribute or sell reproduire, prêter, distribuer ou copies of this thesis in microfom, vendre des copies de cette thèse sous paper or electronic formats. la forme de microfiche/fihq de
reproduction sur papier ou sur format électronique.
The author retains ownership of the L'auteur conserve la propriété du copyright in this thesis. Neither the droit d'auteur qui protège cette thèse. thesis nor substantial extracts f?om it Ni la thèse ni des extraits substantiels may be pnnited or otherwise de celle-ci ne doivent être impdés reproduced without the author's ou autrement reproduits sans son permission. autorisation.
This study was concemed with an experimental investigation of active control of
cabin noise and fuselage vibration in a commercial turbo-prop aircraft using piezoelectric
actuators. A full-size deHavilland Dash-8 series LOO fuselage was used.
The flight data representing the actud propeller acoustic field and pressure
footprints on the fuselage was simuiated in the laboratory using a sound source consisiing
of four loud-speakers and a PC-based signal generator.
Using the sirnulated sound field, the operating deflection shapes (ODSs) of the
fuselage for va.rious sound fields of interest were measured. Based on the analysis of these
ODS results, appropriate actuation patterns were suggested that were also verified
experimentally as to their effectiveness.
Finally, a mulü-input-multi-output (MMO) feedforward control strategy was
developed and employed on the fuselage. The corresponding computer code, control
confi,wation and implementation were initially tested and optimized using a simple test-
beam.
Significant vibration and noise reductions were observed. Moreover, different
contml schemes were tested to investigate the effects of various factors and to detemine
an effective approach to achieving satisfactory control results.
1 would like to express my appreciation to rny thesis supervisor Prof. F. F. Afagh
for his support, encouragement and guidance during the course of this work. 1 wouid dso
like to thank Dr. A. Grewal h m the Aeroacoustics and Structural Dynarnic Group at
Strucnires, Materials and Propulsion Laboratory (SMPL), Instinite for Aerospace Research
(IAR) of National Research Council (NRC) for his invaluable cooperation and help during
the course of this investigation. Moreover. the generous cooperation and assistance of Dr.
L. Pave1 and the technical staff from the Aeroacoustics and Structural Dynamic Group in
conducting the experimental work at the SMP-C laboratory is gratefidly
apprecizted-
Finally, 1 would Iike to acknowledge the financial support provided by
SMPUIAR/NRC during the course of this investigation.
Table of Contents
Abstract . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . i
. . Acknowiedgements . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . il
... Table of Contents ............................................. 111
. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . List of Figures .. . vi
. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . List of TabIes
List of Abbreviations . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
List of Principle Symbois . . . . . . . . . . . . . . . . . . . . . . . . . .
. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . Chapter One: Introduction 1 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 1 . I Background 1
. . . . . . . . . . . . . . . . . . . . 1.2 Fuselage Vibration and Noise Transmission 2 . . . . . . . . . . . . . . . . . . . . . . . . . . . 1.3 Passive vs . Active Noise Control 3
. . . . . . . . . . . . . . . . . . 1.4 Active Structural Acoustic Control (ASAC) - 5
. . . . . . . . . . . . . . . . 1.5 Feedforward Algorithm and Adaptive Processing 6
Chapter Two: Sound Field Characteristics and Simulation . . . . . . . . . . . . . . . 8 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 2.1 Introduction 8
2.2 Installation and Settings of DAC AT-A040 Analog Outpuc Board . . . 11
. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 2.3 Program Development 12
. . . . . . . . . . . . . . . . 2.4 Synthesis and Measurement of Sound Pressure 14
. . . . . . . . . . . . . . . . . . . . . . . 2.5 Simulation of the Desired Sound Field 16
Chapter Three: ODS Measurements and Actuators Array Design . . . . . . . . 21
3.1 Background . . . . . .. .. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . - 2 1
3.2 Instrumentation and Data Acquisition . . . . . . . . . . . . . . . . . . . . . . . 22
3.3 ODS Measurements and Analysis ......................... - 2 5
3.4 Piezo Actuator Properties .............................. 34
3.5 Opumization of Actuation Pattern ......................... - 3 6
3.6 Verification of Actuators Anay ............................ 38
Chapter Four: Control Strategy . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 47
4.1 Adaptive Filters and LMS Algorithm ........................ 47
4.2 Recursive LMS Aigorithm .............................. 50
4.3 SIS0 Filtered-x LMS Algorithm . . . . . . . . . . . . . . . . . . . . . . . . . . . 52
4.4 MIMO LlMS Algorithm ................................ - 5 6
4.5 MlMO Filtered-x LMS Mgonthm . . . . . . . . . . . . . . . . . . . . . . . . . 58
4.6 Off-line and On-line Identifbations . . . . . . . . . . . . . . . . . . . . . . . . . 60
Chapter Five: Controi Programming and Preiiminary Implementation ..... 62
. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 5.1 The DSP System - 6 2
5.2 Mixed CIAssembly Real-time Progammïng ................... 63
5.3 Promgam Debugging and Efficiency Analysis . . . . . . . . . . . . . . . . . . . 67 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 5.4 C/Assembly Source Files 67
5.5 Preiiminary hplementation of SIS0 Conuol . . . . . . . . . . . . . . . . . -70 5.6 Preliminary Implementation of MIMO Control . . . . . . . . . . . . . . . . . 71
Chapter Six: Implementation of Real-Time Vibration and Noise Control on the . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . Fuselage - 7 3
6.1 Control Configuration . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 73
6.2 System Identification of Piezo-acmated Fuselage . . . . . . . . . . . . . . . . 75 6.3 Vibration and Noise Reduction . . . . . . . . . . . . . . . . . . . . . . . . . . . . 79
Chapter Seven: Conclusions and Recommendations . . . . . . . . . . . . . . . . . . . 83
. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 7.1 Conclusions 83
. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 7.2 Recommendations - 8 4
References . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 86
AppendVt A Accelerometer Positions for ODS Measurements . . . . . . . . . . . . . . 89
Appendix B Measured FRFs for ODSs . . . . . - . . - - . . . . . - - - - - . - - - . . . . . .90
Appendix C Accelerometer Positions to Measure Defiection Patterns
of the Piezo-actuated Fuselage . . . - . . . - - . . . . . . . . - - . . - . . . . . 92
Appendix D Results of Fuselage Vibration and Noise Control . . - . . - . . . . . . . . 93
Appendix E User Manual and Program Source Code for Sound Field Simulation
Program . . - * . . . . . . * . . . . . . . . . . . . . . . . . . . . .* . . . . . . . 135
Appendix F Source Code and Memory Configuration for SIS0 Feedforward
Control . . . . . . - . . . . - . . . . . - - . . . . . . . . . . . . . . - . . . . , . . . 157
Appendix G Source Code and Memory Confi,wation for MIMO Feedforward
Controi . . . . . . . . . . . . . . . . . . . - . . . . . . . . . . . . . . . . . . . . . , 167
List of Figures
.... Fig . 1.1 Components of a typical active noise control system for an enclosure 6
Fig . 2.1 Pon side propeller pressure distribution in dB . . . . . . . . . . . . . . . . . . . . 8
Fig . 2.2 Exterior SPL contours. BPF. 9 10 rpm ......................... - 9
Fig . 2.3 Flow chart for program WDAQ-CPP .......................... 13
. . . Fig . 2.4 Schematic of synthesis and measurement of the simulated sound field 16
Fig . 2.5 Achieved vs . desired SPL and phase of the simulated propeller sound
.......................................... field at 61Hz 18
Fig . 2.6 Achieved vs . desired SPL and phase of the simulated propeIIer sound
. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . field at 70Hz 19
Fig . 2.7 Achieved vs . desired SPL and phase of the simulated propeller sound
. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . field at 121& 19
Fig . 2.8 Achieved vs . desired SPL and phase of the simulated propeller sound
. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . field at 140& 20
Fig . 3.1 Schematic of accelerometer iocations at Stations C and E for ODS
. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . rneasurements 23
Fig . 3.2 Schematic of the experimental set-up for ODS measurements . . . . . . . . . 24
Fig . 3.3 Acceleration spectnim (in d s ' ) at station E05 under 61 Hz sound field . 27 Fig . 3.4 Acceleration spectrum (in mmls') at station E05 under random sound field 27
Fig . 3.5 ODS at Station C under 61Hz sound field . . . . . . . . . . . . . . . . . . . . - 3 0
Fig . 3.6 ODS at Station C under 121Hz sound field . . . . . . . . . . . . . . . . . . . . . 31
Fig . 3.7 ODS at Station C under 70Hz sound field . . . . . . . . . . . . . . . . . . . . . . 31
Fig . 3.8 ODS at Station C under 140Hz sound field . . . . . . . . . . . . . . . . . . . . . 32
Fig . 3.9 ODS at Station E under 61Hz sound field . . . . . . . . . . . . . . . . . . . . . . 32
Fig . 3.10 ODS at Station E under 12lHz sound field . . . . . . . . . . . . . . . . . . . . . 33
Fig . 3.1 1 ODS at Station E under 70Hz sound field . . . . . . . . . . . . . . . . . . . . . . 33 Fig . 3.12 ODS at Station E under 140Hz sound field . . . . . . . . . . . . . . . . . . . . . 34
Fig . 3.13 Actuation induced by piezo-elements . . . . . . . . . . . . . . . . . . . . . . . . . 37
Fig . 3.14 Schematic of accelerometer Iocations for actuallon pattern measurements . 41
Fig . 3.15 Response to piezo actuation pattern $5 ar 61Hz . . . . . . . . . . . . . . . . . . 43
Fig . 3.16 Response to piezo actuation pattern #6 at 6 lHz . . . . . . . . . . . . . . . . . . 44
Fig . 3.17 Response to piezo actuation pattern ##t at 121Hz . . . . . . . . . . . . . . . . - 4 4
Fig . 3.18 Response to piezo actuation pattern #8 at 12 1Hz . . . . . . . . . . . . . . . . - 4 5
. . . . . . . . . . . . . . . . . Fig . 3.19 Response to piezo actuation pattern +9 at 121Hz 45
................ Fig . 3.20 Response to piezo 2ctuation pattern #4 at 140Hz - 4 6
. . . . . . . . . . . . . . . . . Fig . 3.21 Response to piezo actuation pattern #8 at 140Hz 46
. . . . . . . . . . . . . . . . . . Fig . 4.1 Block d i a a m of a simple adaptive connoller -47
. . . . . . . . . . . . . . . . . . . . . . . . Fig . 4.2 Block diagram of a recursive conaoller 50 . . . . . . . . . . . . . . . . . Fig . 4.3 Block diaa- of a connolier with secondary path 53
. . . . . . . . . . . . . . . . . . . . Fig . 4.4 Block diagram of a filtered-x LMS controller 55
. . . . . . . . . . . . . . . . . . . . Fig . 3.1 TMS320C3xC4x software development flow 64
. . . . . . . . . . . . . . . . . . . . . Fig . 5.2 Program fiow chart for system idenacation 69
..................... Fig . 5.3 Program fiow chart for control operation - 7 0
. . . . Fig 5.4 The test beam, acmator and accelerometer for SIS0 vibration control 71
Fig . 5.5 The test beam, acmators and accelerometers for MIMO vibration control . 72 . . . . . . . . . . . . . . . Fig . 6.1 Schematic of system identification and control setup 74
Fig . 6.2 Measured and identified transfer functions between input #4
. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . andoutpu:#4 78
Fig . 6.3 Open-loop and closed-loop acceleration spectra of SPL . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . at aisle seats of second row - 8 1
vii
List of Tables
Table 2.1 Desired SPLs and phases at eight grid centers of the speakers . . . . . . . . . 10
Table 3.1 Materiai characteristics of BM400 piezo-ceramics ................ 35
Table 3.2 Verïfied aciuation patterns . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 39 ...................................... Tabie 6.1 Identification cases 77
List of Abbreviations
ADC ALU ANC ANS1 ASAC BPI? DAC DMA DSP mo FIR lm? GUI IAR IIR LMS M m 0 mc ODS RLMS SIS0 SMPL SPL
Analog to Digital Converter
Mgorithm Logic Unit
Active Noise Control
American National Standard Institute
Active Structurai Acoustic Control
Blade Passage Frequency
Digital to Analog Converter
Direct Memory Access
Digital Signal Processing
First-In Fist-Out
Finite Impulse Response
Frequency Response Function
Graphic User Interface
Instinite for Aerospace Research
Infinite Impulse Response
Least Mean Square
Multi-Input and Multi-Output
Nationai Research Council
Operating Deflection Shape
Recursive Least Mean Square
Single-Input and Single-Output
Structures, Materials and Propulsion Laboratory
Sound Pressure Level
List of Principie Symbols
Description
Vector of sound pressures
Vector of voltage output
Transfer matrix for sound field simulation
Coherence func tion
Cross power spectrum density function
Input auto power spectrum density function
Output auto power spectnim densiw function
Frequency response function
Piezo charge constant
Piezo elastic cornpliance
Piezo rnass density
Direct filter for plant
Recursive filter for piant
Direct fdter for plant model
Recursive fdter for plant model
Direct filter for controiler
Recursive filter for controller
Primary path
Secoridary path
Direct coefficient of control filter
Recursive coefficient of controi fdter
Direct coefficient: of identification filter
Recursive coefficient of identification filter
Convergence coefficient
Reference sequence
Output sequence of controiler
Output sequence of plant
Error sequence
Objective function sequence
Disturbance sequence
Training signal sequence
Direct filtered sequence
Recursive filtered sequence
In keeping with the practices of the North Amencan aerospace industry and the
hstitute for Aerospace Research (NRC), the lmpend system of unirs is employed in this
thesis. SI system of units are used within the text, and in the figures where practicaf. The
following conversion factors are useful:
1 inch = 25.4 mm
i foot = 0.3048 rn
1 ksi = 6.8948 x 10'' pPa
Chapter One
Introduction
1.1 Background
The cabin noise widun commercial turbo-prop aircraft is a major source of
discornfort to the passengers. During the recent years, the Aeroacoustics and Strucniral
Dynamics Group of the Structures, Materials and Propulsion Laboratory (SMPL) at
Institute for Aerospace Research (IAR) of the National Research CounciI (NRC) of
Canada has been investigating the possibiiity of connolling noise and vibration in the
deHavilland Dash-8 Senes 100 turbo-prop aircraft using different control techniques. This
research work at SMPUIAR/MZC has been carried out mainly under contract from
- deHavilland of Canada.
Launched in 1980, the deHavilland Dash-8 is the most successfu~ regional airliner
in the world, with over 400 in service. The frrst of the four member farnily of the Series
100, 200, 300 and 400. the Series 100 combines advanced technology to accommodate
for ail the superior design features in order to provide the ruggedness. reliability and
performance that is required from a short-haul, high-fkequency regional airlines. Their
spacious interior, outstanding performance and reliability make rhem an outstanding
passenger aircraft as well as an ideal multi-mission platform.
The main focus of the research work at SMPL/IAR/NRC has been to reduce the
internal cabin noise by controlling the fuselage vibration and consequendy attenuating
noise transmission from the outside sound field to the cabin interior. This so-called active
2
structural acoustic control (ASAC) has shown a good potential to be applied to
commercial aircraft. In fact, successful vibration and noise conuol has been reported by
employing a feedback control strategy durinp the initial phases of this research at
S M P W N R C [Il . 12,131. Both cornputer simulation and expenmentai implementatïon
were used in these earlier studies- The simulation was canied out by modelling the
vibration-acoustic coupling models while experimental work was irnplernented oii a full-
scaie fuselage in the laboratory.
However, the feedback control strategy appears to be suitable in controlling a
nanow-band disturbance with a futed frequency [23]. Whereas. during real flight
conditions, the engine speed c m Vary throughout a considerable range of magnitudes from
take-off to cruising state, thus resulting in a correspondhg variation in the frequency of
disturbance. Therefore, From a practical and operaional point of view, due to its
capability of adapting to a varying narrow-band or even broad-band disturbance, a
feedforward control strategy should be more suitable for this application than the
conventional feedback control approach (6,7]. Hence, the main objective of the work at
hand was to expand further the previous work done at S M P U W N R C by using a
feedforward control snategy in an ASAC approach to control the fuselage noise and
vibration. The feasibiiity of this approach was tested experimentally on a full-size
deHavilland Dash-8 Senes 100 fuselage.
1.2 Fuselage Vibration and Noise Transmission
Cabin noise in turboprop aircraf't is generated by various sources, including
3
boundary layer flow noise, acousùc excitation of the fuselage frorn the propeiler, and
sûxcture-b~me noise due to engine vibration. For typicd turbo-prop aircraft, the
proxirnity of the propeller disc to the hselage results in the narrow-band acoustic
excitation of the fuselrge being the dominant source of noise C14J.
The propeller noise transmission fiom the cabin exterior to its intenor occurs due
to the coupling of the propeller-induced fuselage vibration and the interior acoustical field.
A general, yer detailed theoretical treatment of acoustic coupihg between a structure and
its enclosed volume of fluid can be found in reference [16]- However. Grewal, et al. [13]
have presented a vibration-acoustic modelhg and simulation approach specificaily for
aircraft cabin noise transmission in which the uncoupled equations governing the
strucniral and acoustic subsystems are presented. The coupling terms a2pea.r due to
integrating the product of the structural and acoustic mode shape functions at the
structurai-acoustic boundary over the entire area. Various studies have shown thar noc all
the structural and acoustic modes are necessarily strongly coupled. and therefore, intenor
noise reduction can be attained by controlling only diose stnicniral vibration modes which
are well coupled with the interior acoustic modes [22].
Thus, using a distributed piezo array, as was done in this investigation. allows to
connol appropriate s ~ c t u r a l modes by inducing properly distributed bending moments,
and consequendy controlling the corresponding acoustic mcdes more effectively.
1.3 Passive vs. Active Noise Control
A significant amount of work has been canied out b y various researchers to reduce
4
the noise level in the passenger cabin as a source of discornfort to passengen.
Passive control of noise and vibration is a technique that has been adopted
extensiveiy in engineering noise and vibration control. The cornmon practice in this
approach is to either rnodiQ the stifiess of the structure or augment its damping to
achieve passive control by avoiding structural resonances or absorbing vibration and/or
acoustk energ. However, for the stpe of problem in this invesrigation, such passive
control techniques are generally not very effective. In fact, increasing the damping does
nor reduce the noise and vibration levels appreciably since the excitations are usually
neither broadband nor resonant 11 11. Moreover. ushg damping materials is generally
ineffective at the low fiequencies (50 to 300 Hz) where propeller noise is si,@Ïcant.
Also, narrow-band damping, using tuned vibration absorbers can be effective in reducing
noise, but the improvement is limited due to the dificulty in keeping the devices tuned
in a varying environment.
The successful use of active noise controI ( M C ) , where a large nurnber of
microphones and speakers are employed, has been reported in various appiicaùons with
sipifIcant noise reductions [6,16,25,26]. This approach, generdly referred to as noise
canceuation, is realized by generating sound waves using secondary sources that interfere
with the noise, thereby using the destructive interference of the component waves to
reduce the level of the noise. However, the size of the required devices and the
complexicy of the configuration make the implemenration of this approach inside the
cabin of an aircraft unattractive.
5
1.4 Active Structural Acoustic Control (ASAC)
Rather than using a large number of microphones and loudspeakers to generate a
cancelling sound field, active structural acoustic control involves the use of structural
acniators in conjunctiog with a combination of acoustic and structural sensors to address
the problem before the noise is transmitted inside the aircraft cabin. In other words,
ASAC is achieved by rnodiQing the acousric transmission properties of the fuselage and
by weakening the coupling between the exterior and interior acoustic. A simulation for
active control of the transmission of sound through a thin cylindncal shell has been
reported by D.R. Thomas and et. al. [22]. In this simulation the fuselage was modelled
as a simple cylinder and the control effectiveness for various acniation modes was
presented. An experimental implementation of this approach was adapted for the present
investigation where a number of related issues are raised and addressed. For example, the
operathg deflection shapes and piezo actuating patterns are determined to explore the
most efficient controi configuration.
Comparing to passive control, a typical active noise control system consists oE (1)
error sensors such as microphones, snain gauges, and/or accelerometers; (2) control
actuators; and (3) a controller, Fig. 1-1.
Using an ASAC approach, the initial research at IAR of NRC referred to earlier,
indicated that the approach involving the feedback of local süuctural vibration is
promising, with a ~i~gnificant level of vibration ând noise reduccion achieved in a limited
implementation of this concept [ I l , 121. In that investigation, colloca~ed actuator/sensor
pairs were bonded to the fuselage in the propeller footprint area. A Single-Input and
6
Single-Output (SISO) control loop was used for each acniator/sensor pair and a classical
second order feedback algorithm was implemented in r d rime. Using a full-scale
fuselage, open-loop transfer functions fiom actuator to strain. actuator to acceleration, and
actuator to interior sound level were obtained. Furthemore, the performance of the
control system in the presence of an acoustic disturbance was evaluated by comparing a
series of open h o p transfer functions for (i) disturbance to average strain. (ii) disturbance
to average acceleration, and (iii) disturbance to interior sound pressure to their
corresponding ciosed loop transfer functions.
Electronic Physical Control Control System , System - Pnmary
Disturbance
I Controller :
I
Fi s 1.1 Components of a typical active noise control system for an enclosure (ref. [4])
1.5 Peedforward Algorithm and Adaptive Processing
A feedforward control suategy was used in this investigation. To control a narrow-
7
band harmonic disturbance, both feedback and feedforward strategies have been shown
to be equally effective [17]. However, once a feedback controiler has been designed it c m
only conuol a disturbance with fxed fiequency bands- In contrast, a feedforward
controller can keep adapting the frequency change of disturbance chrough the control
process, and therefore it is suitable to conuol a fiequency-varying disturbance.
In feedfonvard control strategy, active control of a periodic signal is achieved by
assuming the availability of a reference s i s a l that is well-correlated with the periodic
signal that is to be cancelled. In contrast to the feedback aigorithm. the generation of tbis
reference signal is cornpletely independent of any action of the secondary source. Digital
adaptive füters are employed as the basic components in system identification and
control. Multi-Input and Multi-Output (MIMO) capability of the control system is deemed
to be of paramount importance if global vibration and noise attenuation is to be
achieved,
The implementation and application of this technique has been greatly influenced
by the development of powerfül digital signai processors (DSPs) and adaptive signai
processing algorithms since late 1980s. Due to the hi@ speed DSPs reai-time numencd
processing of digitized cipals have become possible. Moreover, adaptive algorithms
allow for a varying environment and c m process several frequencies simultaneously or
even handle broadband disturbances.
Chapter Two
Sound Field Characteristics and Simulation
2.1 Introduction
As it was pointed out earlier. for a typical turbo-prop aircraft the narrow-band
acoustic excitation of the fuselage is the dominant source of cabin noise. For the
deHavilland Dash-8 aircrafc. this source of noise occurs at a fundamental Blade Passage
Frequency (BPF) varying berween 6 1 Hz and 70 Hz and its higher hannonics. It should
be noted that a BPF depends on the engine speed which can Vary from 910 rpm at
cruising condition to 1050 rpm at take-off. For a four bladed propeller, the BPFs at 910
rpm and 1050 rpm correspond to 61 Hz and 70 Hz respectively. The sound pressure
created by the propeller is essentially concentrated in the vicinity of the propeller. Figs.
3.1 and 3.2 show examples of the sound pressure levei (SPL) contour on a typical Dash-8
fuselage.
Front \
Fi;. 7.1. Port side
. . . . . \
4 6 a 1 O O 2 - - (ml
propeller pressure distribution in dB. re: maximum value (ref [Il])
Fig. 2.2 Exterior SPL contours, BPF, 9 10 rpm
To demonstrate the vibration and noise conuol on a full-scale fuselage, it was
necessary to simulate. in the Iaboratory, the sound field created by the propeller. T h i s
simulation was based on the extemal acoustic pressure field data for various flight
conditions that was supplied by the propeller manufacturer. Hamilton Standard- This data,
that reflects the characteristics of the power-plant propeller and fuselage at flight
conditions, refen to the SPLs and phases at eight given locations indicated in Fig. 2.2 and
is presented in Table 2.1. To provide the desired sound field in the propeller footprinr
area. important charactenstics, such as magnitude and phase of this flight data were
sirnulated using the four-speaker sound source developed at Structures, Materials and
Propulsion Labolatory (SMPL) of W N R C . This system was driven by audio amplifien
10
that were controiled by a PC-plug-in digital to analog convertor (DAC) output board of
type AT-AO- 20.
1 BPFof61Hz 1 BPFof121Hz 1 BPF of 70Hz 1 BPF of 140 Hz 1
SPL 1 Phase 1 SPL 1 P h 1 SPL 1 Phase 1 SPL 1 Phase
-
Table 2.1 Desired SPLs and phases at eight grid centers of the speakers
A Windows-based program with a graphic-user-interface (GUI) was developed in
C t t language to implement the following features: (1) to set desired characrenstics, such
as frequencies, output voltage levels and phases; (2) to pre-display the output voltage
wavefonns; (3) and to synthesize and ourpur analog voltages out of the analog output
board. The documentation of this code is presented in Appendix E.
An effective simulation procedure was developed by £ixst fornUng the transfer
function matrix b e ~ e e n speaker input voltages and the sound pressure distribution and
then calculating the required output voltages for a desired pressure distribution. Four
tmnsfer function matrices associated with four desired frequencies were obtained. Each
of these was developed by measuring the sound pressure distribution due to a single
dB
D2
Dl
C2
deg 1 dB 1 deg
-5.64
-3 -29
-1.07
dB
-5.33
-3.3 1
- 1 .O2
49.8
25.7
d%
66.9
38.7
9-7
-9.40
-5.33
173.8
115.1
4.2 1 -2-13
dB
-9.77
-6-73
-2.45 8 1.8
deg
-146. 1
138.0
101.8
I l
channel output of unit magnitude. Using these transfer fùnction matrices the- analog
voltage outputs corresponding to the required sound pressure distribution were taiculated
by Matlab.
2.2 Installation and Settings of DAC AT-AO-10 Analog Output Board
The AT-A040 is a high-performance analog output and digital I/O board for the
PC, and is designed for various applications such as: process control, instrumentation, and
eiectronic test signal generation. The major feames of this board are as follows:
(1) 10 double-buffered 12-bit DACs
(2) Unipoladbipolar voltage output
(3) 4-20mA curent output
(4) Onboard 1,024-word FIFO buffer
(5) Transfer rates up to 200 K Samples/Sec. per channel
(6) 8 Digital I/O lines
(7) Full PC 3VO Channel DMA
This board was installed into a D e l 486 PC following the steps in the AT-AO-10
User Manual [15]. For applications in diis project, only the fxst 4 DACs were used in
F?FO buffer mode. The hardware settings were as foilows:
(1) Base I/O address: HexlCO (to 1DF)
(2) DMA Channel: channel 5
(3) Interrupt level: Group 1 - level I l , Group 2 - level 10
(4) Bipolar voltage ourput
(5) Extemai reference voltage: on-board 2.5-volt reference voltage output
23 Program Developrnent
A Ci+ code was developed under Borland Ci+ 4.5 environment (Appendix E).
Borland C-H 4.5 is a powechlI CICtç development system with a number of usehl
features. Both 16-bit Windows application (Widows 3.1) and 3 2-bit Windows application
(Windows 951JYT') could be created with this source code.
The developed Windows-based executive file provides a gaphic user interface that
can conveniently sec the required output analog signal for each of the four charnels by
pre-displaying the output wavefom on the screen, saving or loading the necessq setting
parameters to or fiorn the disk files, and programming and controLIing the DAC AT-AO-
10 board.
The corresponding flow chart is shown in Fig. 2.3.
The code for GUI parameter settings was developed based on two Windows OWL
classes: TframeWindows and Tapplication. Two new diaIog classes were denved from
OWL class TDialog .
The configuration of DAC board was compiemented by programming a series of
registers. The followùig steps were used in this process:
(1) Select extemal reference voltage;
(2) Set two's complement bipoiar output mode;
(3) Forbid any interrupts;
1 Configure the DAC board l i
Parameter serting with Windows GUI
Calculate waveforms and Save them into a large array L 1
i Display the waveform on the screen
t Check FLFO half-empty ? /
1 Yes
Wnte 512 words into FIFO
Check any key pressed ? No L
Exit fi Fig. 2.3 Flow chart for the program WDAQ.CPP
(4) Select the source of counter 1 of MSM82C53 Programmable Timer to be
lm;
(5) Enable FIFû;
(6) Set DAO, DAI, DA2 and DA3 as group 1;
(7) Select double-buffer DAC output mode. The output of group 1 is updated by
14
counter 1 and is scanned from FIFO sequentially;
(8) Set counter 1 of MSM82C53 as mode 2 (Rate Generator) with count value of 100
(therefore the output sample rates wilI be lOKHz since the dock rate is lhIEh as set in step
(4)) -
The limitations of the pro- are as follows:
(1) In order to achieve a continuous waveform by using a buffer of finice length, the
output frequency is designed at 1.0 Hz resolution.
(2) To keep the analog waveform suficiendy smooth, the frequency is restrïcted to
a maximum of 999 Hz, thus, allowing at Ieast ten samples per cycle.
(3) Up to ten components of frequency are allowed for each wavefom
(4) Maximum output is restricted to connected extemal reference voltage
(5 ) This program c m only be executed with DAC AT-AO-10 analog output board
and under the exact hardware settings described in Section 2.2.
2.4 Synthesis and Measurement of Sound Pressure
The experimentd senip for synthesizing and measuring the simulated sound field is
shown in Fig. 2.4.
Voltage signais supplied by AT-A040 board were sent to speakers afrer being
amplified b y ASHLY MFA-8000 audio ampli fiers.
Four speakers, each wirh an opening measuring 30"x2411 in surface area, covered
a total of approxirnateiy 100 degrees around the fuselage at the footprint area. The center
15
of speaker B was located at the point of maximum sound field pressure. which was
located at 305 degrees in the circumferential direction from the top point (see Figs. 2.1
and 2.2). There was a 2" distance between the speakers and the fuselage surface to allow
the installation of a microphone and for the blending of sound of each speaker.
A Briïel-Kjœr (B&K) 4136 microphone was used to detect sound pressure at
desired points. These were located ar the center of each of the four @ds on a speaker
(Fig. 2.4). The B&K Type 4136 is a pressure microphone with a quarter inch diameter
[SI. No specific orientation is required for this type of microphone. The maximum
aüowable sound pressure level for this microphone is 186 dB re 20 pPa, which is
adequate for this investigation since the maximum simulated sound pressure wouid not
exceed 130 dB. The frequency response is suficiently flat (less than 0.2 dB correction
is required when the frequency is below 4 KHz ). Based on the requirement of the
microphone, a polarization voltage of 200 V was used for the B&K Type 26 10 m e a s m g
amplifier that was employed in this investigation.
S ipals from the microphone were analyzed using a ZONIC 7000/ZETA data
acquisition system. The analysis included checking the waveform, auto-specrra analysis
to determine the sound pressure ma,~tude in the frequency domain. and frequency
response analysis with reference to the DAO output of the AT-AO-IO board.
Fig. 2.1 Schematic of synthesis and measurement of the simulated sound field
2 5 Simulation of the Desired Sound Field
Using the propeller pressure flight data presented in Table 2.1, the sound pressure
levels and phases at sixteen locations around the fuselage surface were selected. These
locations correspond to the centers of the four grids on each of the four speakers.
However, due to symmetry of the simdated sound field with respect to the
cir~umferentid center line of the speakers' grid, only half of these Locations are
considered in the foilowing development. The output voltages and phases of the 4-channeI
17
DAC board were set for each of the following four frequencies: 6 1Hz (9 lOrpm, BPF),
121Hz (910rpm, 2xBPF), 70Hz(1050rpm. BPF) and 140Hz (1050rpm, 2xBPF).
Since the simulated sound pressure at every spatial point would be the resultant
of the magnitude and phase from each individual speaker source. it is necessary to obtaui
an appropriate transfer function matrix. This matrix represents the relationship between
DAC outputs and the resulting sound pressures, i-e.,
In equation (2.1) , V is a vector of voltage outputs. P is the vector of sound
pressures at 8 locations, and F is the transfer matrix. Each column of F, representing the
response from a specific speaker, is obtained by measmfng the response when only that
speaker is driven by a one Volt output fiom the DAC board and al1 other speakers are
tumed off. Since the voltage outputs from the DAC and the resulting response have a
magnitude as well as a phase, the components of F. P and V are al1 complex numbers.
Once the transfer mauix F is obtained, the required DAC voltage output, V,
corresponding 10 any desired response P could be obtained by the method of Least
Squares, i.e.,
(2.2)
Using the required voltage outputs obtained from equation (2.2) in the PC
program WDAQ.EXE and dnving the speakers through the amplifiers the desired sound
fields were created. In driving the amplifiers the gains were set at exactly die same levels
which were used in obtaining the vansfer function matrix.
The results of simulations at four different frequencies of 6 IHz. 12 1Hz. 70Hz and
140Hz are presented in Figs. 2.5-2.8. The resulting conamence between the required and
the simulated values indicates that the approach taken for sound field simulation is
highly feasible and effective.
96 1 I I
2 3 - 5 6 7 e 1 Miaophone LOCatiUn
t 1 1 1 I 1
2 3 4 5 6 7 a Microphone Location
Fig. 2.5 Achieved (dashed) vs. desired (solid) SPL and phase of the simulated propeiler
sound field at the BPF, 910 rpm (61 Hz); measured over 8 microphone locations.
971 ! t 1 1 2 3 4 5 6 7 8
Microphone -an
Fig. 2.6 Achieved (dashed) vs. desired (solid) SPL and phase of the simulated propeller
sound field at the BPF, 1050 rpm (70 Hz); measured over 8 microphone locations.
-mol l I 1 1 1
3 4 5 6 1 2 * 8 Microphone Location
Fig. 2.7 Achieved (dashed) vs. desired (solid) SPL and phase of the simulated propeller
sound field at the BPF, 2x9 10 rpm (121 Hz); measured over 8 microphone locations.
g4 .-.
82 I
1 2 3 4 5 6 7 8 Miaophooe Location
r 1 1 1 2 3 4 5 6 7 a
Microphone Location
Microphone Lo<Taîion
Fig. 2.8 Achieved (dashed) vs. desired (solid) SPL and phase of the simulated propeiler
sound field at the BPF, 2x1050 rpm (140 Hz); measured over 8 microphone locations.
Chapter Three
ODS Measurements and Actuators Array Design
3.1 Background
In active structural acoustic control (ASAC), the objective is to connol the noise
widiin an enclosure by controlling the associated structural vibration. Therefore, it
becomes necessary to d e t e d n e the operating deflection shape (ODS) of the bounding
structure in advance. The ODS refers to the dynamic deflecuon pattern of a structure
under an operating Load with a partïcular magnitude and phase disaibutÏon. Specifically,
in this investigation, it refers to the dynamic defiection pattern of the fuselage under the
exterior propeller pressure field. The expenmental simulation of this pressure field in the
laboratory s e t ~ g is discussed in Chapter Two.
The measured ODSs were used to determine the most effective arrangement of
acniators. In connast ro vibration mode shapes, ODSs are obtained frorn the forced
vibration of the structure caused by the simulared sound field. In fact, an ODS is
composed of a number of mode shapes in a weighted sense. A significant difference
between a mode shape and an ODS is that the former is phase independent whereas the
latter is not. ODS's are discussed more thoroughly in Section 3.3.
Since two particular BPFs and their fxst hannonics were the main focus of Our
control, only the ODSs corresponding to four such particular sound fields were measured.
These four sound fields were at 61Hz, 121Hz, 70Hz and 140 Hz frequencies. For details
of magnitude distribution, phase distribution and the simulation procedure one should
refer to Chapter Two.
Two stations along the fuselage were selected for ODS measurements. These were
called Stations C and E, which are designated, respectively, as 291.4 x and 3 12.3 x along
the fuselage. To investïgate the effect of actuators on the stiffness of the stmcnire, the
ODS's at Station C were determined without any actuators rnounted. whereas at Station
E the ODS's were determined with actuators mounted.
3.2 Instrumentation and Data Acquisition
At each of the two Stations C and E, the fuselage above the floor level was
insûumented at thirty-rhree locations. These positions are shown in fig. 3.1 while exact
circumferential locations are given in Appendùr A. Fifteen B&K Type 4393
accelerorneters, each with a mass of 2.4 grams, were available for measuring radial
accelerations at every one of these locations. Compared to the size and the rnass of the
fuselage, the additional mass of the accelerometers was deemed to be too small to be of
any significance. Moreover, the accelerometers had a frequency upper limit of 10 KHz
that was more than sufficient for this application. AU accelerometers were mounted in the
radial direction. Due to the limited number of available accelerometers, charge amplifiers
and channels on die data acquisition system, the required data had to be collected in a
sequential manner using several set-ups. The signal fiom the accelerometer ar the highest
point on the fuselage (location C40 or E40) was used as the reference signal in
determinhg the FRFs and coherence of the signals from d l other accelerometers.
Fig.3.1 Schematic of accelerometer locations on Stations C and E for ODS measurements
Fifteen B&K type 2635 charge amplifiers were also employed to ampli@ the
charge signals. Signal components with fiequencies higher than 1 KHz were filtered out
by the built-in low pass analog filter. The output gain for each amplifier was carefully set
to achieve the hiphest possible signal to noise ratio.
A ZONIC 7000 Data Acquisition Systern with 16 input channels and 2 output
channels was employed to collect the s i sa ls from the charge amplifiers as well as fiom
the audio amplifier. This system was also used to output a random
amplifier to drive the speakers. The ZONIC 7000 was controlIed
24
signal to the audio
by a host EW9000
UNM workstation. Communication between these two machines was performed tbrough
an EtherNet comection. The software package ZETA developed by ZONIC Corporation
partïcularly for this system has many general digital processing features, such as spectrum
analysis, coherence andysis and frequency response analysis.
Fig. 3.2 Schematic of the experimental set-up for ODS measurements (ref. [Il])
The calibration of ail accelerometers was camïed out after complering the whole
instrumentation set up. In this way, the calibrauon included the possible effects from all
components such as the accelerometers, charge amplifiers, wires and connectors. A B&K
25
Type 4292 Calibration Exciter was used which provided a standard sinusoidal excitation
with 10 ms-2 R M S magnitude and 159.2 Hz fiequency. A schemallc of d l the
corresponding instrumentation set-up is shown in Fig. 3.2.
Theoreticdly, an acceleration level can be read directly in the rime domain.
However, the signal provided by the exciter was not a perfect sinusoidal wave with a
constant amplitude. In such a case. the standard practice is to use the sratistical value
from either the auto-specsrum analysis or the 1/3 ocrave analysis. The 1/3 octave analysis
with no weight is reported to be more accurate due to the absence of the picket-fence
effect [3]. Therefore this method was used in this investigation.
The data was acquired, reduced and saved on disk files with the ZONIC
7000/ZETA and the host HP 9000 UMX worksration. In each measurement, dependhg
on the dominant fiequency a different frequency span was used for the analysis. For
example, for the 61 Hz signal the frequency span used was 0-156.25 Hz. For a randorn
signal, the frequency span used was 0-625 Hz. In order to obtain a sufficiently high
frequency resolution and a low randorn enor a 4096 sample block size with 15 to 20
averages was selected. ~Moreover, a Hanning window was applied during frequency
domain analysis to minirnize the leakage effect [3].
3.3 ODS Measurements and Analysis
Considering the objectives of the investigation, the ODSs for the following ten
cases were investigated:
1) At Station C without any mounted actuators and under
(1) a random sound field
(2) the 6 1 Hz sound field
(3) the 121 Hz sound fieid
(4) the 70 Hz sound field
(5) the 140 Hz sound fieId
II) At Station E with rnounted actuators and under
(6) a random sound field
(7) the 61 Hz sound field
(8) the 12 1 Hz sound field
(9) the 70 Hz sound field
(10) the 140 Hz sound field.
For the randorn sound cases, a single signal source provided each of the four
speakers wirh the same random sipal. Therefore, the extenor surface area of the fuselage
that was covered by the four speakers was subjected to a sound field with an aimost
uniform ma-pitude and phase.
For each load case, the first task of the analysis was to determine the auto-
specmim. For a sinusoidal load, this shows the dominant frequency and its harmonies (see
for exarnple Fig. 3.3). For a random case, the auto-spectrum shows the response over the
whole frequency span of interest. (see for example Fig. 3.4).
Fig- 3.3 Acceleration spectrum (in d s 2 ) at station E05 under 61 Hz sound field
Fig. 3.4 Acceleration spectrum (in d s 2 ) at station EOS under random sound field
28
Next, the coherence for each case was deterniuied. In jeneral, the coherence r,(f)
is a function reflecthg the relationship between two signais over a frequency span. It is
defmed as:
where, G,(f) = cross power spectmm density function,
G,(Q = input auto power spectnrm densiq kc t ion ,
Gy@) = output auto power spectnim density function.
In an ideal situation, where a frequency response îunction is highly valid and
acceptable. the coherence should be close to unity. Otherwise, a poor coherence couid be
indicative of one or a combination of the following three possibilities: (1) the output is
not Iinear widi respect to the input; (2) the input is not the sole cause of the output; (3)
the output includes certain noise. In general. the coherence may be improved by raising
the signal to noise ratio by various means such as setting a proper amplifier gain, or
shutting down other possible sources of noise in the environment such as the a i r handler
in the laboratory. Ali these measures were taken in this work to improve the coherence
throughout the whole frequency span for the random case.
As long as the coherence is close to unity, the frequency response function
would be acceptable. Fortunately, for the measured sinusoidai cases, the coherence values
at the dominant fkequencies were aU higher than 0.97.
The frequency response H(D, is defined as:
where, G,(f) and G,(Q are defined
The FRF represents the rates
the reference s i p a l over the whoLe
29
in equation (3.1).
and phase differences between a measured signal and
frequency span. For a sinusoïdal case, only the FRF
at the dominant frequency is acceptable, since due to poor coherence over the rest of the
fiequency range the values of FRF at frequencies other than the dominant frequency are
useless. The FRFs conesponding to dl eight sinusoidai cases are given in Appendix B.
Ln each case, the corresponding ODS was obtained by using the respective FRF. These
ODS's are used to detennine the deflections at eight different instants during a single
period of the sound wave. In Appendix B, no ODS measurements are reported for the
random sound fields. This is because a randorn load does not represent an operating load
not applicable to
carried out oniy
maadtude and phase distribution, and therefore the concept of ODS is
such a load, In fact, the measurements for random sound fields were
to gain a better insight and a general appreciation of the dynamic
response of the fitseiage throughout a wide frequency span.
For example, for a certain sinusoidal case, let die magnitude and the phase of the
FRF at the fuselage circumferential station i (i=I,2, ... JV) be Ai and <pi respecùvely. The
deflection cm rhen be represented as
di(t) =A,$n(2++<pi ) i=1,2, --- ,AT
where, f is the frequency. Now, considering eight equidistant time intervals d m g a
single period of sound wave, one has the eight time instants: t,=O, t2=rd(4f), t3=rd(2f),
..., t=7rd(4f). Therefore, using above expression one c m obtain eight groups of deflection
30
vaiues [d,(t,), &(tJ, --- ,d&)l, fd&J, %(Q, .-. &(QI7 - - - , Idt(ta), d&), --- .dN(k)l for
d l i=l, 2, ..., N corresponding to the eight equidistant instants. Using this data. the ODSs
of the fuselage at the eight equidistant Ume intervals are obtained as shown in Figs. 3.5-
3.12. Since the s i p d from the accelerometer at C40 (or E40) was used as the reference
signal in determining the FRFs, sunilar to modes, ODSs are dimensionless and an
arbitrary scale can be used to present them.
It should be noted that the ODSs at Stations C md E are noticeabiy dflerent. This
variance c m be ateibuted to two factors: (1) due to their different axial locations dong
the fuselage the effective srifhiesses of the fuselage at the two stations are different; (2)
Station C was measured without any piezo actuators mounted on it.
J O -40 -30 -20 -10 O 10 20 30 40 50 Width (in.)
Rg. 3.5 ODS at Station C under 61Hz Sound Field
Wicfth (in.)
Fig. 3.6 ODS at Station C under 12 1Hz Sound Field
Width (in.)
Fig. 3.7 ODS at Station C under 70Hz Sound Field
Wdth (in.)
Fig. 3.8 ODS of Frame C under 140Hz Sound Field
Fig. 3.9 ODS of Frame E under 61x2 Sound Field
Width (in.)
Fig. 3.10 ODS of Frame E under 12 lHz Sound Field
wm (in.)
Fig. 3.1 1 ODS of Frame E under 70Hz Sound Field
7" - - - - -20 -10 O 10 20 30 do 50 Width (in.)
Fig. 3.12 ODS ar Station E under 14ûHz Sound Field
3.4 Piezo Actuator Properties
Lead zirconate tiranate (PZT)-based ceramics were used as piezoeiecuik actuaton
in this investigation. Under stress-free conditions when an electric field is applied ro a
piezo-cerarnic its ceramics dimensions change in al1 three directions.
The degree to which these dimensions change relative to an applied field depends
on the Strain Constant d,, of the piezo matenal, where,
or.
d3, = charge per electrode area - C/m ' - C -- --
srress applied along arls 1 ~ l m 2 N
The piezo actuators employed in this investigation, each 1 "xl"x0.25" in size, were
Type 1 d,,-mode piezo-ceramic BM400 that are manufacmred by Sensor Technology
Limited. The material propertïes of this ceramic are listed in Table 3.1.
II Charge constant, d,, i -1 15~10-l2 C/N II
[I Mass density, p 1 7.6 @cm'
Table 3.1 Materiai characteristics of BM400 piezo-ceramics
These segmented actuaton were distributed on the fuselage in the circumferenual
direction at three different stations dong the fuselage by bondhg them ont0 the interior
surface of the structure. Thus, due to the piezo-electrïc strain induced by the applied
elecuical field at each bonded acniator, a disaibuted bending moment is applied around
the fuselage at each station. This kind of one-sided actuation will induce flexurai as well
as in-plane vibrations. To control noise transmission into an aircrzft cabin, fiexural
vibrations are of greater si,pificance due to their ability to couple with acoustic waves
WI.
Nurnerous studies of interaction between piezo actuators and the structures to
which they were bonded have been reported. Studies on piezo actuators bonded ont0
bearns indicate that under ideal bonding conditions the load transfer between the actuator
and substructure occurs over a very srnall region at each of the two ends of the actuator
elernent [19]. Such ideal bonding condition also requires a very thin and stiff Layer of
piezo actuator. Therefore, if a series of piezo elements are placed at sufflciently close
36
intervals and are subjected to the same electric field they would behave as a single long
acniator with only the outer ends of the f i s t and last elements inducing strain on the
substructure. In order to achieve this effect, a small distance of 118" was maintained
between neighboring piezos [ I l ] .
3 5 Optimization of Actuation Pattern
Based on the measured ODSs, various actuation patterns were considered wfuch
would be important in achieving an effective control.
For purposes of control, a total of 197 piezo actuators were bonded ont0 the inside
surface of the fuselage at three different stations. At Station 4. located at 270.45 x in the
axial direction, sixty-eight piezos were distributed bewteen O= -IO8 degrees and 9 - 1 2 -
degrees (cf. Fig. 3.1). Moreover, sixty piezos were distributed at Station C bewteen
9-98 degrees and 9-14 degrees (cf. Fig. 3.1), and sixty-nine piezos were distributed at
Station E bewteen O=-108 degrees and 9=-12 degrees (cf. Fig. 3.1). In order to effectively
reduce the vibration. alrnost the whole arc of the fuselage on the porr side that was
covered by the four speakers was spanned by disnibuted piezo actuators. The winng of
piezos was configured to d o w for the power to individual piezos to be switched on and
off or have a reversed phase as desired. Thus, the piezos could be actuated in any desired
combination to induce the required bending moments on the fuselage.
The basic control concept employed was to sirnply cancel or reduce the vibration
patterns obbtained in the measured ODSs. To this end, appropriate combinations of piezos
cm be acmated either in or out of phase providing the bending moments required to
effectively reduce the flexure, Fig- 3.2 3.
Piero
Fig. 3.13 Actuation induced by piezo-elements (ref. [ I l ] )
Based on the analysis of obtained ODSs, the foilowing actuation patterns were
considered.
For ODS at Station E at 61 Hz
(a) E14/15 to ES7
(b) El4415 to ES7 --positive phase
E7 to El 4/15 --Negative phase
E27 to E36 --Negative phase
(c) El6 to E36
(d) El6 to E36 --positive phase
E7 to El6 --Nebative phase
For ODS at Station E at 121 fi
(e) E20/23 to E3 1/34
(0 E20/23 to E3 1/34 - positive phase
E31/34 to E36 -Negative phase
E8f 11 to E20/23 -Negative phase
(g) E15/16 to E36
(h) E 15/16 to E26 --positive phase
E7 to E26/28 -Negative phase
For ODS at Station E at 140 Hz
(i) E16/17 to E31/34
0') E 16/17 to E3 1/34 - positive phase
EWll to E16/17 -Negative phase
E31/34 to E36 -Negative phase
(k) E23/26 to E36
(m) E14/15 to E23/26 -positive phase
E23/26 to E36 --Negative phase
(n) E14/15 to E36
Due to considerable similarity of ODSs at 61 Hz and 70 Hz, the same actuauon
pattern was considered for both of these frequencies.
3.6 Verifkation of Achation Patterns
An experimental verification of the actuation patterns that were considered in
Section 3.4 was deemed to be necessary before implementing any control schemes on the
acniai structure. This verification was performed at Station E.
39
In contrat to ODS measurements, venfication had to be accomplished by
measuring and analyzing fuselage deflection pattems due to actuation by piezos rather
than excitation by the sound fields.
Using the acniation patterns suggested in Section 3.5, appropriate combinations
of piezos were to be activated to induce the required bending moments. However, due to
eiectrical grounding problems encountered during the experïmentation it was not possible
to verZy a i l of the previously suggested actuation pattems. The adhesive that was used
to bond the piezos to the substructure proved to have insufficient electrical insulation
property. As the result, the acniation patterns that included phase reveaing amongst
groups of actuators had to be abandoned, and the experimental verifkation was carried
out for a slightly revised set of ten actuation pattems in which phase reversais were
absent. These pattems and locations of corresponding piezos are given in Table 3.2.
1 Pattern 1
Table 3.2 Verified actuation patterns
40
For each of the patterns in Table 3.2, the piezos were actuated by one random
signal and eight individual sinusoidd signais with frequencies of 6lHz. 12 1Hz. I82Hz,
243 Hz, 70&, 140Hz, 210Hz and 280Hz. These signals were synthesized by the ZONIC
7000/ZETA data acquisition system and output to Trek Model 50/750 power amplifier to
drive the piezo actuators.
The instrumentation, data acquisition system. and the measurement technique
employed for the venfication were al1 sirnilar to those used for ODS measurements.
At Station E, the fuselage above the floor level was instrumented at thirty
locations as shown in Fig. 3.14. Twelve ENDEVCO 2222C and three B&K Type 4393
accelerometers were available for measuring radial accelerations at these positions. The
accelerometers were mounted in the radial directions. Due to the lirnited number of
available accelerometers, charge amplifiers and data acquisition system channels, the
measurements at the thirty stations were obtained using the available fIfteen
accelerometers in two separate setups .
The same number of B&K Type 2635 charge amplifiers were employed to ampli@
the charge sipals. Once again, signal components with frequencies higher than 1 KHz
were filtered out by the built-in low pass analog filter, and the output gain for each
amplifier was set to achieve the highest possible signal to noise ratio.
The same ZONIC 7000/ZETA data acquisition system rhat was used to output
signals to the Trek Model 50/750 amplifier in order to drive the actuators was dso
employed to collect the signals from the charge amplifiers. The Trek Model 50/750
amplifier is designed to amplify and drive high voltage but low current loads such as
41
piezo actuators. In this application, a gain of 150 was set which means that a 5-Volt
input would create a 750-Volt output.
port side
-30 1
-60 4 0 -20 O 20 40 60 x-dimenson (inch)
Fig. 3.14 Schemaric of accelerorneter locations for actuation pattern measurements
Both coherence and frequency response function were detemiined for each
acceleration measuremenc. In these measurements, the reference signal was the ZONIC
output which was connected to the Trek Mode1 50/750 amphfier.
For each pattern described in Table 3.2, the following measurements were
ob tained:
42
(1) The piezo actuaton were dnven by 6ûû-voit random signai with a frequency
span of zero to 3 15.25 Hz (ZONIC output of 4 volts). and the auto-spectra, coherence and
FRFs of all th- acceleration signais were rneasured. The measurements fiom the random
signal were used to assess the frequency response of the acmator over the whole
fkquency span of interest.
(2) Then the piezo actuatos were driven by 150-volt suiusoidal signals with
frequencies of 61Hz, 121Hz, 182Hz, 243 Hz, 70Hz, 140Hz, 210Hz and 280Hz.
respectively, and the correspondhg auto-spectra, coherence and FRFs of all tm
acceieration signais were measured. In general, for each frequency, the coherence value
at the drïving signal frequency was made as close to unity as possible. The same
measures that were employed to improve a poor coherence in ODS measurements were
also employed during verification. The magnitude and the phase of the FRF at a driving
frequency were noted. Using these values, the response of the fuselage to each actuation
pattern was determined for eijht equidistanc instants of tirne ciurinp a single penod. The
same approach that was used to determine and plot the ODSs was followed here to 0bta.h
the deflections resulting from piezo actuation. Typicd responses are shown in Figs. 3- 15-
3.21.
Clearly, for any @en ODS, the actuation pattern whose response resembles this
ODS the closest, would reduce the fuselage vibration most effectively. Based on this
observation, the foilowing patterns were selected to be used in controlling the vibrations
due to each of the four sound fields:
(1) Actuation pattern #5 or #6 to control the 6 1Hz and 70Hz ODSs.
(2) Actuation pattern M, 68 or +9 to controol ihe E L & ODS.
(3) Actuation pattern M or $8 to control the 140Hz ODS.
/ i
-50 -40 3 0 -20 -10 O 10 20 30 Width (in.)
Fig. 3.15 Response to piezo actuation pattern #5 at 6LHz
Width (in.)
Fig. 3.16 Response to piezo actuation pattern #6 at 6 1Hz
pon side
Fig. 3.17 Response to piezo actuation pattern #4 at 121Hz
Widm (in.)
Fig. 3-18 Response to piezo actuation pattern #8 at 121Hz
-50 O -30 -20 -10 O 70 20 30 40 50 Wdth (in.)
Fig. 3.19 Response to piezo actuation pattern iY9 at 12 1Hz
Width (in.)
Fig. 3.20 Response to piezo actuatïon pattern #4 at 140Hz
Chapter Four
Control Strategy
Before presenting the specific control strategy that was developed and used in this
investigation, main features of the important underlying principles that are incorporated
into the control strategy are briefly ouclined in the fdowing. Specifically, the underlying
principles of conventional adaptive fdten, LMS algorithm, and filtered-x LMS algorithm
for SIS0 and MIMO feedfonvard controis are presented in this chapter. Off-line and on-
line system identification techniques are dso discussed.
4.1 Adaptive Filters and LMS AIgorithm
Adaptive control systems are designed to adapt their behavior to the chanaing
propertïes of controlled processes and their signals.
Fi;. 4.1 Block diagram of a simple adaptive controller
Fig. 4.1. illustrates a simple adaptive connol system consisting of a single adaptive
linear combiner, that is used to make the output y(n) from a reference sequence x(n) as
close as possible to the desired sequence d(n) by reducing the error sequence e(n). This
simple adaptive Iinear combiner is acnially a finite impulse response (FIR) digital Hter.
The output y(n) is a linear combination of the input samples, Le.,
so that the error is
The filter design problem is now to adjust each ai to best reduce the error
sequence, e(n), according to some criterion. A very common and useful criterion is that
each aiis adjusted so that the mean of squared error sequences, ~ [ e ~ ( n ) ] , is minimized
[27]. Here E is the conventional marhematical expectation, ELfln)]=(fll) cff2) +... +f(n)))/nn,
of a random discrete distribution, and it denotes an average over ensembles of the random
performance surface error sequences e(n). Using equation (4.2) this mean-squared error
can be written as
Also referred to as a "cost function", the quadrauc function given in Equation 4.3
is most attractive, because it parantees a unique minimum. A number of iterative or
adaptive methods are available to modi@ the filter coefficients gradually in such a way
49
that the mean-squared error is reduced. Out of these, the least-mean-square .(LMS)
algorîthm is generaily the best choice for many different applications of adaptive signal
processing [I6], mainly because of its sirnpiicity and ease of computation. and because
it does not require off-line gradient estimations or repetitions of data.
To develop the LMS aigori th , e2(n) itseif is raken as an estimate of E[e2(n)] at
each iteration in the adaptive process. Then a steepest-descent type of adaptive algorithm
can be specified as:
where p=2a is a gain constant that replates the speed and stability of adaption. Since the
weight changes at each iteration are based on imperfect gradient estimates, the adaptive
process could be expected to be noisy; that is, it would not follow the m e line of steepest
descent on the performance surface.
From its form in equation (4.4), the elegance, simplicity and eficiency of LMS
can be appreciated and it c m be seen that this LMS algorithm cm be implernented in a
practical system without squaring, averagiiip or differentiation. As noted above, each
cornponent of the gradient vector is obtained £tom a single data sample without perturbing
the weight vector. Withour averaging, the gradient componenü do contain a large
component of noise, but the noise is attenuated with time by the adaptive process, which
acts as a low-pas filter in this respect.
The convergence proper::~ of the LMS aigonihm have been widely discussed in
the licerature [25,27]. A simplification which provides a useful " d e of thumb" for the
convergence of the LMS algorithm is that the algorithm will usually converge towards
the minimum solution of E[e2(n)] if the convergence coefficient p satisfies
where E@(n)] is the mean square value of the reference sequence, and 1 is the number
of adaptive filter coefficients [25].
4.2 Recursive LMS Aigorithm
Rather than employing an F R filter, in most approaches an infinite impulse
response (IR) filter is used as the controiler. Also referred to as recursive controller, the
basic ~ o ~ g u r a t i o n of an W filter is shown in Fig.4.2, where A(z) and B(z) are individuai
FIR fdters. These are combined ro generate the W controller response given by
Fig. 4.2 Biock diagram of a recursive controller
51
Compared with an FIR filter, an W filter, with both poles and zeros, offers
attractive advantages such as resonance, sharp cutoff, etc., and therefore, ic is capable of
achieving a response similar to an an ffter by a much shorter filter leno@. In other
words, using an W filter can Save a greeat deal of computation. However, W fdters have
two major disadvantages:
1. They become unstable if the poles move outside the unit circle during the
adaptive process.
2. Their performance surfaces are generaliy non-quadratic and may even have local
minima.
The instability problem can be prevented by adjusting the convergence coefficients
and choosing proper initial values for fdter coefficients. Regarding the second
disadvamage, there is no well-recognized theorem to avoid local minima. One can obtain
an acceptable result by trial and error on the filter length, convergence coefficient, etc..
The acceptance is then deternined by observing the error reduction during the
convergence process.
TO develop LMS algorithm for the recursive adaptive filter as illustrated in Figure
4.2, assume the output of the recursive filter to be
y (n) =C a?(n -i) +x bjy(n -j) , i=O j= 1
where a,{n) and b,(n) are the ith direct and jth recunive coefficients in the controller at
the nth sample time.
Sirnilar to the non-recursive case, the error sequence c m be wrirten as:
=d (n) -x a 'x(n -9 -x by(n -11 - i4 j=l
Considering the LMS algorithm, again the gradient approximation is used by
taking e2(n) as an estimate of E[&n)] at each iteration in the adaptive process, and
speciQing a steepest-descent type of adaptive algorithm as:
Cn-1) -a ae '(n) Qi
hi
and
b;-l) -a a '(n) ab,
where p=Za is a convergence coefficient that regulates the speed and stability of
adaption.
4 3 SIS0 Filtered-ri LMS Algorithm
The welI-known LMS algorithm is widely used for elecaicai noise canceiiation.
If t h i s algorithm is used without modification in an active control application as shown
in Fig. 4.3, however, the result is likely to be unstable.
frorn the adaptive filter, suffers a phase shifc in passing
53
This is because the signai u(n)
through the secondary path, that
is represented by fdters C and D in Fig. 1.3. The instantaneous measurement of the
gradient of the rnean-square-enor with respect to the coefficient vector, X(E) e(n) , is thus
no longer an unbiased estimate of the true gradient. The solution to this problem is to
introduce a similar phase shift into the reference signal path, before the gradient estimate
is formed This is achieved by using an electrical W fdter that consists of two FIR filters
C and d, Fig. 4.4. This models the response of the secondary path and its role in
generating a fdtered reference signal. The reference signal is then mulûplied by the error
to form the gradient estirnate. The resulûng updated equation constitutes the so-called
"frltered-x LMS" algorithm.
In this investigation, the path fiom the controller output to the charge amplifer
output that includes the piezo amplifier, anti-image fdter, piezo acniator, etc., aU
constitute the secondary patfi.
y4
- Fig. 4.3 Block diagram of a controller with secondary path
To develop the filtered-x LMS algorithm for a system having secondary path, one
may follow the general outiine presented in [17] by taking e ( n ) as an estimate of E[&z)]
sirnilar to the procedure outlined in Sections 4.1 and 4.2. Then, due to the presence of the
secondary path, one has
and
u (n) =x a ~ ( n -9 +x b,u (n -1) -
So, for a steepest-descent type of adaptive algorithm one has:
and
=bF) +k (n) M n )
where, again p=2a is a convergence coefficient that regdates the speed and stability of
adaption.
and
In (4.13) and (4.14),the signals r(n} and s(n) are filtered reference signals such that
====,; = = = = = 5 = = = = A I 1 ON-LINE ID-CATION ,
Fig. 4.4 Block diagram of a filtered-x LMS controller (ref. [17])
56
Since only a modeied secondary path c m be achieved using a regular LMS
a i g o n u , the C and D in equations (4.15) and (4.16) have to be replaced by the
identified secondary path that consists of and d . A block diagram of a filtered-x
LMS conaoiler is represented in Fig. 4.4.
4.4 MLMO LMS Algorithm
An MIMO system is similar to an SIS0 system shown in Fig. 4.2. The only
difference is that for an MIMO system y(n) and x(n) represent vectors [y,(n), y,(n), ...,
y,&)]' and [x,(n), q(n), .... x&) f respectively . To develop an LMS algorithm for an
MIMO system, the output is given as
for i=I.2 ...., L(Lc=M), where a , ~ and bld are, respectively, the direct and recursive
coefficients at the nth sample time; M is the number of input; L is the number of output;
and Na and Nb are the total number of coefficients a, and b,, , respectively.
Similar to the SIS0 case, the sum of error squares is taken as the cost function
For a steepesr-descent type of adaptive algorithm, the resulting update algorithm
for the control filter is
and
for I= 1.2, ..., L; q=1,2 ,..., L: i d , 1, ..., Na; and j=1,2 ?..., Nb, and where, as before, p=2a is
a convergence coefficient that replates the speed and stability of adapuon.
From (4.17) one gets:
+ h W -) ~ ( n - i ) for h=l -- h, [ O for h d
y,@-j) for h =l
for h d
Substituting (4.21) into (4.19) and (4.22) into (4.20), the final expression for this
adapùve algorithm is obtained as:
4.5 MIMO Filtered-x L W Algorithm
An MTMO system with a second path(p1ant) is sirnilar to an SIS0 system shown
in Fig. 4.3. The difference is that, as outlined earlier, x(nJ and y(n) as weil as u(n)=[u,(n),
u,(nJ, ..-. UJ~)]* represent vector quantities. Then the controller output is given as
for m=1,2 ,.-., M, where a, and b,, are the direct and recursive coefficients at the nth
sample time.
Letting the plant output to be
for 1=1,2 ,..., L (L<=M), where c,,- and c,, are, respectively, the direct and recursive
coefficients at the nth sarnple time, as before the sum of error squares is taken as the cost
func tion
For a steepest-descent type of adaptive algorithm, the resuiting update algorithm
for the control filter is
and
for m=1,2 ,.... M: k=I,2 ...., K; p=I.Z. .... M; i=OJ ,..., Na; j=1,2, .... Nb, where
and
for l=1.2 ...., L; p=I .2 ...., M; rn=1.2 ,.... M; k=1,2 ,..., K; i=O,I ..... Na; j=IT2 ,... .Nb.
L
4.6 Off-line and On-line Identification
The stability of the filtered-x LMS algorithm is greatly affected by the accuracy
of the fiiter matrices C and D which model the secondary path. There are two ways to
idenu@ the secondary path: off-line and on-line.
When the filter that is used to mode1 the secondary path is created prior to the
control, one has of f -he identification. In this case, a band-limited pseudo-random training
signal is fed into the secondary path. An LMS or RLMS algorithm independent of the
control path could be employed. The length of the FIR or W filter should be selected
based on the complexity of the actual case. Too few coefficients can result in absence of
convergence during the adaptive process. Usually there is no certain rule to predict the
sufficient number of required filter coefficients. A trial and error method has to be used.
In the off-line technique, once the identification LMS or RLMS process converges
by the error approaching zero, the identification of the secondary path is completed, and
the filter that models the secondary path can be used to pre-filter the reference signai in
the control path.
Irrespective of how accurately an acoustical, elecoical or mechanical system is
modeled by using off-line techniques, in tirne, that system will in some way deviate from
the model. Every system could be tirne-varying due ro a number of reasons, such as the
ambient temperature change, seEsor or actuator degradation, etc. These inevitable system
uncertainties cause inaccuracies in off-Iine rnodels. Therefore. when the secondary path
changes sibgdïcantly over tirne, controllers must be capable of adapting on-line in order
to be continually effective in reducing noise or vibration in practical applications.
61
With on-line identification of the secondary pâth. the identification is
accomplished in parallel with control operation. Every certain number of samples, the
control model is updated by copying the identified model coefficients into the control
model as the pre-filter coeffkients. Due to the interaction between control and the
identification processes, obviously, the control model is not able to find its optimal
parameters and to achieve convergence until the identification provides the appropriate
secondary path models. Accordhg to [17], a sufficiently large interval of updathg, such
as 5,000 samples, is necessary to heip the connol model to converge.
The on-line identification is carried on by feeding a band-limited pseudo-random
signal into the secondary path. This random signal has to meet two conditions: (1) it
should not be correlated to the reference signal so that the identification LMS or RLMS
will not be affected by the control signal; (2) compared to the control output signal, this
random signâl has ro be relatively weaker so that it will not affect the final control result
significandy; usually 10 percent of the connol output magnitude is suirable [27].
The on-line identification technique can closely track the changes in the system
to affect continual cancellation of noise or vibration and therefore is the only choice for
significantly-time-vary ing sys tems. For a relatively statïc system, connol with off-Iine
identification might be a good choice, since due to the complexity of interaction between
control and on-iine identification the convergence is comparatively difficult to achieve.
Chapter Five
Control Programming and Preliminary ImpIementation
The control svaregy was implernented on a PC based DSP system. The DSP
system consists of a SPECTRUM QPClC40B processor board with a Texas Instruments
(TI) TMS320C40 processor. Input and output are provided by a SPECTRUM PCl16i08
board.
A mked C/Assembly code was developed using TMS320C3x/C4x C compiler
V4.6, and it was debugged using SPECTRIiiM DB40 debugging environment. Initidy,
the code was tested by controlling the vibration of a "test beam" using both off-line and
on-line identification techniques. A successful convergence was achieved duRng this
testing.
5.1 The DSB Systern
The QPCK40B board c m support up to four TIM-40 modules each of which is
equipped with a TI WS320C40 processor and necessary memory blocks [?LI. This PC-
baszd board is used to accomplish high speed DSP and J70 control by operathg either
a single or multiple CPU. For this application, only a single CPU was installed on the
board.
The TMS320CW processor is the latesr g e n e d o n of TMS320 floating point
processor family, and is one of the fastest floating point DSP processors commercially
available at this time. It has been used extensively in broad applications such as pneral
63
purpose DSP, graphic or image processing, uidustry control, telecommunication, etc. For
its detailed features, one can refer to the user manual [2 1 J-
A PU16108 multi-channei I/O board was used to coiiect the input data and output
the control signais. This board was connected directly to QPCfC40B via a DSPLINK2
interface. Sampled data was uansmîtted to and received from the QPUC40B over this
interface. User configurable hardware links were set in such a manner that the on-board
input and output filters provided a cut-frequency of 7.2 Hz.
5.2 Mked C/Assembly Real-time Programming -
A general TMS320C3x/C4x software development flow is illusnated in Fig. 5.1.
The shaded portion of the figure highlights the typicai sofovare development path; the
rernaining portions are optional.
Generally referred to as low-level ianguage statements, the assembly languagc
statemenü, resemble the processorfs native set of instructions. It is weli known that a
program developed directly in assembly language can have a high efficiency and a smali
executable file because it can take full advantape of al1 rhe pMcular CPU features. The
disadvantage is that a program written in a low-level language is djfficult to read and
write. Besides, low-Ievel languages are speciric to a processor chip. For example, a
program wntten in a low-level language for a Motorala 68000 would have to be
compietely rewritten in a TMS320C40. Therefore it offers no ponability at dl.
C is a progarnrning langage that faLls somewhere between a low-level and a
high-ievel laquage. A source code in C can be translated into a processor-specified
Fig. 5.1 TMS320C3x/C4x software development fiow (ref. [24])
assembly source code by a processor-specified C compiler. Also, a weli-written C
program can be very readable. An Amencan National Standard Institute (ANSI) standard
for the C language now exists. Al1 these feahxes make C a very popular language for a
large nurnber of
written in other
programs wrïtten
the code during
ôdvantages could
65
applications. Usually, C progams are more efficient than prograns
high-level Ianguages. However, they are not as proficient as those
in a purely low-level Ianguage since certain overheads are added into
translation from C to assembly, and not al1 the processor-specified
be employed. Considering the easy development and maintenance, a
C programming is usually the best choice for most industrial control applications as long
as the code execution efficiency or code size is not of primary concem.
For rnany control applications, reai-time progamming is necessaq. Real-tirne
operation refers to an operation in which al1 the digital signal processing for one set of
samples is finished before the next set becomes available for collection. Such digital
processing inchdes collecting the ciam processing the control algorithrn and generating
the output. The tirne interval between any two sets of samples is called sampling penod,
the inverse of which is known as sarnpiinp rate. This sampling rate needs to be
sufficiently low so that the corresponding sampling penod would be longer than the rime
required to h i s h al1 the processing for one set of samples. Therefore, a code's capacity
for high sampling rate reflects a high eficiency in that code. With a higher sarnpling
frequency, better control performance c m be achieved since the discrete signal used in
the digital signal processing would be closer to the actual analog signal. Moreover, this
makes it possible to control systems with wider ranges of frequency.
A feedforward control strategy is proposed in this investigation. The corresponding
algorithm is relatively more complicated than a conventional feedback algorithrn and
requires a larger amount of computation. Therefore, computational efficiency was of
66
critical concern, particularly for MIMO cases. Considering the advantages and
disadvanrages of both C and assembly Ianpases, a compromise solution adopted for this
investigation was to use mixed C and assembly prograrnming. This translated to using C
code for developing the main proDam while the time-cnticai operations such as interrupt
service routines were developed using assembly code. With this approach, a certain
degree of optimization was achieved.
Such an opùmization was realized by employing the following pro,oramming
techniques which can ordy be implemented in the assernbly code:
(1) Circular addressing mode is used to greatly reduce the fdter implementation
instructions that comprise the majonty of the feedforward control algorithm operations.
This addressing mode is particularly designed in TMS 32OC3 dC4x for applications
requiring circular buffer, such as filters and conelations. Much of the overhead required
for the fdter operation in C programming ,.such as array or ma& shifüng, or pointer
out-bound checking were omitted using circular addressing mode.
(2) Parallel instructions are used in filter and coefficient updare operations. This
makes it possible to impiement one more instruction in one single CPU cycle.
(3) B s e d on the pipeline architecture of TMS320C40, certain delay branch
instructions are employed to decrease the branch conflicts.
(4) With the help of DB40 debugjing tools and the SIMC3dC4x sirnulator, the
instructions are carefully organized to reduce the regiscer and memory conflicts.
(5) The assembly code ms la ted fiom C code is modified to eliminate
unnecessary register swing operations.
67
In addition to code optimization, the rnemory Iocauons for text. data, and stack
were assigned in such a way rhat the more frequenrly accessed blocks were placed in the
internai memory to achieve a faster speed. The CPU cache was enabled to store more
frequendy used instructions and thus reduce instrucùon fetching tirne.
5.3 Program Debugging and Efficiency Analysis
In a debugging process one seeks to: (1) check the code and algorithm correctness
by tracking the variables. memory or registers dunng execution; (2) check the efficiency
of a parùcular routine of code by countïng the cycles.
The DB40 debugger provided with the C4x Network API software was employed
to debug the control program. Afier making sure the program was executing correcdy, a
code efficiency check was conducted. The time-cntical operation which refers to the
interrupt service routine was divided into several segments. For each of these segments,
the CPU cycles were counted and cornpared to the conesponding number of instructions.
Since. in the absence of any pipeline conflicn. one CPU cycle is needed for every
instruction, when a pipeline conflict occurred. the instructions were reorganized or
modified to minirnize the total CPU cycles.
5.4 CfAssembIy Source Files
The development of an SIS0 code was accomplished by creating two source files,
namely, DSP.C and FRASM. The main fie, DSP-C, executes both identification and
control using regular LMS feedfonvard strategy. FIR.ASM contains the time-critical
68
functions which are the FIR filter operation and coefficients update. DSPC needs to be
linked to FIR-ASM to create an executable frle for the DSP board. The real-time sampling
rate of DSP-C is aiiowed to be as high as 20 KHz.
The development of an MIMO code was accornpiïshed by creating three source
fdes, namely, MXLMS33.C, MXLMS412.C and MASM-ASM. The main file that
executes both identification and control using regular LMS feedforward strategy is
MXLMS33.C. ho ther main fde, MXLMS412.C, executes both identification and control
using a simpiifïed LMS feedforward strategy in which FIR fdten are used for the
controîier and cross tems in the recursive filters are neglected [18]. The thecritical
operations such as filter operation and coefficient update are camïed out by MASM-ASM.
Either MXLMS33.C or MXLMS412.C needs to be linked to MASM-ASM to create an
executabie file for the DSP board,
At a sampling rate of 1800 Hz, MXLMS33.C c m accommodate up to three
outputs and three inputs, or two outputs and four inputs. On the other hand,
MXLMS4IZ.C can accommodate up to four outputs and twelve inputs at a sampling rate
of 1800 Hz. Each of them can have up to fifeen direct and fourteen recursive coefficients
for either identification or control fdter.
The program flow diagram for identification and control are shown in Figs. 5.2
and 5.3, respectively .
The source code and correspondins memory configurations for SIS0 and MlMO
controls are presented in Appendices F and G, respectively.
-- 1 Variable definition and iniüdization
1 Funcuon prototype definition I 1 MIMO board initialization
- I I ' DSP board initialization
f Wait for intermpt from MIMO board
Collect samples fiorn ADC ports i
Calculate error vector m Create a set of uncorrelated bandpass random signals
Process LMS identification operation
1 Send random signais to DAC ports
Fig 5.2 Program Flow for the System Identification
Yes Need more identification steps ?
/ Copy identified modei into control pan
,-1 Wait for intemxptkom MIMO boar 9
t /
I Calculate error vector and reference I I 1
1 Process fiitered-x LMS conuol operation
. . . . - . 1 Send control signals to DAC ports 1
Yes 1 Need more control steps
Fig 5.3 Program flow chart for control operation
5 5 Preliminary Implementation of SISO Control
As mentioned earlier, the optimized code was irnplernented to run an SISO
vibration control of a test beam using both off-line and on-line identification techniques.
The goal of this implernentation was to check the accuracy and efficiency of the code.
An aluminum beam was simply suspended by rubber bands at both ends. A piezo
acniator was bonded to the beam near midspan. and a B&K Type 4393 accelerorneter was
71
fixed adjacent to the actuator. The dimensions of the beam and the locations of the
actuator and accelerometer are shown in Fig. 5.4. The disturbance was provided by an
electrodynarnic shaker and it was detected by a B&K Type 8200 force transducer. The
TMS320C4-û based controller was used to minirnize the output of the accelerometer. The
details of instrumentation, configuration and controller secrings are the same as reported
in [17].
At a sarnpling rate of 5000 Hz, sixteen direct and fifteen recursive coefficients
were used for the control part. For the identification the corresponding numbers were
eighteen direct and seventeen recursive coefficients. Acceptable convergence for both off-
line and on-line techniques was observed and the control scheme was able to effectively
control the vibration of the beam in reai time. This indicated the success of the code and
its optimization.
Fig. 5.4 The test be'm, actuator and acceierornerer for SIS0 vibration control
5.6 Preliminary rinplementation of MIMO Control
The code compiled from MXLSM33.C and MASM.ASM files was implemented
to run an MIMO algorithm with two outputs and four inputs. This irnplementation was
cmïed on rhe same test beam that was used for SIS0 control. Off-line identification
technique was used with the intention of checking the accuracy and the efficiency of the
code.
Again. the alurninum beam was simply suspended by rubber bands at both ends.
Fie. 5.5. Two piezo actuarors were bonded to the beam at near midspan, and two
accelerometers were fixed adjacent to each actuator. An electrodynamic shaker provided
a 200Hz sinusoïdal disturbance that was detected by a B&K Type 8200 force uansducer.
The TMS320C4û based conuoller was used to minimize the mean square of the
accelerometer outputs.
At a samplùig rate of 2000 Hz, sixteen direct and fifteen recursive coefficients
were employed for the control, while thirteen direct and twelve recursive coefficients were
used for the identification. Satisfactory convergence was observed and the controI scheme
was able to effectively conuol the vibration of the beam by reducinj the induced
accelerations up to 10-20dB. This indicated a satisfactory real-time control with two
outputs and four inputs at a sampling rate of 2000 Hz.
Fig. 5.5 The test beam, actuators and accelerometers for MIMO vibration control
Chapter Six
Implementation of Red-Tirne Vibration and Noise Control
on tbe Fuselage
6.1 Controi Configuration
The main objective of this research was to investigate the feasibility of cabin noise
and vibration controi using segmented piezoelecaic actuators. Therefore. once the control
and identification codes were optimized and tested, the real-time vibration and noise
connol of the fuselage was attempted. The semp used in -ïhis system identification and
control is shown in Fig. 6.1. The setup may be divided into five sub-systems c o n s i s ~ g
of (1) sound field simulation system, (2) accelerometers and microphones. (3) piezo-
actuators, (4) DSP controller, (5) and data acquisition and monitoring system.
The sound field simulation system includes a PC with AT-AO-10 output board,
ASHLY MFA-8000 audio amplifiers and four speakers. This system was used to simulate
four different sound fields which represent the real fiight conditions. The investigation to
control the fuselage vibration and noise was carried out for these four sound fields.
Two different sensing schemes were used in rhis part of the study. In the f - s t
approach, four B&K Type 4393 or ENDEVCO 2222C accelerometers were installed on
the fuselage at appropriate circumferential locations at each of the longitudinal stations
A. C and E to directly sense and control the fuselage accelerations. In the second
approach microphones were used ro sense the sound pressures inside the cabin. Nine
B&K Type 41 34 microphones were installed at window and aisle seats and at the standing
74
aisles in the first, second and third rows from the port. Using the sound pressure
rneasurernents from these microphones a fairly global sound field sensing and monitoring
was achieved. Moreover. twelve B&K 2635 charge amplifiers. one B&K Type 2811 8-
channel multiplexer, two B&K Type 2610 measurïng arnplifiers and three B&K Type 2609
amplifiers were used respectively to amplify the acceleration and sound pressure signds.
A total of 197 piezo actuators were installed at Stations A. B and C at the locations
presented in Section 3.5. These piezos could be activated in any necessary combination to
provide a desired bending moment on the fuselage in the circumferential direction. The
magnitudes and phases of these moments were controlled by the voltage signds from the
DSP controller. Two Trek Mode1 501750 arnplifiers were used to amplify the control signals
to high voltages that were used to drive piezos.
75
The DSP controller consisted of a PC, a plug-in QPUC4UB board and a PC/16108
board. This system coliected the acceleration or sound pressure signals via ADC ports,
processed the feedfonvard control operation, and output the control sipals out of the
DAC ports. To minirnize the high frequency noise, a Krohn-Hite Mode1 3384 filter was
used to srnooth the output signals fiom the DAC ports.
The data acquisition and monitoring systern consisted of the ZONIC 7000lZETA
data acquisition system and its host HP workstation. The measured accelerations and
sound pressures were monitored, recorded and saved ont0 a disk.
6.2 System Identification of Piezo-actuated Fuseiage
In this investigation the system refers co the secondary path (plant), which
represents the path of the signal from the DSP board as a voltage output to the fuselage
as an acceleration input. It consists of an anti-image filter, a power amplifier, piezo
actuacor arrays and the fuselage as a dpamic sysrern. The objective of the system
identification was to predetermine the properties of response to each of the output voltage
signals of DSP controller. These properties were then used in the DSP controller to
detexmine how to properly adjust the output signals in order to achieve the best vibration
or noise cancellation. Obviously, the accuracy of the sysrern identification greatly affects
the stability of the conmol performance.
Since the system was rnodelled by an W fiiter represented by matrices e and Li
(cf Fig. 4.4), the systern identification refers to the adaptation of these two matrices. This
adaptacion was carried out by the regular MIMO LMS algorithm presented in Section 4.4.
70
Many factors, ranghg from filter construction to training signais, could affect the
accuracy of idenacation. For any given plant, there exists some proper W filter that
could mode1 the plant with sufficient accuracy without requiring over-complicated
caicuiations. Such a proper fdter for the plant was deveioped in thIs snidy &r
investigating a number of different identification systems. Various types of fflters with
different filter lengths were considered. In each case a different type of random training
signal was fed to the secondary path.
A detailed study of system identification that is described next was carried out for
the piezo actuation pattern. This compnsed nine identification schemes that are gïven in
Table 6.1. In each scheme the identification process involved the following steps:
(1) The plant transfer functions between the supplied random signal and the
resuiting accelerations of the actuated fuselage were measured;
(2) A set of either uniforrnly distributed or bandpass random sipals were fed into
the plant, and the identification LMS code was executed to obtain the adapted mode1
presented by e and d ;
(3) The nansfer functions of this mode1 presented by e and d were computed
and the results were compared to the measured quantities from step (1);
(4) In each case, a sampling rate of 2000 Hz with a DSP board gain of 1.0 were
used and the identification process was executed for 3 minutes. The DSP outputs and
inputs were as follows:
Output #1: Voltage to actuate piezo groups A14/15-A28, C14/15-C28 and
E14/15-E28;
1 Scheme 1 kilter ( tdter Coe Convergence #
1
Table 6.1 Identification cases
Voltage
2V
2V
3V
2V
2v - 3V
3v
Output #2: Voltage to accuare piezo goups A.28-A36, C28-C36 and E28-E36;
Input #1: Sum of accelerations at A1 6, Cl 6 and El 6;
Input #2: Sum of accelerauons at A23. C23 and E23;
hpu t #3: Sum of accelerauons at A34, C34 and E 3 4
Input #4: Sum of accelerations at A40, C a and EN.
TYF
IIR
Frequency
0-3 12Hz
50-150Ht
60-75Hz
0-3 12Ht
0-3 1 2 E
0-3 12Hz
55-75Hz &
Fig. 6.2 shows a typical cornparison berween the identified mode1 and the
measured transfer fiinction in scherne #8. This scheme was determined to be the best
identification s y stem.
Direct
15
Coefficient
Recursive
14
Direct
0.00 1
Recursive
0.00 1
Fig 6.2 Measured (solid) and identified (dashed) transfer functions between input #?F and
output #4.
Based on the results of these nine cases, the following observations were made:
(1) Compared to an F R filter, because of its poles, an W filter c m achieve more
accurate identification while using fewer coefficients. Therefore, considering the
cornplexities of the plant in this investigation, IIR filter is srrongly recornmended for
identification.
(2) The nmowband trainhg signais fed into the plant c m increase the ratio of
signal to noise considembly in the frequency bands of interest. Therefore, a more accurate
identifcation can be achieved on such frequency bands.
(3) In Table 6.1, Case #9 where an W filter with thirty-one direct and thircy
recursive coefficients was used, shows the best result. However, the result of Case #8,
which aiso included an W filter but with half as many coefficients was ody slightiy
different than that in Case #9. This indicates that there appears to exist an efficient fdter
length for every system. Exceeding this lenath seems to result in a larger amount of
computation without much si,@ficant improvernent in the accuracy of identification.
6 3 Vibration and Noise Reduction
Real-time vibration and noise control can be implemented with either off-line or
on-he identification as described in Section 4.6. In this implementation, the off-line
technique was used and the identification was perfomed before mming a control case.
The reasons for choosing the off-line over the on-line technique are: (1) the off-line
technique requires less complïcated computations and, therefore, it has the capacity of
accommodating more input and output channels and achieving improved global vibration
and noise reduction; (3) the electrical and mechanical properties of the plant were found
to be considerably invanant during the control test that lasted about 30 minutes, therefore
it was not necessary to update the plant during the control process.
An MIMO feedforward control strategy was used in order to achieve a global
80
vibration and noise reduction. An instrumentation configuration simi1a.r to the one
employed by Grewal, A., et. al was used [Il]. Fig. 6.1 shows a schernatïc of such a
cod$pration withour a reference microphone, because such a microphone was not used
in this investigation.
As mentioned earlier, two different control approaches were investigated. In the
firsr approach the fuselage accelerations were directly sensed and conrsolled, whereas in
the second approach the intemal sound pressure was the variable which was used for
sensing. Twenty-nine different cases were investigated in the f ~ s t approach (Appendix D,
cases 1-29), and twelve cases in the second approach (Appendix D, cases A-L).
Moreover, in the first approach, besides the accelerations the sound pressure levels were
also monitored, whereas in ùie second approach only sound pressure levels were
monitored. The open-loop and closed-loop spectra for these monitored signals were
measured. As an example, the specaal results from case #26 are presented in Fig. 6.3.
For each case, magnitudes at the dominant fiequency were recorded for bodi open and
closed loops. These magnitudes and their corresponding attenuations are presented in
tables in Appendix D. In each of these tables, NA, NB, NC and ND represent the number
of coefficients of filters A, B, C, and d, respectively. Also in designating an actuation
pattern, a piezo group, for example, A, C, E 16-28 means that at each of the Stations A,
C and E the piezo actuators between Locations 16 and 28 were driven by the same output
voltage in parallel. Pmally, a typical designation of "Random Signal for Identification: 3V
random 60-62Hz" represents a 3V random voltage with a bandwidth from 60Hz to 62H.z.
Fig 6.3 Open-loop (solid) and closed-loop (dashed) acceleration spectra of SPL at aisle
seats in second row (in dB with respect to maximum open-hop value)
Main objectives of this series of investigations were to study:
(1) the convergence of the control algorithm
(2) the retationship between strucnirai vibration attenuation and internal noise
attenuation
(3) the effecriveness of actuator settings and sensor positions.
Based on the analysis of die results, the followin; conclusions are amved at:
(1) Significant reductions in fkselage accelerations were observed when the control
was based on direct sensing of these accelerations. Although the global intemal noise
reduction in this approach was not as high when compared to the results obtained from
sensing the internal sound pressure (Cases A to L in Appendix D), yet considerable noise
reduction was observed for various sound field pressures at 6 1 Hz ( Case $26), 70 Hz
(Case #6), 121 Hz (Case #9) and 140 Hz (Case #21).
(3) As long as the identified rnodel emulates the plant properly, the feedfoward
control results in convergence with sipifkant attenuation of errors. These errors that were
used as the input to the control system could be either the internai sound pressure or
fuselage acceleration. The ievel of control that was achieved depended on the accuracy
of the identification.
(3) Sensing the fuselage acceleration is an indirect approach to reduce the intemal
noise by controliing the fuselage vibration. The aim of this approach is to reach a global
noise reduction by using a simple sensor setup. However, due to the complexity of
coupling between the fuselage structural vibration modes and the intemal acoustic modes,
a reduction in the vibration energy of the fuselage does not necessarily guataotee a
corresponding reduction in the interna1 sound level. This phenornenon cm be observed
in a few cases where achieving reductions as high as 20 dB in accelerations does not
result in an appreciabie reduction in noise. In fact, in some cases the reduction of
accelerations had an adverse effect on the associated sound level.
(4) In order to achieve a good reduction in sound level, a proper combination of
acniator sening and accelerometer positionhg is critical in controlling the structural
vibration modes that couple with the intemal acoustic modes most severely.
(5) Since the signal to control is a narrowband one dominated by the blade passage
frequency and one or two of its harmonies, the controller does not need to be too
complicated. An FIR rather than an W shaU be sufEcient. Moreover, the frlter lena@ can
also be relatively short, resulting in considerable savings in the operations.
Chapter Seven
Conclusion and Recomsnendation
7- 1 Conclusion
An experimental investigation of the active control of turbo-prop cabin noise usin-,
piezoelectric actuators and feedforward control strategy is presented in this thesis. It
presents a detaded description of the experiments conducted and rnethods of analysis
used the development steps taken, the results obtained, and the relevant conclusions
d v e d at based on this investigaiion. The major contributions are as follows:
(1) A Iaboratory simulation of propeller pressure footprints was developed by
using the 4-speaker sound source system available at SMPLAARNRC. An effective
procedure was developed and implemented in which the important characteristics of the
field data representing the propeller pressure footprints, such as magnitude and phasc
distribution, were simuiated.
(2) The operating deflection shapes (ODSs) for various sound fields of interest
were measured. Based on the analysis of ODS results. appropriate acniation patterns were
suggested that were aIso verified experimentdy as to their effectiveness.
(3) A feedfonvard control strategy was adopted in this investigation. Effective real-
time control program were developed for Single-Input and Single-Output (SISO) as well
as Multi-Input and Multi-Output (MIMO) feedforward controllers.
(4) The experimentai implementation of the adaptive feedfonvard control strate=
was carried out first on a test beam then on a full-scde fuselage. The off-fine systeir
identification for the fuselage was smdied experimentally by testing various cases iri
84
which the effects of different filter types, filter lengths and random signais were
considered. A total of forty-eight different schemes were investigated for the vibration and
noise control of the fuselage. Depending on the type of signal to be sensed, significant
reductions were achieved in either the fuselage. acceleration or the intemal noise of the
cabin. Finally, issues related to control convergence and suggestions for reduction of the
fuselage vibration andfor intemal cabin noise are addressed.
This preliminary study has demonstrated the feasibility of active control of turbo-
prop cabin noise using piezoelectric actuators and feedfonvard control strategy. It
demonstrates the potential of implernenting this technique by the turbo-prop aircrafi
indusiry .
7.2 Recommendation
In order to improve the control, and with a view of acnial industrial
irnplementation of this technique, the following further investigations are recommended:
(1) For a practicd application, the control of a disturbance with continuously
varying frequency has to be investigated. An accurate system identification will be
necessary over the whole frequency span of interest. Special attention should be paid to
those frequency bands where the transfer function for a secondary path is not smooth.
(2) In this study, the piezo actuator set-up was capable of accommodating a sound
disturbance at 20dB or 30 dB below the SPL at red flight conditions. To increase the
capacity of actuation and to provide sufficient bending moment on the fuselage, the
feasibility of adapting more powefil piezo actuators or multi-layered piezo actuators
needs to be studied
(3) The achieved results indicate that a given single acniator array can be suitable
for only one or two frequencies of disturbance. In order to accommodate a wide range of
frequencies one should consider a colIection of individual shorter piezo arrays with a
number of control channels-
(il ASHLY MFA-8000 Operatmg Manual, ASHLY AUDIO INC, 1994.
[2] Bao, C., Sas, P., and Brussel, H. Van, "Cornparison of Two On-line Identifcation AIgorithms for Active Control", Proc. Recent Advmces in Ache Control of Sound and Vibration, 1993, pp. 38-50
131 Bergland G. D., "A Guided Tour of the Fast Fourier Traosfom", IEEE Specmun, VOL 6, July 1969
[4] Bies, D.A. and Hansen, C.H., Engineeràrg Noire Contrul, T?zeov Md Practice, E & FN SPON, London, 1996
[5] Bniel& Kjær, Condenser Microphone arid Microphone Preamplz~ees for Acousric Mecsuronents, Data Handbook, September 1982.
[6] Elliott, S.I. and Nelson, RA., "Active Noise Conaol", IEEE Signal Processing Magazine, October 1993, pp. 12-35.
[7] Elliott, SJ., 'Active Controi of Structure-Borne Noise", Journal of S o d and Vibration, Vol. 177, No- 5, 1994, pp. 65 1-673
[8] Eliiott, SJ., Boucher C. C. and Nelson, P.A., 'The Behavior of a Multiple Channel Active Control System", IEEE Trmsactiom Signal Processing, VOL 40, NO. 5, May 1992, pp. 1041-1052
[9] Elho& SJ., Stothers and Nelson, P.& "A Multiple Error LMS Algorithm and Its Application to the Active Control of Sound and Vibration", IEEE Transactions on Acodcs, Speech Md Signal Processing, Vol. ASSP 35, No. 10, October 1987, pp. 1423-1434
[IO] Fuller, CR-, Elliott, S J. and Nelson, P.A.., Adve ControZ of Vibrarion, Academic Press Ltd, London, 1996
11 11 Grewal, A., Nitzsche, F., Zimcik D. G. and Leigh B., "Active Control of Aircraft Cabin Noise Using Smart Structures", AL4MASMUAIYS Adaptive Snzc~ture Fom,
87
AIAA Paper 96-1274, Salt Lake City, Utah, ApRl 1996
Grewal, A., Zimcik D. G., Humibise, L.C. and Leiph B., "Active Noise and Vibration Control of Turboprop Aircrafc Cabin U s e Multiple Piezoelectric Actuator", 3rd AL4AlCEA.S Aeroacoustics Conference, Atlanda, GA, May 1997
Grewal, A., Zimcik D. G. and Lapointe, R., "Vibro-Acoustic Modelling in Aircrafi Cabin Noise Transmission and Control", 38th AIAA/ASMUASCWAHS/ASC Smcmres, Stnu:turaI Dymmics, d Materiah Conference and Erhibit, ALLLA/ASMWAHS Ahprive Srntctures F o m , Kissimmee, FL, Apd, 1997
MacMartin, D. G., "Coilocared Structural Control For Reduction of hcraft Cabin Noise", J o u d of S o d and Vibrafion, VOL 190, NO. 1, 1996, pp 1-5-1 19
National Instruments, DAQ AT-AU-6/IO User M m l , Seprember 1994.
Nelson, P.A. and Elliot, S.J., Active C o n ~ o l of S o d , Academy Press, 1990.
Pavel, L., Grewal, A. and Humibise, L. C. 'Beam Vibration Control Experiments using Adaptive Feedfosward Algoritbs", ARC Laboratory Technical Report, June, 1997.
Pavel, L., Personal Communication, 1997
Pennwlat Corporation, Kjmr Piezo Film, Technical Manual, 1987
Specmim Signal Processing Inc, PC/I6108 Multi Channel VO Board, 1994
Specmim Signal Processing Inc, QPC/C40B Board User Mantuzl, 1994
Thomas, D. R., NeIson, P.A. and ELIiott, SJ., "Active Control of the Transmission of Sound Through a Thin Cylindricd SheU, Part 1: The Minimization of Vibration Energy", Journal of Sound ami Vibration, Vol. 167, No. 1, 1993, pp. 91-1 1 I
TI Digital S igd Processing Solutions, Design of A c h e Noise Control System Wirh the TMS320 Family, 1996
[24] TI Digitai Signal Processing Products, TMS320C3x/C4x C Compiler User's Guide, 1997
[25] Tokhi, M.O. and Leitch, R.R., Active Noise Coneol, Chrendon Press, Oxford, 1992.
[26] Wamer, J.V. and Bernhard, W., 'Digital Conîrol of Local Sound Fields in an Aircraft Passenger Cornpanment", AIAA JoumZ, Vo1.28 No 2, 1990, pp. 284-289.
1271 Widrow, B. and Stearns, S-D-, Adaptive Signal Processing, Prentice-Ha, Inc., Englewood Cliffs, NJ., 1985.
[28] Xu W., and Afagh, F. F., "Active Control of Turbo-prop Cabin Noise Usïng Piezoelecnic Acniators - Task Report No. 1", PWGSC Conaact No. 31184-6- 0728/0011ST, Carleton University, Ottawa, Canada, Mar& 1997
[29] Xu W., and Afagh, F. F., "Active Conaol of Turbo-prop Cabin Noise Using Piezoelecaic Acniators - Task Report No. 2", PWGSC Conaacr No. 31 184-6- O728/UO UST, Carleton University, Ottawa, Canada, May 1997
[30] Xu, W., and Afagh, F. F., "Active Control of Tuho-prop Cabin Noise Using Piezoeleceic Actuators - Task Report No. 3", PWGSC Contract No. 3 1 184-6- 0728/00 UST, Carleton University, Ottawa, Canada, September 1997
[31] Xu, W., and Afabh, F- F., "Active Control of Turbo-prop Cabin Noise Using Piezoeecaic Actuators - Task Report No. 4", PWGSC Contract No. 3 1 l84-6-. O728/ûû MT, Carleton University, Ottawa, Canada, December 1997
Appendix A Accelerorneter Positions for 0 D S Measurernents
b
1
2
3
4
5
6
7
8
9
10
I l
f 2
I 13
14
15
16
17
18
19
20
21
22
(m7 23p)
(2OP. 21P)
(1 9P)
(17P. 18P)
(lm
-125
-120.9
-1 13.0
-105.1
-97.9
-903
23
24
25
26
27
28
29
30
49.8
59.7
68.1
71.0
80-7
903
97.9
105-1
(9s. 10s)
(1 1s)
(12s. 13s)
(13s) (14s. 15s)
(16s)
(17S, 18s)
(19s)
X29 1.4
CO1
CO2
CO5
CO8
CL 1 Cl4
(14P.15P)
(13P)
(1W, 13P)
(1 1P)
(9P, 1OP)
(8p)
(7P)
(SE', @)
3 1
32
33
X3 1235 EOL
E02
E05
E08
El 1 El4
c15p CL6
C17
C20
C23
C26
C28
-80.7
-71-0
-68.1
-59.7
-49.8
4 1 .O
-35.1
-25.9
C57
C60
C63
C64 I
e15
El6
e17
E20
Mt E26
E28
FC7
E60 E63
Ea
E3 1
E34
E37
E40
E43
E46
E49
FC2
Es4
(4P)
(Z 3P) (lP/S)
(2s, 3s)
(4s)
(5s. 6s)
(7s)
(8s)
E75
E78
(20S, 21s)
(22s)
C65
C66
C69
C72
-16.6
-7.8
O
3565
E66
E69
E72
(22s. 23s)
113.0
121 .O
C3 1
C34
C37
c40
C75
C78
1
125
7.8
16d
C79 1 E79
C43
C46
25.9 I C49 35.1
41 .O C52
C54
Appendix B Meaçured FRFs for ODSs
Station C: Magnitude: Phase:
Location 61Hz 121Hz 70Hz 140Hz 61Hz 121Hz 70Hz 140Hz 1 0.28 0.63 0.25 0.43; e 91 LI 6 ;
Station E: Magnitude: Phase (deg.):
Location 6IHz Z21Hi70Hz 140Hz 6lHz 121Hz 70B 14OHz
Appendix C Accelerometer Positions to Patterns of the Piezo-Achiated
Measure Deflection Fuselage
Il Circumferenüal Position rl
Appendix D
Results of Fuselage Vibration and Noise Control
Corn1 Case A Test Date: 1 Q-23-97
Enor Sensor. Microphone
Sirnufated sound field: 61 Hz; 30dB below the SPL at ffigM condition Regular MlMO fiitered-x tMS
Nurnber of input chmeis: 3 (1 ) Mic. #2 (2) Mc. #5 (3) Mc #8
Number of ouiput channeis: 2 (1) Piezo group A,C,E 1 G28 (2) Piezo group A,C,E 30-36
Control Setlings: NA-1 5 Convergence coeff. for corrtrol=û.001 N&14 Convergence mefi. for identif.d.001 NC=15 Sampling Rate=2û00 Hz ND=l4 DSP Gain=10 Randorn Sigrml for I&nt%catÏon: 3V randorn 6M2 Hz
Noise Attenuations:
* 1 mV representç 83 uPa " W, and A refer to and aisle se&. S. refers standing
Control Case B Test Date: 1 0-23-97
Errer Sensor. Microphone
SimuIated sound field: 70& 3WB below the SPL at RigM condiion Regular MlMO fiitered-x iJW3
Number of input channels: 3 (1) Mc* $2 (2) Mic. ##5 (3) Mic, #8
Number of output channek 2 (1 ) Piezo group A,C,E 1 G28 (2) Piezo group 4C.E 3û-36
Control Settings: NA-1 5 Convergence aM. for controI=0.001 NB=14 Convergence wfF. for iderrtif-d-001 NC=15 Samplng Rate=2000 Hz N M 4 DSP Gain=lO Randorn Signai for Identifi-on: 3V randorn 69-71 Hz
Noise Attenuations:
- W. and A referto window and aiste seats. S. refers to
Confrol Case C Test Date: 1 0-2397
Enor Sensor: Microphone
Simuiated sound field- 121 M: 20dB below the SPL at RigM condion Regular MlMO fikered-x LMS
Nurnkr of input channeis: 3 (1) Mic. #2 (2) Mic- #5 (3) Mic. #8
Number of oufput diannels: 2 (1) Piezo group A,C,E 1 G28 (2) Piezo group A,C,E 30-36
- NA==I 5 Convergence coeff- for control=0.001 Nk14 Convergence coeff- for identif-=0.001 NC=15 Sampfing Rate=2000 Hz ND=14 DSP Gaindo Random Signal for Iderrtificatjon: 3V random 120-122 Hz
Noise Attenuations:
* 1 mV represents 83 ufa " W. and k refer to window and aisle s e . S. refers to standing aisle
Test Date: 1 C S 9 7
Error Sensor: Microphone
Simulated sound field: 140Hz; 3WB below the SPL at fiight condition Regular MlMO fiitered-x LMS
Number of input channefs: 3 (1 ) Mic. #2 (2) Mc- ff5 (3) Mc- #8
Number of outpa channels: 2 (1) Piezo group 4C.E 1 628 (2) Piezo group A,C,E 3036
- NA=I 5 Convergence coeff. for corrbol=0.001 NB=14 Convergence coeff. for iderrtif.d.001 NC=15 Sampfing R~~E?&OOO HZ ND=14 DSP G a k l O Random Signal for Iderrtificâtion: 2V random 139-1 41 Hz
Mic V o M e ImW* 1 hAic#(locationI ûpen 1 Closed ( Menu. 1
" W. and A refer to window and aisle seats. S. refers standing
Control Case E Test Date: 1 0-23-97
&r Sensor: Microphone
Simulatecf sound field: 61 Hz; 3W 6 below the SPL at RigM condiion Regular MlMO fittsred-x M S
Number of input channefs: 3 (1) Mc- $2 (2) Mic. # (3) Mc. #3
Nurnber of output channeis: 3 (1 ) Piao group A,C, E 12-1 8 (2) Piezo group A,C,E 1&28 (3) Piezo group A,C,E 2S3ô
Control Settîngs: ML15 Convergence coeff- for control=0.001 N0=14 Convergence coeff. for identif-=0.001 NC=15 Sampliflg R a b 1 800 Hz N b 1 4 DSP G-10 Randorn Signal for identification: 3V random 6 M 2 Hr
Noise Attenuations:
' 1 mV rqesenIs 83 uPa - W, and A refer to window and aisle se*. S. refers standing
Controt Case F Test Date: 10-23-97
Enor Sensor: Microphone
Sirnuiated sound field: 70Hz; 3306% below the SPL at RigM condion Regular b1IMO fiitered-x LMS
Number of input channelç: 3 (1) Mic. #2 (2) Mc. ?% (3) Mc. #8
Number of omut channels: 3 (1) Piezo group A,C,E 12-1 8 (2) Piezo group A,C,E 1 8-28 (3) Piezo group A,C,E 28-36
Control Settings: NA=I5 Convergence a&. for conirol=0.001 N&14 Convergence CM. for iderrtif.d.001 NC=l5 Sampiing Rat-1800 Hz ND=l4 DSP Wb1 0 Random Signal for Identification: 3V random 69-71 Hz
Noise Attenuations:
* 1 mV represents 83 uPa * W. and A refer to and aisle seab- S. refers to standing
ConVol Case G Test Date: 10-23-97
Enor Sensor: Microphone
Simulated sound field: 121 Hz; 20dB below the SPL at flight condition Regular MlMO fiiterecl-x LMS
Number of input channek: 3 (1) Mc. #E (2) Mc- #5 (3) Mic. #8
Numtier of output channets 3 (1 ) Piezo group A,C,E 1 2-1 8 (2) Piezo group &C,E 1 û-28 (3) Piezo group A,C,E 2&36
Conbol SMngs: b 1 5 Convergence for corrtrol=0.001 Nk14 Convergence coeff. for identif.=O.OOl NC=15 Sampling Rate.1800 Hz Nb14 DSP Gain=l O Random Signal for Identification: 2V m d o m 12G122 Hr
Noise Atten~~ons:
* 1 mV represents 83 u Pa " W. and A refer to window and aisle seab. S. refers to standing
Controi Case H Test Date: 1 0-23-97
Enor Sensor: Microphone
çirnulated sound field: l4Of-k; 3046 below me SPL at fligM condition Regular MIMO fikered-x LMS
Number of owut channels: 3 (1 ) Piezo grog 4C,E 1 2-1 8 (2) Piezo g r o g A,C,E 1 W 8 (3) Piezo group &C,E 28-36
Conbol Settings: NA-1 5 Convergence coeff. for control=0.001 NS14 Convergence coeff. for iderrtif.=0-001 NC=15 ~ ~ ~ f i n g me1 800 Hz Nb14 DSP G a k l O Random Signal for Identifia-on: 2V randorn 139-1 41 Hz
Noise Attenuations:
* W. and A. refer to window and aisle s e . S. refen to standing aisle
Control Case 1 Test Dater 12-97
Errer Sensor: Microphone
Simukted sound field: 61 Hz; 3048 below the SPL at fi igM condion Regular MIMO fittered-x LMS
Number of input channefs: 3 (1) Mic- * (2) Mic- #S (3) Mic, #8
Control SettÏngs: L I 5 N&O NC=15 N b 1 4 Randorn Signal for IdenMcation: 3V mdom 60-62 HZ
Nurnber of output channets: 3 (1) Piezo group A 12-28 (2) Piezo group C 1 2-28 (3) Piezo group E 12-28
Noise Attenuations:
Mic Vottaqe (mV"
Convergence coeff. for coritrol=0.001 Convergence coeff- for identif-d.001 Sampfing Rate1 800 f-k DSP GaÏn=l O
" W. and A refer to window and aisle seats. S. refers to standing
Control Case J Test Date: 124947
Error Sensor, Microphone
Sirnulated sound field: 70Hz; 3048 below the SPL at fligM condition Regular MlMO fittered-x LMS
Number of input cham&: 3 (1 ) Mic. #2 (2) Mic. # (3) Mic. ff8
Corni Settings: NA=15 NB=O NC=15 NL14 Random Signai for Identification: 3V random 69-71 Hz
Noise Attenuations:
Number of owut channek: 3 (1 ) Piezo group A 12-28 (2) Piezo group C 12-28 (3) Piezo group E 12-28
" W. and A. refer to window and aisle seats. S. refers to
Convergence coeff- for controi4.001 Convergence cOeff- for iderrtif.=0.001 Sampling Rate=lûûû l-iz DSP Gain4 O
standing aisle
Control Case K Test Date: 12-97
Enor Sensor: Microphone
Simulated sound field: 121 Hz; 20dB M o w the SPL at RigM mndion Regular MlMO fiitered-x LMS
Number of input channels: 3 (1) Mic- #2 (2) Mic- f i (3) Mic. #8
Number of output channels: 3 (1) Piezo group A 12-28 (2) Piao group C 12-28 (3) Piezo group E 12-28
Contra[ Settings: NA-1 5 Convergence coeff. for control=0.001 NB-O Cornergence M. for identif.=0.001 NC=15 Sampling Rate1 800 Hz ND=14 DSP Gain=lO Random Signal for Identitication: 2V random 120-1 22 Hz
Noise Attenuations:
7 Rowl. Sm 148 169 -12 ,
8 Row2,S- 86 69 7 -9 C 9 RaY3, S. 108 1 22 -1 -1 " 1 mV represents 83 uPa - W. and A. refer to window and aisle seatç. S. refers to standing aisle
Control Case L Test Date: 12-04-97
Enor Sensor: Microphone
Sirnuiated sound field: 1 4 O k 3068 below the SPL at Rig M condion Reguiar MlMO fiftered-x LMS
Number of inpi channels: 3 (1 ) Mic- #2 (2) Mic. #5 (3) Mic, #%
Number of output channels: 3 (1) Piezo group A 12-28 (2) P ~ ~ z o gmUp C 12-28 (3) Piezo gmup E 12-28
- NA=15 Convergence coeff. for coritrol=0.001 NE4 Convergence coeff. for idenüff=O.OO1 NG15 SampiÏng We=18ûû Hz N b 1 4 DSP Gain=l O Random Signai for Identifiaon: SV random 139-1 41 Hz
Noise Atten~~ons:
Mic VoMe (mV)' 1 M i [Location-1 Open 1 Closeci Attenu. 1
W. and^. refer to window and aisle s e a . S. refers to standing aisle
Conlroi Case #1 Test Date: 9-3û-97
Error Sensor, Accelero met er
Simufated sound field: 67 Hz; 3WB below the SPL ai fiight condition Regular Ml MO fiiteredx LMS
Number of input cbanneis: 4 Nurnber of output diannels: 2 (1) h l . A l &-Cl &El 6 (1) Piero group A,C,E 1 M5-28 (2) Accel. A23+CS3+E23 (2) Piezo group &C,E 2836 (3) Accel- A34+C34+E34 (4) Accel. A4QtC40+E4û
Control Mngs: NA=15 Convergence coeff. for control=û.001 N b 1 4 Convergence coeft foc identif.4.001 NGI 5 Sampling Rate=2000 Hz N b 1 4 DSP Gai1140 &dom Signal for lderrtification: 2V randorn 5C)-80 Hr
Acceletation and Noise A t t e n ~ ~ o n s :
* 1 mV represents 83 uPa " W. and A. refer to window and aisle se*. S. refers to sbiding aisle
Control Case 4 2
Simulated sound field: 70Hz; 3046 below the SPL at ff ig M condition Regufar MlMO fiitered-x LMS
Number of input channels: 4 Nurnber of output channds: 2 (1 ) Accel- A1 6+C16+E16 (1) Piezo g r o g A,C,E 14/15-28 (2) Accel. A23+C251-E23 (2) Piezo group A,C,E 28-36 (3) AaA, A34&34+E34 (4) Ami- A40+C40+E40
Corrtrol Setb'ngs: NA=15 Convergence coeff. for mntroI=0.001 N&14 Convergence coeff. for identif.=O.OOl NC=I 5 Sampling Rate=2ûûû HZ ND=l4 DSP Gain=l O Random Signal for Identification: 2V randorn 50-80 Hz
AaAeration and Noise ffienuations:
Test Date: 9-3@97
" W. and A refer to window and aisle seats. S. refen to standing aisle
Control Case $3 Test Date: 1 0-22-97
Simulateci sound field: 61 Hz; 3WB below the SPL at fiigM condition Reguiar MlMO fittered-x LMS
Number of input dtanneis: 4 Number of output channels: 2 (1) Accel. A24tC2kEî4 (1) Piezo group A,C, E 1 6-28 (2) Accel- A23cC23+E23 (2) Piezo group &C,E 3û-36 (3) AcceI- m E 3 - 4 (4) Accel- A40+C40tE40
Control Settings: NA=15 Convergence coeff. for controM).ûûl Nk14 Convergence mff. for idenüfrrtif=û.OO1 NC=15 Sampiing Rate=2000 HZ ND=13 DSP Gain4 0 Randorn Signal for IdenWmüon: 2V randorn 5 W Hz
Acceieration and Noise Attenuations:
' 1 mV represents83 uPa " W. and A refer to window and aisle s e . S. refers to standing aisle
Conbol Case R4 Test Date: 10-22-97
Error Sensor: AcceIerometer
Simulated sound field: 70Hz; 3WB below the SPL at fligM condition Regular M 1 MO fittered-x LMS
Number of input channelç: 4 Nurnber of output channeis: 2 (1) Accel. A24tC24&24 (1 ) Piezo group A,C,E 16-28 (2) AcceI. A231-C23+E23 (2) Piezo group A,C,E 30.36 (3) Accel- A34+C34+E34 (4) Amel- A40IC40+E4û
Control Setb'ngs: L I 5 Convergence coeff. for controt=0.001 NL14 Convergence coeff. for identif.d.001 NC=15 Sampl'hg Rate=2000 Hz ND=I4 DSP Gain40 Random Signai for Identification: 2V random 5040 Hz
Acceleration and Noise Attenuations:
1 mV represents 83 u Pa " W. and A refer to window and aide seatr. S. refers to standing aisle
Control Case $5
Simulated sound field: 61 Hz; 3ûdB below the SPL at RigM condiion Simplified MlMO fihereci-x LMS
Nurnber of input ct'ianneis: 12 Number of oufput channels: 3 (1) A d . E24 (1 ) Piezo group A,C,E 12-1 8 (2) Accel. E23 (2) Piezo group A,C,E 1 &28 .-. (3) Piezo group 4C.E 2&36
Conlml Settings: W 1 5 Convergence coeff- for conimI--0.001 N B 1 4 Convergence coeff- for iderrtif.=û.ûOI NC=15 Sampling Rate=1500 Hz ND=I4 DSP Gain4 O Random Signal for Identification: 2V random 55-75 Hz
Test Date: 1 0-24-97
Acceleration and Noise Attenuations:
Control Case #6 Test Date: 1 0-24-97
Simulated sound field: 70Hz; 30dB below the SPL at fiight condition Simprmed MlMO filtered-x LMS
Number of input channels: 12 Number of output channels: 3 (1) Accd. E24 (1 ) Piezo group AC, E 1 2-1 8 (2) Accel- EB (2) Piezo group A,C, E 1 8-28 .-. (3) Piezo group A,C,E 2%36
Control Setüngs: L I 5 Convergence coeff. for controM.007 NL14 Convergence wfF- for identif.d.001 NC=15 SampIing R a t e 1 5ûû Hz NL14 DSP Gain4 O W o r n Signal for Identification: 2V random 55-75 Hz
Acceleraüon and Noise Attenuations:
1 mV represents 83 uPa - W. and A refer to window and aisle seats. S. refers to standing aisle
Control Case #7 Test Date: 1 1 44-97
Error Sensor: Accelerorneter
Simufated sound field: 61 Hz; 30dB beiow the SPL at flight condition Reguiar MIMO filtered-x M S
Input CH#: 4 Output CH#: 2 (1 ) Accel, A1 6+C16+EI 6 (1 ) Piezo group A,C,E 14/15-28 (2) Accel. A23+C23+E23 (2) Piezo group A,C,E 28-36 (3) Accel- A34+C34+E34 (4) A m i . A40+C40+E40
Note: [CO] & [DO] from curve fit of transfer function
Control Settings: NA=15 - Convergence coeff. for control=0.001 N B 4 Convergence coeff. for identif.=0.0 NC=5 Sampl ing Rate=2000 Hz ND=4 DSP Gain=l O Random Signal for Identification: none
Acceleration and Noise Attenuations:
Control Case #8 Test Date: 1 1-04-97
Error Sensor: Accelerometer
Sirnulated sound field: 70Hz: 30dB below the SPL at flight condition Regular MlMO filtered-x LMS
Input CH#: 4 Output CH#: 2 (1) AcceI, A l 6+C16+El6 (1) Piezo group A,C,E 14/15-28 (2) Accei. A23+C23+E23 (2) Piezo group A,C,E 28-36 (3) Accel. A34+C34+E34 (4) Accel. A40+C40+E40
Note: [CO] & [DO] from cunre fit of transfer function
Control Settings: NA=15 Convergence coeff. for control=0.001 NB=O Convergence coeff. for identif.=O.O NC=5 Sarnpling Rate=2000 Hz N D=4 DSP Gain=l O Random Signal for Identification: none
Acceleration and Noise Attenuations:
1 mV represents 83 uPa " W. and A. refer to window and aisle seats. S. refers to standing aisle
Control Case #9 Test Date: 1 1-04-97
Error Sensor: Accelerometer
Simulated sound field: 121 Hz; 20dB below the SPL at flight condition Simplified Mt MO filtered-x LMS
Input CH#: 4 Output CH#: 2 (1) Accei. A1 6+C1 &El 6 (1) Piezo group A,C,E 14/15-28 (2) Accel. A23+C23+E23 (2) Piezo group A,C,E 28-36 (3) Accel. A34+C34+E34 (4) Accel. A40+C40+E40
Control Settings: NA=15 Convergence coeff. for controI=0.0001 NB=O Convergence coeff, for identif.=0.001 NC=l5 Sampling Rate=2000 Hz ND=I4 DSP Gain=l O Random Signal for Identification: 2V random 120-122 Hz
Acceleration and Noise Attenuations:
Accel. (mm/s/s) Mic Voftaqe (mV)'
1 12 1 A40 1 205 1 125 1 4.3 1 " 1 rnV represents 83 uPa " W. and A. refer to window and aisle sezts, S. refers to standing aisle
Open Loop 148 99
Ch#
1 2
Open Loop 358 ,
260
Location
E l 6 E23
Closed Loop 83 22
Attenu. (dB) -5.0 -13.1
Closed Loop 214 19
Attenu. (dB) 4.5 22.7
7 ~ i c #
1 2
Location*
Row1,W. Row2, W,
Control Case #10 Test Date: 1 1-04-97
Error Sensor: Accelerometer
Sirnulated sound field: 140Hz; 30dB below the SPL at flight condition Simplified MiMO filtered-x LMS
Input CH#: 4 Output CH#: 2 (1) Accel. A1 6+C16+E16 (1) Piezo group A,C,E 14/15-28 (2) Accel. A23+C23+E23 (2) Piezo group A,C,E 28-36 (3) Accel. AWC34+E34 (4) Accel. A40+C40+E40
Control Settings: NA=15 Convergence coeff. for control=0.0001 NB=0 Convergence coeff. for identif.=0.001 NC=15 Sampling Ratez2000 Hz ND=14 DSP Gain=l O Random Signal for Identification: 2V random 139-1 41 Hz
Acceleration and Noise Attenuations:
' 1 rnV eresents 83 uPa " W. and A. refer to window and aisle seats. S. refers to standing aisle
Control Case #11 Test Date: 1 1-04-97
Error Sensor, Accelerorneter
Sirnulated sound field: 61 Hz; 3OdB below the SPL at flight condition Sirnpiified MIMO filtered-x LMS
Output CH#: 2 (1) Piezo group A,C,E 14/15-28 (2) Piezo group A,C, E 28-36
m..
(12) Aceel. A40
Control Settings: NA=15 Convergence coeff. for control=0.001 N B=O Convergence coeff. for identif.=O-007 NC=15 Sampling Rate=2000 Hz ND=14 DSP Gain=I O Random Signal for Identification: 2V random 55-75 Hz
Acceleration and Noise Attenuations:
1 12 1 A40 1 132 1 9 1 23.3 1 1 mV represents 83 uPa
*' W. and A, refer to window and aide seats. S. refers to standing aide
Control Case #12 Test Date: 1 1-04-97
Simulated sound field: 61 Hz; 30dB below the SPL at flight condition Simplified MlMO filtered-x LMS
Input CH#: 12 (1) Accel. €16 (2) Accel. €23
.a.
(12) Aceel. A40
Output CH#: 2 (1) Piezo group A,C,E 1 4/15-28 (2) Piezo group A,C,E 28-36
Control Settings: NA=15 Convergence coeff. for control=0.001 NB=O Convergence coeff. for identif.=0.001 NC=I 5 Sampling Rate=2000 Hz ND=14 DSP Gain=lO Random Signal for Identification: 3V random 60-62 Hz
Acceleration and Noise Attenuations:
Acce 1. (mrn/s/s) M ic Vo Rage (mV) * Ch#
1 2
--
II A34 147 58 8.1 12 A40 132 10 22.4
* 1 mV represents 83 uPa " W. and A. refer to window and aisle seats. S. refers to standing aisle
Location
E l 6 E23
Attenu. (dB) 2.7 2.9
Open Loop
Closed Loop
Mic# Attenu. (dB)
149 f 82 126 1 34
1 2
5.2 11.4
Location'
Row1,W. Row2, W,
Open Loop
Closed Loop
33 41
45 57
Control Case #13 Test Date: 1 1-04-97
Simuiated sound field: 70Hz; 30dB beiow the SPL at fiight condition Simplified MlMO filtered-x LMS
Input CH#: 12 (1) Accel, E l6 (2) Accel, E23
Output CH#: 2 (1) Piezo group A,C,E 14/15-28 (2) Piezo group A,C,E 28-36
.-. (12) Aceel. A40
Control Settings: NA=I 5 Convergence coeff. for control=0.001 NB=O Convergence coeff. for identif.=û.001 NC=15 Sarnpling Rate=2000 Hz ND=14 DSP Gain=lO Random Signal for Identification: 3V random 69-71 Hz
Acceleration and Noise Attenuations:
* 1 mV represents 83 uPa "W. and A. refer to window and aisle seats. S. refers to standing aisle
Control Case #14 Test Date: 1 1-97
SimuIated sound fieid: 61 Hz, 30dB below tbe SPL at fiight condion SimpMed MIMO fittere&x LMS
Number of input chands: 12 Number of output channeis: 3 (1) AcceL El5 (1 ) Piezo group A 14/15-28 (2) AcceL El6 (2) Piezo group C 1 U1528 ... (3) Piezo gro up E 1 4/15-28
Corn1 Çemngs: NA-1 5 Convergence CO&- for controi=0.001 NLO Convergence coeff. for idenüf.=0.001 NC=15 Sampliig Rate=2000 Hz NL14 DSP Gain4 O Randorn Signal for Identifiaiion: 3V random 55-75 tiz
Acceleration and Noise Attenuations:
* 1 mV represents 83 uPa - W. and A refer to windaw and &le se&. S. refen to standing aisle
C o m l Case $1 5 Test Date: 1 14597
Simulated sound field: 61 Hz, 3WB below the SPL at fiight condiion Simplified MIMO fiiter&x UvlS
Number of input diannels: 3 Number of owut d-iannek: 3 (1) Accel. El SE1 &El 9+E2l (1 ) Piezo group A 1 4/f 5-28 (2) Accel. Cl S C 1 6tC19+C21 (2) Piezo group C 1 4/1 528 (1) AcceI. A l S A 1 &Al 9+A21 (3) Piezo group E 1 4/15-28
Control Settings: NA=15 Convergence coeff- for corrtroM.001 N b 0 Convergence coeff- for iderrtif.=0.001 NC=15 Sampling Rafe=2ûûO Hz ND=I 4 DSP Gain=l O Randorn Signal for lderrtificaion: 3V mdom 55-75 Hz
Acceleration and Noise Attenuations:
" W. and A. refer to window and aûle se*. S. refers to standing aisle
Control Case $1 6 Test Date: 1 1-07-97
&or Sensot: Accelerometer
Simulated sound field: 61 Hz, 30dB below the SPL at fi ight condition Simplified MlMO fiitered-x LMS
Number of input dianmis: 12 Nurnber of ou@& cfiannek: 3 (1 ) Accel- El 5 (1) Piezo group A 12-28 (2) Accel. El6 (2) Piezo giûup C 12-28 .-. (3) Piezo gmup E 12-28
Control Sm-np: NA=15 Convergence coeff- for controt0.001 N&O Convergence M. for identif.=0.001 NC=15 Sarnpling R-2000 Hz ND=14 DSP Gain=l O Randorn Signal for Iderrtification: 3V random 55-75 Hz
Accekration and Noise Attenuations:
* W. and A. refer to window and aisle seats. S. referç to standing aisle
Controf Case #17 Test Date: 1 1-07-97
Gror Sensor: Accelerometer
Simuiated sound field: 61 Hz, 3WB below the SPL at fiigM condiion Simprrfied MlMO fiftered-x LMS
Nurnber of input channels: 3 Nurnber of outptR channeis: 3 (1) Accet, E15+E1 ô+€l9+E21 (1 ) Piezo group A 1 2-28 (2) AC^. Cf 5 4 1 &Cl 9+C21 (2) P~EO g m ~ p C 12-28 (1 ) Accel, A1 5+A1 &A1 %A21 (3) Piezo group E 12-28
Control Settings: W 1 5 Ccmvergence coefF. for controU3-001 NB=O Convergence cûeff, for identif.=O.ûûI NG15 Sampling Rat- Hz NL14 DSP Gain=l O Random Signaf for Identification: 3V random 5575 Hz
Acceleraiion and Noise Attenuations:
* 1 mV represents 83 uPa - W. and k refer to window and &le seak S. refers to standing aisle
Control Case #18 Test Date: 1 1-1 3-97
Sirnufated sound field: 70- 30dB befow the SPL at iiight condition Regular MIMO fiitered-x L M
Number of input diannds: 3 Number of output channeis: 3 (1) Accel- El S E I &El 9+EB (1) Piezo group A 12-28 (2) AcceI, Cl &Cl -1 94221 (2) Piezo group C 12-28 (1 ) AcceL Al S A 1 6+A19+A21 (3) Piezo group E 12-28
Controt Settings: W 1 5 Cornergence coeff, for corrtrol=O.ûûl N W Convergence coeff, for identif.4.001 f0.005 NG15 Sampiing Rate=l ûû0 Hz ND=I 4 DSP Gai-1 O Randorn Signai for Identification: 3V random 55-75 Hz
Acceleration and Noise Attenuations:
' 1 rnV represents 83 uPa - W. and A refer to wïndow and aisle seab. S. refers to standing aisle
Control Case #19 Test Date: 1 1 -1 3-97
Simuiated sound field: 70Hz, 3ûdB befow the SPL at fligM condition Simplifieci MlMO fiitered-x LMS
Number of input channeis: 12 Number of output channels: 3 (1) Accet- El 5 (1 ) Piezo group A 1 2-28 (2) Amel- El6 (2) Piezo group C 12-28 --. (3) Piezo group E 7 2-28 ..- (12) Aceel. A21
Corrtrol Setüngs: W 1 5 Convergence coeff. for control=O.ûûl NB=û Convergence CO&, for identif.=0.001 N G I 5 Sampfing Rate4800 Hz ND=14
- DSP Gain=lO
Randorn Signal for Identification: 3V mdom 55-75 Hz
Acceler;iti*on and Noise Attenuations:
* 1 mV represents 83 uPa - W, and A. referto window and aisle seats. S. refers to standing aiçie
Comd Case #20 Test Date: 1 1-1 3-97
Simulaieci sound field: 121 Hz, 206B befow the SPL at fiigM condition SimpHed MlMO fiitered-x LMS
Number of input channels: 12 N u h r of output channelç: 3 (1) A-1- El 5 (1 ) Pie20 giüiip A 12-28 (2) Accef, El 6 (2) Piezo group C 12-28 .-- (3) Piao group E 12-28
Co rrtrol Settings: NA=I 5 Convergence coeff. for control=û.001 NB=û Convergence coeff- for idenüf.=O.ûûI NC=15 Sampling Rate1 800 Hz ND=14 DSP Gâi~l O Random Signal for Identification: 3V randorn 120-122 tir
Acceleration and Noise Attenuations:
* 1 mV represents 83 uPa " W. and A. refet to window and aiste çeats. S- refers to standing aisle
Test Date: 1 1 -1 397
Simuiated sound field: l4OHz, 30dB below the SPL at fiigM condiion Simpiified MlMO fiitered-x LMS
Number of input channefs: 12 Number of o w u t channefs: 3 (1) Accel- El5 (1 ) Piezo group A 12-28 (2) A a l - El 6 (2) Piao g r ~ u p C 1 2-28 ..- (3) Piezo group E 1 2-28
Conbol Settings: NA=I5 Convergence coeff- for controI=0.001 N&O Convergence mff. for identif.=0.001/0-005 NC=15 Sampling Râte=1800 Hz ND44 DSP Gain=lO Random Signal for identification: 3V random 139-141 Hz
Acceleration and Noise Attenuations:
Accel. (mm&) Mic Voitacre (mW* Ch#
1 2 El 6 5? 62 -0-7 A 2 Row2.W. 114 95 1.6
' 1 mV represents 83 uPa " W. and A refer to window and aisle se&. S. refea to standing aisle
Location --
El 5
Open l-00 P
6 8 1 Closed bop 94
Attenu. (dB) -2.8
M i
7 Location"
Rowl, W.
Open L E L ~
85
Closed
83
Attenu. (dB) 0 2
Control Case ~"22 Test Date: 1 1 -1 3-97
Simuiated sound field: 61 Hz; 30dB below the SPL at flight condition Simpfiied MlMO fiiter&x LMS
Number of input dimneis: 12 Nurnber of output channels: 3 (1) Accel. E23 (1 ) Piezo group A 1 2-32 (2) AcceL El 6 (2) Piezo group C 12-32 ... (3) Piezo group E 12-32
ControI Seüjngs: NA=7 5 Convergence coeff. for corrttoM.003 N W Convergence coeff. for iderrtiierrtii=0.(301 10.005 NG15 Sarnpiing Rate=1800 Hz Nb14 DSP Gain=10 Random Signai for I&ntifidon: 3V random 55-75 Hz
Amleration and Noise Attenuaîions:
1 mV represents 83 uPa " W. and A. refer to window and aisle seats. S. refers to standing aisle
Control Case %23 Test Date: 1 1 -1 3-97
Simulated Sound field: 70Hz; 3WB below the SPL at ffight condition Simplied MlMO fikered-x LMS
Nurnber of input channets: 12 Number of output channels: 3 (1) Accel. E23 (1) Piero group A 1232 (2) Accel- El 6 (2) Piao group C 1232 ..- (3) Piao group E 1 2-32
Corrtrol Setb'ngs: NA=15 Convergence coeff. for controM.001 N&O Convergence coeff. for identif-=0.001 /0.005 NGl5 Sarnpiing Rate4 800 Hz ND=14 DSP Gain4 O Random Signai for IdenHwtion: 3V randorn 5575 Hz
Accelerathn and Noise Attenuatïons:
" W. and A- refer to window and aisle se&. S. refers to standing aisle
Test Date: 1 1-1 3-97
Simukted sound field: 121 Hz; 20dB beiow the SPL at fiight condion Simprrfied MlMO fifered-x LMS
Number of input channels: 12 Nurnber of ouput channels: 3 (1) Accel. E23 (1) Piezo group A 1232 (2) A-1- El 6 (2) Piao group C 1 2-32 --- (3) Piezo group E 12-32
Control Settings: NA-1 5 Convergence coeff. for controI=O.001 NB=O Convergence CO&. for identif.=0.001/0,005 NG15 Smpling Rate=Iûûû Hz ND=14 DSP Gain4 O Random Signa for Identification: 2V random 120.122 tfi
Acceleraiion and Noise Attenuations:
* 1 mV represents 83 uPa " W. and A refer to window and aisle s e . S. refen to standing aisle
Control Case R-125 Test Date: 1 1-1 S97
Simulated sound field: 1 MHz; 30dB below the SPL at fligM condiion Simpiified MIMO fiitered-x LMS
Number of input channek: 12 Nurnber of output diannek: 3 (1) Accel. €23 (1) Piezo group A f 2-32 (2) Accel. El 6 (2) Piezo group C 12-32 --- (3) Piezo group E 12-32 .-- (12) Aceel- A21
Control Settings: h l 5 Convergence coeff. for controI=0.001 N M Convergence coeff. for identif.4.00 1 /0.005 NC-15 Sampiing Rate=1800 i iz NL14 DSP Gain=l O Randorn Signal for Identification: 2V random 139-141 Hz
Acceleration and Noise Attenuations:
" W. and A. refer to whdow and aisle seats. S. refers to standing aisle
Contml Case %G Test Date: 12-97
Error Sensor: Acceterometer
Sirnulated sound field: 61 3ûdB below the SPL at fligM condition Regular MlMO fiitered-x LMS
Number of input channeis: 3 (1) Accel. E15+E16+El %E21 (2) A m l . Cl ~ + C I ~ - I - C I ~ + C ~ I (1) Accel, AI S A 1 &A1 9+A21
Number of output channeis: 3 (1) Piezo group A 1 2-28 (2) Pie0 group C 12-28 (3) Piezo group E 12-28
Control Sangs: NA=15 mu0 (mntrol)=O. 00 1 NB14 Convergence meff. for identif.=0.001 NC=15 Samplii Rate4 €300 Hz ND44 DSP Gain=1 O Randorn Signai for Identification: 3V randorn 5575 Hz
Acceleration and Noise Attenuations:
* 1 rnV represerrts 83 uPa - W., A and S. refer to w i n d o ~ , aisle and standing seats
Control Case Z 7 Test Date: 12-0&97
Simuiated sound fieid: 70Hz; 3ûdB below the SPL at ffight condition Regular MIMO fittered-x LMS
Number of input channeis: 3 Nurnber of oupiut channels: 3 (1) Accei. El5+E1 &El9+€21 (1 ) Piezo group A 12-28 (2) Ami, Cl 5+Cl &Cl 9 B 1 (2) Piao g r ~ u p C 12-28 (1) Accei, A l S A 1 6+A19+A21 (3) Piezo group E 12-28
Corrtrol Settings: NA=I 5 mu0 (~0rrtrol)=0.001 Nk14 Convergence coeff. for iderrtif.=O.MIl NC=15 Sampling Rat+I 800 f-iz N b 1 4 DSP Gain=l O Random Signai for Identificaiion: 3V random 5575 Hz
Accelerab'on and Noise Attenuations:
7 1 Cl9 . 8 ! C2l Avq. 5 to 8
* 1 mV represents 83 uPa " W., A. and S. refer to window, aisle and standing seats
146 1 92 91 76
. 45 1 68 226 85
9 * I O , 11
12
A15 A16 A19 A21
88 155 40 103 41 1 32 190 51 . Aw. 9 to 12
4.4 ff 8 1.9 A 9 7.1 -2.6 0.8 21 1.1 4.4 11
RoW. S, R o w ~ . S.
46 79
72 1 07
-3.9 . -2.6
Controi Case $28 Test Date: 12-08-97
Error Sensor, Accelerometer
Sirnuiated sound field: 121 Hz; 2ûdB below aie SPL at fligM condiion Regular MlMO filtered-x LMS
Number of input channels: 3 Number of oupiut ctiannels: 3 . (1) Accel, E15+El&E1 9+E21 (1 ) Piezo group A 1 2-28
(2) Accel. Cl 5tC1 &Cl 9 4 2 1 (2) Piezo group C 12-28 (1 ) Accel. A1 &A1 &A1 %A21 (3) Piezo grog E 12-28
Control Settings: NA=15 mu0 (~ntr01)=0.001 N&14 Convergence coeff- for iderrtif.=0,001 NC=15 SampliÏg Rate=1800 Hz ND=14 DSP G-IO Random Signal for Ideritification: 2V random 12G122 Hz
Amleration and Noise Attenuations:
1 mV represerits 83 uPa - W., A. and S. refer to window, aisle and standing seats
ConPol Case H 9 Test Date: 12-08-97
Simulated sound field: 140Hz; 30dB below the SPL at fi ight condition Regular MlMO fikered-x LMS
Number of input channels: 3 Nurnber of output channels: 3 (1 ) Accel, El S E 1 &El SE21 (1) Piezo group A 12-28 (2) A d - Cl M I &-Cl 9iC21 (2) Piao group C 12-28 (1 ) Accel- Al 5+A1 &Al 9421 (3) Piezo group E 12-28
Controi Sethgs: NA-1 5 mu0 (controI)=O.#I N b 1 4 Convergence coeff. for identif.=û.Gûl NC=15 Sampling Rate1 800 Hz ND=14 DSP G a k l O Random Signal for Identification: 2V randorn 139-1 41 Hz
Acceleration and Noise Attenuations:
" W., A. &d S. refer to window, aisle and standing seab
Source Code files:
Appendix E User Manual and Source Code for Sound Field Simulation Program
User manual:
The executable pro=- is named WDAQ-EXE. The installation and execution
procedures are as follows:
(1) Create a subdirectory, and copy W D A Q E E f i e into this subdirectory;
(2) Run this program in Windows 3.1 environment;
(3) Pull d o m the SETTING menu and choose one of the four channels. A didogue
box will appear, (4) In this didogue box, fiU the characteristics for each of up to 10 waveform
components, including fkequency, voltage levef and phase (frequency could te
12, ..., 999Hz, voltage level could be O to 5 volt, phase could be -999 to 999 degree);
(5) For convenience, the settïng for one chme1 could be copied from the setcing for another chamel;
(6) Once the settirtg is complete, the output waveforms from the 4 channels WU be
displayed on the PC screen. This is to ensure the conectness of the data;
(7) AU the settuig could be saved to a disk file or loaded back by ninning the SAVE,
SAVE AS and LOAD command in FILE menu;
(8) To start a new setting, nin the NEW command in FILE menu; (9) Run the command START in RUN menu, the DAC board wiU output exactiy the
analog voltages with desired fkequencies, levels and phases;
(10) CLick any key to terminate the voltage outputs; .
(11) This proa- was carefully designed to avoid suppiyuig a ha& impact on
amplifier. That is to provide a graduai and smooth rise and decline of the output
waveform at the start and end of the penod
Main me for synthesizing waveforms and outputhg to DACs
Head file of WDAQ-CPP
Description nle of WDAQCPP Resoürce file of WDAQCPP
13 5 WDAQ - CPP
/ / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / WDP,Q-CPO: Synthesis wzvefo--ms d ou tpu t ï o DACs / / / / ( X z r a w a r e serting refers Co FDAQ-E) / / / / Wricren by: Weiping Xu / / Carleton University / / March 1997 / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / /
/ / Specif l c a t i o n s t / / (1) Ch0 to Ch3 use ex t e rna l refemce 2 -05 V a t pul 38 / / ( 2 ) Output is r e s ï r i c t e 9 t o 2 -0 V
gincf ude g k c l u d e gïnc lude g i n c h d e ginclude ginclude f include Binclude g i n c h d e Binclude Binclude
cowl\applicat . h> <owl\framewin. h> cowl\dialog-h> cowl \ e d i t -II> cowl\voliSate . h> cowl\dc-h> <owl \ ed i t f i l e , rh> <owl\opensave. h> <s t r i ng . h> "wdaq, rc" "wdaq- hm
Binclude cf strem, h> PinduCie cmath,h> //Finchde cstdio.h> 4Lnclude e s t d l i b - h > $ i n c h d e <conio.h>
i f stream fpin; ofstrezm fpout ;
+def ine RAHI?-LEKGTS 5 / / ( in second), t o t a l start r m po in t s = SA=-No * EZÀMPEZÀMPLrnGTE fdef ine MAX-HZ 1 0 / / m i r n u n number of frequency components Pdef i n e CIf-NO 4 / / t o t z l output &=el number %define S ,WNO 5000 / / outpuc ~ u f f e r size Mefine V-REF 2-04 / / external vo l t age at pin 38 %define DmW-SC2.E 2 / / ( i n v o l t ) , f u l l scale f o r ex-display +de£ i n e P I 3 - 14159
char filenune [4O! =" \ O n ; c h u ~ f i l e n a r n ~ [ 4 0 1 = " \ 0 ~ ; UINT flag=TR'cTE; / / TRIJE ind ica tes : wave [ ] [ ] needs t o be r eca l cu l a t ed i n t ch-no ; i n t wave [CH-SOI [ SAMP-NO] ; void initilize (void) ;
/ / T r a n s f er buf f e r for the dlzlogl box. s truct TTramsBuf C
char Edit,Cmo I2 ] ; char Edlt-Hz [MAX-XZ] [BI ; char Edit-Volt[MAX_HZ] [ 5 ] ;
char Z d i t-Des [KrXrXi?Z 1 [ 5 1 ; 1 trulsBuf [C,4'-NO] ;
/ / Truisfer buf fer f o r *&e dialog2 box, C ~ X C O ~ Y C ~ r 2 1 ;
/ / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / initilize che DAQ board / / / / / . / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / v o i s i-nitialize (void) C
//---config CFG2--------------------------- * ( (int * ) &cf g2-command) = 0 ; c f g 2 c o m m a n d . L D A C O = SET; / / D o u b l e - b u f f e r e d DAC c f g 2 c o m m a n d , L D A C Z = SET; / / D o u b l e - b u f f e r e d DAC o u t p w (CFGZ , * ( ( i n t * 1 &cf g2-command) ) ;
output output
- - cf &3-co&d - SCANEX = ENABLE; //DAC cbarmel SC- mode enable cf g 3 c o m m a n d , EN25V = SET; / / 2 - 5V reference is availzble oz
pin 38 outpw (CFG3, * ( ( in t *) & c f g 3 _ c o r m n u l d ) ) ;
//---config CmRm-------------------------- c n t r ~ c o r m n a n d - B C D S E L = CLEL-; //5inary coded decimal select cntr~m=I~command.MODESEL = 3 ; / / C o u n t e r m o ü e selecc (000---Mode cntrcrn-2-command.RWSEL = 1; / / R e a d / W r i t e select (01--R/W LS3
only) cnt rcmd_command.CNTRSEL = 0 ; / / C o u n t e r select ( 0 0 - - s e l e c t
C o u n t e r 1) outp (CNTRCM), * ( (char * &cnt rcmd ,command) ) ;
/ / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / The A p p l i c a t i o f i ' s C l a s s . C l a s s D e f i n i t i o n / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / class TApp : gublic T A 2 p l i c o t i o n C public :
TApp ( ) : T A p p l i c a t i o n ( 1 { } void In i tMa*Window ( 1 ;
1;
/ / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / T h e Ezin W i r i d o w ' s C l a s s , C l z s s Def i n i t i o n / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / clzss CinCw : public T T r a n e W i n d o w r L
public : TWn6w ('lSWi~~dow *parent,
void void void void void vo id void void void void void void void void
P a i n r ( T D C & , BOOL, R e D r a w ( 1 ; D i s p l a y (TDC& ) ; CmFileNew ( ; ûnFileGpen ( ; CmFileSave ( ) ; CmFileSaveAs ( ) ; û n S e t C h O ( ) ; C r n S e t C h l ( 1 ; CmÇezCh2 ( ; C m S e t C n 3 ( ; CmRunStart ( ) ; Smooth-s ( i n t ) ; Smooth -e (kt) ;
const char f= *tltle) ;
TRect&) ;
DEFm-RESFONSE-TABLEl(TWndw, T F r a m e W i n d o w ) 37-COW4ND (CM-FILENEW. CmFileNew) , ZV-CO- (CM-FILEOPEN, C m F i l e û p e n ) , EV-COMMAND (CM-FILESAVE, ûnFileSave) , ZV=.'vCOW.G9ND ( CE-FILESAVoAS . C m C i l e S a v e A s ) , ZVVCOMXIND ((31-SET-CHO , CmSetChO ) , EV-CO-MEZXND ( CM-SET-CH1 , CmçetChl ) . 37-COMElAND (CM-SET-CH2 . CmSetCh2 ) , ZV-COlNAND (CM-SET-CR3, C m S e t C h 3 ) , 3 7 - C O ~ ( C M C R U N U N S T A R T , C m R u n S t a r t ) ,
END-FESPONSE-TABLE;
/ / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / f / / / / / / / / / / / / / / / / / / / DIALOG-1 C ï a s s Definition / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / class T D l g l : public T D i a l o g C grotected:
'L"rrans3uf o l d T r z n s B u f ;
public : T D l g l ( T W i n à o w *parent, TResId resId) ;
protec~ed: void S e t u p W i n d o w ( ) ; void C r n C a n c e l ( 1 ; void CmCopy ( ) ;
9 E F ~ - ~ Ç P O N S E , T A S L E l ( T D I g l , T D i z l o g ) ZV-COMMAND ( IDCANCEL , CmCancel) , EV-COMMAND ( IDC-COPY, CmCopy ) ,
/ / / / / / / / / / / / / / / / i / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / DIALOG-2 C l a s s Def &ici011 / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / class T X g 2 r public T D i a l o g C
prorected: void ûnOk0;
DZFDTT.RcSPONSEETÀBLZ1{TDIg2, TDialog) / / no fucntion !!! END-RESFONSE-TABLZ;
/ / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / The TWndw Clossts hplementation- / / TWndw TWndw TWridw TWndw / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / ?Wridw::TWndw() / / / / This is the main w i n d o w ' ç construccor- / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / TWndwz:TWndw(TWindow 'parent, const ch= far ~ t i t l e ) =
TFraneWindow (pzrent, title) C
/ / Assign the window's menu- Assig-nIMenu (MENU-I } ;
/ / Size and posirion the wir-dow. Attr.X = 0; Attr-Y = 0; Attr - W = G e t S y s t ~ m M e t r i c s (SIG-CIiSCREEN) / 1.0 ; Attr.E = GetSystemMetrics(Sl4-CYSCREm) / 1.0;
/ / Initialize the txu is fer buffer- for (int i=0; i<CHJ?O; iti) {
memset(&transBuf[i], 0, sizeof(transBuf ri]) ; t r = s B u f [i ] . Edit-ChNo [O ] = 0x3 O + 5 ;
1
/ / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / TWnÙw: :PaintO / / / / This function, whicb overrides TWindow's Pakar ( ) member / / function, responds to WM-PAINT messages, w-hich W ~ ~ ~ O W S / / sen& to a window w h e n F t must be repainted. However, / / by calling this function with a TPriater objectgs DC for / / the first pxameter, it c m be used CO print the / / contents of the wiridow on the printer- / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / void TWndw: : Paint (TDC &ac, BOOL, TRect&)
i TClientDC dc (n'C(Jin6ow) ; Display (dc 1 ;
3
/ / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / void TWndw::Disglay(TDC& dc) C
float hz[CHHNOl [MAX-KZ]. volc[CE-NO] [~~-F-Z], deg[CX-ZP;iO] [Yi-HZ] ; float wave-txp; int n, k, xx, yy;
//if f lag=true, recalculate wave [Ch'-NO] [SAMP-NO] if (flag)
for(n=O; ncCEI-NO; n++) for (k=0 ; kcMAX-HZ; kt+) {
hz ln] [kl =arof ( t r u l ç B u f tn] . EdLt-Ez [k] ) ; volt [n] [k3 =atof (transBuf [n] - Edit-Volt [k] ) ; aeg [nl [k] =atof ( t r a n s B u f [n] . Sait-Deg [k] ) ;
1
2048 /V-XEFXvolt [nl [kl *sin (SxP1* (hz Cnl tk] *i/SAW-NO+aeg [n] [k] /36O ) ) ; wavelnl Cil = (int) wave-tm~; if (wavein] [il > 2047) wavefn] [il = 2047; if (wave ln] [il c -2048) wüve[n] Ci] = -2048;
1 1 flag = F U S E ;
/ / Initialize pen w i d t h and c o l o r , i n t pw = 2; TPen *pen = new TPen(TCo1or::Gray. pw, PÇ-SOLID); TBrush *brush = new TBrush (TColor: :White) ; / / Select the new pen znd brush k t o the DC- dc. SelectObject ; dc,SelectObject(*brush);
/ / Draw a rectangle. dc-Rectangle(100, 50, 570, 400); dc-TextOut(50, 94 , "CH O"); dc.TextOut(50, 174 , "CH lu); dc-TextOut(50. 254 , "CH 2 " ) ; dc-TextOut(50, 334 , "CH 3 " ) ;
for (n=O; ncCE-NO; cc+) { ~c,MoveTo(100,100 + 80*n) ; for(k=100; k-670; kt+) {
xx=k; yy=100 + 80*n +
/ / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / TWndw::CrnFileNew() / / / / T h i s fmction rospozds to the File/New File m e n i l / / C O I D ~ ~ E U I ~ DY . - - / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / void TWndw: = CmcileNew ( ) C
filename[O] =' \ O L ; / / fnitialize tne trazzsfer buLfer- for (lnt i=0 ; LcCE-XO; i+t) {
memset(&trarrsBuf [il, O, sizeof (trmsBuf [il ) ) ; transBuf Ci] , =dit-CWo [O 1 = 0x3 0 + i;
1 flag = TXUE; ReDrow ( ;
1
/ / / / This function responàs to Che File/@= File m e n u / / command by disglaying Windows' Open coxmnon dialog
t char errorMsg [811 ;
/ / Creare the d i a l o g box's T D a t a object. T0pezSaveDialog::TData fileData(OFN_FfLWs~~1ST/
OFN-HIDEREADONLY~~FN~PATHMUST~IST, "Data Files (*-dar) 1'-datlIIl Files ( * . * ) l * . * l U ,
n ~ n ) ;
/ / Create the Open àialog box- TFileûgenDialog *aalog =
new TFileOpenDialog(this, f i leDa~a);
/ / Sxocute the Open dialog box, i n t result = dialog->Execute ( ) ;
/ / Respond to the dizlog box's OR button- if (result == IDOR) f
/ / copy the new naine into memeory strcpy(filename, fFleData.FileNano); min, operi ( f ileData. FileName, ios : : in) ; for(int i=O; itCH-NO; i+i) fpin,read( (char*) &transBuf[i], sizeof (st=ct
T T r a n ç B u f ) ; £pin, close ( ) ; flag = TRIE; ReDraw ( 1 ;
els if (EilsDaza-Error I= 0) { wsprintf (errorKsg,
"Error F%ld occ-red-', fileDara-Error); MessageBox(errorMsg, "ERROR",
MB_OK [ Fl3-FCONZXCLllMATION) ;
/ / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / TWnàw: :CmFFleSave() / / / / This fitnction responds to the Szve m-u cornnand by / / disglaying Windows' Save comrnon dialog box. / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / * / void TWodw: :QnFileSave() C
chzr errorMsg 1811 ;
/ / check if this is a new file, if yes pick the name frorn memeo-ry / / if no, ask a new filename If (!filename[0l=='\O1) {
fgout - o g ~ n ( f ilename. ios : : out) ; for(int i=0; icCH-NO; i+i)
-out .cite ( (char* ) &crarisBuf [il , sizeof (struct TTrznsBuf) 1 ;
Bout. close ( 1 ; return ; 1
/ / Create the dialog box's TData object- TûpenSaveDizlog: : TData f ileData (
OFNFNEIDEXEADO?XLY 1 OE'NEiOTF~WRITSPROMPT, " D o t a Files (*.dat)l*-datlAll Files ( * . * ) l * , * I n , O, "\\cpgn, "TXT");
/ / Create the Save dialog box- TFFleSaveDialog "dialog =
new TFileSaveDialog(this, fileData);
/ / Execute the Save aialog box. i n t sesult = aialog->Execute() ;
/ / Respond to the dialog box's OR button, if (resdt == IDOR) {
/ / copy the new name into memeory strcpy( filename, f ileData,fileName) ; fpout.open(filenome, ios::out); for(i~t i=0; i-cCET-NO; i++) fpout -mite ( (cnar* ) &transBuf [il , sizeof (str~ct TTrm-sBuf ) ) ;
fpout - close ( ) ;
else if (fileData-Exror != O) { wsprintf (errorMsg ,
"Error %%Id occurred,", fileData-Error); MessageBox(errorMsg, "ERROR".
MB_OK 1 ME!-1CON"sXCLAMATION);
/ / / / This fuactiorr responds to t3e Save me-.c co-d 'by / / displaying W i n d o w s ' Save comraor- dialog box. / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / void TWndw= :CmFFleSaveAs ( ) C
char ezrorMsg 1811 ;
/ / Create the dialog box's TPata object. TûpenSaveDialog::T3ata fileData(
OFN-EIDERopJ>ONLY 1 03*-OmWXIT3PROET , "Data Files (*-dat) /*.&tlAll Files (*.*) l * - * l n ,
/ / Create the Save aialog box- TFileSaveDialog *dialog =
ne97 TFileSaveDialog ( this , f ileData) ;
/ / Execute the Save dialog box- int result = dizlog->Execute ( ) ;
/ / Respond to the aialog box's OK button- if (result == IDOK) {
/ / copy the new name into rnemeory strcpy(f ilenme, fileData -~ileName) ;
fpout-operi(fi1eData-Filmame, ios::out); f o x (lnt i = O ; icCE-NO; i++) fpout - m i t e ( (ch=* ) &trans9uf [il , sizeof (struct
TTransBuf 1 ; fgout. close ( 1 ;
1 / / ~essagei30x(fileData.FiLe-Yame, / / "Dialog Result", MB-OK);
else if ( fileData- Error != O) { wsprintf (errorMsg,
" E r r o r t%ld occurred-", filmata-Error);
/ / / / This Zitriction responds to the main menu's CK-SET-CHO / / cormanci, displayhg =à handliag the dialog box- / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / i / / / / / / void TWndw: rCmSetCh0 ( )
&-no = O; / / Construct +the dialog box. TDialos idialog = new ~~lgl(&s, DIALOG-1);
/ / Display the diafog box. int result = dialog->Execute ( 1 ;
/ / Check whether the user exited the d ia log / / box via the OK button and displzy the / / new diafog box data if he did-
if (xesult == IDOK) { bvaf idate ( ) ; flag = TRUI;
3
C &-no = 1; / / Construct the dialog box- TDialog *dialog = n e w TDlgl(tbis, DIALOG-1);
/ / Display -&e fialog box, i n t result = dialog->Txecute ( 1;
/ / Check whether the user exited the dialog / / box via the OK button ait aisplay the / / new aialog box data if he did- if (result == IDOK) {
Invalidate ( ) ; f la5 = TRUE;
1 1
/ / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / i / / / / / / / / / / / / / / TWndw: : û n S e t C h 2 0 / / void mndw: :CmçetCh2 ( 1 C
ch-no = 2; / / Construct the dialog box- TDialog *dialog = new TDlgl(this, DIALOG-1);
/ / Display the dialog box- int resalt = dialog->ExecuteO;
/ / Check whether the user e x ï t ~ d the dialog / / box via the OK button and display the / / new dialog box data if he did- i f (result == IDOK) {
Invalidate ( ) ; flag = TIiUZ;
/ / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / TWndw: 1CmÇetCh3 ( ) / / void TWcdw: zCrnSetCh3 ( ) I
&-no = 3 ; / / Construct the dialog box, TDialog *&alog = new TDlgl(this, DïALOG-1);
/ / Display the salog box- int result = dizlog->ExecuteO;
/ / Check whether the user exited the d ia log
/ / box via the OK nutton and fisglay the / / new d i a l o c box datz i f he 6 i d - i f (result == IDOK) f
Invalidate ( ) r flag = TRIE;
/ / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / TW~~dw=:T'mRitnStart~) / / / / This functiori responds Co tke min m-u's CM-STSL3T-RüN / / command, displayTng znd h a ~ d l ~ ç -de dialog box. / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / void TWndw : : CnRu,'~Start ( 1 {
/ / Initialize pen wiàth and co lo r - T C l i e n t D C dc (HWinaow) ; int pw = 6; TPen *pen = Dew TPen(TColor:=LtRed, pw, PS-SOLID); T B r u s h *brush = new TBrush(TCo1or::Wkite); / / Select the new pen and brush into che DC. ac- SelectObject (*perd ; dc . SelectOb ject ( *brusfi) ; dc.Roctmgle(150,150,350r200~; dc,TextOut(l65, 165 . " - - - Click Any Key to Stop!");
int wO, wl, w2, w3, coünt = 0; STAclpS-VALUE status-value;
/ / Clear FIFO. iripw (FIFO) ;
/ / smooth the s t a r t part of wave £rom zero for(int i r = O ; ircRA1iPLENGTH; ir++) Smooth-s (ir) ;
//start output data to four channels while ( !GetuiputStzte ( 1 ) {
do 1 * ( (int*) &s-catus-value) = ixtpw(STAFJS) ; )while(status,value.FEi ==O) ; Eor(int i=O; ic64; it+) {
wO = waveC01 [count]; wl = wave[L] [countl ; w2 = wave [2] [cou=tl ; w3 = wave [3 ] [comt++] ; outpw (FIFO, wO ) ; outpw(FIF0, wl); outpw(FIF0, w2) ; outpw (FIFO , w3 ) ; if (count >= SPB-NO) count = 0; outpw (FIFO, (wO + wzve [O] [ C O - ~ C ] ) /2 ) ; outpw(FIF0, (wl + Wavell] [co~i])/S); outpw(FIC0, (w2 + wave[2] [count])/2); outpw(FIF0, (w3 + wavel3l [count])/2);
1 / / smooth the end part of wave to zero Çmoothe (count) ;
//refresh the windows
146 WDAQ . CPP
//de= the last message MSG Iprrsg; Gemessage (&lpmsg, NULL, O, 0 ) ; Ge'LMessage ( B l p s g , NULL, O, 0 ) ;
1
/ / czll this fmction Defore stzrting rewlar wave / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / f / / / voici TWndw::Sm~oth,s(~t ir) C
f loar factor; int wO, wl, w2, w3, count = 0; STATUS-VALLIT s tztus-=lue ; //scart output data to four charuiels £or(;;) {
do C * ( ( intt 1 &s tatus-vzlue) = i n g w ( STATUS ) ; ) while ( s tatus-value ,FH ==O ) ; for tint i=O; i(64; i+t) {
factor = (float(SAMPAMPNO)*ir + count)/(float(SAMPAMPNO)*RAMPRAMPLENGTH);
factor == factor; wO = wave [ 0 1 [count 3 * f actor ; wl = wave [l] [countj *£actor; w2 = wave[21 [countlXfactor; tr3 = wave 13 1 [count++] *factor; outpw(TfF0, outpw (FIFO , outpw (FIFO , outpw (FIFO ,
O U ~ ~ W (FIFO , outpw (FIFO , O U ~ ~ W (FIFO, outpw (FIFO ,
if (count >= / / oiztpw (ZIF0 , / / outpw (FIFO , / / outpw ( FIFO , / / outpw (FIFO ,
if (cornt == 1
SAME'JTO) count = O; (wO +. waveCO] [count] ) /2*factor) ; (wl + wave [il [count] ) /2*factor) ; (w2 + wave [2] [count] ) /2*factor) ; (w3 + wave [ 3 ] [count] ) /2*factor) ; 0) break;
if(comt == 0) break; 1
3
/ / cal1 this function after ending regular wave / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / voie TWnàw::Smooth-e(int count) C
int factor, ik = SAIJP-KI; i n t w O , wl, w2, w3; STATUS-VRT;UE: s tztusvalue ; //start output data to f o u c h m e l s for(;;) {
do { * ( ( int* ) &s tatus-value) = k p w ( STATUS ) ; }while (status-value- ==O) ; for(int i=0; ic64; i++) {
factor = SAMP-NO / ik;
147 rnAQ * CPP
wO = wzve[O] [count] /factor; wl = wove [Il Icortrit] /factor; w2 = wavei21 fcount]/factor; w3 = wave C3 1 [countit] /factor; outpw(FIF0, wO); outpw (FIFO , wl ) ; outpw (FIS0 , w2 ) ; outpw (FIFO , w3 ) ; if (cornt >= S m - N O ) count = 0 ; outpw (FIFO, (wO t wave [O ] [cowt] ) /2/r'actor) ; ort~w(FZF0, (wl + wave [l] [co'zL.~~] ) /S/factor) ; outpw(FIF0, (w2 t wzve [SI [cou~t] ) /S/factor) ; ocCpw(FIF0, (w3 c wove [3 1 [comt] ) /2/factor) ; ik-- - - if (ik < 1) brealc;
1 if (Fk -c 1) break;
1 1
/ / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / The T D l g l Class ' s imglementztion, / / TDlgl TDlgl m l g l TDIgl / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / TDlgl : : T D l g l ( ) / / / / This is the dialog box's const=ctor, / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / TDlgl : : T D l g l ( TWindow *parent, TResId resId) :
TDiolog (parent, resId) C
TEdit * edit ; TValidator *valid;
/ / Create ari OWL control object for each control / / element i~ the àialog box that will porticipate / / in the transfer. aso, attach validator abjects / / to edit controls that need to be verified- new TEdit (this, IDC-ZDIT-00, sizeof (trarsB~f [O] .Eàit-ChNo) ; kt i6c=LDC-EDIT-l; for ( ; idc<=IDC-EDIT-10; idc+t) {
edit=new TEdit(this, idc, sizeof (transBuffO] -EdittEiz[OI 1 ) ; valid = new TFilterValidator("0-9"); edi t->SetValidator (vzlid) ;
1 f o r ( ; idcc=IDC-EDIT-20; idc+t) {
edit=new T Z d i t (this, idc, sizeof ( t r z n s B u f [O] -Ed,it-ValtCOl) ; vâlid = new TFilterValidator("0-9."); ediï->SetValidator (valid) ;
J £or( ; id~c=IDC_~1T-30; ide++) {
edit=new T E & t ( t h i s , idc, sizeo£(tr~sBuf[0] -EditDeg[O])); valid = cew TFil~erVzlicïaïor ( " 0-9 - "); edit->SetValidator(valia) ;
3
/ / Assign the dialoc box's transfer buffer. Transf =Bu£ f e r = &transBuf [ch-no] ;
3
/ / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / f / / / / / TDlgl : : SetupWicdow ( 1 / / / / This funciion overrides TDialocts SetupWhdow() a d is / / called rignt ~eforo the dialog is disglayed- This is a / / good place ta perform last mincte inieializariori- / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / /
/ / IMPORTANT! Aïlow zegular setup to be performed- TDialog::SetupWindow();
/ / Save the currenc / / chmges l i i s rnind memcoy (&oldTrznsBu£,
dialog datz in case the user by selecting the Cmcel butta-,- &t~ansBuf[ch_no], sizeof(transBuf[ch-nom;
/ / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / TDlgl : : CmCancel( ) / / / / This funcrion, wnich overrides a T D i o l o g m e r i b e r / / function, responds to the dialog boxCs Cancel button, / / restoring the truïsfer buffer to its original s ta te - / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / void TDlgl : :CmCancel( ) C
/ / Restore the transfer buffer- rnemcsy (&transBuf [ch-no? , &oldTxans3ufr sizeof (oldTransBuf 1 ;
/ / Allow the overridden CrnCaricel() function ro execute- TDialog::CmCancel();
1
/ / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / TDlgL : : CmCopy ( ) / / void TDlc1::CmCopyO C
/ / Cons-act the dizlog box- TDialog *dialog = new TDlg2 (this, DIALOG-2 ) ;
/ / Display the dialog box. int result = dialog->Execute ( ) ;
/ / Check whether the user exited the oialog / / box via OK button and display zhe / / new dialog box data if he did. if ( resu l t == IDOK) {
int icogych = atol(copych); memcpy(&transBuf [ c h n o ] , &transBuf Eicopychl ,
sizeof (TTransBuf) ) ; t r a n s B u f [ch-no] , Edit-ChNo [O] = 0x3 0 + ch-no ; TransferData (tdSetDatz) ; Invaliaate ( ) ;
1
/ / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / The TDlg2 Class's implementation.
/ / TDlg2 : : TDlg2 ( ) / / / / T h i s is *e dialog box's constructor- / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / TDlg2::TDlg2(TWindow *parent, TResId resIQ) :
TDialog (parent, resIà) C
T E d i t *edit ; TValidator *valid;
/ / Create an OWL control objecz fo r each control / / element i n the dialog box tha t will pzr t ic ipate / / ir, the t ransfer- Ezlso, attach val idztor objects / / t o edit conrrols that need t o be ver i f i eà -
e d i t = n e w T E d i t ( this , IDC-EDIT-COPYCR, sizeof (copych) 1 ; valid = new TFilterVaLidator("0-3"); edit->SetValidator (valid) ;
/ / I n i t i z l i z e the b ~ f f e r itoa (ch-no, copyzh, 10) ; copychEl] = 0;
/ / Assiqn the dialog box's t r ans fe r buffer- T r a n s f e r B u f f e r = ©ch;
I
/ / / / This f-ction, which overrides a TDialog member / / function, responds t o the dialog box's OR button, / / res tor inç Che tru-sfer buffer to its or ig inal state. / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / void TDlgS::CmOk() C
/ / Restore the t ransfer buffer. memcpy(&transB- i f [chno] , &tramsBuf [ O 1 . sizeof ( T T r a n s B u f ) ) ; / / Allow the overriddea C r n C a n c e l O function t o execute. TDialog: :CmOk() ;
/ / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / TApp : : In i t iYainWindow ( ) / / / / This fw-ction, w h i c h overricies TApolicacion ' s / / InitMainWindow(), crea tes the application's main window. / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / void TApp::IaitMainWindow() C
TFrameWindow *wndw = n e w TWndw ( O , " W a v e f o m Syrrthesis and Output " ) ; SemainWindow (wndw ) ;
/ / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / rnL!%âL?l( 1 / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / int OwlMoin (int , char* [ ] )
/ / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / 1 / WDAQ -3 / / / / 3ead f i l e for mAQ .CP? / / / / W i t t - DY: Weiping X u / / C z r l e t o o University / / Marcb 1997 / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / /
AT-AO-10 hardware coaflwotion
Interrupt Level : G r o u g 1-- level 11
I W23: Row 11
Grou? 2-- level 1 0 1 W24: Row 10
Output golar : C H O - - b i ~ o l a x 1 W'3 : B-C C R I --bigol- W4: A-5 C Z 2 - - 5 i p o l z r W7: B-C CE3 - -b ipokr W 8 : A-3
% define m i E 1 0 0 / / sample rate = 1 EEz / Cl-i=-TJ = 1 0 M z
//-------------------------------------- *defirie SET 0 x 0 1 Bdefine CL= 0 x 0 0 %define ENASLE 0 x 0 1 fdefine DISABLE 0 x 0 0
/ / PC 1/0 Space B a s e Address f o r DAQ Control Registers *define iobase O x O l c O gdefine CFGI iobase + OxOa %define CFG2 iobase t 0 x 0 2 #define CFG3 iobase i- 0 x 0 4 fdefine STATUS iobase + OxOo +define CNTRl iobase + 0 x 0 6 #define CNRCMD iobase t 0x09 Ifdefine F I F O iobase t OxOc
typedef s tmct C
unsigned int CH3-1 : 4; / /Chansel select (0-9) wisigned int DMAEN : 1; / / D m opera t ion enable unsigned i n t DEmQ : 1; / / D m - request unsigned i n t EXTUPDEN : 1; //DAC group 1 update soucre
selectionextemal interrupt 2 enable //(CLE----Sy counter 1; SZT-- by
unsigned i n t GRF2m : 1; //Registers selection unsigned i n t FIFOEN : 1; / / F I F O menory enable
unsignez k t (CLEAEI--1-&mz )
unsigned int ( SER--couter3 )
unsignes inï unsigned unsigned unsigned in t unsigned int
) CE'Gl-CO?%MAND;
typeàef struct i
unsigned unsibed m s lgned uns igned UES igned uns igned unsigned unsignes unsigned unsigned -signed uns iwed unsigned uisigned uns igned
int int int k t int int i n t irit int int kt: int int k t kt
typeàef s truct C
unsigned int urisigned kt: unsi-ed int unsigned int unsigned int unsigned ht unsigned in t unsigned
1 C P C - ~ - C O ~ ~ ;
typedef struct C
unsigned int unsigned int unsigned int unsigne6 kt
} STArnS-VPLF- ;
typedef struct C
unsigned char unsigne6 char unsigined char unsigned char
1) ) C N T R C M D C M D C 0 ~ ;
r n 1 S R C
CET2 SRC
SDATA SCLK OROMEN LDACO LDACS mAc4 LDAC6 LDAC 8 DAC2SO DAC2 S2 DAC2S4 DAC2 S 6 DAC2 S 8 FFRTEN CALLD
BCDSEL MODESEL RWSEL CNT-SSEL
//Cornter 1 soucre select
//Cornter 2 soucre select
//Fox EEPROEl (=CLEXXI //For EEPROM (=CLEPdL) / /EEFROM enble / /Double-bu£ f ered DAC output
/ / (CLEAR--ïmmediately) / / (SET--by z q d ~ t e source) / / / /
//DAC inout data fo-?nat select / / (CLEAR--~WO ' s cornpl-t f o m t //(SET--straignt binary) / / / /
//FIFO restransmit enable //Calibrztion enable (00-no operation)
//DAC channel scan mode enable / /2 - 5V output enable (CH 9 1 //Digital output enable (I/0 0-3 ) //Digital output enable(I/O 4-7) / / R T I Bus dock enable //Onboard dock output enaSle //Dm requeçt mode select (no matter) //reserved, always be cleared-
: 5; //Do~'t care bits : 1; //FIZO aupty : 1; //FIFO Balf-full : 9; //Do=' t care bits
//Bina--y coded dechal select //Cocnter mode select (000-+?ode 0 ) //Read/Write select (01--R/W LSS only) //Counter select (00--select Counrer
153 WDAQ - DEF
/ / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / : / / / / / / / / / / / / / / / / PJDAQ-DEF / / / / Written by: Weiping XIL / / C a r l e t o n University / / M a r & 1997 / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / NAMc WAQ DESCRIPTION 'Waveform ZXETYPZ WINDOWS S T W 'WINSTUB.EXEt CODZ P-3ELOAD M O ~ ~ L ~ DATA PRELOAD M0V"oASLE HEAPSIZE 1024 STACKSIZE 8192
Synthesis '
d' in t-i
C1 P
E *! 'CI a,
$
a, E:
.rl 'CI a 4b
Wef ine *de fine +de fine +de fine Rdef ine +de£ ine +Me fine
ME2a.i.f- l. MENiJ- C POPUP "&Pilen C MEMJITZM " &Newu , CM-FILENEW MENUITEM n&C@eri,-,.", CM-FILEOPEN MSNGTTEM " &Save " , Cb-FILESA?E MENETEN "Save &as. , , a , CM-FILZSAWAS MENUITEM SEPARATO-9 MENUITEM " E&xitn , CM-FILEEXIT
I
POPUP "&Settings"
POPUP "&Run"
POPUP "&HELPU
DIALOG-1 D W O G 29, 37, 267, 210 STYLE DS-MODALrRAME 1 WS-POPUP 1 WS-VISI3LS 1 WS-CA2TION 1 WS-SYSLE3KJ CAPTION "Waveform Settingu FONT 8, " M S Sans Serifn C DEFPUSB3'LTTTON "OR", IDOK, 191, 119, 42, 14, 3S,DEFPr,TS~",rJTTON 1
WS-TABSTOP PUSEBUTTON " C m c e l " , IDCANCEL , 19 1, 141, 42, 14, WS-'TAESTOP PUSHBU-TON "Helpn, IDEIELP, 191, 163, 42, 14, WS-TABSTOP PUSEIBUTTON "Copy" , IDC-COPY, 191, 68, 42, 14 LTEXT a H ~ " , -1, 36, 34, 16, 8 LTEXT "Volt", -1, 77, 34, 16, 8 LTEXT "Deg-", -1, 120, 3 4 , 16, 8
LTFZT " C ~ ~ ~ ~ i L r n , -1, 88, 8, 37, 8 EDITTEXT IDC-DIT-00, 132, 8, 10, 10, ES-IisPd3ON.Y 1 NOT
LTEXT LTEXT LTEXT LTFXT LTEXT LTEXT LTEXT LTEXT L T m L T a T
50, 11, 12 65, 11, 13 80, LI_, 12 95, 11, 12 110, 11, 2-2 125, 11, 12 140, 11, 12 155, II, 12 170, 11, 12
EDITTEXT EDITTEXT ZDITTEZT E33ITTEx.T EDITTEXT EDITTZXT EDITTEXT EDITTEXT EDITTEXT EDITTEXT EDITTEXT EDITTEXT rnI-PExT EDITTEXT EDITTEXT EDITTEXT EDITTEXT EDITTEXT ZDITTEXT =ITTEXT EDITTEXT EDITTEXT EDITTEXT =ITTEXT EDITTEXT EDITTEXT EDITTEXT EDITTEXT EDITTEXT EDITTEXT
1
DIALOG-2 DIELOG 64, 47, 151, 67 STYLE DS-MODALFRPXS 1 WSPOPUo 1 WSJISIBLE / / CLASS "bordlg" FONT 8, "ES S a r s Serif" C DEFPUSEiSUTTON "OKn , IDOK, 31, 40, 36, 14 PUSEBUTTON "Canceln, I D W C Z L , 84, 40, 36, LTEXT "Copy Setting From Channel:", -1, 17, 16, EDITTEXT IDC-EDIT-COFYCH, 115, 15, 12, 11
1
/ / CAPTION " C a r L ibzay Maintenancen
(2) FIRASM
Source Code and Memory Configuration for SIS0 Feedforward Control
Main nle for irnplementlng SIS0 filtered-x LMS aigorithm on
QPCf4OB board and PC/L6IO8 board with online identification for
the secondary path
Assembly code for FIR fiIter, adaptive coefficient update and circular addressing vector renew
Memory c0~~0zuation for DSPC:
circular addressing mode buffer interna1 memory
.text section: intemal memory
.bss section: intemal memory
.stack section: global extemai memory
/ * SIS0 filtered-x X S "/ / * */ / * This c code is used to ir@ern=r filtered-x L?! algorithm * / / * on QPC/BOB bo=d znd PC/16I08 boar.5 with ooline FCatificatior, */ / * for the s e c o n a ~ ~ patfi- */ * Fui.asm has to be linked. */ /* * / / * Written by: Weiping Xu * / / * Carleton 3nivezsity "/ / * Septder 19 97 "/ / * * / / * * * * x * t * * * * X * * * * * t * * * * * * - k * * * * * * * X * t * f * * * * x * * * * * * x * * * * * * * * * * x * * * * % * * / fiinciude " \ds~tools\stdlib-hn Pinclude "math.b" gincluae "intpt40-hm / * Interrupt supporc (Parallel Supgort Lib) */
/ t * * * * * X * t * X * * t * * X f * * * * t * * * * * X * * * * * * * * * * * * * * * * * * * * * * * * * / / * DSOLINK Addresses (1 ws access) */ Bdefine DSPLINK 0~0000100 / * 1 ws * /
/ * DSPLINK Addresses/Registers for OC/f6108 now follow */ gdef ine ADCO ( long* ) (DSPL--0 ) gdef ine ADC1 (longf) (DSPLINK+l) tdef ine ADC2 ( long* ) (DSPLINK+2 ) gdef ine ADC3 (long* ) (DSPLINKi3 )
gdefine DAC0 %define DAC1 +de£ ine DAC2 Pdefine DAC3 Pdefine DAC4 fdefine DAC5 +define DAC6 +derine 9x7
( long* ) (DSPLINK+OxlO ) ( long* ) (DSPLINKiOxll) (long* ) (DSPLINH+OxlS ) (long*) (DSPLINK+Oxl3 ) (long* ) (DSPL-TNKiOxl4) ( long*) (DSPL~+Ox15 ) C long*) (DSPLINKiOxl6) ( long*) (DSPLINK+Oxl7 )
fdefine CR ((unsigned long*) (DSPLIMCtOxl8)) +deCine SR ( (=signed longx ) (DSPLINKiOxl8) ) %define T I m 6 ((unsigned long*) (DSPLINKtOxl9)) gdef ine TIMERî ( (unsigned long* ) (DSPLINK+Oxa) ) Gdef ine PGR ( (unsigned long* 1 (DSPLINRiOxiB) )
$define PSAMPLE 5000
/ * control constants anà global variables */ Pdefine !XA 22 Pdefine NB 21 *define NC 28 +define ND 27 +define MU0 0-01 / * converge coefficient of coxxrol path * / +define M U 1 0 -02 / * converge coef £iciezx of identif. path * / irdefine BO-AED-GAIK 10 %de£ ine SC4LE-FACTOR 2 0 4 8 / * 12-bit scale fzccor '/
float * p t m (float*) Ox002ffd00; / * f i l t e r length must <= 64 * / float *ptrz= (float*) Ox002ffd40; float *ptrx= (float*) Ox002ffd80; float *ptrr= (float*) OxOOSffdcO; float *ptrs= (float*) Ox002ffe00;
floet *ptru= (570att) Ox002f fe4O; f lozt *a= ( f l o a t * ) Ox002fEe80; f loat *b= (ffoat*) Ox002fEec0; f l o a t *,-= (=- &~oas*) Ox002f f f00; f loat *d= (float*) Ox002fffÇO; f loat *CL= (float*) 0~002~ff80 ; f loat *dl= (floot*) Ox002fffcO; volatile float x, e, v; int na, nb, nc, nd, nac, nbc, riad, nba; float muO, ml; / * * * * * t t * * * * * * f * * * t * * * * t * t * * * * * * * t f t * * * Z * * * * * * t * * * * * ~ * x /
volacile int count=O; volacile int interval=O; volatile int à=;
void
int i ; float *ptrO=ptrv;
na=NA; &=NB; nc=NC ; nd=W ; if(= >= if (NB >= if(X9 >= if (BI3 >= muO=MUO ; mul=MUl;
Fnitialize f o r (i=0 ;
global variale */
/ * Set ug che C40 interru~ts */ / * * * r t * * t * * * * * t * f * t * * * * * * * * * ~ * * * x * * * * /
/ * Need to perform an LRCK instrxtion ro allow / * interrupts L a ~ ~ g h to the C40 (for DB4O)
a s m ( asm( " asm ( " zsm( asn ( " asn ( a s m (
* / ocrsn ARO ) ; PUSS Dou ) ; LDI 030~1, AROV; LSH 16, PRO"); SACE; *AROU); POP Don); POP AROm 1 ;
00000000 ci00000000 =Joooooooo ~~00000000 doooooooo . r i 0 0 0 0 0 0 0 0 00000000
ovi 4 C4
O O+- O u 0 Id O O O r-î O U-l
5- \
n
blo i d a c O 0
4 0 Vi - 0 aJ O g * O
r i O cd00
>gE!; 0.
l%n@ g o B X rl
di 0 - Il Il
9, 4$@ 4
H L . w e t-î d G * + rd .ri *ri U w cet
aa \ 4k 4k
/ * S e t up Programmable G a i n A À S * / if (BOAZ!.D-GPJN == 1) *PGX = 0 ~ 0 0 0 0 0 0 0 0 L ; /* G a i c = 1 "/ if (BOARD-GAIN == 1 0 ) *PGX = 0 ~ 0 0 S S 0 0 0 0 L ; /* gai^ = 1 0 "/ if (BO--GAIN == 1 0 0 ) *PGX = OxOOmOOOOL; /'Gain = 100 '/
/* Sec up ~e C o n t z o l Registor f o r Interrupts * / *CR = 0 x 3 0 0 1 0 0 0 0 ; / * %able interrupts - Level Triq y/
1 / * end O f in i t - b o a r d 0 ( 1 * /
/ * */ /* Zunction: c_inc04() --- XT+MS - - - - - - - - - - */ / * * / / t * * * * * f X * t X * * * * * * * * * f f * * * * * * * * * * f * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * /
ïroid c - h t O Ç (void) C
long o u t p u t , i; count++ ; Interval++ ;
if(interva1 > 5 0 0 0 ) { f o r ( i = O ; icNC; i++) c l [il =c [FI ; f o r ( i = O ; icND; itt) 6l[i]=o[F] ; interval=O ;
1
asm ( " . globl FIR" ) ; a s m ( , globl UPDATE " ) ;
/ * (1) get the new x , e, v * / x = ( ( f l o a t ) ("PDCO >> 16 ) ) /SC,9frE_FACTOR; /* reference signal * / e = ( ( f l o a t ) (*ADCI >> 16) )/SCALE-FACTOR; / * error sensor (accel-1
* / v = ( ( f l o a t ) ( * A D C S >> 16))/SCZE-FACTOR; / * e x t . injectedncise
* /
/ * ( 2 ) r=ew XE]*/ a s r n ( " LDL @_ptrx, A R l n ) ; a s r n ( " LDI @,nac, B K " ) ; a s m ( " LDF @ x , EiO") ; a s m ( " LDF 3 - 1 , 1 ; / * dunmy read t o decrease ARI */ a s m ( " STF BO, *mm); a m ( " STI A U , @ptrxn) ;
/ * ( 3 ) C=C-u*(z-eIfV * / a s m ( " LDf @ _ p t r z , AROU) ; o s m ( " LDF *ARO, RI4); a s m ( SUEZ @ e , RI"); a s m ( ?X?YF emul , RI" 1 ;
a s m ( " LDI e-c, ARO"); a s m ( " T;RJfJ UPDATSn ) ; a s m ( " LDI @-ptrv, A m " ) ; a s m ( " LDI @-nc, SR") ; a s m ( " LDI B I , RC");
/ * D=D-u* (2-e) *Z asm( " LDI (2-2, ARO") ;
a s m ( " a s m ( " a s m ( " asrn ( "
/ * (4) renew V[] * / a s m l U LDI a s m ( " LDI a s r n ( " LDF a s m ( " LDF
*/ a s m ( " STF a s m ( " S T I
/ * (5) z=CrV+D'Z a s m ( " L D I a s r n ( " LAJU a s m ( " L D I am(" LDI a s r n ( " LDI
a s m ( " W I a s r n ( " LASU a s m ( " L D I a s m ( " LDI a s r n ( " W I
LAJU UPDATE" ) ; El1 BStrz , AXI" ; LDI @nd, BKU) ; ï Z 3 1 BK, X " ) ;
a s r n ( " POPF a s m ( " ADDF a s m ( " * same AR1 a s m ( " LDF a m ( " STF a s m ( " S T I
a m ( " LDI açm(" IAJü a s m ( " LDI a s m ( " L D I a s m ( " W I
a s m ( " LDI a s m ( " POPF a s r n ( " ADDF a s m ( " * s m e BR a s m ( " LDF a s m ( " STF a s m ( " STI
@ - Q C ~ , .Amrn) ; @,nc, BK"); @,v, ROn}; * - (1) % ) ; /* 6mmy read t o decrease 3x1
" f @ c , I i S O " ) ; FiRn ) ; @pt=, AR1") ; @-nc, B K n ) ; BK, R C " ) ;
RO");
B d , ARO") ; F I R n 1 ; @-ptrz, AR1") ; @,nd, B K " ) ; BK, R C u ) ;
R l " ) ; R1, ROU); & BK " 1 ; *m-- (1) %, mu ) ; RO, " A m " ) ; AEU, @_ptrzn ) ;
* f @-cl, AR0 " ) ; FIR" ) ; @-~tr~, m") ; @ n a c , BKn ) ; @,nc, R C n ) ;
@-dl, mon); SIRn ) ; @-ptrr, -MUu) ; @,nad, B K n ) ; @-nd, RC") ;
a=( " asrn ( " a m ( " a s m ( " a m ( "
a s m ( "
z s m ( " a s m ( " asrn ( " asrn ( " asm( "
a s m ( " csa( " a s m ( " a s m ( " * s m e a s m ( " LDF asru(" STF a s m ( " STI
/ * (7) A=A-u*ekR a s m ( " â s m ( "
asrn ( " a s m ( a s m ( asrn ( " asrn [
/ * 5=%-u*e*S asrn ( " asm ( " a s m ( " a s m ( '' asrn ( "
/ * ( 8 ) u=A'XtBBU a s m ( " LDI
RO") ;
BK " 1 ; *=--Cl)%, XI") ; RO, 'Aill"); A=, B2trs " 1 ;
EU = muOfe */ D I B b , AROu); m UPDATE " ) ; LDI @_~trs , A-.XLn) ; LDI @,Md, BK" ) ; LDI @-&, RC");
a s r n ( " LDI @-b, 3-RO " 1 ; a s m ( " LPJV FIR"); asm ( " LDI @ptru, ; a s r n ( " LDI @,&cr B K n ) ; a s m ( " LDI @-M, R C n ) ;
a s m ( " LDI G-ptru, ARI"); a s m ( " POPF Zn); a s m ( " ADDF R 1 , R O n ) ; a m ( " * same BK ' 1 ; a s m ( " LDF *ARl-- (1) %, RIn ) ; a s r n ( " STF RO, *ARlm);
164 DSP .C
asmln ÇTI
s-d u+v zn6 z to che DAC port * / output= ( long) ( ( *ptru t VI *SCZZ-?ACTOR) ; if ( outmut > 7 0 0 1 output=7 0 0 ;
*DP,CO=output cc 16; *DACI= (long) ( (*ptrz - e) * SC?JLE-FACTOR) IO;
* FIR-ASK * * This is the ~ t s s e w l y co6e f c r TIR f i l t e r =là * adaptive c o e f f i c i e n t update * * It's used t o L i n k to DSP-C t
* Written by: Weiping Xu t Carleton University f September 1997 *
* XESIGSTERS VSED AS INPUT: -0, AR1, BK, * RESIGSTZRS M O D I F I D : RO, R 2 , ARO, $21, RC. * RESIGSTER CONTAINING RESULT: RO * (RU returns to o r i g k a l when BK=EZC) * * * * * * * * * * * * * * * * * t x * * * t * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *
.version 40 FIR -globl FIR
SU31 2,RC FtEDTBD CONV
* - i t i a l i z e RO MP-3 *ARO++(l), *ARl+c(l)%, RO LDc 0 - 0 , u NO0
*
BUD R I 1 ADDF RO,RS, RO NOP NO0
* XSIGSTZRS USZD AS INPUT: R1, ARO , Am, SK * X S S I G S T Z X MODIFI=: ROI RS, ARO, ARl, RC. * (RI ret-s to originzl if SK=RC) * t * * * * * * t * * * f * * t f * * * * * * * * * * * * * f * f f * * * f * * * e * * * * * * * * f f * *
UPDATE . globl VPDATE
SUBI 2 ,RC RD- Ti3D LI0 mYF3 ,a, *ARltt(l)%, RO NOP NO0
BUD a l SUBF3 RO, *AROt STF a, * M O + + NOP
Y
* end UFDATE t
, end
Source Code and Memory Configuration for MIMO Feedfomard ControI
(1) MXLMS33.C Main nle for implementing 3-input and 3-output filtered-x LMS
algorithm on Q P C W board and PC/16I08 board with off-he
identification for the secondary path
(2) MXLMS412.C Main nle for Ïmplementing 12-input and Pourput fdtered-x LMS
algorithm on QPU40B board and PU16I08 board with off-Line
(3) MASM-ASM Assembly code for FIRmR fïiter, adaptive coefficient update and circuZar addressing vector renew
Memory ~onfî~usation for MXLMS33 .C: circular addressing mode buffer: intemal memory
.text section: local extemal me-
.bss section: internal memory
.stack section: global extemal memory
Memoxy confiaauration for MXLMS412.C: circula addressing mode buffer: intemal mernos.
.text section: local external memory
.bss section: gIobal extemal mernory
.stack section: global extemal memory
/ * T h i s c c06e is used t o hplemeEt L'iltered-x LMS a l g o r i t h * / / * OE QPC/403 board a-15 PC/l6i08 board w i t h of f - l ine i d e - r i t i f i c a t i o n x / / * f o r -trie s e c o n d z r y path. / * MASM-PSI5 nzs to be lii?ke6, /" / * W r i t t e n by: Weiping Xu / * Czrleron University
/ * 3 -input/3 -output "/ / * IIR(ID.) /IIR(control) */ / * Off-line ident i f icat ion * / / * r egu lz r LMS */ / * * / / * * t * * f " * * * * f * " t t * * f * f * * ~ X * f f * * /
/ * * / / * (CHOtCHltCH2tCH3) e [ 0 ] */ / * (CH4cCHS+CH&CH7) co e[l] */ / * (CH8+CH9+CIZLO+CHll) t o e [ 2 ] * / / * * / /****************************"*/
/ * * x * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * ~ * * * * * * * * * * * * * * * * * * * * * /
finclude " \ d s p t o o l s \ s t i ! l i b ~ h " f iriclude " r r a t h - 0 " gincluae " i n t p t 4 3 . h " / * Iriterrupt support (Parallel Support Lib) * /
/ * control constar-ts =d global vzriables * / Rrdef ine f def ine f define *de£ ine # d e £ ine # d e i ine + d e £ ine # d e £ ine +!define #de£ ine fdef ine g d e f ine #de fine f de fine *def ine
+ d e £ ine */ #&fine #def ine Me fine
-
M 3 / * charnel numbsr of output * / L 3 / * - - - e r r o r * / ?ai 15 / * length of f L l t e r A * / NS 14 / * ..- B */ NC 15 / * ... C */ ND 14 /" - - - D * / MUOa 0 - 0 0 1 / * converge c o e f f - of c o n t r o l path * / MUOb 0 . 0 0 1 / * converge coeff. of con t ro l path * / Müla 0 , 0 0 1 / * - - - identif. patn * / MUlb 0 - 0 0 1 / * -.. identif. path * / BOARD-GA= 10 SCALS-FXTOR 2048 / * 1 2 - b i t scale factor * / FSAMPLE 2 0 0 0 / * sampling rate i n Hz * / ID-STEP (GO*FSE2MPLE) / * off -1ine identif i c a t z i o n step nun5er * / C N S T E I (2O*FSAMPLE) / * control s t e s n t imber */
BUFF=-MIDR Ox002f f c 0 0 / * first c i rcular buffer locat ion
BUIFFEX-SIZE 16 / * circulzr buffer s i z e */ PI 3 -14159
/ * rnzxiniurn ou tgc t voltage =
/ * t ~ t r t t * * * t ~ ~ t t * ~ t * * * t ~ t t t r t t ~ ~ t f t t * x * * * * * * * * * * * * * * * * * / / * DSPLm A d d r e s s e s (1 w s access) */
/ * DSPLIm Adckesses/Regis~ers f o r PC/I6108 rioiv f o l 1 ow */ Gdefine ADCO ( l ong* ) (DSPLINK+O ) #def ine P B C I ( long* 1 (DSOLïNK+l) grief i n e PDC2 (longx) (DSPLINK+S ) M e f i n e ADC3 [ long* ) (DSILm+3 ) Bdefine ADC4 ( longx ) (DSPLINKf4 ) +def ine mC5 ( long* ) (DSPLINK+5 ) Bdefine ADC6 (long* ) (DSPLSNK+6 ) Mefine ADC7 ( long* ) (DSPLINK+7 ) f d e f i n e ADC8 ( long* 1 (DSPLINK+8 ) +Sef i s e mC9 P '
( long* ) (DSPLINEC+9 ) =ae f ine ADCI0 (long*) (DSPLINK+lO ) %define ADCll (long*) (DSPLINKi-Il) *define PDC12 (long* ) (DSPLiNKf12 } #def ine ADC13 (long* (DSPLïNK+l3 ) adef ine ADC14 (long*) (DSPLINR+l4 ) f d e f i n e ADC15 (long* ) (DSPLINK+lS )
+def ine D X O +def ine DAC1 Bdef ine DAC2 Tdefine DAC3 fder'ine DAC4 gde'ine DAC5 +de f ine DAC6 Xdefine DAC7
( long* ) (DSPLINK+OxlO ) ( long*) (DSPLINH+Oxll) ( long* 1 (DSPLINK+Oxl2 ) ( longx ) (DSPLINK+Oxl3 ) ( long* (DSPLINK+Oxl4) (long* ) (DSPLïNK+Oxl5 ) ( longx) (DSPLiXKcOx76 ) (long* ) (DSPLINR+Oxl7 )
gdef iae CR ( ( w s i g n e d long*) (DSPLIXX+OX~~ ) ) +def ine SR ((unsigne6 long*) (DSPLINKtOxl8)) +def ine TIMERI6 ( (unsigned long*) (DSPLINICcOxlS)) +def ine TIME= ( (unsigned long*) ( D S P L ~ t O x l A ) ) +def i n e PGR ( (umsigned long* (DSPLINKtOxlB) )
/ t * ~ * * * * * * * x * * x * * X " * * * * * * * * * * x * * * * * * - * f ~ * * * * * * * * * * * * * * * * /
/ * function prototypes * * * * * * * t * X * f * f f ~ * * - * . * * t * * * * * f * * * * * . * /
void main(void) ; vo id in i t -var (vo id) ; void init-board0 (vo id) ; vo id c - k t 0 4 (void) ; f l o a t FIR(f loa t* , f l oa t* , k t ) ; f l o a t I I R ( f l o ~ t * , f l o a t * , k t , float*, f l o a t * , i n t ) ; vo id UPDATE ( f l o a t * , f l oa t* , i n t , f l o a t ) ; . . f l o a t * renew-vect ( f loa t* , f l o a t ) ; vo id i d e n t i f ( f l o a t * , f l oa t* , f l o a t * ) ; void c o n t r o l ( f l o a t , f i o a t * , f l o a t * ) ; vo id bandrand ( f l o a t * ) ; f l o a t bandp ( f l o a t , f loa t* , f l o a t * , f loax*,
f l o o t * , f l o e ~ * , f l oa t* , f l o a t * , int);
/ * g loba l variables = / f l o ~ t *ptrx; / * p o i n t e r t o vec tor x f l o a t *ptru [FI ; / * po in t e r s t o vectors u CM] f l o a t * p t m [Mi ; £ l o a t *p t r z [LI ;
/ * Pointers t o v e c t o r s V[M] / * oint ers t o v e c t o r s z CL1 - - -
f l o a t * p t r r f LI [Ml ; / * p o i n t e r s t o vec tors f l o a t *ptrs [LI [Ml [Ml ; /* pointers t o vectors f l o a t A[M] [NA], B [Ml [KI [NB] ; /* adaptive filer A
f loa t C [LI [Ml [NC] , D [LI CL] [ND] ; / * Mode1 C & D */ ff aefine C-New C / * C-New is the cooy of nodel C * / % àefine D-New D / * D-New Is the copy of mode1 D */
volat i le int corrnt=O ; /* step c o ~ z t e r * / volat i le i n t cori,verge=l; / * O -- fiverge * / volatile i n t dul~~fizy; int buffer-size=BUFFEIi-SIZE-1; / * bufeer s ize * /
/ * initialize the mode7 * / fo r (k=O; kc L*MXNC; kct) {
c c 0 1 C O I Ikl=O;
for(k=O; kc L*L*ND; k++) { DCOl COI Ckl=O;
/ * S e t up the C40 inrerrupts */ / * * * * * * * * t * x * * * * * * * * t * x * * * * t * * * t * * * * * /
Need to perform ari IACK instruction to allow extemal interrupts through t o the C40 ( f o r DB4O)
a m ( " PUSH A R O " ) ; asm(" PUSH D P a ) ; a s m ( " LDI 0308 , AROn); asm(" LSE 16, AROU) ; asin(" IACK *AROU); asxn(" POP D P a ) ; asm(" POP AROU);
Set up the C40 processor * / Global diszble o f Lnterrupts * /
INT-DLSrnLE ( 1 ;
Explicitly s e t IVE OE 512 word bo-dary * / set-ivtp((void * ) 0x00310000);
Set I r i t e r r u p t Vector for I I O F l */ install-int-vector ( (void * ) c- in t04 , 0x04) ;
In i t i a l i s e tne multi-channel bozrd */ initboarÜ0 ( 1 ;
Clear penaing ints and enable C40 Inte-mpts for DSPLINK * / duImy = *ADCO;
/ * ON the Cache * / CAC=-ON ( ) ;
açm("stagel NO?"); asrn ( " - globl s tagelu ) ;
/* Process control */ /****t***t"ft*t***f**"**"f******f**********f
control :
initialise the nulti-charinel board */ iniî-bo=dO ( 1 ;
Clear pencing ints and -&le C40 In t empt s àurruny = "ADCO; m ~ ~ L E ( 1 ;
Loos For interrupts -- control * / while ( counc < ( CN-STZP+ID-STEP ) ) ;
a s m ( "stage2 NOP") ; asrn ( " . globI
count = ID-STEP; hie-var ( 1 ; goto control;
for DSFLïbK
/ * * * * * * * f * * X X t X * * * * * * x * * * * * * * * * X t * * * * * * * * * * * * * * * * * " * * f * * * * x * * * * * * * * * * " /
/ * * / / * Function : init-var ( */ / * Purpose: Initialise the global variables (excluce moàel) * / f* */ / * * x * * * t ~ f * * * * * * * * * * * * * * * * * * * * * * * * f X x * * X * x * * * * * * * * * * " * * * * * * * x * * * * * * * * ~ /
void inic-var (void) C
register int l,m,q; register f l o a t *-trO;
/ * initialize the global variables */ for(m=O; mc MfNA; mt+) A[O] [m] =O; for(rn=O; nic M*M*NB; m++) B[O][O][m]=O;
/ * clear each circulas addressing buffers *! ptrO =(floatW) BUTFER-ADDR; for(m=O; IW (L+M+M+L+L*M+LfM*M)*BULF3R-SIZE; m++) *(strO++)=O;
/ * assign address for each circula= ad&essing buffer block * /
pCrO = ( f loar* 1 SUFFZX-EJ3DR; p t r x = p t x 0 ; ptrO += BUFF=-SIZE; for(m=O; mcM; m++) C p t r u [ r n ] = p t r o ; gcrO += BIJFFER-SIZE;} for (m=O; KM; m++) C p t r v [ n ] = p t r 0 ; ptrO += BUFFER-SIZE;) f o r ( l = 0 ; 1cL; I++) { p t r z [LI = p t r 0 ; ptrO += BEFER-SIZE; } f o r ( l = O ; 1cL; ltt)
fo r (m=O; m<M; m++) C g t r r C l ] [ml =ptrO ; ptrO += BUTFZR-SIE; )
f o r ( l = O ; LcL; 1++) for (m=O; mcM; m+t)
for(q=O; q<M; a++) { ptrs [ l l Cm1 Col = p t r O ; 9txO += BUCFER-SIZE; )
1 / * enà o f init-var() * /
/ * * * t * * * * * * * * * * * * * * t * * * * * f * * * * * * * * x * f * * * * * * % * * * x * * * x * * * * * * * ~ * * * * * * * ~ * ~ /
/" * / / * F u r c t i o s : -t-board0 ( ) * / / * Purpose : I n i t i a l i s e -&e Mul t i -Ch-e l -Analog 110 3oard- * / / * * / / * * * * * * * * * * * * * * * * Y f * * * * * * * * * * * * * * * * * * * * * * * * ~ * * x * * * * * * * f * * * * * * * * * * * * * * * / v o i d i n i t - b o a r d 0 (void) { / * C o n t r o l Register - rese t the b o a r d */
*CR = OL;
/ * Clear the DAC input latches */ *DAC0 = 0x00000000; *DAC1 = 0x00000000; *DAC2 = 0x00000000; *DAC3 = 0x00000000; *DAC4 = 0x00000000; *DAC5 = 0x00000000; *DAC6 = 0x00000000; *DAC7 = 0x00000000;
/ * C a l c u l a t e the TIMER V a l u e s * / +define TVAL16 O x O O O l O O O O * (long) (10000000 . O / ( f l o a t ) FSLQLE) ; +define TVAL2 ( l o n g ) (10000000 - 0 / ( f l oa t ) FSPXPLE) ;
*TIiGXL6 = TVALl6; *TmER2 = m 2 ;
/* Set up Programmable Gain -Arnps * / if (BOARD-GAIN == 1) *PGR = 0x00000000L; / * Gain = 1 */ if (BOARD-GAIN == 10) *PGR = 0x00550000L; / * G a i n = 10 * / if (BOLSDSDGXN == 1 0 0 ) *PGR = OxOOPAOOOOL; / * Gain = 1 0 0 * /
/ * Set up the C o n t r o l R e g i s t e r f o r Interrupts */ C R = 0x30010000; /* Enable interrupts - L e v e l T r i g */
/ * * * * X * * * ~ * * ~ * * * * * * * * * * * * X * * * * * ~ * * * * * X * * * * * * * * X * * * * * X * * * * * * * * * * * * * * * * * / / * * / / * Function: c,intOC() --- - - - - - - - - - - / / * */ /* Excute either off-line i d e n t i f i c a t i o n o r c o n t r o t * / / * */ / * * * * * * * * * t * * * * * * * t * * * * * * * * * * * * * * * * * * * x x * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * /
v o i d c-intO4 ( v o i d )
regiscer l o ~ g m, 1, output; reglster f loaz x; regisïer long *=C, 'DAC; fioat e [LI , v[M] , u [Ml , z CL] , AD [TG] ;
ABC = (long*) DSPLINK + O; DAC = (locg") DSfLïlEK + 16;
/ * error
if(co-t c ID-STZP { /*** grocess identification bandrand(v1 ; */ / * create new identif. signal vIOI, v [count*M/ ID-STEP 1 identif (e, v, z ) ;
send u+v =d z to the DAC for(rn=O; mcM; m++) C
/***
port
process
* /
output= (long) ( (u [ml + v[mj 1 *SCALE_FACTOB) ; if(output > =-OUT) (output=MAX-OUT; converge=O; } if(output < -MAX-OUT) {output=-MAX-OUT; converge=O;
output for monitoring tye error * / *DX++=(long) (e[Ol *SCALE_FACTOR)<<16; *DAC++= ( long) (e Cl] * SCALE-FACTOX) <cl6 ; *DAC++= ( long) (e [ 2 1 *SCALE-FACTOR) <cl6 ;
if(! converge) { for(m=O; nie M'NA; m+-) { AC01 [ml *= 0-98;
1
for (m=O; ni< MRM*NB; m++) { BCO] [O] Cm] *= 0.98;
coriverge=l; / * reset converge 1
coLKlt++;
flag
void ideztif (float ef j , float v[] , floot z C l )
register int 1, rn, q;
( il) C=C-u* (z-e)*V */ for(l=O; 1<L; I++)
for (m=0 ; m<M; IR++) UPDATE(C[l] [ m l , pt=[rnI, NC, M U l a * ( * p t r z [ L ] - e l 1 1 1;
D=D-ux (z-e) *Z */ for( l=O; I e L ; IL+)
for(q=O; wL; q+c) UPIXTF, (D [Il Cal , p t r z [ql , ND, MUlb* (*ptrz [l] -e [l] ) ) ;
for(m=O; m<M; m++) z i l ] += FIR(C[ll [ m l . ptrv[m]. NC) ;
for(q=O; qct; qtc) z C l ] += FIRiDCl] [q] , ptrz [q] , ND) ;
) /*** end of identif ( ) ***/
/ * * X * x * * i * * * * t t * t * * t * * * * * * * * * * x * x * * * * * * ~ * ~ * * * * * x * * * * * * * * * * * x * * * * * * * * * * /
/" * / /* Functioz: control ( ) --- control ( ) , called i-? c-int04 -- * / / * */ / * pass in: x, eC1; r e t u r n : u[l * / /* pass out: u[I * / / * modify: gt=, 'ptrx, A[] , B [] . ptrr, * P ~ ~ I T , PtSS r *ptTSr D t m , * o t ~ u "/ / * * * * * * * x * * i * * * * * * X * * X X * * * X * * * * * * t * * * t * * x * * x * ~ ~ x * * * * * * * x * * * * * * * x * x * * * * /
Goid control ( f loat x, f l o a t e [ I , float u [ ] 1
register int 1, m, p, q, new-offset; f l o a t r CL1 [MI , s CL1 CM1 CM1 ;
/ * (c-1) renew X I I * / new-offset = ( i n t ) ptrx; ptrx = renew-vect (ptrx, XI ;
new-offset = ( i n t ) ptrx - new-offset;
for(rn=O; ;ncLfM; m+t) { ptrr [O 1 [ml += new-of fset; *ptrr[Ol [ml = r[O] [ m l ;
1
for(p=O; pcL*MfM; pi+) { ptrs 101 COI [pl += new-offset; *pt= [O1 101 [pi = s COj [O1 [pl;
> / * (c-3) A=A-u*etR * /
for (m=0; m<M; m+-) for(l=O; 1cL; Itt) UPDATE(ACrn1, gtrr[l] [ml, NA, MlfOaXe[I]);
/* B=B-u*e*S */ for(m=O; m a ; m++)
for (p=Q; gcM; p++) for(l=O; l < L ; l++)
LTDATE (3 hl [pl , ptrs [ll [ml [pl , NB, MUOb*e [l] ) ;
/ * (c-4) u=AIX+B'U "/ for (m=O; meM; m++) {
u [ml =FIR(A[rnl , ptrx, NP,) ; for (p=O; p c M ; p++)
u [ m J += FIR(B[ml [pl, grruCp1, NB); 1
for (m=0; m a ; m++) { ptru [ml += new-of f set; *ptru[m] = u[m] ;
1
)/*** end of control0 ***/
/ * * / / * Function: void bandrand(f1oat v [ M ] ) * / / * c reat bandpass randorn series * / / * 5-order chebyl filter * / / * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * x * * * * * * * * * * * * x * * * * x * * * * * x * /
$defirie N-5 5 / * b=@ass f i l t e r Lengtk */ void bmdrmd(flozt v [ ] ) C regis t e r in t i; regis t e r E l o a t vO ; scaïic f l o a t x[3*M] [N-bill ;
scatic floot F a l [ J = { / * low-pass (cbebyl) --7s EZ at S - Bate=SK * /
1,584668002951872e-005, 7,923340014759381e-005, 1 -584668002951872e-004, 1.584668002951872e-004, 7.923340014848179e-005, 1,584668002946321e-005);
static f l o a t F b l [ l = C 1~000000000000000e+000 ,
-4,238025415356931ei000, 7,234387754532702et000,
-6,212493503386992e+O0O8 2.682125465757414et000, -4.654872077852484e-001);
static f l o a t Fa2 11 = { / * hi&-pass(cheby1) 55-- Xz at S. Rate=2K */
7.557783380035952e-001, -3 -778891690017976e+000r
7-557783380035954e+000, -7,557783380035952et000,
3 -77889l690017976etOO0, -7-557783380035952e-001);
static float Fb2 [ ] = { 1 ~ 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 e t 0 0 0 ,
-4 ,441048699933009e+OOOr 7,917234373734317ec000,
-7, 080144881564633e+00OI 3-175277964701L76e+000,
-5,712008961819109e-001);
if(!cotn~) { for ( i = 0 ; i c 3 *M* (N-b+l) ; it+) {
x[Ol [ i l = O ; 1
f o r ( i = O ; i < M ; i + + ) C v O = ( ( f l o a t ) r a n d ( ) /R.EJ-MFX - 0 - 5 ) ; v [ i ] = b a n d p ( v 0 , x [ 3 * i ] , x [ 3 * i t 1 ] , x [ 3 * i i 2 ! , Fal, F b l , Za2,
Fb2, N-b) ; 1
1 / * end of bandran6() * /
/ * * * * * z * * * * * * * * * * * * * * * * * * * * * * ~ * * * * f x X * X * * * * * * * * * * * * * * ~ * * * * * * * * * z * * * * * * / / * MIMO filtered-x LYS * / / * * / / * This c coae is used CO kplement filterea-x LMS a l g o r i - h * / / * oz QoC/bOB board and PC/16108 board with o z £ - l i n e identification*/ / * f o r the secondz-y path- * / / * masm. asm iras t o be linked. * / / * "/ / * W r i t t q n b y : W e i p i n g X u "/ /* C z r l e t o n Eniversity "/ / * D e c h e r 1997 * / / * / * * f * * t * * * f * * * * * *+ t * * * * f * * * f * * * *
"/ /
/ * l S - i n p u t / 4 - 0 u t p u t "/ / * IIR(ID - 1 /FIR(corr t ro l ) */ /* Off -Une identification */ /* S i m L i f i e d LtMS * / / * * / /****t**t*t************************f***f**************************"** / g i n c l u d e n \ d s p t o o l s \ s r d l i b - h " Xnclude "mach-hm g i n c l u d e " i n t p t 4 0 . h " / * Incerrupt s u p p o r t (Paralle1 Support L i b ) * /
/ * control constants and global variables */ fdefine M 4 / * channe1 number of output */ ifdefine L 12 / * - - - e r r o r * / +define NA 15 /* lewth of f i l ter A */ +define NC 15 / * - - - C * / B d e f U l e ND 1 4 / * -.- D * / B d e f i n e MUOa 0 , 0 0 1 / * converge c o e f f - of c o n t r o l path * / # d e f i n e mla 0 . 0 0 1 / * - . - ident i f , path * / +define MJlb 0 . 0 0 1 / * - - - ident i f . path * / Gdef ine BOARDARDm 1 0 +define SWE-FACTOR 2 0 4 8 / * 1 2 - b i ~ scale f a c t o r * / %define CSAMPLE 1 8 0 0 / * sampling rate i n 3z * / B d e f i n e LD-STEP (GO*FSAMPLE) / * off- l ine i f i e n t i f i c a t i o n stes n u m b e r */ %define CN_STEP (6O*FS,AMPLE) /* control scep nUIlLber * /
+de£ i n e BIFFER-33DR 0x002 f f 9 0 0 / * £irst circular buffer l o c a t i o n */ g d e f ine BüZFZR-SIZE 1 6 / * circular buffer size * / # d e f i n e P I 3.14159 %define MAX-OUI 1 0 0 0 /* maximum output voltage = MAX-0UTf10/2048 */
/****************************************************** / / * DSPLINK Addresses (1 w s access) */ *define DSPLINK 0x30000100 / * 1 ws */
/ * DSPLINK A d & e s s e s / R e g i s t e r s for P C / 1 6 1 0 8 now f o l l o w * / #define EDCO ( l o n g * ) (DSPLINKtO ) drdefine ADCl ( l o n g * ) (DSPLINKt l ) +define ADC2 ( long* ) (DSPLINK+2 ) Mefine ADC3 (long* 1 (ZlSPL-NKi3 ) # d e f i n e ADC4 (long* ) (DSPLINK+4 ) %define ADCS (long* ) (DSPLINK+S ) +define ADC6 (long*) (DSPLINEC+6 1 Rdef ine ADC7 ( l o n g * ) (DSILïNX+7 1 adef ine AûC8 (long* ) (DSPLINK+8 )
#define ADC9 ( l o n g * ) (DSPLïBKt9) +define ADCI0 ( l o n g * ) (DSPLIIüXtlO) # C e f i n e m C l l ( l o n g * 1 ( D S P L T N K t l l ) fdefine ADC12 ( long* ) (DSFLïNK+12 ) fdefine ADC13 ( l o n g * 1 (DSPLINK+13 ) %define ADC14 ( l o n g * ) (DSPLINIC+lb) #de£ ine -9DC15 ( long* ) (DSPLINK+lS )
fdefine DAC0 #defice DAC1 GÜef ine DAC2 fàefine DAC3 # d e f i n e DAC4 dreefine DAC5 fdefine DAC6 füefine 3 x 7
( l o n g * ) ( D S ~ L ~ + O x l O ) ( l o n g * ) ( D S P L I l X + O x l l ) ( l o n g * ) (DSFLINK+OxlS ) ( l o n g * ) (DSPLïNK+OxI3 ) ( longf ) (DSPLïlEI+Ox14) ( l o n g * ) (DSPLINK+OxlS ) ( l o n g * ) (DSPLWK+Oxl6) ( l o n g * ) (DSFLm+Ox17 )
%de£ ine CR ( ( u n s i m e d l o ~ g * ) (DSPLINK+Ox78 ) ) fdef ine SR ( (unsigried long*) (DSPLINKtOxl8 ) ) fdef ine T=6 ( ( u n s i g n e d long*) (DSPLINK+Oxl9 ) ) fdefine TIMER2 ( (unsigne5 l o n g * ) ( D S P L I N K i O x U ) ) +define PGR ( ( u n s i g n e d long*) (DSPLINKiOxlB) )
/ * eunction prototypes * * * * * * * * * f * * * * * * * * * X * X ' i t * * * * * * * * * * * /
void m a i n ( v o i d ) ; vo ià init-var (void) ; void i n i t - b o a r d 0 ( v o i c i ) ; void c - i n t 0 4 (voidl ; f l o a t FIR ( f l o z t * , f loat* , in t ) ; f l o a t I I R ( f l o a t * , f loaï*, in t , f l o a t * , f loa t* , i n t ) ; void UIDATE(float*, f loa t* , ht, f l o a t ) ; f l o a t * r e n e w - v e c t ( float* , f l o a t ) ; void identif ( f l o a t * , f l o a t * , f l o a t * ) ; void c o n t r o l ( f l o a t , f loa t* , f l oa t* ) ; void b a n d r a n d ( f l o a t t ) ; f l o a t b-dp ( float, f l o a t * , f l o a t * , f l o a t * ,
f l o a r * , f l oa t* , f l o a t * , f l oa t* , i n t ) ;
/ * x t f f t * * * t * x x ~ * * r t * * t . i r * * f t * * f f * * t * * t * * * * * * * * % * * * * * * * * * * * * * * * * * * * * * * * * /
/* global v=iables " / f l o a t *ptrx; / * pointer t o vector x */ f l o a t *p tru [MI ; /* pointers t o vectors u[M] */ f l o a t * p t n [Ml ; / * pofnters t o vectors v[M] "/ f l oa t *ptrz [LI ; / * pornters t o vectoxs z [LI */ f l o a t *ptrr [LI [MI ; / * pointers t o vectors r [LI CM] * / f l o a t A [Ml [NA] ; /* adaptive f i le r A */ f l oa t C [ L ] [M]CNCl. DfL][NDf; / * Xodel C & D * / + define C-New C / * C-New is the copy of m o d e 1 C * / F define D-New D / * D-New is the copy of m o d e 1 D * /
vola t i l e i n t cour-t=O ; /* step couriter */ vo la t i l e int converge=l; / * conveger flag ( O -- diverge) */ volat i le int Ü u n n n y ; int buffer-size=BUFFEX-SIZE-1; / * buffer s i z e * /
C r eg i s t s r int I,rn,k;
/* i r i i ~ i z l i z e the rnoaol */ f o r ( k = O ; k-c LxM*NC; k++) {
CC01 [O] [ k ] = O ; 3
/******** cogy mod-el from the i n i t i a l one if it is giv= ***"*/ / *
for( l=O; le L; Itt) { for (m=O; mc M; m+-) {
f o r ( k = O ; kc NC; kt+) { CC11 Iml Ckl=CO Cm1 Cl1 ikl ;
1
f o r ( l = O ; le L; lt+) { f o r ( k = O ; kc ND; k++) { D fil [k]=-DO [Il [k] ;
1
/ * Set up the C4a h t e r r u p t s * / / ~ * * * * f * * * t * * * t t * ~ * * * * * t X * * * * * * * * - * * * * /
/ * Need to perform an ïACK instruction ro allow externol / * interrupts tfirough to the C4O (for DB40)
a s m ( " PUSH AROn ) ; a s m ( " PUSE D o n ) ; a s m ( " LDI 030H, AROn); a s m ( " LSX 16, = O n ) ; a s m ( ' IACK *AROn ) ; asrn(" POP D o n ) ; a s m ( " POP A R D U ) ;
/ * S e t up the C4O processor / * Global disable of interrupts
INT_DISABLC ( ) ;
/ * Exgdicitly sec IVTP on 512 word boundary * / set-ivrp((voi6 * ) 0 x 0 0 3 1 0 0 0 0 ) ;
/ * Set Interrupt Vector for IIOFl * / install-int-vector((void "1 c i n t 0 4 , 0x04) ;
i* -able IIFOl to be level triggered int, */ load-iif ( CxOOBO) ;
/ * Initialise the multi-channel board */ init-boord0 ( ) ;
/ * ON the Cache */ CACIrlZ-ON ( 1 ;
/* Pxocess off-lioe iaentification "/ / * * * * t * * * * * * * * * * * t * * * * * * * * * * * t * * * * * * X f t * ~ * * / / * Loop for interrupts -- * /
while(count c ID-STEP); INT-DISABLE ( ) ;
asm("scage7 NOPn); asm ( " - globl stageln ) ;
/ * Process control * / / X * X X t * i * t ~ * t f t * * * f * t * * * i * * * f f * ' ~ t * * * * * ~ * * e ~ * /
control : /* Initialise the multi-charme1 board */
init-board0 ( ) ;
/ * Clear pendhg ints and enable C40 Interzupts fcr DSPLLNK */ dummy = *-Co; I N T _ m L E ( 1 ;
/ * Loop for in terru~ts -- control * / while(count < (CN_STEP+ID-STEP) 1; INT-DISABLE ( ) ;
asn( "stage2 NOP" ) ; a s m ( " ,globl stageSn);
count = ID-STEP; kit-var ( ) ; goto control;
/ * end of min!)
/ * * X * * * X t * * * * * * * * t * * * * * * t * * t * * * * * * * * * * * * * * * * * * * % * X * * * * * * * * * * * * * * * * * * * * /
/ * * / / * Function: init-var() * / / * -Purpose: Initialise the global vzziwles (exclude model) * / / * * / / * f * * * X * t f t X * x * * * * * X * X * * f X * * * t ~ * * * x * * * * * x * * * * * x * " * * * * t * * * * * * * * * * * * * x * * / void init-var (void)
register int l,m,k; register f loat *ptzO ;
initialize the global variables
clear each circular addressing ptrO =(float*) BUFSER-ADDR;
buf f ers
for (k=0 ; kc ( l+MiMtL+L*H) *BUFFER-SIZF:; k+i) * (ptr0ti) =O ;
/ * asslgn address for each circular azdressing buffer block */ ptrO =(float*) BUFFER--DR; ptrx = ptr0;
for(l=O; 1cL; I++) { for (m=0 ; mcE; ru++ ) { ptrr [Il [ml -trO; p t r O += BLFFLR-SIZE;
/ * k * f * f * * * * * * * * * X * * * t * * * * * * * " * * * * * * X x X * * * * * " * * * * * * * * * * * * * x * * * * * * * * * * * * /
/* * / / * Function: init-boord0 O "/ / * Purpose: Initialise the Multi-Charinel Analog 110 Board, * / / * " / / * * * * * * X * * * * * X * * * * * * X * * * * * * * t * * * * * % * * * * * * * * * * * * * * * * * * * * " * x * * * * * * * * * * * * /
void init-board0 (void) { / * Control Register - reset the board * /
*CR =OL;
/ * Clear the DAC mut latches * / "DAC0 = 0x00000000; *DAC1 = 0x00000000; *DAC2 = 0x00000000; *DAC3 = 0x00000000; *DAC4 = 0x00000000; *DAC5 = 0x00000000; *DAC6 = 0x00000000; *DAC7 = 0x00000000;
/ * Calculate the TIMFJi Values * / +define W U 1 6 0x00010000 * (long) (10000000.0 / (float) FSAMPLE); #define TVAL2 (long) (10000000.0 / (float) FS-AMPLE) ;
*TRIIE-916 = TVAL16; *TIMERS = TVAL2;
/ * Set u~ Progr-le Gain F I S */
/ * Set up the Control Register for Interrupts "/ *CR = 0x30010000; f X i%mble iriternqts - Level Trie * /
) / * en6 of hic-boarci00 * /
void c-int04 (void) C
r e g i s t e r long m, 1, output; DL x; register £10-'
r e g i s t e r long *-ADC, *DAC; float e [LI , v [ M l , u [ M ] , z [L] ,
F3C = (long*) DSPLWK + 0; DAC = (longf ) DSPLINZK + 16;
/ * get tlhe riew e r r o r & x * / for(l=O; 1x16; l+t) {
m[11 = ( ( f l o a t ) (*ADCt+ sensor (accel- ) * /
/ *** grocess c rea t e random I D
icie~tif i c a t i o n simal v [ M ] * /
send u+v t o the DAC p o r t * / for(m=O; mcM; m++) C
output= (long) ( (u [ml + v[m] ) *SCALZ-FACTOR) ; i f ( output > F4X-OUT) {0utput=F4X~OUT ; converge=O ; ) i f ( output c -MAX-OUT) {output=-MAX-0-UT ; converge=O ; *DAC++=output << 16;
1
e r r o r
if ( ! converge) {
for(m=O; mc E*NA; nit) { ALOI [ml *= 0-98;
1 converge=l; / * rese t converge flag * /
1
1 /*** end of c-ict04() ***/
/* */ /* Functio~: ident i f ( ) -- id--tificatioli, called in c-inc04 -- */ / * "/ /* pass in: e[], v[] "/ / * pass out: z [ ] */ /* m o d i 5 y : ptrv, *ptrv, C C l , D [] , strz, "ptrz */ / * * * f * * * * * * f x * k * * X * * * * * X X k X * * * * * t * * * * * * * * * * * x * * * * * * * * * * * * * * * * * * * * * * x * * /
void idemif (float e[] , f loat v[] , f l o a t z 11 ) €
register int 1, EL;
/ * (i-1) C=C-uf (z-e) *V */ for(l=O; 1 c L ; lt+) {
for(m=O; mcM; m+c) { UPEATE(CCl1 lm], ot=[rnl, NC, MUla*(*ptrz il] -el11 ) ) ;
1 1
/ * D=D-u* (z-e) *Z * / for(l=O; 1<L; lt+) {
UFDP-TE (D [l] , ptrz [l] , ND, MUlb* (*ptrz [l] -e [l] ) ) ; 1
/ * (i-2) r e n e w V[] "/ for (m=0; mcM; m++) f
ptrvlrnl =renew-vect (ptmrn] , v[m] ) ; 1
/ * ( i - 3 ) z=CtV+D'Z * / for(l=O; 1cL; lt+) {
z cl] = FIR(D [l] , ptrz [l] , ND) ; for(m=O; mcM; m++) { z [LI += ZIB (C [l] Cm] , ptrv [ml , NC) ;
1 ptrz Cl1 =renew-vect (ptxz [Il , z [l] ) ;
/* * / / * Function: control() --- concrol( ) , called in c-int04 -- * / / * * / / * pass in: x, el] * / / * pass out: u[I * / / * modify: ptrx, *ptrx, A [ j , ptrr , *gtrr, ptru, *ptxu */ /************************************~********************************/ void contxol ( f loat x, f loat e Cl , f loat u [ 1 )
reçister Lnt 1, m, new-offset; r eg i s te r f l o a z rlm;
/ * (c-1) renew X [ j */ new-offset = ( i ~ t ) ptrx; ptrx = r e n e w - v e c t ( g x r x , x) ; new-offset = (int) ptrx - new-offsec;
/ * (c-4) u=~'X * / f o r ( m = O ; m<M; mti-) {
u[m]=FIR(A[m], pt=, KR); pt- h l += new-of f set; *ptru [rnj = u [ml ;
1
} / *** end of conrrol0 ***/
/ * * * * * * * * * * * * * * * * t t * * * * * f * * . * f * * * * * * * * t X * * ~ * " * * * * * * x * * X * * * * * * x x x * * * * * * * /
/ * * / / * Function: v o i s PandranC(f1oat v [ M ] ) * / / * creat bandpass r a r i d o m serles * / / * 5-order chebyl f i l ter * / / * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * t * * * * * * * * * * * * * * * * * * * * * * *x *%* * * * * * /
#define N-b S / * bandpass f i f t e r length * / voie bscniirand(f1oat v[ ] ) i: register kt i; register f l o a t vO; static f loat x [3*M] [N-b+l j ;
static f l o a t Fa1 C l = ( K */
static f l o a t FblC] = { 1,000000000000000e+000.
-4 - 6lI431264562694eW, 8,593382924706830e+O0Or
-8,084943286325208e+000,
static float Fa2 [ 1 = { Rate=1,8 K */
6.742587469515223e-001, -3 - 37lS937347576I3e+OOO ,
6,742587469515229e+000, -6.742587469515229e+OOO ,
3,371293734757615et000, -6-742587469515232e-OOL);
static f l o a t Fb2 [ 1 = { 1~000000000000000e+000 ,
-4,228406763519255et000, 7,185226208367957et000, -6.118445961615839e+000,
2-603412815520780e+000, -4.407881534248717e-OOL);
} / * end of bandrand() */
* MA%-ASM * * This is the assembly coàe for F I W I I R filter, * adaptive coefficient updzce a d v e c c o r - r e n e w , * ït ' s csod to l ink CO tbe MXLLYS33, C or =S4l2 - C f
" Written by: Xeiping Xu x Carleton U n i v e r s l c y YK DecemDer 1 9 9 7 *
. version 40 ZD .. - ,set AR3
. globl -bu2 f e r - s i z e
* TITLE FIR FILTER * * * * t * f t * * * * * * * * * * * * x * * * r * * * x * * * * * * * * * * * * * * * * * * * * * * * * *
* SUBROUTIXE FIR * t EQUATION: y(n)=A(O)*X(n)tA(l) *Xb-l)+- - it +A(N-1) *X(n- (N-1) ) * * Buffer s ize of X = -buffe,r_size * t t X t i * t * x t * X X X * t * X * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * ~ *
* float FIR(f1oat *Ar float *X, inc NA) * t ARGUIENT 1 FUNCTION * ----------I---------- * f 2 1 ADDEESS OF A(0)
ADD-RESS OF X (n) ( c i r cu la züdressing) * NA LEXGTB Of FILTER A (N-9 <= _buffer-size) * y (n) 1 Retu2-n Value in RO * * * * X t * t * * * * R * t * * * * * * * * * * * * * * * * * * t * * * * * * * * * * * * * * * * * * * *
. globl -FIR ,FIR:
PUSH FP LDI SP,FP LDA *-FP(2), =O LDA *-FP(3), IL;U LDI *-FP(4), RC LDI @-buffersize, BK
SUE1 2,RC -T3D FIROl
* Initialize RO M o m 3 *ARO++(ll, *ARL++(l)%r RO LDF 0-0, 32 NOP
FIROl MP-3 *ARO++(I), *AR1++(1)%, RD I I ADDF3R0,1iSrR2
ADDF RO,R2,RO ; Recurrn Value F I R - r e t m :
LDI *-FP(l).Rl BD IU LDI *FPrFP NOP SUBI 2,SP
.*** B RI ;BANCH OCCURS
SU3XOUTINE I I R
i Buffer size of X&Y = ,buffer-size * * * * * * * * * * t * t * * * * * * * * * * X * * * * t * ~ * * * X * * * * * t * * ~ * % * X * * * t * *
* float IIR(float * A r float *Xr i n t NA, float '3, float *
- IIR PUSH FP LDI SP,E'P IDA *-FP ( 2 ) , =O L A *-FO(3), Ai31 LDI *-FP(4), RC L D I @-buf f e ~ s i z e , SIC
SUBI 2,xc RPTBD IIROl
Initialize RO 3
LDF NO0
LDA LDA m i
su31 RPTBD
* Initialize RO MP-3 *=O++(l), NO0 NOP
"Y,
1 I R - r e t m : LDI *-FP{l).Rl BD Rl T *FP,FP NOP .Sm1 2. SP
*+* 3 RL ;SANCE O C C W *
* 3uffer size of X = ,buffex-size **********t******r*******************ft***************
* vo id UPDATE(f1oat *A, float *XI inr; X, f l o a t k) *
* * * * * * * * * * * ~ t * * * * * * ' * * * * * * * * * * t t * * * * * * * * * * * * * * * * * * x * * * t
- g lob l -UPDATE -UPD,9TE :
FUSH FP LDI SP,FP LDA * -SP(2 ) , AR0 LDA * -FP(3 ) , AR1 LÛT *-FP(4), RC LDF *-F0(5), R1 LrDI @-buffer-size, BR
SU31 2,RC =TBD 'UPD0 1 M E T 3 F U , *AU++ (1) %, RO NOP NO0
mYF3 -51, *ARl+i(L)G, BO 1 1 SIBF3 RO, *ARO. R 2
U o D O l ST? R 2 , *=O++ S'VBF3 RO, *=O, R 2 STF R2, *ARO++
UPDAT-re t- : LI31 *-FP (1) ,-3-l BD EU LDI *FP,FI NO0 SUBI 2,SP
* FUNCTION DEF : -renew-vect * X= [ x , X(1:n-1) ] *
Buffer size of X = ,buffer-size * * * * * f X * * X X * * * * * * * * * * * * t * * * * * * * * * f * * * * * * * * * * * * * * * * * * * *
* f t o a t * renew-vect(float *X, float x); *
* ----------I---------- * PDDRESS OF X ( 0 ) ( c i rcu lu addresshg) * x New x * *X *X 1 Ret- Value i~i, RO (new adüress of X ( O 1 * * * * * * * * * * * * * * * * t * * X * X * * * * t * * * * f * * * * * x * * u * * * * * * * * * * * * *
- globl ,I-enew-vec t -renew-vect:
PUSH FP L9I LDA LDF LDI LDF STF m1
r-v-ret- : LDI BD LDX NO0 SUBI
*** B
SP, FP *-FP(2), M O *-FP(3), RO (2-buffersize, BK *=O--(1)%, E U ; dumny read to decrease the AR0 XO, *AR0 ARO, RO ; Return V a l u e
* end renew-vect *
* FUNCTTON DEF : -bandp *
* zO=ha [O] *y[n] +c [ I l *y[=-11 i- . - t c [n) *y[O] je -d[l] * z ln] + . . . + d[n] * z [l] * * pass in: xO; * pass out: z O ; * modiSr= xC1. y [ ] , z [ l ; ************************************************************ * float bandg(f1oat xO, float x [ ] , float y [ ] , float z [ ] , * float a l ] , float b[], float CC], float d[], i n t ri) * * =GUMENT 1 FUNCTION
PUSH LDI OUSE PUSE PUSX PUSH
LDF LDI L D I LDA D A LDA CM01 BLE LDA ADDI RPTB Dr" STF
ADDI STF mYF C D 1 BLS ADDI LDA ADDI SUBI ADDI ADDI RPTB MPm ADDF MPYF SUBF CEPI BLZ LDA P D D I R-PTB LDF STF
ADDI STr" mA MPYF C E 1 BLE ADDL LDA ADDI LDA ADDI SUBI
IIUrR3,ARS *xLo, '*LE R10,*AR6,R9 O, I R 1 L I 2 IRi, R2 ,AR4 *-FP(7) ,ARS ARS, 1,,xR5 1,ARSrARS l,AR6,AR6 IFZ, -1,RC L24 *A&?--, 'AR6++, RO RO , R9 *FX4--, "AR5e4, RO RO ,R9 0,IRI L12 R 2 . m TRI, -1, RC L2 3 *+m (1) ,EU0 RIO, *ARS++
m D I =TB mw ADDF M P F
L22: S r n F CMaI B E LDA ADDI -TB LDF
L21: STF L20:
STF LDF
bandp-re tu= : LDI *-FP(l),Rl LDI *FP,FP POP Ax7 POP -6 BD R1 POP AU POP =4 SUBI 2,SP
*** B R1 ;BRANCX OCCURS * * end bando *
. end
IMAGE EVALUATION TEST TARGET (QA-3)
APPLIED - IMAGE. lnc - - 1653 East Main Street - -. , - Rochester, NY 74609 USA -- --= Phone: il 6/482-0300 -- -- - - Fm: 71 61288-5989
O 1993. Applied Image. Inc. ,411 Rights Resenred