Jump to content

chris.nieto

Members
  • Gesamte Inhalte

    3
  • Benutzer seit

  • Letzter Besuch

Letzte Besucher des Profils

Der "Letzte Profil-Besucher"-Block ist deaktiviert und wird anderen Benutzern nicht angezeit.

chris.nieto's Achievements

Newbie

Newbie (1/14)

0

Reputation in der Community

  1. Hello, As far as I know, all IMUs suffer from random bias every time they are powered on. Such a bias cannot be removed with one-time calibration. You can accept the randomness of the sensor loosing some accuracy or calibrate the sensor every time you power it on. Alternatively you can implement algorithms that consider stochastic phenomena such as a Kalman Filter. Cheers.
  2. I couldn't replicate it either. However, after reading the forum again I wrote the following script. function imu_offset_measurement() clear ALL clear callback_workspace %to clear its persistent variables clear global clc close ALL import com.tinkerforge.IPConnection; import com.tinkerforge.BrickIMUV2; global arrayElapsedTime; global arrayRawAcceleration; global arrayAngularVelocity; global arrayMagneticField; disp('START'); HOST = 'localhost'; PORT = 4223; UID = '6467RG'; % Change XXYYZZ to the UID of your IMU Brick 2.0 ipcon = IPConnection(); % Create IP connection imu = handle(BrickIMUV2(UID, ipcon), 'CallbackProperties'); % Create device object ipcon.connect(HOST, PORT); % Connect to brickd % Don't use device before ipcon is connected bias = [0;0;0]; %[0.0055;0.0168;-0.2722]; %this constant has been previously calculated imu.setSensorConfiguration(7,4,2,0,4);%set sensor range and filter bandwidth %imu.setSensorFusionMode(0); %Fusion Mode OFF (uncalibrated output) % Set period for all data callback to 0.1s (100ms) imu.setAllDataPeriod(10); % Register all data callback to function cb_all_data set(imu, 'AllDataCallback', @(h, e) callback_workspace(e, bias)); %readings not reliable during first miliseconds %all the experiment is stationary pause(1);%recording time imu.setSensorFusionMode(0); pause(1);%second period imu.setSensorFusionMode(1); pause(1); imu.setSensorFusionMode(2); pause(1); imu.setSensorFusionMode(3); pause(1); ipcon.disconnect(); %stop capturing data %POST-PROCESSING xlswrite('results_imu_offset_measurement_test_magnetometer.xls',[arrayElapsedTime,arrayRawAcceleration,arrayAngularVelocity,arrayMagneticField]); disp('FINISH'); end with callback function function callback_workspace(e, bias) persistent callbackTimer; %to remove persistent variables remember to clear the right function in the main global arrayElapsedTime; global arrayRawAcceleration; global arrayAngularVelocity; global arrayMagneticField; %if it is the first call return inicial values. %the persistent variables must be cleared before calling this function for the first time if isempty(callbackTimer) callbackTimer=tic; return elseif toc(callbackTimer)>0.07 %readings not reliable during first miliseconds arrayElapsedTime = [arrayElapsedTime; toc(callbackTimer)]; arrayRawAcceleration = [arrayRawAcceleration;double(e.acceleration.')/100.0]; arrayAngularVelocity = [arrayAngularVelocity;double(e.angularVelocity.')/16.0]; arrayMagneticField = [arrayMagneticField;double(e.magneticField.')/16.0]; return else %left empty purposefully end end This gave me the attached output file, which does not behave in the same way I described the first time, but still quite funky. It does not make much sense since the total recorded time is 10 seconds not 5 seconds as it should by adding all pauses! In this case, the "by default" period gives zeroes, and the rest behave as expected despite the additional recorded 5 seconds. However, any subsequent execution of the script gives reasonable outcome. Is it possible that something happens just at the beginning while setting up the IP connection to the device? results_imu_offset_measurement_test_magnetometer.xls
  3. Dear all, I am using the IMU 2.0 for a project and I found that the magnetometer has a weird behavior at least during All Data Callback function in MATLAB. I didn't check using getters or any other callback, but that shouldn't be an impediment for proper functioning anyways. The IMU is supposed to be calibrated although the problem may still be related to that. When the sensor is operated with the fusion mode by default (no explicit fusion mode command is written in the computer) the magnetometer gives values that are constant with respect of time (no noise at all). When the fusion mode is set to 0 (OFF) the sensor gives reasonable data with some noise in it. Finally, when the fusion mode is set to 1, 2 or 3 (either of the ON modes) the magnetometer gives perfect zeroes. I don't think that should be the actual behavior of the sensor. First, the default mode must coincide with the fusion mode 1, but that doesn't happen. Second, when the sensor is operating in any of the ON fusion modes I would generally expect to see some non-zero values with slightly random fluctuations when the sensor is stationary and there are no other magnetic disturbances in the environment. Does anyone have a clue on what would be happening here?
×
×
  • Neu erstellen...