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
To model a fault in the RC Servo block, in the Faults section, click the Add fault hyperlink next to the fault that you want to model. In the Add Fault window, specify the fault properties. For more information about fault modeling, see Fault Behavior Modeling and Fault Triggering.
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, in the
Fault Inspector window, set Trigger type to
Timed
. If you want to determine whether a system fails and, if
so, when it fails, in the Fault Inspector window, set Trigger
type to Behavioral
.
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.
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.