How would I calculate for the equivalent resistance of a generated network/grid of resistors?

20 次查看(过去 30 天)
I have created a program that draws a lattice from a heap of coins through bob analysis. Basically, it draws the lattice using the centroids of the objects detected and it only draws a line between the centroids when the two objects are in contact. Below is a sample image of the blob detection and lattice drawing. What I am trying to do next is measure the effective resistance of the network of coins which were measured to have a resistance of 606 ohms each. How do I calculate for the effective resistance assuming that the network is arranged in parallel/series?
  2 个评论
Sean Ivan Roxas
Sean Ivan Roxas 2022-3-15
Oh right I did not make this clear. I'm trying to calculate the resistance between the leftmost coin and the rightmost coin that are touching the conductive walls (cropped out of image) assuming that the network of coins is a combination of parallel and series resistors.
We actually conducted an experiment wherein we measured the effective resistance of the coin heap by probing on the conductive walls, what I'm trying to do now is create a program that does the measuring via image processing.

请先登录,再进行评论。

回答(1 个)

Aishwarya
Aishwarya 2024-2-5
Hi Sean,
To determine the effective resistance of the network of coins, the principles from graph theory can be applied. In graph theory, the effective resistance between two nodes in an electrical network can be calculated using the Laplacian matrix of the graph. The effective resistance ( R_{eff} ) between two nodes ( i ) and ( j ) can be found using the formula:
R_{eff} = (e_i - e_j)^T L^+ (e_i - e_j)
where ( L^+ ) is the Moore-Penrose pseudoinverse of the Laplacian matrix of the graph, ( e_i ) and ( e_j ) are the standard basis vectors with 1 at the ( i )-th and ( j )-th positions, respectively, and 0 elsewhere.
Assuming that you have the adjacency matrix A of the graph, where A(i,j) is 1 if there is a resistor between node i and j, and 0 otherwise. This matrix can help visualize the connections in your network and identify nodes connected to the conductive plates.
Here is an example of how to visualize the network:
% Create a graph object from the adjacency matrix
G = graph(A);
% Plot the graph
figure;
plot(G, 'Layout', 'force');
title('Graph Representation of the resistor network');
Assuming nodes 1 and 10 are connected to the conductive plates, here’s how to calculate the effective resistance between these two nodes:
% Resistance of each edge
R_edge = 606;
% Degree matrix
D = diag(sum(A, 2));
% Laplacian matrix
L = D - A;
% Calculate the Moore-Penrose pseudoinverse of the Laplacian matrix
L_pinv = pinv(L);
numNodes = size(A, 2);
% Basis vectors for nodes 10 and 1
e_10 = zeros(numNodes, 1);
e_10(10) = 1;
e_1 = zeros(numNodes, 1);
e_1(1) = 1;
% Calculate effective resistance
R_eff = (e_10 - e_1)' * L_pinv * (e_10 - e_1) * R_edge;
% Display the effective resistance
disp(['The effective resistance between nodes 10 and 1 is: ' num2str(R_eff) ' Ohms']);
The effective resistance between nodes 10 and 1 is: 2146.0183 Ohms
Please refer to the below documentation for more information about the function used:
Refer to the following resource to know more about the calculation of effective resistance in graph theory: https://www.nas.ewi.tudelft.nl/people/Piet/papers/LAA_2011_EffectiveResistance.pdf
I hope this information is helpful!
Best Regards,
Aishwarya
  1 个评论
Willem Kuppers
Willem Kuppers 2024-3-20
编辑:Willem Kuppers 2024-3-20
Would there be a way to expand this so that you don't just calculate the resistance between 1 and 10 but the total effective resistance between multiple points at once?
And also in a network where the resistances of the elements are not identical?

请先登录,再进行评论。

类别

Help CenterFile Exchange 中查找有关 Statistics and Machine Learning Toolbox 的更多信息

产品

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!

Translated by