| Products & Services | Solutions | Academia | Support | User Community | Company |
| Download Product Updates | | | Get Pricing | | | Trial Software |
| Documentation → SimElectronics |
| Contents | Index |
| Learn more about SimElectronics |
Actuators & Drivers

The Controlled PWM Voltage block represents a pulse-width modulated (PWM) voltage source that depends on the reference voltage Vref across its +ref and -ref ports. The duty cycle is
![]()
where:
Vmin is the minimum reference voltage
Vmax is the maximum reference voltage
The value of the Output voltage amplitude parameter determines amplitude of the output voltage.
At time zero, the pulse is initialized as high, unless the duty cycle is set to zero.
The model is based on the following assumptions:
The REF output of this block is floating, i.e. it is not tied to the Electrical Reference. One consequence of this is that if you connect the PWM and REF electrical ports directly to the H-Bridge PWM and REF electrical ports, you must attach an Electrical Reference block to the REF connection line.
Do not use the Controlled PWM block to drive a motor block directly. A PWM motor driver goes open circuit in between pulses. Use the H-Bridge block to drive a motor block.
When driving a motor via the H-Bridge block, set the Simulation mode parameter to Averaged to speed up simulations. You must also set the Simulation mode parameter of the H-Bridge block to Averaged mode. This applies the average of the demanded PWM voltage to the motor. The Averaged mode assumes that the impedance of the motor inductive term is small at the PWM frequency. To verify this assumption, run the simulation using the PWM mode and compare the results to those obtained from using the Averaged mode.
If you are linearizing your model, set the Simulation mode parameter to Averaged and ensure that you have specified the operating point of the block correctly. You can only linearize the block for inputs corresponding to a duty cycle greater than zero and less than 100 percent.

Frequency of the PWM output signal. The default value is 1000 Hz.
Value of the input voltage at which the PWM signal has a 0% duty cycle. The default value is 0 V.
Value of the input voltage at which the PWM signal has a 100% duty cycle. The default value is 5 V.
Amplitude of the PWM signal when the output is high. The default value is 5 V.
The type of output voltage can be PWM or Averaged. The default mode, PWM, produces a pulse-width modulated signal. In Averaged mode, the output is a constant whose value is equal to the average value of the PWM signal.
The block has the following ports:
Positive electrical reference voltage.
Negative electrical reference voltage.
Pulse-width modulated signal.
Floating zero volt reference.
See the Linear Electrical Actuator (System-Level Model) and Linear Electrical Actuator (Implementation Model) demos.
![]() | Comparator | Crystal | ![]() |

Learn more about Simulink through this collection of videos, articles, technical literature and the Getting Started with Simulink Guide.
| © 1984-2009- The MathWorks, Inc. - Site Help - Patents - Trademarks - Privacy Policy - Preventing Piracy - RSS |