Main Content

LSM9DS1 IMU Sensor

Measure linear acceleration, angular rate and magnetic field along X, Y, and Z axes

Add-On Required: This feature requires the Simulink Support Package for Raspberry Pi Hardware add-on.

  • LSM9DS1 IMU Sensor block

Libraries:
Simulink Support Package for Raspberry Pi Hardware / Sense HAT

Description

Measure the linear acceleration, angular rate, and magnetic field using the 9–DoF IMU (Inertial Measurement Unit) sensor on board Raspberry Pi® SenseHAT.

The IMU sensor (LSM9DS1) comprises accelerometer, gyroscope, and a magnetometer. Using this block, you can measure the inertial motion of the Raspberry Pi on top of which the SenseHAT is connected.

Choose the desired active sensor(s) to measure angular velocity, acceleration, magnetic field, or a combination of these measurements.

The block outputs acceleration as [1x3] vector values of double data type in ‘g’ (9.8 m/s^2), angular rate as [1x3] vector values of double data type in ‘degrees per second’ (dps), and magnetic field as [1x3] vector values of double data type in micro Tesla (µT).

You can optionally apply specific advanced settings to customize the sensor behavior according to your needs.

The axis information of the IMU sensor on SenseHAT is as shown.

Ports

Output

expand all

The angular velocity as a [1x3] vector. Each value represents the measurement of the angular velocity in degrees per second (dps) along the X, Y, and Z axes.

Data Types: double

The block outputs the acceleration as a [1x3] vector. Each value represents the measurement of the acceleration in g (9.8 m/s2) along the X, Y, and Z axes.

Data Types: double

The block outputs the magnetic field as a [1x3] vector. Each value represents the measurement of the magnetic field in micro Tesla(μT) along the X, Y, and Z axes.

Parameters

expand all

Click this button to view the X, Y, and Z axis of the LSM9DS1 IMU Sensor with respect to SenseHAT.

Select the Raspberry Pi hardware to which the SenseHAT is connected.

Select active sensors to measure angular velocity, acceleration, magnetic field, or a combination of these measurements as per your requirements.

Each active sensor is provided with a set of parameters under the Advanced settings that you can configure to obtain the required behavior.

Select the rate at which you want the Accelerometer to measure the acceleration.

Select the required sensitivity for measurement of acceleration. The upper and the lower limits of what the sensor can measure. In general, for all the sensors, you get a more precise measurement out of a sensor with a low full-scale range.

Set the bandwidth for the low-pass filter associated with measurement of acceleration. Refer to the LSM9DS1 data sheet for further information.

Select the rate at which you want the Gyroscope to measure the angular velocity.

Select the required sensitivity for measurement of angular velocity. The upper and the lower limits of what the sensor can measure. In general, for all the sensors, you get a more precise measurement out of a sensor with a low full-scale range.

Select the desired bandwidth mode to set the cut-off frequency for the low-pass filter associated with the Gyroscope. Refer to the table for the information about the cut-off frequencies.

Refer to the LSM9DS1 data sheet for further information.

Select this check box to enable the high pass filter for Gyroscope operation.

Select the High pass filter mode to set the desired cut-off frequencies for the high pass filter. Refer the table given to select the desired cut-off frequency.

Refer to the LSM9DS1 data sheet for further information.

Select the required sensitivity for measurement of magnetic field. The upper and the lower limits of what the sensor can measure. In general, for all the sensors, you get a more precise measurement out of a sensor with a low full-scale range.

Select the rate at which you want the Magnetometer to measure the magnetic field.

Specify how often this block reads the data from the active sensors.

Version History

Introduced in R2017a