| 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.
Set the Simulation mode parameter to Averaged to speed up simulations when driving a motor via the H-Bridge block. 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.

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.
![]() | Band-Limited Op-Amp | DC Current Source | ![]() |
| © 1984-2008- The MathWorks, Inc. - Site Help - Patents - Trademarks - Privacy Policy - Preventing Piracy - RSS |