Drone Simulation and Control, Part 5: Tuning the PID controller

แชร์
ฝัง
  • เผยแพร่เมื่อ 7 มิ.ย. 2024
  • In the last video, we learned how accurate, nonlinear models are great for simulation but they don’t lend themselves well to linear analysis and design. This video takes the nonlinear model of the Parrot Minidrone and builds a linearizable model that can be used for tuning the 6 PID controllers in our control architecture.
    We use the PID tuner app in Simulink to tune the altitude control loop and show why having a good model of your system is fundamental to Model-Based Design.
    Related resources:
    • Programming Drones with Simulink: bit.ly/2CdbFq7
    • Quadcopter Modelling with Simulink: bit.ly/2CbdeVj
    You can also program drones and unmanned aerial vehicles (UAVs) using an autopilot such as PX4. You can interface and deploy MATLAB and Simulink model to PX4 using the PX4 Hardware Support Package in UAV Toolbox
    • PX4 Hardware Support Package: bit.ly/PX4Autopilots
    • Learn more about UAV Toolbox: bit.ly/UAV-Toolbox
    Learn more about Aerospace Blockset: bit.ly/AerospaceBlockset
    -----------------------------------------------------------------------------------------------------------------------
    Get a free product Trial: goo.gl/ZHFb5u
    Learn more about MATLAB: goo.gl/8QV7ZZ
    Learn more about Simulink: goo.gl/nqnbLe
    See What's new in MATLAB and Simulink: goo.gl/pgGtod
    © 2018 The MathWorks, Inc. MATLAB and Simulink are registered
    trademarks of The MathWorks, Inc.
    See www.mathworks.com/trademarks for a list of additional trademarks. Other product or brand names maybe trademarks or registered trademarks of their respective holders.
  • วิทยาศาสตร์และเทคโนโลยี

ความคิดเห็น • 64

  • @BrianBDouglas
    @BrianBDouglas 5 ปีที่แล้ว +29

    Hi everyone! I hope you enjoyed this video. If you have any questions or comments you'd like me to see, please leave them on this comment so that I get notified and can respond. Cheers!

    • @jeffersonpimentamelo
      @jeffersonpimentamelo 5 ปีที่แล้ว

      Brian, how about apply control in power electronics? A current source circuit, buck converter, boost converter. I miss the integration between both subjects. Thanks!

    • @BrianBDouglas
      @BrianBDouglas 5 ปีที่แล้ว +1

      Hi @@jeffersonpimentamelo. Great suggestions! Control within power electronics is actually one of the topics that Mathworks would like me to cover in the future (maybe Spring-ish). The video list changes over time as we think of more interesting topics to cover but for now, it's in the queue!

    • @suhaylpatel9471
      @suhaylpatel9471 5 ปีที่แล้ว +1

      Hey Brian. I'm a mechanical engineering student and for a UAS competition me and my team have to build a drone that is fairly autonomous (be able to drop a payload and go to certain check points in a field by detecting targets). Which of your videos do you recommend watching to help achieve this?

    • @abdelhakimamer6989
      @abdelhakimamer6989 5 ปีที่แล้ว +1

      Brian i am done with the series It was awesome, thank you. I want to do some kind of exercise or practice to test my understanding. What do you recommend? I wish to eventually to be able to be able to design the whole simulink model from scratch....

    • @3Triskellion3
      @3Triskellion3 5 ปีที่แล้ว

      It'd be great if you could go a little into using this stuff on homebuilt drones, rather than commerical ones (perhaps those running on arduinos?)

  • @OrangeDurito
    @OrangeDurito ปีที่แล้ว +3

    I truly feel short of words to express my gratitude for this video series. This gave me so much clarification regarding the model-based design and control of a real hardware system. You are an incredible teacher. Thank you for inspiring and helping us be a better control system engineer.

  • @saadfareed1075
    @saadfareed1075 3 ปีที่แล้ว +6

    That series was very great and helpful.Thanks @Brian Douglas....By the way, i am also working on quadcopter control but rather then using Parrot Mini drone, i have developed my own f450 quadcopter running on Arduino due which is then interfaced with Simulink...And its flying great.

    • @yakovhammer5739
      @yakovhammer5739 ปีที่แล้ว

      Hey! I am trying to do that exact same project. I am having some trouble. Think you would be able to give me some help?

  • @40NoNameFound-100-years-ago
    @40NoNameFound-100-years-ago 2 ปีที่แล้ว +5

    I was about to feel so depressed when Brian said 'I don't have time ' after the drone experiment failed and then I felt so excited when Brian came again and said' okay I changed my mind I don't wanna leave this vido with a failed experiment'. 👍👍👍😃

  • @fernando.liozzi.41878
    @fernando.liozzi.41878 5 ปีที่แล้ว +3

    WOW!, I was able to connect the Parrot to simulink, I am already with the initiation examples. Excellent thank you very much.

    • @ShivaniSingh-jc4pg
      @ShivaniSingh-jc4pg 5 ปีที่แล้ว

      Fernando Liozzi
      I also need link to simulate this . I am facing samd problem

  • @fernando.liozzi.41878
    @fernando.liozzi.41878 5 ปีที่แล้ว +11

    Can you share a link to the modified project ?, Since I can not follow you, it goes very fast. Greetings.

  • @Reglrtv
    @Reglrtv 5 ปีที่แล้ว +1

    @Brian Dounglas: Suppose the On-board hardware system is based on FPGA and DSP where the FPGA is in charge for the low-level algorithm and DSP for the high-level algorithms, but both devices communicate through a UART interface. Would Matlab still make the work easier for FPGA?

  • @marofe
    @marofe 5 ปีที่แล้ว

    Amazing!

  • @jackbosshard4502
    @jackbosshard4502 4 ปีที่แล้ว

    Is it possible to use my Matlab/Simulink home edition for the Experiments with the Parrot hardware support? The number of the virtual blocks is limited to 1000 with this licence.

  • @khoanguyenntk9302
    @khoanguyenntk9302 ปีที่แล้ว

    Bravo, matlab is the best!

  • @mathurhp
    @mathurhp 5 ปีที่แล้ว +1

    Thank you

    • @adrieloliveira3348
      @adrieloliveira3348 5 ปีที่แล้ว

      If you were able to make the same modifications to the video, please send me a link with the modified project. I followed the same steps and it did not work.

  • @user-cp2rc4zc3i
    @user-cp2rc4zc3i 4 ปีที่แล้ว

    awesome!!

  • @chun-weikong7086
    @chun-weikong7086 3 ปีที่แล้ว

    Like how you end the video!

  • @wailkerjack7979
    @wailkerjack7979 4 ปีที่แล้ว

    I have met the model linearization problem, include the port type mismatch. I just turn the data type from 'single' from ' double'.And it works.

    • @varian_teknologi
      @varian_teknologi 3 ปีที่แล้ว

      can you tell me which block should I change the data type to double? thank you

  • @fernando.liozzi.41878
    @fernando.liozzi.41878 5 ปีที่แล้ว +7

    Please, you could make a video making the identification of the system, with the input and output data. I have looked and made several control problems identifying systems, but I would like you to make the identification of this drone. I already have it working with Simulink and I'm doing everything you've done so far in the videos. Many thanks.

    • @brianblasius
      @brianblasius 5 ปีที่แล้ว +2

      I support this idea too. We need to learn system identification in matlab.

  • @mertaygun4091
    @mertaygun4091 5 ปีที่แล้ว

    Sorry if I missed that part but what do you use as a hardware for this project? What is the drone you use for example? Thx in advance.

    • @BrianBDouglas
      @BrianBDouglas 5 ปีที่แล้ว +1

      Ah, yeah, I go over it in the first part but don't repeat it again in the other videos. This is the Parrot Mambo mindrone and I've connected it to Simulink with the Parrot Minidron Hardware Support Package. www.mathworks.com/hardware-support/parrot-minidrones.html

  • @adrieloliveira3348
    @adrieloliveira3348 5 ปีที่แล้ว +3

    Hello Brian, can you help me solve this mistake? I did exactly as video though this error occurred:
    Data type mismatch. Input port 4 of 'untitled/ControlMixer' expects a signal of data type 'double'. However, it is driven by a signal of data type 'single'.
    Component:Simulink | Category:Model error
    Data type mismatch. Output port 1 of 'untitled/Controle de Altitude' is a signal of data type 'single'. However, it is driving a signal of data type 'double'.

    • @sohailali3466
      @sohailali3466 3 ปีที่แล้ว

      Hello. Same Problem Here. Did you manage to fix it?

    • @francescosavino5281
      @francescosavino5281 2 ปีที่แล้ว

      @@sohailali3466 same problem, have you solved it?

  • @fernando.liozzi.41878
    @fernando.liozzi.41878 5 ปีที่แล้ว +1

    Hello, I bought a Parrot Mambo Fly, a Bluetooth dongle CSR 4.0, I installed the harmony driver that you left in a link. The bluetooth works well, I can connect devices, transfer files and music. But when it comes to connecting the drone, only one icon appears, and it will not let me connect it.

    • @fernando.liozzi.41878
      @fernando.liozzi.41878 5 ปีที่แล้ว

      la.mathworks.com/help/supportpkg/parrot/ug/connect-parrot-mambo-minidrone-to-computer-using-bluetooth.html?searchHighlight=connect%20parrot%20bluetooth&s_tid=doc_srchtitle

    • @fernando.liozzi.41878
      @fernando.liozzi.41878 5 ปีที่แล้ว

      I have not tried this option yet, when I get home I will try, and comment. la.mathworks.com/help/supportpkg/parrot/ug/minidrone-not-found-by-bluetooth-scan.html

  • @kranthikumardeveerasetty2012
    @kranthikumardeveerasetty2012 5 ปีที่แล้ว +2

    Dear Brian,
    I am getting the following error.
    Data type mismatch. Input port 4 of 'controller_tuning/ControlMixer' expects a signal of data type 'double'. However, it is driven by a signal of data type 'single'.
    Component:Simulink Control Design | Category:Linearization error
    Data type mismatch. Output port 1 of 'controller_tuning/altitude controller' is a signal of data type 'single'. However, it is driving a signal of data type 'double'.

    • @sohailali3466
      @sohailali3466 3 ปีที่แล้ว +1

      Hello. Same Problem Here. Did you manage to fix it?

    • @francescosavino5281
      @francescosavino5281 2 ปีที่แล้ว

      @@sohailali3466 same problem, have you solved it?

  • @quinn6152730
    @quinn6152730 2 ปีที่แล้ว

    finally make it through...

  • @yuanxinshen8259
    @yuanxinshen8259 4 ปีที่แล้ว +1

    6:28, why the P signal minus the D signal ? is that supposed to be added?

    • @k1ngjulien_
      @k1ngjulien_ 4 ปีที่แล้ว

      maybe D produces a negative output

    • @yuanxinshen8259
      @yuanxinshen8259 4 ปีที่แล้ว

      @@k1ngjulien_ maybe,I'm still very confused

    • @teocardoso7237
      @teocardoso7237 4 ปีที่แล้ว +1

      Probably because the z-axis negative is up. So the error derivative is the opposite. And the minus fixes it.

    • @brunopinto1832
      @brunopinto1832 4 ปีที่แล้ว

      Because the d term is acting on the measured value. Its called derivative on measurement, thats why its negative.

  • @TnInventor
    @TnInventor 4 ปีที่แล้ว

    the package that i have does not have the same model why? i am using matlab 2019, i cant find the mambo

    • @TnInventor
      @TnInventor 4 ปีที่แล้ว

      ah it works , just type asbQuadcopterStart dont open it from simulink block

    • @xXKM4UXx
      @xXKM4UXx 4 ปีที่แล้ว

      Were you still able to tune?

    • @TnInventor
      @TnInventor 4 ปีที่แล้ว

      @@xXKM4UXx nope :D

  • @abdullaheraslan7905
    @abdullaheraslan7905 5 ปีที่แล้ว +1

    Hi Brian
    I am student at Istanbul Technical University. My friend and I are working on parrot mambo as a graduation project. We have a problem. We can fly parrot mambo but it is drifting. Two days ago we noticed something under the parrot to put colored objects in the drifting is disappearing. It is about marker but we cannot understand what is the marker and how can parrot mambo detect a marker in simulink blocks. How can we understand parrot mambo detect a marker in simulink blocks?

    • @hellsgone
      @hellsgone 5 ปีที่แล้ว

      Optical flow, altta kamera var, yerin detayli olmasi gerekiyor yani siyah bant ile x isaretleri koyun etrafina boylece drone kalktiginda isaretleri algilayip sabit durabilir oldugu yerde. 100% kipirdamayacak degil tabii.

    • @xXKM4UXx
      @xXKM4UXx 4 ปีที่แล้ว

      Are you still working on this project? I am currently and would like some help

  • @perceptrongaming4290
    @perceptrongaming4290 4 ปีที่แล้ว

    when is the next video releasing ????

  • @FernandoGarcia-hc9mn
    @FernandoGarcia-hc9mn 3 ปีที่แล้ว

    You must have a NASA computer if you can handle so many Simulink windows simultaneously.

  • @gokergayretli813
    @gokergayretli813 5 ปีที่แล้ว

    KRALLLLLL

  • @jobaidulislam7506
    @jobaidulislam7506 3 ปีที่แล้ว

    Could you please help me to establish UAVs mathematical model? Please save my life please Sir please

  • @mehmeteminm
    @mehmeteminm 3 ปีที่แล้ว +2

    I hate when he goes back to simulink :(