An article is a guide to a pid, the aim is to establish an overall concept for the pid, this one simply describes three methods of modeling pid
For a simple system, we need to focus on the specific composition of the whole system
By the law of Ohm's law circuit and the like, as an element modeling, to give the final model of the system
This way a lot of trouble, not be discussed here
The method of system identification
This method does not require a specific implementation of the system of interest, the processing system as a dual port, the input can be given a desired output
If a heater shown in FIG bread rises after the heater 10 degrees, the equation can be related to the establishment of the heater, the heater is not necessary to know the resistance heating or infrared heat
Also note that if a given input in the system input range to prevent damage to the system
MATLAB simulation
Here to use a system identification tool library of MATLAB
This simulation is modeled on a motor
First need to initialize the model line following variables related to the matlab command
1 |
J = 0.01; |
In simulink model running again, the back matlab, this time will find that the work area more step_input and / img / matlab / motor_speed these two variables
Find the system in matlab toolbox identification tool, open
Data import Choice Time Domain Data , fill in the information in the pop-up window in the figure below, click import
接下来在estimate的下拉框中选择transfer function model,点击estimate,运行完后,如图所示把结果tf1拖入to workspace
此时在MATLAB的工作区中应该能看见tf1这个变量,在命令行输入tf1,就能看见传递函数
1 |
>> tf1 |
回到simulink,修改DC Motor Transfer Fcn为对应的传递函数,开始仿真。
仿真结束后打开scope查看,结果如下图
从结果可以看出这个传递函数是正确的
对现有非线性模型线性化
这个方法和前面系统辨识的方法很类似,不过上一个方法使用的是模型的输入输出结果建立模型,这个是通过对系统线性化得到模型
MATLAB仿真
如下图所示,先添加linear analysis points
在菜单栏打开Analysis->Control Design->Linear Analysis..
如下图所示,设置t=2,点击Step Plot 1,双击点开linsys1,显示线性化的选项选择Transfer Function
如下图所示,验证这个传输函数的正确性
可以看出这个传递函数是正确的