awesome work ....... one of the clear explanations that I ever see regarding the self balancing robot on youtube ......Eagerly waiting for your upcoming videos
Hello great video sir, i was wondering how do you suppose is it possible using the same model for the robot to make turns to reach a certain target rather than just move forward and backward? An idea or resource would be highly appreciated. Thank you.
Hello. I implemented a state feedback control using the state-space model with the provided A, B, C, and D matrices in Simulink, but I noticed that the state variables are diverging. When I checked the poles using the eig function, I found that there is a positive real number included. Why does the regulator work correctly in the Simscape model, but when I create a separate state feedback model, it produces diverging values? Also, when designing a state feedback model in Simulink, should the initial value of the integrator be set to the same value as the step input in Simscape?
I'm final year mechanical engineer student this is my final year main project can you teach step by step procedure for two wheeled self balancing robot using Matlab code please upload as soon as possible And also explain theory part and also try to provide Matlab code PDF in discription
Great video!! I have a question on "GAIN", an error is occurring for me "Invalid setting in 'SBR_LQR/Gain' for parameter 'Gain'. Caused by: Error evaluating parameter 'Gain' in 'SBR_LQR/Gain' Unrecognized function or variable 'K'. Variable 'K' does not exist. Suggested Actions: Load a file into base workspace. Create a new variable.” Could you tell me how to solve this?
the forward motion is a result of the robot trying to balance itself after the initial push but since nothing is perfect the controller overshoots and the robot start falling backward this is why the controller has to move again to the opposite direction ( backwards ) in order to catch the robot and prevent it from falling
hi, thanks for the educational video!! I have a question, I used your block diagram to simulate my own self balancing robot, but i also want to compare the state variable output from the physical system which is your diagram to my mathematical model so i attached scope in the state variables (position, velocity, tilt angle, and angular velocity). But i could never get the same plot from the mathematical model to physical model. Do you have any idea how to do it?
To answer your question 1) You need to place the scope between the ps- simulink converter and mux (x4) (i.e. The very before the mux input). You can use the seperatye scope or 4 input scope. I used the second. 2)You need to adjust the Q & R weights. Refer below, you could see that angular velocity is enormously increased , So in your system start the adjustment form angular velocity. Also please refer video from steve brunton - ruclips.net/video/1_UobILf3cc/видео.html (Linear Quadratic Regulator (LQR) Control for the Inverted Pendulum on a Cart [Control Bootcamp]) . In that note a point at the time of 9:20. That's why i enormously increased the angular velocity. Hope works fine. This worked for me: M = 1; % mass of the chassis m = 0.07; % mass of the wheels and shaft b = 0.1; % estimate of viscous friction coefficient (N-m-s) I = 0.0057416;% moment of inertia of the pendulum g = 9.8; %acceleration due to gravity (m/s^2) l = 0.125; %length to pendulum center of mass Q = [0.001 0 0 0 %position - red 0 0.01 0 0 %velocity - green 0 0 0.1 0 %angle - yellow 0 0 0 1e11] %angular velocity - blue
i recommend this paper that explains exactly that : citeseerx.ist.psu.edu/viewdoc/download?doi=10.1.1.545.6096&rep=rep1&type=pdf#:~:text=For%20the%20last%20characteristic%2C%20both,response%20faster%20than%20PID%20controller.&text=It%20shows%20that%20LQR%20control,compared%20to%20PID%20control%20method.
Thanks a lot for sharing your work. I am a hobbyist and I just finished a self balancing cube (ruclips.net/video/qfiz_rqAV_c/видео.html). i would love to model it with matlab. Could you please give me any hint on how would I need to modify your model in order for it to work with a balancing cube?
Get the code from:github.com/mouad-boumediene/self-balancing-robot-LQR-Matlab
Get the robot model ( PID ) from: ko-fi.com/s/716bba8384
Thank you! control systems hands-on content is pretty rare. Keep going!
you are most welcome, Nikita ermolenko. I'll try posting more of these videos now and then
I would greatly appreciate you showing us how to implement LQR control on hardware. Thank you.
Any luck?
awesome work ....... one of the clear explanations that I ever see regarding the self balancing robot on youtube ......Eagerly waiting for your upcoming videos
Hello great video sir, i was wondering how do you suppose is it possible using the same model for the robot to make turns to reach a certain target rather than just move forward and backward? An idea or resource would be highly appreciated. Thank you.
you can use another 3D robotics simulation environment like gazebo + ros.
Please post more about the self balancing robot! I love your videos!!
you got it, Shakeel.
Hello. I implemented a state feedback control using the state-space model with the provided A, B, C, and D matrices in Simulink, but I noticed that the state variables are diverging. When I checked the poles using the eig function, I found that there is a positive real number included.
Why does the regulator work correctly in the Simscape model, but when I create a separate state feedback model, it produces diverging values? Also, when designing a state feedback model in Simulink, should the initial value of the integrator be set to the same value as the step input in Simscape?
Great job!!
Great job i am trying to implement the hardware part with pid.
I'm final year mechanical engineer student this is my final year main project can you teach step by step procedure for two wheeled self balancing robot using Matlab code please upload as soon as possible
And also explain theory part and also try to provide Matlab code PDF in discription
Great video!! I have a question on "GAIN", an error is occurring for me "Invalid setting in 'SBR_LQR/Gain' for parameter 'Gain'.
Caused by: Error evaluating parameter 'Gain' in 'SBR_LQR/Gain'
Unrecognized function or variable 'K'.
Variable 'K' does not exist. Suggested Actions:
Load a file into base workspace.
Create a new variable.” Could you tell me how to solve this?
In the simulation why does the robot stops moving forward and starts going backwards?
the forward motion is a result of the robot trying to balance itself after the initial push but since nothing is perfect the controller overshoots and the robot start falling backward this is why the controller has to move again to the opposite direction ( backwards ) in order to catch the robot and prevent it from falling
But in case of PID controller why doesn't it happen the same it keeps going forward never backwards?
@@khiyanatdeori5957 mainly because of overshooting
hi, thanks for the educational video!! I have a question, I used your block diagram to simulate my own self balancing robot, but i also want to compare the state variable output from the physical system which is your diagram to my mathematical model so i attached scope in the state variables (position, velocity, tilt angle, and angular velocity). But i could never get the same plot from the mathematical model to physical model. Do you have any idea how to do it?
To answer your question
1) You need to place the scope between the ps- simulink converter and mux (x4) (i.e. The very before the mux input). You can use the seperatye scope or 4 input scope. I used the second.
2)You need to adjust the Q & R weights. Refer below, you could see that angular velocity is enormously increased , So in your system start the adjustment form angular velocity. Also please refer video from steve brunton - ruclips.net/video/1_UobILf3cc/видео.html (Linear Quadratic Regulator (LQR) Control for the Inverted Pendulum on a Cart [Control Bootcamp]) . In that note a point at the time of 9:20. That's why i enormously increased the angular velocity.
Hope works fine.
This worked for me:
M = 1; % mass of the chassis
m = 0.07; % mass of the wheels and shaft
b = 0.1; % estimate of viscous friction coefficient (N-m-s)
I = 0.0057416;% moment of inertia of the pendulum
g = 9.8; %acceleration due to gravity (m/s^2)
l = 0.125; %length to pendulum center of mass
Q = [0.001 0 0 0 %position - red
0 0.01 0 0 %velocity - green
0 0 0.1 0 %angle - yellow
0 0 0 1e11] %angular velocity - blue
R = 1;
I just tried it, changing the previous PID Model, like the video, but now my Robot Can't stay up. Any Idea?
can i build any system for push the chassis and test the respons
What is the advantage of using lqr over pid?
i recommend this paper that explains exactly that : citeseerx.ist.psu.edu/viewdoc/download?doi=10.1.1.545.6096&rep=rep1&type=pdf#:~:text=For%20the%20last%20characteristic%2C%20both,response%20faster%20than%20PID%20controller.&text=It%20shows%20that%20LQR%20control,compared%20to%20PID%20control%20method.
You are really very nice thanks a lot❤️ 👍
@@hobby_coding I can't access to this link. Can you reup it?
How about using fuzzy logic?
i don't have much experience in fuzzy logic, unfortunately
how i used mpc or model predictive control for this controller
Magnolia Cove
Kindly build a real self balancing robot and test it in the real world. This would be a better way of learning..
i built one but i still haven't made a tutorial on it yet
@@hobby_coding should we expect a tutorial?
Thanks a lot for sharing your work. I am a hobbyist and I just finished a self balancing cube (ruclips.net/video/qfiz_rqAV_c/видео.html).
i would love to model it with matlab. Could you please give me any hint on how would I need to modify your model in order for it to work with a balancing cube?