Modern information society and the development of modern industry, security monitoring system are working in the harsh environment. How to reasonably design, security monitoring system to ensure the reliability of system, and is an important part of the microcomputer control system design. In this paper, according to the classification of interference sources, may enter the microcomputer control system is introduced in this paper the various interference sources, and the corresponding hardware and software anti-jamming measures.
Modern information society and the development of modern industry, due to the enough attention to the electromagnetic compatibility of electronic equipment, the electromagnetic radiation is everywhere, so the security monitoring system are working in the harsh environment. How to reasonably design, security monitoring system to ensure the reliability of system, and is an important part of the microcomputer control system design. A complete microcomputer control system, therefore, not only the requirement for real-time accurate, reliable and stable, otherwise can only stay in the laboratory stage, cannot be applied to the scene, lost practical value.
Thus, security monitoring system in the design of microcomputer control system in anti-disturbance solutions, the first is to seize the main interference sources, in order to try to reduce its energy and peak, then stop the rest into the system. The following according to the classification of interference sources, may enter the microcomputer control system is introduced in this paper the various interference sources, and should take the corresponding hardware and software anti-jamming measures.
The source of interference in microcomputer control system and hardware anti-jamming measures
Space radiation interference
The interference is mainly from high-power transmitter, such as radio, radar, high-power electric appliance etc. They through space electromagnetic induction interference signal in the lead, the power cord. Our common oscilloscope, TV, computer, etc. Also can produce this kind of jamming signal. Solution is to deal with this kind of interference shielding. And the kinds of shielding is as follows:
1, electrostatic shielding (Faraday shield) : earth screen, used to prevent the influence of high frequency electromagnetic field;
2, electromagnetic shielding, used to prevent electromagnetic field;
3, magnetic shielding: mainly used in the low frequency electromagnetic field, the influence of high permeability coefficient can prevent induction.
There are two kinds of shielding grounding:
4, and signal ground FuXuan and pick up the earth. It is mainly used in the processing of weak signal (such as data acquisition);
5, connected to the signal ground. It is mainly used for general system.
The power supply voltage pulse interference
Generally, the gradual change of supply voltage and instability, can inhibit by ac voltage stabilizer and dc voltage stabilizer, but they will change to the power supply ripple is powerless. The pulse changes generally comes from high-power load start-stop, lightning, etc.
Usually, the power interference suppression methods are:
1, adopt ac voltage stabilizer or UPS uninterruptible power supply power supply;
2, choose high permeability material of magnetic core C type transformer, quad USES symmetrical line package structure, initial stage and screen;
3, resistance and pressure resistance transformer noise filter;
4, independent power supply, to reduce the mutual influence of public power;
5, adopt different phase sequence power supply, to reduce the effect of each other;
6, the switch power supply and non inductive power supply;
7, using isolation transformer, etc.
The I/O port line interference
Usually, due to the I/O port line directly connected to the signal detection, controlled equipment peripherals, so it is also one of the main channels of interference.
Deal with the interference of the main measures are:
1, using photoelectric isolation (for digital signals) and isolation amplifier (to the analog) to the system in place to isolate each part;
2, high frequency signal as far as possible away from the line when wiring, middle ground shielding;
3, the power cord and signal lines separate;
4, any I/O lines and try to short the power cord and and away from the coil and transformer;
5, different to take quarantine measures;
6, to the input signal using a RC filter, the interference signal has a lot of attenuation (especially for high frequency interference suppression).
The I/O signal transmission line interference
When I/O signals must be used long term transport, on the long term is the common mode interference or noise induced voltage. Way to deal with the interference are:
1, improve the signal level value or change the way of signals. In general, the current transmission is superior to the voltage, the digital signal transmission is better than that of analog signal transmission;
2, choose reasonable transmission line and load, as far as possible with a standard cable and twisted pair transmission. Because they have anti-interference effect, and also note that in the transmission line impedance matching and filtering circuit;
3, rational design of interface circuit, had better use isolation transmission way;
4, choose reasonable transmitted waveform;
5, line is not parallel to the power line, make the signal lines from the interference of strong magnetic field;
6, the input and output line adopts wear pipe laying way;
7, on the line as far as possible to avoid in the process of laying, launching and ventilation, such as metal pipe;
8, because the phone lines on the grounding and lightning protection measures, such as a mature, thus can use telephone line transmission.
Ground interference
Due to current, can produce a potential difference between the ground, which affects the change of the input level. This may according to need, for single point and multi-point grounding, can also be used for ground isolation.
Grounding method generally have mixed ground system, ac/dc grounding system separately, one-point earthing system and suspension grounding system, etc. In addition, in three phase four wire system of power distribution network, is a neutral point grounding directly, according to procedures often need to repeat grounding, this can greatly eliminate caused by unbalanced load each alternate with neutral line current and leakage current, and caused by the current of the neutral point potential drift. Obviously, can set up special grounding, and adding a neutral on the power of the feeder line. To this kind of grounding method, as long as the chosen special grounding resistance (shall not be greater than 4 Ω) can achieve a certain effect.
General ground to coarse, d/a. Digital ground interference big, need to build a little public land, to separate each part line.
Other interference
The interference and other components of internal thermal noise interference, bus competition interference, etc. Usually, can use high quality components and reasonable circuit design to solve.
Automatic reset circuit of high reliability
Reset of the CPU is the precondition for the system to work normally, should pay attention to its reliability. In order to prevent the CPU can't work normally after disturbance, generally with automatic reset circuit, to restore its normal work.
Microcomputer control system of software anti-jamming measures
In anti-interference, the role of the computer software. To take correction, compensation and filtering in the application software, and hardware anti-jamming measures complement each other, combination, form a strong anti-interference measures. Software measures can be very effective, simple and often, and modify the easy and economy. Because software anti-interference does not need to increase equipment, only need to make the corresponding processing on the program.
TV monitor control system with microcomputer system software is an important difference, is the anti-jamming design of the software. It design the specific method is:
Inspection procedures for hardware equipment
Application of microcomputer for the checking method of the hardware of the similar to electricity self-inspection, right after it is used to ensure that the program running environment. General, self-check the error to the police, so that operators know the situation in a timely manner and process faults.
Software redundancy of anti-jamming
Software redundancy anti-jamming method has two meanings: for a single equipment, the high reliability of the CPU is mainly used to store the entire device I/O port information, and use this information to refresh the I/O mouth regularly, to ensure that the I/O mouth after interference, can return to normal in a timely manner; Available for the whole system, main controller working conditions better equipment such as high reliability, the performance of the storage of the whole system equipment, and regularly by telecommunication lines to refresh the system equipment, to ensure that the equipment after the interference, can guarantee the normal working condition. Using this method, such as with the automatic reset measures in the following, the effect will be even more significant.
Automatic reset measures
The execution of the program itself is closed, but due to the CPU bus, program memory after interference, will affect the normal execution of the program. In order to keep the program after the interference, can return to normal working condition, usually adopt the following two methods to guarantee.
1, the space distribution program
Space is reasonable allocation program, where unused and jump instruction, guarantee program can jump back to normal. But this method is the premise of the normal work of the CPU to do, but sometimes interference can damage the CPU working conditions, and make the CPU not to work, and produced the following an automatic reset method.
2, automatic reset
The principle of automatic reset method is that a monitoring program is arranged in the program in the loop body, which is in the normal program execution, in a line to produce a certain cycle and the pulse width of the signal, the pulse to reset detection circuit. Once the CPU work is unusual, the detection circuit will send a reset signal to CPU, in order to restart the equipment work. Detection circuit usually has two work modes:
A, a constant level test: it used to trigger type monostable circuit, using the above signal continuously triggers the monostable circuit, so as to guarantee the normal output, and once the trigger circuit loss, monostable circuit will reset signal is given.
B, timer test: it USES a oscillator pulse count, the CPU is given periodic signal is used to reset the counter, and once the reset signal disappears, the overflow to produce a signal reset CPU counters.
In most of the equipment, reset monitor only provides a periodic signal is not enough, because once the CPU reset, will destroy all status, such devices are not reliable for users. In order to guarantee the process transparent to users, generally USES the following methods: when the CPU reset, does not affect the content of the internal RAM. Therefore, the use of the characteristics of internal RAM, after can be in electric reset, after power on the RAM for a sign. According to this flag, the CPU can judge is power on reset, or automatic reset after disturbance. And will be executed segmentation, entering a period in RAM as a marker and equipment status of each I/O port is RAM, so once the automatic reset, you can write the information to the I/O port, to ensure the continuous of equipment state, at the same time the original program execution, so as to ensure the continuity of the program is running. After using this method, ensure the automatic reset process transparent to users, to improve the stability and reliability of the equipment.
Other software anti-interference
1, the digital filter
This filter is, leaching, due to the interference in the process of sampling and superimposed on the sampling values of components. Composition of interference is different because of various parameters, so the way to filter the interference is also different. Commonly in use, can choose according to the circumstance several digital filtering methods:
A, first-order inertia filtering method: first-order inertia filtering is a dynamic filtering method, practice has proved that it is a kind of more effective filtering method, especially for low frequency component and periodic, pulse interference, some have very good effect, can make up for the inadequacy of the RC filter. The basic formula for computer
Y (n) = beta (n) + x (1 - beta) y (n - 1) (1)
Type of x (n) is the sampling value; Y, y (n) (n - 1) is this, the last filter output value; Beta is the filter coefficients.
Different sampling parameters and the interference of ingredients, filtering different value of coefficient of beta. Beta value choice is very important, usually beta value range of 0 ~ 1, usually take around 0.75.
B, recursion average filtering method: this filtering method is frequent oscillation in the sampling signal value, at this time of using recursion average filtering method could be smooth. The basic computer formula is:
Type, y (k) is the first k N of recursive average; Y (k - I) is the first item I forward recursive measurements; N is recursive average number of items.
The choice of the value of N, to the smoothness and reaction of the sample average sensitivity has direct relationship. N choose too large, although the average effect is good, but take up machine time is long, and the reaction is not very sensitive to parameter change; N selected too small, the effect is not significant, especially for pulse interference. N how much, depending on the system actual sampling parameters and production conditions. Under normal circumstances, the flow rate: N = 12; Pressure: N = 4; Temperature: N = 1.
C., limiting filtering method: this kind of filtering method is, in the industrial field sampling, by those big random disturbance or distortion caused by poor transmitter reliability, will cause the large size of the input signal, thereby cause misoperation of the computer system. In this case, generally available to the limiting filtering method to anti-jamming.
2, the output limiting
There is interference in control circuit, the signal of the series, the possible or producing small oscillation output signal dramatically change. To make the system in the special cases can be normal steady output, in order to protect the security of the actuator, output limiting link must be set. Once the output reach or exceed the limit value, it should be sent to the actuator signals by the clamp.
3, the computer will not use all the memory unit into a FFH
When a fly, if a program "fly" to buy into FFH unit, will perform the RST 38 H instruction. If in 0038 H unit into a transfer instruction in advance, to make it into the entry of the user program, is not "crash" phenomenon.
4, to do not use the way of interrupt processing
To do not use the way of interruption of the I/O entrance, all to be transferred to a user program, but also prevent "crash" phenomenon of a kind of measure.
Communication error correction coding in the software of the system
Still have a kind of anti-interference measures, is the system software of the communication error correction coding. Is the purpose of this kind of error correction coding, guarantee the correctness of the system. In most of the systems, equipment channel is one-way, is missing, the command code in order to ensure the automatic retransmission is not realistic, back can only will be the focus of the reliability assurance measures, in a communication code error correction.
Usually adopts the method of communication code error correction coding, divided into two categories:
1, the redundant code
Redundancy communication is send each code multiple times, the receiver of software, taking most of the way to implement. Usually USES the three choose two methods, specific points, according to bytes, and according to two kinds of methods to send and judgment. Using the redundancy of communication method on the downside, take up the channel time is long, cannot display more than one fault. And the control system of channels are very few, take up too much time channel, thus affects the real-time performance of system.
2, error correction coding communication
Generally, under the condition of the system real time capability, according to the characteristics of the channel, can choose the appropriate type of encoding and decoding, commonly used are: the hamming code, dual codes, cyclic code, BCH code and convolution code, etc. About these knowledge is beyond the content of this article, the reader can consult relevant information according to the specific situation to choose a suitable type.
conclusion
From the above introduction, can know to design a security monitoring system of microcomputer control system, must pay attention to interference from all sides, and adopt corresponding countermeasures in software and hardware anti-interference measures.