资源简介

基于FPGA的噪声产生电路,用MATLAB设计噪声仿真程序,产生仿真数据的方法。并利用FPGA模拟信号。其中有详尽的matlab仿真程序,FPGA仿真结果以及总的设计报告。

资源截图

代码片段和文件信息

clear all
clc
N=1024;
q=input(‘请输入1或0(输入1产生有色噪声,输入0代表产生白色噪声)‘);
switch q
    case 1
         %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
         %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
         %function y=Randn_ab(Nab)%%%%%%%%%%%%%%%有色噪声
         % N为随机序列长度;
         a=input(‘请输入噪声均值‘);
         b=input(‘请输入噪声方差‘);
         x1=randn(1N);
         y1=a+sqrt(b)*x1;
         figure(1);
         plot(y1);
         title(‘有色噪声时域图‘);
         fid=fopen(‘noise.dat‘‘wb‘);
         fwrite(fidy1‘uint16‘);
         % 把产生的随机数存储到文件noise.dat;
         %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
         %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%白色噪声
    case 0
         Pow=input(‘请输入白噪声的功率‘);
         y2=wgn(1NPow);
         figure(1);
         plot(y2);
         title(‘白色噪声时域图‘);
         fid=fopen(‘noise.dat‘‘wb‘);
         fwrite(fidy2‘uint16‘);
         fs=2.5*10^6;
         [corylag]=xcorr(y2‘unbiased‘); 
         figure(2);
         plot(lag/fscory); 
         title(‘白噪声的自相关函数图‘);
         cory=[zeros(11023)cory(1024)zeros(11023)];
         fc=fft(cory); 
         cm=abs(fc); 
         fl=(0:length(fc)-1)‘*fs/length(fc); 
         figure(3);
         plot(flcm);
         title(‘白噪声的功率图‘);
end

 属性            大小     日期    时间   名称
----------- ---------  ---------- -----  ----

     文件    1605942  2008-12-17 10:57  课程设计\grtyht.bmp

     文件      77878  2008-12-17 09:47  课程设计\TEK0000.BMP

     文件      77878  2008-12-17 15:53  课程设计\TEK0001.BMP

     文件       1941  2008-12-05 08:56  课程设计\yan\counter00.bsf

     文件        854  2008-12-05 08:56  课程设计\yan\counter00.inc

     文件       4053  2008-12-05 08:56  课程设计\yan\counter00.v

     文件       3374  2008-12-05 08:56  课程设计\yan\counter00_bb.v

     文件       9861  2008-12-02 20:19  课程设计\yan\db\altsyncram_i631.tdf

     文件       4613  2008-12-02 20:19  课程设计\yan\db\cntr_jeh.tdf

     文件        140  2008-12-02 20:39  课程设计\yan\db\wed.zsf

     文件        945  2008-12-17 09:25  课程设计\yan\db\zdrand.(0).cnf.cdb

     文件        554  2008-12-17 09:25  课程设计\yan\db\zdrand.(0).cnf.hdb

     文件       1365  2008-12-02 20:19  课程设计\yan\db\zdrand.(1).cnf.cdb

     文件        512  2008-12-02 20:19  课程设计\yan\db\zdrand.(1).cnf.hdb

     文件       1373  2008-12-02 20:19  课程设计\yan\db\zdrand.(2).cnf.cdb

     文件        738  2008-12-02 20:19  课程设计\yan\db\zdrand.(2).cnf.hdb

     文件       1456  2008-12-02 20:19  课程设计\yan\db\zdrand.(3).cnf.cdb

     文件        553  2008-12-02 20:19  课程设计\yan\db\zdrand.(3).cnf.hdb

     文件       1134  2008-12-02 20:19  课程设计\yan\db\zdrand.(4).cnf.cdb

     文件        632  2008-12-02 20:19  课程设计\yan\db\zdrand.(4).cnf.hdb

     文件       2631  2008-12-13 13:47  课程设计\yan\db\zdrand.(5).cnf.cdb

     文件        574  2008-12-13 13:47  课程设计\yan\db\zdrand.(5).cnf.hdb

     文件       1054  2008-12-02 20:19  课程设计\yan\db\zdrand.(6).cnf.cdb

     文件        496  2008-12-02 20:19  课程设计\yan\db\zdrand.(6).cnf.hdb

     文件       1058  2008-12-02 20:19  课程设计\yan\db\zdrand.(7).cnf.cdb

     文件        589  2008-12-02 20:19  课程设计\yan\db\zdrand.(7).cnf.hdb

     文件       1641  2008-12-02 20:19  课程设计\yan\db\zdrand.(8).cnf.cdb

     文件        639  2008-12-02 20:19  课程设计\yan\db\zdrand.(8).cnf.hdb

     文件       1516  2008-12-17 09:16  课程设计\yan\db\zdrand.analyze_file.qmsg

     文件       1602  2008-12-17 09:25  课程设计\yan\db\zdrand.asm.qmsg

............此处省略110个文件信息

评论

共有 条评论