针对用c语言进行DSP软件设计时编程难度大、寄存器配置复杂等问题,研究DSP基于模型设计的软件开发方法,该方法可提高开发效率,实现控制算法从仿真模型到实时软件的无缝集成。首先给出基于模型设计的DSP软件开发流程,然后将其应用于单相桥式逆变器以单极倍频法产生SPWM波的软件设计。利用Matlab中EmbeddedCoder提供的模块,搭建基于DSPF2812的逆变器SPWM调制模型,并自动生成代码,编译、下载到目标板中运行,实验结果与理论分析相吻合,表明该方法的高效和可行性。
A software development technique for DSP using a method called model-based design was studied aiming at the problem that the DSP software design usually brings big difficulty, complicated register configu- ration when written by C language. This technique can improve the efficiency of development and realize the seamless integration'of control algorithm from simulation model to real-time software. Firstly, a software development process for DSP based on the model-design method was given, and then the method was applied to the single-phase bridge inverter which developed by unipolar & frequency multiplication SPWM generating software. The SPWM model of inverter was built based on DSP 172812 using the module supplied by the Embedded Coder in MATLAB. The code generation is completed automatically, and then compiled and downloaded into the board. The experimental results are consistent with the theoretical analysis, and illustrate the efficiency, and feasibility of the method.