Inverted pendulum on a cart

แชร์
ฝัง
  • เผยแพร่เมื่อ 18 ต.ค. 2019
  • Stabilizing pendulum on a cart with full state feedback control
    Articles:
    - habr.com/ru/post/472588/
    Hardware used in the project:
    - DC motor, 12V, gearbox 5:1 (www.conrad.cz/motor-s-prevode...)
    - Incremental rotary encoder LPD3806-600BM-G5-24C 600 PPR (motor)
    - Incremental rotary encoder OMRON E6B2-CWZ6C 2500 PPR (pendulum)
    - Power supply 12V, 4A (www.gme.cz/spinany-zdroj-mean...)
    - 10Amp 5V-30V DC Motor Driver (www.cytron.io/p-10amp-5v-30v-...)
    - Arduino Mega 2560
    Source code: github.com/zjor/inverted-pend...
  • วิทยาศาสตร์และเทคโนโลยี

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

  • @Pink_Maggit
    @Pink_Maggit 2 ปีที่แล้ว +212

    "What is my purpose?"
    "You hold the pendulum straight up"

    • @saraqael.
      @saraqael. 2 ปีที่แล้ว +11

      “oh my god“

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

      U could use it to measure seismic activity probably

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

      There is no purpose of a newly born child either, but then one day he becomes Newton, Einstein, Ussain, Messi or Kobe.

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

      @@ajeetpandey01 usually parrent have some purpose for the kid. Even if said kid does not want to do anything with that purpose.

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

      @@saraqael. cringe

  • @LostInAutism
    @LostInAutism 2 ปีที่แล้ว +106

    This has been in my first recommended spot for the last week... Now let me tell you something my dude, I was not disappointed.

  • @Pie_Mastah
    @Pie_Mastah 2 ปีที่แล้ว +113

    Not sure why I expected it to swing like a pendulum upside down

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

      Same!

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

      I thought it would work like a ametanome

    • @Klaevin
      @Klaevin 2 ปีที่แล้ว +1

      I came here specifically to see that. like, he shows how it works and then he demonstrates how a pulse can lead to resonance by punching the pendulum

    • @Manigo1743
      @Manigo1743 5 หลายเดือนก่อน

      Because that is what the title says. It is not a pendulum, it is a stick.

  • @lixielabs
    @lixielabs 4 ปีที่แล้ว +432

    Dude, the glass of water was the 110% extra there.
    I was so relieved when it got removed! :)

    • @ashleyavenuemusic
      @ashleyavenuemusic 2 ปีที่แล้ว +1

      What the fuck does this mean

    • @geniferteal4178
      @geniferteal4178 2 ปีที่แล้ว +4

      So close to the laptop. Jusy a quick demo. He was nervous too!

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

      @@ashleyavenuemusic The system is most likely tuned based on the mass of the weight on the end and so changing it could cause unstable behavior, i.e. oscillations

    • @pirig-gal
      @pirig-gal 2 ปีที่แล้ว +1

      @@RANDOMDUEDFTW It must have a self-tuning algorithm, or else it's would've been thrown out of whack with the glass on top, right?

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

      110% is not possible. You cannot go over 100%

  • @ivandasty277
    @ivandasty277 2 ปีที่แล้ว +82

    You have succeeded in doing very complicated work which I have tried to do and failed many times! Good job my friend. 👍

  • @wizewizard1840
    @wizewizard1840 2 ปีที่แล้ว +22

    This is so cool ... and so mean at the same time. The cart seems really stressed out when you mess with the pendulum while it balances it.

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

    Great now I want to build one of these even though I have absolutely no use for it. Very nice work.

  • @KGB95140
    @KGB95140 2 ปีที่แล้ว +160

    Would be awesome to turn off the power when it has found the perfect balance, too see if it would stay in position.

    • @DarkMatterLP1
      @DarkMatterLP1 2 ปีที่แล้ว +4

      omfg dude i just commented that and now i see your comment.. deleting it now, rip lmao

    • @bomxacalaka2033
      @bomxacalaka2033 2 ปีที่แล้ว +30

      assuming the motor doesnt have enough friction to stop the micro forces of gravity, it wouldnt stay in perfect balance for more than a few seconds

    • @chrismofer
      @chrismofer 2 ปีที่แล้ว +4

      Depends how much internal friction the motor+encoder has

    • @herkules593
      @herkules593 2 ปีที่แล้ว +15

      Definitely not. Bringing this into perfect balance is near impossible because the system has very low friction and high potential energy.
      Given you could do it, any slight air movement would topple it as systems like this are really really fragile. There are strong enough air movements simply due to temperature differences in any room so this thing would fall over in a matter of seconds unfortunately.
      Try to balance a pencil on it's tip - that's kinda similar.

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

      @@herkules593 no, inverted pendulums get more unstable the shorter they get, so balancing a pencil is way harder.

  • @ChillGuy511
    @ChillGuy511 2 ปีที่แล้ว +1

    That's so cool! Even the videography!

  • @Jemacaza
    @Jemacaza 28 วันที่ผ่านมา

    Thanks for sharing, very much appreciated.

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

    Pharquen Awesome man !!

  • @kaPPseLL
    @kaPPseLL 2 ปีที่แล้ว +34

    This thing deserves a lot more feedback in likes and shares. It's absolutely unappreciated! This should be shown to kids to motivate them to study engineering, automatics and robotics.
    It's not complicated and a lot of students are able to make it alone, but most educational systems won't even let them know about it. Maybe if more people had ability to see this during their lessons, they would understand that CNC or 3d printing isn't that revolutionary.
    In my country it's unimaginable to get the idea shown in this video until being and engineer and trying to get a master degree.
    Wish you well my friend, and please show this device to as many young people as possible! And plant in their minds, that every one can make it.

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

      Do you know what revolutionary means?
      3D printing and CNC being revolutionary is not a bad thing and it does not prevent people from learning it. And they are in fact, revolutionary, because it gives the power of computer aided manufacturing to ordinary people. Before home CNC and 3D printing kits became available, you'd have to go to a machine shop or some specialist company to do it for you.

    • @SergeyRoyz
      @SergeyRoyz  2 ปีที่แล้ว +7

      I appreciate your feedback! I actually wanted to turn it into some kind of kit or series of lectures, add some fancy LEDs. You can find my contacts on GitHub and we can discuss the project further.

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

      @@SergeyRoyz how are you managing the movement in y axis if the length of shaft is x axis?

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

      @@sepg5084 I think you completely missed their point. All they said is you don't have to be an engineer to learn the basics of CNC machines today with all the available information and easy to learn demonstrations like this one. And no, CNC was not revolutionary. Manual Milling was around before aided machining happened and they were found in many farms, work places and even homes. What was revolutionary was the birth of the transistor and the inevitable micro-controller. CNC machining was about as revolutionary as the electric toothbrush.

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

      @@SergeyRoyz Thanks I studied this on my applied uni in engineering. Will definitely check out your github PS a serie would be awesome

  • @guoguowg1443
    @guoguowg1443 18 วันที่ผ่านมา

    great stuff man

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

    This is sick!

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

    Very nice, good Work Mate :)

  • @ControlEngineeringCh
    @ControlEngineeringCh 6 หลายเดือนก่อน

    Great work! Long pendulum

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

    Hello, I am trying to stabilize the pendulum on a cart, and separately I managed to use one LQG for the cart position and another LQG to stabilize the pendulum. Separately they are great, but I cannot join the controls so that the car has no drift. How can I do it, will you give me any information please? Regards.

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

    You can also turn that contraption upside down and play with input shaping - where you pulse the moves in order to eliminate residual oscillation after a change in position.

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

    Quite impressive indeed!

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

    Blessings of the Algorithm to you, sir!

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

    the master of PID tuning

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

      The description says Full State Feedback was used which is a similar but still different technique.

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

    I had the idea of an inverted pendulum as an alternative way to control a self-balancing vehicle. My engineering wasn't to this level and my coding isn't great either. It didn't work but you have convinced me that it could in the right hands!

    • @darkraidersgaming7761
      @darkraidersgaming7761 2 ปีที่แล้ว +1

      That's actually how a Segway PT balances, so it's definitely possible.

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

    That's so COOL

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

    would it be possible with a 2 axis pendulum? so with a joint in the middle?

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

    How does Full State Feedback work on a one-dimensional controller?

  • @AivoPaas
    @AivoPaas 2 ปีที่แล้ว +4

    Would be dope if it was actually swinging upside down to a slow stop.

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

    excellent

  • @PixelYT-ts2fe
    @PixelYT-ts2fe 2 ปีที่แล้ว

    Epic nice glass

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

    It's mind blowing for a reason I don't know.

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

    What was the feedback sensor

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

    What parameters should we take into account or what advice could you give me?. thankyou

  • @ayushdalai3047
    @ayushdalai3047 2 ปีที่แล้ว +1

    It's amazing 😍😍😻

  • @KhaNguyen-rc1yw
    @KhaNguyen-rc1yw 2 ปีที่แล้ว

    amazing

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

    Awesome

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

    This video is gonna blow up, I know it...

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

    Now do it in two dimensions!

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

    Cool!

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

    What is it good for tho? ... Eon Musk: LETS LAND THE ROCKET BOOSTERS!!!!!!

  • @13akhileshdeshmukh22
    @13akhileshdeshmukh22 5 หลายเดือนก่อน

    hey i need a code for this project and list of equipment you use in the project like sensor and controller board, etc. i need this for learning purpose, can u please help me.

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

    Subscribed

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

    when I saw this the first time, about 25 yrs ago at the University of applied Scienece Magdeburg, I wondered for what purpose do you need such things... I realized it, when I saw a Leopard2 driving through rough terain and shooting with a stabilized gun o_0

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

    And here I am struggling with state space.

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

    Does this work with a PID algorithm or something?

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

    every robiotics engineer's dream

  • @asdfghyter
    @asdfghyter 2 ปีที่แล้ว +10

    Would it be possible for it to swing itself up to the top from the bottom? Maybe by moving back and forth multiple times like you would on a swing? That would be extremely cool!

    • @MrOliver1312
      @MrOliver1312 2 ปีที่แล้ว +1

      There's a video of a two joint pendulum doing this!

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

    nice.

  • @hoathai7657
    @hoathai7657 หลายเดือนก่อน

    Dear Sir, Could you tell me a link to buy Motor? I am unable to access the link you posted in Arduino forum. Help me. Thank you so much

    • @SergeyRoyz
      @SergeyRoyz  หลายเดือนก่อน

      Hi, it's this one: www.aliexpress.com/item/4000169355301.html

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

    I like how he puts his finger on it like he's mixing it up, wikka wikka!

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

    Make it in a fountain ❤️

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

    Should have build the twin Towers with dat

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

    Your messing with our future overlords! The won'tt be happy.

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

    Segway?

  • @wizrom3046
    @wizrom3046 2 ปีที่แล้ว +1

    Now make it juggle. 😁

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

    I was expecting a cat on a pendulum, my day has been ruined

  • @trevorbilak-sackin792
    @trevorbilak-sackin792 2 ปีที่แล้ว

    Earthquake technology?

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

    When your wife is arguing with your mom.

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

    mikroişlemci olarak ne kullandınız

    • @SergeyRoyz
      @SergeyRoyz  2 ปีที่แล้ว +1

      Arduino Atmega2650

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

    space elevator prototype

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

    How long can it hold a glass of water like this? Make a test because barely 10 seconds it's not impressive

    • @Smiles-jp5ns
      @Smiles-jp5ns 2 ปีที่แล้ว +1

      It impressive mate he’s shown it can be balanced and besides you can tell that he can leave it on there for a long time and probably won’t fail he had to make this video short remember

  • @OlegKozlyuk
    @OlegKozlyuk 4 ปีที่แล้ว +7

    Стакан с водой над ноутбуком - смело :)

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

      я же все рассчитал :)

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

      ​@@SergeyRoyz Хорошо что каретка твёрдая и стакан наполовину пуст, а то она влево-право балансирует, а вперёд-назад за счёт жёсткости. Интересно было бы увидеть балансир по всей поверхности. Думаю, можно сделать в качестве опоры шар, над шаром шасси из 4 колёс крест-накрест. Двигатели достаточно поставить на 2 перпендикулярных колеса, а противоположные колёса просто опорные.

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

    Impressive. For me who knows nothing. 😮

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

    at 0:52, no apostrophe needed :)

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

    🤯

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

    DIY earthquake sensor
    Yes i know it has a name cant remember it rn xD

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

    Make one that runs on two axes.

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

    Love it

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

    Insert Thanos quote here

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

    dude!

  • @shahzaibvibez
    @shahzaibvibez 2 ปีที่แล้ว +1

    Bro can u kindly share accurate code of Arduino, I have to submit the project in university, help me out,
    Arduino code showing error of PINE and PIND Unknown variables,,,
    If any one else know about this kindly help me in this regard

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

      Hi, I used Atmega 2560, it has more ports. Here is the last working program: github.com/zjor/inverted-pendulum/tree/master/sources/stabilize-with-dc

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

    electronic metronome

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

    Make a bigger one that you can stand on!

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

    2axis is easy now do it in 3axis

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

    you can put literally anything on there and you chose a glass of water.... and you're suppose to be the smart one

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

    0:34 LOL. Don't put AI on it :D

  • @Manigo1743
    @Manigo1743 5 หลายเดือนก่อน

    That is not a pendulum, that is a stick. Now make it swing from side to side when inverted, so it actually becomes a pendulum. Otherwise change the title of the video.

  • @92xl
    @92xl 2 ปีที่แล้ว

    Anti-pendulum

  • @splendidjay8471
    @splendidjay8471 2 ปีที่แล้ว +1

    This isn't a pendulum. Pendulums hang. It may be interesting, but a pendulum is:
    pen·du·lum
    /ˈpenjələm/
    noun
    a weight hung from a fixed point so that it can swing freely backward and forward.

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

    dude just build a bigger table

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

    but it is simply the illusion of sensing balance, in reality all you are doing is using off the shelf parts to measure directional rotation from a pivot point. if the balance point of the fulcrum rod is altered the entire illusion collapses. nice trick but not valid science.

    • @Rayray-mm3zc
      @Rayray-mm3zc 2 ปีที่แล้ว +6

      This comment is braindead and you shouldn't comment if you know nothing. You are probably unteachable.
      1.) The modelling of a systems variables (balance point of fulcrum rod) to understand its dynamics is important in achieving good control performance.
      By your weird idea of what is valid science, every airplane you've sat in is also not valid science because they need to accurately model the engine and its weight. Having an accurate system model and variables seems pretty scientific to me, the designer probably had to tune for it.
      2.) This is not a proportional positional controller, it is the inverted pendulum controller. It has a notion of both rotation position and encodes rotational velocity, then utilizes the dynamics to derive its required control input. You can literally see on his laptop screen and by examining the article he wrote that he has indeed done a force based system.
      3.) Depending on the system's control scheme, if there is an integral component built in, the system can self adjust for variance in system variables. This is necessary in systems that may experience a lot of disturbance or when the input effort may not generate an exactly known amount.
      Tl;dr you should read

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

      @@Rayray-mm3zc sooooo.... Only the illusion of balance. Thank you for utilizing your ignorance to it's fullest and proving my point flawlessly.

    • @Rayray-mm3zc
      @Rayray-mm3zc 2 ปีที่แล้ว +1

      @@pierelenigus8598 Definitely unteachable, probably illiterate.
      The computer or cellphone you're using only has the illusion of balance in its voltage controller.
      The airplanes flying in the air are an illusion.

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

      @@Rayray-mm3zc Ray bro.... if he didnt get it from the first comment he aint getting it at all hah
      Amazing design by the creator tho!

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

      @@Rayray-mm3zc (