Real Time Harmonic Analysis of Recuperative Current through Utilization of Digital Measuring Equipment

This paper deals with device for online, real time analysis of recuperative current with use of microprocessor. This system is used in railway transport for measurement and analysis of recuperative-currents from converter in railway engine. Recuperative currents from converters in railway engines, flows through rail back to the distribution point. Content of higher harmonics in these currents must not exceed limits specified in international standard UIC 550-3, so exact measurement and analysis of this harmonics is necessary. Proposed device uses microprocessor for real time measurement and analysis of recuperative currents. DOI: http://dx.doi.org/10.5755/j01.eee.19.5.4364


I. INTRODUCTION
Power semiconductor systems are nowadays utilized in most of consumer and industrial applications including transportation.For the purposes of last mentioned application, the power semiconductor systems are being used for control of the energy flow [1]- [4].The main advantage of such solution is very high efficiency of power conversion and high frequency operation, what in final results in very small size of total system [5], [6].But on the other side, every solution has also several disadvantages.For this case we are going to speak about nonlinear load of distribution network.This nonlinearity is given by the fact that converters are consisting from switching elementssemiconductor devices, which are operating in high frequency mode.Without utilization of power factor corrector (PFC) the supply current of converter acts as current with high portion of non-harmonic elements [7].Even PFC is being used the given amount of these nonharmonic elements are still being taken away from distribution network.This problem can be also registered during recuperative braking of railway locomotives.As a results of described behavior of power Manuscript received January 03, 2012; accepted June 16, 2012.
The authors wish to thank to Slovak grant agency APVV for project no.LPP -0366 -09, to Slovak grant agency VEGA for project no.1/0943/11.Next to to R&D operational program Centre of excellence of power electronics systems and materials for their components No. ITMS 2622012003 semiconductor systems, the higher harmonics of supplying current are significantly affecting EMC of the semiconductor converter and other electronic devices.Also new IEC standards are being constantly tightened, what is in the final result reflected in the designing of "EcoSmart" and "green" solutions.For railway applications, these limits are set by standard UIC 550-3 (European Union).
In this paper we will describe construction of device for online, real-time analysis of recuperative current.The sensing device will be constructed through utilization of modern microprocessor unit (TMS320F28335 from Texas Instruments), and thus will be representing full digital system for real time analysis of current spectrum of power semiconductor converter.In the first part of paper, the current sensor and digital filter are described.Then the computation algorithm is being presented.Last part of paper shows implementation in microprocessor and experimental verification of proposed solution.

II. SYSTEM FOR REAL TIME ANALYSIS OF CURRENT'S SPECTRUM
Our proposal of system for real time analysis of current's spectrum is primarily indented for use in railway applications.But this system can be normally used in every application where exact measurement of recuperative current is necessity.As we previously mentioned, according to standard UIC 550-3, the recuperative current which is flowing through rail back into power network cannot affect signal devices and other equipment which could be potentially safety risk for railway system.
Whole analysis of recuperative current must be done in real time.It means that if analysed current contains specific harmonic content, or if content of higher harmonics is above allowable limit, then the proposed system has to perform certain measurements.Control system and control algorithm will prevent distorted current from flowing back into the distribution point and power network.
Fig. 1 shows block scheme of proposed system.It consists from current sensing device, and from microprocessor (in our case we have been working with TMS320F28335).Analog to digital conversion and all functions of filters and computational algorithms which are necessary for measurement and analysis of harmonic content in recuperative currents are in digital -in software form.

A. Selection of current sensing method
In principle there exist three most common ways of current measurement.These are: − Measurement through shunt resistor; − Measurement through current transformer; − Measurement through Hall sensor.
Based on many advantages which are not going to be described here, we have decided to utilize Hall sensor as current measurement device.Basically it is possible to provide two ways of measurement using Hall sensor, sensing in open loop and sensing in closed loop.Sensing in a closed loop is characterized by compensation of magnetic flux created with primary current by opposed magnetic flux in magnetic circuit.Each deviation from null balance results into Hall voltage.The electric circuit due to compensation will supply secondary current, which is necessary for compensation of magnetic field.Based on this description, the sensing in closed loop has these advantages against open loop -higher accuracy, high bandwidth, fast response, linearity and possibility of overload.This abilities are perfect according to the fact that designed device has to serve for current measurements with amplitude of 300 A. We have selected Honeywell CSNF161 sensor configured in closed loop.This sensor contains Hall circuit with closed loop and enables to sense alternating, direct as well as pulsed waveforms.

B. Voltage level adjustment
Due to fact, that hall sensor is equipped with current output, the transformation from current to acceptable voltage level for A/D converter (microprocessor) is necessary.A/D converter is operating with input voltage level between 0 VDC -3 VDC.
Hall sensor has maximum measuring range ± 150 A, so the maximum amplitude of measured current is 300A.Due to this value the voltage drop on measuring resistor will have to be in the range of ± 1.5 V, but for A/D converter the conversion of negative voltages is not possible.For the purpose of the voltage level adjustment on the measuring resistor without loss of information of measured signal the utilization of next circuit (Fig. 3.) was necessary.This circuit shifts input voltage ± 1.5 V to range from 0 to 3V, without modification of measured signal.This is very important, because even small deviation in frequency of the signal can lead to inaccurate analysis.For the output voltage, next formula is valid ), where U ref is voltage at the output of voltage stabiliser LM317, and U in is voltage across sensing resistor R In such way the output voltage U out is modified voltage in the range 0 V -3 Vdc which is supplied into A/D converter.

C. Digital filters
The role of the digital filter is to affect the spectrum of the input signal in desired form.This means either selection of a part of the spectrum, which will stay unchanged or suppression of the rest (low pass filter, high pass filter, band pass or band stop) or shaping the frequency response.Digital filter in this device serves as antialiasing filter, which in principle operates as low-pass filter.For given application, a digital IIR filter was chosen, due to its small time delay during processing of input signal (measured current).Another advantage of this type of filter is small memory usage.Unlike FIR filters, stability of IIR filters is not always guaranteed.After the proposal, check whether all poles of transfers function lies inside unit circle in z-domain.Another disadvantage of IIR filters is sensitivity to saturation of processor's arithmetic and sensitivity to quantization of values.Advantages of IIR filters are lower degree of transfer function at the same requirements.Consequently, memory demands for accumulation of coefficients and state variables are lower and also, time for processing of input variable is lower also.Transfer function of IIR filter is in form Fig. 4 shows amplitude-frequency response of proposed filter with cutoff frequency 26 kHz.Main criterion for filter design is its stability that means that all poles of transfer function must belong to internal part of unity circle line (Fig. 5).

D. Analysis of measured recuperative currents
Main task of spectral analysis of signal, is computing of its harmonic contents.There are two ways for description of the signal.First way is description of the signal in original domain, e.g.time domain, and second way is description of the signal in spectral domain, i.e. spectrum of the signal.For description in spectral domain, the original signal must by transformed by linear transform.This is valid for all kinds of signals -analog, digital, periodical, aperiodical, deterministics and stochastics.Every type of signal has effect on transformation formula or its spectrum.Linear transformation used in computing algorithm in above mentioned device is inverse, which means, that on the base of spectrum components, computing of original signal is possible.

III. IMPLEMENTATION INTO MICROPROCESSOR
Algorithms for filtering, computing and analysis of measured signal are realized in software form in microprocessor.For this purpose a 32 bit float-point microprocessor TMS 320F28335 Delfino is used.This 150MHz microprocessor contains float-point C2000 core and powerful peripherals, from which a 12bit A/D converter was used for measurement of signal from Hall sensor.Software for computing and analysis was written in standard C-language.Maximum frequency of analysed signal is up to 20kHz, so the sampling frequency of 192kHz was chosen, which means, that Shannon criteria was observed

A. Implementation of digital filters
Digital filter in device for real time measurement and analysis of recuperative currents from electric locomotive acts like antialiasing filter, which is basically low pass filter.For sampling frequency f s =192307.69Hz, a low pass filter with cut-off frequency f c =26kHz was designed.Digital filter do not affect amplitude frequency spectrum from 0 to 26kHz, but all higher frequencies will be damped.
Filter was designed using analog to digital transformation method or design by emulation method.First, analog low pass filter was designed and consequently, this filter was transformed to discrete z-domain by bilinear transform.By use of tabs for design of Butterworth filter, an analog lowpass filter of 6-th degree was chosen.Degree of this filter gives good compromise between computing speed and rate of Bode characteristics.Transfer function of analog filter is in form H s s a s a s a s a s a s a (5) This function was transformed by bilinear transform to z-domain.This two steps can also be performed in reverse.For implementation in microprocessor, transfer function in zdomain must be transferred into time domain.After transformation we get two differential equations, state and output.These two differential equations can be easily implemented into microprocessor.

B. Realization of window function
Because of analysed signal consists of combination of sinusoidal waveforms and duration of transient effects is longer than window, a Hanning window was chosen.This window has good frequency resolution and limited spectral leakage.Realization of the window function consists in multiplication of the window value, with the value of the sample.This is performed by function "void Okno_Hann(float32 *p_pole)".

C. Computing of discrete Fourier transform
For computing of discrete Fourier transform the FFT algorithm with "in place computing" was used.In program, two fields each with 512 samples were used.Both fields were in 16b floating point form.One of the field was for real part and second was used for imaginary part of complex number.For realization of FFT function, standard functionvoid fft(float32*p_real, float32*p_imag) was used.Input to the function is array of real numbers, but computing of imaginary numbers is also possible.Generally, output from the discrete Fourier transform is sequence of complex numbers.From above mentioned function, the output is array of real parts of numbers and array of imaginary numbers.Hence, the input values are overwritten with output values.Advantage of this algorithm is in low memory usage and relatively short time necessary for computing of this function.
For application in real time, computing time of algorithms has big impact on performance of whole device.Time necessary for computing of all algorithms was 6.8µs, whereby single precision 32b floating point operands were used for variables.

D. Computing of amplitude spectrum
For amplitude spectrum computing, function "void Spectrum_Amp(float32 *p_real, float32 *p_imag)" was used.This function reconstruct the frequency axis and compute amplitudes of each harmonic component by where n -is n-th component of Fourier transform, X real is real part and X imag is imaginary part.Function, which resolution is determined by number of samples N, assign the value of amplitude to each frequency from frequency range, whereby identify the spectrum of analysed signal, in our case the current from converter.

A. Simulation results
For verification of proposed algorithm -digital filter and its accuracy, the simulation in MATLAB environment was made.Input to the simulation was signal, which contains 20 harmonic functions.Each function has amplitude equals to 1 and frequencies were in range from 5 kHz to 100 kHz.Sampling frequency was 192 kHz Fig. 6.Amplitude spectrum of original input signal.
where A is amplitude of triangular waveform, whereby for this type of signal it is the same as in previous case ± 1.2 Vdc.Based on (7), the triangular signal is given by sum of harmonic functions whose frequencies are odd multiples of basic frequency.Fig. 11 is showing amplitude spectrum of triangular waveform, where we can see first harmonic and its three multiples (3rd, 5th, 7th harmonics).Higher harmonics can not be clearly identified due to low value of their amplitude.Last type of testing signal was square waveform, which can be described by next formula where A is amplitude of square waveform, whereby for this last case it was again ± 1.2 Vdc.From Fig. 13 can be seen that last testing square wave signal consists higher harmonics whose frequencies are odd multiples of basic frequency and for this type the number of higher harmonics is the biggest compared to previous ones.Based on these trivial measurements we found out proper operation of proposed system suited for real time analysis of current's spectrum.
During initial investigation on target application we found out certain problems with accuracy of spectrum analysis, which are resulting from low accuracy of used current sensor.Therefore future works will also be focused on improvements according to sensing methodologies.Then we would like to utilize this system for identification of higher harmonics during experimental investigation of switching mode power systems suited for railway applications.

V. CONCLUSIONS
In this paper the device for analyzing of spectrum of current was proposed.This device is used for measurement and analysis of recuperative currents from converters in railway locomotive.All system, except the current sensor is in digital form.First, proposed digital filter and computing algorithm for determination of higher harmonic components, shows good results for application as system for monitoring the recuperative currents from converter in electric locomotive.Performance and resolution is limited due to used current sensor, but for proposed application in railway electric locomotive is sufficient.For other application, a processor with higher amount of RAM memory and more accurately current sensor should by used.Final optimization works will be focused on accuracy increase during measurements on target application.Anyway, such solution presents very perspective, low-count design for real time analysis of spectrum of recuperative current.

Fig. 1 .
Fig. 1.Block scheme of system for analysis of recuperative currents.

Fig. 2
Fig. 2 shows schematics for Hall sensor connection with measuring resistor which is suited for current transformation into voltage.Determination of measuring resistor R M was done using next formula

Fig. 6 .
Fig. 6. shows amplitude spectrum of filtered signal.From figure it is clear to say, that frequencies of each harmonic component are clearly identified, but due to spectral leakage, some frequencies are still present also above range of 26kHz.But this problem has only minor impact on application of real time measuring device.Results from simulations also show good accordance with standard MATLAB function fft().B. Experimental results For the experimental verification of functionality of proposed device we have first connected function generator.Then we have been analysing sinusoidal, triangular and rectangular waveform.All signals had frequency of 200 Hz with amplitude ± 1.2 Vdc, and as evaluation software the graphical interface of Code Composer Studio v3.3 have been utilized.

Fig. 8 .
Fig. 8. is showing simple sinusoidal waveform which was

Fig. 10
Fig. 10 and Fig. 11 are showing other type for real time analysis -triangular waveform.For calculation of this type of signal we need to use next formula, which describes sum of infinite series