05-24-2012 09:18 PM
Is there a way to simulate with a PWM source?
It could be a voltage controled duty cycle at a preset frequency.
Thanks.
Solved! Go to Solution.
05-25-2012 08:14 AM - edited 05-25-2012 08:17 AM
Hello,
You can read this from our KB (knowledge database), it even has a sample to see how it works.
Link
http://digital.ni.com/public.nsf/allkb/EF391C48CF71AE4F862571B900644F84
EDIT: I forgot to add that depending on the version and type of multisim, there is an entire section for PWMs and other uses under the POWER family.
Cheers,
05-25-2012 01:28 PM
There are a number of ways to do this, all of which revolve around comparing a control signal to a triangular swithcing waveform. This is the basis for PWM generation.
In Multisim V12, to simply this popular task we added parameterizable components that do exactly this. Look under the Power/POWER_CONTROLLERS family.
05-28-2012 03:23 PM
The PWM block worked much better than using two sources and an ideal comparator, though they should have produced the same result.
Thanks.
05-30-2012 10:53 AM
dbur,
This might have something to do with the time step settings. If you let Multisim set TMAX automatically (default) and you are using a built in source, Multisim will take that into consideration and overestimate TMAX (such as with the case with a rapidly changing PWM signal, it will take into account the rise/fall time of the edges).
However with another source like a triangle or sinusoid and a comparator, Multisim will likely not overestimate on the TMAX to accurate represent the rise/fall time at the output of the comparator (the tool is not aware of the "comparator" from a SPICE model standpoint).
So for you to get equivalent results, you may have to set the TMAX manually (it defaults to 1E-5 when set to manually mode, but for accurately representing the falling/rising edge of a PWM signal you may want to go to 1E-8/1E-9 or smaller as the maximum time step (TMAX). There will be a direct correlation between simulation time, accuracy and TMAX (which for manually setting of TMAX, you will need to balance to get a sufficient simulation, yet in a timely fashion).
To configure from the menu in an interactive mode simulation, go to:
Simulate -> Set maximum timestep (TMAX) and then select (*) Maximum time step (TMAX):
;and set to a small enough value to capture the rising/falling edges of the PWM signal.
- Pat N
05-30-2012 07:27 PM
Yes, this is what I have learned as well. I did receive some result imporvements by tightening many of the simulator tolerances as well. I am assumming that causes the simulator to shorten the time steps further (and maybe other things) when signals are active in order to solve to smaller errors.