Real Time Windows Target is not working "real time"

Real Time Windows Target is not working "real time"

Post by Akif » Fri, 18 Feb 2011 10:16:04


I have a weird problem. I'm using MATLAB 2010a with RTWT. It works fine with my own notebook computer. But I will use it in another PC. This PC is a mobile one and it takes its power from Lead Acid batteries through M4-ATX 250W DC-DC Power Supply. The board has Intel i7 3.2Ghz processor and 4GB DDR3 Ram with Windows 7 installed on a Solid State disk.

The problem arises in this computer. When I start the rtwt simulation in this computer, independent of the model complexity, it runs too slowly. My sample time is 0.001s (I tried 0.01 and 0.1 too with no luck). When I start the simulation, it takes nearly 4-5 seconds or more to achieve 1second in simulation. So rtwt is not running real time.

I tried reinstalling both MATLAB and rtwt kernel but it did not help.

The only thing that comes to my mind is the power supply. If its wattage (250W) is insufficent for this processor with rtwt simulation running, does it cause such a problem? If it is not, any suggestions will be welcomed.

Thanks a lot..
 
 
 

Real Time Windows Target is not working "real time"

Post by Akif » Fri, 18 Feb 2011 21:17:04

I've replaced the power supply with a regular 350W atx supply but it did not affect anything. So the PSU is eliminated from being a problem source.

I'm focusing on i7 processor. Can it be the problem? Some compatibility issues maybe?

 
 
 

Real Time Windows Target is not working "real time"

Post by ImageAnaly » Fri, 18 Feb 2011 21:36:38

I don't have Windows 7 (yet) so I don't know if it's the same but with
Windows XP, you can bring up the task list (control-shift-Esc) and
then click the Processes tab, and then right click a process and set
the priority. You can set it to high. I never set any process to
Real Time because if you have that process computing away intensively,
you'll never be able to do anything else on the computer until it's
done. Why don't you run your process and see what priority Windows 7
assigned to it? If it's "Normal" try bumping it up one of two levels.
 
 
 

Real Time Windows Target is not working "real time"

Post by Akif » Fri, 18 Feb 2011 21:54:04

Changing its priority did not affect anything. And in fact it should not I think since MATLAB implements its own kernel it should have nothing to do with Windows priority system.
 
 
 

Real Time Windows Target is not working "real time"

Post by Akif » Sat, 19 Feb 2011 05:16:04

I have found a workaround to this problem though it is not so feasible.

Since I thought that the problem arises from intel i7 processor, in the task manager, I used "Set Affinity" for MATLAB process and set it to 1 core (i.e, CPU 0) instead of all (8 cores). When I set this, Real Time Windows Target worked as expected. It is a proof that the problem is i7 processor. Although it's painful to set MATLAB affinity each time, at least it is working for now.

I'm waiting for some real solutions still..

Thanks
 
 
 

Real Time Windows Target is not working "real time"

Post by Jan Housk » Sat, 19 Feb 2011 18:38:03

Hi Akif,



The problem may be due to the processor power scheme changing the base
CPU clock rate between the moment it is calibrated and the moment it is
actually used for real-time operation. Although Real-Time Windows Target
kernel tries not to rely on the "core" CPU clock, problems like this can
sometimes appear with some aggresive power-saving techniques.

If possible, please try to disable any power saving methods that can
cause CPU clock throttling or dynamic CPU clock boosting. In particular,
please look for EIST or C1E in your BIOS and try to disable that.

Good Luck, Jan


--
Jan Houska HUMUSOFT s.r.o.
XXXX@XXXXX.COM Pobrezni 20
http://www.yqcomputer.com/ 186 00 Praha 8
tel: ++ 420 284 011 730 Czech Republic
fax: ++ 420 284 011 740