Merge branch 'master' of http://www.scserverddns.top:13000/sc/DyeingComputer
This commit is contained in:
commit
c0b3dd9e75
2 files changed
+18
-9
No files matched your search
@@ -19,6 +19,7 @@ namespace DyeingComputer.UserClass
|
||||
private static double e1 = 0; // Error one iteration old
|
||||
private static double e2 = 0; // Error two iterations old
|
||||
|
||||
#region 构造函数
|
||||
/// <summary>
|
||||
/// PID构造器
|
||||
/// </summary>
|
||||
@@ -38,6 +39,16 @@ namespace DyeingComputer.UserClass
|
||||
this.OutputLowerLimit = OutputLowerLimit;
|
||||
}
|
||||
|
||||
public PID()
|
||||
{
|
||||
this.Kp = 0.5;
|
||||
this.Ki = 0.1;
|
||||
this.Kd = 0.2;
|
||||
this.N = 1;
|
||||
this.OutputUpperLimit = 65530;
|
||||
this.OutputLowerLimit = 0;
|
||||
}
|
||||
#endregion
|
||||
/// <summary>
|
||||
/// PID迭代器,在每个采样周期调用此函数以获取当前控制器输出。
|
||||
/// 设定点和过程值应使用相同的单位。
|
||||
|
||||
Reference in new issue
Block a user