Engee documentation

Accelerometer

Dynamic model of MEMS accelerometer.

blockType: AcausalElectricPowerSystems.Sensors.Accelerometer

Path in the library:

/Physical Modeling/Electrical/Sensors & Transducers/Accelerometer

Description

Block Accelerometer implements a dynamic accelerometer model of microelectromechanical systems (MEMS). When set by default for the parameter Output type meaning Voltage level The accelerometer outputs an output voltage proportional to the amount of acceleration transmitted through the non-directional port R. The output voltage is limited by the maximum and minimum output voltage values you set.

The block also has an alternative parameter value Output typePWM duty cycle. When this value is selected, the output signal of the unit is a PWM signal with a fill factor proportional to the measured acceleration. The change in the fill factor can be limited to a specified range.

If desired, you can simulate the dynamics of the sensor by setting the parameter Dynamics value Model sensor bandwidth. Turning on the speaker adds a first-order delay between the angular velocity displayed on the R port and the corresponding voltage applied to the + and ports.

When starting a simulation using a fixed-step solver or when generating code for software and technical testing, it is recommended to set the parameter Dynamics value No dynamics - Situable for HIL because this avoids the need to use a small step in the simulation time at high sensor throughput.

Ports

Conserving

# R — the transfer port
mechanics

Details

A non-directional port connected to the translational port of the accelerometer.

Program usage name

translational_flange

# + — positive port
electricity

Details

A non-directional port connected to the positive terminal of the accelerometer.

Program usage name

p

# — negative port
electricity

Details

A non-directional port connected to the negative terminal of the accelerometer.

Program usage name

n

Parameters

Parameters

# Output type — type of output value
Voltage level | PWM duty cycle

Details

Select one of the following options to determine the type of output value:

  • Voltage level — the amplitude of the output voltage is proportional to the measured acceleration. This value is set by default.

  • PWM duty cycle — the fill factor (turn-on time divided by the total pulse duration) is proportional to the measured acceleration.

Values

Voltage level | PWM duty cycle

Default value

Voltage level

Program usage name

output_type

Evaluatable

Yes

# Sensitivity — sensitivity
mV/gn

Details

The change in the output voltage level per unit of acceleration change in the absence of output signal limitation.

Dependencies

To use this parameter, set for the parameter Output type meaning Voltage level.

Units

mV/gn

Default value

1000.0 mV/gn

Program usage name

sensitivity

Evaluatable

Yes

# Output voltage for zero acceleration — output voltage at zero acceleration
V | uV | mV | kV | MV

Details

The output voltage of the sensor at zero acceleration.

Dependencies

To use this parameter, set for the parameter Output type meaning Voltage level.

Units

V | uV | mV | kV | MV

Default value

2.5 V

Program usage name

V_zero

Evaluatable

Yes

# Maximum output voltage — Maximum output voltage
V | uV | mV | kV | MV

Details

The maximum output voltage of the sensor, which determines the maximum positive acceleration measured by the sensor.

Dependencies

To use this parameter, set for the parameter Output type meaning Voltage level.

Units

V | uV | mV | kV | MV

Default value

4.0 V

Program usage name

V_max

Evaluatable

Yes

# Minimum output voltage — minimum output voltage
V | uV | mV | kV | MV

Details

The minimum output voltage of the sensor, which determines the maximum negative acceleration measured by the sensor. The default value is 1 V.

Dependencies

To use this parameter, set for the parameter Output type meaning Voltage level.

Units

V | uV | mV | kV | MV

Default value

1.0 V

Program usage name

V_min

Evaluatable

Yes

# Dynamics — dynamics
No dynamics - Situable for HIL | Model sensor bandwidth

Details

Select one of the following options for modeling sensor dynamics:

  • No dynamics - Situable for HIL — do not simulate the dynamics of the sensor. Use this value when running a fixed-step simulation or when generating code for software and hardware testing, as this avoids the need for a small simulation step with high sensor throughput. This value is used by default.

  • Model sensor bandwidth — simulate sensor dynamics using a first-order delay approximation based on the parameter value Bandwidth. You can control the initial delay condition by specifying the target value of the variable Measured acceleration.

Values

No dynamics - Situable for HIL | Model sensor bandwidth

Default value

No dynamics - Situable for HIL

Program usage name

dynamics_model

Evaluatable

Yes

# Bandwidth — bandwidth
Hz | kHz | MHz | GHz

Details

Defines the bandwidth by level 3 dB for the measured acceleration, assuming a first-order time constant.

Dependencies

To use this parameter, set for the parameter Dynamics meaning Model sensor bandwidth.

Units

Hz | kHz | MHz | GHz

Default value

3.0 kHz

Program usage name

bandwidth

Evaluatable

Yes

# Duty cycle sensitivity (percent per unit acceleration) — sensitivity of the fill factor
1/gn | s^2/m | s^2/cm | s^2/ft | s^2/in | s^2/km | s^2/mi | s^2/mm

Details

Change of the fill factor per acceleration unit. The fill factor is expressed as a percentage of the PWM period.

Dependencies

To use this parameter, set for the parameter Output type meaning PWM duty cycle.

Units

1/gn | s^2/m | s^2/cm | s^2/ft | s^2/in | s^2/km | s^2/mi | s^2/mm

Default value

10.0 1/gn

Program usage name

duty_cycle_sensitivity

Evaluatable

Yes

# Duty cycle for zero acceleration (percent) — fill factor at zero acceleration

Details

The fill factor output by the sensor at zero acceleration.

Dependencies

To use this parameter, set for the parameter Output type meaning PWM duty cycle.

Default value

50.0

Program usage name

zero_acceleration_duty_cycle

Evaluatable

Yes

# Maximum duty cycle (percent) — maximum fill factor

Details

The maximum fill factor output by the sensor. Increasing acceleration above this value does not result in an increase in the fill factor.

Dependencies

To use this parameter, set for the parameter Output type meaning PWM duty cycle.

Default value

75.0

Program usage name

max_duty_cycle

Evaluatable

Yes

# Minimum duty cycle (percent) — minimum fill factor

Details

The minimum fill factor output by the sensor. Reducing acceleration below this value does not result in a decrease in the fill factor.

Dependencies

To use this parameter, set for the parameter Output type meaning PWM duty cycle.

Default value

25.0

Program usage name

min_duty_cycle

Evaluatable

Yes

# PWM frequency — PWM frequency
Hz | kHz | MHz | GHz

Details

The frequency of the output pulse sequence.

Dependencies

To use this parameter, set for the parameter Output type meaning PWM duty cycle.

Units

Hz | kHz | MHz | GHz

Default value

1000.0 Hz

Program usage name

f_pwm

Evaluatable

Yes

# Output voltage amplitude — the amplitude of the output voltage
V | uV | mV | kV | MV

Details

The amplitude of the sequence of output pulses at high frequency.

Dependencies

To use this parameter, set for the parameter Output type meaning PWM duty cycle.

Units

V | uV | mV | kV | MV

Default value

5.0 V

Program usage name

V_output

Evaluatable

Yes