One of the biggest advantages of FPGAs is that you can solve the toughest mathematical transfer functions with their embedded DSP blocks. The polynomial approximation is a good way to do this.
Because of its flexibility and high performance, FPGAs have found their way into industrial, scientific, military, and other applications that require complex mathematical or transfer functions. Harsh accuracy requirements and computational delays are not uncommon in more critical applications.
When using FPGAs to implement mathematical functions, engineers generally choose fixed-point mathematics (see: Xilinx China Communications, No. 80, "FPGA Mathematical Basis", docs/xcell80/44?e=2232228/2002872). In addition, you can use a number of algorithms such as CORDIC to calculate the transcendental function (see: How to use the CORDIC algorithm in FPGAs in Xilinx China Communications, 79), publicaTIons/archives/xcel l/Xcell79.pdf ).
However, when encountering extremely complex mathematical functions, there are more efficient ways to process them than implementing exact demand functions in FPGAs. In order to understand these workarounds – especially the polynomial approximations in it, we first need to define the relevant problems.
Setting problem An example of this is the complex mathematical transfer function in the FPGA that monitors the platinum resistance thermometer (PRT) and converts the PRT resistor to temperature. This conversion is generally implemented using the Callendar-Van Dusen equation. The temperature can be determined to be between 0 °C and 660 °C by the following simplified form of the equation.
Where R0 is the resistance at 0 °C, a and b are the coefficients of the PRT, and t is the temperature.
In reality, we want to switch from resistance to temperature. To do this, we need to adjust the equation to ensure that the result is the temperature at a given resistance. Most systems that use PRT design electronic devices, use electronic circuits to measure the resistance of the PRT, and then use the FPGA to calculate the temperature through the adjusted equation.
Implementing this equation in an FPGA can be prohibitive even for experienced FPGA engineers. The graph obtained in the reference temperature can be obtained by drawing the resistance obtained by drawing the temperature. The nonlinearity of the response can be clearly seen from the figure.
Implementing the adjusted transfer function directly in the FPGA poses a huge challenge in terms of the actual required design effort and verification (ensuring accuracy and cross-border and extreme conditional functions). Many engineers will find ways to implement functions to reduce the amount of design and verification work to control project progress. One possible approach is to use a lookup table to hold a series of points in the curve while providing linear interpolation between the points contained in the LUT.
This approach is likely to meet the requirements based on the relevant accuracy requirements and the number of elements stored in the lookup table. However, you still need to include linear interpolation functions in your design. This function is mathematically very complex and often contains a non-secondary power division that adds further complexity.
Utilize FPGA resourcesInstead, you can use another method to implement such a transfer function, which is to take advantage of the inherent characteristics of the FPGA. New FPGAs such as Xilinx Spartan-6 and 7 Series ArTIx, Kintex and Virtex include more than traditional lookup tables and flip-flops, as well as many advanced IP hard cores such as built-in DSP Slice, Block RAM, distributed RAM, and PCIe®. Ethernet endpoints, high-speed serial links, and more.
Because of the 48-bit accumulator they provide, engineers often refer to DSP slices as DSP48s. However, these slices also offer 25 x 18-bit wide multipliers, add/subtract functions, and many other features. You can make transfer functions easier with these internal RAM structures and DSP slices.
Polynomial approximationOne method that utilizes FPGAs to enrich the structure of DSP and RAM is the polynomial approximation. In order to use this method, you must first draw a mathematical function graph that covers the range of input values ​​in a math program such as MATLAB or Excel. You can then add a polynomial trend line to the relevant data set, and then you can implement the trend line equation in the FPGA to replace the complex math function as long as the trend line equation meets the accuracy requirements.
If a polynomial equation does not provide sufficient precision for the entire transfer function input range, more equations can be added. You can continue to rely on this method as long as you generate a series of polynomial constants that are used in the relevant input range.
Most math programs that add polynomial trend lines allow you to choose the number of order or polynomial terms. The higher the order, the more accurate the fit - but you need to implement more items in the FPGA. When implementing this process for the transfer function example, we are using Microsoft Excel, and we have obtained the trend lines and equations shown in Figure 2. In this example, a fourth-order polynomial equation is used.
After obtaining the polynomial that fits the transfer function we wish to implement, we can use the same analysis tool (in this case, Excel) to scrutinize the precision of the original transfer function. In the example of the monitored temperature, the final measurement accuracy may be +/- 1 ï‚° C, which is not a demanding accuracy requirement. Still, depending on the measurement range and the transfer function you implement, it may prove to be difficult to implement with only one polynomial equation. How can we solve this problem?
The through-wall terminals can be installed side by side on panels with thicknesses ranging from 1mm to 10mm, and can automatically compensate and adjust the thickness of the panel to form a terminal block with any number of poles. In addition, isolation plates can be used to increase air gaps and creepage distances.
Through-Wall Terminal,Through Wall Terminal Block,Through-Wall Terminal Extender,Through-The-Wall Terminal Block
Sichuan Xinlian electronic science and technology Company , https://www.sztmlch.com