NI Multisim, NI LabVIEW and PXI
One of the great hurdles in the modern design flow is the inability to effectively prototype a design and compare its behavioral measurements to the initial design specifications. This barrier to effective design is detrimental to engineers who want to be able to quickly 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 of engineers.
2. The Design Application
This real-world application, involved the design of flight and optical electronics for satellite systems. Due to the advanced nature of this design, design accuracy was paramount, and as such the simulation of this application needed to mirror real-world elements as 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 design specifications be met for every element of the satellite system. Due to the nature of the environment in which the satellite would be operating (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, and quickly 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 benchmarking the 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 the design flow:
- The design needed to be presented to management and receive approval
- Design needed to be quickly simulated and defined
- Completed 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 were able 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 analyses 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, and improve performance.
With an initial design implemented to showcase the behavior of the flight electronics, management was able to approve the scope of 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 circuit performance:
- Analyze the performance in extraterrestrial environments (i.e. space) at set temperatures, ability to handle dust etc…
- Verify overall operation of flight electronics
- Validate 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 design specifications. Using an integrated platform, through which the test environment is able to view simulated data, it is immediately possible 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 performance
- Comparison of real and simulated measurements to benchmark prototype performance
- Easy setup of test equipment for validation and verification
The LabVIEW graphical programming is suited to the development of applications that connect to measurement acquisition hardware. 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 can be transferred and read within LabVIEW. Multisim and LabVIEW were therefore able to communicate via the LabVIEW 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 graphical approach 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 graphical environment, with pre-configured measurement steps which require no programming. With this version of LabVIEW, the engineers were able to quickly place graphical steps into an ordered list, to configure their operation. Each step is a graphical interface to an instrument, or analysis within SignalExpress. For example, below we see a configuration step for a digitizer to acquire measurements from physical hardware.
The 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 connect modular instruments (such as digitizers, arbitrary waveform generators, DMMs etc…) into PCI slots in the PXI chassis. This provides 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 PXI
The final design prototype was connected to the PXI hardware. LabVIEW SignalExpress was used to acquire these real measurements. 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, we can correlate both sets of data. By viewing the differences between the data, the process of benchmarking and validating performance is easily done.
Having effectively correlated the two sets of data, the prototype performance was verified as meeting design specifications. Due to the integrated approach, the design flow for the engineer was improved throughout, from gaining manager approval, to validating the prototype.
The schematics to the flight and optical systems were at this point printed out, and handed to the board layout group at the National 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, LabVIEW SignalExpress and PXI. With recent developments in the Multisim software, validation has been completely integrated into LabVIEW, to remove the need of file transfer, and to be able to completely automate simulation.
The LabVIEW Multisim Automation API allows any COM-aware programming language to connect to Multisim simulation, and leverage those measurements within its environment. As such LabVIEW, can connect to this automation feature, and immediately acquire these simulation results, in a fashion similar to which it acquires real data. In a single LabVIEW application, the engineers from 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 to build 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 that rather 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 of concept 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 of measurements.
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 filter we have designed, we indeed have a pass band at 8 kHz as specified.
Since the design has met specifications based upon the simulated output, we are ready to layout and route the board. For this particular design, the bandpass filter is a part of a group of demonstration circuits, all of which reside upon a single PCB.
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 bandpass filter.
7. Automating Validation
As discussed previously, this is normally the stage at which simulated measurements would be transferred to the LabVIEW or LabVIEW SignalExpress test environment, as with the above approach. However with the advent of automated simulation, we can instead 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 behavior.
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 red simulated data, and white physical measurements are plotted on the graph. Visually we can identify the difference between the sets 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 7829_compare_app.zip file you will see the code (MixedSignalSimVsRealWorld.llb) to be able to:
- Acquire simulation data from Multisim (in an attached bandpassfilter.ms10 file)
- Control an arbitrary waveform generator (PXI 5422) to run a frequency sweep over hardware
- Acquire data from a digitizer (PXI 5124) after being run on the hardware
- Compare 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 analysis performed.
To edit the code a specific section of the algorithm that warrants further mention. The graphical block diagram shown below performs five fundamental validation tasks:
- The PXI arbitrary function generator and digitizer are setup
- An AC Analysis Sweep is run upon the prototype to view the real bandpass filter behavior
- The Multisim simulation engine connection is setup
- An AC Analysis Sweep is run upon the schematic to view the simulated bandpass filter behavior.
- Both 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-FGEN and NI-SCOPE and VIs are specific to the hardware setup of this application. These would need to be changed if using a different oscilloscope 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 on a 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 validation code setup in the Run case. In this, both above analyses are run, and then presented in a single validation environment.
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.