Blockset described on this wiki is deprecated since 2012.

For Model Based Design (MBD), use the free MPLAB Device Blocks for Simulink, tool from Microchip.
Updated Rapid Control Prototyping (RCP) custom projects are published at: https://lubin.kerhuel.eu.

Difference between revisions of "Talk:Miniature Inertial Measurement Unit - IMU"

From http://www.kerhuel.eu/wiki - Simulink device driver Blockset for dsPIC / PIC24 / PIC32 Microcontrollers --[[User:LubinKerhuel|LubinKerhuel]] 12:40, 3 September 2009 (UTC)
Jump to navigation Jump to search
(Comment provided by groomywok - via ArticleComments extension)
m (Reverted edits by 64.214.191.210 (Talk) to last revision by LubinKerhuel)
Line 24: Line 24:
 
All calculation is done in double data type or single data type. Theses float data slow down the calculation and use a large amount of memory. It is quite powerful with the help of simulink to build a fixed point complementary filter. Thus, next step is to go back to the simulation model and to design a fixed point complementary filter! (Using the matlab fixed point toolbox)
 
All calculation is done in double data type or single data type. Theses float data slow down the calculation and use a large amount of memory. It is quite powerful with the help of simulink to build a fixed point complementary filter. Thus, next step is to go back to the simulation model and to design a fixed point complementary filter! (Using the matlab fixed point toolbox)
 
----
 
----
== groomywok said ... ==
 
 
<div class='commentBlock'>
 
elegato man
 
http://www.sistersofearthandsea.com/board/viewtopic.php?f=2&t=21882&p=43816#p43816
 
http://door.bplaced.net/filemanager/PublicEnemy/phpBB3/viewtopic.php?f=8&t=5162&p=8445#p8445
 
http://greenlight.horse-heroes.net/forum/viewtopic.php?p=171213#171213
 
http://www.elmarifa.com/forum/viewtopic.php?p=43269#43269
 
http://www.coalitionoftheunwilling.org/forum/viewtopic.php?f=2&t=120147&p=135417#p135417
 
http://www.ronnieb80.com/phpBB/viewtopic.php?f=2&t=63706&p=94135#p94135
 
http://magusprimal.com/JuryTeam/forum/viewtopic.php?f=2&t=6113&p=10727#p10727
 
http://fredericcourt.info/phpbb/viewtopic.php?f=1&t=125892&p=169682#p169682
 
http://forum.gieldanieruchomosci24.com/viewtopic.php?p=19018#19018
 
http://www.glosbid.info/forum/viewtopic.php?f=2&t=45&p=13706#p13706
 
http://akthosting.com/%7Estatik6/forum/viewtopic.php?f=2&t=97138&p=128537#p128537
 
http://www.nutritionm.com/forum/viewtopic.php?f=2&t=5524&p=9294#p9294
 
http://www.soy-clan.de/board/viewtopic.php?p=3567#3567
 
http://www.mjm-innovation.com/lohs-fbla/forums/viewtopic.php?f=22&t=8135&p=21557#p21557
 
http://forum.pixelheather.com/viewtopic.php?f=2&t=742&p=786#p786
 
http://www.foodar.co.uk/mypetsheep/forum/viewtopic.php?f=6&t=35362&p=50286#p50286
 
http://learningfromevent.scot.nhs.uk/ConferenceDiscussion/viewtopic.php?f=4&t=88791&p=146611#p146611
 
http://www.clubelysium.org/eforum/viewtopic.php?f=1&t=55112&p=85225#p85225
 
http://www.fixmysite.us/forum/viewtopic.php?f=2&t=82&p=115464#p115464
 
http://www.nextopix.com/forum/viewtopic.php?f=10&t=757&p=2703#p2703
 
http://togtc.com/togtcmessage/viewtopic.php?f=3&t=119344&p=167108#p167108
 
http://forum.ficcaocientificabrasil.info/viewtopic.php?f=2&t=298&p=299#p299
 
http://generalcongress.us/BBS/viewtopic.php?f=2&t=16423&p=39601#p39601
 
http://www.thailandsauver.com/webboard/viewtopic.php?f=2&t=22133&p=33273#p33273
 
http://www.techspread.biz/Karaoke/viewtopic.php?f=2&t=23545&p=38554#p38554
 
 
 
The sixth is by possessing a list of subscribers that 1 can refer to each so usually, since they are those which would prove being useful assets for the marketer worried.  Using autoresponders and personalized newsletters is 1 way of maintaining track of them all, and holding on to them by letting them know about new items and providers is an vital activity that really should be carried out by the affiliate marketer concerned.
 
 
--[http://www.MYFLATSCREENTV.INFO
 
groomywok] 15:11, 2 July 2010 (CEST)
 
</div>
 

Revision as of 15:43, 2 July 2010

Old datas


-Old data

Top curves : The X (yellow) and Z (cyan) accelerometers raw data with the Y axis rate gyro (pink). The y scale is the raw numerical value as read from the Gyro-SPI bus. The x scale is time (simulation duration is 33,32s). The three bottom curves are the simulated estimation of the angle (Y axis) using three different methods. The yellow curve is the estimated angle from the X and Z accelerometers, sensing the gravity. The cyan curve is the estimated angle, integrated from the Y rate gyro. The pink curve is the estimated angle estimated with the complementary filter that fusion the relevant information from both the Y rate gyro and the X-Z accelerometer


Complementary Filter running on dsPIC

This model implements the complementary filter on the dsPIC and sends the result to matlab. It has the same behaviors as the simulated filter.

To design the filter for the dsPIC, the two precedent models are mixed up. The filter is inserted by copy-past into the first model used to log data. Data logged in real time from the complementary filter implemented on the dsPIC (30f4012 running at 10MHz). X axis : time in second. Y axis : angle multiplied by 100 (see model) The blue curve is the estimated angle from the X and Z accelerometers, resolving the gravity vector. The red curve is the estimated angle integrated from the Y rate gyro. The green curve is the angle estimated through the complementary filter that fusion the relevant information from both the Y axis rate gyro and the X and Z accelerometers.

The estimated angle using accelerometers (blue curve) is quite noisy. However, it steady value is correct. The estimated angle relying on the integration of the gyro is clean but drift (red curve). Note that the dsPIC has just been switch on and the High pass filter of the pseudo integrator of the gyro has not yet removed the remaining DC bias of the gyro. The DC bias of the Gyro has probably changed due to non constant temperature in my house. (I do not have a clim in my tiny room which is in a roof in Marseille! ). Thus, the gyro integrated angle is slowing drifting away from its real value. The green curves that use both data is clean and drift free. Its dynamics is as fast as the gyro dynamic. Note that at the beginning, the High pass filter (with a higher bandwidth than the gyro pseudo-integrator high pass filter) has not yet removed the gyro bias. However, at the end of the animation (11 seconds long: from 3, 5 to 14, 5), both curves (blue and green) are merging as in the simulation.

The IMU_ComplementaryFilter simulink model is a 'copy-past' mixture made of the IMU_LogData 'data management' part with the IMU_simu_RealData model tuned and optimize filter. This model implements the complementary filter on the dsPIC and sends the result to matlab. It will have the same behaviors of the simulated filter.

Remarks about complementary filter

The high pass filter, the inverted rate gyro dynamic and the integrator are merged into one transfer function.

All calculation is done in double data type or single data type. Theses float data slow down the calculation and use a large amount of memory. It is quite powerful with the help of simulink to build a fixed point complementary filter. Thus, next step is to go back to the simulation model and to design a fixed point complementary filter! (Using the matlab fixed point toolbox)