Controlling a Rocket with IMAGINARY Numbers

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

КОМЕНТАРІ • 78

  • @TechNeo
    @TechNeo 2 місяці тому +54

    This video was the last thing I needed to finish my GNC algorithm. Thanks for sharing in such an easy-to-understand format!

  • @virtueose
    @virtueose 2 місяці тому +26

    Hi dude i m a sophomore electrical engineer, who wants to focus on control engineering, i had a conversation with a former gnc engineer. And he told me to study some group theory to understand quarternions. I didn't know what either of these things were. While being overwhelmed by heavy math. I found you bro. Thanks

  • @jneal4154
    @jneal4154 10 днів тому

    I just wanted to say that you did an excellent job of explaining quaternions. It was one of the better concise explanations I've heard to date. You gave an understandable explanation without watering it down to the point of falsehood. It's not an easy needle to thread. Well done!

  • @Ezis9
    @Ezis9 2 місяці тому +34

    The missile knows where it is...

    • @tsf8086
      @tsf8086 2 місяці тому +9

      It knows this because it knows where it isn't.

    • @vacoff2717
      @vacoff2717 Місяць тому +1

      it just knows it is orientation

  • @BradleyG01
    @BradleyG01 Місяць тому +3

    "Hi, my name is Garrett, and I'm building a rocket controlled by imaginary numbers"
    That tells me everything I need to know. *subscribe*

  • @AlexTrusk91
    @AlexTrusk91 2 місяці тому +13

    I guess I'll follow this channel for the upcommin years now

  • @AlbertaGeek
    @AlbertaGeek Місяць тому +3

    Acapella Science did a _Hamilton_ parody for William Rowan Hamilton, the inventor of quaternions. In it there's a line: "...and no one uses my quaternions, but just you wait, just you wait!" It's a real banger, y'all should look it up.

  • @mastershooter64
    @mastershooter64 2 місяці тому +6

    That's awesome man! Good luck on your project! I hope to see your "much much bigger' project soon

  • @juanignaciocarrano860
    @juanignaciocarrano860 2 місяці тому +12

    Nice. I used quaternions for both the sensor fusion and the control system in a drone for my thesis. The setpoint, measurement and error signals were all quaternions. The integrator in a classical scalar filter was replaced by a rotation (which in continuous time is infinitesimal). If the quaternion is re-normalized at each step, then the norm is always close to 1 and the renormalization can be performed by an approximate algorithm without using expensive divisions.

    • @AlbertaGeek
      @AlbertaGeek Місяць тому

      Acapella Science did a _Hamilton_ parody for William Rowan Hamilton, the inventor of quaternions. In it there's a line: "...and no one uses my quaternions, but just you wait, just you wait!" It's a real banger, y'all should look it up.

    • @juanignaciocarrano860
      @juanignaciocarrano860 Місяць тому

      @@AlbertaGeek Well, quaternions led to the development of vector algebra, so in a way they are used in a simplified form.

  • @aaedmusa
    @aaedmusa 2 місяці тому +5

    Nicely done! Looking forward to the launch.

  • @YSPACElabs
    @YSPACElabs 2 місяці тому +4

    Quaternions, control theory, thrust vector control...you earned a new subscriber!

    • @AlbertaGeek
      @AlbertaGeek Місяць тому

      Acapella Science did a _Hamilton_ parody for William Rowan Hamilton, the inventor of quaternions. In it there's a line: "...and no one uses my quaternions, but just you wait, just you wait!" It's a real banger, y'all should look it up.

  • @marcelo.pastorelli
    @marcelo.pastorelli 2 місяці тому

    First time stumbling across your channel! As someone planning on doing an ASE degree (currently on Physics) these videos are so interesting although i don't understand everything all the time. Hopefully you keep making content because till now youve been going great! Definitely deserves more views (currently 9,1k)

  • @craftydoeseverything
    @craftydoeseverything 2 місяці тому +1

    This video is amazing! I've always loved maths, and I've always loved space, and for a while now, I've been wanting to learn more about how rockets work and the maths that goes on behind the scenes, so this video has honestly been perfect :)

  • @KofiAsare0
    @KofiAsare0 2 місяці тому +6

    Great work, thanks for sharing resources as well!

  • @santos3131
    @santos3131 2 місяці тому +2

    Amazing flow to the video and well explained, keep it up!

  • @vedanthpadmanabhan4235
    @vedanthpadmanabhan4235 2 місяці тому +2

    Awesome video dude, learned a lot from this. Hope the launch goes swimmingly :)

  • @ajinkya3.14
    @ajinkya3.14 2 місяці тому +3

    I may not understand anything, but that baby boy!

  • @beaverbuoy3011
    @beaverbuoy3011 2 місяці тому +3

    THIS IS SICK

  • @II_xD_II
    @II_xD_II 2 місяці тому

    Keep going mate
    I liked this video so im subbed

  • @joansola02
    @joansola02 2 місяці тому +3

    Hi @Garret_R. Nice video!
    However, I'd say there's a little mistake that got magically corrected. Let me explain:
    In the case where Q_err would give you the error over the long path, that is rotating the other short way around, what you have to do is take -Q_err, the negative, not Q_err.conj(). Q_err.conj() would rotate in the long direction path also, but in the opposite direction. -Q_err would make the same orientation correction you want, but following the short path.
    Then, you take the imaginary parts, and voila, you end up fixing the mistake, because the imaginary part of Q_err.conj() is the same as the imaginary part of -Q_err !!
    In fact, the only thing you need to check is that the real part of Q_err is positive. If it is negative, then flip the whole Q_err with Q_err = -Q_err, and continue.
    Nice video anyway, and keep it up with your projects!!

    • @TheGarrettR
      @TheGarrettR  2 місяці тому

      Isn't the conjugate of q_err what you want (assuming unit quaternions)? Because when the real part is less than 0, it's not an optimal rotation so you take the conjugate to represent the same orientation but in the opposite direction. It has the same result as taking the negative because you only use the imaginary for the controller, but in terms of orientation representation that's correct method, right? This is what is done in the paper (see page 4): www.diva-portal.org/smash/get/diva2:1010947/FULLTEXT01.pdf
      and thank you!

  • @umbraemilitos
    @umbraemilitos 2 місяці тому +4

    This is excellent. I've come to prefer geometric algebra more for generalized transformations, but quaternions are still cool.

    • @linuxp00
      @linuxp00 2 місяці тому

      Even more, since quaternions are part of GA's framework in the form q = 1+ix+iy+iz, where the imaginary unit appended to a vector morph it into a rotational plane segment (bivector/pseudovector) orthogonal to said vector.

    • @umbraemilitos
      @umbraemilitos 2 місяці тому +1

      @linuxp00 Yes, this is part of an even subalgebra.

  • @johnpekkala6941
    @johnpekkala6941 2 місяці тому +1

    Very interesting! I never realized quaternions uses imaginary numbers! I however only learned about euler angles and quaternions as 2 different ways of controlling object rotation/orientations in game engines like Unity, Unreal and Godot but have not detail studied these concepts further other then I know about the gimbal lock issue with euler angles making as I understand quaternions the superior method to use.

  • @beaverbuoy3011
    @beaverbuoy3011 2 місяці тому

    Gotta love quarternions in control systems

  • @jagaszepielak2601
    @jagaszepielak2601 19 днів тому

    Very good video bravo😊

  • @TheRadioactiveGoose
    @TheRadioactiveGoose 2 місяці тому +1

    Just working on my own gimbal and custom flight controller, you got this! get that bag lmao

  • @CliveBagley
    @CliveBagley Місяць тому

    Good effort 👍🏼

  • @RealEverythingComputers
    @RealEverythingComputers Місяць тому

    Nice video. well done

  • @charlesspringer4709
    @charlesspringer4709 Місяць тому +1

    Go the next step and use Clifford Algebra and Geometric Calculus.

  • @elfeiin
    @elfeiin Місяць тому +2

    1:27 an extended WHAT filter?

  • @smortboi2374
    @smortboi2374 Місяць тому

    why is bro lowk majestic...

  • @vacoff2717
    @vacoff2717 Місяць тому

    even a random kid on youtube is hiding his Intellectual Property lol

  • @cdkw2
    @cdkw2 2 місяці тому +2

    banger title

  • @CH-ev2mm
    @CH-ev2mm 2 місяці тому +1

    clicked for cool concept, stayed for cute guy

  • @andrewalson2612
    @andrewalson2612 2 місяці тому

    Nice work

  • @rasmusenevoldsen3557
    @rasmusenevoldsen3557 2 місяці тому +2

    Really cool. Have you looked into Geometric Algebra?

    • @TheGarrettR
      @TheGarrettR  2 місяці тому

      I have not

    • @awertyuiop8711
      @awertyuiop8711 2 місяці тому

      ​@@TheGarrettR Geometric Algebra reveals the true nature of quaternions:
      XY plane = i
      YZ plane = j
      XZ plane = k
      Scalar = The quaternion's real component
      The reason why quaternions are counterintuitive is because they try to represent planes of rotation in 3D with vectors instead (plus the point-like 0-dimensional scalar, making it a 4D vector hyperspace).
      With the Geometric Product it can proven that:
      (XY)²=(YZ)²=(XZ)²=(XY)(YZ)(XZ)= -1
      _(Note: the basis vectors are actually named e_1, e_2, e_3, instead of X,Y,Z.)_
      Suggested: _“A Swift Introduction to Geometric Algebra”_ by sudgylacmoe on UA-cam.

  • @yuvrajsingh-gm6zk
    @yuvrajsingh-gm6zk 2 місяці тому

    I believe in you boy!

  • @shinjiikari1021
    @shinjiikari1021 2 місяці тому +3

    Could this maths be used in guidance systems such as for missiles or interceptions of said missiles?

    • @MissileGuidance
      @MissileGuidance 2 місяці тому +1

      Mmm I want to know too

    • @BraydenBeckham-t2c
      @BraydenBeckham-t2c Місяць тому +1

      I think that's why he's not able to get into certain specifics of the maths.

  • @TranquilSeaOfMath
    @TranquilSeaOfMath 2 місяці тому

    Nice project.

  • @𠅇
    @𠅇 Місяць тому

    3:53 multiplying a quaternion the conjugate of it gets the real part i think, did you mean multiplicative inverse?

    • @TheGarrettR
      @TheGarrettR  Місяць тому

      If the quaternion is a unit quaternion, I believe the conjugate and the inverse of a quaternion should be the same

  • @paradox_1729
    @paradox_1729 2 місяці тому +2

    very well done. Euler is pronounced oiler.

    • @AlbertaGeek
      @AlbertaGeek Місяць тому

      TBH, I must have heard almost half a dozen ways to pronounce that name. IIRC, your way seems to be the general consensus.

  • @DivineIntervention-12
    @DivineIntervention-12 2 місяці тому

    This is so cool

  • @AceKing69
    @AceKing69 2 місяці тому

    I don't understand a bit but feel amazing 😂

  • @vinijoncrafts2882
    @vinijoncrafts2882 16 днів тому

    yoo I was wondering how to orient something upright, and this has exactly the information I need! I dream of building a rocket league car in real life, that can fly as well, but I'm sure it's a lot tougher than I imagine. If possible could you please list some things that might be important for me to learn during this project? Thanks!

    • @TheGarrettR
      @TheGarrettR  15 днів тому

      Glad I could help. It would definitely be challenging, but not impossible. Some important things are control system design, mechanical design (CAD, etc.), and programming (likely C++). Ensure when you start this project, you have guidance from others to make sure it's done safely. Best of luck!

  • @MihirJain-ps5xb
    @MihirJain-ps5xb 24 дні тому

    HELP, I still don't get quaternions

  • @lupino652
    @lupino652 2 місяці тому

    Nice. I'm no field expert, but do u use the rodriguez formula or Just quats? I thought quaterbions are widely used in robotic software, but its the same, instead of the angle, you use half the angle for quats.

    • @TheGarrettR
      @TheGarrettR  2 місяці тому

      I just use quaternions, not the rodriguez formula. The angle is half the angle for quaternions, which is why you construct a "halfway" quaternion, because it represents double the rotation. They talk about this a little here: stackoverflow.com/questions/1171849/finding-quaternion-representing-the-rotation-from-one-vector-to-another

  • @lih3391
    @lih3391 2 місяці тому

    ❤Nice video, how did you design the gimbal?

    • @TheGarrettR
      @TheGarrettR  2 місяці тому

      The gimbal I'm currently using is based on the K-9 TVC Gimbal Gen 2 by Canine Defense Technologies. There is much I want to improve on, however it should hopefully do for flight 1.

  • @komolkovathana8568
    @komolkovathana8568 2 місяці тому

    Off-topic : then why in QM., Why there's only be Imaginery X-axis (i). And No imaginery Y & Z-axis (j & k)

    • @TheGarrettR
      @TheGarrettR  2 місяці тому

      j and k are also imaginary numbers in this case

  • @malldvd
    @malldvd 2 місяці тому +1

    Maybe if I come back to rewatch this in two years, I'll understand it more. 😵‍💫

    • @TheGarrettR
      @TheGarrettR  2 місяці тому +1

      Much of this topic relies on some knowledge of quaternions or PID control. If you watch some videos on PID control and check out 3Blue1Brown's series on quaternions, you'll probably be able to understand it better than you think.

    • @themagicartroll8961
      @themagicartroll8961 2 місяці тому

      ​@@TheGarrettRHi can I talk to you about these things I really wanna learn and I am actually an engineering student just started so can you plz help and talk to me

    • @TheGarrettR
      @TheGarrettR  2 місяці тому

      @@themagicartroll8961 I'm gonna be honest I'm not the right person to teach you these things, much of it is still something I'm learning myself. I would highly recommend checking out some of the information I linked in the description (there are already amazing tutorials out there), and seeking additional advice from people on discord or reddit when you get stuck on something.

  • @Almondz_
    @Almondz_ 2 місяці тому +1

    Do you have a discord server?

  • @shinjiikari1021
    @shinjiikari1021 2 місяці тому

    Bravo Zulu!

  • @ThunderclapLabs
    @ThunderclapLabs 2 місяці тому +1

    👀

  • @BraydenBeckham-t2c
    @BraydenBeckham-t2c Місяць тому

    This is honestly really cool and I wish you luck. But it's so stupid you can't talk about math or Uncle Sam will get angry.

  • @themagicartroll8961
    @themagicartroll8961 2 місяці тому

    Hi can I talk to you?

  • @nuclearnyanboi
    @nuclearnyanboi Місяць тому

    gosh you'e cute

  • @ThunderclapLabs
    @ThunderclapLabs 2 місяці тому +1

    👀