Jump to content
OMRON Forums

Motor moving slower when having a random number generator


maartenvervelde
 Share

Recommended Posts

Hello,

 

I'm am using a DC brush motor to test some things, and I am using my own

PID controller made in Simulink. Now I want to use a random number generator to tune the system, but when I add the random number generator in Simulink, the motor starts to move a lot slower with exactly the same setting. The rng is only conencted to an unused P variable so that is not the problem. I checked if the systems misses loops of the control algorithm, but he never misses one. In the taskmanager I see that the servo interrupt does not even use all the time allocated for it. I don't know where it could go wrong.

 

In the attached photo, you can see the difference in speed. Everything is exactly the same, except for the rng.

A different problem I notice, is that the gpascii is not as responsive as it should be. I'm using it through SSH, but to change variables used in the control algorithm I have to send the message multiple times before it works.

245099417_SpeedDifference.thumb.png.39f2b967594325af6c0b5907fc3bbe09.png

Link to comment
Share on other sites

  • Replies 1
  • Created
  • Last Reply

Top Posters In This Topic

Popular Days

Top Posters In This Topic

Posted Images

It could be possible that the RNG generated by Simulink is inefficient. Have you tried replacing it with one of Delta Tau's optimized RNGs?

 

Also, the communication unresponsiveness can be due to high servo, phase or RTI rates, since these take priority over the background cycle wherein host communication occurs. You can try forcing additional background time by setting Sys.BgSleepTime to a bigger number, such as 3000. You could also try decreasing your RTI rate while you are doing tuning by setting Sys.RtIntPeriod higher, like 10-20, and setting it back to its original value when you are finished tuning.

Link to comment
Share on other sites

Guest
This topic is now closed to further replies.
 Share


×
×
  • Create New...