Announcement

Collapse
No announcement yet.

Problems with Motors in Simulink

Collapse
X
 
  • Filter
  • Time
  • Show
Clear All
new posts

  • Luis_GC
    replied
    Hi, I'm using a Robotino v3 and I'm trying with simulink but at the moment I try to start de simulation on the command windows shows a lot of errors! Some can help me?

    thanks

    Leave a comment:


  • misken
    replied
    Yes, I encounter the same crashes at Simulink. It seems to start normally but then crashes. A complete restart of Matlab is necessary then. If I remember correctly, I was using Matlab 2015b.

    Leave a comment:


  • Beckmann
    replied
    Hello all,

    There has been a new version of the API2 f0r 32-Bit.

    http://doc.openrobotino.org/download...i386-1.0.2.exe

    The values for Robotino v3 (ideal PI controller) are kp=0.1 and ki=0.005. I will test the api in February further and give feedback here.
    My Matlab crashes when I use Simulink after 5 - 10 s, does this happend to you too?

    Kind regards
    Beckmann

    Leave a comment:


  • misken
    replied
    I'm using a Robotino3. I had no time to investigate this further, I will have another look. What I confirm is, that the documentation of the internal PI controller and the Matlab functions is not the best. At different places different values are mentioned, example descriptions differ and so on. I would like to ask Festo to rework the Matlab documentation. That would be great!

    Leave a comment:


  • Beckmann
    replied
    Hello misken,

    are you using a Robotino2 or Robotino3? Both seem to have problems with the block 'Motor' in Simulink.
    For my Robotino2 the above values (25,25,25) worked just fine.

    For my Robotino3 I have found different values. At the moment I am using
    Kp = 1
    Ki = 0.6
    Kd = 0

    With those, Robotino is driving smooth and make no wierd noises.

    The other solution I found was to use the internal PI-controller. (whatever the values are... no idea)

    I created functions for each motor. Code below. And let those function run in a simulink block called "interpreted matlab function"
    Within the script I only set the wanted speed in rpm and let the motor do the rest.



    Code for the function of Motor 1

    function [ rpm ] = Motor1( u )
    %% This function controls Motor1

    controlvalue=u(1);
    MotorId1=u(2);

    Motor_setSetPointSpeed(MotorId1,controlvalue);
    rpm = Motor_actualSpeed( MotorId1 );

    end
    Attached Files

    Leave a comment:


  • misken
    replied
    I can confirm this behaviour, anyhow changing them to 25 each causes the motors to move but they sound quite strange. This doesn't seem to be a good fit. I will investigate this further.

    Leave a comment:


  • bc-bh
    replied
    Hello Beckman,

    Thank you, that is solution to this problem.

    I've changed the parameters of the PID controller (to 25), and now Robotino ismoving normally, and searches environment for lines.


    Please, can you help me with solution to this problem, it is also my topic: http://forum.openrobotino.org/forum/...me-matlab-code


    Thank you very much.


    Best regards.

    Leave a comment:


  • Beckmann
    replied
    Hello bc-bh,

    it took a while to figure it out. I encountered the same problem. When you use the Motor block from the Simulink library, the standard parameter for the internal PID-control are set to P=0.9, I=0.1 and D=0. With this configuration the Motor is simply not driving at all due to the controller.
    Once I changed the parameters to KP=25,KI=25 and KP=25 the motor worked just fine.

    Let me know if this solved the problem.

    Kind regards
    Clemens
    Attached Files

    Leave a comment:


  • bc-bh
    started a topic Problems with Motors in Simulink

    Problems with Motors in Simulink

    Dear,


    I have a problem with running Robotino from Simulink. I establish a connection between Simulink and Robotino, and I can see the images from camera, but Robotino is not able to perform any task of movement. However, when I run the same exercise over MATLAB code, then everything works perfectly. What could be the problem?

    Thank you in advance!


    Best regards...


    Boris
Working...
X