Important changes to repositories hosted on mbed.com
Mbed hosted mercurial repositories are deprecated and are due to be permanently deleted in July 2026.
To keep a copy of this software download the repository Zip archive or clone locally using Mercurial.
It is also possible to export all your personal repositories from the account settings page.
Dependents: harurobo1006 harurobo_1026
Fork of EC by
Diff: EC.h
- Revision:
- 26:45a53e3c81b1
- Parent:
- 25:d73c40fd4b55
- Child:
- 27:72711b6cbe2a
--- a/EC.h Fri Jul 07 09:05:42 2017 +0000
+++ b/EC.h Wed Aug 02 06:55:54 2017 +0000
@@ -194,8 +194,8 @@
class SpeedControl : public Ec{
private:
- double Kv_p,Kv_d,Kv_i;
- double diff,diff_old,integral;
+ double Kv_p,Kv_d;
+ double diff,diff_old;
double out_duty,out;
double now_omega,now_RPM;
double now_time_,old_time_;
@@ -252,17 +252,16 @@
void Sc(double target_omega);
/** PIDパラメータ設定関数
*
- * 引数はそれぞれp,i,dパラメータ
+ * 引数はそれぞれp,dパラメータ
*
* デフォルトは全部0に設定してある
*
- * だいたいp=0.15くらいでなんとかなる(知らんけど)
+ * パラメーター値は実験的に頑張って求めるしかないです
* @param p p制御パラメータ
- * @param i i制御パラメータ
* @param d d制御パラメータ
*/
-
- void setPIDparam(double p,double i,double d);
+ void setPDparam(double p,double d);
+
/** 角速度・duty比変換定数(C)の設定関数
*
* 文字通りである
@@ -287,9 +286,15 @@
*/
double duty;
- void ScZ(double target_RPM);
+ /** Z相を用いた速度制御
+ @param target_RPM 目標RPM
+ */
void ScZ2(double target_RPM);
- void Accelarate(double target_duty);
+
+ //RC2017で一時期使っていたがあまり出来が良くないので消し飛ばしました。ただ完全に消去するのもあれなので一応コメントアウトという形で残したよ
+ //void ScZ(double target_RPM);
+ //void Accelarate(double target_duty);
+
virtual void reset();
};
#endif
\ No newline at end of file
