摘要
本文提出了一种在MATLAB下获得真随机数的方法,为一些复杂的科学计算提供了可靠的随机数源。系统由随机数产生系统、数据传输系统和MATLAB数据接口系统三个部分组成。8位高速AVR单片机ATMEGA128控制RC充放电电路完成基本真随机数据收集;数据通过RS232接口从ATMEGA128传输到计算机串行设备中;在计算机中,MATLAB采用专用的调用接口把真随机数据从串行设备中读取到MATLAB运算平台中为未来科学计算服务。文中介绍了具体实验验证情况,对实验结果进行了分析,同时对真随机数的应用范围和性能提高方面做了阐述。本文产生随机数的方法简单可靠,软件通用性强,硬件与MATLAB接口良好。
This paper presents a method to obtain true random numbers in MATLAB, and provide a reliable source of random numbers for some complex scientific computing. System consists of three components: random number generation systems, data transmission systems and MATLAB data interface system. High-speed 8-bit AVR microcontroller ATMEGA128 collects basic data by controlling the RC charge and discharge circuit; Data transfer from ATMEGA128 to the computer serial device through the RS232 interface; In the computer, MATLAB reads the true random data using a dedicated call interface to MATLAB computing platform for the future of scientific computing services.
出处
《微计算机信息》
2011年第2期221-222,199,共3页
Control & Automation