Behavioral model of MEMS gyro
Simscape / Electrical / Sensors & Transducers
The Gyro block implements a behavioral model of a MicroElectroMechanical Systems (MEMS) gyro. The gyro provides an output voltage that is proportional to the angular rotation rate presented at the mechanical rotational physical port R. The output voltage is limited according to the values that you provide for maximum and minimum output voltage.
Optionally, you can model sensor dynamics by setting the Dynamics
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.
Use the Variables section of the block interface to set the priority and initial target values for the block variables prior to simulation. For more information, see Set Priority and Initial Target for Block Variables.
The Measured angular rate variable target specifies the initial output for the sensor.
R— Translational port
Mechanical conserving port associated with the gyro translational port.
+— Positive port
Electrical conserving port associated with the gyro positive terminal.
-— Negative port
Electrical conserving port associated with the gyro negative terminal.
The change in output voltage level per unit change in rotation rate when the output is not being limited.
Output voltage for zero rotation— Output voltage for zero rotation
The output voltage from the sensor when the rotation rate is zero.
Maximum output voltage— Maximum output voltage
The maximum output voltage from the sensor, which determines the sensor maximum measured rotational rate.
Minimum output voltage— Minimum output voltage
The minimum output voltage from the sensor, which determines the sensor minimum measured rotational rate.
Dynamics— Dynamics modeling option
No dynamics — Suitable for HIL(default) |
Model sensor bandwidth
Select one of the following options for modeling sensor dynamics:
No dynamics — Suitable for
HIL — Do not model sensor dynamics. Use
this option when running your simulation fixed step or
generating code for hardware-in-the-loop testing, because this
avoids the need for a small simulation time step if the sensor
bandwidth is high. This is the default option.
Model sensor bandwidth —
Model sensor dynamics with a first-order lag approximation,
based on the Bandwidth parameter value. You
can control the initial condition for the lag by specifying the
Measured angular rate variable target.
Specifies the 3dB bandwidth for the measured rotational rate assuming a first-order time constant.
This parameter is visible only when you select
sensor bandwidth for the Dynamics