Smart test
Functional prototype series: Introduction to equipment and testing
Overview
The functional prototype series is a collection of documents, you can use it to understand the prototype process. Read about key concepts, advantages of prototypes, discussions on product selection, and other technical resources.
Equipment and testing
One purpose of developing a prototype is to quickly show an idea and its design to potential customers, investors, and peers. Another equally important reason is that prototypes can be used to test and verify basic software and hardware performance. Usually, only when you manage to combine the electronics, software, and mechanical parts of a functional prototype does the problem become prominent.
Through complete testing at the prototype stage, you can spot problems before they are about to cause huge losses or cannot be fixed. Prototype testing provides concrete evidence for the backup of performance claims and enables you to confidently implement more reliable products.
Advantage
* Improve the overall quality-by using the system to its limit to perform signal integrity testing for your embedded prototype I/O.
* Improve reliability-Please confirm that your embedded prototype can withstand extreme conditions without errors, and test the safety system to prevent overloading of the product.
* Improve algorithm performance-improve the efficiency of your embedded programs by testing and eliminating all abnormal conditions during the product development cycle.
Create a software testing platform
Software testing method
The software-defined instrument itself is very flexible and easy to automate. Therefore, today's product design team can simplify the development process by reducing the number of hours of manual testing and minimizing the number of instruments used in the experiment.
With the NI LabVIEW graphical software platform, you can easily set up simple programs to test the quality and reliability of the main algorithms. When prototyping, please pay attention to two main aspects in the test:
1. Limit test-make sure that the software design provides high-quality data across the entire range of I/O channels. This will enable the prototype to meet quality standards throughout the product development cycle.
2. Stress test-make sure that after long-term use or when all I/O channels reach the highest level at the same time, they can meet the quality standards. The algorithm needs to be robust enough to take into account the situation when overloaded data is being processed.
By using the simulation VI to make the software algorithm reach the limit, so as to carry out the test without the hardware. You can easily implement testing in LabVIEW by using different signal generation VIs or developing VIs that accurately describe the actual I/O.
Figure 1. I/O simulation method
With the development of computers, by simulating I/O, you can test the software completely without using any hardware. There are several simple and effective I/O simulation methods:
* Signal Generation VI-LabVIEW has a specific function panel to generate signals. Choose from a wide variety of VIs to effectively simulate I/O.
* Customized VI-With the LabVIEW graphical programming environment, it is very simple to develop a test platform VI that can describe I/O.
* Existing data-LabVIEW has the function of extracting data from many file types and databases. With LabVIEW, you can use modeled data to simulate data points for I/O.
Use I/O node simulation for embedded FPGA testing
Developing prototypes with embedded field programmable gate arrays (FPGAs) is a tricky thing. Its development technology is different from FPGA hardware and computer software. There are three main reasons:
1. Compile time-You need a lot of time to compile a design into hardware code and run it on the FPGA. At the same time, it is usually necessary to use multiple compilations to find program errors.
2. The hardware does not have the typical LabVIEW debugging function-once you run the code in the hardware, or the code is the hardware, you will not be able to single step, highlight the process, set breakpoints and other actions.
3. FPGA can execute at high speed and deterministically-FPGA is used in high-speed and deterministic applications. Therefore, designers usually pay attention to what happens in each clock cycle of the FPGA, either for pure performance reasons, or to describe the synchronization between parallel tasks.
LabVIEW FPGA provides powerful functions for basic FPGA algorithm testing by simulating I/O or using real I/O.
* Execute the VI on a development computer with analog I/O-When you press the run arrow, the FPGA VI runs on the PC. You can choose to use random data or custom I/O to write the test bench VI to determine the input and capture the output.
* Execute VI on a development computer with real I/O-at this time, only NI R series interposers have this function. When the program is executed on the FPGA I/O node, this option runs the VI on the PC and assigns a fixed performance to the R series device for I/O sampling. In early testing and prototyping, this is very useful, but please remember: I/O is software timing sampling, it may not represent the time you really expect the VI should be used.
* Note: The use of real I/O requires hardware.
Use data acquisition to measure I/O
Since software testing cannot provide the same feeling of using real hardware, it has limitations. With LabVIEW, you can use commercial off-the-shelf hardware to implement real I/O testing.
By using a digital multimeter or data acquisition device, you can easily debug physical hardware I/O. The combination of LabVIEW and NI-DAQmx devices provides a simple and easy-to-use interface for performing complex data acquisition tasks.
Figure 2. Testing with DAQ
Use DAQmx Express VI:
* Measure the physical output of the embedded prototype and analyze the quality and reliability of the signal
* Provide real-time signals for embedded prototypes to push the software algorithm to the limit and stress the test system
Complete system test bench
System ID
The LabVIEW System Identification Toolkit is not only a VI library, but also an assistant for developing system models based on a large amount of raw data. With these tools, you can complete the identification of the entire system, from analyzing raw data to verifying the identification model. You can use the system recognition assistant to develop a model that reflects a specific dynamic system behavior in less time.
System identification is a method of developing mathematical models of dynamic systems based on measured stimulus and response data. You can use system identification in many applications, including mechanical engineering, biology, physiology, meteorology, economics, and model-based control design.
The model-based control design process usually includes the process of identifying the object model, analyzing and synthesizing the controller, simulating the closed-loop system, and applying the controller to the real-time hardware.
LabVIEW System Identification Toolkit:
* Help you identify large multivariate models in high-level systems from real data
* Provides two tools, an assistant and a VI library to identify discrete single-input single-output and multiple-input multiple-output linear systems
* Help you complete the identification of the entire system, from analyzing raw data to verifying the identification model
* Integrate with other additional functions, including LabVIEW real-time and LabVIEW control design and simulation modules
The System Identification Toolkit provides some VIs that you can use to preprocess raw data from dynamic systems and develop models that reflect the behavior of the system. With the data preprocessing VI, you can analyze the dynamic system response under a specific stimulus. After analyzing the data, you can use parametric model estimation, non-parametric model estimation, partial known model estimation, recursive model estimation, frequency domain model estimation VI, etc. to estimate the model of the dynamic system. , You can use the Model Validation or Model Analysis VI to determine whether the model can accurately describe the dynamic characteristics of the system.
Hardware-in-the-loop (HIL) applications
Embedded control systems play an important role in controlling different components of a typical mechanical system. System software simulation before actual testing is not always useful, because simulation cannot run in real time with actual analog and digital signals. This difficulty forces us to use HIL simulation as a standard method for testing embedded control systems before deployment.
Testing a complete embedded prototype can be difficult, especially when you want to test the interaction between all the components of the entire system. When testing a prototype embedded control system, safety, availability, or cost considerations can make it impractical to use the complete system for the necessary tests. You can use HIL simulation to simulate the system components that bring these challenges, which will enable you to thoroughly test the embedded control device in a virtual environment before the actual overall system test. With this feature, even if your test system becomes more complex, you can cost-effectively maintain reliability and time-to-market requirements.
Figure 3. A HIL test system with three main components: a software interface, a real-time processor, and an I/O interface
The challenges brought by the rapid launch of the market in a short time, better reliability, and increasingly complex products make people urgently need the help of the HIL test platform:
* Configure and monitor the user interface and test management tools such as NI VeriStand on the host
* Use a real-time simulator to generate real electrical interaction between the embedded controller and the test system
* Set up physical load and fault insertion test-HIL test system can simulate real conditions and test the response under fault conditions
LabVIEW graphical development environment and NI PXI modular hardware platform are ideal tools for building HIL systems to achieve highly realistic controller test simulations.
Figure 4. Graphical system design
NI VeriStand is a software environment for configuring real-time test applications including HIL testing. It can help you configure a multi-core real-time engine to perform the following tasks:
* I/O based on analog, digital, communication bus and field programmable gate array (FPGA)
* Trigger, multi-file data recording
* Generate real-time incentives
* Calculation channel
* Event alarm and alarm response routine test
NI VeriStand can also import control algorithms and simulate models in LabVIEW software and third-party environments. You can use a runtime editable user interface to monitor and interact with these tasks. This interface includes many useful tools for forced assignment, alarm monitoring, I/O calibration, and stimulus file editing. No programming knowledge is required when using NI VeriStand. It can be customized and extended to a variety of software environments, such as NI LabVIEW, NI TestStand, Microsoft Visual Studio .NET, C/C++, and Python.
Next step
NI provides a large number of embedded prototype testing tools. Combining the LabVIEW platform with NI-DAQmx and NI VeriStand can help you thoroughly test the quality, reliability, and performance of the entire product development cycle.