LabVIEW Multisim Tutorial

Embed Size (px)

DESCRIPTION

Tutorial sobre la integración del ambiente de diseño, captura y simulación Multisim con el entorno de programación gráfica de LabVIEW.

Citation preview

  • 1/8 www.ni.com

    1. 2. 3. 4. 5. 6. 7.

    1. 2. 3.

    Flight and Camera Electronics for a Satellite System - A NI Multisim National Lab ApplicationPublish Date: Oct 06, 2013

    Table of Contents

    ProductsThe Design ApplicationThe ChallengeThe SolutionImproving the Productivity Platform with the LabVIEW Multisim API ToolkitAutomated Validation using Multisim and LabVIEWAutomating Validation

    1. Products

    NI Multisim, NI LabVIEW and PXIOne of the great hurdles in the modern design flow is the inability to effectively prototype a design and compare its behavioralmeasurements to the initial design specifications. This barrier to effective design is detrimental to engineers who want to be able toquickly verify and validate their prototypes with simulated behavior. The integration between the Multisim capture and simulation environment, and the LabVIEW graphical programming language,provides a streamlined and integrated path for measurements to flow through the design flow. This improves the productivity ofengineers. 2. The Design Application

    This real-world application, involved the design of flight and optical electronics for satellite systems. Due to the advanced nature ofthis design, design accuracy was paramount, and as such the simulation of this application needed to mirror real-world elementsas closely as possible. 3. The Challenge

    This R&D laboratory was responsible for the rapid design and validation of flight and camera electronics for a satellite system.Since this system would not only be airborne, but also orbiting various objects in space, it was important that initial designspecifications be met for every element of the satellite system. Due to the nature of the environment in which the satellite would beoperating (space), advanced analysis was necessary to validate the performance of the design.The engineers needed to be able to quickly verify their design decisions through simulation for the approval of management, andquickly transition to prototyping. Since the application represented multiple areas of domain intelligence (electronics, vision,aerospace etc) it was important that the design platform be flexible and easy-to-use. Finally, to ensure success in benchmarkingthe prototype behavior, rapid and easy correlation of simulated and real measurements was required. 4. The Solution

    It is first important to understand the overall design approach that occurred on this satellite design. There were three stages to thedesign flow:

    The design needed to be presented to management and receive approvalDesign needed to be quickly simulated and definedCompleted design is handed to a layout team, to build a schematic and layout with the enterprise tools

    Design Approval: Multisim

    Multisim was used for the initial design proposal. By quickly building the schematic and simulating its behavior, the engineers wereable to provide management with immediate visual verification of design decisions. Multisim utilizes SPICE simulation to emulate

    the behavior of circuit devices such as transistors, diodes, operational amplifiers and passive components. Utilizing specific

  • 2/8 www.ni.com

    the behavior of circuit devices such as transistors, diodes, operational amplifiers and passive components. Utilizing specificanalyses and interactive simulation, the engineer can visualize emulated design behavior prior to physically prototyping the board.Thereby engineers, and in this case, also management, can graphically judge the behavior of a design, respond to limitations, andimprove performance.With an initial design implemented to showcase the behavior of the flight electronics, management was able to approve the scopeof the project on the strength of this simulated behavior.The design now focussed on improving design behavior. There were multiple factors to take into account in evaluating circuitperformance:

    Analyze the performance in extraterrestrial environments (i.e. space) at set temperatures, ability to handle dust etcVerify overall operation of flight electronicsValidate the capture and processing of optical information from camera data

    Effective Design with a Validation Platform

    A key challenge for engineers is the ability to effectively validate the behavior of prototype circuits, and compare them to designspecifications. Using an integrated platform, through which the test environment is able to view simulated data, it is immediatelypossible to compare, and benchmark, real measurements to design specifications.The laboratory, upon the definition of this project, had stated that their test and validation needs included:

    Rapid acquisition of design performanceComparison of real and simulated measurements to benchmark prototype performanceEasy setup of test equipment for validation and verification

    The LabVIEW graphical programming is suited to the development of applications that connect to measurement acquisitionhardware. In LabVIEW, applications can be programmed that will acquire, analyze and present real data on the computer screen.The unique integration between LabVIEW and Multisim, means that simulated data can be saved to a native file format, that canbe transferred and read within LabVIEW. Multisim and LabVIEW were therefore able to communicate via theLabVIEW Measurement File format (LVM), which is an ASCII based file containing measurements corresponding to time-base.

    Simulated and real measurements can be plot upon the same graph axes, to analyze any difference. With this highly graphicalapproach any deviations of the prototype from the expectations set by simulation can be identified, further analyzed and resolved.

    The test platform was built using LabVIEW SignalExpress and PXI. LabVIEW SignalExpress is a completely graphicalenvironment, with pre-configured measurement steps which require no programming. With this version of LabVIEW, the engineerswere able to quickly place graphical into an ordered list, to configure their operation. Each is a graphical interface to ansteps stepinstrument, or analysis within SignalExpress. For example, below we see a configuration step for a digitizer to acquiremeasurements from physical hardware.

  • 3/8 www.ni.com

    1. 2.

    3.

    Validation PlatformThe hardware setup which interrogated the physical prototype was based upon the PXI (PCI eXtensions for instrumentation)platform. PXI is an open, PC-based platform for test and measurement. As a part of this platform, the engineer can connectmodular instruments (such as digitizers, arbitrary waveform generators, DMMs etc) into PCI slots in the PXI chassis. Thisprovides a cost-effective desktop based measurement system (with a small footprint). LabVIEW SignalExpress allows for easy,graphical based setup and configuration of these measurement modules.Below we see the PXI platform utilized for this application.

    Instruments in PXIDigitizer/Scope: NI 5114 250 MS/s scopeSource/Waveform Generator: NI 5412 200MS/s Arbitrary Waveform GeneratorDigital I/O: NI 6534 Digital Waveform I/O

  • 4/8 www.ni.com

    The final design prototype was connected to the PXI hardware. LabVIEW SignalExpress was used to acquire these realmeasurements. Simulated data from Multisim was transferred to LabVIEW SignalExpress in the LVM format.With real measurements being acquired through LabVIEW SignalExpress, and with the transfer of simulated data coordinated, wecan correlate both sets of data. By viewing the differences between the data, the process of benchmarking and validatingperformance is easily done.

    Design Completion

    Having effectively correlated the two sets of data, the prototype performance was verified as meeting design specifications. Due tothe integrated approach, the design flow for the engineer was improved throughout, from gaining manager approval, to validatingthe prototype.The schematics to the flight and optical systems were at this point printed out, and handed to the board layout group at theNational Lab. Utilizing the final layout software, the design was fabricated using the enterprise tools.

    5. Improving the Productivity Platform with the LabVIEW Multisim API Toolkit

    The approach above, recounts the method utilized by a laboratory to validate the behavior of electronics with Multisim, LabVIEWSignalExpress and PXI. With recent developments in the Multisim software, validation has been completely integrated intoLabVIEW, to remove the need of file transfer, and to be able to completely automate simulation.

    The allows any COM-aware programming language to connect to Multisim simulation, and LabVIEW Multisim Automation API

  • 5/8 www.ni.com

    The allows any COM-aware programming language to connect to Multisim simulation, and LabVIEW Multisim Automation APIleverage those measurements within its environment. As such LabVIEW, can connect to this automation feature, and immediatelyacquire these simulation results, in a fashion similar to which it acquires real data. In a single LabVIEW application, the engineersfrom the National Lab discussed above, can now completely automate the acquisition and analysis of simulated and real data.The Multisim Automation API is wrapped with LabVIEW VIs to make it easy to use the highly graphical environment of LabVIEW tobuild an automated validation application. LabVIEW Multisim API Toolkit

    The LabVIEW Multisim API Toolkit is a set of wrappers for the Multisim Automation API. All the various functions such as opening,closing, and viewing a circuit, as well as running, pausing and stopping simulation have been organized into VIs. This means thatrather than having to access Active-X controls, standard LabVIEW programming practices can be utilized.To view more data about the LabVIEW Multisim API Toolkit, refer to this tutorial.6. Automated Validation using Multisim and LabVIEW

    To showcase this integration, and the ability to automate the validation of a design, we can investigate the attached proof ofconcept using Multisim, LabVIEW and PXI. Schematic Capture and Simulation

    Similar to the design approach above, our goal is to simulate a circuit, fabricate a prototype, and then compare both sets ofmeasurements.The schematic of this design, shown below, defines a 8 kHz bandpass filter.

    The performance of the validate circuit is shown in the Multisim AC analysis below. As we can see, based upon the bandpass filterwe have designed, we indeed have a pass band at 8 kHz as specified.

  • 6/8 www.ni.com

    Prototype

    Since the design has met specifications based upon the simulated output, we are ready to layout and route the board. For thisparticular design, the bandpass filter is a part of a group of demonstration circuits, all of which reside upon a single PCB.

    Hardware Setup

    With the physical prototype built, we connect it to a PXI chassis as shown below, with two BNC connectors connecting the digitizer(oscilloscope) to the input and output of the prototype. An arbitrary waveform generator is connected to the input of the bandpassfilter.

    7. Automating Validation

    As discussed previously, this is normally the stage at which simulated measurements would be transferred to the LabVIEW orLabVIEW SignalExpress test environment, as with the above approach. However with the advent of automated simulation, we caninstead create an application that can treat the Multisim simulation measurements as data to acquire, similar to hardware.

    Below we see a completed LabVIEW application which utilizes the connection to automated simulation to benchmark prototype

  • 7/8 www.ni.com

    1. 2. 3. 4.

    1. 2. 3. 4. 5.

    Below we see a completed LabVIEW application which utilizes the connection to automated simulation to benchmark prototypebehavior.

    As you can see in the above figure, there are two sets of plots on each axis for gain and phase. In the magnitude plot the redsimulated data, and white physical measurements are plotted on the graph. Visually we can identify the difference between thesets of data.Since this was completely automated in a single application, there was no need to transfer files, or intermediate steps. Acquisition,analysis and presentation of both simulated and real data was all done in one, completely integrated stage. Analyzing the Application

    In the attached file you will see the code (MixedSignalSimVsRealWorld.llb) to be able to:7829_compare_app.zipAcquire simulation data from Multisim (in an attached )bandpassfilter.ms10 fileControl an arbitrary waveform generator ( ) to run a frequency sweep over hardwarePXI 5422Acquire data from a digitizer ( ) after being run on the hardwarePXI 5124Compare both sets of AC Analysis data

    It is important to note that the provided software has been built for this specific setup (hardware and frequency sweep). However,the code is available to be edited - such that different hardware can be connected to, and a different frequency/AC analysisperformed. The CodeTo edit the code a specific section of the algorithm that warrants further mention. The graphical block diagram shown belowperforms five fundamental validation tasks:

    The PXI arbitrary function generator and digitizer are setupAn AC Analysis Sweep is run upon the prototype to view the bandpass filter behaviorrealThe Multisim simulation engine connection is setupAn AC Analysis Sweep is run upon the schematic to view the bandpass filter behavior.simulatedBoth sets of AC Analysis data are plot upon a single set of axis.

    As we focus on steps 1 and 2 above, we can explore the LabVIEW code:

    This code snapshot is important for those that will look to use the attached code for their own automated validation. The NI-FGENand and VIs are specific to the hardware setup of this application. These would need to be changed if using a differentNI-SCOPEoscilloscope or function generator.The AC analysis run for Multisim is a simpler segment of code, as shown below. The purpose of this code is to run an analysis ona specified circuit, and then present the data.

    As we bring together the various elements of the acquisition and analysis of the data, we can see the complete automated

  • 8/8 www.ni.com

    1. 2.

    As we bring together the various elements of the acquisition and analysis of the data, we can see the complete automatedvalidation code setup in the case. In this, both above analyses are run, and then presented in a single validation environment.Run

    Watch the Application Live

    To see the above application perform a validation of a bandpass filter in real-time, view the webcast entitled, Improving Design.Validation with Multisim Automation in LabVIEW

    Download evaluation:Multisim 30 Day Evaluation (includes LabVIEW Mulyisim API Toolkit)LabVIEW 30 Day Evaluation