CN111007318B - Equivalent resistance value calculation method and device, electronic equipment and readable storage medium - Google Patents

Equivalent resistance value calculation method and device, electronic equipment and readable storage medium Download PDF

Info

Publication number
CN111007318B
CN111007318B CN201911371517.0A CN201911371517A CN111007318B CN 111007318 B CN111007318 B CN 111007318B CN 201911371517 A CN201911371517 A CN 201911371517A CN 111007318 B CN111007318 B CN 111007318B
Authority
CN
China
Prior art keywords
resistor
network
effective
resistance
resistors
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Active
Application number
CN201911371517.0A
Other languages
Chinese (zh)
Other versions
CN111007318A (en
Inventor
王隆峰
廖天宇
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Maipu Communication Technology Co Ltd
Original Assignee
Maipu Communication Technology Co Ltd
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Maipu Communication Technology Co Ltd filed Critical Maipu Communication Technology Co Ltd
Priority to CN201911371517.0A priority Critical patent/CN111007318B/en
Publication of CN111007318A publication Critical patent/CN111007318A/en
Application granted granted Critical
Publication of CN111007318B publication Critical patent/CN111007318B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Images

Classifications

    • GPHYSICS
    • G01MEASURING; TESTING
    • G01RMEASURING ELECTRIC VARIABLES; MEASURING MAGNETIC VARIABLES
    • G01R27/00Arrangements for measuring resistance, reactance, impedance, or electric characteristics derived therefrom
    • G01R27/02Measuring real or complex resistance, reactance, impedance, or other two-pole characteristics derived therefrom, e.g. time constant

Abstract

The application provides an equivalent resistance value calculation method, an equivalent resistance value calculation device, an electronic device and a readable storage medium, wherein the equivalent resistance value calculation method comprises the following steps: traversing a target circuit to be subjected to equivalent resistance value calculation according to the resistor index table and the resistor network index table to obtain all effective resistor networks and all effective resistors between a starting point resistor network and a finishing point resistor network of the target circuit; and alternately carrying out series combination and parallel combination on all the effective resistance networks and all the effective resistors to obtain the equivalent resistance value between the starting point resistance network and the ending point resistance network. All effective resistors and all effective resistor networks between the starting point resistor network and the ending point resistor network can be obtained firstly, and then all the effective resistors and all the effective resistor networks are alternately connected in series, combined in parallel and combined to obtain the equivalent resistance value between the starting point resistor network and the ending point resistor network. Compared with the prior art, the method can solve the problems that manpower is consumed for calculating the equivalent resistance value manually and errors are easy to calculate.

Description

Equivalent resistance value calculation method and device, electronic equipment and readable storage medium
Technical Field
The present application relates to the field of data processing technologies, and in particular, to a method and an apparatus for calculating an equivalent resistance value, an electronic device, and a readable storage medium.
Background
In the development process of electronic devices, it is generally necessary to analyze the equivalent resistance of a resistor network formed by connecting a plurality of resistors in series or in parallel between two electronic components, so as to more accurately develop the electronic devices.
At present, it is common to manually analyze and calculate the equivalent resistance value of a resistor network formed by connecting a plurality of resistors in series or in parallel, for example, for two resistors in series or two resistors in parallel, the specific resistance values of the two resistors are obtained respectively, and then the equivalent resistance values are calculated by substituting into the corresponding series or parallel calculation formulas. This is labor intensive and prone to miscalculation.
Disclosure of Invention
An embodiment of the present invention provides an equivalent resistance value calculating method, an equivalent resistance value calculating device, an electronic apparatus, and a readable storage medium, so as to solve the problems of manpower consumption and easy calculation error in the prior art.
In a first aspect, an embodiment of the present application provides an equivalent resistance value calculation method, where the method includes: traversing a target circuit to be subjected to equivalent resistance value calculation according to a resistor index table and a resistor network index table to obtain all effective resistor networks and all effective resistors between a starting point resistor network and a finishing point resistor network of the target circuit; the resistor index table stores the identification of each resistor in all resistors of the target circuit, the resistance value corresponding to each resistor and the information of two resistor networks connected to each resistor, and the resistor network index table stores the identification of each resistor network in all resistor networks of the target circuit and the information of at least one resistor connected to each resistor network; and alternately carrying out series combination and parallel combination on all the effective resistance networks and all the effective resistors to obtain the equivalent resistance value between the starting point resistance network and the ending point resistance network.
In the above embodiment, all the effective resistors between the starting-point resistance network and the ending-point resistance network may be obtained by traversing from all the resistors recorded in the resistor index table, then all the effective resistors between the starting-point resistance network and the ending-point resistance network may be obtained by traversing from all the resistance networks recorded in the resistor index table, and then all the effective resistors and the effective resistance networks may be alternately combined in series and combined in parallel to obtain the equivalent resistance values of all the effective resistors between the starting-point resistance network and the ending-point resistance network. Compared with the prior art, the method can solve the problems that the manual calculation of the equivalent resistance consumes manpower and is easy to calculate errors in the prior art.
In one possible design, the traversing a target circuit to be subjected to equivalent resistance value calculation according to a resistor index table and a resistor network index table to obtain all effective resistor networks and all effective resistors between a starting-point resistor network and an ending-point resistor network of the target circuit includes: taking the starting point resistance network as a resistance network to be indexed; acquiring at least one resistor connected with the resistance network to be indexed according to the resistance network index table; if the number of the opposite end resistors connected with the resistance network to be indexed is one, acquiring the identifier of the opposite end resistor, and acquiring the opposite end resistance network of the opposite end resistor according to the identifier of the opposite end resistor and the resistor index table; taking the opposite terminal resistance network as the resistance network to be indexed, and executing the following steps: acquiring at least one resistor connected with the resistance network to be indexed according to the resistance network index table; if the number of the opposite end resistors connected with the resistance network to be indexed is larger than or equal to two, storing the resistance network to be indexed and the resistance network to be indexed which is not stored in an effective resistance network table before the resistance network to be indexed into the effective resistance network table, and storing the opposite end resistor which is not stored in the effective resistance network table before the resistance network to be indexed and corresponds to the resistance network to be indexed into the effective resistance table; for each of the two or more peer resistors, performing the steps of: acquiring the identifier of the opposite end resistor, and acquiring an opposite end resistance network of the opposite end resistor according to the identifier of the opposite end resistor and the resistor index table; if the opposite-end resistance network of the opposite-end resistor is stored in the effective resistance network table, judging that the resistance network in which the effective resistance network table is stored is not connected with the opposite-end resistor; if the number of the opposite-end resistors connected with the to-be-indexed resistor network is 0 and the to-be-indexed resistor network is an end-point resistor network, storing the end-point resistor network and the to-be-indexed resistor network which is not stored in an effective resistor network table and is before the end-point resistor network into the effective resistor network table, and storing the opposite-end resistor which is not stored in the effective resistor table and corresponds to the to-be-indexed resistor network before the end-point resistor network into the effective resistor table; and acquiring all effective resistor networks in the effective resistor network table and all effective resistors in the effective resistor network table until the resistors in the resistor index table and the resistor networks in the resistor network index table are traversed.
In the above embodiment, a plurality of different situations can be classified according to the number of the opposite end resistors connected to the resistance network to be indexed, and then each situation is specifically analyzed, so that the traversal of the resistors in the resistor index table and the resistance network in the resistance network index table is completed, and the effective resistors and the effective resistance network can be accurately and quickly acquired through the above method.
In one possible design, the combining all the effective resistance networks and all the effective resistors in series includes: acquiring an effective resistance network which is only connected with two resistors in all the effective resistance networks; calculating the series resistance value of two resistors corresponding to the effective resistance network only connecting the two resistors; deleting any one of the two resistors corresponding to the effective resistance network connecting only the two resistors from the all effective resistors, and changing the resistance value of the other one of the two resistors to the series resistance value; deleting the effective resistance network only connecting the two resistors from the total effective resistance network to obtain a new total effective resistance network, and executing the following steps: and acquiring an effective resistance network in which only two resistors are connected in one of all the effective resistance networks until the effective resistance network in which only two resistors are connected does not exist in all the effective resistance networks.
In the above embodiment, an effective resistance network to which only two resistors are connected may be obtained each time, and the effective resistance network to which only two resistors are connected indicates that the two resistors connected by the effective resistance network are in a series relationship, then a series resistance value is calculated, the series resistance value is assigned to any one of the two resistors, and then the other one of the two resistors and the effective resistance network are deleted, so that two resistors connected in series are equivalent to one resistor in series. And then continuously acquiring the next effective resistance network connected with only two resistors, and continuously executing the steps until no effective resistance network connected with only two resistors exists.
In one possible design, the combining all the effective resistance networks and all the effective resistors in parallel includes: for each of the total number of active resistors, determining whether there is an active resistor in the same active resistor network as the active resistor; if an effective resistor which is the same as the effective resistor network connected with the effective resistor exists, calculating the parallel resistance value of the two effective resistors; deleting any one of the two effective resistors for calculating the parallel resistance value from all the effective resistors, changing the resistance value of the other effective resistor for calculating the parallel resistance value into the parallel resistance value, obtaining a new total effective resistor, and executing the following steps: for each of the total number of active resistors, determining whether there is an active resistor that is the same as the active resistor network to which the active resistor is connected until there is no active resistor that is the same as the active resistor network to which the active resistor is connected for each of the total number of active resistors.
In the above-described embodiment, after the series combining is performed, the effective resistor networks and the effective resistors that have been combined in series are combined in parallel, and it is possible to determine whether or not the resistor networks connected to both ends of the two resistors are respectively the same, that is, the resistor network connected to one end of one resistor is the same as the resistor network connected to one end of the other resistor, and the resistor network connected to the other end of the one resistor is also the same as the resistor network connected to the other end of the other resistor, and if so, it indicates that the two resistors are parallel resistors, and then, by calculating a parallel resistance value, a parallel resistance value is given to any one of the two parallel resistors, and then the other of the two parallel resistors is deleted, so that the two parallel resistors are equivalent to one resistor. And then, carrying out equivalent of parallel resistance by adopting the method for many times until two resistors with the same resistance network connected to the two ends of the resistor do not exist.
In one possible design, before traversing a target circuit to be subjected to equivalent resistance value calculation according to a resistor index table and a resistor network index table to obtain all effective resistor networks and all effective resistors between a starting-point resistor network and an ending-point resistor network of the target circuit, the method further includes: traversing a target circuit to be subjected to equivalent resistance value calculation, and obtaining the resistance value of each resistor in all resistors of the target circuit and two resistor networks respectively connected with each resistor; storing the identification of each resistor in all the resistors, the resistance value corresponding to each resistor and the information of two resistor networks connected with each resistor into a resistor index table; acquiring at least one resistor connected with each resistor network in all resistor networks of the target circuit; and storing the identification of each resistance network in all the resistance networks and the information of at least one resistor connected with each resistance network into a resistance network index table.
In the above embodiment, the target circuit may be traversed to obtain all resistors and all resistor networks of the target circuit, and then the connection relationship between the resistors and the resistor networks is stored in the resistor index table and the resistor network index table to prepare for the subsequent processing steps.
In a second aspect, an embodiment of the present application provides an equivalent resistance value calculation apparatus, including: the effective data acquisition module is used for traversing a target circuit to be subjected to equivalent resistance value calculation according to a resistor index table and a resistor network index table to obtain all effective resistor networks and all effective resistors between a starting point resistor network and a terminal point resistor network of the target circuit; the resistor index table stores the identification of each resistor in all resistors of the target circuit, the resistance value corresponding to each resistor and the information of two resistor networks connected to each resistor, and the resistor network index table stores the identification of each resistor network in all resistor networks of the target circuit and the information of at least one resistor connected to each resistor network; and the equivalent resistance acquisition module is used for alternately carrying out series combination and parallel combination on all the effective resistance networks and all the effective resistors to obtain the equivalent resistance value between the starting point resistance network and the end point resistance network.
In one possible design, the valid data acquisition module is specifically configured to: taking the starting point resistance network as a resistance network to be indexed; acquiring at least one resistor connected with the resistance network to be indexed according to the resistance network index table; if the number of the opposite end resistors connected with the resistance network to be indexed is one, acquiring the identifier of the opposite end resistor, and acquiring the opposite end resistance network of the opposite end resistor according to the identifier of the opposite end resistor and the resistor index table; taking the opposite terminal resistance network as the resistance network to be indexed, and executing the following steps: acquiring at least one resistor connected with the resistance network to be indexed according to the resistance network index table; if the number of the opposite end resistors connected with the resistance network to be indexed is larger than or equal to two, storing the resistance network to be indexed and the resistance network to be indexed which is not stored in an effective resistance network table before the resistance network to be indexed into the effective resistance network table, and storing the opposite end resistor which is not stored in the effective resistance network table before the resistance network to be indexed and corresponds to the resistance network to be indexed into the effective resistance table; for each of the two or more peer resistors, performing the steps of: acquiring the identifier of the opposite end resistor, and acquiring an opposite end resistance network of the opposite end resistor according to the identifier of the opposite end resistor and the resistor index table; if the opposite-end resistance network of the opposite-end resistor is stored in the effective resistance network table, judging that the resistance network in which the effective resistance network table is stored is not connected with the opposite-end resistor; if the number of the opposite-end resistors connected with the to-be-indexed resistor network is 0 and the to-be-indexed resistor network is an end-point resistor network, storing the end-point resistor network and the to-be-indexed resistor network which is not stored in an effective resistor network table and is before the end-point resistor network into the effective resistor network table, and storing the opposite-end resistor which is not stored in the effective resistor table and corresponds to the to-be-indexed resistor network before the end-point resistor network into the effective resistor table; and acquiring all effective resistor networks in the effective resistor network table and all effective resistors in the effective resistor network table until the resistors in the resistor index table and the resistor networks in the resistor network index table are traversed.
In one possible design, the equivalent resistance obtaining module is specifically configured to: acquiring an effective resistance network which is only connected with two resistors in all the effective resistance networks; calculating the series resistance value of two resistors corresponding to the effective resistance network only connecting the two resistors; deleting any one of the two resistors corresponding to the effective resistance network connecting only the two resistors from the all effective resistors, and changing the resistance value of the other one of the two resistors to the series resistance value; deleting the effective resistance network only connecting the two resistors from the total effective resistance network to obtain a new total effective resistance network, and executing the following steps: and acquiring an effective resistance network in which only two resistors are connected in one of all the effective resistance networks until the effective resistance network in which only two resistors are connected does not exist in all the effective resistance networks.
In one possible design, the equivalent resistance obtaining module is further specifically configured to: for each of the total number of active resistors, determining whether there is an active resistor in the same active resistor network as the active resistor; if an effective resistor which is the same as the effective resistor network connected with the effective resistor exists, calculating the parallel resistance value of the two effective resistors; deleting any one of the two effective resistors for calculating the parallel resistance value from all the effective resistors, changing the resistance value of the other effective resistor for calculating the parallel resistance value into the parallel resistance value, obtaining a new total effective resistor, and executing the following steps: for each of the total number of active resistors, determining whether there is an active resistor that is the same as the active resistor network to which the active resistor is connected until there is no active resistor that is the same as the active resistor network to which the active resistor is connected for each of the total number of active resistors.
In one possible design, the apparatus further includes an information obtaining module, configured to traverse a target circuit to be subjected to equivalent resistance value calculation, and obtain a resistance value of each resistor in all resistors of the target circuit and two resistor networks respectively connected to each resistor; storing the identification of each resistor in all the resistors, the resistance value corresponding to each resistor and the information of two resistor networks connected with each resistor into a resistor index table; acquiring at least one resistor connected with each resistor network in all resistor networks of the target circuit; and storing the identification of each resistance network in all the resistance networks and the information of at least one resistor connected with each resistance network into a resistance network index table.
In a third aspect, an embodiment of the present application provides an electronic device, including the method in the first aspect or any optional implementation manner of the first aspect.
In a fourth aspect, the present application provides a readable storage medium having stored thereon an executable program which, when executed by a processor, performs the method of the first aspect or any of the optional implementations of the first aspect.
In a fifth aspect, the present application provides an executable program product which, when run on a computer, causes the computer to perform the method of the first aspect or any possible implementation manner of the first aspect.
In order to make the aforementioned and other objects, features and advantages of the present invention comprehensible, preferred embodiments accompanied with figures are described in detail below.
Drawings
In order to more clearly illustrate the technical solutions of the embodiments of the present application, the drawings that are required to be used in the embodiments of the present application will be briefly described below, it should be understood that the following drawings only illustrate some embodiments of the present application and therefore should not be considered as limiting the scope, and that those skilled in the art can also obtain other related drawings based on the drawings without inventive efforts.
Fig. 1 is a schematic flow chart of a method for calculating an equivalent resistance value according to an embodiment of the present disclosure;
FIG. 2 is a flowchart illustrating specific steps of step S110 in FIG. 1;
fig. 3 is a schematic flowchart illustrating a part of steps of an equivalent resistance value calculation method provided in an embodiment of the present application;
fig. 4 is a schematic structural block diagram of an equivalent resistance value calculation apparatus provided in an embodiment of the present application;
FIG. 5 shows a schematic circuit diagram of an equivalent resistance value calculation to be performed;
fig. 6 is an equivalent circuit diagram of the circuit diagram shown in fig. 5;
FIG. 7 is a schematic circuit diagram of the effective resistor and effective resistor network;
FIG. 8 is a schematic circuit diagram of intermediate results in performing a tandem merge process;
FIG. 9 is a schematic circuit diagram of another intermediate result in performing a series merge process;
FIG. 10 is a schematic circuit diagram of intermediate results in performing a parallel merge process;
fig. 11 is a schematic circuit diagram for performing equivalent resistance value calculation.
Detailed Description
The technical solutions in the embodiments of the present application will be described below with reference to the drawings in the embodiments of the present application.
Referring to fig. 1, fig. 1 shows an equivalent resistance value calculation method provided in an embodiment of the present application, where the method may be executed by an electronic device, and the electronic device may be a server or a terminal device. The method specifically comprises the following steps S110 to S120:
step S110, traversing the target circuit to be subjected to the equivalent resistance value calculation according to the resistor index table and the resistor network index table, and obtaining all effective resistor networks and all effective resistors between the starting point resistor network and the ending point resistor network of the target circuit.
The target circuit is a circuit to be subjected to equivalent resistance value calculation, and comprises a plurality of resistors and a plurality of resistor networks, wherein the resistors are connected in series or in parallel, and the resistor network refers to a network formed by lines connected between the resistors. For example, two resistors are connected by one line, and the line connected between the two resistors can also be regarded as a resistor network; two resistors are connected in parallel and then connected in series with another resistor, and then a circuit connected between the three resistors can also be regarded as a resistor network.
The resistor network comprises a starting resistor network and an ending resistor network, the starting resistor network and the ending resistor network can be two resistor networks defined artificially, and the purpose of defining the starting resistor network and the ending resistor network is to calculate the equivalent resistance values of a plurality of resistors between the starting resistor network and the ending resistor network.
The resistor index table is a database that can be indexed by using the identifier of the resistor as a key, and the resistor index table stores the identifier of each resistor, the resistance value corresponding to each resistor, and information of two resistor networks connected to each resistor.
The resistance network index table is a database which can be indexed by using the identifier of the resistance network as a key word, and the resistance network index table stores the identifier of each resistance network in all the resistance networks of the target circuit and the information of at least one resistor connected with each resistance network. Optionally, the resistor index table and the resistor network index table may be hash tables, and optionally, the resistor network index table may further define a resistor network index table copy, and during the traversal of the effective resistor and the effective resistor network, the traversed resistor network or resistor may be deleted in the resistor network index table copy in real time, so as to avoid causing repeated traversal.
Referring to fig. 2, fig. 2 shows specific steps of step S110, which specifically includes the following steps S111 to S118:
and step S111, taking the starting point resistance network as a resistance network to be indexed.
Step S112, according to the resistance network index table, obtaining at least one resistor connected with the resistance network to be indexed.
The resistance network to be indexed refers to a resistance network to be searched for resistors connected to the resistance network according to the resistance network as a keyword. Since the equivalent resistance value between the starting point resistance network and the ending point resistance network is calculated, the starting point resistance network can be used as the resistance network to be indexed, and at least one resistor connected with the starting point resistance network can be obtained from the resistance network index table.
Step S113, if the number of the opposite end resistors connected to the resistance network to be indexed is one, obtaining the identifier of the opposite end resistor, and obtaining the opposite end resistance network of the opposite end resistor according to the identifier of the opposite end resistor and the resistor index table.
Step S114, taking the opposite end resistance network as the resistance network to be indexed, and jumping to step S112.
The opposite end resistor refers to a resistor in the traversing direction of the resistor network connection to be indexed, and the number of the opposite end resistors can be one, multiple or zero. Different numbers of end resistors also correspond to different traversal patterns. When calculating the number of the opposite resistors, all the resistors connected to the resistor network to be indexed can be obtained according to the resistor network index table, then the traversed resistors are removed, the obtained resistors which are not traversed are the opposite resistors, and then the number of the resistors which are not traversed is counted.
For a starting point resistor network, the starting point resistor network is usually connected to an electronic component at one end and a resistor at the other end, so that the opposite resistor refers to the resistor of the starting point resistor network far away from the electronic component.
A peer resistance network refers to a resistance network in the direction of traversal of a resistor connection. Each resistor in the plurality of resistors is connected with two resistor networks, the two resistor networks comprise a traversed resistor network and an unretraversed resistor network, and the opposite resistor network refers to the unretraversed resistor network.
If the number of the opposite end resistors is one, the unique identification of the opposite end resistor can be obtained, and then the opposite end resistance network of the opposite end resistor is obtained according to the identification of the opposite end resistor and the resistor index table.
After determining the opposite end resistance network of the opposite end resistors, taking the opposite end resistance network as a new resistance network to be indexed, then jumping to step S112 to continue executing the step of obtaining the resistors connected to the resistance network to be indexed, and then executing a corresponding traversal strategy according to the number of the opposite end resistors of the new resistance network to be indexed.
Step S115, if the number of the opposite end resistors connected to the resistance network to be indexed is greater than or equal to two, storing the resistance network to be indexed and the resistance network to be indexed before the resistance network to be indexed, which is not stored in the effective resistance network table, and storing the opposite end resistor, which is not stored in the effective resistance network table before the resistance network to be indexed, which corresponds to the resistance network to be indexed, in the effective resistance table.
The effective resistance network table refers to a table composed of resistance networks which will affect the equivalent resistance calculation, and the effective resistance table refers to a table composed of resistances which will affect the equivalent resistance calculation.
If the number of the opposite end resistors connected to the resistance network to be indexed is greater than or equal to two (that is, the number of the opposite end resistors is multiple), the resistance network to be indexed and the resistance network before the resistance network to be indexed, which is not stored in the effective resistance network table, can be stored in the effective resistance network table, and the resistors before the resistance network to be indexed, which is not stored in the effective resistance table, can be stored in the effective resistance table.
Step S116, randomly selecting one of the opposite resistors to be indexed, the number of which is greater than or equal to two, and executing step S113.
After the updating of the effective resistor network table and the effective resistor table is completed, for each of the plurality of opposite resistors, the step S113 may be skipped to, and the step S113 of obtaining the identifier of the opposite resistor and obtaining the opposite resistor network of the opposite resistor according to the identifier of the opposite resistor and the resistor index table is performed, so as to continue the traversal.
In one embodiment, if the opposite-end resistor network of the opposite-end resistor is stored in the effective resistor network table, it is determined that the resistor network stored in the effective resistor network table is not connected with the opposite-end resistor.
The opposite-end resistor network of the opposite-end resistor is stored in the effective resistor network table, which means that the opposite-end resistor and the opposite-end resistor network form a loop, and in order to avoid performing repeated calculation on the loop, it can be determined that the resistor network stored in the effective resistor network table is not connected with the opposite-end resistor, that is, in the resistor network index table, the connection relationship between the resistor network and the opposite-end resistor is deleted.
Step S117, if the number of the opposite end resistors connected to the to-be-indexed resistor network is 0 and the to-be-indexed resistor network is an end point resistor network, storing the end point resistor network and the to-be-indexed resistor network before the end point resistor network, which is not stored in the effective resistor network table, and storing the opposite end resistor before the end point resistor network, which is not stored in the effective resistor table, corresponding to the to-be-indexed resistor network in the effective resistor table.
The number of the opposite end resistors connected to the resistance network to be indexed is 0, which indicates that the line reaches the end, and at this time, the resistance network to be indexed may or may not be the end point resistance network.
If the resistance network to be indexed is the terminal resistance network, the terminal resistance network and the resistance network to be indexed before the terminal resistance network, which is not stored in the effective resistance network table, can be stored in the effective resistance network table; the opposite end resistor before the end resistance network that is not stored in the effective resistor table is stored in the effective resistor table. After the above process is completed, the nearest resistor network connected with two or more resistors can be returned, so that a pair of end resistors is randomly selected from the end resistors which are not traversed, and the traversal is continued.
Step S118, until the resistors in the resistor index table and the resistor networks in the resistor network index table are traversed, acquiring all effective resistor networks in the effective resistor network table and all effective resistors in the effective resistor network table.
After the resistors in the resistor index table and the resistor networks in the resistor network index table are traversed, all the effective resistor networks can be obtained from the effective resistor network table, and all the effective resistors can be obtained from the effective resistor table.
The method can be used for dividing various different conditions according to the number of the opposite end resistors connected with the resistor network to be indexed, and then performing specific analysis on each condition, so that the resistors in the resistor index table and the resistor network in the resistor network index table are traversed, and the effective resistors and the effective resistor network can be accurately and quickly acquired by the method.
The process of obtaining the effective resistor and the effective resistor network will be described with reference to specific examples:
referring to fig. 5 and 6, fig. 5 shows a schematic circuit diagram of an equivalent resistance value to be calculated, fig. 6 is an equivalent circuit diagram of the circuit diagram shown in fig. 5, V-OUT in fig. 5 is an output point, FB is a feedback point, and ROVP is an overvoltage detection point, and whether the feedback voltage value of FB is correct or not can be determined by calculating the equivalent resistance value between the two points V-OUT and FB. Therefore, net1 connected to V-OUT can be used as the starting point resistor network, and net6 connected to FB can be used as the ending point resistor network.
The network 1, the network 2, the network 3, the network 4, the network 5, the network 6, the network 7 and the network 8 are all stored in a resistance network index table, and resistors respectively connected to each of a plurality of resistance networks are also stored in the resistance network index table, for example, the resistor connected to the network 1 is R1; the resistors connected by net2 are R1, R2; the resistors connected with net3 are R2, R3 and R5; the resistors connected by net4 are R3, R4; the resistors connected with net5 are R4, R5, R6, R7 and R8; the net6 connection resistor is R6; the net7 connection resistor is R7; the net8 connection resistor is R8.
Optionally, the resistance network index table may be a hash table HashNET a, and the storage form of all resistance networks in the hash table HashNET a is as follows:
{net1(R1)}
{net2(R1 R2)}
{net3(R2 R3 R5)}
{net4(R3 R4)}
{net5(R4 R5 R6 R7 R8)}
{net6(R6)}
{net7(R7)}
{net8(R8)}
optionally, a copy HashNET B of the hashtable HashNET a may also be established to facilitate real-time deletion of traversed resistor networks or resistors as the traversal of the active resistors and active resistor networks proceeds, so that repeated traversal may be avoided.
R1, R2, R3, R4, R5, R6, R7, and R8 are stored in a resistor index table, in which the resistance value of each resistor and the resistance network connected across each resistor are also stored. For example, R1 ═ 1000 Ω, R2 ═ 1000 Ω, R3 ═ 1000 Ω, R4 ═ 1000 Ω, R5 ═ 2000 Ω, R6 ═ 1000 Ω, R7 ═ 4700 Ω, and R8 ═ 15000 Ω are stored in the resistor index table. The resistor network connected with R1 is net1 and net 2; the resistor network connected with R2 is net2 and net 3; the resistor network connected with R3 is net3 and net 4; the resistor network connected with R4 is net4 and net 5; the resistor network connected with R5 is net3 and net 5; the resistor network connected with R6 is net5 and net 6; the resistor network connected with R7 is net5 and net 7; the resistor networks connected by the R8 are net5 and net 8.
Alternatively, the resistor index table may be a hash table HashR, and all resistors are stored in the hash table HashR in the form of:
{R1(net1 net2 1000)}
{R2(net2 net3 1000)}
{R3(net3 net4 1000)}
{R4(net4 net5 1000)}
{R5(net3 net5 2000)}
{R6(net5 net6 1000)}
{R7(net5 net7 4700)}
{R8(net5 net8 15000)}
meanwhile, an effective resistance network table storing an effective resistance network, and an effective resistor table storing effective resistors may be defined in advance.
Starting from the starting point resistor network net1, the resistor R1 connected to net1 is obtained from the resistor network index table. Since the resistor R1 is the only resistor of net1 and is also the only opposite-end resistor, the resistor networks net1 and net2 connected to R1 can be obtained from the resistor index table.
Since net1 is a traversed resistor network and net2 is a resistor network that is not traversed and is in the direction of extension of the traversal direction, the opposite resistor network of R1 is net2, and with net2 as the new resistor network to be indexed, resistors R1 and R2 connected by net2 are obtained.
Since R1 is a traversed resistor and R2 is a resistor that is not traversed and in the direction of extension of the traversal direction, R2 is the only opposite end resistor of net 2. Therefore, the resistance networks net2 and net3 connected to R2 can be obtained from the resistor index table.
Since net2 is a traversed resistor network and net3 is a resistor network that is not traversed and is in the direction of extension of the traversal direction, the opposite resistor network of R2 is net3, and with net3 as the new resistor network to be indexed, resistors R2, R3, and R5 connected to net3 are obtained.
Since R2 is a traversed resistor, R3 and R5 are resistors that are not traversed and in the direction of extension of the direction of traversal, the opposite end resistor of net3 includes two of R3 and R5. At this time, the current resistance network to be indexed (i.e. net3) and the resistance networks before the resistance network to be indexed (i.e. net1 and net2) which are not stored in the effective resistance network table can be stored in the effective resistance network table; the opposite end resistors (i.e., R1 and R2) that were not stored in the table of effective resistors before the resistor network was to be indexed are stored in the table of effective resistors.
Then for both the pair of end resistors R3 and R5, the step of obtaining the end-to-end resistance network of resistors can be continued by randomly selecting one end-to-end resistor. Assuming that the randomly selected peer resistor is R3, the peer resistor network net4 of R3 is obtained from the resistor index table, and since the peer resistor of net4 has only one of R4, the peer resistor network net5 of R4 is continuously obtained.
For net5, its opposite end resistors are known as R5, R6, R7 and R8, so that the resistance network before net5 and net5 (i.e. net4) which is not stored in the effective resistance network table is stored in the effective resistance network table; the resistors before net5 that were not stored in the effective resistor table (i.e., R3 and R4) are stored in the effective resistor table. At this time, five resistor networks of net1, net2, net3, net4 and net5 are arranged in the effective resistor network table; the effective resistor table has four resistors R1, R2, R3, R4.
Then for the four opposing resistors R5, R6, R7, R8, the step of obtaining the opposing resistor network of resistors can continue with the random selection of one of the opposing resistors.
Assuming that the randomly selected opposite end resistor is R5, the resistor networks connected by R5 are net3 and net5, and the resistor network in the traversal extension direction of R5 is net3 according to the resistor index table, however, net3 is already stored in the effective resistor network table, and thus, it indicates that R5 is connected on the loop. At this time, the resistor R5 may be stored in the effective resistor table while the resistor R5 connected to net3 is deleted in the resistance network index table, thereby avoiding repeated traversals, such as modifying the record { net3 (R2R 3R 5) } in the hash table HashNET B to { net3 (R2R 3) }. At this time, the effective resistor table is updated to have five resistors R1, R2, R3, R4, R5.
After traversing the leg where the resistor R5 is completed, it is possible to return to net5 and continue to perform the step of obtaining the resistor's network of peer resistors by continuing to randomly select one peer resistor from the remaining three peer resistors R6, R7, R8.
Assuming that the counter resistor selected randomly again is R7, the resistor networks connected by R7 are net5 and net7, and the resistor network in the traversal extension direction of R7 (i.e., the counter resistor network of R7) is net7, which is obtained from the resistor index table. For net7, it can be seen from the resistance network index table that the resistor connected to net7 has only R7, i.e. net7 has no opposite end resistor, indicating that net7 is the end of the branch where resistor R7 is located. Further judging whether net7 is the end point resistance network, obviously, net7 is not the end point resistance network, therefore, R7 and net7 are not processed continuously, and returning to net5 again, the record { net5 (R4R 5R 6R 7R 8) } in hash table HashNET B is modified to { net5 (R4R 5R 6R 8) }, and the step of obtaining the opposite end resistance network of resistors is continuously executed by randomly selecting one opposite end resistor from the remaining two opposite end resistors R6 and R8.
If the opposite resistor selected randomly again is not R6, then the resistor networks connected by R6 are net5 and net6 according to the resistor index table, and the resistor network in the traversal extension direction of R6 (i.e., the opposite resistor network of R6) is net 6. For net6, it can be seen from the resistance network index table that the resistor connected to net6 has only R6, i.e. net6 has no opposite end resistor, indicating that net6 is the end of the branch where resistor R6 is located. Further determining if net6 is the endpoint resistance network, it is clear that net6 is the endpoint resistance network, so R6 can be stored in the effective resistor table and net6 can be stored in the effective resistor network table. At this time, the effective resistor table is updated to have six resistors R1, R2, R3, R4, R5, R6; the effective resistance network table has six resistance networks of net1, net2, net3, net4, net5 and net 6. Returning again to net5, the step of obtaining the resistor's peer resistance network is performed for the remaining last peer resistor R8.
The resistance networks connected by R8 are net5 and net8, and the resistance network in the traversal extension direction of R8 (i.e., the opposite-end resistance network of R8) is net8, which is obtained from the resistor index table. For net8, it can be seen from the resistance network index table that the resistor connected to net8 has only R8, i.e. net8 has no opposite end resistor, indicating that net8 is the end of the branch where resistor R8 is located. Further judging whether net8 is the end point resistance network, obviously, net8 is not the end point resistance network, therefore, R8 and net8 are not processed, and returning to net5 again, the record { net5 (R4R 5R 6R 8) } in hash table HashNET B is modified to { net5 (R4R 5R 6) }.
Since the traversal of the plurality of opposite resistors of the net5 is completed, and therefore, returning to the net3 again, since the connection relationship between the net3 and the R5 has been deleted in the above steps, the opposite resistors connected to the net3 resistor network have also been completely traversed, so far, the effective resistor table of the circuit diagram shown in fig. 6 can be obtained, which is composed of six resistors R1, R2, R3, R4, R5, and R6, and which is composed of six resistor networks net1, net2, net3, net4, net5, and net6, see fig. 7.
And step S120, alternately carrying out series combination and parallel combination on all the effective resistance networks and all the effective resistors to obtain the equivalent resistance value between the starting point resistance network and the end point resistance network.
After all the effective resistor networks and the effective resistors are obtained, the effective resistors can be combined in series; then after the condition that no resistor which can be subjected to series combination exists, carrying out parallel combination on the updated resistor; then after proceeding to the case where there are no resistors that can be combined in parallel, series combining is again performed … until there is only one resistor combined between the starting and ending resistor networks.
In one embodiment, the series combination of all the effective resistor networks and all the effective resistors includes the following steps:
acquiring an effective resistance network which is only connected with two resistors in all the effective resistance networks; calculating the series resistance value of two resistors corresponding to the effective resistance network only connecting the two resistors; deleting any one of the two resistors corresponding to the effective resistance network connecting only the two resistors from the all effective resistors, and changing the resistance value of the other one of the two resistors to the series resistance value; deleting the effective resistance network only connecting the two resistors from the total effective resistance network to obtain a new total effective resistance network, and executing the following steps: and acquiring an effective resistance network in which only two resistors are connected in one of all the effective resistance networks until the effective resistance network in which only two resistors are connected does not exist in all the effective resistance networks.
In a specific embodiment, the parallel combination of all the effective resistor networks and all the effective resistors specifically includes the following steps:
for each of the total number of active resistors, determining whether there is an active resistor in the same active resistor network as the active resistor; if an effective resistor which is the same as the effective resistor network connected with the effective resistor exists, calculating the parallel resistance value of the two effective resistors; deleting any one of the two effective resistors for calculating the parallel resistance value from all the effective resistors, changing the resistance value of the other effective resistor for calculating the parallel resistance value into the parallel resistance value, obtaining a new total effective resistor, and executing the following steps: for each of the total number of active resistors, determining whether there is an active resistor that is the same as the active resistor network to which the active resistor is connected until there is no active resistor that is the same as the active resistor network to which the active resistor is connected for each of the total number of active resistors.
The above examples continue to illustrate:
each effective resistor network of net1, net2, net3, net4, net5 and net6 can be judged by combining with a resistor network index table (i.e. hash table HashNET a), and whether an effective resistor network only connects two effective resistors is judged, see fig. 7, and both net2 and net4 only connect two effective resistors.
For R1 and R2 connected to net2, a series resistance value (1000 Ω +1000 Ω ═ 2000 Ω) of R1 and R2 is obtained, then the series resistance value may be assigned to either one of R1 and R2, for example, without being assigned to R1, another resistor R2 is deleted in the effective resistor table and net2 is deleted in the effective resistance network table, { R1(net1 net 21000) } in HashR is replaced with { R1(net1 net 32000) }, { R2(net2 net 31000) } in HashR is deleted, { net2 (R1R 2) } in HashNetA is deleted, { 2 (R2) } { 2 (R2) } in hashnet a is modified as an equivalent circuit diagram as shown in fig. 7.
R3 and R4 connected to net4 obtain a series resistance value (1000 Ω +1000 Ω ═ 2000 Ω) of R3 and R4, and then may assign the series resistance value to either one of R3 and R4, for example, without assigning it to R3, and delete another resistor R4 in the effective resistor table and delete net4 in the effective resistance network table, and an equivalent circuit diagram as shown in fig. 9 may be obtained, at which there is no resistor that can be combined in series.
Starting with the parallel combination of the equivalent circuit diagram shown in fig. 9, the resistor network across R3 is the same as the resistor network across R5 in the four resistors R1, R3, R5 and R6, indicating that R3 is in parallel with R5, and that R3 can be combined in parallel with R5. Obtaining a parallel resistance value (2000 Ω × 2000 Ω)/(2000 Ω +2000 Ω) } 1000 Ω of R3 and R5, then a parallel resistance value may be assigned to either one of R3 and R5, and not to R3, deleting the other resistor R5 in the effective resistor table, deleting { R5(net3 net 32000) } in HashR, modifying { R3(net3 net) 32000 } in HashR to { R3(net3 net 31000), modifying { net3 (R1R 3R 5) } in HashNetA to { net 53 (R1R 3) }, modifying { net7 (R3R 5) } in HashNetA to { net5 (R5) }, and obtaining an equivalent net 847 (R5) shown in fig. 10, and then a parallel circuit may not be merged.
Then, the equivalent circuit diagram shown in fig. 10 is serially combined, that is, R1 and R3 may be serially combined first, and then the combined result of R6, R1 and R3 that are serially combined continues to be serially combined, so that the equivalent circuit diagram shown in fig. 11 may be obtained finally, and the specific steps include: deleting { R3(net3 net 51000) } in HashR; delete { R6(net5 net 61000) } in HashR; the { R1(net1 net 32000) } in HashR is modified to { R1(net1 net 34000) }. Delete R3, R6 in the effective resistor table. At this time, only one of the resistors R1 is recorded in the effective resistor table, and it can be determined that all the combination calculations are completed. The resistance value of R1 is [1000 Ω + (2000 Ω +1000 Ω) ], which is 4000 Ω, that is, the resistance value of the equivalent resistor between the starting resistor network and the ending resistor network.
Referring to fig. 3, fig. 3 shows steps before step S110, and specifically includes the following steps S101 to S104:
step S101, traversing a target circuit to be subjected to equivalent resistance value calculation, and obtaining the resistance value of each resistor in all resistors of the target circuit and two resistor networks respectively connected with each resistor.
Step S102, storing the identifier of each resistor, the resistance value corresponding to each resistor, and the information of the two resistor networks connected to each resistor into a resistor index table.
Step S103, at least one resistor connected with each resistor network in all resistor networks of the target circuit is obtained.
Step S104, storing the identification of each resistance network in all the resistance networks and the information of at least one resistor connected with each resistance network into a resistance network index table.
The target circuit can be traversed to obtain all resistors and all resistance networks of the target circuit, and then the connection relation between the resistors and the resistance networks is stored in the resistor index table and the resistance network index table to prepare for subsequent processing steps.
Referring to fig. 4, fig. 4 shows an equivalent resistance value calculation apparatus provided in an embodiment of the present application, where the apparatus 400 includes:
the effective data obtaining module 410 is configured to traverse a target circuit to be subjected to equivalent resistance value calculation according to a resistor index table and a resistor network index table, and obtain all effective resistor networks and all effective resistors between a starting-point resistor network and an ending-point resistor network of the target circuit; the resistor index table stores the identifier of each resistor in all resistors of the target circuit, the resistance value corresponding to each resistor, and information of two resistor networks connected to each resistor, and the resistor network index table stores the identifier of each resistor network in all resistor networks of the target circuit and information of at least one resistor connected to each resistor network.
An equivalent resistance obtaining module 420, configured to alternately perform series combination and parallel combination on all the effective resistance networks and all the effective resistors, so as to obtain an equivalent resistance value between the starting point resistance network and the ending point resistance network.
The valid data obtaining module 410 is specifically configured to: taking the starting point resistance network as a resistance network to be indexed; acquiring at least one resistor connected with the resistance network to be indexed according to the resistance network index table; if the number of the opposite end resistors connected with the resistance network to be indexed is one, acquiring the identifier of the opposite end resistor, and acquiring the opposite end resistance network of the opposite end resistor according to the identifier of the opposite end resistor and the resistor index table; taking the opposite terminal resistance network as the resistance network to be indexed, and executing the following steps: acquiring at least one resistor connected with the resistance network to be indexed according to the resistance network index table; if the number of the opposite end resistors connected with the resistance network to be indexed is larger than or equal to two, storing the resistance network to be indexed and the resistance network to be indexed which is not stored in an effective resistance network table before the resistance network to be indexed into the effective resistance network table, and storing the opposite end resistor which is not stored in the effective resistance network table before the resistance network to be indexed and corresponds to the resistance network to be indexed into the effective resistance table; for each of the two or more peer resistors, performing the steps of: acquiring the identifier of the opposite end resistor, and acquiring an opposite end resistance network of the opposite end resistor according to the identifier of the opposite end resistor and the resistor index table; if the opposite-end resistance network of the opposite-end resistor is stored in the effective resistance network table, judging that the resistance network in which the effective resistance network table is stored is not connected with the opposite-end resistor; if the number of the opposite-end resistors connected with the to-be-indexed resistor network is 0 and the to-be-indexed resistor network is an end-point resistor network, storing the end-point resistor network and the to-be-indexed resistor network which is not stored in an effective resistor network table and is before the end-point resistor network into the effective resistor network table, and storing the opposite-end resistor which is not stored in the effective resistor table and corresponds to the to-be-indexed resistor network before the end-point resistor network into the effective resistor table; and acquiring all effective resistor networks in the effective resistor network table and all effective resistors in the effective resistor network table until the resistors in the resistor index table and the resistor networks in the resistor network index table are traversed.
The equivalent resistance obtaining module 420 is specifically configured to: acquiring an effective resistance network which is only connected with two resistors in all the effective resistance networks; calculating the series resistance value of two resistors corresponding to the effective resistance network only connecting the two resistors; deleting any one of the two resistors corresponding to the effective resistance network connecting only the two resistors from the all effective resistors, and changing the resistance value of the other one of the two resistors to the series resistance value; deleting the effective resistance network only connecting the two resistors from the total effective resistance network to obtain a new total effective resistance network, and executing the following steps: and acquiring an effective resistance network in which only two resistors are connected in one of all the effective resistance networks until the effective resistance network in which only two resistors are connected does not exist in all the effective resistance networks.
The equivalent resistance obtaining module 420 is further specifically configured to: for each of the total number of active resistors, determining whether there is an active resistor in the same active resistor network as the active resistor; if an effective resistor which is the same as the effective resistor network connected with the effective resistor exists, calculating the parallel resistance value of the two effective resistors; deleting any one of the two effective resistors for calculating the parallel resistance value from all the effective resistors, changing the resistance value of the other effective resistor for calculating the parallel resistance value into the parallel resistance value, obtaining a new total effective resistor, and executing the following steps: for each of the total number of active resistors, determining whether there is an active resistor that is the same as the active resistor network to which the active resistor is connected until there is no active resistor that is the same as the active resistor network to which the active resistor is connected for each of the total number of active resistors.
The device also comprises an information acquisition module, a data acquisition module and a data processing module, wherein the information acquisition module is used for traversing a target circuit to be subjected to equivalent resistance value calculation, and acquiring the resistance value of each resistor in all resistors of the target circuit and two resistor networks respectively connected with each resistor; storing the identification of each resistor in all the resistors, the resistance value corresponding to each resistor and the information of two resistor networks connected with each resistor into a resistor index table; acquiring at least one resistor connected with each resistor network in all resistor networks of the target circuit; and storing the identification of each resistance network in all the resistance networks and the information of at least one resistor connected with each resistance network into a resistance network index table.
The equivalent resistance value calculation apparatus shown in fig. 6 corresponds to the equivalent resistance value calculation method shown in fig. 1, and is not described herein again.
In the embodiments provided in the present application, it should be understood that the disclosed apparatus and method may be implemented in other ways. The above-described embodiments of the apparatus are merely illustrative, and for example, the division of the units is only one logical division, and there may be other divisions when actually implemented, and for example, a plurality of units or components may be combined or integrated into another system, or some features may be omitted, or not executed. In addition, the shown or discussed mutual coupling or direct coupling or communication connection may be an indirect coupling or communication connection of devices or units through some communication interfaces, and may be in an electrical, mechanical or other form.
In addition, units described as separate parts may or may not be physically separate, and parts displayed as units may or may not be physical units, may be located in one place, or may be distributed on a plurality of network units. Some or all of the units can be selected according to actual needs to achieve the purpose of the solution of the embodiment.
Furthermore, the functional modules in the embodiments of the present application may be integrated together to form an independent part, or each module may exist separately, or two or more modules may be integrated to form an independent part.
In this document, relational terms such as first and second, and the like may be used solely to distinguish one entity or action from another entity or action without necessarily requiring or implying any actual such relationship or order between such entities or actions.
The above description is only an example of the present application and is not intended to limit the scope of the present application, and various modifications and changes may be made by those skilled in the art. Any modification, equivalent replacement, improvement and the like made within the spirit and principle of the present application shall be included in the protection scope of the present application.

Claims (7)

1. An equivalent resistance value calculation method, characterized by comprising:
traversing a target circuit to be subjected to equivalent resistance value calculation according to a resistor index table and a resistor network index table to obtain all effective resistor networks and all effective resistors between a starting point resistor network and a finishing point resistor network of the target circuit; the resistor index table stores the identification of each resistor in all resistors of the target circuit, the resistance value corresponding to each resistor and the information of two resistor networks connected to each resistor, and the resistor network index table stores the identification of each resistor network in all resistor networks of the target circuit and the information of at least one resistor connected to each resistor network;
alternately carrying out series combination and parallel combination on all the effective resistance networks and all the effective resistors to obtain an equivalent resistance value between the starting point resistance network and the end point resistance network;
wherein said combining all of said effective resistor networks and all of said effective resistors in series comprises:
acquiring an effective resistance network which is only connected with two resistors in all the effective resistance networks;
calculating the series resistance value of two resistors corresponding to the effective resistance network only connecting the two resistors;
deleting any one of the two resistors corresponding to the effective resistance network connecting only the two resistors from the all effective resistors, and changing the resistance value of the other one of the two resistors to the series resistance value;
deleting the effective resistance network only connecting the two resistors from the total effective resistance network to obtain a new total effective resistance network, and executing the following steps: obtaining an effective resistance network which is only connected with two resistors in all the effective resistance networks until the effective resistance network which is only connected with two resistors does not exist in all the effective resistance networks;
the parallel combination of all effective resistor networks and all effective resistors comprises:
for each of the total number of active resistors, determining whether there is an active resistor in the same active resistor network as the active resistor;
if an effective resistor which is the same as the effective resistor network connected with the effective resistor exists, calculating the parallel resistance value of the two effective resistors;
deleting any one of the two effective resistors for calculating the parallel resistance value from all the effective resistors, changing the resistance value of the other effective resistor for calculating the parallel resistance value into the parallel resistance value, obtaining a new total effective resistor, and executing the following steps: for each of the total number of active resistors, determining whether there is an active resistor that is the same as the active resistor network to which the active resistor is connected until there is no active resistor that is the same as the active resistor network to which the active resistor is connected for each of the total number of active resistors.
2. The method of claim 1, wherein traversing a target circuit to be subjected to equivalent resistance value calculation according to a resistor index table and a resistor network index table to obtain all effective resistor networks and all effective resistors between a starting point resistor network and an end point resistor network of the target circuit comprises:
taking the starting point resistance network as a resistance network to be indexed;
acquiring at least one resistor connected with the resistance network to be indexed according to the resistance network index table;
if the number of the opposite end resistors connected with the resistance network to be indexed is one, acquiring the identifier of the opposite end resistor, and acquiring the opposite end resistance network of the opposite end resistor according to the identifier of the opposite end resistor and the resistor index table; taking the opposite terminal resistance network as the resistance network to be indexed, and executing the following steps: acquiring at least one resistor connected with the resistance network to be indexed according to the resistance network index table;
if the number of the opposite end resistors connected with the resistance network to be indexed is larger than or equal to two, storing the resistance network to be indexed and the resistance network to be indexed which is not stored in an effective resistance network table before the resistance network to be indexed into the effective resistance network table, and storing the opposite end resistor which is not stored in the effective resistance network table before the resistance network to be indexed and corresponds to the resistance network to be indexed into the effective resistance table;
for each of the two or more peer resistors, performing the steps of: acquiring the identifier of the opposite end resistor, and acquiring an opposite end resistance network of the opposite end resistor according to the identifier of the opposite end resistor and the resistor index table; if the opposite-end resistance network of the opposite-end resistor is stored in the effective resistance network table, judging that the resistance network in which the effective resistance network table is stored is not connected with the opposite-end resistor;
if the number of the opposite-end resistors connected with the to-be-indexed resistor network is 0 and the to-be-indexed resistor network is an end-point resistor network, storing the end-point resistor network and the to-be-indexed resistor network which is not stored in an effective resistor network table and is before the end-point resistor network into the effective resistor network table, and storing the opposite-end resistor which is not stored in the effective resistor table and corresponds to the to-be-indexed resistor network before the end-point resistor network into the effective resistor table;
and acquiring all effective resistor networks in the effective resistor network table and all effective resistors in the effective resistor network table until the resistors in the resistor index table and the resistor networks in the resistor network index table are traversed.
3. The method of claim 1, wherein before traversing the target circuit to be subjected to the equivalent resistance value calculation according to the resistor index table and the resistor network index table to obtain all effective resistor networks and all effective resistors between the starting resistor network and the ending resistor network of the target circuit, the method further comprises:
traversing a target circuit to be subjected to equivalent resistance value calculation, and obtaining the resistance value of each resistor in all resistors of the target circuit and two resistor networks respectively connected with each resistor;
storing the identification of each resistor in all the resistors, the resistance value corresponding to each resistor and the information of two resistor networks connected with each resistor into a resistor index table;
acquiring at least one resistor connected with each resistor network in all resistor networks of the target circuit;
and storing the identification of each resistance network in all the resistance networks and the information of at least one resistor connected with each resistance network into a resistance network index table.
4. An equivalent resistance value calculation apparatus, characterized in that the apparatus comprises:
the effective data acquisition module is used for traversing a target circuit to be subjected to equivalent resistance value calculation according to a resistor index table and a resistor network index table to obtain all effective resistor networks and all effective resistors between a starting point resistor network and a terminal point resistor network of the target circuit; the resistor index table stores the identification of each resistor in all resistors of the target circuit, the resistance value corresponding to each resistor and the information of two resistor networks connected to each resistor, and the resistor network index table stores the identification of each resistor network in all resistor networks of the target circuit and the information of at least one resistor connected to each resistor network;
the equivalent resistance acquisition module is used for alternately carrying out series combination and parallel combination on all the effective resistance networks and all the effective resistors to obtain an equivalent resistance value between the starting point resistance network and the end point resistance network;
the equivalent resistance acquisition module is specifically used for acquiring an effective resistance network in which only two resistors are connected in one of all effective resistance networks; calculating the series resistance value of two resistors corresponding to the effective resistance network only connecting the two resistors; deleting any one of the two resistors corresponding to the effective resistance network connecting only the two resistors from the all effective resistors, and changing the resistance value of the other one of the two resistors to the series resistance value; deleting the effective resistance network only connecting the two resistors from the total effective resistance network to obtain a new total effective resistance network, and executing the following steps: obtaining an effective resistance network which is only connected with two resistors in all the effective resistance networks until the effective resistance network which is only connected with two resistors does not exist in all the effective resistance networks;
the equivalent resistance obtaining module is specifically configured to determine, for each effective resistor of all the effective resistors, whether there is an effective resistor that is the same as an effective resistor network connected to the effective resistor; if an effective resistor which is the same as the effective resistor network connected with the effective resistor exists, calculating the parallel resistance value of the two effective resistors; deleting any one of the two effective resistors for calculating the parallel resistance value from all the effective resistors, changing the resistance value of the other effective resistor for calculating the parallel resistance value into the parallel resistance value, obtaining a new total effective resistor, and executing the following steps: for each of the total number of active resistors, determining whether there is an active resistor that is the same as the active resistor network to which the active resistor is connected until there is no active resistor that is the same as the active resistor network to which the active resistor is connected for each of the total number of active resistors.
5. The apparatus of claim 4, wherein the valid data acquisition module is specifically configured to:
taking the starting point resistance network as a resistance network to be indexed;
acquiring at least one resistor connected with the resistance network to be indexed according to the resistance network index table;
if the number of the opposite end resistors connected with the resistance network to be indexed is one, acquiring the identifier of the opposite end resistor, and acquiring the opposite end resistance network of the opposite end resistor according to the identifier of the opposite end resistor and the resistor index table; taking the opposite terminal resistance network as the resistance network to be indexed, and executing the following steps: acquiring at least one resistor connected with the resistance network to be indexed according to the resistance network index table;
if the number of the opposite end resistors connected with the resistance network to be indexed is larger than or equal to two, storing the resistance network to be indexed and the resistance network to be indexed which is not stored in an effective resistance network table before the resistance network to be indexed into the effective resistance network table, and storing the opposite end resistor which is not stored in the effective resistance network table before the resistance network to be indexed and corresponds to the resistance network to be indexed into the effective resistance table;
for each of the two or more peer resistors, performing the steps of: acquiring the identifier of the opposite end resistor, and acquiring an opposite end resistance network of the opposite end resistor according to the identifier of the opposite end resistor and the resistor index table; if the opposite-end resistance network of the opposite-end resistor is stored in the effective resistance network table, judging that the resistance network in which the effective resistance network table is stored is not connected with the opposite-end resistor;
if the number of the opposite-end resistors connected with the to-be-indexed resistor network is 0 and the to-be-indexed resistor network is an end-point resistor network, storing the end-point resistor network and the to-be-indexed resistor network which is not stored in an effective resistor network table and is before the end-point resistor network into the effective resistor network table, and storing the opposite-end resistor which is not stored in the effective resistor table and corresponds to the to-be-indexed resistor network before the end-point resistor network into the effective resistor table;
and acquiring all effective resistor networks in the effective resistor network table and all effective resistors in the effective resistor network table until the resistors in the resistor index table and the resistor networks in the resistor network index table are traversed.
6. An electronic device, comprising: a processor, a storage medium and a bus, the storage medium storing machine-readable instructions executable by the processor, the processor and the storage medium communicating over the bus when the electronic device is operating, the processor executing the machine-readable instructions to perform the method of any one of claims 1-3 when executed.
7. A readable storage medium, having stored thereon a computer program which, when executed by a processor, performs the method according to any one of claims 1-3.
CN201911371517.0A 2019-12-25 2019-12-25 Equivalent resistance value calculation method and device, electronic equipment and readable storage medium Active CN111007318B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201911371517.0A CN111007318B (en) 2019-12-25 2019-12-25 Equivalent resistance value calculation method and device, electronic equipment and readable storage medium

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201911371517.0A CN111007318B (en) 2019-12-25 2019-12-25 Equivalent resistance value calculation method and device, electronic equipment and readable storage medium

Publications (2)

Publication Number Publication Date
CN111007318A CN111007318A (en) 2020-04-14
CN111007318B true CN111007318B (en) 2021-12-17

Family

ID=70118760

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201911371517.0A Active CN111007318B (en) 2019-12-25 2019-12-25 Equivalent resistance value calculation method and device, electronic equipment and readable storage medium

Country Status (1)

Country Link
CN (1) CN111007318B (en)

Families Citing this family (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN113051860A (en) * 2021-03-29 2021-06-29 深圳华大九天科技有限公司 Equivalent resistance calculation method, electronic device, server, and storage medium

Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN102087317A (en) * 2010-11-11 2011-06-08 大连理工大学 Linear real-time estimation method of conductivity resistance-capacitance network parameter
CN102646143A (en) * 2011-11-30 2012-08-22 清华大学 Conductance matrix construction method and system in simulation of on-chip power supply network
CN103020357A (en) * 2012-12-13 2013-04-03 迈普通信技术股份有限公司 Checking method and device for circuit network topology matching
CN103219983A (en) * 2013-04-16 2013-07-24 杭州电子科技大学 Memristor equivalent simulation circuit

Family Cites Families (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US7388387B2 (en) * 2006-01-11 2008-06-17 Stratosphere Solutions, Inc. Method and apparatus for measurement of electrical resistance

Patent Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN102087317A (en) * 2010-11-11 2011-06-08 大连理工大学 Linear real-time estimation method of conductivity resistance-capacitance network parameter
CN102646143A (en) * 2011-11-30 2012-08-22 清华大学 Conductance matrix construction method and system in simulation of on-chip power supply network
CN103020357A (en) * 2012-12-13 2013-04-03 迈普通信技术股份有限公司 Checking method and device for circuit network topology matching
CN103219983A (en) * 2013-04-16 2013-07-24 杭州电子科技大学 Memristor equivalent simulation circuit

Non-Patent Citations (1)

* Cited by examiner, † Cited by third party
Title
"大规模电阻网络等效电阻快速求解算法";刘建国 等;《杭州电子工业学院学报》;20011225;第21卷(第6期);第65-70页 *

Also Published As

Publication number Publication date
CN111007318A (en) 2020-04-14

Similar Documents

Publication Publication Date Title
CN109241415A (en) Item recommendation method, device, computer equipment and storage medium
CN111064614A (en) Fault root cause positioning method, device, equipment and storage medium
CN111062013B (en) Account filtering method and device, electronic equipment and machine-readable storage medium
CN108021982A (en) Data transmission method and system, electronic equipment
EP2442248B1 (en) Coupling method for non-iterative co-simulation
CN108388509B (en) Software testing method, computer readable storage medium and terminal equipment
CN111007318B (en) Equivalent resistance value calculation method and device, electronic equipment and readable storage medium
CN111428095B (en) Graph data quality verification method and graph data quality verification device
CN104184601B (en) The acquisition methods and device of user's online hours
CN109240893B (en) Application running state query method and terminal equipment
CN115774707B (en) Object attribute-based data processing method and device, electronic equipment and storage medium
CN108197086B (en) Passive element parameter analysis method and device
CN110147353B (en) MongoDB data migration monitoring method and device based on log analysis
CN108376054B (en) Processing method and device for indexing identification data
CN115828803A (en) Netlist reduction method, chip verification method and computer storage medium
CN111523921B (en) Funnel analysis method, analysis device, electronic device, and readable storage medium
CN112149696A (en) Method and device for training graph embedding model
Goremykin A novel test for absolute fit of evolutionary models provides a means to correctly identify the substitution model and the model tree
CN106557334B (en) Method and device for judging completion of crawler task
CN111077859A (en) Production process control method, device and system
CN112966764B (en) Pattern comparison method and device
CN110096555B (en) Table matching processing method and device for distributed system
CN112000709B (en) Social media information total exposure batch mining method and device
CN115495911B (en) Model renaming method, device and storage medium
CN113609125B (en) IP address matching method, device, equipment and computer readable storage medium

Legal Events

Date Code Title Description
PB01 Publication
PB01 Publication
SE01 Entry into force of request for substantive examination
SE01 Entry into force of request for substantive examination
GR01 Patent grant
GR01 Patent grant