Accelerometer
Behavioral model of MEMS accelerometer
Libraries:
Simscape /
Electrical /
Sensors & Transducers
Description
The Accelerometer block implements a behavioral model
of a MicroElectroMechanical Systems (MEMS) accelerometer. For the default output type
Voltage level
, the accelerometer provides an output
voltage that is proportional to the acceleration rate presented at the mechanical
translational physical port R. The output voltage is limited according to the values
that you provide for maximum and minimum output voltage.
The block also has an alternative output type, PWM duty
cycle
. With this choice, the output of the block is a PWM signal with
a duty cycle that is proportional to the measured acceleration. You can limit the
variation in duty cycle to a specified range.
Optionally, you can model sensor dynamics by setting the Dynamics
parameter to Model sensor bandwidth
. Including dynamics adds
a first-order lag between the angular rate presented at port R and the corresponding
voltage applied to the electrical + and - ports.
If running your simulation with a fixed-step solver, or generating code for
hardware-in-the-loop testing, MathWorks recommends that you set the
Dynamics parameter to No dynamics —
Suitable for HIL
, because this avoids the need for a small simulation
time step if the sensor bandwidth is high.
Variables
To set the priority and initial target values for the block variables before simulation, use the Initial Targets section in the block dialog box or Property Inspector. For more information, see Set Priority and Initial Target for Block Variables.
Use nominal values to specify the expected magnitude of a variable in a model. Using system scaling based on nominal values increases the simulation robustness. Nominal values can come from different sources. One of these sources is the Nominal Values section in the block dialog box or Property Inspector. For more information, see System Scaling by Nominal Values.
The Measured acceleration variable target specifies the initial output for the sensor.
Ports
Conserving
Parameters
Extended Capabilities
Version History
Introduced in R2012b