Physics Engine of a 2D RC Car
15:09
Python Help - 2D Euler Integration
6:28
DBF Missions 1,2 and 3 - 2023
5:10
Inner Loop Flight Test of FASTKit
6:11
JagSAT-1 2U CubeSAT Deployed!!!!
18:58
Пікірлер
@tahaansari4036
@tahaansari4036 Ай бұрын
To calculate the current in RWs, you used the MaxAlpha (rad/s^2) to get the Amps2alpha ratio and multiplied that by rw_alphas to get the current. Is there a specific reason you did not use the MaxSpeed (rad/s) to get the Amps2omega ratio and multiplied that by rw_omega to get the current.
@CarlosMontalvo251
@CarlosMontalvo251 Ай бұрын
Well torque is equal to inertia times angular acceleration. So I made an assumption that current was proportional to torque since that's energy put into the system and this proportional to the angular acceleration.
@tahaansari4036
@tahaansari4036 Ай бұрын
Alright, thanks for your response. Also, the attitude control demonstrated in this seminar series is only for stationary desired attitude. If we want to perform non-stationary attitude control such as nadir pointing, do we have to use a different control law/equation.
@CarlosMontalvo251
@CarlosMontalvo251 Ай бұрын
I'm pretty sure the equations are the same but you'd just have to change the commanded angle.
@tahaansari4036
@tahaansari4036 Ай бұрын
So compute desired quaternion everytime and convert it to Euler Angle as ptpcommand in the control block? By using angles in the control block, do we face risk of singularity issues.
@CarlosMontalvo251
@CarlosMontalvo251 Ай бұрын
Well yes. Converting from quaternions to Euler angles introduces the risk of singularity. Better to do a control scheme that creates an error signal with quaternions
@riddhisrivastava8549
@riddhisrivastava8549 Ай бұрын
To make the solar radiation part more accurate, i tried adding the solar position algorithm but i'm not able to use it properly. can you make a video on it?
@CarlosMontalvo251
@CarlosMontalvo251 Ай бұрын
Have you read my aerospace mechanics book? github.com/cmontalvo251/LaTeX/blob/master/Aerospace_Mechanics/aerospace_mechanics.pdf Chapter 7.5 goes through the math behind getting the position of Earth w.r.t the Sun. I also have a few videos on orbital elements already that help in that area.
@riddhisrivastava8549
@riddhisrivastava8549 Ай бұрын
@@CarlosMontalvo251 Hi, thanks I implemented it successfully. Also, the density model which you have used is fairly simple considering the fact that you've used LEO sats. Do you know any model / paper i can refer to for densities at medium and high earth orbit altitudes?
@CarlosMontalvo251
@CarlosMontalvo251 Ай бұрын
Unfortunately I'm not aware of any papers about density off the top of my head. I'm sure Google scholar will turn something up. Alternatively you could get a textbook on astrodynamics
@kinghenry238
@kinghenry238 Ай бұрын
This series have beem supper helpful. Any chance you could do a series on rocket stability in python?
@CarlosMontalvo251
@CarlosMontalvo251 Ай бұрын
I probably can. Can you be more specific about rocket stability? Are you talking about modeling the stability margin and the pitch of the rocket?
@kinghenry238
@kinghenry238 Ай бұрын
@@CarlosMontalvo251 Yes, I am trying to confirm stability margin of a model rocket. Its not too hard to find the stability margin in ideal conditions. If there is wind it can change the angle of attack, which would mean a new normal force and COP/stability margin. I haven't found good sources on how to calculate this new COP since most suggest basic string tests or complicated CFD models. A walk through of how perturbations can affect AOA and stability would be awesome. Modeling the rocket with disturbances would be cool but I suppose calculating the stability margin and damping coefficient is enough to ensure stable flight.
@CarlosMontalvo251
@CarlosMontalvo251 Ай бұрын
@@kinghenry238 Most of the models I use assume a center of pressure that is constant with angle of attack. Modeling the change in center of pressure is pretty difficult and I've only done with wind tunnel tests or CFD tests. You can also do live fire tests but again those are tough. For small angle of attack the center of pressure is supposed to be constant anyway. Things like Mach number and angle of attack can affect it but I don't have any theoretical equations or data on that only empirical data.
@kinghenry238
@kinghenry238 Ай бұрын
@@CarlosMontalvo251 Ok, that's good to know. I might have overthought the disturbances then. I'll try CFD out, but that is a beast in and of itself. Thank you for your response and video series, they have been helpful!
@tahaansari4036
@tahaansari4036 2 ай бұрын
For satellite inertia (Is), shouldn't Ixx = (m/12)(Ly^2 + Lz^2) and Izz = (m/12)(Lx^2 + Ly^2). I think its flipped. Since Lz = 20cm (longest length), Izz inertia must be smaller than Ixx and Iyy. And Ixx should be equal to Iyy. Please correct me if I am wrong.
@CarlosMontalvo251
@CarlosMontalvo251 2 ай бұрын
Well let's see. The x-axis goes through the front face which means you need to use the Ly and Lz side, the y-axis goes through the size face which means you need to use the Lx and Lz side and then finally the z axis goes through the top and bottom faces so that needs to be Lx and Ly so Is = (ms/12) * [Ly^2 + Lz^2 ; Lx^2 + Lz^2 ; Lx^2 + Ly^2] which means you are right! The code has been updated. Thanks for your addition.
@tahaansari4036
@tahaansari4036 2 ай бұрын
@@CarlosMontalvo251 Thanks for considering, much appreciated!
@vongthien9662
@vongthien9662 2 ай бұрын
awoooooooo
@3RDC4RD
@3RDC4RD 2 ай бұрын
I have a question, so now when using the igrf model, is the positive z-axis considered towards earth center or away from earth center ?
@CarlosMontalvo251
@CarlosMontalvo251 2 ай бұрын
It depends on your coordinate reference frame. Typically the ECI (Earth Centered Inertial) frame is with the z-axis going out of the north pole. I think you're referrring to the NED (North East Down) reference frame where the z-axis always points towards the Earth's center. I talk about a lot of these reference frames and transformations in my book. github.com/cmontalvo251/LaTeX/blob/master/Aerospace_Mechanics/aerospace_mechanics.pdf
@3RDC4RD
@3RDC4RD 2 ай бұрын
@@CarlosMontalvo251 Thank you for your reply, sorry for the misunderstanding. So what I meant is that when you compared the NED frame with the ECI, you have added a negative sign to the NED z-axis value. However, when I went through your code on GitHub, I didn't find that same negative sign that was added in the video there. I would like to know that now when I use the NED should I add a negative sign to the z-axis or keep it as it is? PS: Thank you for writing this book, I have learnt a lot since I started reading it. Unfortunately I did not have the chance to complete it, but I will complete it once I get a chance!
@CarlosMontalvo251
@CarlosMontalvo251 2 ай бұрын
@@3RDC4RD Are you saying there's an inconsistency with the video posted here and the code posted online?
@3RDC4RD
@3RDC4RD 2 ай бұрын
@CarlosMontalvo251 yes, in the video you added a negative sign to the z-axis (NED), and in the Github code that negative sign is not present
@CarlosMontalvo251
@CarlosMontalvo251 2 ай бұрын
@@3RDC4RD Hey thanks. Not sure how I missed that. I even readded the comment in there too.
@MrEngineer_
@MrEngineer_ 2 ай бұрын
Hi sir ! The algorithm failed when I tried to simulate it for a year, also with increasing numbers of orbits the satellite sprirals down
@CarlosMontalvo251
@CarlosMontalvo251 2 ай бұрын
Did you lower the timestep? Sometimes the simulation won't converge if the timestep is too large
@MrEngineer_
@MrEngineer_ 2 ай бұрын
@@CarlosMontalvo251 But ode45 uses adaptive timestep right ? Do I have the control over timestep ?
@MrEngineer_
@MrEngineer_ 2 ай бұрын
Actually the error said that the timestep got so reduced, it went below permissible values and caused the algorithm to stop.
@CarlosMontalvo251
@CarlosMontalvo251 2 ай бұрын
@@MrEngineer_ This simulation uses RK4 so you have to set the timestep in the main.m
@CarlosMontalvo251
@CarlosMontalvo251 2 ай бұрын
My apologies. The latest version of the software uses ode45. The simulation with ode45 probably threw an error when you went too close to the center of the planet and the gravity model became too nonlinear.
@tahaansari4036
@tahaansari4036 2 ай бұрын
Based on the navigation complimentary equation shown in your lecture 6 of ADCS seminar series, the BfieldNavPrev & pqrNavPrev should be multiplied by s and (BfieldMeasured-BiasEstimate) & (pqrMeasured-BiasEstimate) should be multiplied by (1-s). Please correct me if I'm wrong. Thank You!
@CarlosMontalvo251
@CarlosMontalvo251 2 ай бұрын
You can actually go either way. You can use the form. x(i+1) = x(i) * ( 1- s ) + s * y(i) and have s go from 0 to 1 or x(i+1) = x(i) * s + ( 1 - s ) * y(i) where s goes from 1 to 0 with the same effect. Apologies for the confusion but as long as you bound s from 0 to 1 and understand that the edge cases swap when the equations change you can still use the filter in either case.
@tahaansari4036
@tahaansari4036 2 ай бұрын
@@CarlosMontalvo251 Alright understood, Thanks for your response.
@joshuathompson6275
@joshuathompson6275 3 ай бұрын
Hi. Great video! Where in the repo are these codes? Thanks!
@CarlosMontalvo251
@CarlosMontalvo251 3 ай бұрын
github.com/cmontalvo251/aerospace/tree/main/adcs_seminar_series
@joshuathompson6275
@joshuathompson6275 2 ай бұрын
@@CarlosMontalvo251 Thank you! Do you have any code that involves spacecraft detumblization?
@CarlosMontalvo251
@CarlosMontalvo251 2 ай бұрын
@@joshuathompson6275 The code above detumbles with magnetorquers and reaction wheels.
@ashwinitelang7762
@ashwinitelang7762 3 ай бұрын
Thank you so much for this video. It has helped tremendously for me.
@DamienDTorres
@DamienDTorres 3 ай бұрын
🐐
@bhushanchavan4905
@bhushanchavan4905 3 ай бұрын
Hey Do you have complete class for aeroelasticity (flutter using tools and experiments)
@CarlosMontalvo251
@CarlosMontalvo251 3 ай бұрын
Unfortunately I dont. This student just did this experiment has an independent experiment.
@tahaansari4036
@tahaansari4036 3 ай бұрын
Another comment, while initializing the velocity vector in your previous video, you added a -ive sign for the z0_dot, that should also be removed to get the shown results (3rd modification).....Overall, very informative series. Thank You!
@CarlosMontalvo251
@CarlosMontalvo251 3 ай бұрын
I just checked the current source code and I think it is up to date but double check and if it's still wrong send me the line number you're referring to. github.com/cmontalvo251/aerospace/tree/main/adcs_seminar_series
@tahaansari4036
@tahaansari4036 3 ай бұрын
@@CarlosMontalvo251 Yes, you are right. It is up-to-date. Thanks for your response.
@Buy.YT.Views.786
@Buy.YT.Views.786 3 ай бұрын
I've watched this 10 times already, and it never gets old!
@Unique_Leak
@Unique_Leak 3 ай бұрын
12:44 so we have geo & heliocentric models. Is there a way to retrieve Ephemeris data using a multicentric model. Say we lived on mars im curious how those animations would look even for exoplanets & asteroids.
@CarlosMontalvo251
@CarlosMontalvo251 3 ай бұрын
The model outputs the x and y coordinates in the J2000 frame including the position of Mars. So if you want to do a reference frame transfer you would just need to substract the J2000 frame positions from the Mars X/Y coordinates.
@simianwarthog
@simianwarthog 4 ай бұрын
SOUND!
@orangeman2456
@orangeman2456 5 ай бұрын
Where can we cross check whether the longitude, latitude, distance etc of planets we get from our program are valid or not?
@CarlosMontalvo251
@CarlosMontalvo251 5 ай бұрын
Unfortunately I don't know. The JPL website maybe? ssd.jpl.nasa.gov/orbits.html
@Vir7uaLGameplays
@Vir7uaLGameplays 6 ай бұрын
What about moving files from windows to the linux? I'm getting permissions error, did you tried doing that?
@CarlosMontalvo251
@CarlosMontalvo251 6 ай бұрын
Sounds like you just need to use "sudo"
@Vir7uaLGameplays
@Vir7uaLGameplays 6 ай бұрын
@@CarlosMontalvo251 It was folder permissions actually but thanks!
@manos_moust
@manos_moust 6 ай бұрын
Can you provide us with the link of the igrf model?
@CarlosMontalvo251
@CarlosMontalvo251 6 ай бұрын
www.mathworks.com/matlabcentral/fileexchange/34388-international-geomagnetic-reference-field-igrf-model
@manos_moust
@manos_moust 6 ай бұрын
@@CarlosMontalvo251 🔥🔥
@rostamr4096
@rostamr4096 6 ай бұрын
Thank you so much, as an engineer learning Python, this was very helpful.
@imanfasil7797
@imanfasil7797 6 ай бұрын
Thank you very much, great video
@narayanpatil4085
@narayanpatil4085 6 ай бұрын
Does it give real time positions of planet
@CarlosMontalvo251
@CarlosMontalvo251 6 ай бұрын
Yes as long as you input the correct Julian Day and time
@narayanpatil4085
@narayanpatil4085 6 ай бұрын
@@CarlosMontalvo251 thanks..I got them
@narayanpatil4085
@narayanpatil4085 6 ай бұрын
Can you tell me how to calculate lunar nodes position in sky
@CarlosMontalvo251
@CarlosMontalvo251 6 ай бұрын
@@narayanpatil4085 The moon has it's own ephemeris data. I would recommend you look that up on the JPL website ssd.jpl.nasa.gov/orbits.html
@davidtogonidze4281
@davidtogonidze4281 7 ай бұрын
I am going over ADCS playlist and the information you present is immensely useful. Thank you for doing this
@bumuthudilshan5395
@bumuthudilshan5395 7 ай бұрын
What a great way!. It worked for me and saved my life.
@ivanmanzanolira6356
@ivanmanzanolira6356 7 ай бұрын
what is dx?
@CarlosMontalvo251
@CarlosMontalvo251 7 ай бұрын
That's the distance between discretizations in the x-axis
@cut_mountain
@cut_mountain 8 ай бұрын
This is awesome! I'll try to adapt it for my porpouses :) thanks
@larrymondello8475
@larrymondello8475 8 ай бұрын
That was great , I'm totally dizzy now Thank you.
@abnnuzzinicholasclay686
@abnnuzzinicholasclay686 8 ай бұрын
Looked flat up there
@dragonfire4869
@dragonfire4869 8 ай бұрын
homemade rocket. to see the curvature of the earth you'd need to be at the same level as a commercial airline. Same reason why you cant see the curve while on a mountain.
@bubbispapa2053
@bubbispapa2053 8 ай бұрын
One small step for iPhones. One giant crackpot conspiracy in the works for mankind.
@soupbone7345
@soupbone7345 8 ай бұрын
Throwing up 🤮
@PramodSingh-hj7tj
@PramodSingh-hj7tj 8 ай бұрын
Same type of problem that I am facing Bro how can I solve
@CarlosMontalvo251
@CarlosMontalvo251 8 ай бұрын
Unfortunately we moved away from the arduino and to the Raspberry Pi
@headSoup
@headSoup 8 ай бұрын
seems to be over compensation from PID loop, try tuning it
@CarlosMontalvo251
@CarlosMontalvo251 8 ай бұрын
@@headSoup We don't have this drone anymore. This is from 2018.
@kevingainey333
@kevingainey333 8 ай бұрын
E.T. iPhone home.
@OTZDarv
@OTZDarv 8 ай бұрын
Cool
@georges3799
@georges3799 8 ай бұрын
First ever iPhone to puke its guts out in mid air.
@KevinEssence
@KevinEssence 8 ай бұрын
LOL
@lachydunne1512
@lachydunne1512 8 ай бұрын
this is amazing content. Thank you.
@elcotorro
@elcotorro 8 ай бұрын
Planos por favor
@CarlosMontalvo251
@CarlosMontalvo251 8 ай бұрын
My student made these so I'd have to ask him for the plans if he's willing to share. I'll get back to you soon.
@atmonotes
@atmonotes 9 ай бұрын
do we use the fractional timesteps that are in the runge kutta 4 algorithm?
@CarlosMontalvo251
@CarlosMontalvo251 9 ай бұрын
Rk4 is a fixed step integrator so the timestep is constant. What do you mean by fractional?
@atmonotes
@atmonotes 9 ай бұрын
@@CarlosMontalvo251 usually i see the runge kutta written as evaluating k2, for example, at t0+dt/2 and at y+k1*dt/2. maybe it is because k2 is already an approximation for that fractional time step?
@CarlosMontalvo251
@CarlosMontalvo251 8 ай бұрын
I'm still not following. RK4 is called RK4 because it's a 4th order taylor series approximation. The 4 function calls are used to create k1,k2,k3, and k4 with "fractional" timesteps. These are on lines 65-68. If you skip to 3:10 into the video you'll see.
@aaronsaldanha2815
@aaronsaldanha2815 9 ай бұрын
I had the exact same design in my mind, very well executed looking forward for further improvements, Great work 👍
@MrPilotStunts
@MrPilotStunts 9 ай бұрын
I'm absolutely in love with this design, imagine a scaled up manned version. What are your thoughts?
@CarlosMontalvo251
@CarlosMontalvo251 9 ай бұрын
I feel like the G's pulled during hovering to forward flight would make everyone puke. Definitely would be fit for the military but even then when you scale things up everything gets harder. Just look at the V-22 program.
@CarlosMontalvo251
@CarlosMontalvo251 9 ай бұрын
But as with anything. I'd say try it and see what happens.
@MrPilotStunts
@MrPilotStunts 9 ай бұрын
@@CarlosMontalvo251 haha you're probably right about g forces, it would need a more gradual transition. I am personally aware of two attempts to make a civilian tailsitter. Nasa Puffin and Zeva Aero. There is also blackfly, but it's not really a tailsitter, more of a hybrid. In my opinion, the power of a tail sitter is that it's a conventional plane essentially, it can have a normal sized wing suitable for gliding. But i haven't seen this approach used by anyone so far. There are a few concepts though, like Bell apt.
@MrPilotStunts
@MrPilotStunts 9 ай бұрын
@@CarlosMontalvo251 oh, almost forgot the jetman from dubai, he had a winged jetpack. Took off vertically from his feet, and then transitioned. Would be really cool if he had a longer wing and electric motors.
@de_michael1222
@de_michael1222 9 ай бұрын
hey, which MatLab add-ons will I need for these simulations?
@CarlosMontalvo251
@CarlosMontalvo251 9 ай бұрын
You actually don't need any extra add ons. Just the standard MATLAB version will work.
@de_michael1222
@de_michael1222 9 ай бұрын
Thank you for the quick reply and helpful content Sir. Does this apply to the other ADCS in MatLab tutorials as well?
@CarlosMontalvo251
@CarlosMontalvo251 9 ай бұрын
​@@de_michael1222 There is only 1 ADCS software on Github. There are multiple videos because every major edit that I've made has been done live on youtube. So if you downloaded the latest iteration of the software you wouldn't need any other packages.
@de_michael1222
@de_michael1222 9 ай бұрын
@@CarlosMontalvo251 alright, thank you very much!
@SA-ys8eg
@SA-ys8eg 9 ай бұрын
Thank you for the video. In the previous reactions wheels code, the angular velocities of tumbling rate reaches zero and the curve is smooth but after the addition of total current control in the code , the initial angular velocities never reaches zero. Altough they reach values close to zero but the satellite is still in tumbling state. could you please give us some insights as to why that is happening and how to completely stabilize the satellite
@SA-ys8eg
@SA-ys8eg 9 ай бұрын
I assume its because of adding the disturbing forces and moments to the simulation? is It possible to fully stablize the satellite even having all the disturbing forces?
@CarlosMontalvo251
@CarlosMontalvo251 9 ай бұрын
Great observation. That is a timestep issue. In the video I changed the timestep = 1.0 so the code would run faster. In order for the RK4 integrator to converge properly for attitude control you really need the timestep = 0.1 or lower. That will increase simulation time but increase accuracy and make the curves smoother as you say. Hope that helps!
@SA-ys8eg
@SA-ys8eg 9 ай бұрын
@@CarlosMontalvo251 Thank you for the response Sir. I tried extremely low values but the spacecraft is still not completely detumbling.
@CarlosMontalvo251
@CarlosMontalvo251 9 ай бұрын
@@SA-ys8egDo you still have sensor errors and biases turned on? Because it will never go to zero if you have errors turned on.
@SA-ys8eg
@SA-ys8eg 9 ай бұрын
@@CarlosMontalvo251Sir, I will send an email to you showing plots with the same parameters but different codes. The previous code is able to detumble the satellite completely while the new code (after adding the total current calculation for reaction wheels) has chattering even if the simulation is run for 20 orbits with timestep of 0.01. And yes I turned of sensor errors biases. I also removed the affect of disturbance forces which I suspect were causing the satellite to keep tumbling but that was not case. Thank you for the response.
@savitamaurya5704
@savitamaurya5704 9 ай бұрын
You can use pid controller for this it will make the dron stable
@denislavpetrov4563
@denislavpetrov4563 9 ай бұрын
Great video! Where we can find your very well structured information from the board(behind you) with all steps and formulas?
@CarlosMontalvo251
@CarlosMontalvo251 9 ай бұрын
The best place is probably here github.com/cmontalvo251/LaTeX/blob/master/Aerospace_Mechanics/aerospace_mechanics.pdf
@daksholi6670
@daksholi6670 9 ай бұрын
Thanks👍
@gavinjoiner7762
@gavinjoiner7762 9 ай бұрын
Great video; do make more!
@yibowang269
@yibowang269 10 ай бұрын
Omg man 😮😅
@romankolosov5771
@romankolosov5771 10 ай бұрын
great info, thanks!
@captaindronieversefpv
@captaindronieversefpv 10 ай бұрын
any video link for design ?
@CarlosMontalvo251
@CarlosMontalvo251 10 ай бұрын
Unfortunately no. My student created this on a whim for a fun project.
@SetoFPV
@SetoFPV 7 ай бұрын
@@CarlosMontalvo251 I hope your student can publish it open source :D
@ChrisQuadFPV
@ChrisQuadFPV 11 ай бұрын
Ole Shakey
@farhansanjaya6016
@farhansanjaya6016 11 ай бұрын
How to show simulation PID with one by one ,i mean how simulated P, Pi, PID
@CarlosMontalvo251
@CarlosMontalvo251 11 ай бұрын
If you want to do a P controller set the D and I gains to zero. For a PI controller just set the D gain to zero. Makes sense?