temp repo

Dependencies:   mbed

Fork of priustroller_2 by N K

Files at this revision

API Documentation at this revision

Comitter:
bwang
Date:
Mon Mar 16 15:40:07 2015 +0000
Parent:
34:bfe180de813a
Commit message:
Set for 3A Iq, 0A Id, Ki = 1e-3, Kp = Kd = 0, loop still oscillates but is passable

Changed in this revision

callbacks.cpp Show annotated file Show diff for this revision Revisions of this file
main.cpp Show annotated file Show diff for this revision Revisions of this file
mbed.bld Show annotated file Show diff for this revision Revisions of this file
diff -r bfe180de813a -r 83cf9564bd0c callbacks.cpp
--- a/callbacks.cpp	Mon Mar 16 04:58:35 2015 +0000
+++ b/callbacks.cpp	Mon Mar 16 15:40:07 2015 +0000
@@ -49,6 +49,6 @@
 }
 
 void log(Context *c) {
-    //c->debugger->Write(0, dbg_loop_d);
-    //c->debugger->Write(1, dbg_loop_q);
+    //c->debugger->Write(0, dbg_d_filtered);
+    //c->debugger->Write(1, dbg_q_filtered);
 }
\ No newline at end of file
diff -r bfe180de813a -r 83cf9564bd0c main.cpp
--- a/main.cpp	Mon Mar 16 04:58:35 2015 +0000
+++ b/main.cpp	Mon Mar 16 15:40:07 2015 +0000
@@ -11,12 +11,12 @@
     Context *context = new Context();
     context->ConfigureOutputs(D6, D13, D3, D8);
     context->ConfigureCurrentSensors(A1, A2, 0.01f, 0.7f);
-    context->ConfigureIdPidController(0.0f, 0.0f, 0.0f, 1.0f, -1.0f);
+    context->ConfigureIdPidController(0.001f, 0.0f, 0.0f, 1.0f, -1.0f);
     context->ConfigureIqPidController(0.001f, 0.0f, 0.0f, 1.0f, -1.0f);
     context->ConfigureThrottle(A0, 0.8f, 3.0f);
     context->ConfigurePositionSensor(A4, A5, 0.249f, 0.497f, 0.231f, 0.499f, 205.0f);
-    context->ConfigureReference(5.0f);  // max phase current
-    context->ConfigureDebugger(2, 1000);
+    context->ConfigureReference(3.0f);  // max phase current
+    context->ConfigureDebugger(2, 2000);
     context->AttachCallBack(&fast, 5000);
     context->AttachCallBack(&slow, 10);
     context->AttachCallBack(&debug, 10);
diff -r bfe180de813a -r 83cf9564bd0c mbed.bld
--- a/mbed.bld	Mon Mar 16 04:58:35 2015 +0000
+++ b/mbed.bld	Mon Mar 16 15:40:07 2015 +0000
@@ -1,1 +1,1 @@
-http://mbed.org/users/mbed_official/code/mbed/builds/9ad691361fac
\ No newline at end of file
+http://mbed.org/users/mbed_official/code/mbed/builds/7e07b6fb45cf
\ No newline at end of file