Engee documentation

RC Servo

A radio-controlled actuator motor (servomotor) with angular position tracking based on PWM.

blockType: AcausalElectricPowerSystems.Electromechanical.Brushed.RCServomotor

Path in the library:

/Physical Modeling/Electrical/Electromechanical/Brushed Motors/RC Servo

Description

Block RC Servo It is a small DC motor with a gearbox and a control circuit, widely used in quadrocopters, radio-controlled airplanes and helicopters, as well as other mechatronic devices. Blocks RC Servo they provide control of the angular position of the output shaft in a limited range. The required angle is set by the pulse duration of the PWM signal applied to the S port.

Block RC Servo simulates the following effects:

  • the dependence of torque on speed based on the equations of a DC motor;

  • position tracking based on the pulse duration of the input PWM signal;

  • the internal gear ratio of the gearbox, including the corresponding friction losses;

  • mechanical end stops to prevent the output shaft from going out of range under load;

  • position measurement error.

The engine equations are similar to those given in the description of the unit. Permanent Magnet DC Motor except that the inductance is not modeled. Block RC Servo determines the parameters of the equation using the starting torque and the idling speed, and also makes adjustments to account for the reverse torque.

Assumptions and limitations

  • This unit does not have an additional thermal port.

  • If you are modeling a model using a fixed-step solver, such as a local solver, the step size must be small enough to obtain the required resolution of the input pulse width. For fast desktop modeling, use this block with variable-pitch solvers.

Ports

Conserving

# S — shaft control
electricity

Details

An undirected port connected to the PWM control signal. The set rotation angle of the output shaft is determined by the duration of the voltage pulse applied to this port.

Program usage name

signal_pin

# + — positive terminal
electricity

Details

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

Program usage name

p

# — negative terminal
electricity

Details

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

Program usage name

n

# R — the rotor
rotational mechanics

Details

A non-directional port connected to the rotor.

Program usage name

rod_flange

# C — body
rotational mechanics

Details

A non-directional port connected to the stator (housing).

Program usage name

case_flange

Parameters

Electrical Torque

# Stall torque — maximum torque under load
kg*cm

Details

The maximum torque at load, which the unit RC Servo it can develop without stopping.

Units

kg*cm

Default value

2.4 kg*cm

Program usage name

T_stall

Evaluatable

Yes

# Time to travel 60 degrees (no load) — the time of rotation of the output shaft by 60 degrees
s | ns | us | ms | min | hr | d

Details

The time of rotation of the output shaft by 60 degrees when the engine is running without load.

Units

s | ns | us | ms | min | hr | d

Default value

0.28 s

Program usage name

time_to_travel_60_deg

Evaluatable

Yes

# Corresponding nominal voltage — DC power supply voltage
V | uV | mV | kV | MV

Details

The DC supply voltage used for measuring the starting torque and turning time on 60 degrees.

Units

V | uV | mV | kV | MV

Default value

4.8 V

Program usage name

V_nominal

Evaluatable

Yes

# Rotational range — angular range of the output shaft
rad | deg | rev | mrad | arcsec | arcmin | gon

Details

The angular range of the output shaft of the unit RC Servo.

Units

rad | deg | rev | mrad | arcsec | arcmin | gon

Default value

[0.0, 180.0] deg

Program usage name

phi_range_vector

Evaluatable

Yes

# Corresponding pulse widths — range of input pulse durations
s | ns | us | ms | min | hr | d

Details

The input pulse durations correspond to the minimum and maximum output angles determined by the parameter Rotational range. Pulse durations outside this range are cut off by the unit in order to stay within this range.

Units

s | ns | us | ms | min | hr | d

Default value

[550.0, 2330.0] us

Program usage name

pulse_width_range_vector

Evaluatable

Yes

Control

# Pulse threshold — threshold voltage for pulse control
V | uV | mV | kV | MV

Details

Threshold voltage for pulse control. The input pulse is defined as high if the voltage between ports S and exceeds this level.

Units

V | uV | mV | kV | MV

Default value

3.0 V

Program usage name

V_threshold

Evaluatable

Yes

# Signal input resistance — The impedance
Ohm | mOhm | kOhm | MOhm | GOhm

Details

The electrical impedance measured between ports S and .

Units

Ohm | mOhm | kOhm | MOhm | GOhm

Default value

18.0 kOhm

Program usage name

R_signal

Evaluatable

Yes

# Angle resolution — the minimum allowable error between the required and measured angle of rotation of the output shaft
rad | deg | rev | mrad | arcsec | arcmin | gon

Details

The minimum allowable error between the required and measured angle of rotation of the output shaft. When the error between the required and the measured angle of rotation of the output shaft becomes less than the angle resolution, the motor shuts down. This parameter simulates hysteresis, usually built into a radio-controlled servo control device to prevent vibration near a preset value.

Units

rad | deg | rev | mrad | arcsec | arcmin | gon

Default value

0.1 deg

Program usage name

phi_resolution

Evaluatable

Yes

# Angle measurement error — the model’s error in measuring the angle
rad | deg | rev | mrad | arcsec | arcmin | gon

Details

The error of the model when measuring the angle. This parameter allows you to simulate the error in measuring the angle, which may occur, for example, due to a malfunction of the sensor of the rotation angle of the potentiometer. For example, if you want to simulate the operation of the motor when power is applied to one of the stops, you can set a suitable angle measurement error.

Units

rad | deg | rev | mrad | arcsec | arcmin | gon

Default value

0.0 deg

Program usage name

phi_measurement_error

Evaluatable

Yes

Mechanical

# Backdrive torque (unpowered) — the load torque required to reverse the motor without power
kg*cm

Details

The load torque required to reverse the motor without power. The unit uses this value to determine the friction parameters in the gears.

Units

kg*cm

Default value

0.5 kg*cm

Program usage name

T_backdrive

Evaluatable

Yes

# Gear reduction ratio — approximate gear ratio between the motor shaft and the output shaft of the unit RC Servo

Details

The gear ratio between the shaft of the DC motor and the output shaft of the unit RC Servo. This parameter only affects the effect of rotor inertia on the equivalent inertia value on the output shaft. It does not affect the idle speed. Therefore, its value does not have to be accurate.

Default value

320.0

Program usage name

ratio

Evaluatable

Yes

# Rotor inertia — inertia of the DC motor and the gear transmission of the rotor
kg*m^2 | g*m^2 | kg*cm^2 | g*cm^2 | lbm*in^2 | lbm*ft^2 | slug*in^2 | slug*ft^2

Details

The inertia of the DC motor plus the inertia of the gear train reflected from the rotor (usually small if the gears are plastic).

Units

kg*m^2 | g*m^2 | kg*cm^2 | g*cm^2 | lbm*in^2 | lbm*ft^2 | slug*in^2 | slug*ft^2

Default value

0.01 g*cm^2

Program usage name

J

Evaluatable

Yes

# End-stop angles — range of mechanical angles
rad | deg | rev | mrad | arcsec | arcmin | gon

Details

Mechanical end stops prevent the output shaft from rotating beyond the set range. The range set by the angles of the end stops must be greater than the range set by the parameter Rotational range.

Units

rad | deg | rev | mrad | arcsec | arcmin | gon

Default value

[-5.0, 185.0] deg

Program usage name

phi_hard_stop_vector

Evaluatable

Yes

# End-stop stiffness — rigidity of mechanical end stops
N*m/rad | mN*m/rad | kN*m/rad | kgf*m/rad | lbf*ft/rad | N*m/deg | mN*m/deg | kN*m/deg | kgf*m/deg | lbf*ft/deg | W*s/rad | HP_DIN/rpm | HP_DIN*s/rad

Details

Rigidity of mechanical end stops.

Units

N*m/rad | mN*m/rad | kN*m/rad | kgf*m/rad | lbf*ft/rad | N*m/deg | mN*m/deg | kN*m/deg | kgf*m/deg | lbf*ft/deg | W*s/rad | HP_DIN/rpm | HP_DIN*s/rad

Default value

1.0e6 N*m/rad

Program usage name

k_hard_stop

Evaluatable

Yes

# End-stop damping — damping of mechanical end stops
N*m/(rad/s) | ft*lbf/(rad/s)

Details

Damping of mechanical end stops.

Units

N*m/(rad/s) | ft*lbf/(rad/s)

Default value

0.01 N*m/(rad/s)

Program usage name

C_hard_stop

Evaluatable

Yes