Multisim and Ultiboard

cancel
Showing results for 
Search instead for 
Did you mean: 

Problem in cosimulation

I am using a vi in which am giving sine wave as input and the output is rectified waveform. Am getting output for the fs value 999 and not for 1000. can any one clear this? i have attached the vi and multisim design for reference.

 

When ever i change the fs value to 1000 output goes constant.

Download All
0 Kudos
Message 1 of 2
(4,600 Views)

Hi jega28,

 

My recommendation is to view the simulation loop from a point-by-point perspective. With every iteration of the simulation loop, a time step is taken, an internal "simulation time" variable is updated, and new inputs (scalars, not vectors) are passed into the models, including the Multisim model. In your case, one of these inputs goes to Multisim. It should be the updated sinusoidal value according to the general formula Asin(2pi*f*TIME), where TIME is the simulation time. 

 

But the way you set up the simulation, the simulation loop has no knowledge of your sinusoid generation. In fact, with every simulation iteration, you are simply producing a vector of points; the simulation loop doesn't know where to take a sample which should be passed to the rectifer model in Multisim.

 

In the LabVIEW, under Control Design & Simulation - >Simulation - >Signal Generation, you will find a variety of special elements which the simulation loop knows about! You should use the Sine Signal generator instead of the waveform generator method your were using. This is shown in the attached file. 

 

Note that in the simulation loop environment, sampling is done automatically by the simulator, which is configured through the little simulation loop symbol attached to the top left corner of the loop. So, if you are simulating sinusoids with 1kHz, you may want to set the Maximum Time Step size to something like 100e-6s, which would sample at no less than 10 times per period.

 

Hope that helps.

Max
National Instruments
0 Kudos
Message 2 of 2
(4,563 Views)