YMFC-3D part 5 - Quadcopter PID controller and PID tuning.

Поділитися
Вставка
  • Опубліковано 14 січ 2025

КОМЕНТАРІ • 635

  • @manoelguidialvares6903
    @manoelguidialvares6903 5 років тому +8

    I am a control and automation engineer, who just finished a master in mechatronics. I am a true passionate to control engineering, and since 2013 when I was first introduced to control systems,i have NEVER EVER seen such a good simple explanation to a PID, specially regarding the derivative part. Actually, I only could reason about it by thinking about poles or spectral analysis. But your simple yet extremely clever explanation and demonstration gave me a new light on this subject and gave me a more 'physical' feeling about it, which IMO is essential to an engineeer.
    I also want to build a drone from scratch a a hobby, and your YMFC serie is simply tailormade to my needs. I am infinetely grateful for your contribution, and hope you keep posting such good videos and projects. Keep on the AWESOME work, you are an inspiration !!!
    Best regards !!

  • @mickcooper8605
    @mickcooper8605 7 років тому +3

    Having never flown a quad or any other RC model before I have watched these videos over and over again then took the plunge. I purchased some secondhand 2830 motors from ebay, made up a 450(ish) frame from upvc pipe fitted it with 30A esc's one of which was Faulty ! I used a "Beestore" pro mini which is fitted with an AMS1117 voltage regulator supporting up to 800mA for the controler. I loaded and ran the setup and calibration sketches and all worked fine. This evening I loaded the controller sketch and she flew straight out of the box even with an "odd esc". My activity's were cut Short by the weather but with a bit of tinkering (and four matching esc's) I'm going to have hours of fun. Thanks Joop for all your hard work and the many hours you have put into these videos, your explanations and demonstrations of how it all works are second to none. I just wish I were better at the coding side but I fear age is not on my side. LoL

  • @siddhantchaudhary4946
    @siddhantchaudhary4946 5 років тому +13

    You're the inspiration of millions of future engineers..... Respect

  • @tacpreppers4906
    @tacpreppers4906 6 років тому +14

    Hands down, the best PID explanation I've seen so far, and being a quad/fpv pilot, I've seen many, . Joop, you're an ace, thanks for taking the time to do this. It's on the shoulders of "giants" like you that we build. Keep up the excellent work.

  • @MrFlashgrenade
    @MrFlashgrenade 9 років тому +3

    I find this is the first video that actually explains in detail what PID settings do. Thank you very much!

  • @wanderreels7385
    @wanderreels7385 3 роки тому +1

    I was lookign for someone who could teach every bit of coding that was necessary for building the drone . And I am very happy with the content you have posted. Thank you so much.

  • @blrcnc9848
    @blrcnc9848 8 років тому

    Hi, I am a CNC hobbyist. I am absolutely a novice to Audrino. Your video series is an inspiration for me to explore the audrino world. I have already place an order for UNO after seeing your video. I may not understand everything right away. But your explanation breaks down everything and logical to understand. Thank you so much for putting together this wonderful video series. I am excited as hell to start with this Quadcopter project.
    Thank you,
    Nave

    • @Joop_Brokking
      @Joop_Brokking  8 років тому

      Thank you for taking the time to write this positive comment.

  • @karnikram
    @karnikram 9 років тому +39

    Hello, thanks a lot for this much needed video series!
    Just want to point out a slight error in one of the equations at 3:36.
    It should be,
    D-output = (gyro - receiver - gyroprev + receiverprev)*Dgain
    and not,
    D-output = (gyro - receiver - gyroprev - receiverprev)*Dgain

    • @Joop_Brokking
      @Joop_Brokking  9 років тому +9

      Karnik Ram Hi, gyro - receiver is the error and represents the 'e' in the equation at 1:51. The error is always calculated the same. In your line the previous error is calculated different than the actual error.

    • @karnikram
      @karnikram 9 років тому +16

      Previous error = gyroprev - receiverprev
      Current error = gyro - receiver
      Current error - previous error = (gyro - receiver) - (gyroprev - receiverprev) = gyro - receiver - gyroprev + receiverprev
      Negative sign negates the negative sign.

    • @Joop_Brokking
      @Joop_Brokking  9 років тому +26

      Karnik Ram Yes, you are right! I should have added brackets in the presentation sheet. +1 for you sir!

    • @warren1192
      @warren1192 3 роки тому

      thank you sirs to both of you for pointing out a bracket error... and at the same time confirming there was an error

  • @VincentArdolino
    @VincentArdolino 8 років тому +9

    Your explanation and test models are awesome. The best explanation of what P & I & D actually are as demonstrated with physical models.
    Keep up the good work

  • @MrHristoB
    @MrHristoB 4 роки тому +1

    I'm new to the multirotor business and this must be one of the BEST and clear PID explanation!!!! Bedankt Joop!!!

  • @samantareboredo7665
    @samantareboredo7665 Рік тому +1

    thank you. I just wanted to thank you for the enormous professional work you have done. My drone flies wonderfully thanks to you. I congratulate you immensely.

  • @tamasgiraszi7449
    @tamasgiraszi7449 8 місяців тому

    This is an amazing series! I started to create my own drone, with some knowledge which I never use before. This series helps to the whole knowledge in context and make my understanding deeper.

  • @evgenyyakimov7779
    @evgenyyakimov7779 4 роки тому +1

    This video is Excellent! I found it very easy to pick up this complex topic with very little background in the area. Thank you for your efforts!

  • @mcynelly1637
    @mcynelly1637 8 років тому +9

    The best tutorial about PID that I have ever seen.

  • @JuanAriasArias
    @JuanAriasArias 9 років тому +8

    Very good job. The best tutorial about PID that I have ever seen. Thank you so much.

  • @theconcerned9113
    @theconcerned9113 7 років тому +1

    Thanks, Joop, you have done the best drone tutorials I've ever seen.

  • @HanSolo1
    @HanSolo1 7 років тому +1

    Thank you for the build tutorial, after a couple months this semester research project for me just flew a few minutes ago, after some pid tuning frustrations!!!

  • @CRAhome
    @CRAhome 5 років тому +1

    Excellent explanation. Very good introduction for newbies (and probably more advanced users). Thanks a lot!

  • @avacomputer2819
    @avacomputer2819 6 років тому +3

    Hello, thanks a lot for this much needed video series!
    The best tutorial about PID that I have ever seen!

  • @freddiesnijman
    @freddiesnijman 9 років тому +32

    Excellent! PID, make more sense to me. Besides that I admire your teaching/coaching talent.

    • @Joop_Brokking
      @Joop_Brokking  9 років тому +2

      Freddie Snijman Thanks for the compliments!

    • @a_aron30490
      @a_aron30490 8 років тому +5

      You are a brilliant person, your videos really help me out in my computer programming class and our arduino projects

  • @pricedempler
    @pricedempler 3 роки тому +1

    Thank you for showing the code AND the resultant behavior on the quad. Big help!!!

  • @CineSoar
    @CineSoar 8 років тому

    I've been watching with interest. Thank you so much, for a well annotated sketch, as I will be doing this project with my son and it is a great help, to see each line described so well. When I saw your excel spreadsheet for PID, I decided to duplicate it, so I could play with the values myself. What I found very interesting, was to calculate and graph the PID Output, as well. I found this very useful, to show how changing the gains from 'neutral' (all = 1), to your actual flight values, dramatically changes the PID Output, from something that is dominated by I, to a shape that looks much more like D, with a trendline influenced by I. I also found that the graphing the effects of over and under tuning each value in turn, allows you to see how that behavior exhibits itself in the reaction. There were a few 'aha' moments, as I began to visualize how a large change in value for a certain gain, changes the response profile. Combining this with the airframe behavior (from watching your's and other's tuning videos) is pretty powerful. You might consider a supplemental video, exploring this in more detail.

    • @Joop_Brokking
      @Joop_Brokking  8 років тому

      Thank you for your reply and that this video was educational.

  • @somiprakash1347
    @somiprakash1347 4 роки тому +1

    Excellent video , going into the practical approach to designing PID loop into mcu ..

  • @imranzahoor4407
    @imranzahoor4407 8 років тому

    I'm really out of compliments this time because every compliment is less worthy than your work. Brilliant work I've ever seen. Thank you so much. Your videos helps me a lot in my final year project of electrical and control engineering.
    bundle of thanks and salutes for you.
    regards.

    • @Joop_Brokking
      @Joop_Brokking  8 років тому +1

      Thank you for taking the time to write me this message. Really appreciate it!

  • @subhadeepchowdhury5244
    @subhadeepchowdhury5244 2 роки тому

    Very useful videos for those who are building their own flight controller. Special thanks to mention that D gain should be fixed first.

  • @MilanKarakas
    @MilanKarakas 9 років тому +1

    Excellent tutorial, and the best explanation what (the hell*) is PID or PI on my KK2 board (there is no derivative, or D setting). At first it looks incredible complicated, but in your series of videos - if explainded as you just did - now it look much more clear and easy to understand.
    Thank you very much.

  • @RSP13
    @RSP13 5 років тому

    PID is now much cleaner for me. Thanks

  • @MrFlashgrenade
    @MrFlashgrenade 9 років тому +1

    I'm the eight viewer. I must call that a victory and take this opportunity to congratulate you on your wonderful project.

  • @elliotg8403
    @elliotg8403 4 роки тому +3

    I'm confused why you've used gyro deg/s as your set point. Surely it would make sense to use the actual deg value otherwise the quadcopter could stabilise its gyro angle rates without actually being level itself?

    • @shahidanaznin5809
      @shahidanaznin5809 9 місяців тому

      Yes, these angel mode flight controllers perform better but I guess the reason of using a rate mode flight controller is that the calculations are simpler. So the required time for one cycle is low. Note The flight controller needs to run at least at 250 hz.

  • @usamasadiq8991
    @usamasadiq8991 8 років тому

    You have done fabulous work here and really simple
    and it helped me a lot in my FYP. so hat's off for you thanx.

  • @bogenriederlukas
    @bogenriederlukas 8 років тому

    Great video. I thought it was gonna be super hard to understand but you explained it soo well :)

  • @sardarhasseb8330
    @sardarhasseb8330 9 років тому

    Finally a best video for understanding multirotor pid :)

  • @MEGAZSTUDIOS
    @MEGAZSTUDIOS 9 років тому +1

    Amazing piece of work, excellent control and response. Well done mate keep it up. ^_^

  • @matiasbrollo6871
    @matiasbrollo6871 Рік тому

    Le devo mucho a esta serie de videos. Muchas gracias.

  • @tarekelmanshawy9201
    @tarekelmanshawy9201 6 років тому

    Please ,enable subtitle option in all your videos to make more people who aren’t fluent in English,understand what you talk about.
    Thanks for efforts.
    Follower from Egypt.

  • @rtdave6982
    @rtdave6982 7 років тому +1

    I have learned many many things from you...Thank you.

  • @lard_dork
    @lard_dork 9 років тому +23

    D output = ((Gyro - Receiver) - (Gyro Prev- Receiver Prev) ) * D gain

    • @Joop_Brokking
      @Joop_Brokking  9 років тому +7

      +Brian Boozebacon Not many people have seen / noticed this typo in the presentation ;-) +1 for you!

    • @GOLDFINGER412
      @GOLDFINGER412 8 років тому

      +Brian Boozebacon just noticed the same error.

    • @rohanselvan4339
      @rohanselvan4339 6 років тому

      Thanks for clarifying!

  • @joh1ish
    @joh1ish 7 років тому

    Hey Joop, superb video! I wanted to bring something to your attention about the Arduino servo library. In your videos you went to a great trouble in order to make the refresh rates of the Arduino faster for the ESCs, hence better PID control, but I found that
    with one single change to the Servo header file, you can have the Arduino servo library refreshing at the interval you want. You
    may do this by changing the #REFRESH_INTERVAL value. Simply copy the file to the desktop, change the value, and copy the file back to the servo folder. I am going to check this out with an oscilloscope tomorrow.
    Just wanted to let you know for less headache in the future :D

  • @vitaliyd193
    @vitaliyd193 9 років тому

    DUDE THANKS@!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! AWESOME!!!
    I remember your 1st soundless videos, and my wish to hear your explanations! AND NOW YOU KEEP MaKING US ENJOYING YOUR VIDEOS!!!!!!!!!!!!!!

  • @suhasrx100
    @suhasrx100 9 років тому

    First of all, Great Video Tutorial Series Joop, Hats Off!!!!!
    What I noticed is, you have mounted the gyro underneath the right arm [During PID demo 5:24...], will correction be much more accurate if gyro has been mounted towards or at the center.

    • @Joop_Brokking
      @Joop_Brokking  9 років тому

      Thanks for the compliment! The gyro only detects angular motion. Perpendicular motion will not affect the gyro's output. The best location for mounting the gyro is away from vibrations. This usually means in the center of the frame.

  • @carlosfreitas4056
    @carlosfreitas4056 5 років тому

    Thanks for everything. You are brilliant at teaching.

  • @theodordrymonis6728
    @theodordrymonis6728 9 років тому

    Very nice tutorial !!! Looking forward for the next video !!!

  • @longplayernet
    @longplayernet 4 роки тому

    Very Helpfull and cool practical examples!

  • @EdCranium
    @EdCranium 9 років тому

    Fantastic work. PID explained so even I can understand it. Genius!

  • @carlscrivener2462
    @carlscrivener2462 5 років тому +1

    Great video! Can I ask why the roll limit is set to 400? Is this an arbitrary number?

  • @sardarhasseb8330
    @sardarhasseb8330 9 років тому

    when will the 6th part will come ,anxiously waiting 4 it ??

  • @joeprince7509
    @joeprince7509 9 років тому +1

    I've watched this video many times now (which is great by the way), but there's one fundamental thing that I'm not understanding in regards to the rate mode.
    If the error is the difference between the gyro reading and the user's input (in deg/s), then when the quad starts rotating and approaches the desired rate won't the error decrease to 0, meaning there is no correction factor and just the throttle value is written to the motors? Perhaps I'm missing something?

    • @Joop_Brokking
      @Joop_Brokking  9 років тому

      +Joe Prince Yes, the error will decrease to zero. But the pid-controller will work on it to keep the desired rate.
      So my input is 20deg/s and the quad rotates 20deg/s. The error is zero and only the throttle will drive the motors.
      But when the quad rotates 19deg/s the error is 1deg/s and the motors are corrected.
      In practice the error is never zero. The controller is constantly correcting the multicopter. It goes so fast that it looks steady. But in fact the multicopter is very unstable.

    • @joeprince7509
      @joeprince7509 9 років тому +1

      +Joop Brokking I appreciate the insight and information. I have a question in regards to this line: "The error is zero and only the throttle will drive the motors."
      If the error is zero and only the throttle is driving the motors (let's say 50% throttle or 1500µs), then how is the quad rotating? Don't we need a difference in motor speeds in order to obtain rotation? That's kind of what my first question was referencing, the fact that if our error is zero then we're writing the same value to the motors (in this case the throttle) which in my mind means the quad is not rotating. Am I completely misinterpreting this?

    • @Joop_Brokking
      @Joop_Brokking  9 років тому

      Joe Prince
      As I wrote, in practice the error is never zero. And if it becomes zero during rotations the I-controller is 'loaded' and will make the quad rotate.
      But you are right about the fact that the multicopter does not rotate that well with all the 4 motors spinning at the same speed.

    • @joeprince7509
      @joeprince7509 9 років тому

      +Joop Brokking Does that mean it wouldn't be possible to write a "P" only controller for rate mode, since there is no "I" term to build up?

    • @Joop_Brokking
      @Joop_Brokking  9 років тому

      Only a p-controller will not work. You need at least p and d to make it fly. If you look @14:00 in the video you see that I fly the multicopter with only the p and d controller. It fly's but does not feel locked in. The i-controller makes the multicopter locked in.

  • @yusufaksel2516
    @yusufaksel2516 4 роки тому

    Hey! Great tutorial series, thanks. I wondered something, what is the working principle of your test setup at 1:00 ?

  • @mrabalone3492
    @mrabalone3492 8 років тому

    AWESOME ! It helps a lot for my project thanks Joop Brokking

  • @claudiofe8318
    @claudiofe8318 9 років тому +1

    as you may know that the maximum output is 400 pid?
    float pid_p_gain_yaw = 4.0; //Gain setting for the pitch P-controller. //4.0
    float pid_i_gain_yaw = 0.02; //Gain setting for the pitch I-controller. //0.02
    float pid_d_gain_yaw = 0.0; //Gain setting for the pitch D-controller.
    int pid_max_yaw = 400; //Maximum output of the PID-controller (+/-)

  • @ambujjain212
    @ambujjain212 3 роки тому

    Thanks Joop, for this amazing video series. I have a question regarding the base throttle signal for quad-copter hovering. How do make sure that when throttle stick is in the middle, i.e. transmitting 1500us pulse the drone hovers?

  • @victoraugustoimg
    @victoraugustoimg 3 роки тому

    Great video my friend I have a question, how you find the bests values to kp, ki and kd constants?

  • @ycmgxekwa
    @ycmgxekwa 7 років тому

    Brilliant tutorial once again. Thank you very much.

  • @mcebisisolilo3714
    @mcebisisolilo3714 5 років тому

    Hi Joop, Thanks a lot for this video, you have made this very clear for me. Your explanation and major part of your code has allowed me to build my own UAV (Unmanned Aerial Vehicle), one problem i am facing is that the structure of my drone is a Hexacopter (runs with 6 motors). For a Quadcopter, the ESC equations are as follows:
    pulse_length_esc1 = instruction[THROTTLE] + roll_pid + pitch_pid - yaw_pid;
    pulse_length_esc2 = instruction[THROTTLE] - roll_pid + pitch_pid + yaw_pid;
    pulse_length_esc3 = instruction[THROTTLE] + roll_pid - pitch_pid + yaw_pid;
    pulse_length_esc4 = instruction[THROTTLE] - roll_pid - pitch_pid - yaw_pid;
    what will these equations be if i have 6 ESCs instead of 4, your assistance would be greatly appriciated

  • @InnosWei
    @InnosWei 6 років тому +2

    Hello Joop, your videos are great, I am wondering about one thing though. What do you need total angles from gyro+acc if you only use the gyro angular rate for your PID control? Is using angles and assumming the transmitter stick position inputs desired angle of the quad is a wrong approach?

  • @originalthehrao
    @originalthehrao 5 років тому

    you are genius man. great work. thank you so much for sharing your knowledge.

  • @robertparenton7470
    @robertparenton7470 3 роки тому

    Thank You for sharing this valuable knowledge.

  • @TheMrAlextbo
    @TheMrAlextbo 7 років тому +1

    Great Job excellent video! but there is some think i don't understands here you choose de maximum command to 164dps (setpoint) how do you know that's not too high and the drone isn't going to fall ? thanks in advance for your answer ^^

    • @Joop_Brokking
      @Joop_Brokking  7 років тому

      It's just a trail and error value that works fine for most pilots.

    • @TheMrAlextbo
      @TheMrAlextbo 7 років тому

      ok thanks but can we consider that the max 164dps command is like we ask the drone to have a 45° angle on the considered axe. Sorry to bother but i'm doing a drone for a study project only using a gyrocope as a capteur and i don't know how to explain how i choose this part of the code (164dps max setpoint) thanks in advance for your answer

    • @Joop_Brokking
      @Joop_Brokking  7 років тому

      The 164dps tells the drone that it must rotate 164dps. It's not a fixed angle.
      In this video I explain the auto level function and the angle calculation: ua-cam.com/video/DYpHB-LfloI/v-deo.html

    • @TheMrAlextbo
      @TheMrAlextbo 7 років тому

      yes i saw this video but you are using an accelerometre. the thing is i don't understand how to think with speed and not position. Because when you put de joystick to 2000 us (convert in 164dps in the code) if it's the roll you ask the drone to rotate at 164dps to the right, like that it goes to the right. But i don't understand if i keep the joystick to 2000us why the drone just goes to the right and don't rotate on the roll axe indefinitely ? ( i know what i say is stupid because the pid is correcting the thing but that's my problem )

    • @Joop_Brokking
      @Joop_Brokking  7 років тому +1

      The confusion is probably the difference between rate and auto level. The video that I linked is the auto level that uses an accelerometer and angles. When you release the sticks the quadcopter levels itself.
      If you use only a gyro the quadcopter is flying in rate mode. This means that when you release the sticks the quadcopter will keep it's current position. Then you move the stick full right the PID input is 164 degrees per second. The PID controller will change the motor speed until the gyro detects 164 degrees per second. And it will keep rotating at 164 dps as long as the stick is full right. Meaning that the quadcopter flips upside down proximately 2 times per second.

  • @mclay2038
    @mclay2038 7 років тому

    Joop, great video. I've noticed in some of your other videos that you have very good altitude hold. I was wondering what your process is for tuning the PIDs for altitude hold? Thanks.

    • @Joop_Brokking
      @Joop_Brokking  7 років тому

      The altitude hold test is form this video: ua-cam.com/video/oc8Gv61bfvU/v-deo.html
      I'm using my own algorithms to get is stable like that.

  • @nachocortizo3321
    @nachocortizo3321 5 років тому

    @Joop Brokking , first of all: great content! this is very informative!
    The generic PID definition uses DeltaTime as a multiplier for the I and D terms, but you seem to not use it... Is this because your feedback variables are in º/s. ? In my case I´m trying to simply control the Pitch/yaw/roll (so plain º).
    Thanks.

    • @Joop_Brokking
      @Joop_Brokking  5 років тому

      The delta-t is fixed in the loop time of the main program loop. For the YMFC it's 4ms. This way I don't have to take the delta-t into account.

    • @nachocortizo3321
      @nachocortizo3321 5 років тому

      @@Joop_Brokking Ah yes, I was looking through your code and makes sense! Thanks.

    • @Gagandeepsingh-uf2un
      @Gagandeepsingh-uf2un 3 роки тому

      @@nachocortizo3321 had u finished your Quadcopter project did it ran well?

  • @ng4559
    @ng4559 9 років тому

    Excellent job done!!
    Keep it up man!

  • @herrkronen9694
    @herrkronen9694 Рік тому

    tHANLS A LOT FOR SHARING YOUR KNOWLEDGE !! COULD YOU PLEASE SHARE WITH ME , THE EXCEL SHEET ? THANKS

  • @lazzday1
    @lazzday1 8 років тому

    Hi Joop! Amazing videos! So helpful! I have one problem though...
    I am trying to adapt your YMFC-AL code for autonomous flight, so no radio input! I have built a test stand like yours in this video to demonstrate the auto-level.
    I can't under stand how to adapt the setpoint for the PIDs to keep the quadcopter level in hover, as my PID input is angular motion, not angular position. When I try to implement my code on my test stand, the PID stabilizes the axis to the point where I push it, but doesn't auto-level! How do I covert the angular motion data to an angular position so I can auto level?
    Sorry if this doesn't make sense!
    Thanks

    • @Joop_Brokking
      @Joop_Brokking  8 років тому

      Watch this video: ua-cam.com/video/DYpHB-LfloI/v-deo.html
      It explains how to get a simple auto level feature.

  • @dhrubajyotigogoi7685
    @dhrubajyotigogoi7685 4 роки тому

    Hello Joop, been following for over a year. Very thankful for such an elaborate guide. My query is are we using position/angle data in the PID controller or is it just the angular speed as the set point. I mean are we controlling roll/pitch speed or the roll/tilt angle. Using speed as the set point my P control behaves a like a D control (just damps motion)

  • @shubhobanerjee311
    @shubhobanerjee311 8 років тому

    hello again joop. first of all i'd like to thank you for this amazing video series and your active responses.
    you have inspired me to build my own flight controller and i am almost done, but stuck at setting the pid.
    setting the d gain first, didn't work for me as i have a 360mm frame and being a novice it's difficult for me to obtain the point of vibrations.
    if i try to set the p gain first the quad starts to oscillate and overshoot at a low frequency with the amplitude becoming higher every time.
    i am guessing this could be a result of the pid_output_pitch =400 being high as my escs are 50hz as compared to your 250hz escs.
    so do u think the pid_output_pitch should be 400/80 in this case because of a lower refresh rate in order to prevent overshooting?
    thank you

    • @Joop_Brokking
      @Joop_Brokking  8 років тому

      Are you running a 50Hz refresh rate from your flight controller program? Most ESC's that are designed for multicopters will work fine with a 250Hz refresh rate. If you use ESC's designed for planes it will not work because they are to slow.

    • @shubhobanerjee311
      @shubhobanerjee311 8 років тому

      +Joop Brokking i am running a 50hz from the flight controller. as per my understanding many escs flashed with blheli or simpnl firmware run at 250hz. however many escs still work on 50hz. i'll have to buy new escs for 250hz ...but that wont be feasible for me now.

    • @shubhobanerjee311
      @shubhobanerjee311 8 років тому

      +Joop Brokking blheli or simonk firmware*

    • @Joop_Brokking
      @Joop_Brokking  8 років тому

      Do you have an internet link of the ESC's you are using?

  • @tanmaykhatri7454
    @tanmaykhatri7454 2 роки тому +1

    Hello sir , I'm tanmay and I'm a engineering student . I am working on the Arduino based drone with the help of your video . I facing many challange to setup best PID values . Sometimes those values works correctly then i take the flight of the drone but unfortunately drone flip on the specific height, like 9 feet . I have been facing this problem currently . Could you help me to solve this problem . When i press the reset button on the Arduino . drone gives the stable flite but suddenly drone flip into the sky and it stops working . From this problem i have losted one Arduino uno board . You are my last hope. What did i do to solve this problem . All parts are working properly buy unfortunately i don't know what's the problem . I have been trying to solve this problem for 3 months . I started to make the drone 3 months ago . But this problem didn't solve . I'm waiting for your reply . I am making this drone for my college project
    So please help me . I will appreciate your help .
    Please reply me sir . I will tell you my all problems in the drone .
    thank you , please reply me ❤️

  • @ehsanhoseini5641
    @ehsanhoseini5641 Рік тому

    icant find the arduino code related to this video in your website

  • @ubotics27
    @ubotics27 7 років тому

    Great video Sir Joop. please I wish to know ,Where is the receiver signal from ?? I'm currently working on a wind pendulum project and I hope to adopt your PID lesson to balance the pendulum at center within the shortest time given , the pendulum has 4dc fans attached to its 4sides .how can I apply your lesson? Thanks for your help in advance

  • @ranjitroshan3101
    @ranjitroshan3101 6 років тому

    Thank you very much for this wonderful video.

  • @vishnukartha47
    @vishnukartha47 4 роки тому

    There will be precedence issue in the calculation of Derivative out put i think. The video is very informative. Thanks for sharing.

  • @kripeshram4781
    @kripeshram4781 6 років тому +1

    Hey Joop, my quad is yawing violently when I use the pid-i as in your code
    -> pid_i_mem_pitch += pid_i_gain_pitch * pid_error_temp;
    The i - gain seems to happen even when the quad is stationary and there is no change in angle!
    But when I changed it to -> pid_i_mem_pitch = pid_i_gain_pitch * (pid_i_mem_pitch + pid_error_temp);
    It worked fine. Have I made an error elsewhere in the code which could have led to this?
    Thank you for the amazing videos! I have learnt so much from them.

  • @miguelsilva5338
    @miguelsilva5338 3 роки тому

    We have to do the same for the yaw values?

  • @waleedgaming8064
    @waleedgaming8064 7 років тому +1

    Your videos are awesome! I myself built the YMFC-AL quadcopter and it works well.
    The only problem I am facing is that when I change the value of I, the quad tilt in one direction and I have to use subtrims to level it. It works perfectly fine with I=0;P=1.5 and D=15. Can you guide me how can I tune the value of I to make it more stable. Even at I= 0.01 , the quad tilt in one direction. Waiting for your reply.

    • @Joop_Brokking
      @Joop_Brokking  7 років тому

      You can use the sliders on the transmitter to level the quadcopter. Make sure that you don't move the quadcopter at startup.

    • @diegochaucagallegos9173
      @diegochaucagallegos9173 7 років тому

      The same thing happens to me ... always when starting starts to the side, and it is difficult to stabilize it, since the position to self-level will always be to one side

  • @talhayousuf4599
    @talhayousuf4599 6 років тому

    Excellently explained but where do those 'dt' terms go? (as in pid formula) Don't you need to multiply with the time step in case of integral......?

    • @Joop_Brokking
      @Joop_Brokking  6 років тому

      The program loop is fixed to 4ms. That is why you don't include time as it will not change.

  • @muhammadqasim401
    @muhammadqasim401 7 років тому

    awesome project.
    but i have question.
    I would like to see the error value, PID values, as well as its PID chart. how do I get to see its. as in this video, at minute 4:50. thanks Joop Brokking.

    • @Joop_Brokking
      @Joop_Brokking  7 років тому

      You have to use Serial.print to output the values.

    • @muhammadqasim401
      @muhammadqasim401 7 років тому

      thanks joop brokking.
      in the code your upload,
      where I use serial.print if I want to see the final value of the PID, time (us), receiver (dps), gyro (dps), the value of P, the I and D?
      because I want to see a graph of PID to determine its stability.

    • @muhammadqasim401
      @muhammadqasim401 7 років тому

      and if i starting the motor, value of throttle not on 0%. it abuout 10%. whats happen?

    • @Joop_Brokking
      @Joop_Brokking  7 років тому

      It's normal that the motors start spinning when you start the quadcopter. You can see the same here: ua-cam.com/video/gz-Mywo7bGc/v-deo.html

    • @muhammadqasim401
      @muhammadqasim401 7 років тому

      I see joop brokking. Thanks.
      How about.
      in the code your upload,
      where I use serial.print if I want to see the final value of the PID, time (us), receiver (dps), gyro (dps), the value of P, the I and D?
      because I want to see a graph of PID to determine its stability.

  • @ChaozBoom
    @ChaozBoom 8 років тому

    Hi Joop, I am doing a similar project, and your work is proving invaluable, so thank you!
    Just a quick question- why is it you use the EEPROM library for your YMFC-AL program? I am fairly new to Arduino, and have not experienced this library before. Could I not convert the receiver channel just using a simple 'map' to an integer for example, instead of an allocated register within the UNO's EEPROM?
    Thanks again, and keep up the good work!

    • @Joop_Brokking
      @Joop_Brokking  8 років тому

      Yes that is possible. But you need to modify the code yourself.

    • @ChaozBoom
      @ChaozBoom 8 років тому

      Thanks for the reply, that's fine as I am writing my own code anyway, I was just wondering what the benefit of using the EEPROM library is?
      Many thanks

  • @dennisllante
    @dennisllante 8 років тому

    Been learning a lot from your videos, what modifications should i make if i want to adapt the code for a tricopter project? thanks! Also, are you releasing a tutorial for the telemetry module you made? thanks!

    • @Joop_Brokking
      @Joop_Brokking  8 років тому +1

      If you want to make a tricopter you need to send the PID output of the yaw to the servo. The motors are mixed with the roll and pitch PID as a triangle, not a square.

    • @dennisllante
      @dennisllante 8 років тому

      Beautiful! Thank you so much!

  • @hemantjain511
    @hemantjain511 7 років тому

    Very nicely explained!! Thanks!!

  • @MrEivohs123
    @MrEivohs123 5 років тому

    is it without flight controller?

  • @yogendrakumarpatel8369
    @yogendrakumarpatel8369 4 роки тому

    Can you make a video on concept of choosing pitch and diameter of propeller of drone

  • @mohammedzeyton
    @mohammedzeyton Рік тому

    VERRY VERRY AWESOME EXPLANATION WOOOOOW

  • @jackbosshard4502
    @jackbosshard4502 9 років тому

    Joop Brokking, thanks for your interesting presentation. Due you think that the Arduino Due with a higher clock frequency could run your code without to much adaptations?

    • @Joop_Brokking
      @Joop_Brokking  9 років тому

      +Jack Bosshard I have no idea. I never used a Arduino Due myself so I can't give you any useful advise.

  • @rpraver1
    @rpraver1 9 років тому

    Is there a sketch that goes along with this video?

    • @Joop_Brokking
      @Joop_Brokking  9 років тому

      R Praver There is no sketch for this video. I hope to post the last video within a week so you can download the complete Arduino sketch that I used.

  • @nikodembartnik
    @nikodembartnik 8 років тому +1

    Hi
    I am working on my own flight controller I almost finished it. Currently I am working on stabilization. I saw your code and I don't know how you can use deg/sec as input for PID. Let's say that your quad isn't moving and it is tilted 45 deg, your program wouldn't see that. In my program I use degrees as input for PID but I have some problems with tunning. You can see my quadcopter at my chanel. I want to ask how big should gains be for degrees input. Thanks!

    • @Joop_Brokking
      @Joop_Brokking  8 років тому

      This is the 3D version. So the PID will try to match the gyro and receiver input.
      The YMFC-AL however has an auto level feature. It's explained in this video:
      ua-cam.com/video/DYpHB-LfloI/v-deo.html

    • @nikodembartnik
      @nikodembartnik 8 років тому

      Thanks for quick answer. I know but I can't understand how you can use deg/sec for PID input in auto level version, how is it possible. And can I use degrees instead of deg/sec?

  • @shamssalehin2376
    @shamssalehin2376 6 місяців тому

    Hello Joop, can you share the code for this balance stand project, i also made one to test PID, im confused to how i control the PWM of two ESC to balance the the Rod.

  • @robokishan
    @robokishan 7 років тому +1

    sir i still dont understand why you are dividing it by 57. bcz its already has 17.mdps
    then your equation should ne x. * 57 =1

  • @a..d2062
    @a..d2062 5 років тому +3

    QUESTION:
    Dear Joop Brokking
    for the PID part,
    (pid_error_temp = gyro_roll_input - pid_roll_setpoint;)
    why are you subtracting a mixed (accelerator and gyro) value with a purely Gyro value to find the error.
    As you have stated that the Gyro value on its own is not accurate hence we must use a mixed (accelerator and gyro) value as it is accurate.
    I thought you would have used a mixed (accelerator and gyro) value and subtracted it from another mixed (accelerator and gyro) value.
    hence giving us a accurate pid_error_temp value.
    I am really confused about this matter please can you help. thank you

    • @donyip9674
      @donyip9674 Рік тому

      poor child, it has been 3 yrs, Mr. Joop still didn't answer u

    • @a..d2062
      @a..d2062 Рік тому

      @@donyip9674 One day my brother, one day he will.

  • @jeffthagz8695
    @jeffthagz8695 9 років тому

    Does this tuning need some other input besides the throttle?

  • @garretthart4883
    @garretthart4883 7 років тому

    +Joop Brokking first off i would like to say i love your videos. and i would like to ask about the excel chart you had in this video. is there anyway you could put a link for a download. i am on a highschool robotics team and we use PID a lot but tuning is always a problem and this would help us so much. thank you and keep doing what your doing

    • @Joop_Brokking
      @Joop_Brokking  7 років тому

      I don't have the Excel sheet anymore because I just made it for the video.

    • @garretthart4883
      @garretthart4883 7 років тому

      Joop Brokking ok that's fine I understand

  • @kzg29
    @kzg29 3 роки тому

    Hi,I have some questions,how can i ask them to you?

  • @Lawproto90
    @Lawproto90 7 років тому

    Don't know if this has been pointed out yet, but at 3:32 there is a typo in the Derivative term, it should be:
    D-output = (gyro - receiver - gyro_prev *+* receiver_prev) x D-gain
    Great video, anyway!

    • @Joop_Brokking
      @Joop_Brokking  7 років тому +1

      Great spotting :-) It should actually be:
      D output = ((Gyro - Receiver) - (Gyro Prev- Receiver Prev) ) * D gain

    • @drumbum7999
      @drumbum7999 7 років тому +1

      both are the same

  • @VGVkIEg
    @VGVkIEg 7 років тому

    Hi Joop, what happens when the quadcopter goes out of range?

    • @Joop_Brokking
      @Joop_Brokking  7 років тому +1

      It depends on you transmitter and receiver. With cheaper transmitters it keeps flying. The more expensive transmitters and receivers have a so called fail save function.

  • @abhishek84215
    @abhishek84215 Рік тому

    i tried your code but my drone is not flying. it's flipping. can you please help me?

  • @arnavmarchareddy1831
    @arnavmarchareddy1831 7 років тому

    in the code for the flight controller, i still dont get how you figured out how to send the calculated pulses to the esc's based on the pid corrections and the reciever inputs. esc_1 = throttle - pid_output_pitch + pid_output_roll - pid_output_yaw; //Calculate the pulse for esc 1 (front-right - CCW)
    esc_2 = throttle + pid_output_pitch + pid_output_roll + pid_output_yaw; //Calculate the pulse for esc 2 (rear-right - CW)
    esc_3 = throttle + pid_output_pitch - pid_output_roll - pid_output_yaw; //Calculate the pulse for esc 3 (rear-left - CCW)
    esc_4 = throttle - pid_output_pitch - pid_output_roll + pid_output_yaw;

  • @rje242
    @rje242 8 років тому

    Hey Joop, I really appreciate this video. I've built my quadcopter and would like to use your formula for tuning my PIDs, however, I'm using Cleanflight as my program. I'm wondering if you or someone could offer ideas of the equivalent rates to use on Cleanflight to start the tune as you did in this tutorial? Thanks

  • @factstation2910
    @factstation2910 2 роки тому

    Sir.. I'm a kid currently studying in class 10th ,,,, watched your video to complete my drone.. as I use some different hardware there is a problem in PID tuning.. just need your help how can I do this to make my drone fly

  • @SKJagan-dh2ft
    @SKJagan-dh2ft 6 років тому

    How you choose the PID values of yaw to get the PID values of roll?

  • @engr.arafathmdnurullahsabu3360
    @engr.arafathmdnurullahsabu3360 9 років тому

    How to get the remote control to operate the quad-copter. I watched a remote control and you controlled the copter by the the joysticks.

    • @Joop_Brokking
      @Joop_Brokking  9 років тому

      +Mohammed Nurullah The receiver inputs are explained in part two of this YMFC-3D series.

  • @maisamnaqvi6192
    @maisamnaqvi6192 5 років тому

    when i start the motors, the quadcopter tends drifts to one side and is not stable. plz help

  • @yimmonirak9537
    @yimmonirak9537 7 років тому

    Hi Joop Brokking,what your code balance test in your video????