RC Servo
Radio control servomotor with PWM-based angular position tracking and fault modeling
Libraries:
Simscape /
Electrical /
Electromechanical /
Brushed Motors
Description
The RC Servo block represents a small DC motor with a gearbox and control circuitry, commonly used in quadcopters, radio-controlled planes and helicopters, and other mechatronic devices. RC servos provide angular position control of the output shaft over a limited angle range. The angle demand is set by the pulse width of a PWM signal applied to port s.
The RC Servo block models the following effects:
Torque-speed behavior based on DC motor equations
Position tracking based on the input PWM signal pulse width
Internal gear reduction ratio, including associated friction losses
Mechanical end stops, to prevent the output shaft being driven out of range by the load
Position measurement error
Fault modeling
The motor equations are the same as those used by the DC Motor block, except that the inductance is not modeled. The RC Servo block determines the equation parameters using the stall torque and no-load speeds, and makes a correction to take account of the backdrive torque.
Faults
The RC Servo block allows you to model several types of fault:
Fail off — No electrical torque.
Fail forward — Rotates in a positive direction to hit the upper end stop.
Fail reverse — Rotates in a negative direction to hit the lower end stop.
Failed winding — Torque is applied only if the motor rotor lines up with one of the two remaining functioning windings.
The block can trigger fault events:
At a specific time.
When a current limit is exceeded for longer than a specific time interval.
If you want to trigger a fault at a specific time, set the
Fault trigger parameter to Temporal
. If you
want to determine whether a system fails and, if so, when it fails, set the Fault
Trigger parameter to Behavioral
.
You can choose whether to issue an assertion when a fault occurs, by using the Reporting when a fault occurs parameter. The assertion can take the form of a warning or an error. By default, the block does not issue an assertion.
Variables
To set the priority and initial target values for the block variables prior to 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.
Nominal values provide a way 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 which is the Nominal Values section in the block dialog box or Property Inspector. For more information, see System Scaling by Nominal Values.
Assumptions and Limitations
This block has no optional thermal port.
If you simulate the model with a fixed-step solver, for example, using a local solver, the step size must be small enough to get the required resolution of the input pulse width. For fast desktop simulation, use this block with variable step solvers.