Real-Time Signal Processing: Implementation and Application.

53
Real-Time Signal Real-Time Signal Processing: Processing: Implementation and Implementation and Application Application

Transcript of Real-Time Signal Processing: Implementation and Application.

Page 1: Real-Time Signal Processing: Implementation and Application.

Real-Time Signal Real-Time Signal Processing: Processing:

Implementation and Implementation and ApplicationApplication

Page 2: Real-Time Signal Processing: Implementation and Application.

Contents:Contents:

What does real-time signal processing What does real-time signal processing mean?mean?

Why use real-time signal processing?Why use real-time signal processing?

Platforms for implementationPlatforms for implementation

Implementation on Texas Instruments Implementation on Texas Instruments C6711 DSPC6711 DSP

Applications (concentration on biomedical)Applications (concentration on biomedical)

Page 3: Real-Time Signal Processing: Implementation and Application.

Real-Time Signal ProcessingReal-Time Signal Processing

Ability to collect, analyze, and modify Ability to collect, analyze, and modify signals in real-timesignals in real-time

Real-Time: As these signals are occurringReal-Time: As these signals are occurring

In other words, we want to analyze and In other words, we want to analyze and process signals while collecting them, not process signals while collecting them, not at a later time.at a later time.

Signal

Real-TimeSignal

Processor

Refined Data

Page 4: Real-Time Signal Processing: Implementation and Application.

Contents:Contents:

What does real-time signal processing What does real-time signal processing mean?mean?

Why use real-time signal processing?Why use real-time signal processing?

Platforms for implementationPlatforms for implementation

Implementation on Texas Instruments Implementation on Texas Instruments C6711 DSPC6711 DSP

Applications (concentration on biomedical)Applications (concentration on biomedical)

Page 5: Real-Time Signal Processing: Implementation and Application.

Why Use Real-Time ProcessingWhy Use Real-Time Processing

Conventional methods:Conventional methods:Data collected at some locationData collected at some location

Once all of data is collected, it then has to Once all of data is collected, it then has to be processed in order to have usable be processed in order to have usable informationinformation

Quite frequently, data is collected and Quite frequently, data is collected and processed in two separate locationsprocessed in two separate locations

Collector

Signal

Raw Data ProcessorRefined

Data

Page 6: Real-Time Signal Processing: Implementation and Application.

Why Use Real-Time ProcessingWhy Use Real-Time Processing

Results:Results:Time and money lostTime and money lost

Possibility of different machines to do Possibility of different machines to do collecting and processingcollecting and processing

Possibility of even different Possibility of even different organizations/companies doing collecting organizations/companies doing collecting and processingand processing

Page 7: Real-Time Signal Processing: Implementation and Application.

Why Use Real-Time ProcessingWhy Use Real-Time Processing

Real-Time Method:Real-Time Method:Data is Data is collected, analyzed collected, analyzed andand processed processed all in all in one locationone location, on , on one machineone machine

Signal

Real-TimeSignal

Processor

Refined Data

Page 8: Real-Time Signal Processing: Implementation and Application.

Why Use Real-Time ProcessingWhy Use Real-Time Processing

Results:Results:No cost of money or time on movement of No cost of money or time on movement of datadata

No cost of separate machines to collect No cost of separate machines to collect and processand process

Ability to produce results much faster Ability to produce results much faster

Page 9: Real-Time Signal Processing: Implementation and Application.

Contents:Contents:

What does real-time signal processing What does real-time signal processing mean?mean?

Why use real-time signal processing?Why use real-time signal processing?

Platforms for implementationPlatforms for implementation

Implementation on Texas Instruments Implementation on Texas Instruments C6711 DSPC6711 DSP

Applications (concentration on biomedical)Applications (concentration on biomedical)

Page 10: Real-Time Signal Processing: Implementation and Application.

Platforms for ImplementationPlatforms for Implementation

Four Categories:Four Categories:Software/PC (MATLAB/LabView)Software/PC (MATLAB/LabView)

Firmware/Hardware (DSPs)Firmware/Hardware (DSPs)

Hardware (FPGA/Digital Circuits)Hardware (FPGA/Digital Circuits)

System Level ProcessorsSystem Level Processors

Page 11: Real-Time Signal Processing: Implementation and Application.

Platforms for ImplementationPlatforms for Implementation

Which is Right for Me?Which is Right for Me?FlexibilityFlexibility

SpeedSpeed

CostCost

PracticalityPracticality

Each type hasEach type has benefits and drawbacksbenefits and drawbacks

Page 12: Real-Time Signal Processing: Implementation and Application.

Platforms for ImplementationPlatforms for Implementation

Software/PC Based Signal ProcessingSoftware/PC Based Signal ProcessingMATLAB/SimulinkMATLAB/Simulink

LabViewLabView

Numerous other software applicationsNumerous other software applications

Signal collected by data acquisition Signal collected by data acquisition hardwarehardware

Processed by software applicationProcessed by software application

Page 13: Real-Time Signal Processing: Implementation and Application.

Platforms for ImplementationPlatforms for Implementation

Benefits of Software Benefits of Software FlexibleFlexible

ResilientResilient

Overall easier to useOverall easier to use

Page 14: Real-Time Signal Processing: Implementation and Application.

Platform for ImplementationPlatform for Implementation

Drawbacks of SoftwareDrawbacks of SoftwareExpensiveExpensive

SlowSlow

Requires additional platform to run on (PC Requires additional platform to run on (PC for example)for example)

Requires additional hardware to collect Requires additional hardware to collect datadata

Page 15: Real-Time Signal Processing: Implementation and Application.

Platforms for ImplementationPlatforms for Implementation

HardwareHardwareProgrammable Logic DevicesProgrammable Logic Devices

Field Programmable Gate Arrays (FPGAs)Field Programmable Gate Arrays (FPGAs)

Digital Circuits consisting of ICs and other Digital Circuits consisting of ICs and other componentscomponents

Signals are collected and processed by Signals are collected and processed by hardwarehardware

Page 16: Real-Time Signal Processing: Implementation and Application.

Platforms for ImplementationPlatforms for Implementation

FPGA DevelopersFPGA DevelopersXilinx (www.xilinx.com)Xilinx (www.xilinx.com)

Altera (www.altera.com)Altera (www.altera.com)

Page 17: Real-Time Signal Processing: Implementation and Application.

Platforms for ImplementationPlatforms for Implementation

FPGAsFPGAs::

ProgrammableProgrammable

logiclogic chipchip

Thousands of Thousands of gatesgates

Page 18: Real-Time Signal Processing: Implementation and Application.

Platforms for ImplementationPlatforms for Implementation

Benefits of HardwareBenefits of HardwareFastFast

InexpensiveInexpensive

Page 19: Real-Time Signal Processing: Implementation and Application.

Platforms for ImplementationPlatforms for Implementation

Drawbacks of HardwareDrawbacks of HardwareFragileFragile

Difficult to useDifficult to use

Requires knowledge of all aspects of its Requires knowledge of all aspects of its functioning and componentsfunctioning and components

Page 20: Real-Time Signal Processing: Implementation and Application.

Platforms for ImplementationPlatforms for Implementation

Firmware/Hardware Based Signal Firmware/Hardware Based Signal ProcessingProcessing

Digital Signal Processor (DSP)Digital Signal Processor (DSP)

Embedded code to run DSP (Firmware)Embedded code to run DSP (Firmware)

Signal both collected and processed by Signal both collected and processed by DSPDSP

““Middle of the road” between software and Middle of the road” between software and strictly hardware platformsstrictly hardware platforms

Page 21: Real-Time Signal Processing: Implementation and Application.

Platforms for ImplementationPlatforms for Implementation

DSP DevelopersDSP DevelopersTexas Instruments (www.ti.com)Texas Instruments (www.ti.com)

Motorola (www.motorola.com)Motorola (www.motorola.com)

Analog Devices (www.analogdevices.com)Analog Devices (www.analogdevices.com)

Page 22: Real-Time Signal Processing: Implementation and Application.

Platforms for ImplementationPlatforms for Implementation

DSPs:DSPs:Microprocessor specifically designed for Microprocessor specifically designed for signal processing applicationssignal processing applications

Good at arithmetic operations Good at arithmetic operations (multiplication/division)(multiplication/division)

Mostly programmed with Assembly and C Mostly programmed with Assembly and C through Integrated Development through Integrated Development Environment (IDE)Environment (IDE)

Similar to writing programs for software Similar to writing programs for software applictionsapplictions

Page 23: Real-Time Signal Processing: Implementation and Application.

Platforms for ImplementationPlatforms for Implementation

Benefits of DSPsBenefits of DSPsFaster than softwareFaster than software

Less expensive than softwareLess expensive than software

More flexible than hardwareMore flexible than hardware

Easier to use than strictly hardware Easier to use than strictly hardware platformsplatforms

Page 24: Real-Time Signal Processing: Implementation and Application.

Platforms for ImplementationPlatforms for Implementation

Drawbacks of DSPsDrawbacks of DSPsNot as straightforward as softwareNot as straightforward as software

Need knowledge of hardware and how it works Need knowledge of hardware and how it works (registers/memory map)(registers/memory map)

Still has some limitations on speed when Still has some limitations on speed when compared to strictly hardware (CPU compared to strictly hardware (CPU overhead/Memory access)overhead/Memory access)

Page 25: Real-Time Signal Processing: Implementation and Application.

Platforms for ImplementationPlatforms for Implementation

Code Generation ApplicationsCode Generation ApplicationsMathworksMathworks

Ability to take code written for applications Ability to take code written for applications like MATLAB or Simulink block diagrams like MATLAB or Simulink block diagrams and download them directly to a particular and download them directly to a particular DSP platform.DSP platform.

Page 26: Real-Time Signal Processing: Implementation and Application.

Platforms for ImplementationPlatforms for Implementation

MathworksMathworksReal-Time WorkshopReal-Time Workshop

Generate efficient ANSI C code from Simulink Generate efficient ANSI C code from Simulink for downloading to a DSPfor downloading to a DSP

Embedded TargetsEmbedded Targets Provides for rapid development and efficient Provides for rapid development and efficient

ANSI C code from Simulink for a specific DSPANSI C code from Simulink for a specific DSP Embedded target for TIC6000 DSP PlatformsEmbedded target for TIC6000 DSP Platforms

www.mathworks.comwww.mathworks.com

Page 27: Real-Time Signal Processing: Implementation and Application.

Platforms for ImplementationPlatforms for Implementation

Embedded Target for TIC6000 DSP Embedded Target for TIC6000 DSP PlatformsPlatforms

Page 28: Real-Time Signal Processing: Implementation and Application.

Platforms for ImplementationPlatforms for Implementation

System Level ProcessorsSystem Level ProcessorsHardware systems that work with Hardware systems that work with MATLAB/SimulinkMATLAB/Simulink

Enable simulation of real-time systems Enable simulation of real-time systems along with implementation in hardwarealong with implementation in hardware

Opal-RTOpal-RT

dSpacedSpace

Page 29: Real-Time Signal Processing: Implementation and Application.

Platforms for ImplementationPlatforms for Implementation

Opal-RTOpal-RTSimulators for mostly power and control Simulators for mostly power and control applicationsapplications

AerospaceAerospace AutomotiveAutomotive Power SystemsPower Systems IndustrialIndustrial Robotics and ControlsRobotics and Controls

RT-LABRT-LAB

Page 30: Real-Time Signal Processing: Implementation and Application.

Platforms for ImplementationPlatforms for Implementation

RT-LabRT-LabReal-Time simulationReal-Time simulation

Ability to transfer Ability to transfer product developed product developed through simulation to through simulation to embedded targetembedded target

Works with Simulink Works with Simulink and LabViewand LabView

Compatible with Compatible with programming programming languages such as languages such as Visual Basic and C++Visual Basic and C++

www.opal-rt.comwww.opal-rt.com

Page 31: Real-Time Signal Processing: Implementation and Application.

Platform for ImplementationPlatform for Implementation

RT-LabRT-Lab

Page 32: Real-Time Signal Processing: Implementation and Application.

Platforms for ImplementationPlatforms for Implementation

dSpacedSpaceIDE to develop IDE to develop control systems in control systems in real-timereal-time

TargetLinkTargetLink

www.dspace.dewww.dspace.de

Page 33: Real-Time Signal Processing: Implementation and Application.

Platforms for ImplementationPlatforms for Implementation

TargetLinkTargetLinkConvert MATLAB/Simulink/Stateflow model Convert MATLAB/Simulink/Stateflow model specs into efficient ANSI C code.specs into efficient ANSI C code.

Page 34: Real-Time Signal Processing: Implementation and Application.

Platform for ImplementationPlatform for Implementation

TargetLinkTargetLink

Page 35: Real-Time Signal Processing: Implementation and Application.

Contents:Contents:

What does real-time signal processing What does real-time signal processing mean?mean?

Why use real-time signal processing?Why use real-time signal processing?

Platforms for implementationPlatforms for implementation

Implementation on Texas Instruments Implementation on Texas Instruments C6711 DSPC6711 DSP

Applications (concentration on biomedical)Applications (concentration on biomedical)

Page 36: Real-Time Signal Processing: Implementation and Application.

TI C6711 OverviewTI C6711 Overview

In form of development kit (DSK) for In form of development kit (DSK) for development purposesdevelopment purposes

DSK includes supporting hardware such as DSK includes supporting hardware such as A/D conversion, External Memory Interface A/D conversion, External Memory Interface (EMIF), parallel port connection, etc.(EMIF), parallel port connection, etc.

Member of TI C6000 family of DSPsMember of TI C6000 family of DSPsHigh Performance DSPsHigh Performance DSPs

Performance audio and imaging Performance audio and imaging applicationsapplications

Page 37: Real-Time Signal Processing: Implementation and Application.

TI C6711 OverviewTI C6711 Overview

TI C67xx DSPTI C67xx DSPFloating point DSPsFloating point DSPs

100-, 150-, 167-, 100-, 150-, 167-, 200-MHz clock200-MHz clock

600 – 1350 600 – 1350 MFLOPSMFLOPS

VLIW ArchitectureVLIW Architecture Highly parallelHighly parallel Emphasizes Emphasizes

maximum code maximum code perfomanceperfomance

Page 38: Real-Time Signal Processing: Implementation and Application.

TI C6711 OverviewTI C6711 Overview

TI C67xx DSPTI C67xx DSPOrthogonal multiplier and arithmetic units Orthogonal multiplier and arithmetic units provide many execution resources to the provide many execution resources to the assembler and compiler optimizerassembler and compiler optimizer

Total of eight functional units are allowed to Total of eight functional units are allowed to run in parallel or serial/parallel combinationrun in parallel or serial/parallel combination

Results: Fewer program fetches, smaller Results: Fewer program fetches, smaller code size, and a reduction in power code size, and a reduction in power consumptionconsumption

Page 39: Real-Time Signal Processing: Implementation and Application.

TI C6711 OverviewTI C6711 Overview

C6711 DSKC6711 DSK

Page 40: Real-Time Signal Processing: Implementation and Application.

TI C6711 DSKTI C6711 DSK

Data/Program MemoryData/Program Memory32Kbits L1D Cache (Direct), 32Kbits L1P 32Kbits L1D Cache (Direct), 32Kbits L1P Cache (2-Way set associative), 512Kbits Cache (2-Way set associative), 512Kbits L2 RAM/CacheL2 RAM/Cache

16 channel EDMA16 channel EDMA32 bit EMIF32 bit EMIF2 Multichannel Buffered Serial Ports 2 Multichannel Buffered Serial Ports (McBSPs)(McBSPs)1.8V core supply/3.3 V IO supply1.8V core supply/3.3 V IO supply

Page 41: Real-Time Signal Processing: Implementation and Application.

Implementation on C6711 DSKImplementation on C6711 DSK

Code written, compiled/assembled and Code written, compiled/assembled and built on PC in IDE and downloaded built on PC in IDE and downloaded through parallel port to DSKthrough parallel port to DSK

DSP stores code in different sections for DSP stores code in different sections for memory as directed in linker command filememory as directed in linker command file

External RAM, Stack, Internal RAM (Cache), etc.External RAM, Stack, Internal RAM (Cache), etc.

IDE: Code Composer Studio (CCS)IDE: Code Composer Studio (CCS)

Page 42: Real-Time Signal Processing: Implementation and Application.

Implementation on C6711 DSKImplementation on C6711 DSK

Code Composer Studio (CSS)Code Composer Studio (CSS)IDE specifically designed for TI DSPsIDE specifically designed for TI DSPs

Allows programmer to use Assembly, C, or Allows programmer to use Assembly, C, or even C++ even C++

In-line assembly is another option (higher In-line assembly is another option (higher level assembly)level assembly)

Code optimization Code optimization Assembly/In-line Assembly: 100%Assembly/In-line Assembly: 100% C: 80-100% C: 80-100%

Page 43: Real-Time Signal Processing: Implementation and Application.

Implementation on C6711 DSKImplementation on C6711 DSK

Code Composer StudioCode Composer StudioDSP/BIOSDSP/BIOS

Gives programmer many avenues of insight Gives programmer many avenues of insight into program performanceinto program performance

Animation of graphsAnimation of graphsClock cycle counterClock cycle counterProfiler to locate bottlenecksProfiler to locate bottlenecks

Real-Time Data Exchange (RTDX)Real-Time Data Exchange (RTDX) DSP will transfer data to PC in real-time DSP will transfer data to PC in real-time Only minor code adjustments necessaryOnly minor code adjustments necessary

Page 44: Real-Time Signal Processing: Implementation and Application.

Implementation on C6711 DSKImplementation on C6711 DSK

Code Code ComposerComposer Studio Studio

Page 45: Real-Time Signal Processing: Implementation and Application.

Implementation on C6711 DSKImplementation on C6711 DSK

Implementation ExampleImplementation ExampleSignal acquired from outside source Signal acquired from outside source through A/D conversion and McBSPthrough A/D conversion and McBSP

int x = McBSP_read()int x = McBSP_read()Discrete signal value is then processed Discrete signal value is then processed accordinglyaccordingly

Several input values may need to be Several input values may need to be buffered for a timebuffered for a time

DSP sends processed signal through DSP sends processed signal through McBSP and D/A converter to output jackMcBSP and D/A converter to output jack

McBSP_write(y)McBSP_write(y)

Page 46: Real-Time Signal Processing: Implementation and Application.

Contents:Contents:

What does real-time signal processing What does real-time signal processing mean?mean?

Why use real-time signal processing?Why use real-time signal processing?

Platforms for implementationPlatforms for implementation

Implementation on Texas Instruments Implementation on Texas Instruments C6711 DSPC6711 DSP

Applications (concentration on biomedical)Applications (concentration on biomedical)

Page 47: Real-Time Signal Processing: Implementation and Application.

ApplicationsApplications

Very broadVery broad

AerospaceAerospace

PowerPower

AutomotiveAutomotive

Control systemsControl systems

BiomedicalBiomedical

Page 48: Real-Time Signal Processing: Implementation and Application.

Biomedical ApplicationsBiomedical Applications

Large amounts of signals are produced by Large amounts of signals are produced by the human body (heart, brain, etc.)the human body (heart, brain, etc.)

Real-time signal processing can enable us Real-time signal processing can enable us to understand the meaning of these to understand the meaning of these signals as they are occurring.signals as they are occurring.

Results in better testing methods, better Results in better testing methods, better diagnoses, prevention of fatal events.diagnoses, prevention of fatal events.

Page 49: Real-Time Signal Processing: Implementation and Application.

Biomedical ApplicationsBiomedical Applications

Distortion Product Distortion Product Otoacoustic Emissions Otoacoustic Emissions (DPOAE) Testing(DPOAE) Testing

Auditory testing (focus Auditory testing (focus on infants)on infants)Two sinusoids (f1, f2) Two sinusoids (f1, f2) introduced into the introduced into the inner ear (f2 = 1.2*f1)inner ear (f2 = 1.2*f1)Cochlea returns low Cochlea returns low level emission at level emission at frequency fd = 2*f1-frequency fd = 2*f1-f2f2Want to be able to Want to be able to locate this frequency locate this frequency among input sine among input sine waves and noisewaves and noise

Page 50: Real-Time Signal Processing: Implementation and Application.

DPOAEDPOAE

Conventional testing methods involve long Conventional testing methods involve long testing periods to collect enough data as testing periods to collect enough data as well as the necessity for a noiseless well as the necessity for a noiseless environmentenvironment

DPOAE MethodDPOAE MethodFast technique (real-time)Fast technique (real-time)

High noise immunity (due to Dr. Ziarani’s High noise immunity (due to Dr. Ziarani’s method of extraction of non-stationary method of extraction of non-stationary sinusoids)sinusoids)

Page 51: Real-Time Signal Processing: Implementation and Application.

DPOAEDPOAE

DPOAE Implementation (Software)DPOAE Implementation (Software)Real-time simulations done in Real-time simulations done in MATLAB/Simulink environmentMATLAB/Simulink environment

Electronic data sets usedElectronic data sets used

Implementation in MATLAB/Simulink Implementation in MATLAB/Simulink environment through data acquisition environment through data acquisition hardwarehardware

Clinical probe system from Etymotic Research Clinical probe system from Etymotic Research (www.etymotic.com)(www.etymotic.com)

Data Acquisition Board from National Data Acquisition Board from National Instruments (www.ni.com)Instruments (www.ni.com)

Page 52: Real-Time Signal Processing: Implementation and Application.

DPOAE ImplementationDPOAE Implementation

Next Step: DSPNext Step: DSPClinical prototype to perform DPOAE Clinical prototype to perform DPOAE testingtesting

Same probe system from Etymotic Same probe system from Etymotic ResearchResearch

Texax Instruments C6711 DSPTexax Instruments C6711 DSP

Page 53: Real-Time Signal Processing: Implementation and Application.

DPOAE ImplementationDPOAE Implementation

Results:Results:Low cost, fast, reliable means to test the Low cost, fast, reliable means to test the auditory response of humans in real-timeauditory response of humans in real-time