help-octave
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: pause(.01) gives a mean pause of 0.0102 and not 0.0100 seconds


From: GoSim
Subject: Re: pause(.01) gives a mean pause of 0.0102 and not 0.0100 seconds
Date: Fri, 18 Oct 2019 09:50:52 -0500 (CDT)

Thank you inor0627 for your idea and thank you even more Francesco Potortì
for an even better idea! 

I experimented and the results are much better. I attach a couple of
diagrams that show the sample time that is selected to be 0.01 seconds. The
first pic has 80% load and the second 60% load. I achived real time
behaviour with the commands isolcpu ans taskset which allows me to make a
cpu core be not used by the OS and put the process in this core. My CPU is
only 2 core and more cores could be even better because linux still put some
things in the "free" cpu. With this method increasing the priority gives
more jitter which is strange.

I think the next step is to have a real time kernel to maybe get less
jitter. But it's already good enough for real time control.

blue = sample time
red = moving average
slack = 0.01
CPU = cheapest AMD from 2018, 3 GHz with 2 cores
Xubuntu

MPC control, 80% load
<https://octave.1599824.n4.nabble.com/file/t373066/octave_pause_new_80_load.png>
 



Full state feedback control, 60% load
<https://octave.1599824.n4.nabble.com/file/t373066/octave_pause_new_60_load.png>
 





--
Sent from: https://octave.1599824.n4.nabble.com/Octave-General-f1599825.html



reply via email to

[Prev in Thread] Current Thread [Next in Thread]