• 大小: 78.59MB
    文件类型: .rar
    金币: 2
    下载: 1 次
    发布日期: 2021-12-22
  • 语言: Matlab
  • 标签: MIMU  ZUPT  PDR  

资源简介

室内行人导航技术仿真MIMU+ZUPT以及MIMU+PDR,利用MATLAB仿真其算法,对于学习室内导航技术具有参考价值

资源截图

代码片段和文件信息

classdef AHRS < handle

    %% Public properties
    properties (Access = public)
        SamplePeriod = 1/256;
        Quaternion = [1 0 0 0];     % output quaternion describing the sensor relative to the Earth
        Kp = 2;                     % proportional gain
        Ki = 0;                     % integral gain
        KpInit = 200;               % proportional gain used during initialisation
        InitPeriod = 5;             % initialisation period in seconds
    end

    %% Private properties
    properties (Access = private)
        q = [1 0 0 0];              % internal quaternion describing the Earth relative to the sensor
        IntError = [0 0 0]‘;        % integral error
        KpRamped;                   % internal proportional gain used to ramp during initialisation
    end

    %% Public methods
    methods (Access = public)
        function obj = AHRS(varargin)
            for i = 1:2:nargin
                if  strcmp(varargin{i} ‘SamplePeriod‘) obj.SamplePeriod = varargin{i+1};
                elseif  strcmp(varargin{i} ‘Quaternion‘)
                    obj.Quaternion = varargin{i+1};
                    obj.q = quaternConj(obj.Quaternion);
                elseif  strcmp(varargin{i} ‘Kp‘) obj.Kp = varargin{i+1};
                elseif  strcmp(varargin{i} ‘Ki‘) obj.Ki = varargin{i+1};
                elseif  strcmp(varargin{i} ‘KpInit‘) obj.KpInit = varargin{i+1};
                elseif  strcmp(varargin{i} ‘InitPeriod‘) obj.InitPeriod = varargin{i+1};                    
                else error(‘Invalid argument‘);
                end
                obj.KpRamped = obj.KpInit;
            end;
        end
        function obj = Update(obj Gyroscope Accelerometer Magnetometer)
            error(‘This method is unimplemented‘);
        end
        function obj = UpdateIMU(obj Gyroscope Accelerometer)

            % Normalise accelerometer measurement
            if(norm(Accelerometer) == 0)                                           % handle NaN
                warning(0 ‘Accelerometer magnitude is zero.  Algorithm update aborted.‘);
                return;
            else
                Accelerometer = Accelerometer / norm(Accelerometer);                % normalise measurement
            end

            % Compute error between estimated and measured direction of gravity
            v = [2*(obj.q(2)*obj.q(4) - obj.q(1)*obj.q(3))
                2*(obj.q(1)*obj.q(2) + obj.q(3)*obj.q(4))
                obj.q(1)^2 - obj.q(2)^2 - obj.q(3)^2 + obj.q(4)^2];                % estimated direction of gravity
            error = cross(v Accelerometer‘);
            
%             % Compute ramped Kp value used during init period
%             if(obj.KpRamped > obj.Kp)
%                 obj.IntError = [0 0 0]‘;
%                 obj.KpRamped = obj.KpRamped - (obj.KpInit - obj.Kp) / (obj.InitPeriod / obj.SamplePeriod);
%             else                                                                    % init per

 属性            大小     日期    时间   名称
----------- ---------  ---------- -----  ----

     文件     247129  2015-12-14 21:03  MIMU-ZUPT&约束&PDR\A note on the lim-i-ta-tions of ZUPTs and the impli-ca-tion on sen-sor error mod-el-ing.pdf

     文件    1336749  2015-12-12 16:22  MIMU-ZUPT&约束&PDR\A novel self-algnment method for SINS based on parameter recognition and dual-velocity vectors.pdf

     文件       5128  2013-12-10 22:23  MIMU-ZUPT&约束&PDR\Gait Tracking With x-IMU\Gait Tracking With x-IMU\AHRS.m

     文件     391195  2013-12-10 22:23  MIMU-ZUPT&约束&PDR\Gait Tracking With x-IMU\Gait Tracking With x-IMU\Datasets\spiralStairs.BIN

     文件    1200557  2013-12-10 22:23  MIMU-ZUPT&约束&PDR\Gait Tracking With x-IMU\Gait Tracking With x-IMU\Datasets\spiralStairs_CalInertialAndMag.csv

     文件     441717  2013-12-10 22:23  MIMU-ZUPT&约束&PDR\Gait Tracking With x-IMU\Gait Tracking With x-IMU\Datasets\stairsAndCorridor.BIN

     文件    1363725  2013-12-10 22:23  MIMU-ZUPT&约束&PDR\Gait Tracking With x-IMU\Gait Tracking With x-IMU\Datasets\stairsAndCorridor_CalInertialAndMag.csv

     文件     290660  2013-12-10 22:23  MIMU-ZUPT&约束&PDR\Gait Tracking With x-IMU\Gait Tracking With x-IMU\Datasets\straightLine.BIN

     文件     905489  2013-12-10 22:23  MIMU-ZUPT&约束&PDR\Gait Tracking With x-IMU\Gait Tracking With x-IMU\Datasets\straightLine_CalInertialAndMag.csv

     文件        202  2013-12-10 22:23  MIMU-ZUPT&约束&PDR\Gait Tracking With x-IMU\Gait Tracking With x-IMU\Quaternions\axisAngle2quatern.m

     文件        502  2013-12-10 22:23  MIMU-ZUPT&约束&PDR\Gait Tracking With x-IMU\Gait Tracking With x-IMU\Quaternions\axisAngle2rotMat.m

     文件        508  2013-12-10 22:23  MIMU-ZUPT&约束&PDR\Gait Tracking With x-IMU\Gait Tracking With x-IMU\Quaternions\euler2rotMat.m

     文件        604  2013-12-10 22:23  MIMU-ZUPT&约束&PDR\Gait Tracking With x-IMU\Gait Tracking With x-IMU\Quaternions\quatern2euler.m

     文件        527  2013-12-10 22:23  MIMU-ZUPT&约束&PDR\Gait Tracking With x-IMU\Gait Tracking With x-IMU\Quaternions\quatern2rotMat.m

     文件         82  2013-12-10 22:23  MIMU-ZUPT&约束&PDR\Gait Tracking With x-IMU\Gait Tracking With x-IMU\Quaternions\quaternConj.m

     文件        337  2013-12-10 22:23  MIMU-ZUPT&约束&PDR\Gait Tracking With x-IMU\Gait Tracking With x-IMU\Quaternions\quaternProd.m

     文件        162  2013-12-10 22:23  MIMU-ZUPT&约束&PDR\Gait Tracking With x-IMU\Gait Tracking With x-IMU\Quaternions\quaternRotate.m

     文件        354  2013-12-10 22:23  MIMU-ZUPT&约束&PDR\Gait Tracking With x-IMU\Gait Tracking With x-IMU\Quaternions\rotMat2euler.m

     文件       1300  2013-12-10 22:23  MIMU-ZUPT&约束&PDR\Gait Tracking With x-IMU\Gait Tracking With x-IMU\Quaternions\rotMat2quatern.m

     文件       2168  2013-12-10 22:23  MIMU-ZUPT&约束&PDR\Gait Tracking With x-IMU\Gait Tracking With x-IMU\Quaternions\Testscript.m

     文件       7337  2013-12-10 22:23  MIMU-ZUPT&约束&PDR\Gait Tracking With x-IMU\Gait Tracking With x-IMU\script.m

     文件       9270  2013-12-10 22:23  MIMU-ZUPT&约束&PDR\Gait Tracking With x-IMU\Gait Tracking With x-IMU\SixDofAnimation.m

     文件       3551  2013-12-10 22:23  MIMU-ZUPT&约束&PDR\Gait Tracking With x-IMU\Gait Tracking With x-IMU\ximu_matlab_library\ADXL345busDatabaseClass.m

     文件       2032  2013-12-10 22:23  MIMU-ZUPT&约束&PDR\Gait Tracking With x-IMU\Gait Tracking With x-IMU\ximu_matlab_library\AnalogueInputDatabaseClass.m

     文件       1858  2013-12-10 22:23  MIMU-ZUPT&约束&PDR\Gait Tracking With x-IMU\Gait Tracking With x-IMU\ximu_matlab_library\BatteryAndThermometerDatabaseClass.m

     文件        702  2013-12-10 22:23  MIMU-ZUPT&约束&PDR\Gait Tracking With x-IMU\Gait Tracking With x-IMU\ximu_matlab_library\CalADXL345busDataClass.m

     文件        704  2013-12-10 22:23  MIMU-ZUPT&约束&PDR\Gait Tracking With x-IMU\Gait Tracking With x-IMU\ximu_matlab_library\CalAnalogueInputDataClass.m

     文件        777  2013-12-10 22:23  MIMU-ZUPT&约束&PDR\Gait Tracking With x-IMU\Gait Tracking With x-IMU\ximu_matlab_library\CalBatteryAndThermometerDataClass.m

     文件        819  2013-12-10 22:23  MIMU-ZUPT&约束&PDR\Gait Tracking With x-IMU\Gait Tracking With x-IMU\ximu_matlab_library\CalInertialAndMagneticDataClass.m

     文件        477  2013-12-10 22:23  MIMU-ZUPT&约束&PDR\Gait Tracking With x-IMU\Gait Tracking With x-IMU\ximu_matlab_library\CommandDataClass.m

............此处省略145个文件信息

评论

共有 条评论