Random talk on circuit design II: Do you need simulation? Why doesn't the simulation work?
Early circuit design, especially low-speed digital design, has no concept of simulation. Not that it's not important. When designing the circuit with 3GHz rate, I felt the importance of simulation. In most cases, or when the simulation is used for the first time, I always feel that the simulation results are not quite consistent with the final test. Especially in the simulation of analog circuits, such as amplifier circuits composed of operational amplifiers. This is actually not a simulation problem, but the accuracy of the 1) model 2) the description of the actual circuit. What do you think of the circuit diagram? Does the circuit diagram represent all the design information? That's not true. The circuit diagram only shows the connection sequence of all lumped parameter elements. As we all know, the essence of circuit is described by electric field and magnetic field. The interaction between electric field and magnetic field is related to the relative position of the objects (parts) carrying them. That is to say, the placement position, direction and common path (ground and power supply) of these components will affect the behavior of electromagnetic field. So a circuit diagram only carries limited design information, at least not all! Specifically, we should consider the size and interaction of each signal loop, mutual coupling in the common path, the influence of magnetic field generated by inductance and other components on other circuits, and the influence of large signal (such as the output of control) on small signal (weak signal to be detected) loop. Sometimes people will be puzzled about whether the mixed digital-analog design should be divided and how to divide it. In fact, if you treat every signal as a cycle, it will affect and be influenced by others, and the analysis will be much clearer. The use of grounding and power symbols often makes designers ignore this factor. Generally speaking, the description of the simulation will start with the circuit diagram. What's more, some people want to use automation software to get spice's netlist directly from the circuit diagram. In fact, the circuit diagram doesn't tell you how the components are connected except the connection sequence. The circuit diagram shows a line, although you have considered that a trace can be described by a transmission line when doing simulation. However, the dielectric constant is not constant at different frequencies, and the skin effect will change the trace thickness at high frequencies. Via has the greatest influence on high frequency, and the model of via has not an accurate mathematical model so far. Have you considered the parasitic capacitance caused by non-functional pads in vias? Where's via stub? I remember a few years ago, the company hired a person to interview him. He said that his doctoral thesis was to study the model of vias. So simulation is not a simple matter. Professional companies have specialized modeling and simulation engineers. You can't do simulation by learning to use simulation software. Just as Bill Gates can write MS in basic. When your simulation results are inconsistent with the final test, you can consider the two problems mentioned above. There is an article saying that a simple amplifier circuit is just a few resistors and an operational amplifier in the eyes of ordinary people. In the eyes of an experienced engineer, it is a complex network with several transmission lines, parasitic parameters, interference sources, interference loops and nonlinearity. When you see the complex network hidden behind the circuit diagram, it will be very helpful to do simulation. Two other points: 1) Simulation can't design a circuit for you, it can only verify whether your design is consistent with your expected results. 2) Simulation is not only a verification tool, but its ultimate goal is to replace the role of most experimental platforms. The usual design process is circuit design, simulation, implementation and testing. When you find that the test results are inconsistent with the simulation, you may modify the circuit on the circuit board, add some capacitance pull, remove noise, adjust the amplification pull, and finally get your index. Then I went to modify the circuit diagram and made a plate. Wait a minute! At this time, you may have lost a very precious opportunity to improve yourself to another level! The correct way is, when the test result is inconsistent with the simulation, after confirming that it is not caused by manufacturing and testing, a) debug your simulation (which can be a model or a description of implementation) according to the actual situation, so that the simulation and testing are within the expected error, b) debug your design on the simulation platform, so that the simulation result can reach the expected index, and c) debug the actual circuit according to the modification made by the simulation, so as to achieve the expected index. The above three steps may require multiple round trips. In this way, after the final simulation and actual test, you have accumulated a simulation knowledge base and experience that completely describes this design. Doing similar design next time will greatly improve the success rate of your first design. The ultimate goal is to design and debug on the workstation, not on the experimental platform in the laboratory. That's true, but how many people do it and how many people believe it is valuable? The pressure of progress, the inertia of laziness and the depth of understanding. . . . . . So there are always a few heroes, hehe.