Adaptative high-gain extended Kalman filter and applications
Adaptative high-gain extended Kalman filter and applications
Adaptative high-gain extended Kalman filter and applications
Create successful ePaper yourself
Turn your PDF publications into a flip-book with our unique Google optimized e-Paper software.
tel-00559107, version 1 - 24 Jan 2011<br />
4.3 real-time Implementation<br />
3. the RTAI version (i.e. 3.4) that is embedded in the RTAI-Knoppix has an error in<br />
the application file that links the Scicos Analog/Digital block (Analog to digital) of the<br />
RTAI-lib palette to the real-time executable end file. The consequence of this error is<br />
that is that it is impossible to measure more than one signal. After a few discussions<br />
with the RTAI community, a solution was provided to us by R. Bucher in the form of a<br />
corrected version of the faulty file: rtai4 comedi datain.sci. The correct code is given in<br />
Appendix C.1. The files to be replaced are located on the virtual file system UNIONFS<br />
deployed by the Live CD, in the following repositories:<br />
/UNIONFS/ usr / s r c / r t a i −3.4/ r t a i −lab / s c i l a b / macros /RTAI/<br />
/UNIONFS/ usr / l o c a l / s c i l a b −4.0/ macros /RTAI/<br />
It is also necessary to recompile the file in the second repository using the shell comm<strong>and</strong><br />
s c i l a b −comp r t a i 4 c o m e d i d a t a i n . s c i<br />
To do this, one need only to copy/paste the code of Appendix C.1 in any text editor, save<br />
this file with the name rtai4 comedi datain.sci <strong>and</strong> perform the following comm<strong>and</strong>s<br />
(MY USB KEY has to be replaced with the correct path name):<br />
sudo rm /UNIONFS/ usr / l o c a l / s c i l a b −4.0/ macros /RTAI/ r t a i 4 c o m e d i d a t a i n . s c i<br />
sudo rm /UNIONFS/ usr / l o c a l / s c i l a b −4.0/ macros /RTAI/ r t a i 4 c o m e d i d a t a i n . bin<br />
sudo rm /UNIONFS/ usr / s r c / r t a i −3.4/ r t a i −lab / s c i l a b / macros /RTAI/..<br />
r t a i 4 c o m e d i d a t a i n . s c i<br />
sudo cp MY USB KEY/ r t a i 4 c o m e d i d a t a i n . s c i /UNIONFS/ usr / l o c a l / s c i l a b −4.0/..<br />
macros /RTAI/ r t a i 4 c o m e d i d a t a i n . s c i<br />
sudo cp MY USB KEY/ r t a i 4 c o m e d i d a t a i n . s c i /UNIONFS/ usr / s r c / r t a i −3.4/ r t a i ..<br />
−lab / s c i l a b / macros /RTAI/ r t a i 4 c o m e d i d a t a i n . s c i<br />
sudo cd /UNIONFS/ usr / l o c a l / s c i l a b −4.0/ macros /RTAI/<br />
s c i l a b −comp r t a i 4 c o m e d i d a t a i n . s c i }<br />
The real-time platform is now fully functional.<br />
The I/O signal is sampled sufficiently fast as compared to the motor time constant. We<br />
implement the continuous version of the adaptive <strong>high</strong>-<strong>gain</strong> <strong>extended</strong> <strong>Kalman</strong> <strong>filter</strong>. The<br />
general structure of the observer is the same as before. It is displayed in Figure 4.26 together<br />
with the corresponding Scicos diagram:<br />
− as before the observer consists of two user defined functions that work in quite the same<br />
way as Matlab S-functions,<br />
− the update of the observer equations is performed continuously <strong>and</strong> the computation<br />
of the innovation is done in the discrete time framework,<br />
− a delay block of length d guarantees that we have access at time t to the estimated<br />
state computed at time t − d (with the default value being equal to the initial guess of<br />
the observer)<br />
− two Analog/Digital blocks get the measured voltage (control variable of the machine)<br />
<strong>and</strong> current (output variable of the machine),<br />
85