Amazing! I´m watching righ now the second video about inverse kinematics. The first one was awesome! For two years I´ve trying to understand RST and I couldn´t, but with your videos it makes so easy! I´ll hope I can keep imprpving my skills, but I´m so gratefull with you!🦾🤖
The Simulink model xTry_TorqueCtrlConfigure could not be linearized due to a discrete pole at z = 0 that is being converted to the continuous domain using the 'zoh' rate conversion method. Set the RateConversionMethod to 'tustin' or 'prewarp' or the SampleTime > 0 in the linoptions configuration object. Please HELP ME,why is this
hello. I have a problem, I repeated all your steps and when I try to run the file.m returns an error: Error using slTuner/looptune (line 83) In "looptune(sllin,...)" command, the point specified by "Controller/robot/qm" does not match any of the existing ones: Controller/PD1/1 Controller/PD2/1 Controller/PD3/1 Controller/robot/1 Controller/Signal Editor/1[q1] Controller/Signal Editor/2[q2] Controller/Signal Editor/3[q3] Error in Lin_model (line 17) ST1 = looptune(ST0, Controls, Measurements, TR, options); ____________________________ and in the simulink model: Invalid setting for input port dimensions of 'Controller/Demux1'. The dimensions are being set to 1. This is not valid because the total number of input and output elements are not the same Component:Simulink | Category:Model error Error in port widths or dimensions. 'Output Port 1' of 'Controller/robot' is a one dimensional vector with 1 elements. ____________________________ Please, I need your advices. how can I fix this?
You are not naming the signals correctly. Moreover, your signal, most probably, joint space signal doesn't have proper dimensions. Email me your file and I'll try to fix it.
Thank you for your videos, I find them very useful. There is one point in this video that puzzled me. In the PID block, while the reference and inputs seem to be angular positions, the output appears to be torque as there is a 't' in the subsystem input. Could the output of the PID block also be an angular position?
The output of the controller depends on the system that is attached after it. Currently, the robot after the PID block requires torque input that is why the controller has been tuned to produce torque, whereas if the robot required position commands the controller would have been tuned to give angular position output.
Yes there is a complete playlist. In previous videos I have explained how to create robot and other blocks and then in later videos I have shown things related to trajectory generation and robot control
Sir, can you share the simulink files you're using in this video? Because my trapezoidal velocity generation block is showing some error along with the matlab code. It would be helpful if I could compare with the actual files .
Thanks for the video. When I try this auto-tuning on my planar 2 DoF robot arm, I get very large value for controller parameters and the result is also not following the reference signal. How can I fix this issue?
An amazing video, keep it up. I have a question, If I want to apply an SMC controller for a dynamically modeled robot manipulator in MATLAB simscape what will I do to design the controller? Can I control only the joint motors through SMC or must I bring the mathematical equations of the robot dynamics to control the modeled robot in simscape?
I've watched your videos, they have been amazing and a great help to me. In controlling the SCARA robot that I have designed, I want to input a step signal into the input of my 3-signal system, but I'm not exactly sure what data to enter in the signal editor under the time and data sections. Do I need to perform any specific calculations to apply a step input? these are my data:
When I try to run the simulation it gives me an error related to the inputs, I have my joint inputs individually as(Q1, Q2, etc.) for my 4 joints on the robot, but when I make the sub system with the PD controller and signal maker, it gives me that error. Are your robot inputs set up differently from your previous tutorial videos? I've been kind of stuck on this part.
If number of inputs or type of the inputs doesn't match your robot then it will give the error related to the inputs. If you can share the exact error, then I might be able to help you concretely.
@@LearningOrbis Ok ok. In fact I would really like to learn how to command a manipulator robot using artificial intelligence. For example fuzzy logic. I am very eager to see your next video... Thanks 🙏🙏🙏
Your video is very interesting! thank you for making this. I have a question, if I want to apply it to Robot in real, is the mathematical modeling of the actuator also considered or only dynamic modeling of the robot to design the PID? and how do I get the real value of joint velocity and acceleration on the robot?
It depends on the motor controller you are using. For real robots motor controllers can control robot through kinematics and/or dynamics, yo just have to configure it. As for the real vales of joint velocity and acceleration, you have to use a feedback sensor, mostly an encoder.
Thanks for the video We're working on something similar but with 4DOF robot We tried to do the PID control optimization similar to what we saw in the video Yet it's not working for us Also, we would like to know how we get tau for the tuning goal Waiting for your response God bless you
I've used the same thing for my 5DOF manipulator and a 7 DOF manipulator as well. Tau is the time constant in case of a step response. You should be using step input to all joints, but if you want a varying trajectory control, then unfortunately PID cannot give you the desired response. For that you have to implement a feedforward block as well. I'll describe that thing in my next video.
If I make PID controller model after inverse kinematics model for 4 DOF robot, will be that ok. Or I have to apply all previous model before this video. I will be waiting for your response. Thank you
You have to change the Actuation method from the settings of all the joints. Moreover, you should change the signal of Simulink-to-PS converter to give N.m as output.
All the files and codes are available at Mathworks. www.mathworks.com/matlabcentral/fileexchange/114195-autotuning-of-pid-controller-for-a-non-planar-manipulator
Yes. Kindly view my video on Computed Torque Control, present in the same playlist. In that we use forward dynamics to linearize the system and then using a simple PD controller we can control the robot.
Hello Sir ; thank you a lot for this instructing videos ; I tried to reproduce the same work and it gave me two problems: + the first one when I begin simulation (I have set some values of the PID), The robotic arm behaved crazy unstable with random motion ; + The second problem ; when I tried to use the optimization algorithm you've presented It gives me an error :" Error using slTuner/looptune In "looptune(sllin,...)" command, the point specified by "Robotic_arm4_at_zeropositions/Robotic_arm_4_PID/Thetasreal" does not match any of the existing ones: Robotic_arm4_at_zeropositions/PID 1/1 Robotic_arm4_at_zeropositions/PID 2/1 Robotic_arm4_at_zeropositions/Robotic_arm_4_PID/1 Robotic_arm4_at_zeropositions/Inverse kinematics equations of the robotic arm1/ SFunction /2[Theta1d] Robotic_arm4_at_zeropositions/Inverse kinematics equations of the robotic arm1/ SFunction /3[Theta2d]
Thank you! Many videos of you help me so much.
I'm so glad!
Thank you so much!
You're welcome!
Amazing! I´m watching righ now the second video about inverse kinematics. The first one was awesome! For two years I´ve trying to understand RST and I couldn´t, but with your videos it makes so easy! I´ll hope I can keep imprpving my skills, but I´m so gratefull with you!🦾🤖
Glad it was helpful!
The Simulink model xTry_TorqueCtrlConfigure could not be linearized due to a discrete pole at z = 0 that is being
converted to the continuous domain using the 'zoh' rate conversion method. Set the RateConversionMethod to 'tustin' or
'prewarp' or the SampleTime > 0 in the linoptions configuration object.
Please HELP ME,why is this
hello. I have a problem, I repeated all your steps and when I try to run the file.m returns an error:
Error using slTuner/looptune (line 83)
In "looptune(sllin,...)" command, the point specified by "Controller/robot/qm" does
not match any of the existing ones:
Controller/PD1/1
Controller/PD2/1
Controller/PD3/1
Controller/robot/1
Controller/Signal Editor/1[q1]
Controller/Signal Editor/2[q2]
Controller/Signal Editor/3[q3]
Error in Lin_model (line 17)
ST1 = looptune(ST0, Controls, Measurements, TR, options);
____________________________
and in the simulink model:
Invalid setting for input port dimensions of 'Controller/Demux1'. The dimensions are being set to 1. This is not valid because the total number of input and output elements are not the same
Component:Simulink | Category:Model error
Error in port widths or dimensions. 'Output Port 1' of 'Controller/robot' is a one dimensional vector with 1 elements.
____________________________
Please, I need your advices. how can I fix this?
You are not naming the signals correctly. Moreover, your signal, most probably, joint space signal doesn't have proper dimensions. Email me your file and I'll try to fix it.
Thank you for your videos, I find them very useful. There is one point in this video that puzzled me. In the PID block, while the reference and inputs seem to be angular positions, the output appears to be torque as there is a 't' in the subsystem input. Could the output of the PID block also be an angular position?
The output of the controller depends on the system that is attached after it. Currently, the robot after the PID block requires torque input that is why the controller has been tuned to produce torque, whereas if the robot required position commands the controller would have been tuned to give angular position output.
Would you like to see our school project about this topic? I think that together we can optimize some commands.🤞🏼
I would be happy to. You may email me the details.
Hello Sir. You didn't show the inside of the subsystem "Robot" also in the previous videos. How can I get the qdm and tm outputs?
Yes there is a complete playlist. In previous videos I have explained how to create robot and other blocks and then in later videos I have shown things related to trajectory generation and robot control
Sir, can you share the simulink files you're using in this video? Because my trapezoidal velocity generation block is showing some error along with the matlab code. It would be helpful if I could compare with the actual files .
You can find the files here: www.mathworks.com/matlabcentral/fileexchange/114195-autotuning-of-pid-controller-for-a-non-planar-manipulator
Thank you
Thanks for the video. When I try this auto-tuning on my planar 2 DoF robot arm, I get very large value for controller parameters and the result is also not following the reference signal. How can I fix this issue?
Try to change the initial conditions and stability criteria of the slTuner.
Thank you for your video sir, i would like to like is that the Ziegler-Nichols method can be used on finding Kp, Ki, Kd for 2 link manipulator?
Yes it can be used but for that you have model the robot on your own.
sir how to use model predective control ?
An amazing video, keep it up. I have a question, If I want to apply an SMC controller for a dynamically modeled robot manipulator in MATLAB simscape what will I do to design the controller? Can I control only the joint motors through SMC or must I bring the mathematical equations of the robot dynamics to control the modeled robot in simscape?
You don't need dynamic equations of the robot if you have robot's model in simscape. You only need to implement the SMC.
I've watched your videos, they have been amazing and a great help to me. In controlling the SCARA robot that I have designed, I want to input a step signal into the input of my 3-signal system, but I'm not exactly sure what data to enter in the signal editor under the time and data sections. Do I need to perform any specific calculations to apply a step input?
these are my data:
x=[1.412,0.8696,1.412,1.412,1.821,1.545,1.8312.382,1.412]
y=[-3.142,-2.088,-3.142.-3.142,-3.142,-2.31,-3.142,-3.142,-3.142]
z=[-0.086,-0.086,-0.086,-0.186,-0.186,-0.186,-0.186,-0.386,-0.086]
t=[0,1,1.5,2,3,4,4.5,5,6]
When I try to run the simulation it gives me an error related to the inputs, I have my joint inputs individually as(Q1, Q2, etc.) for my 4 joints on the robot, but when I make the sub system with the PD controller and signal maker, it gives me that error. Are your robot inputs set up differently from your previous tutorial videos? I've been kind of stuck on this part.
If number of inputs or type of the inputs doesn't match your robot then it will give the error related to the inputs. If you can share the exact error, then I might be able to help you concretely.
how to use mpc block same to same ?can u plz help me ?
sir ,i write same code but a error is creating.what is the solution ?
Is this PID nonlinear model ?
The attached robot is nonlinear, PID is being used to control the nonlinear system
Sir it will be helpful if you can upload the computer torque method video this week
I will try my best, but because of my busy schedule it may take 4 to 5 days.
@@LearningOrbis Can you share the github link for that if you have already done that.
Firstly Thank you so much for such detailed videos!!!
And Second, I am Facing a lot of errors in the movement of the arm can you please help me?
Thank you. Kindly contact us through email and we will try to help you out.
Hi Sir, does this method show time history of joint positions and torques and of tip position error? I watched the video but i want to make sure.
Yes the graphs being generated are the ones you are asking.
OK. Cool, very good. How do we proceed to control a manipulator robot with fuzzy logic please ?
That is a completely different topic and shall be covered in some future video.
@@LearningOrbis Ok ok. In fact I would really like to learn how to command a manipulator robot using artificial intelligence. For example fuzzy logic. I am very eager to see your next video... Thanks 🙏🙏🙏
@@LearningOrbis we are patiently waiting for such future videos Sir, may Allah bless you make ur life easy and happy
1+
Can you please do a video about impedance control (with external force, I mean ) with these manipulators?
Its on my list.
Your video is very interesting! thank you for making this. I have a question, if I want to apply it to Robot in real, is the mathematical modeling of the actuator also considered or only dynamic modeling of the robot to design the PID? and how do I get the real value of joint velocity and acceleration on the robot?
It depends on the motor controller you are using. For real robots motor controllers can control robot through kinematics and/or dynamics, yo just have to configure it. As for the real vales of joint velocity and acceleration, you have to use a feedback sensor, mostly an encoder.
@@LearningOrbis Thank you, Looking forward to another interesting video from you
is code is applicable to polynomial trajectory block?
Yes, it has nothing to do with how you are providing the trajectory.
Thanks for the video
We're working on something similar but with 4DOF robot
We tried to do the PID control optimization similar to what we saw in the video
Yet it's not working for us
Also, we would like to know how we get tau for the tuning goal
Waiting for your response
God bless you
I've used the same thing for my 5DOF manipulator and a 7 DOF manipulator as well. Tau is the time constant in case of a step response. You should be using step input to all joints, but if you want a varying trajectory control, then unfortunately PID cannot give you the desired response. For that you have to implement a feedforward block as well. I'll describe that thing in my next video.
Can you share your work pls
If I make PID controller model after inverse kinematics model for 4 DOF robot, will be that ok. Or I have to apply all previous model before this video. I will be waiting for your response. Thank you
You can make PID controller and Inverse Kinematics block.
Can you share what u did?
Can you share the code for autotuning PID gains?
I've given it in the video. If you still can't figure it out, kindly drop me an email at learningorbis@gmail.com. I'll reply you there.
I have a doubt,how to give torque to robot arm
You have to change the Actuation method from the settings of all the joints. Moreover, you should change the signal of Simulink-to-PS converter to give N.m as output.
Can i use different controller instead of PID ( example : sliding mode controller)
Yes, of course you can.
@@LearningOrbis HOW ?
There is no built-in block for implementing Sliding Mode Control in MATLAB. You have to implement it from scratch, on your own.
Awesome, Thanks can you share the code link ?
All the files and codes are available at Mathworks.
www.mathworks.com/matlabcentral/fileexchange/114195-autotuning-of-pid-controller-for-a-non-planar-manipulator
Is it a non linear system? I can not tune pid why is this problem creating??
Yes it is a non-linear system. We haven't linearized it.
@@LearningOrbis but my main focus is to controller design what can i do brother?
@@LearningOrbis is there any option to linearize it?
Yes. Kindly view my video on Computed Torque Control, present in the same playlist. In that we use forward dynamics to linearize the system and then using a simple PD controller we can control the robot.
@@LearningOrbis but is there any option to tuning this??just like using pid tuning app?
Hello Sir ; thank you a lot for this instructing videos ; I tried to reproduce the same work and it gave me two problems:
+ the first one when I begin simulation (I have set some values of the PID), The robotic arm behaved crazy unstable with random motion ;
+ The second problem ; when I tried to use the optimization algorithm you've presented It gives me an error :" Error using slTuner/looptune
In "looptune(sllin,...)" command, the point specified by
"Robotic_arm4_at_zeropositions/Robotic_arm_4_PID/Thetasreal" does not match any of the existing ones:
Robotic_arm4_at_zeropositions/PID 1/1
Robotic_arm4_at_zeropositions/PID 2/1
Robotic_arm4_at_zeropositions/Robotic_arm_4_PID/1
Robotic_arm4_at_zeropositions/Inverse kinematics equations of the robotic arm1/ SFunction /2[Theta1d]
Robotic_arm4_at_zeropositions/Inverse kinematics equations of the robotic arm1/ SFunction /3[Theta2d]
I got the same error too, have you managed to fix it?
This is because those signal lines are not named, they are the default 1 2 3.
Code is creating error any solution ?
If you can share the error then I may be able to help you.
Can you help me
When i try to tuned code
This message appeare
Creating sltuner and configuring it
Create sltuner interface
Go through the PID tuner code again. You might be missing the initial lines that create the sltuner.
%% creating sltuner and configuring it
% create sltuner interface
TunedBlocks = {'PD1','PD2'};
ST0= slTuner('sm_test1_PID',TunedBlocks);
%mark outputs of pid block as plant input
addpoint(ST0,TunedBlocks);
%mark joint angle as plant outputs
addpoint(ST0,'robot/qm');
%mark reference signals
RefSignals ={...
'sm_test1_PID/Signal Builder/q1', 'sm_test1_PID/Signal Builder/q2'};
addpoint(ST0,RefSignals)
%% defining input and output and tunning the system
Controls =TunedBlocks; %auctator commands
Measurements = 'sm_test1_PID/qm'; %joint angle measurements
Options = looptuneOptions('RandomStart',80,'UseParallel',false);
TR = TuningGoal.StepTracking(RefSignals,Measurements,0.05,0);
ST1 = looptune(ST0,Controls,Measurements,TR,Options);
%% update pid block
WriteBlockValve(ST1)
This is my code idon't know where is the problem
@@remonremon1234 my problem is same .can u give any proper solution ?
can i find this code ?
Email me and I'll share the files
@@LearningOrbis what is ur mail?
plz can u reply?