How would I calculate for the equivalent resistance of a generated network/grid of resistors?
22 visualizzazioni (ultimi 30 giorni)
Mostra commenti meno recenti
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 Commenti
Risposte (1)
Aishwarya
il 5 Feb 2024
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']);
Please refer to the below documentation for more information about the function used:
- “graph” function: https://www.mathworks.com/help/matlab/ref/graph.html
- “pinv” function: https://www.mathworks.com/help/matlab/ref/pinv.html
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 Commento
Willem Kuppers
il 20 Mar 2024
Modificato: Willem Kuppers
il 20 Mar 2024
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?
Vedere anche
Categorie
Scopri di più su Graph and Network Algorithms in Help Center e File Exchange
Prodotti
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!