loading

Hi,

Most of us are familiar with performing power electronics circuits simulation using Matlab, PSpice, PSim etc., In this article we will see how to perform the same power electronics simulation using NI Multisim and how to perform the co-simulation using NI LabVIEW.

Two major features of performing simulation using Multisim and LabVIEW are:

1. Dynamically varying simulation parameters during run time.

2. A graphical interface development for simulation.

We will take the example of a simple H bridge inverter producing two level output.

You need to have the following softwares.

1. NI LabVIEW 2014

2. NI Multisim 2014

3. Control and Simulation package 2014.

The good thing with National Instruments is that you can get a free 6 month student version to work on with the software!

Step 1: The Multisim Home Screen

On opening the multisim software, the first thing you get is the home screen as shown in the figure. Just have a look at all the icons which are more less same as that of other simulation software.

Step 2: Select Component Icon

Go to the "Place" menu and click on the "Component" to start adding components to the simulation. Alternatively, the short cut key is "Ctrl+W". The default window opens up as shown in the screenshot.

Start searching the components required for the simulation. The list of components needs are:
1. DC_Power

2. Transistor_Diode

3. Digital_Clock

4. Non_Ideal_Resistor

5. Ground

Make sure that you type the exact name as shown above.

Step 3: Placing the Components.

Start placing the components one by one. Place all the components.

Step 4: The Sketch of Inverter

Now copy and paste the "Transistor_diode" and "Digital_Clock" with required numbers for the inverter. Complete the connection of a H bridge as shown in the screenshot.

Step 5: Frequency Setting

We need to change the frequency to 50 Hz as we are considering to operate the inverter at 50 Hz. Set the

frequency to 50 Hz for all the Digital_Clock. The delay will be 0 for U1 Digital_Clock and U2 Digital_Clock.

Since the total time period is 1/50 Hz = 0.02 Sec, for a two level inverter the switches in a leg are phase

shifted by 0.01 sec.

Step 6: Delay Time Setting

We need to change the delay time to 0.01 sec for the U3 Digital_Clock and U4 Digital_Clock.

Step 7: The Oscilloscope

Move the cursor to right side of the screen where there are a list of icons used for measurement. Select the oscilloscope which is the 4th from top. Place the oscilloscope and connect the oscilloscope across the resistor as shown in the screenshot.

Step 8: Save, Run the Simulation and Observe the Output

The most important part of our simulation:-) Save it!.

To run the simulation, go to the "Simulate" menu and click on "Run" icon. Alternatively you can also use the shortcut key F5.

The simulation is running and we can see the output in the oscilloscope.

Please find the attachment containing the inverter file.

Step 9: Co-Simulation Explained

The simulation performed in Multisim does not provide the option to vary the circuit parameters like input voltage while it is running. This is where co-simulation is useful.

Co-simulation is nothing but linking the Multisim and LabVIEW environment to make the whole simulation dynamic. The concept of co-simulation is that all the circuit components like diodes, MOSFET, resistors are provided by the Multisim software while the control algorithm such as PI controller, closed loop controller are performed by the LabVIEW. I hope you got the point!

The existing multisim inverter file needs to be modified to perform the co-simulation which will follow now.

Step 10: Modify the Multisim Simulation

We will consider the input voltage to be variable and output voltage in graph in LabVIEW to perform co-simulation.

Delete the DC_Power in Multisim and replace it with "Voltage_Controlled_Voltage_Source".

Connect the ground connection as shown.

Step 11: The "Hierarchical Connector" Arrives

The block that performs the exchange of data between Multisim and LabVIEW is the "Hierarchical Connector". Go to "Place", then "Connectors" and "Hierarchical Connector". You can use the short cut "Ctrl+I" also.

Since we are using input voltage source and output voltage across resistor as parameters for co-simulation, we need multiple Hierarchical connectors. See the pictures for connections. We use three hierarchical connectors, one at the input and two across the resistors. Complete the connections as shown in the picture.

Step 12: Setting Up the Hierarchical Connectors

As the connections are over now, we move on to setup the connectors. We need to rename it suitably. The direction of the hierarchical connector needs to be defined as input or output. The Voltage_Controlled_Voltage_Source is input type while the other two connectors are output type. Please refer to the pictures.

Step 13: Additional Settings for Voltage Measurement

We need to specify that the VNeg hierarchical connector is the negative terminal of the VPos connector. Go to "View", then "LabVIEW Co-Simulation Terminals". A Window will open. In the Output section in the window we need to mention that VNeg terminal is the negative connection of VPos. You need to select the VNeg in the Negative connection column of VPos row. After setting up you can save and close the file. Make sure you remember the path of the file saved. I prefer to save it on desktop.

Step 14: LabVIEW Begins!

Now that the work with Multisim is over, it is time for LabVIEW. Open the LabVIEW and you will find the home screen flashing. Open a new VI from the File menu.

Step 15: Control and Simulation Loop

Before performing the task it is a good idea to split the Front Panel and Block Diagram into two halves on the screen. Go to "Window" menu and click on "Tile Left and Right". This will split the Front Panel and Block Diagram into two halves. Now move your cursor to Block Diagram and right click to get the list of pallets. Go to "Control and Simulation", then "Simulation" and click on the "Control and Simulation Loop". Drag it to a larger size while placing on the Block Diagram.

Step 16: Importing Multisim Design File

We need to import the Multisim design file into the Control and Simulation Loop. Again go to the pallets in the Block Diagram via the path "Control and Simulation", then "Simulation", then "External Models" and "Multisim Design". It will then ask for the file path. Hope you remember the path. Choose the path and click Ok. You will notice the Hierarchical Connectors names shown in the Multisim design imported.

Step 17: Numeric Control for Voltage Input

Now move your cursor over the Front Panel and right click to open the pallets. Go to "Silver", then "Numeric" and "Numeric Control" as shown in the figure. This is where we will be entering our input voltage. Complete the connection in Block Diagram as well.

Step 18: Output Graph and Halt Simulation

The input is over and now we need to add a graph at output and a Halt simulation feature. Open the pallets in Block Diagram. Go to "Control and Simulation", then "Simulation", then "Graph Utilities" and select "SimTime Waveform". Again follow the same path till "Simulation" and go to "Utilities" and select "Halt Simulation". Make sure that you place all the blocks inside the loop and complete the connections as shown in the pictures.

Step 19: Configure Simulation Parameters

We need to mention the simulation parameters now. Double left click on the small box on top left of the control and simulation loop to open the simulation parameters settings. You need to change the "Final Time" to "inf", "Initial Step Size" to "1E-5", "Minimum Step Size" to "1E-9" and "Maximum Step Size" to "1E-5". Refer to the pictures.

Step 20: Clean Up the Block Diagram

This step is optional, however I strongly recommend to perform. When going for much more blocks and connections in the Block Diagram, it looks messed up. To rearrange the blocks, click on the "Clean Up Diagram" icon in the top side list of icons, one with a broomstick symbol. Things will look better now.

Step 21: Re Sizing in Front Panel and Saving

Now that the work in Block Diagram is over, Full screen the Front Panel and increase the size of the graph. Change the x axis limit of the graph as shown to 0.05. Save the file. Rearrange the icons as shown in the pictures. Enter the input voltage as 12.

Step 22: RUN IT!

Now finally we come to climax of this long movie! Click on the "Run" icon and see the simulation running. You can change the input voltage while it is running and see the corresponding changes in the graph. I hope you got it there too. Congrats!!

Step 23: Final Multisim and LabVIEW Attachments

<p>Good info, thank you for sharing!</p>
<p>Thanks!</p>
<p>Dear friend</p><p>I managed<br>to achieve the three-phase PWM inverter under labview</p>
<p>Dear friend</p><p>I managed<br>to achieve the three-phase PWM inverter under labview</p>
<p>Dear friend</p><p>I managed<br>to achieve the three-phase PWM inverter under labview</p>
<p>can i ask about the THD....do u have any example regarding the THD..do i need to make inverter using labview b4 calculate the THD...</p>
<p>Hi ZaimR,</p><p>I am also struggling to find an example to find the THD in labview since the simulation time is too slow for the THD block to calculate. However it is possible in multisim. Your attachment are nice. Some insight I an get.</p><p>Thanks.</p>
<p>hello...can i ask about the THD...do u hv any example...i got an example from NI..but little bit confusing...to calculate the THD we need an inverter..am i right..??but..can i just use the example .vi in this forum (someone attach here)..such as 2 signal(sine and tri) but no inverter..just have switching or indicator..to get the THD..i attach the NI example..and one more thing..i cant use the co-simulation..u know why..or is it i need to connect to myRIO first to use the co_sim block..thank q</p>
<p>hello...can i ask about the THD...do u hv any example...i got an example from NI..but little bit confusing...to calculate the THD we need an inverter..am i right..??but..can i just use the example .vi in this forum (someone attach here)..such as 2 signal(sine and tri) but no inverter..just have switching or indicator..to get the THD..i attach the NI example..and one more thing..i cant use the co-simulation..u know why..or is it i need to connect to myRIO first to use the co_sim block..thank q</p>
<p>Hi my teacher </p><p>I hope you are in good health</p><p> Here another converter it is a 3 -phase PWM rectifying </p><p>Please a little checking on your part </p><p>Best regards</p>
<p>Try this one. I am not able to understand much from the simulation you attached. </p>
<p>Hi my teacher </p><p>I hope you are in good health</p><p> Here another converter it is a 3 -phase PWM rectifying </p><p>Please a little checking on your part </p><p>Best regards</p>
<p>Good jobs thanks</p>
<p>Try this one..</p>
<p>Thanks a lot!</p>
<p>thank you for<br>your reply</p>
<p>thank you for<br>your reply</p>I attach the circuit on your projectH Bridge Inverter Simulation Using NI Multisim and Co-simulation Using<br>NI LabVIEWbecause I can not seem to attach to the messagePLZ help me
<p>thank you for<br>your reply</p>I attach the circuit on your projectH Bridge Inverter Simulation Using NI Multisim and Co-simulation Using<br>NI LabVIEW because I can not seem to attach to the messagePLZ help me
<p>thank you for<br>your reply</p>I attach the circuit on your projectH Bridge Inverter Simulation Using NI Multisim and Co-simulation Using<br>NI LabVIEW<pre>because I can not seem to attach to the message</pre>PLZ help me
<p>thank you for<br>your reply</p>I attach the circuit on your projectH Bridge Inverter Simulation Using NI Multisim and Co-simulation Using<br>NI LabVIEW<pre>because I can not seem to attach to the message</pre>PLZ help me
<p>thank you for your reply<br>you find the circuit PLZ help me</p>
<p>thank you for your reply<br>you find the circuit PLZ help me</p>
<p>thank you for your reply<br>you find the circuit PLZ help me</p>
<p>thank you for your reply<br>you find the circuit here</p>
<p>thank you for your reply<br>you find the circuit here</p>
<p>thank you for your reply<br>you find the circuit here</p>
<p>thank you for your reply<br>you find the circuit here</p>
<p>thank you for your reply<br>you find the circuit here</p>

About This Instructable

1,873views

0favorites

License:

Bio: Hi, I am Rakesh. I am currently pursuing PhD in electrical engineering from VIT University, India. I like to share knowledge and other stuffs which ... More »
More by A Rakesh Kumar:H Bridge Inverter Simulation using NI Multisim and Co-simulation using NI LabVIEW 
Add instructable to: