Component Reuse and Rapid Prototyping Based on Device Modeling Mechanism of Spice3f5 Modeling Tool

1 Introduction

With the rapid development of the semiconductor industry, new types of power electronic devices are emerging, and the demand for device modeling is becoming more and more urgent, which poses new challenges for the development of dedicated modeling tools. This paper develops a lightweight and dedicated device modeling tool based on the open industry standard simulation source code.

2, simulation module design

The SPICE model has been widely used in electronic design. The device parameter extraction in this paper analyzes the input equivalent circuit according to the spice syntax, and exports the relevant interface to the development source spice3f5 as the simulation kernel, thus completing the simulation module design.

2.1, interface design

In order to facilitate communication with spice3f5 simulation source code, on the basis of researching the source code, compile and generate spice3f5.dll, and export the simulation input and output related API interface.

Its interface function is shown in Table 1.

Interface function table

2.2, spice syntax parameter extraction

Model parameter extraction technology is the basis of device modeling. Circuit design can only be performed if the corresponding model parameters are provided to the circuit simulation software. Therefore all the parameters used in the device model need to be accurately extracted. We need to perform the spell syntax parsing on the equivalent circuit netlist input by the user to obtain the circuit parameters.

Considering the need to modify the component parameter values ​​for repeated simulation, the user input circuit netlist is pre-processed, only the valid part of the simulation is retained and stored in the string list according to the row. Now it is necessary to extract the component parameter information and the instantiated model. Parameter information in the subcircuit.

The first time traversing the netlist string to do the work of the extraction module. Once the sub-circuit or model definition is encountered, the corresponding type object is constructed to save the module information and the pointer is saved to the corresponding pointer list; the second traversal is completed to finally input the simulation netlist file. This process skips the sub-circuit or model definition, locates the instantiation statement, parses out the module name and instance name corresponding to the instance, and then finds a pointer to the sub-module object according to the module name, and adds the instance name to the module. In the list of examples. Extending the instance requires the definition statement of the module corresponding to the instance, calling the method constructor by the obtained module pointer to construct the submodule statement defined by the instance name and saving it to the string list, and then adding it to the statement list.

3, graphic display module

The comparison between the simulated data and the actual measured data needs to be compared with different graphical features, and then re-simulated by continuously adjusting a series of parameter values ​​to find the best fitting point of the two sets of correlation curves. An introduction to the implementation of the smith impedance map in the simulation curve is now presented.

3.1, smith impedance map

The Smith impedance map can visually display the load impedance and reflection coefficient on the Smith chart when measuring the load of a high-frequency circuit [3]. It consists of a constant resistance circle and a constant reactance circle, so the drawing work is also divided into two parts. . It is first normalized to the unit circle and then multiplied by a specific multiple according to the view scale.

The following arrays are defined as special values ​​for the isobaric circle and the constant reactance arc.

Double dRadius[]={0.0,0.2,0.5,1.0,2.0,5.0}

Double dArc[]={-5.0,2.0,-1.0,-0.5,-0.2,0.2,0.5,1.0,2.0,5.0}

In GDI graphics programming, the parameters required to draw the circle Eclipse with the device context DC are the circumscribing rectangle of the circle. The Arc interface of the arc needs the coordinates of the starting rectangle of the circle to which the arc belongs and the starting point of the arc.

The coordinates of the upper left and lower right corners of the circumscribing rectangle are (x is taken from the array dRadius):

[(x-1)/(x+1), 1/(x+1)] and [1,-1/(x+1)]

The above is the conversion relationship normalized to the unit circle. When drawing, you need to set the coordinate origin to determine the magnification ratio.

3.2, expansion function

In the modeling process, it is necessary to continuously observe the curve adjustment parameters to fit the measured curve, and the amplification and memory functions are convenient for this.

We need to maintain two amplification parameters: zoom in the center point of the area and enlarge the scale.

InvalidateRect is called to refresh the graphic display area each time the box is partially enlarged, and then the stored magnification is updated to update the maximum radius of the smith. Then use the memory DC to create a bitmap of the size of the graphic display area. With the memory DC, only a part of the area after the enlargement needs to be drawn. Then determine the view origin of the bitmap according to the zoom point, set the view origin of the screen DC to the center point of the smith chart, and finally call the BitBlt function to copy the enlarged portion to the screen.

After zooming in multiple times, you need to roll back to the last state by simply accessing the previous set of parameters in the magnified information array and then refreshing the view. In addition, it also involves multiple times of zooming in multiple times and re-amplifying to overwrite the parameters after this amplification, to do a good job of memory release.

4 Conclusion

The method based on spice3f5 described in this paper introduces the object-oriented design idea into the device modeling mechanism of the simulator, realizes module multiplexing and rapid prototyping development, and achieves the purpose of shortening the device model development cycle and reducing development cost. It has some inspiration for designing special device modeling tools.

Vacuum Cleaner Ac Dry Motor

Vacuum Cleaner Ac Dry Motor,Dry Vacuum Cleaner Deep Cleaning,Dry Vacuum Cleaner Motor,Electric Cleaner Ac Motor

Zhoushan Chenguang Electric Appliance Co., Ltd. , https://www.vacuum-cleaner-motors.com