Giter Club home page Giter Club logo

ar_model's Introduction

功能介绍

  1. zx_fft.c/h实现了FFT功能(包括实数FFT)
  2. mem_alloc.c/h中包含了内存管理功能,参考uCOS II移植过来,方便嵌入式应用(ar_model.c中多处调用)
  3. zx_correl.c/h用定义实现了互相关(定义的实现方法其实效率很低,我在Github/FFT提供了使用FFT计算互相关函数的C代码)
  4. ar_model.c/h中使用Levinson方法及FFT实现了PSD随机信号的功率谱估计
  5. test_mem_alloc.c/h提供了一个使用参考实例
  6. 更新:用tiny_mm的内存管理方法替换ar_model中用到的mem_alloc内存管理方法;ar_model中pyulear函数中使用fft计算自相关函数。

本例程用C和Matlab实现了PSD功率谱的计算,并通过Matlab绘制了Matlab与C计算结果的对比:

对音频文件testcase.wav分别使用matlab和c计算AR谱结果对比:

使用方法

  • 运行wave_to_c.m程序,选择*.wav文件,执行后将音频数据写入到testcase.h头文件文件

  • 执行Makefile编译C程序,运行将执行结果重定位到了a.txt文件(gcc版本3.4.4)

     make
     make run
    
  • 执行disp_result.m查看C计算的结果与Matlab计算功率谱结果的对比

使用时注意输入信号长度为N的信号x的存储区长度要为2N,因为相关运算结果长度为原信号的2倍!

作者信息

[email protected]

University of Science and Technology Beijing(USTB), MICL.

ar_model's People

Contributors

xiahouzuoxin avatar

Watchers

 avatar  avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.