摘要
详细阐述了利用FPGA设计PID控制器的方法。首先对被控对象进行离散化,在MATLAB中编写数字控制器的仿真程序,其目的在于得到数据的范围要求及精度要求。然后根据该要求,在Quartus II软件中以Verilog HDL语言编写有符号定点加法器、乘法器。同时设计了有限状态机来实现PID控制算法。另一方面,在testbench中编写被控模型状态机以便仿真验证。对上述环境分别进行了开环仿真,单独验证了各模块的正确性。然后将其联合在一起进行了闭环仿真,从RTL数字逻辑电路的角度验证了整体设计的正确性。
This paper elaborates a method of designing PID controller by using FPGA.Firstly,the simulation program of the digital controller is built up in MATLAB to discretize the target,thus obtaining the range and precision requirements of data.According to these requirements,the signed fixed-point adder and multiplier are programmed in Verilog HDL language in Quartus II software.A finite state machine is designed to realize the PID control algorithm for numerical verification.Both open-loop and closed-loop simulation are carried out to verify the correctness of each module and overall design respectively.
作者
何敏龙
肖峻
HE Minlong;XIAO Jun(School of Mechanical and Electronic Engineering,Wuhan University of Technology,Wuhan 430070,China)
基金
湖北省科学技术研究与开发基金资助项目(201397289)
关键词
可编程逻辑门阵列
PID控制器
状态机
闭环仿真
programmable logic gate array
PID Controller
state machine
closed-loop simulation