Amalgamated-signal Cymometer Based on TMS 320 F 28335

In our design, an amalgamated-signal cymometer is developed with a TMS320F28335 DSP chip ---we use its on-chip 12-bit 16-channel AD to conduct a novel dual-sequencer synchronize sampling and averaged to improve the accuracy. Considering the algorithm, we use TI's C28x_FPU_Lib to conduct a FFT with sampled results and correct spectrum with Time-Shift Phase Difference Correcting Spectrum Method based on all-phase spectral analysis. Namely, we design a sampling-frequency self-adaption algorithm which makes operation keep on without outside-hardware command. Actually, the test result shows that our design's frequency resolution ratio is up to 0.4%, and the maximum frequency’s D-value between main and minor signal is up to 29.99 kHz.


Introduction
Today's world is a digital world, in which digital signal processor playing an important role, and Ti company as the world's leading semiconductor company; its digital signal processor plays a very important role in the field [7].Discrete Fourier transform (DFT) technology is the core of digital signal processing technology.In 1965, Cooley and Tukey proposed the Fast Fourier Transform algorithm hereinafter referred to as FFT, and it has wide application in every field of digital signal processing.Spectrum analysis is an important application of FFT, and this design is based on spectrum analysis method for signal frequency and the amplitude of the primary and secondary in the composite signal.
TMS320F28335 is TI company's new high performance 32-bit floating point digital signal processor, using 12-bit 16 channel AD to do two-channel synchronous sampling and take its average in order to improve the accuracy, and using floating-point runtime library provided by TI to do FFT computation, and using an extremely high precision time shift phase difference method based on all phase spectrum analysis to correct, getting accurate frequency and the amplitude of the primary and secondary signals, via a serial port to send to upper computer, and at the same time using the TMS320F28335's high-precision EPWM to reconstruct primary and secondary signal waveform.

The time Shift Phase Difference Correction
Method based on all Phase FFT Spectrum Analysis All phase FFT has better inhibiting spectrum leakage performance, which has good inhibition of spectral leakage performance of amplitude spectrum, and as well can be directly generated accurate phase spectrum [1].Based on this, do simple arithmetic on the main spectral line with two sequences which have time shift and we can get higher accuracy of traditional phase estimate, have higher application value than phase difference correction method, and have better use value.Description of all phase FFT spectrum analysis method: After all phase data pretreatment and then do FFT to the data, we can get a new type of all phase of the FFT spectrum analysis as is shown in Figure 2.2, and its improvement in the method of truncation of data greatly improves the spectrum performance.
The process the Time-Shift Phase Difference Correcting Spectrum Method corrects Spectrum as is shown in the Figure 2

.3 below [8]:
Its Frequency estimation formula is (1) The deviation value of main line is Its Amplitude estimation formula is In the formula, the denominator Figure 2 (dω) is valuable when dω is brought into the window function of the formula of Fourier transform, and the general window function (such as the hanning window, hamming window,  Besides, Time-Shift Phase Difference Correcting Spectrum Method has no phase difference correction of phase estimation.
Theoretically, the frequency correction precision of Time-Shift Phase Difference Correcting Spectrum Method reaches the level of degrees, and its phase correction error reaches 10 -3 degrees, which are more precise than traditional methods.
Specific analyses on the theory of all phase spectrum analysis please refer to the reference [2]， [3].[5]

Follower
This part of circuit mainly enhances signal, avoiding signal attenuation caused by the input and output impedance mismatch.Primary and secondary signal use the whole pole input with two followers to connect with the level after circuit, and in this not do change of amplitude but just joining a resistance whose resistance R is 1 k in the input stage.

The Summing Circuit
The module adopts the three input reverse phase summation operation circuit.because in phase end is grounding， so for the reverse side its voltage vn = 0 (according to the use of manual recommended positive input directly to the ground), and because of broken, there can be a V O = -R 21 *V 1 /R 18 -R 21 *V 2 /R 19 -R 21 *V 3 /R 20 ，According to design, the input of two sine signal is damped to 0.5 times of original signal and then superimposed on a dc bias voltage, and the resistance for R18 = R20 = 22 k, R19 = 24 k, R21 = 22 k, and the input signal of R19 is 3.3 V dc voltage.So the superposition signal is negative, the amplitude is 0.5 times of the primary and joining U=-3.3*11/24V=-1.5125Vdc offset signal.

The Second Order Butterworth Low-pass Active Filter
Due to the demand of the algorithm is higher to the signal, the module will filter the high frequency noise signal Copyright © 2013 SciRes.EPE in the input to the DSP signal, to reduce the interference signal on the calculation of FFT, and use the negative input at the same time, will be through the adder originally negative signal into a positive.OPA4227 precision itself introduces less noise, consider attenuation rate of a first order butter worth filter for each frequency doubling is 6 db, every ten times as much as 20 db; attenuation rate of second order butterworth filter for each frequency doubling is 12 db, and attenuation rate of the third order butter worth filter for frequency doubling is each 18 db and so on, so we only need the second order to meet the demand.In this, R22 = R23 = 100 k, R24 = 22 k, C3 = 180 pF, and cutoff frequency is 33 KHZ, phase reversal 180 degrees when in 120 KHZ.

Limiter Circuit
This module uses the diode and a resistor in parallel, R25 = 10 k, diode using 1 n5221, positive pressure limiting at 2.4 V, negative for 0.6 V, and according to the calculation, after the amplitude limiting, output positive maximum voltage limit is 0.75 + 1.5125 = 2.2625 V, the limit of minimum forward voltage is 1.5125-0.75= 0.7625 V, which are within the control of clipping.While DSP AD requests input amplitude is in 0 ~ 3.3 V, the design meets the requirements.System software consists of main functional modules: initialization module, AD sampling module, FFT calculation module, spectrum correction module, SCI sending module, ePWM waveform reconstruction module, the watchdog module and interrupt module.

The System Software Design
Specific operation modes of System software design please refer to the reference [4].
Main computational program flow is as shown in the figure below [6]:

Figure 2 . 2 .
Figure 2.2.The basic block diagram of N-order all phase FFT spectrum analysis.

Figure 2 . 3 .
Figure 2.3.the process of spectrum correction of Time-Shift Phase Difference method
System software design adopts modular design, and it combines subroutine which completes the specific functions into a functional module, invoked by the main monitoring program invocation.Software overall block diagram as shown in the figure below.