当前位置:文档之家› 单片机指令冗余技术

单片机指令冗余技术

单片机指令冗余技术通过引用单片机技术,传感器在实际测量中,每当轴转动一周后,就对传感器的输出特性曲线进行定量修正,这样就能基本解决由于被测物体材质的不均匀性给测量结果带来的确定性干扰。

By referencing single-chip computer technology, sensor in actual measurement, whenever axis rotation after a week, it quantitatively correction of sensor output characteristic curve, so it can basically solved due to the inhomogeneity of material object to be tested to measure the results of deterministic disturbance.在实际工作中,确定性的干扰传感器常常会产生一个确定性的干扰,这是由于传感器的自身结构特点或者外界环境的影响决定的,而这种干扰通常可由单片机来解决。

例如电涡流位移传感器在实际的工作中,由于被测物体材料的均匀性和导磁性的不同,会给测量结果带来一定的影响。

轴承中轴的位置,需要进行精确的测量,但是由于轴表面不均匀的材质。

会使测量变得困难。

轴在转动过程中,虽然其位置保持不变,但传感器仍会有电压的输出,这样得到的测量结果会有很大的误差。

由于轴在每次转动中产生的位移保持不变,所以这种干扰也可以说是确定性的。

In practice, a deterministic interference sensor often produces a deterministic disturbance, this is due to their structure characteristics of the sensor or the influence of the external environment, and this kind of interference usually is solved by the single chip microcomputer. Such as eddy current displacement sensor in the actual work, due to the uniformity of material object to be tested and magnetic conductivity, will bring certain influence measurement results. Bearing axial position, need to be measured accurately, but due to the shaft surface uneven material. Will make it difficult to measure. Shaft in the rotation process, although its position remains the same, but the output of the voltage sensor will be, the resulting measurement results will have a lot of errors. Due to the axial displacement of at every turn of remain the same, so the interference is also can be said to be deterministic. 2.2 随机干扰传感器的工作环境往往是比较恶劣和复杂的,其应用的可靠性、安全性就成为一个非常突出的问题。

所以,需要在工作中尽量减少干扰。

提高输出信号信噪比的问题,是传感器研究中的最大难题之一。

但是实际上在传感器的使用中,单片机可利用软件来部分消除随机干扰,下面介绍一些在软件抗干扰用到的方法。

2.2.1 指令冗余法单片机受到干扰后,往往会把操作数当作指令码来执行,引起整个程序的混乱和程序弹飞。

如果程序弹飞到某一条单字节指令上时,就不会发生将操作数当成指令的错误,而能自动纳入正轨。

当弹飞到双字节或三字节指令的操作时,程序将继续弹飞。

因此,在程序中插人几个单字节的空操作指令nop,就可以保护其后面的指令不被拆散而被完整地执行。

2.2.2 软件陷阱法系统中未使用的单元用跳转引导指令填满,作为软件“陷阱”,以捕获“飞掉”的程序,并强行将捕获的程序引向一个特定的地址,由一段专站处理错误的程序进行处理,以恢复系统的正常运行。

2.2.3 软件“看门狗,(watch dog)法”watch dog 即定时监视器,俗称“看门狗”,当侵人的电磁干扰使系统程序弹飞,或进入死循环,或死机时,watchdog能够帮助系统自动恢复正常运行。

3 在传感器发展方面的应用目前。

成熟的传感器品种规格繁多,长期以来。

由于传感器的输入输出信号符不相同,其原理和电路也差别较大,使得传感器的标准化工作进度较慢。

给传感器的用户带来了很多的麻烦。

同时,也不利于传感器及测试仪器的发展和在更广阔领域的应用。

但是,随着单片机成本逐渐的降低,运算能力的提高以及体积的减小,会给传感器机及测试仪器的发展带来积极的影响。

传感器接收外界的压力信号x并产生一个输出信号y,再由接口电路和a/d模数转换器对其进行处理后,输出可由单片机接收的数字信号y,最后由单片机对其处理后,即可得到经过修正的标准输出yc。

一般在标定传感器的过程中,输入校准温度和压力点,然后测出x~y的数据,最后用二元函数插值法来修正传感器的非线性误差。

2.2 random disturbance sensor work environment tend to be more severe and complicated, the application of the reliability, security has become a very prominent problem. So, we need to minimize interference in the work. To improve the SNR of output signal problem, is one of the biggest problems in the study of the sensor. But actually in use of sensor, microcontroller part can use software to eliminate the random disturbance, some used in the software anti-interference methods described below.2.2.1 instruction redundancy method microcontroller interference, often as the operands of the instruction code to execute, cause the whole program of chaos and fly out. If the program play fly to a a single-byte instruction, the operands as instruction will happen error, and can automatically into the right track. When play to double byte or three bytes instruction operation, program will continue to fly. , therefore, in the program into several single-byte nops instruction nop, can protect the following instructions will not be apart and be fully implemented. 2.2.2 software trap method is not used in the system unit filled with jump boot command, as a software "trap", to capture the "fly away" program, and forced the capture program leading to a specific address, handled by a dedicated stand the wrong application for processing, to resume the normal operation of the system. 2.2.3 software "guard dog, watch dog) method" watch dogregularly monitor, commonly known as "guard dog", when shooting ricochet and electromagnetic interference of the system program, or into an infinite loop, or crash, watchdog can help the system automatically return to normal operation. 3 in application at present. With the development of the sensor Mature sensor specification is various, for a long time. Due to the input and output signals are not the same sensor, the principle and the circuit is also difference is bigger, the sensor of the standardization work progress is slow. For sensor users has brought a lot of trouble. At the same time, also against the development of sensor and testing instruments and in the broader field of application. But as SCM gradually reduce the cost, improve operation ability and the decrease of the volume, will give sensor machine and bring positive impact on the development of testing instruments. Sensor receives the pressure signal and generates an output signal x y, then the interface circuit and a/d analog-to-digital converter for after processing, the output can be received by single chip digital signal y, finally by the single chip microcomputer after the processing, can get the revised standard output yc. Generally in the process of calibrating sensors, input the calibration temperature and pressure points, and then determinate the x and y data, finally using binary function interpolation method to modify the nonlinear error of sensors.。

相关主题