Inverted Pendulum(s) #3 - Swing Up

Sdílet
Vložit
  • čas přidán 29. 08. 2024
  • Adding swing-up capability and appreciating the need for motor feedback.
    mechanicallumbe...

Komentáře • 52

  • @azyfloof
    @azyfloof Před 8 lety +2

    Fantastic work! :D
    I love seeing the whole process, working up from nothing to get various bits working in stages, then continually building it up and improving on it along the way, learning as you do. Videos that play out like this I absolutely love.
    I can't wait till you do a double pendulum with swingup ;) Holy friggin grail, right there!

    • @ScottRumschlag
      @ScottRumschlag  Před 8 lety

      +Azayles Thanks, it's definitely a process (that always takes longer than you expect).

  • @benbencom
    @benbencom Před 8 lety +2

    "The PID control is not designed to handle something coming in with a velocity." Actually, that's what the differential term is doing. It is accounting for the motion that already exists by canceling out some of the command you would otherwise give the motor. One way to think about it is "virtual friction".

    • @ScottRumschlag
      @ScottRumschlag  Před 8 lety

      +Ben Jackson I should have said "my PID control is not capable of dealing with angular velocity". This week's upcoming video should be very helpful at quashing future motor performance issues . . .

  • @ttmcookies
    @ttmcookies Před 8 lety +1

    Hi Scott. I am guessing, you're problem is that the PID-controls will control a linear or already stable system pretty well. But what you have here is a destable non-linear system and the position control PID will not be sufficient. It works sometimes, because the system gets randomly into a state, where it's quasi-stable (the pendulum gets to the highest point at a 0-velocity without any control).
    As you've probably already realized, you need to control not only the position but also the angular velocity of the pendulum. Typically, this is done using a cascaded control system, where the position control feeds an input to the velocity control. This way the velocity control would still try to get the system to a standstill (at least in the rotation joint) and this would mean that while the pendulum is swinging upwards, the velocity control will try and dampen the speed, while the position control is trying to still get it to the highest position...

    • @ScottRumschlag
      @ScottRumschlag  Před 8 lety

      +Oan Nam Yeah, it's unclear in the video but I added a brief mode between swing-up and PID to try and cancel the angular speed, but the results were unreliable. An integrated system like you describe is in the works.

  • @AnkitkumarChheda
    @AnkitkumarChheda Před 8 lety

    Hello scott, nice work. I am studying control engineering and working on a self-balancing robot (practical application of inverted pendulum). Generally tuning of coefficient of PID controller is difficult and cumbersome. This is the reason we ,as control engineer, go with more advance control like LRQ + PID, SMC, Intelligent control (IC) + PID, IC + SMC, MPC, etc. As per my studies, I am trying to implement all variety of controllers one by one and see the observations. Hopefully I should get something to work on and produce a research paper.

  • @Bullsnation6
    @Bullsnation6 Před 3 lety

    I just came across this, but have you considered using Reinforcement learning instead of purely using a PID controller?

  • @creativeobsin
    @creativeobsin Před 8 lety +1

    I'm just guessing here but, I think it would work better if the pendulum had a bit a weight at the end of the stick. Balancing a stick on your hand is a bit hard... add a weight on top & its a lot easier to keep it steady. You get my point. :J

    • @ScottRumschlag
      @ScottRumschlag  Před 8 lety

      +creativeobsin Maybe, technically the mass of a pendulum doesn't affect it's period, but you do need enough mass so that things like air resistance and encoder friction can be ignored.

    • @ericcmcgraw
      @ericcmcgraw Před 8 lety

      +Scott Rumschlag Adding mass to the end brings the pendulum's center of mass further from its center of rotation, thus increasing its effective length, and thus, its period.

    • @TheMagicOfGabriel
      @TheMagicOfGabriel Před 8 lety

      +creativeobsin For sure it would work better

    • @creativeobsin
      @creativeobsin Před 8 lety

      +TheMagicOfGabriel That's what I thought :)

    • @Dirk3672_StupidYT
      @Dirk3672_StupidYT Před 8 lety

      +Scott Rumschlag I was wondering about the number of swings it was taking to get the stick headed up and why it appeared to be so inefficient. The thought of a few fender washers screwed to the end of the stick definitely came to mind.

  • @PatJamesRicketts
    @PatJamesRicketts Před 8 lety +1

    What about taking out the belt system altogether, and using a track with teeth that engages with a gear at the pendulum? It seems that belt will always have too much slack due to the distance.

    • @ScottRumschlag
      @ScottRumschlag  Před 8 lety

      +Pat James I thought about that too. One disadvantage is that you then have the motor's mass on the cart. I opted for belts as they were simple and there are several very high-end systems that use belts too. There are a few pendulum systems out there that use linear motors (magnets!) to move the cart back and forth, they have incredible acceleration.

  • @mr.bright684
    @mr.bright684 Před 2 lety

    why is the laptop screen closed?

  • @shiqiai2881
    @shiqiai2881 Před 6 lety

    Hi, after see the slow motion carefully, I think the problem that your reversed pendulum not robust is you control the speed of motor instead of the acceleration. only acceleration can produce torque for pendulum. besides, in your video, it seems motor hit the max speed easily and does not acceleration anymore. I also tried it with good motor driver, which can be achieved very easier. negative position feed back + positive angle feed back to swing it. and negative angle feed back to hold it.

  • @Jarko1401
    @Jarko1401 Před 8 lety +1

    Next time you should try to use reaction wheel

  • @jparabie
    @jparabie Před 8 lety

    Why does it take so long for the PID to take control when the stick is upright? Do you not have a "window" of say (+) or (-) 15deg of 90 (stick upright) to trigger the PID loop? I'm basing this off of the delay I saw between seeing the stick in an upright postition... and the light changing indicating PID control.

    • @ScottRumschlag
      @ScottRumschlag  Před 8 lety

      +jparabie Yes, I forgot to mention this in the video but my final strategy had three steps: swing up until it's within 40 pulses (about 6 degrees) of vertical, then a special mode to cancel out the angular speed, when the angular speed is close to zero and the cart has slowed down transfer to PID. This is a bad solution but as I mentioned in the video it seemed so closed to working that it felt unreasonable to overhaul the entire system. 20/20 hindsight.

  • @feliperoque18
    @feliperoque18 Před 6 lety

    Hello brother, you might provide these materials you used to build the inverted pendulum? I'm trying to build one.. Thanks!

  • @FLyyyT_
    @FLyyyT_ Před 8 lety

    I hope you're not using the PID library, because it is not very well suited for unstable systems. I did a similar inverted pendulum. More like a Segway. Sainsmart and various other manufacturers seems to already provide a solution on Amazon for a full kit.

  • @blurginouliz
    @blurginouliz Před 4 lety

    Hey! Have you ever thought about replacing that DC motor with a stepper motor, like a nema 17 maybe?
    I have a very strong feeling that this will eliminate a huge portion of your problems.
    For example the non linear response of the dc motor, where it just doesn't spin with low duty cycles and just sits there humming... This will no longer be a problem, and the stepper will give you a much more precise position control, since it responds instantly and in the correct measure.

    • @ScottRumschlag
      @ScottRumschlag  Před 4 lety

      I started with a stepper motor but had more difficulty driving it, particularly at higher speeds. This could certainly be overcome but it's why I opted for a DC motor.

    • @blurginouliz
      @blurginouliz Před 4 lety

      @@ScottRumschlag Really? But did how many steps per rotation was the one you used? A nema 17 is about 200 if im not mistaken, and it's fairly strong too

    • @simondutton8993
      @simondutton8993 Před rokem

      I've moved from a stepper to brushed as well.

  • @DoRC
    @DoRC Před 7 lety

    Maybe a cheap rc sensored brushless motor and esc. They are all over ebay for not much money

  • @ArifUmutYORUBULUT
    @ArifUmutYORUBULUT Před 7 lety +1

    Hi! I'm working on the same project. I have a problem about motor and encoder for pendulum. I would like to ask if you can write motor and encoder which you used your project. Thanks!

    • @ScottRumschlag
      @ScottRumschlag  Před 7 lety +3

      The motor is just an rc car motor with a relatively high number of turns, the encoder is 600 pulse/rev, quadrature output: www.amazon.com/gp/product/B00UTIFCVA

    • @learnzimndebele
      @learnzimndebele Před 7 lety +1

      What is the Voltage rating of the motor?

  • @bruno_sjc_
    @bruno_sjc_ Před 7 lety

    hi! Great video series!
    btw, don't you think that these belts (as they vibrate) aren't damping or delaying the control actions?

    • @ScottRumschlag
      @ScottRumschlag  Před 7 lety

      Probably a bit, but I've looked into this and don't think it's the main issue right now. My control program is the biggest problem by far, ha ha.

  • @jonathanchandrachen
    @jonathanchandrachen Před 5 lety

    hi, can i know the motor spec you used?

    • @ScottRumschlag
      @ScottRumschlag  Před 5 lety +1

      It's just a high turn (i.e. high torque) DC brushed RC car motor, nothing exotic.

  • @nihalmuhammed29
    @nihalmuhammed29 Před 5 lety +1

    Hey, i've been working on the project and would like to infer details of your code.

  • @robthorn3910
    @robthorn3910 Před 5 lety

    Have you looked at czcams.com/video/D3bblng-Kcc/video.html ? The analysis says that proportional control alone doesn't work. Trying to work around to instability with kluges instead of fixing the dynamics seems misguided to me.

  • @ardemus
    @ardemus Před 8 lety +1

    Hi Scott. I follow other excellent DIY channels, and Ben Krasnow's recent spin coater project (czcams.com/video/321tptQ8PrU/video.html) is very relevant to your Inverted Pendulum. While the project is very different, his research and experimentation with motors and motor control should prove useful. If you don't use some of it directly, it will at provide some insights and kick lose some new ideas.

  • @MagnusNyborgMadsen
    @MagnusNyborgMadsen Před 8 lety

    What encoders are you using?

    • @ScottRumschlag
      @ScottRumschlag  Před 8 lety +1

      +Magnus Nyborg Madsen www.amazon.com/gp/product/B00UTIFCVA with Avago HCTL-2022 decoders, though I'm testing out their 2032 right now to minimize wires, more next week . . .

    • @MagnusNyborgMadsen
      @MagnusNyborgMadsen Před 8 lety

      +Scott Rumschlag aha! Thanks. I enjoy your videos - especially explaining problems you encountered and such. I'm trying to build the patience to work up from the bottom like you seem to do!

    • @simondutton8993
      @simondutton8993 Před rokem

      I'm using a 1024ppr encoder.

  • @AyushGupta-pc8ue
    @AyushGupta-pc8ue Před 5 lety

    Can you please share the arduino code you are using.

    • @ScottRumschlag
      @ScottRumschlag  Před 5 lety

      It's very specific to the hardware and very simple overall, so you should able to write your own with a solid conceptual understanding.

    • @AyushGupta-pc8ue
      @AyushGupta-pc8ue Před 5 lety

      @@ScottRumschlag Actually i am facing problems with swinging up the pendulum
      I have only 50 cm long rails