Design of Adaptive Filter System Identification Based on LabVIEW

Publisher:colcheryLatest update time:2009-09-16 Source: 维库电子Keywords:LabVIEW  TMS320C6713 Reading articles on mobile phones Scan QR code
Read articles on your mobile phone anytime, anywhere

1 Introduction

LabVIEW (Laboratory Virtual Instrument Engineering Workbench) is an innovative software product of NI Corporation of the United States. It is also the most widely used, fastest growing and most powerful graphical software development environment. LabVIEW DSP module, which includes system tools for designing, implementing and analyzing DSP algorithms. It extends the LabVIEW graphical development environment to embedded signal processing application design, provides an easy-to-use, ready-made method to learn signal processing technology, and gives DSP developers a graphical and system-level design and development option. As our devices improve in performance and complexity, the role of graphical and system-level design and development tools plays an increasingly important role.

This paper takes the TMS320C6713EVM development board as the hardware platform, uses the LabVIEW DSP module and the LabVIEW DSP Test Toolkit for TI DSP toolkit to integrate LabVIEW and DSP, and completes the design of the adaptive filter system identification application based on the TMS320C6713EVM hardware platform.

2 Application of DSP in Virtual Instrument Design

Digital signal processing is an extremely important discipline and technical field, and has been widely used in many fields. Compared with other microprocessors commonly used in embedded systems (such as single-chip microcomputers and general-purpose processors), DSP (digital signal processor) has powerful data processing capabilities and high-speed data throughput, making its performance in image processing, voice processing, etc. far superior to other microprocessors. At the same time, with the development of very large-scale integrated circuits, production costs have been further reduced, and DSP solutions have become the first choice for engineers in typical digital signal processing applications such as embedded image and voice processing.

In many cases, virtual instruments are implemented using a host computer. Microcomputers can also perform digital processing, and microcomputers can directly use floating-point operations, and their calculation accuracy can also be very high. However, compared with using microcomputers to implement virtual instruments, using DSP chips to implement virtual instruments has the following advantages: (1) The unique storage and bus structure of DSP chips can ensure multiple accesses to program space and data space within a machine cycle and simultaneous calculations within an instruction cycle, meeting the parallel calculation requirements in digital signal processing; (2) A/D and D/A are used during data acquisition and output, and their refresh is completed through timers. DSP chips have built-in on-chip timers, and users can accurately set the timers through the control program, thereby achieving precise timing and sampling processing, which is impossible in host computer implementation.

Usually, the data acquisition card as the hardware part of the virtual instrument only completes the data acquisition and transmission, while the most time-consuming and complex data analysis and processing in the virtual instrument is left to the computer's CPU to complete, resulting in the virtual instrument's lack of real-time and accuracy. DSP can complete the work of data acquisition, data processing and data transmission, leaving the work of data analysis and processing to DSP, so the computer's work is only to complete the simple arrangement, display, storage and output of data, which well makes up for the previous virtual instrument's lack of speed and accuracy.

In addition, when the system runs on a multi-tasking operating system such as Windows, especially when processing large-capacity, high-precision operations such as FFT, the CPU resources will be seriously insufficient, which brings certain inconveniences to the application of virtual instruments. Virtual instruments can use the DSP processing system to pre-process the collected data in the DSP, and then pass the data to the software part. This not only does not increase the burden on the system, but also allows the system to use more time to handle other things. Therefore, organically applying DSP technology to virtual instruments is an important development direction of virtual instrument design.

3 DSP system-level design based on LabVIEW

3.1 LabVIEW DSP Module

The LabVIEW DSP module is a full-featured visual tool for designing, implementing, and analyzing digital signal processor algorithms and systems. This module is integrated with LabVIEW and is powerful enough to generate applications optimized for DSPs. It is a new approach to DSP development. Its features are as follows:

(1) Extending the LabVIEW core capabilities to directly program the NI SPEEDY-33, TI C6416 DSK, TI C6713 DSK, and TI C6711 DSK using signal processing functions and programming components. No separate DSP compiler is required, and the code can be switched between supported DSP targets without rewriting the code, providing code portability to multiple DSP targets.

(2) Full support for Express VI functions, graphical and system-level options for programming DSP devices, code modularity and independent application development capabilities for future designs, etc.

(3) It can reduce iterative design cycles and overall development time more quickly, and display results immediately while making changes to existing DSP hardware in real time.

(4) With easy access to analog and digital I/O lines of the DSP target and an interactive GUI that meets real-time interaction needs, real-time applications can be built.

At the same time, the LabVIEW DSP module integrates the latest NI LabVIEW digital filter design toolkit, which can download filters designed using LabVIEW to TI and NI DSP hardware devices. The LabVIEW DSP module is very suitable for applications in the fields of communications, custom control algorithms, digital and least mean square (LMS) filtering, and audio processing and analysis.

3.2 LabVIEW DSP Test Toolkit

The DSP Test Toolkit in the LabVIEW toolkit can make the DSP system designed in the LabVIEW environment run in whole or in part on the hardware platform. The DSP Test Toolkit is different from the DSP module. The DSP module can be used to program the DSP hardware directly without a separate DSP compiler. The DSP Test Toolkit must be developed through CCS (Code Composer Studio). The DSP Test Toolkit provides a series of VIs that can interface LabVIEW and CCS, as shown in Figure 1.

The role of DSP Test Toolkit in DSP design

Figure 1 The role of DSP Test Toolkit in DSP design

The VIs provided by DSP Test Toolkit are divided into two groups: CCS Automation VIs and CCS Communication VIs. CCS Automation VIs enable CCS code to be automatically executed through LabVIEW, including (1) opening CCS, (2) building a project, (3) resetting the CPU, (4) loading a program, (5) running code, (6) stopping the CPU, and (7) closing CCS. These steps are the same as in CCS.

CCS Communication VIs enable data to be exchanged over the RTDX channel. For example, the CCS RTDX Write VI and CCS RTDX Read VI are used to write and read data to and from the DSP, respectively. It is important to note that the above VIs are polymorphic. Therefore, the data types and data formats between LabVIEW and CCS must match exactly to establish LabVIEW DSP integration. In addition, communication between LabVIEW and the C6x DSK target can be achieved by utilizing the Real-Time Data Exchange (RTDX) feature of the TMS320C6x DSP. This feature allows data to be exchanged between a DSK target and a host PC (running LabVIEW) without stopping program execution on the DSP side. This data exchange can be achieved through a Joint Test Action Group (JTAG) connection or by emulating a JTAG connection using a Universal Serial Bus interface. RTDX can be set to two modes: non-continuous mode and continuous mode. In non-continuous mode, data is written to a log file on the host. This mode is generally used for logging. In continuous mode, data is buffered by the library in the RTDX host. This mode is generally used for continuous display of data. When the processed data is displayed by PC/LabVIEW, RTDX must be set to continuous mode.

3.3 DSP system-level design method based on LabVIEW

When using LabVIEW for DSP development, the program block diagram is mainly divided into two parts, as shown in Figure 2.

CCS Automation.vi program block diagram

Figure 2 CCS Automation.vi program flowchart

One part is the sequence structure on the left side of the figure. It corresponds to the CCS automatic process, including CCS open project VI, CCS create VI, CCS reset VI, CCS load code VI and CCS run VI. In addition, the CCS interrupt VI and CCS close project VI on the right side of the sequence structure are also part of the CCS automatic process. The three functions of the file I/O template in the sequence structure are used to create the CCS project file path, so that the project file can be opened in CCS. Through these VIs and functions, opening CCS, creating projects, loading and running programs on DSP, these processes can be controlled from the LabVIEW side. Dsp.pjt in the sequence structure is a DSP project, such as LMS.pjt, FFT.pjt, etc., which are created by designers in CCS according to different design requirements.

The other part of the flowchart is the While loop structure, which includes graphical codes such as the input and output display and analysis of system data and parameters, and the CCS RTDX communication module. The CCS RTDX communication module enables continuous data exchange between LabVIEW and DSP.

While the program is running, the Code Composer Status on the front panel can clearly display the CCS running status, as shown in Figure 3.

Example of displaying the CCS process status on the front panel

Figure 3 Example of CCS process status display on the front panel

Any DSP development program can be developed and designed based on LabVIEW using the program model shown in Figure 2. For different DSP designs, the graphical code in Dsp.pjt and the LabVIEW while loop is different.

4 DSP Design Examples

4.1 System Identification Principle

The ability of adaptive filters to operate well in unknown environments and track input statistics over time makes them powerful devices in signal processing and automatic control applications. Adaptive filter applications are divided into four types: identification, inverse model, prediction, and interference elimination. The purpose of system identification is to design an adaptive filter to approximate a given unknown dynamic system. The basic structure of using adaptive filters to achieve system identification is shown in Figure 4.

Basic structure of system identification

Figure 4 Basic structure of system identification

In the application of adaptive filters, an important issue is to establish the standard (or criterion) for optimizing the adjustable filter parameters. The least mean square (LMS) algorithm can produce a quadratic performance index as a function of the filter coefficients, thus having a single minimum value. It is one of the most basic algorithms for adaptive filters, so this paper uses the LMS algorithm to implement the application of adaptive filters.

4.2 System Identification Design Based on TMS320C6713EVM

The hardware platform used is TMS320C6713EVM high-speed voice signal (acquisition) processing platform. The platform uses the high-performance floating-point DSP device TMS320C6713B from Texas Instruments. The simulator used is the 5100USB V2.0 series DSP simulator.

The software design is shown in Figure 5. The sine wave generated by LabVIEW Express VI is used as the input signal, and the Butterworth filter VI is used as the unknown system through which the signal passes. The LMS algorithm program for the adaptive filter is written in C language in the CCS development environment, and the application program and graphical interface of the adaptive filter are developed in G language in the LabVIEW development environment. Communication is achieved through real-time data exchange (RTDX) between LabVIEW and CCS.

System Identification Program Flowchart

Figure 5 System identification program flowchart

Through the front panel, we can clearly see that the output of the adaptive filter gradually approaches the output of the unknown system, and finally accurately identifies the unknown system. In addition to using a single-frequency sine wave as the input signal, uniform white noise is also used as the input. The experimental results show that the unknown system can be identified, verifying the correctness of the entire system function and the effectiveness of the design method. The program running results are shown in Figure 6.

System identification run results

Figure 6 System identification results

5 Conclusion

This paper implements the adaptive filter application design based on the TMS320C6713EVM DSP hardware development platform in the LabVIEW development environment - system identification. Its design method is different from the traditional DSP design and development method, and is a beneficial attempt at a new DSP design method. This design method greatly shortens the DSP development cycle, gives full play to the characteristics of DSP and LabVIEW, and leaves the complex calculations to DSP. At the same time, through the LabVIEW visual interface, the results and waveforms of the program can be clearly seen, which facilitates online debugging, and the running results are intuitive and clear. Using the LabVIEW development environment for DSP development gets rid of the cumbersome text-based language code and complex debugging process, and can easily realize the development of DSP. It is a new development direction of DSP design and can be well applied to engineering practice and DSP teaching.

Keywords:LabVIEW  TMS320C6713 Reference address:Design of Adaptive Filter System Identification Based on LabVIEW

Previous article:Brief Introduction of Substation Integrated Automation System Based on DSP Technology
Next article:ECG Monitoring System Based on TMS320LF2407ADSP

Recommended ReadingLatest update time:2024-11-16 23:52

Interactive Application of Arduino and LabVIEW
This article will introduce how to use the proteus simulation environment to realize serial communication between Arduino UNO and LabVIEW. LabVIEW controls the LED light of Arduino UNO through the RS-232 serial port to turn the LED light on and off. 1. Arduino UNO In the proteus simulation environment, the ATmega328
[Test Measurement]
Design of Photovoltaic Power Generation Data Monitoring System Based on Labview
  1 Introduction   The energy output of photovoltaic power generation systems varies greatly due to changes in the surrounding environment. Real-time monitoring of photovoltaic power generation systems can obtain original measurement data, providing useful data for system improvement and optimization as well as future
[Test Measurement]
Design of Photovoltaic Power Generation Data Monitoring System Based on Labview
Research on Memory Detection System Based on LabVIEW
During the operation of electronic equipment, memory failure or failure will not only lead to economic losses, but also may lead to catastrophic consequences. Therefore, memory testing has become an important issue in today's world, and memory is playing a very important role in military equipment. At presen
[Test Measurement]
Research on Memory Detection System Based on LabVIEW
LabVIEW connects block diagram objects such as front panel terminals and nodes
  Wires are used to transfer data between objects on a block diagram. Each wire can be connected to only one data source, but can be connected to multiple data readers, similar to passing parameters in text-based programming languages. The color, style, and thickness of wires vary depending on the data type, and simila
[Test Measurement]
LabVIEW connects block diagram objects such as front panel terminals and nodes
labVIEW time domain-frequency domain analysis
      Frequency domain (frequency domain) - the independent variable is frequency, that is, the horizontal axis is frequency and the vertical axis is the amplitude of the frequency signal , which is usually called a spectrum diagram . The spectrum diagram describes the frequency structure of the signal and the relation
[Test Measurement]
labVIEW time domain-frequency domain analysis
LabVIEW programming skills: how to detect the mouse wheel
Button information------------Returns which mouse button was pressed: Button 1--》left mouse button, Button 2--》right mouse button, Button 3--》mouse wheel button. Axis Information ------ Returns the current horizontal and vertical position of the mouse. The function can select absolute coordinates, relative to the
[Test Measurement]
LabVIEW programming skills: how to detect the mouse wheel
Microscopic Fluorescence Spectrum Imaging System Based on LabVIEW
Realize the hardware construction and software design of digital image sequence acquisition, image processing, spectral classification of biological cells, image selection, optical density measurement, etc., and realize qualitative (What), quantitative (How Many) and location (Where) analysis of tissue cells. The Micr
[Test Measurement]
Microscopic Fluorescence Spectrum Imaging System Based on LabVIEW
Design and application of high voltage reactive power compensation monitoring system through LabVIEW
1 Introduction In recent years, with the continuous increase of high-power nonlinear loads, the reactive impact and harmonic pollution of the power grid have been on the rise, resulting in an increase in line loss of the power grid and a decrease in the voltage qualification rate, which seriously affects the power s
[Power Management]
Design and application of high voltage reactive power compensation monitoring system through LabVIEW
Latest Embedded Articles
Change More Related Popular Components

EEWorld
subscription
account

EEWorld
service
account

Automotive
development
circle

About Us Customer Service Contact Information Datasheet Sitemap LatestNews


Room 1530, 15th Floor, Building B, No.18 Zhongguancun Street, Haidian District, Beijing, Postal Code: 100190 China Telephone: 008610 8235 0740

Copyright © 2005-2024 EEWORLD.com.cn, Inc. All rights reserved 京ICP证060456号 京ICP备10001474号-1 电信业务审批[2006]字第258号函 京公网安备 11010802033920号