Está en la página 1de 30

Práctica 1.

Medición de resistencias en serie y


paralelo y comprobación con el código de colores
Práctica 2. Solución de circuitos de continua y
alterna por el método de las mallas con Matlab
Funciones de Matlab para el tratamiento de números complejos

Los números complejos se representan en Matlab de la siguiente manera:

complejo = a + bi; ó
complejo = a + bj; ó
complejo = a + b*i;

La unidad imaginaria puede representarse tanto con i como con j.

La utilización del operador de multiplicación '*' es necesaria en caso de que la parte


imaginaria, b, se obtenga como resultado de la aplicación de una función o alguna
expresión más compleja que un mero número.

Por ejemplo, si ingresamos (sqrt viene de "square root", raíz cuadrada).

>> d = 2 + sqrt(4)i;

el programa nos arrojará el siguiente error y nos señalará con una barra vertical el
motivo del mismo

??? d = 2 + sqrt(4)i
|
Missing operator, comma, or semi-colon.

Esto nos está diciendo que en lugar del + debe ir una coma o un punto y coma, esto es
porque Matlab no pudo interpretar el segundo sumando, sqrt(4)i. En cambio si
ingresamos

>> d = 2 + sqrt(4)*i

Mostrará por pantalla

>> d = 2.0000 + 2.0000i

Ejemplo de uso de las funciones para números complejos:


Definimos tres números complejos, recuérdelos, muchas veces haremos referencia a los
mismos:

>> a = 1 + i;
>> b = 1;
>> c = i;
Las funciones real e imag retornan la parte real y la parte imaginaria de un complejo
respectivamente:

>> d = 3 + sqrt(2)*i;
d = 3.0000 + 1.4142i

>> real(d)
ans = 3

>> imag(d)
ans = 1.4142

Apliquemos ahora la función abs: esta función retorna el módulo de un complejo

>> abs(a)
ans = 1.4142

>> abs(b)
ans = 1

>> abs(c)
ans = 1

Para conseguir el argumento se aplica angle, el resultado es el ángulo en radianes.

>> angle(a)
ans = 0.7854

Que es lo mismo que hacer

>> atan(imag(a)/real(a))
ans = 0.7854

Si queremos el ángulo expresado en grados debemos utilizar la función rad2deg


(también existe la función inversa deg2rad, pruébela):

>> rad2deg(ans)
ans = 45

Entonces el ejercicio de convertir un número complejo a forma polar puede llevarse a


cabo en dos pasos:

>> d = -sqrt(3) + i
d = -1.7321 + 1.0000i

>> modulo = abs(d)


modulo = 2

>> argumento = rad2deg(angle(d))


argumento = 150.0000
MATLAB Function Reference

pol2cart
Transform polar or cylindrical coordinates to Cartesian

Syntax

[X,Y] = pol2cart(THETA,RHO)
[X,Y,Z] = pol2cart(THETA,RHO,Z)

Description

[X,Y] = pol2cart(THETA,RHO)transforms the polar coordinate data stored in corresponding


elements of THETA and RHO to two-dimensional Cartesian, or xy, coordinates. The arrays THETA
and RHO must be the same size (or either can be scalar). The values in THETA must be in
radians.

[X,Y,Z] = pol2cart(THETA,RHO,Z)transforms the cylindrical coordinate data stored in


corresponding elements of THETA, RHO, and Z to three-dimensional Cartesian, or xyz,
coordinates. The arrays THETA , RHO, and Z must be the same size (or any can be scalar). The
values in THETA must be in radians.

Algorithm

The mapping from polar and cylindrical coordinates to Cartesian coordinates is:
See Also

cart2pol, cart2sph, sph2cart

plotyy polar
MATLAB Function Reference

cart2pol
Transform Cartesian coordinates to polar or cylindrical

Syntax

[THETA,RHO,Z] = cart2pol(X,Y,Z)
[THETA,RHO] = cart2pol(X,Y)

Description

[THETA,RHO,Z] = cart2pol(X,Y,Z)transforms three-dimensional Cartesian coordinates


stored in corresponding elements of arrays X, Y, and Z, into cylindrical coordinates. THETA is a
counterclockwise angular displacement in radians from the positive x-axis, RHO is the distance
from the origin to a point in the x-y plane, and Z is the height above the x-y plane. Arrays X, Y,
and Z must be the same size (or any can be scalar).

[THETA,RHO] = cart2pol(X,Y)transforms two-dimensional Cartesian coordinates stored in


corresponding elements of arrays X and Y into polar coordinates.

Algorithm

The mapping from two-dimensional Cartesian coordinates to polar coordinates, and from
three-dimensional Cartesian coordinates to cylindrical coordinates is:
See Also

cart2sph, pol2cart, sph2cart

capture cart2sph
Capítulo 3: Operaciones con matrices y vectores página 23

3. OPERACIONES CON MATRICES Y VECTORES


Ya se ha comentado que MATLAB es fundamentalmente un programa para cálculo matricial. Ini-
cialmente se utilizará MATLAB como programa interactivo, en el que se irán definiendo las matri-
ces, los vectores y las expresiones que los combinan y obteniendo los resultados sobre la marcha. Si
estos resultados son asignados a otras variables podrán ser utilizados posteriormente en otras expre-
siones. En este sentido MATLAB sería como una potente calculadora matricial (en realidad es esto
y mucho más...).
Antes de tratar de hacer cálculos complicados, la primera tarea será aprender a introducir matrices y
vectores desde el teclado. Más adelante se verán otras formas más potentes de definir matrices y
vectores.

3.1. Definición de matrices desde teclado


Como en casi todos los lenguajes de programación, en MATLAB las matrices y vectores son varia-
bles que tienen nombres. Ya se verá luego con más detalle las reglas que deben cumplir estos nom-
bres. Por el momento se sugiere que se utilicen letras mayúsculas para matrices y letras minúscu-
las para vectores y escalares (MATLAB no exige esto, pero puede resultar útil).
Para definir una matriz no hace falta declararlas o establecer de antemano su tamaño (de hecho, se
puede definir un tamaño y cambiarlo posteriormente). MATLAB determina el número de filas y de
columnas en función del número de elementos que se proporcionan (o se utilizan). Las matrices se
definen o introducen por filas6; los elementos de una misma fila están separados por blancos o
comas, mientras que las filas están separadas por pulsaciones intro o por caracteres punto y coma
(;). Por ejemplo, el siguiente comando define una matriz A de dimensión (3×3):
>> A=[1 2 3; 4 5 6; 7 8 9]

La respuesta del programa es la siguiente:


A =
1 2 3
4 5 6
7 8 9
A partir de este momento la matriz A está disponible para hacer cualquier tipo de operación con ella
(además de valores numéricos, en la definición de una matriz o vector se pueden utilizar expresio-
nes y funciones matemáticas). Por ejemplo, una sencilla operación con A es hallar su matriz tras-
puesta. En MATLAB el apóstrofo (') es el símbolo de transposición matricial. Para calcular A'
(traspuesta de A) basta teclear lo siguiente (se añade a continuación la respuesta del programa):
>> A'
ans =
1 4 7
2 5 8
3 6 9
Como el resultado de la operación no ha sido asignado a ninguna otra matriz, MATLAB utiliza un
nombre de variable por defecto (ans, de answer), que contiene el resultado de la última operación.
La variable ans puede ser utilizada como operando en la siguiente expresión que se introduzca.
También podría haberse asignado el resultado a otra matriz llamada B:

6
Aunque en MATLAB las matrices se introducen por filas, se almacenan por columnas, lo cual tiene su importancia
como se verá más adelante.
Aprenda Matlab 7.0 como si estuviera en Primero página 24

>> B=A'
B =
1 4 7
2 5 8
3 6 9
Ahora ya están definidas las matrices A y B, y es posible seguir operando con ellas. Por ejemplo, se
puede hacer el producto B*A (deberá resultar una matriz simétrica):
>> B*A
ans =
66 78 90
78 93 108
90 108 126
En MATLAB se accede a los elementos de un vector poniendo el índice entre paréntesis (por ejem-
plo x(3) ó x(i)). Los elementos de las matrices se acceden poniendo los dos índices entre paréntesis,
separados por una coma (por ejemplo A(1,2) ó A(i,j)). Las matrices se almacenan por columnas
(aunque se introduzcan por filas, como se ha dicho antes), y teniendo en cuenta esto puede acceder-
se a cualquier elemento de una matriz con un sólo subíndice. Por ejemplo, si A es una matriz
(3×3) se obtiene el mismo valor escribiendo A(1,2) que escribiendo A(4).
Invertir una matriz es casi tan fácil como trasponerla. A continuación se va a definir una nueva ma-
triz A -no singular- en la forma:
>> A=[1 4 -3; 2 1 5; -2 5 3]
A =
1 4 -3
2 1 5
-2 5 3
Ahora se va a calcular la inversa de A y el resultado se asignará a B. Para ello basta hacer uso de la
función inv( ) (la precisión o número de cifras con que se muestra el resultado se puede cambiar con
el menú File/Preferences/General):
B=inv(A)
B =
0.1803 0.2213 -0.1885
0.1311 0.0246 0.0902
-0.0984 0.1066 0.0574
Para comprobar que este resultado es correcto basta pre-multiplicar A por B;
>> B*A
ans =
1.0000 0.0000 0.0000
0.0000 1.0000 0.0000
0.0000 0.0000 1.0000
De forma análoga a las matrices, es posible definir un vector fila x en la forma siguiente (si los tres
números están separados por blancos o comas, el resultado será un vector fila):
>> x=[10 20 30] % vector fila
x =
10 20 30
Por el contrario, si los números están separados por intros o puntos y coma (;) se obtendrá un vec-
tor columna:
Capítulo 3: Operaciones con matrices y vectores página 25

>> y=[11; 12; 13] % vector columna


y =
11
12
13
MATLAB tiene en cuenta la diferencia entre vectores fila y vectores columna. Por ejemplo, si se
intenta sumar los vectores x e y se obtendrá el siguiente mensaje de error:
>> x+y
??? Error using ==> +
Matrix dimensions must agree.
Estas dificultades desaparecen si se suma x con el vector transpuesto de y:
>> x+y'
ans =
21 32 43
MATLAB considera vectores fila por defecto, como se ve en el ejemplo siguiente:
>> x(1)=1, x(2)=2
x =
1
x =
1 2
A continuación se van a estudiar estos temas con un poco más de detenimiento.

3.2. Operaciones con matrices

3.2.1. OPERADORES ARITMÉTICOS


MATLAB puede operar con matrices por medio de operadores y por medio de funciones. Se han
visto ya los operadores suma (+), producto (*) y traspuesta ('), así como la función invertir inv( ).
Los operadores matriciales de MATLAB son los siguientes:
+ adición o suma
– sustracción o resta
* multiplicación
' traspuesta
^ potenciación
\ división-izquierda
/ división-derecha
.* producto elemento a elemento
./ y .\ división elemento a elemento
.^ elevar a una potencia elemento a elemento
Estos operadores se aplican también a las variables o valores escalares, aunque con algunas diferen-
cias7. Todos estos operadores son coherentes con las correspondientes operaciones matriciales: no
se puede por ejemplo sumar matrices que no sean del mismo tamaño. Si los operadores no se usan
de modo correcto se obtiene un mensaje de error.
Los operadores anteriores se pueden aplicar también de modo mixto, es decir con un operando esca-
lar y otro matricial. En este caso la operación con el escalar se aplica a cada uno de los elementos de
la matriz. Considérese el siguiente ejemplo:

7
En términos de C++ se podría decir que son operadores sobrecargados, es decir, con varios significados distintos
dependiendo del contexto, es decir, de sus operandos.
Aprenda Matlab 7.0 como si estuviera en Primero página 26

>> A=[1 2; 3 4]
A =
1 2
3 4
>> A*2
ans =
2 4
6 8
>> A-4
ans =
-3 -2
-1 0
MATLAB utiliza el operador de división / para dividir por un escalar todos los elementos de una
matriz o un vector. Esto no constituye ninguna sorpresa. Sin embargo, el uso que se describe a con-
tinuación sí requiere más atención.

3.2.2. OPERADORES PARA LA RESOLUCIÓN DE SISTEMAS DE ECUACIONES LINEALES


MATLAB utiliza los operadores de división para la resolución de sistemas de ecuaciones lineales.
Por su gran importancia, estos operadores requieren una explicación detenida. Considérese el si-
guiente sistema de ecuaciones lineales,
Ax = b (1)
donde x y b son vectores columna, y A una matriz cuadrada invertible. La resolución de este siste-
ma de ecuaciones se puede escribir en las 2 formas siguientes (¡Atención a la 2ª forma, basada en la
barra invertida (\)8, que puede resultar un poco extraña!):
x = inv(A)*b (2a)
x = A\b (2b)
Así pues, el operador división-izquierda por una matriz (barra invertida \) equivale a pre-multiplicar
por la inversa de esa matriz. En realidad este operador es más general y más inteligente de lo que
aparece en el ejemplo anterior: el operador división-izquierda es aplicable aunque la matriz no tenga
inversa e incluso no sea cuadrada, en cuyo caso la solución que se obtiene (por lo general) es la que
proporciona el método de los mínimos cuadrados. Cuando la matriz es triangular o simétrica apro-
vecha esta circunstancia para reducir el número de operaciones aritméticas. En algunos casos se
obtiene una solución con no más de r elementos distintos de cero, siendo r el rango de la matriz.
Esto puede estar basado en que la matriz se reduce a forma de escalón y se resuelve el sistema dan-
do valor cero a las variables libres o independientes. Por ejemplo, considérese el siguiente ejemplo
de matriz (1×2) que conduce a un sistema de infinitas soluciones:
>> A=[1 2], b=[2]
A =
1 2
b =
2
>> x=A\b
x =
0
1
que es la solución obtenida dando valor cero a la variable independiente x(1). Por otra parte, en el
caso de un sistema de ecuaciones redundante (o sobre-determinado) el resultado de MATLAB es el
punto más “cercano” -en el sentido de mínima norma del error- a las ecuaciones dadas (aunque no

8
En inglés, MATLAB denomina mldivide a este operador. Para más información, teclear help mldivide.
Capítulo 3: Operaciones con matrices y vectores página 27

cumpla exactamente ninguna de ellas). Véase el siguiente ejemplo de tres ecuaciones formadas por
una recta que no pasa por el origen y los dos ejes de coordenadas:
>> A=[1 2; 1 0; 0 1], b=[2 0 0]'
A =
1 2
1 0
0 1
b =
2
0
0
>> x=A\b, resto=A*x-b
x =
0.3333
0.6667
resto =
-0.3333
0.3333
0.6667
Si la matriz es singular o está muy mal escalada, el operador \ da un aviso (warning), pero propor-
ciona una solución.
La “inteligencia” del operador barra invertida \ tiene un coste: MATLAB debe de emplear cierto
tiempo en determinar las características de la matriz: triangular, simétrica, etc. Si el usuario conoce
perfectamente y con seguridad las características de la matriz del sistema, lo mejor es utilizar la
función linsolve (ver sección 4.5.4, en la página 46), que no realiza ninguna comprobación y puede
obtener la máxima eficiencia.
Aunque no es una forma demasiado habitual, también se puede escribir un sistema de ecuaciones
lineales en la forma correspondiente a la traspuesta de la ecuación (1):
yB = c (3)
donde y y c son vectores fila (c conocido). Si la matriz B es cuadrada e invertible, la solución de
este sistema se puede escribir en las formas siguientes:
y = c*inv(B) (4a)
y = c/B (4b)
En este caso, el operador división-derecha por una matriz (/) equivale a postmultiplicar por la in-
versa de la matriz. Si se traspone la ecuación (3) y se halla la solución aplicando el operador divi-
sión-izquierda se obtiene:
y' = (B')\c' (5)
Comparando las expresiones (4b) y (5) se obtiene la relación entre los operadores división-izquierda
y división-derecha (MATLAB sólo tiene implementado el operador división-izquierda):
c/B = ((B')\c')' (6)

3.2.3. OPERADORES ELEMENTO A ELEMENTO


En MATLAB existe también la posibilidad de aplicar elemento a elemento los operadores matricia-
les (*, ^, \ y /). Para ello basta precederlos por un punto (.). Por ejemplo:
>> [1 2 3 4]^2
??? Error using ==> ^
Matrix must be square.
38 ANALYSIS METHODS [CHAP. 4

4.2 THE MESH CURRENT METHOD


In the mesh current method a current is assigned to each window of the network such that the
currents complete a closed loop. They are sometimes referred to as loop currents. Each element and
branch therefore will have an independent current. When a branch has two of the mesh currents, the
actual current is given by their algebraic sum. The assigned mesh currents may have either clockwise or
counterclockwise directions, although at the outset it is wise to assign to all of the mesh currents a
clockwise direction. Once the currents are assigned, Kirchhoff’s voltage law is written for each loop to
obtain the necessary simultaneous equations.

EXAMPLE 4.2 Obtain the current in each branch of the network shown in Fig. 4-2 (same as Fig. 4-1) using the
mesh current method.

Fig. 4-2

The currents I1 and I2 are chosen as shown on the circuit diagram. Applying KVL around the left loop,
starting at point α,

—20 þ 5I1 þ 10ðI1 — I2Þ ¼ 0

and around the right loop, starting at point þ,

8 þ 10ðI2 — I1Þþ 2I2 ¼ 0

Rearranging terms,

15I1 — 10I2 ¼ 20 ð4Þ


—10I1 þ 12I2 ¼ —8 ð5Þ

Solving (4) and (5) simultaneously results in I1 ¼ 2 A and I2 ¼ 1 A. The current in the center branch, shown dotted,
is I1 — I2 ¼ 1 A. In Example 4.1 this was branch current I3.

The currents do not have to be restricted to the windows in order to result in a valid set of
simultaneous equations, although that is the usual case with the mesh current method. For example,
see Problem 4.6, where each of the currents passes through the source. In that problem they are called
loop currents. The applicable rule is that each element in the network must have a current or a
combination of currents and no two elements in different branches can be assigned the same current
or the same combination of currents.

4.3 MATRICES AND DETERMINANTS


The n simultaneous equations of an n-mesh network can be written in matrix form. (Refer to
Appendix B for an introduction to matrices and determinants.)

EXAMPLE 4.3 When KVL is applied to the three-mesh network of Fig. 4-3, the following three equations are
obtained:
CHAP. 4] ANALYSIS METHODS 39

ðRA þ RB ÞI1 — RB I2 ¼ Va
—RB I1 þ ðRB þ RC þ RD ÞI2 — RD I3 ¼ 0
—RD I2 þ ðRD þ RE ÞI3 ¼ —Vb

Placing the equations in matrix form,


2 32 3 2 3
RA þ RB —RB 0 I1 Va
4 —RB RB þ RC þ R D —RD 54 I2 5 ¼ 4 0 5
0 —RD RD þ RE I3 —Vb

Fig. 4-3

The elements of the matrices can be indicated in general form as follows:


2 32 3 2 3
R11 R12 R13 I1 V1
4 R21 R22 R23 54 I2 5 ¼ 4 V2 5 ð6Þ
R31 R32 R33 I3 V3
Now element R11 (row 1, column 1) is the sum of all resistances through which mesh current I1 passes. In Fig.
4-3, this is RAþRB. Similarly, elements R22 and R33 are the sums of all resistances through which I2 and I3,
respectively, pass.
Element R12 (row 1, column 2) is the sum of all resistances through which mesh currents I1 and I2 pass. The
sign of R12 is þ if the two currents are in the same direction through each resistance, and — if they are in opposite
directions. In Fig. 4-3, RB is the only resistance common to I1 and I2; and the current directions are opposite in RB,
so that the sign is negative. Similarly, elements R21, R23, R13, and R31 are the sums of the resistances common to
the two mesh currents indicated by the subscripts, with the signs determined as described previously for R12. It
should be noted that for all i and j, Rij¼Rji. As a result, the resistance matrix is symmetric about the principal
diagonal.
The current matrix requires no explanation, since the elements are in a single column with subscripts 1, 2, 3, . . .
to identify the current with the corresponding mesh. These are the unknowns in the mesh current method of
network analysis.
Element V1 in the voltage matrix is the sum of all source voltages driving mesh current I1. A voltage is
counted positive in the sum if I1 passes from the—to the terminal þ of the source; otherwise, it is counted
negative. In other words, a voltage is positive if the source drives in the direction of the mesh current. In Fig.
4.3, mesh 1 has a source Va driving in the direction of I1; mesh 2 has no source; and mesh 3 has a source Vb driving
opposite to the direction of I3, making V3 negative.

The matrix equation arising from the mesh current method may be solved by various techniques.
One of these, the method of determinants (Cramer’s rule), will be presented here. It should be stated,
however, that other techniques are far more efficient for large networks.

EXAMPLE 4.4 Solve matrix equation (6) of Example 4.3 by the method of determinants.
The unknown current I1 is obtained as the ratio of two determinants. The denominator determinant has the
elements of resistance matrix. This may be referred to as the determinant of the coefficients and given the symbol
OR. The numerator determinant has the same elements as OR except in the first column, where the elements of the
voltage matrix replace those of the determinant of the coefficients. Thus,
V1 R12 R13 , R11 R12 R13 V R R
1 . 1 12 13 .
I1 ¼ . V2 R22 R23 . . R21 R22 R23 ÷ . V2 R22 R23
. . . O. .
R. V R R .
.
.V R
3 32 R . .R R R
33 31 32 33 . 3 32 33
48 ANALYSIS METHODS [CHAP. 4

Fig. 4-17

KVL and KCL give:


I2 ð12Þ ¼ I3 ð6Þ ð10Þ
I2 ð12Þ ¼ I4 ð12Þ ð11Þ
60 ¼ I1 ð7Þ þ I2 ð12Þ ð12Þ
I1 ¼ I2 þ I3 þ I4 ð13Þ

Substituting (10) and (11) in (13),


I1 ¼ I2 þ 2I2 þ I2 ¼ 4I2 ð14Þ

Now (14) is substituted in (12):


60 ¼ I1 ð7Þ þ 14 I1 ð12Þ ¼ 10I1 or I1 ¼ 6 A

4.2 Solve Problem 4.1 by the mesh current method.

Fig. 4-18

Applying KVL to each mesh (see Fig. 4-18) results in

60 ¼ 7I1 þ 12ðI1 — I2 Þ
0 ¼ 12ðI2 — I1 Þ þ 6ðI2 — I3 Þ
0 ¼ 6ðI3 — I 2 Þþ 12I3

Rearranging terms and putting the equations in matrix form,


2 32 3 2 3
19I1 — 12I2 ¼ 60 19 —12 0 I1 60
—12I1 þ 18I2 — 6I3 ¼ 0 or 4 —12 18 —6 54 I2 5 ¼ 4 0 5
— 6I2 þ 18I3 ¼ 0 0 —6 18 I3 0

Using Cramer’s rule to find I1,

60 —12 0 19 —12 0
. . . .
I1 ¼ 0 18 —6 . ÷ . —12 18 —6 . ¼ 17 280 ÷ 2880 ¼ 6A
. 0 —6 18 . . 0 —6 18 .
CHAP. 9] SINUSOIDAL STEADY-STATE CIRCUIT ANALYSIS 199

2 32 3 2 3
Z11 Z12 Z13 I1 V1
4 Z21 Z22 Z23 54 I2 5 ¼ 4 V2 5
Z31 Z32 Z33 I3 V3

for the unknown mesh currents I1; I2; I3 . Here, Z11 ÷ ZA þ ZB, the self-impedance of mesh 1, is the sum
of all impedances through which I1 passes. Similarly, Z÷ 22 ZB þ
ZC Zþ D and Z33 ZD ÷ZE þare the self-
impedances of meshes 2 and 3.

Fig. 9-12

The 1,2-element of the Z-matrix is defined as:


X
Z12 ÷ T (impedance common to I1 and I2 Þ

where a summand takes the plus sign if the two currents pass through the impedance in the same
direction, and takes the minus sign in the opposite case. It follows that, invariably, Z12 ¼ Z21. In
Fig. 9-12, I1 and I2 thread ZB in opposite directions, whence
Z12 ¼ Z21 ¼ —ZB
Similarly,
Z13 ¼ Z31 ÷ T (impedance common to I1 and I3 Þ ¼ 0
X
Z23 ¼ Z23 ÷ T (impedance common to I2 and I3 ¼ —ZD

The Z-matrix is symmetric.


In the V-column on the right-hand side of the equation, the entries Vk (k ¼ 1; 2; 3) are defined
exactly as in Section 4.3:
X
Vk ÷ T (driving voltage in mesh kÞ

where a summand takes the plus sign if the voltage drives in the direction of Ik, and takes the minus sign
in the opposite case. For the network of Fig. 9-12,
V1 ¼ þVa V2 ¼ 0 V3 ¼ —Vb
Instead of using the meshes, or ‘‘windows’’ of the (planar) network, it is sometimes expedient to
choose an appropriate set of loops, each containing one or more meshes in its interior. It is easy to see
that two loop currents might have the same direction in one impedance and opposite directions in
another. Nevertheless, the preceding rules for writing the Z-matrix and the V-column have been
formulated in such a way as to apply either to meshes or to loops. These rules are, of course, identical
to those used in Section 4.3 to write the R-matrix and V-column.

EXAMPLE 9.6 Suppose that the phasor voltage across ZB, with polarity as indicated in Fig. 9-13 is sought.
Choosing meshes as in Fig. 9-12 would entail solving for both I1 and I2, then obtaining the voltage as VB ¼ ðI2 —
I1ÞZB. In Fig. 9-13 three loops (two of which are meshes) are chosen so as to make I1 the only current in ZB.
Furthermore, the direction of I1 is chosen such that VB ¼ I1ZB. Setting up the matrix equation:
208 SINUSOIDAL STEADY-STATE CIRCUIT ANALYSIS [CHAP. 9

9.18 Obtain the voltage Vx in the network of Fig. 9-28, using the mesh current method.

Fig. 9-28

One choice of mesh currents is shown on the circuit diagram, with I3 passing through the 10-K resistor
in a direction such that Vx ¼ I3ð10Þ (V). The matrix equation can be written by inspection:
2 2 3
7 þ j3 j5 5 32 3 10 08
I1
4 j5 6 7
12 þ j3 —ð2 — j2Þ 54 I2 5 ¼ 4 5 308 5
5 —ð2 — j2Þ 17 — j2 I3 0

Solving by determinants,

. 7 þ j3 j5 10 08 .
8
. .

j5 12 þ j3 5 30
. . 667:96 —169:098
I3 ¼ . .¼ ¼ 0:435 —194:158 A
5 —2 þ j2 0

7 þ j3 j5 5 1534:5 25:068
.
.

. j5 12 þ j3 —2 þ j2
—2 þ j2V. 17 — j2
and Vx ¼ I3 ð10Þ ¼ 4:355 —194:158
9.19 In the netwrok of Fig. 9-29, determine the voltage V which results in a zero current through the
2 þ j3 K impedance.

Fig. 9-29
Página 1

Práctica 3. Solución y representación gráfica de la


potencia en el dominio del tiempo con Microsoft
Excel
Introducción a MS-Excel. Pantalla de Excel.

Cursor de Excel

Cursor 1: Selección de la celda activa o celdas múltiples.

Cursor 2: Copiar fórmulas.

Cursor 3: Mover celdas


Página 2

3.12. Potencia en el dominio del tiempo.

En el tema anterior se estudió que la energía necesaria para mover una carga entre dos puntos
de diferente potencial es W  qV , de donde salía la expresión general de la potencia eléctrica
dW dq
P  V  VI
dt dt

En el caso de la corriente alterna senoidal, podemos escribir, sin perder generalidad en el


dominio del tiempo
V (t)  Vmax sin(t) I (t)  I max sin(t   )

En donde se le ha asignado fase nula a la tensión porque lo único importante es el desfase entre
las dos, V e I. Operando

P(t)  V sin(t)I sin(t   )  V I cos   cos(2t   ) cos  cos(2t   )


max max max max
 Vmax I max  Vmax I max
2 2 2

El segundo término de la suma se llamará potencia fluctuante y tiene promedio nulo

T

0
cos(2t   )dt  0

Representa la energía que se almacena temporalmente (en forma de carga eléctrica en los
condensadores o en forma magnética en las bobinas) y es devuelta al sistema.

El valor promedio de la potencia, vendrá dado por tanto por el primer sumando, que puede
escribirse en función de los valores eficaces como

Vmax I max
P cos   V eI e cos 
 2 2




Electrotecnia. 2º ITOP. Curso 2007/08 Tema 3 - Pág. 10 
Página 3

Paso 1: crear una lista de números del 0 a 360 grados de 10 en 10.

Escribir ‘0’ en la casilla A1

Escribir ‘10’ en la casilla A2

Marcar las dos celdas con el cursor de edición

Tirar de la esquina hacia abajo con el cursor de


copiar fórmulas hasta que la lista crezca hasta 360

Paso 2: columna ‘Tensión’.

Escribir en la celda B1 al fórmula ‘=seno(A1*pi()/180)’

Copiar la fórmula hacia abajo estirando de la esquina con el cursor de copiar fórmula

Paso 3: Insertar fila de celda fija y de títulos.

Pinchar el número de fila 1 con el botón derecho


y hacer clic en ‘Insertar’

Pulsar F4 para repetir la última acción


Página 4

Paso 4: Escribir títulos en la fila 2, ‘fase’ en A2, ‘V’ en B2 e ‘I’ en C2

Paso 5. Escribir un valor de desfase, por ejemplo 30, en la celda C1

Paso 6. Columna ‘Intensidad’.

Escribir en la celda C3 la fórmula ‘=seno((A3+$C$1)*pi()/180)’

Copiar la fórmula tirando de la esquina hacia abajo con el cursor de copiar

Paso 7. Columna ‘Potencia’.

Escribir en la celda D2 el título ‘P’ y en D3 la fórmula ‘=B3*C3’. Copiar la fórmula a toda la


columna
Página 5

Paso 8. Marcar las cuatro columnas y pinchar en el asistente para gráficos

Elegir gráfico ‘XY Dispersión’ con líneas suavizadas sin puntos, y pulsar ‘Finalizar’

Si todo ha salido bien, hemos creado el gráfico de la potencia similar al de la página 10


del tema 3. Pinchando diferentes partes del gráfico con el botón derecho podemos
cambiar las propiedades de las líneas, la escala o lo que queramos.

1,5

0,5

V
0 I
0 50 100 150 200 250 300 350 400 P
-0,5

-1

-1,5
Página 6

Paso 9. Cambiando ahora los valores de la casilla C1 veremos diferentes desfases

90º Bobina
-90º Condensador
0º Resistencia

Paso 10. Potencia promedio.

Escribir en la casilla D40 la fórmula ‘=PROMEDIO(D3:D39)’.

Paso 11. Corregir las fórmulas de Tensión e Intensidad para cambiar el valor máximo de
ambos, que en origen es 1, a Vmax=3 e Imax=2.
Página 7

6,000

5,000

4,000

3,000
2,000

1,000 I
0,000 P

0 50 100 150 200 250 300 350 400


-1,000

-2,000

-3,000

-4,000

También podría gustarte