0 introductions
Develops unceasingly along with the electrical power system and uses electricity the load unceasing growth, in electrical power system’s electrical energy quality question is getting more and more prominent, on the one hand, the massive sensitive load is getting higher and higher to the electrical energy quality’s request, but on the other hand, more and more misalignment loads unceasingly turn on the electrical network, causes the electrical power system overall the electrical energy quality condition to worsen unceasingly.
The overtone is in the electrical energy quality a very important aspect, the overtone existence the harm which produces to the electrical power system has the following several aspects:
1) possibly causes the electrical power system relay protection installment and the automatic device produces moves by mistake or resists to move;
2) causes each kind of electrical equipment to have the stray losses and to give off heat, causes the electrical machinery to have the mechanical vibrations and the noise;
3) the harmonic current flows in the electrical network increases the loss, affects the electrical network and each kind of electrical equipment’s economical movement;
4) the harmonic current through functions and so on electromagnetic induction, capacitive coupling as well as electrical conduction, has the disturbance to the periphery communications system;
5) the overtone causes in the electrical network the widespread use each kind of measuring instrument to have the error;
6) increased in the electrical network to have the overtone resonance possibility, thus created the very high electric current or the overvoltage initiates accident’s risk.
Is day by day serious along with the overtone pollution and to the electrical energy quality requirement enhancement, is also getting higher and higher to harmonic suppression’s request, how carries on the filter according to the scene overtone pollution condition to throw cuts also to become more important. In view of this kind of situation, has developed one kind of overtone controller, it may and so on carries on the monitor to the scene overtone and the idle work, carries on according to the scene overtone condition to the filter throws automatically cuts, achieves suppresses the overtone, the improvement electrical energy quality goal. Following introduction based on DSP chip TMS32LF2407 overtone controller hard, software design.
1 overtone controller’s hardware design
The overtone controller’s basic principle is real-time to the electric current, the voltage carries on the sampling, will pick data carries on the data analysis after D5P, obtains the scene overtone condition, thus decision-making whether to carry on to the filter throws cuts.
American TI Corporation produces TMS32LF2407 the DSP chip is section of high performance 16 fixed point DSP, this series DSP controller real-time signal processing ability and controller peripheral device function collection in a body, especially qualify in industrial control application. Its chip power line voltage is 3.3V, reduced controller’s power loss. Reaches as high as 40M 1PS to carry out the speed (the work upper frequency is 40MEz), internal has 32K the character Flash procedure memory, 544 character’s DARAM and 2K character SARAM, may outside expand the memory altogether to have: the 194K character space, internal integrated watch-dog (WDT); Provides reaches 16 group analog inputs 10 A/D, the smallest switching time is 375ns; Reaches as high as 40 to be possible to program or the multiplying general input/output pin alone. Has the low cost, the low power loss, the high speed operational capability and the high performance handling ability merit. Therefore, this DSP chip may make for this reason the system master control chip request satisfiedly.
Develops overtone controller’s hardware structure drawing as shown in Figure 1.

May know through Figure 1, this hardware circuit mainly includes the sampling circuit, the central processing element, the reset circuit, the keyboard and the liquid crystal display function, the implementing agency and so on several parts. Below supposes in the juice on the hardware circuit to want the special attention the place to carry on elaborated:
1.1 sampling circuits
Because TMS32LF2407 the chip AD sampling most greatly can only send in 3.3V the voltage signal, therefore, before the electric current, the voltage signal delivers the AD mouth must carries on the recuperation after the current transformer and the voltage transformer, to cause the introduction the signal to be exempt from the outside the disturbance, the mutual inductor type’s choice and recuperates the electric circuit anti-thousand to harass needs to pay attention specially. In addition, the sampling circuit should also probably pay attention a spot is: Because the TMS32LF2407 AD mouth is very frail, i.e. the AD mouth cannot send in the peak value to surpass 3.3V the voltage signal, otherwise the AD mouth will be burnt out, therefore, best increases a limiter circuit. Concrete recuperation electric circuit as shown in Figure 2.

1.2 zero crossing detection electric circuit
In order to enable the main chip to realize the synchronized sampling, then enhances the data processing the authenticity, therefore, should join the zero crossing detection electric circuit in the electric circuit. The zero crossing detection electric circuit is also the square-wave has the electric circuit, it is playing the very vital role to the wave analysis synchronization sampling. It becomes the voltage signal the same frequency the square-wave signal, DSP along tracks through the capture square-wave rise the mains frequency, has provided the condition for the guarantee synchronization sampling. Concrete examination electric circuit as shown in Figure 3.

1.3 execution units
In the execution unit, relay’s electric power supply is 12V, but the DSP electric power supply and the IO mouth output’s high level is 3.3V, to prevent to be higher than 3.3V the voltage to introduce DSP, caused DSP the damage, the black-white control signal output to use the light pair component 817 to carry on the isolation, the relay switch side uses anti- has allowed the absorbing circuit to reduce when the switch opened and closed impact. Concrete electric circuit as shown in Figure 4.

2 overtone controller’s software design
Software design’s core is carries on the analysis to the signal harmonic component, DSP in two signal period sampling 128 spots, carries on based on these sampling points the fast Fournier transformation (FFT) operation, thus analyzes obtains in the signal the overtone content. Harmonic component’s analysis precision is decided by the FFT precision and the synchronized sampling. When the sampling frequency is the signaling frequency integral multiple, namely realizes the synchronized sampling, uses the rectangular interruption, and carries on the spectral analysis with the FFT algorithm, will not have any divulging phenomenon, may the precise regenerated signal frequency spectrum. If can achieve the synchronized sampling automatically, does not need to algorithm’s request to be too high, because, after synchronized sampling, uses the rectangular window to carry on FFT, the rectangular window means that the sampling the data may take the FFT sub-function directly the input. The zero crossing detection electric circuit is to realize the synchronized sampling, the square-wave rise which the DSP capture square-wave electric circuit produces along, may extract the square-wave frequency is the signaling frequency. According to this of frequency may determine that sampling interval time between the sampling time and two spot (two AD transforms the time), bites through this method realizes the synchronized sampling, obtains the precise frequency spectrum. Before each time the FFT operation, can act according to the actual electrical network conversion sampling strategy, makes the response rapidly in several cycles to mains frequency’s change, like this enhances the survey the reliability and the solid 吋 nature.
Alternating voltage u(t) and electric current signal i(t) each cycle carries on N time the sampling, obtains the discrete value is u(n), i(n), obtains the discretization voltage, the electric current effective value and the active power formula for (N is sampling points)


According to P=UIcosθ may extract the power factor, then obtains the idle work. May obtain various subharmonics according to the FFT result the content, may obtain total overtone distortion factor (THD) after the computation, was the DSP control relay throws cuts the filter to provide the basis.
Figure 5 is DSP carries on the data analysis the flow chart.

3 antijamming designs
The disturbance mainly has the conduction and the radiation pattern two broad headings, the former performance for interference current and voltage, the latter performance for disturbance electric field and magnetic field. The influence intelligence trip’s noise source has current collector’s surge current; The intercom, the handset and so on produce radio-frequency radiation; The intelligent trip internal switching power supply and cuts the wave release electric circuit and so on. These noise source’s existence caused the procedure to die, unwanted signal introduction electric current voltage, thus caused the data analysis result and the actual disparity is big, caused the relay to throw by mistake cuts. In order to reduce the influence which thousand harass, needs takes the corresponding measures on the hardware and the software.
3.1 hardware antijamming
Adopts the measure includes:
1) the reasonable wiring, causes the digital circuit and the analogous circuit altogether accepts after checking for the aerosol working, namely system various return routes’ datum electric potential interconnection in together and is not connected with the earth, such system has the strong antijamming ability;
2) the analogous circuit and the digital circuit separate the earth, finally converges again to a spot; Cuts the wave bleeder circuit after the start work, presents the very high transient state disturbance, (main engine) and the simulation (A/D) separates after logic, this kind of disturbance falls to is very low;
3) the line board and the primary device surface spurt the insulating layer, not only this is moisture-proof and the insulation need, moreover thousand harasses to against electromagnetism also has the very vital role; Spreads the metallic shield level in the cabinet, forms the equipotential shield, also has the very big shielding effect to the electromagnetic interference;
4) in the voltage-stabilized source, the insulating transformer rear end installs the filter circuit, this filter circuit can cause in the firing line and the zero curve thousand harasses the electric current to obtain the weaken;
5) between the weak electricity and the strong electricity needs to isolate frequently, the commonly used isolation way has the electro-optic to isolate, the transformer isolation, the relay isolation and so on; In this system uses the light pair component 817 pair of DSP outputs the weak electricity control signal and the relay strong electricity carries on isolates, because the electro-optic isolated has guaranteed between DSP and the relay the radio direct relation, thus had guaranteed the signal normal transmission, has assured the DSP security.
3.2 software antijamming
On the software the antijamming method has the following several kinds:
1) receives the disturbance for the arresting gear to enter “halts” the condition, joins some monitoring measure in the procedure to carry on the deadbolt lock examination using watch-dog (watchdog) to the procedure, when necessary automatic reset; In the use interrupt vector area, the blank procedure area establishment software trap, the force procedure has not run flies later can return to the mal orbit to come up; Reads in the redundant instruction in the essential place, adjusts the command length, prevents the procedure to be chaotic;
2) carries on the digital filtering to the sampled signal first to carry on the distinction to each sampling point, let it with the neighboring value, recently the value as well as the increment maximum value carries on the comparison, according to the symmetrical examination law, the restriction examination law judged whether was the unwanted signal; Carries on the data which to the recent sampling’s spot the FFT computation obtains with the first several time data average, leaves “the different races”.
In addition, makes the improvement in data processing’s algorithm, can also sharpen system’s antijamming ability greatly, but, this often is take sacrifices the word length as the price, how to regard the actual project request as for the choices to decide.
3.3 other measures
In this system, the DSP chip besides carries on the data acquisition and the analysis, but must realize to the keyboard and the liquid crystal display control, such DSP work load is very arduous, the design will not be slightly comprehensive will present the interrupt conflict phenomenon, will bring the very major difficulty for the debugging. Therefore, may adopt in the system increases together the monolithic integrated circuit 51 chips, uses in managing the keyboard and the liquid crystal display. The monolithic integrated circuit 51 chip’s prices are very now cheap, in the system introduces the 5l chip not to be able to cause the cost to be excessively high. Because time normal operation, DSP and the monolithic integrated circuit carry on the data exchange through pair of mouth RAM, other internal procedures mutually will not disturb, therefore, has brought enormous convenient to the debugging, simultaneously, most greatly possibly reduced the possibility which the procedure will run flies.
4 conclusions
The passive filter is suppresses the overtone the important means that it is widely applied in electrical network’s harmonic suppression, at present the passive filter mainly depending on manually carries on throws cuts, like this both waste manpower, and cannot achieve the ideal effect, cannot satisfy the request which the electrical energy quality enhances day by day. Pollutes the principle which according to who who governs, the overtone pollution must by user eliminate, therefore, developed one kind to be able to carry on the monitor control to the overtone the installment both to facilitate the user, and had the broad market prospect.