PID Controller for a Robot Manipulator in MATLAB 2021 | RST | SimScape

Поділитися
Вставка
  • Опубліковано 1 гру 2024

КОМЕНТАРІ • 89

  • @wolffle3905
    @wolffle3905 Рік тому

    Thank you! Many videos of you help me so much.

  • @memr8814
    @memr8814 8 місяців тому +2

    Thank you so much!

  • @bastiane215
    @bastiane215 2 роки тому +1

    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!🦾🤖

  • @孙涌钊
    @孙涌钊 21 день тому

    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

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

    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?

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

      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.

  • @merdanozkahraman5577
    @merdanozkahraman5577 Рік тому +1

    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?

    • @LearningOrbis
      @LearningOrbis  Рік тому

      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.

  • @mattiasartor9661
    @mattiasartor9661 2 роки тому +1

    Would you like to see our school project about this topic? I think that together we can optimize some commands.🤞🏼

    • @LearningOrbis
      @LearningOrbis  2 роки тому

      I would be happy to. You may email me the details.

  • @postgenomicera2097
    @postgenomicera2097 11 місяців тому

    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?

    • @LearningOrbis
      @LearningOrbis  11 місяців тому

      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

  • @sampreetimazumdar9595
    @sampreetimazumdar9595 7 місяців тому +1

    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 .

    • @LearningOrbis
      @LearningOrbis  7 місяців тому

      You can find the files here: www.mathworks.com/matlabcentral/fileexchange/114195-autotuning-of-pid-controller-for-a-non-planar-manipulator

    • @sampreetimazumdar9595
      @sampreetimazumdar9595 7 місяців тому

      Thank you

  • @wp5075
    @wp5075 Рік тому

    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?

    • @LearningOrbis
      @LearningOrbis  Рік тому

      Try to change the initial conditions and stability criteria of the slTuner.

  • @shadiaou7u134
    @shadiaou7u134 Рік тому

    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?

    • @LearningOrbis
      @LearningOrbis  Рік тому

      Yes it can be used but for that you have model the robot on your own.

  • @anikbiswas9875
    @anikbiswas9875 10 місяців тому

    sir how to use model predective control ?

  • @zewdalemabebaw6771
    @zewdalemabebaw6771 Рік тому +1

    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?

    • @LearningOrbis
      @LearningOrbis  Рік тому

      You don't need dynamic equations of the robot if you have robot's model in simscape. You only need to implement the SMC.

  • @EliGanji-f4y
    @EliGanji-f4y 3 місяці тому

    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]

  • @AP-ig5pi
    @AP-ig5pi Рік тому

    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.

    • @LearningOrbis
      @LearningOrbis  Рік тому

      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.

  • @anikbiswas9875
    @anikbiswas9875 10 місяців тому

    how to use mpc block same to same ?can u plz help me ?

  • @anikbiswas9875
    @anikbiswas9875 10 місяців тому

    sir ,i write same code but a error is creating.what is the solution ?

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

    Is this PID nonlinear model ?

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

      The attached robot is nonlinear, PID is being used to control the nonlinear system

  • @albinjoy1469
    @albinjoy1469 2 роки тому +1

    Sir it will be helpful if you can upload the computer torque method video this week

    • @LearningOrbis
      @LearningOrbis  2 роки тому

      I will try my best, but because of my busy schedule it may take 4 to 5 days.

    • @albinjoy1469
      @albinjoy1469 2 роки тому

      @@LearningOrbis Can you share the github link for that if you have already done that.

  • @OmS-m4g
    @OmS-m4g 4 місяці тому

    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?

    • @LearningOrbis
      @LearningOrbis  4 місяці тому

      Thank you. Kindly contact us through email and we will try to help you out.

  • @ryidgilani8987
    @ryidgilani8987 Рік тому

    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.

    • @LearningOrbis
      @LearningOrbis  Рік тому

      Yes the graphs being generated are the ones you are asking.

  • @kevinmekongo5936
    @kevinmekongo5936 2 роки тому +1

    OK. Cool, very good. How do we proceed to control a manipulator robot with fuzzy logic please ?

    • @LearningOrbis
      @LearningOrbis  2 роки тому +3

      That is a completely different topic and shall be covered in some future video.

    • @kevinmekongo5936
      @kevinmekongo5936 2 роки тому +1

      @@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 🙏🙏🙏

    • @alrawdasuliman6649
      @alrawdasuliman6649 2 роки тому +1

      @@LearningOrbis we are patiently waiting for such future videos Sir, may Allah bless you make ur life easy and happy

    • @zain_alabidin-j2y
      @zain_alabidin-j2y Рік тому

      1+

  • @pasanpiyaranga
    @pasanpiyaranga Рік тому

    Can you please do a video about impedance control (with external force, I mean ) with these manipulators?

  • @AbdulRahman-jz3px
    @AbdulRahman-jz3px 2 роки тому

    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?

    • @LearningOrbis
      @LearningOrbis  2 роки тому +1

      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.

    • @AbdulRahman-jz3px
      @AbdulRahman-jz3px 2 роки тому

      @@LearningOrbis Thank you, Looking forward to another interesting video from you

  • @anikbiswas9875
    @anikbiswas9875 10 місяців тому

    is code is applicable to polynomial trajectory block?

    • @LearningOrbis
      @LearningOrbis  10 місяців тому

      Yes, it has nothing to do with how you are providing the trajectory.

  • @mohammadshebli162
    @mohammadshebli162 2 роки тому

    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

    • @LearningOrbis
      @LearningOrbis  2 роки тому +2

      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.

    • @MusicWeMiss
      @MusicWeMiss Рік тому

      Can you share your work pls

  • @DEBARPANMAJUMDAR
    @DEBARPANMAJUMDAR Рік тому

    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

    • @LearningOrbis
      @LearningOrbis  Рік тому

      You can make PID controller and Inverse Kinematics block.

    • @MusicWeMiss
      @MusicWeMiss Рік тому

      Can you share what u did?

  • @vishalnaik3632
    @vishalnaik3632 Рік тому

    Can you share the code for autotuning PID gains?

    • @LearningOrbis
      @LearningOrbis  Рік тому

      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.

  • @jilshashirinp859
    @jilshashirinp859 2 роки тому

    I have a doubt,how to give torque to robot arm

    • @LearningOrbis
      @LearningOrbis  2 роки тому

      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.

  • @jilshashirinp859
    @jilshashirinp859 2 роки тому

    Can i use different controller instead of PID ( example : sliding mode controller)

    • @LearningOrbis
      @LearningOrbis  2 роки тому

      Yes, of course you can.

    • @jilshashirinp859
      @jilshashirinp859 2 роки тому

      @@LearningOrbis HOW ?

    • @LearningOrbis
      @LearningOrbis  2 роки тому

      There is no built-in block for implementing Sliding Mode Control in MATLAB. You have to implement it from scratch, on your own.

  • @dhruvapandey17
    @dhruvapandey17 2 роки тому +1

    Awesome, Thanks can you share the code link ?

    • @LearningOrbis
      @LearningOrbis  2 роки тому

      All the files and codes are available at Mathworks.
      www.mathworks.com/matlabcentral/fileexchange/114195-autotuning-of-pid-controller-for-a-non-planar-manipulator

  • @anikbiswas9875
    @anikbiswas9875 Рік тому

    Is it a non linear system? I can not tune pid why is this problem creating??

    • @LearningOrbis
      @LearningOrbis  Рік тому

      Yes it is a non-linear system. We haven't linearized it.

    • @anikbiswas9875
      @anikbiswas9875 Рік тому

      @@LearningOrbis but my main focus is to controller design what can i do brother?

    • @anikbiswas9875
      @anikbiswas9875 Рік тому

      @@LearningOrbis is there any option to linearize it?

    • @LearningOrbis
      @LearningOrbis  Рік тому

      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.

    • @anikbiswas9875
      @anikbiswas9875 Рік тому

      @@LearningOrbis but is there any option to tuning this??just like using pid tuning app?

  • @khalidkarra8679
    @khalidkarra8679 Рік тому

    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]

    • @ahmedhisham6467
      @ahmedhisham6467 11 місяців тому

      I got the same error too, have you managed to fix it?

    • @LHannah-in7hi
      @LHannah-in7hi 8 місяців тому

      This is because those signal lines are not named, they are the default 1 2 3.

  • @anikbiswas9875
    @anikbiswas9875 Рік тому

    Code is creating error any solution ?

    • @LearningOrbis
      @LearningOrbis  Рік тому

      If you can share the error then I may be able to help you.

  • @remonremon1234
    @remonremon1234 Рік тому

    Can you help me
    When i try to tuned code
    This message appeare
    Creating sltuner and configuring it
    Create sltuner interface

    • @LearningOrbis
      @LearningOrbis  Рік тому

      Go through the PID tuner code again. You might be missing the initial lines that create the sltuner.

    • @remonremon1234
      @remonremon1234 Рік тому

      %% 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)

    • @remonremon1234
      @remonremon1234 Рік тому

      This is my code idon't know where is the problem

    • @anikbiswas9875
      @anikbiswas9875 10 місяців тому

      @@remonremon1234 my problem is same .can u give any proper solution ?

  • @anikbiswas9875
    @anikbiswas9875 Рік тому

    can i find this code ?

  • @anikbiswas9875
    @anikbiswas9875 10 місяців тому

    plz can u reply?