2
$\begingroup$

I am stuck in adjusting the PID of my quadcopter, I cant adjust them on the fly because it just get out of control. I am adjusting them while attaching my quadcopter to something.this is how am I doing

Is this method correct. Will the pid values required will be different on the fly or same. Please suggest me how to attach my quad to some thing.

$\endgroup$
  • $\begingroup$ Did you ever fix any of the errors pointed out to you in your PID code? Your untethered and tethered performance will be different because the tether adds to your mass and moment of inertia, but you should be able to tune to stability while it's tethered, then tune to performance with it untethered. $\endgroup$ – Chuck Sep 30 '15 at 13:16
  • $\begingroup$ i have told you already that i have used the sample time in my pid code. { now = millis(); dt = now-ptime; integ = integ+(errordt) ; der = (error - prerror)/dt ; ptime = now; pidy = (kperror); pidy+=(kiinteg ); pidy+=(kdder); if(pidy>500)pidy=500; if(pidy<-500)pidy=-500; prerror=error; } $\endgroup$ – Bilal Ayub Sep 30 '15 at 13:29
  • $\begingroup$ i use no delay in my loop. $\endgroup$ – Bilal Ayub Sep 30 '15 at 13:30
3
$\begingroup$

Since you're trying to adjust the stability, you should make sure that your method of restraint isn't restricting the motion along that axis.

So, the preferred way to restrain a quadcopter is by connecting strings to the center of the body, above and below. Here's an example:

Quadcopter restraint

You could also disable the motors on one axis and run a rope under each of the propeller shafts on that axis (sideways) to simulate the lift that those motors would provide while constraining any movement.

| improve this answer | |
$\endgroup$
  • $\begingroup$ ok, but that will become very messy. tie the ropes to cielling and floor of the room. Is mine method correct? when i rotate the quad along that axis by hand, there is no resistance felt. $\endgroup$ – Bilal Ayub Sep 30 '15 at 17:54
  • $\begingroup$ You could tie the string between the floor an a table, or between your foot and your hand -- anywhere that leaves enough room for the quadcopter to change orientation on the string without hitting nearby objects. $\endgroup$ – Ian Sep 30 '15 at 18:03
  • $\begingroup$ MINE METHOD IS CORRECT? $\endgroup$ – Bilal Ayub Oct 1 '15 at 7:49
  • $\begingroup$ See my update to the answer, but yes -- provided that your string is attached in the proper places to simulate the other axis, you should be OK with your method. $\endgroup$ – Ian Oct 1 '15 at 22:36
0
$\begingroup$

It would stumble along the landing gear like that. Your UAV should be suspended in the air. Tie the harnesses to a heavy object on the sides of the UAV and keep them very taught to minimise any movement on it's other axis of rotation.

| improve this answer | |
$\endgroup$

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.