Hi Ales !

Your idea is excellent, its realisation would close a gap for 
many control engineers, the missing link between control design
and simulation to its implementation. When I was working on my 
dissertation I had a non linear model of an active magnetic
bearing system in simulink, and the state space controller
in a so-called  "s-function" ( I did not trust Simulink in
recursively updating matrices represented by signals ).

There should be some m2c function in MATLAB to transform
m-code into c-code. Provided that a controller is written
as s-function, transforming the respective code in a real
time thread should be possible. Additionally, all dynamic
systems in Simulink are represented by this s-function
type model, with -I think- 6 sections, 0=init, 1=continuous
dynamic, 2 = discrete dynamics, 3=output, 4=next sample hit,
etc. If you do your controller in Simulink, generating the
c-code will yield a s-function in C. 

I had sucessfully used the RT-workshop option in Simulink
to generate DOS code being executed as the only task running
on DOS ( a simple controller up to 32kHz on a Pentium 133)
Under Windows, there is (or was) a product called WinCon,
which does something simuliar, but due to Windows only
up to 1kHz. There is also an english company I cannot
remember the name of, which does real time control under
Simulink by providing a dll under MS-Windows.

What will be the procedure in using RTL and Simulink:

 -Design your controller in MATLAB
 -Realize it in Simulink or MATLAB
 -Click "Make RTL-module"
 -Start control (insmod module or download to board)
 -Visualize data.

For a concrete realisation with RTL, some questions:

In Simulink DAQ boards are represented by nice, configurable 
symbols. The respective object is linked to the controller
later. Moreover, data can be traced (in the DOS version)
to a file, how ever this works. What would be the interface 
to the DAQ RT-driver ? Probably an interface to COMEDI with 
specific calls from the MATLAB generated controller?

What should happen when the controller is running? Where are 
data traced to and how can a controller be modified ?
In Simulink there are either Plots or Scopes for tracing
(and files, or directly into the MATLAB workspace ).
To shm as for the MATLAB workspace, or to fifos ?

peterw
-- 
Dr. Peter Wurmsdobler

      CTM - Centre de Transfert des Microtechniques
39, av. de l'Observatoire, BP-1445, 25007 Besancon CEDEX 3
TELEPHONE: +33 3 81 47 70 20  TELECOPIE: +33 3 81 47 70 21
                E-mail: [EMAIL PROTECTED]

                  Ceterum censeo MIRCOSOFTem esse delendam.
-- [rtl] ---
To unsubscribe:
echo "unsubscribe rtl" | mail [EMAIL PROTECTED] OR
echo "unsubscribe rtl <Your_email>" | mail [EMAIL PROTECTED]
---
For more information on Real-Time Linux see:
http://www.rtlinux.org/rtlinux/

Reply via email to