Networking of wavelet denoising instrument based on DataSocket technology

Publisher:橙子1234Latest update time:2011-10-18 Reading articles on mobile phones Scan QR code
Read articles on your mobile phone anytime, anywhere

1 Introduction

With the development of communication technology, the popularization of the Internet, the emergence and development of virtual instrument technology, remote access and sharing of instruments have become possible. The hardware platform can be connected to the Internet through a computer, and the remote control of the instrument, real-time data collection and network transmission can be realized through programming of virtual instrument software.

In this context, this paper designs a virtual wavelet denoiser based on Datasoket technology to achieve the sharing of wavelet denoisers.

2 DataSocket Technology

DataSocket is a network measurement and control system development technology provided by NI. It is based on Microsoft's COM and ActiveX technologies, is derived from the TCP/IP protocol and is highly encapsulated. It is oriented to measurement and automation applications and is used to share and publish real-time data. It is an easy-to-use, high-performance data exchange programming interface. It can effectively support the simultaneous application of specific data by different applications on the local computer. The data interaction between multiple applications on different computers on the network realizes real-time data sharing across machines, languages, and processes. Users only need to know the data source, data sink, and data to be exchanged to directly develop high-level applications and achieve high-speed data transmission without having to worry about the underlying implementation details, thereby simplifying the communication program writing process and improving programming efficiency. [1]

DataSocket includes tools such as DS Server Manager, DS Server and DS function library, as well as technical specifications such as data transmission protocol DSTP (DataSocket Transfer Protocol), Uniform Resource Locator URL (Uniform Resource Locator) and file format. These tools can greatly simplify the programming work of data exchange between computers in the network.

DataSocket Server Manager is an independently running program. Its main functions are to set the number of client programs that can connect to the DS Server and the number of data items that can be created, set users and user groups, and set user permissions to access and manage data items. DS Server can solve most network communication problems for users and is responsible for data exchange between user programs. Users do not need to write low-level programs related to network communication. [2]

3 Wavelet transform theory

Wavelet analysis is a time-frequency localization analysis method with a fixed window size but changeable shape, and both the time window and the frequency window can be changed. That is, it has a higher frequency resolution and a lower time resolution in the low-frequency part, and a higher time resolution and a lower frequency resolution in the high-frequency part, which is consistent with the characteristics that low-frequency signals change slowly and high-frequency signals change rapidly. This feature is what makes it superior to traditional Fourier transform and short-time Fourier transform. [3]

There are three main methods for signal denoising using MATLAB wavelet analysis tools:

(1) Wavelet decomposition of one-dimensional signal. Select a wavelet and determine the level N of wavelet decomposition, then perform N-level wavelet decomposition on the signal;

(2) Threshold quantization of high-frequency coefficients of wavelet decomposition. From the perspective of wavelet denoising, there are three methods of threshold processing:

a. Forced denoising: This method changes all high-frequency coefficients in the wavelet decomposition structure to 0, that is, filters out all high-frequency parts, and then reconstructs the signal. This method is relatively simple, and the reconstructed denoised signal is relatively smooth, but it is easy to lose useful components of the signal.

b. Default threshold denoising: This method uses the ddencmp function in the MATLAB toolbox to generate the default threshold of the signal, and then uses the wdencmp function in the MATLAB toolbox to perform denoising.

c. Given a soft (or hard) threshold denoising process. In the actual denoising process, the threshold can often be obtained through an empirical formula, and this threshold is more credible than the default threshold.

(3) One-dimensional wavelet reconstruction: The wavelet reconstruction of the one-dimensional signal is performed based on the low-frequency coefficients of the Nth layer of wavelet decomposition and the high-frequency coefficients of the 1st to Nth layers after quantization.

4 Design of Networked Virtual Wavelet Denoising Instrument

4.1 Functions of Wavelet Denoiser

The wavelet denoiser has the function of learning the denoising characteristics of the wavelet function and denoising the actual test data.

On the client panel of the wavelet denoiser, there are controls for "original signal input", "save data after wavelet processing", "wavelet parameter settings", "original signal waveform" and "wavelet processed waveform". In the "wavelet parameter settings", there are options for "wavelet type", "decomposition level" and "wavelet order". The "wavelet type" includes "sym", "haar", "db", "dmey" and "coif" wavelets; the "sym" wavelet order can be selected from 2 to 5, the "db" wavelet order can be selected from 1 to 10, the "coif" wavelet order can be selected from 1 to 5, and the "haar" and "dmey" wavelets do not need to select the order; the "decomposition level" defaults to 1 to 20 for each wavelet. The "Original Signal Input" control imports the sample file packaged with the client DLL program or the measured data file to be denoised (the data file format is a text file separated by the Enter key), selects different wavelets and decomposition levels in the "Wavelet Parameters" setting, and transmits the denoised data and wavelet parameters to the server-side denoising program for processing through the DataSocket protocol, and transmits the processed data to the client at the same time, and saves the processed data to the client computer through the client-side "Save Wavelet Processed Data" control. The "Original Signal Waveform" and "Wavelet Processed Waveform" controls display the signal waveforms before and after denoising respectively.

After the user downloads and runs the client DLL program through the Internet, he imports the sample file, selects different wavelet functions, orders and decomposition levels, compares the denoised graphs, and learns and experiences the denoising effects of different wavelet functions on different signals. In this way, the wavelet function can be selected in a targeted manner when processing the measured data.

4.2 Server-side virtual instrument design[page]

LabVIEW sets up a DataSocket connection dialog box for each control in the control panel. Through the uniform resource locator URL, it determines the connection method between the data source and the control to publish and read data. If you specify the URL in the virtual instrument's server-side DataSocket Connection dialog box and select the publish connection method, and specify the same URL in the virtual instrument's client-side DataSocket Connection dialog box and select the read connection method, the URL of the DataSocket transmission protocol follows the format: dstp://servername/data. Among them, servername is the URL of the server-side computer; data is the name identifier of the DataSocket connection, which is used to distinguish different DataSocket connections.

The Labview function panel provides the "MATLAB Script" node to implement the interface with the MATLAB software. In this design, the default threshold denoising method is used, and the denoising algorithm is implemented using the MATLAB built-in wavelet function.

The flow chart design of the server side is shown in Figure 1.

Figure 1 Server-side flow chart

4.3 Client Virtual Instrument Design

Figure 2 Client flow chart

In the client panel toolbar, select "Tools-Build Application or Shared Library (DLL)" to build the client DLL running program.

Place both the server-side and client-side DLL programs on the same server, add the created data items in the server-side DS Manager, and set the number of accessible users and permissions.

5 Examples

The signal to be denoised is a sine wave containing white noise.

Download the packaged DLL program and sample files on the client machine. Before running the client DLL program, make sure that the DS Server on the server has been turned on and the server program is running. Then import the signal to be denoised, select different wavelet parameters, observe the graphs before and after denoising, and compare the best denoising effect.
The comparison shows that for a sine wave signal containing white noise, the denoising effect is best when the "dmey" wavelet is selected and the decomposition level is 2, and the denoising effect is very poor when the "haar" wavelet is selected. Figures 3 and 4 are the waveforms before and after denoising of these two functions, respectively.


Figure 3 Effect of “haar” wavelet denoising before and after

Figure 4 Effect of “dmey” wavelet denoising before and after

6 Conclusion

By using Labview and DataSocket technology, the sharing of instruments is realized, the resources are fully utilized, and the flexibility of data processing is improved.

Reference address:Networking of wavelet denoising instrument based on DataSocket technology

Previous article:Design of high-speed data acquisition system based on narrow pulse reflectometer
Next article:Remote home ECG monitoring terminal

Latest Test Measurement 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号