0% found this document useful (0 votes)
48 views8 pages

Lab. 08 Ingenieria de Control: Analisis en El Dominio de La Frecuencia I. Diagrama de Bode 1. Introduccion

The document discusses Bode and Nyquist diagrams for analyzing linear time-invariant (LTI) systems in the frequency domain. It provides examples of using MATLAB's bode and nyquist commands to plot Bode and Nyquist diagrams for simple transfer functions. The Bode diagram shows the magnitude and phase of a transfer function as functions of frequency, while the Nyquist diagram plots the real and imaginary parts of the transfer function. Feedback systems are also analyzed using Bode diagrams.

Uploaded by

Juan Carlos S Q
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as DOCX, PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
48 views8 pages

Lab. 08 Ingenieria de Control: Analisis en El Dominio de La Frecuencia I. Diagrama de Bode 1. Introduccion

The document discusses Bode and Nyquist diagrams for analyzing linear time-invariant (LTI) systems in the frequency domain. It provides examples of using MATLAB's bode and nyquist commands to plot Bode and Nyquist diagrams for simple transfer functions. The Bode diagram shows the magnitude and phase of a transfer function as functions of frequency, while the Nyquist diagram plots the real and imaginary parts of the transfer function. Feedback systems are also analyzed using Bode diagrams.

Uploaded by

Juan Carlos S Q
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as DOCX, PDF, TXT or read online on Scribd
You are on page 1/ 8

Lab.

08 Ingenieria de Control: Analisis en el dominio de la Frecuencia

I. Diagrama de bode

1. Introduccion
help bode

BODE Bode frequency response of LTI models.


BODE(SYS) draws the Bode plot of the LTI model SYS (created with
either TF, ZPK, SS, or FRD). The frequency range and number of
points are chosen automatically.

BODE(SYS,{WMIN,WMAX}) draws the Bode plot for frequencies


between WMIN and WMAX (in radians/second).

BODE(SYS,W) uses the user-supplied vector W of frequencies, in


radian/second, at which the Bode response is to be evaluated.
See LOGSPACE to generate logarithmically spaced frequency vectors.

BODE(SYS1,SYS2,...,W) graphs the Bode response of multiple LTI


models SYS1,SYS2,... on a single plot. The frequency vector W
is optional. You can specify a color, line style, and marker
for each model, as in
bode(sys1,'r',sys2,'y--',sys3,'gx').

[MAG,PHASE] = BODE(SYS,W) and [MAG,PHASE,W] = BODE(SYS) return the


response magnitudes and phases in degrees (along with the frequency
vector W if unspecified). No plot is drawn on the screen.
If SYS has NY outputs and NU inputs, MAG and PHASE are arrays of
size [NY NU LENGTH(W)] where MAG(:,:,k) and PHASE(:,:,k) determine
the response at the frequency W(k). To get the magnitudes in dB,
type MAGDB = 20*log10(MAG).

For discrete-time models with sample time Ts, BODE uses the
transformation Z = exp(j*W*Ts) to map the unit circle to the
real frequency axis. The frequency response is only plotted
for frequencies smaller than the Nyquist frequency pi/Ts, and
the default value 1 (second) is assumed when Ts is unspecified.

See also BODEMAG, NICHOLS, NYQUIST, SIGMA, FREQRESP, LTIVIEW, LTIMODELS.

Overloaded methods:
lti/bode
idmodel/bode
idfrd/bode
uss/bode
ultidyn/bode
ufrd/bode

Reference page in Help browser


doc bode
Ejemplo Nro. 01: dado el sistema dinamico

N=1;
D=[1 1 3];
sist=tf(N,D)

Transfer function:
1
-----------
s^2 + s + 3

Trazando el diagrama de bode de esta funcion de transferencia :


bode(sist)

Bode Diagram
0

-20
Magnitude (dB)

-40

-60

-80
0

-45
Phase (deg)

-90

-135

-180
-1 0 1 2
10 10 10 10
Frequency (rad/sec)

En el ejemplo dado se tiene H(s), donde s, es un numero complejo, es decir tiene parte rreal y parte
imaginaria,𝑠 = 𝜎 + 𝑗𝑤 , Para el diagrama de Bode lo que se hace es tomar unicamente la parte imaginaria,
es decir:

H(jw)=H(s)s=jw

Por tanto, en H(jw) es un numero complejo, es decir tiene modulo y fase, por eso en el diagrama de bode,
se tiene dos graficos: El modulo y la fase en funcion de w .
Para verificar esto, en el ejemplo anterior, :

Transfer function:
1
-----------
s^2 + s + 3

w=linspace(0.1,100,1001);
D=[1 1 3];
N=1;
H=zeros(1,1001);
for k=1:1001,
Nk=N;
Dk=polyval(D,j*w(k));
H(k)=Nk/Dk;
end

whos H

Name Size Bytes Class Attributes

H 1x1001 16016 double complex

plot(w,abs(H))

0.7

0.6

0.5

0.4

0.3

0.2

0.1

0
0 10 20 30 40 50 60 70 80 90 100

loglog(w,abs(H))

0
10

-1
10

-2
10

-3
10

-4
10
-1 0 1 2
10 10 10 10
Aplicando el concepto de decibeles:
𝒏𝒓𝒐 𝒅𝑩 = 𝟐𝟎 ∗ 𝒍𝒐𝒈𝟏𝟎 (|𝑯|)

nH=20*log10(abs(H));

semilogx(w,nH)

-10

-20

-30

-40

-50

-60

-70

-80
-1 0 1 2
10 10 10 10

Ploteando la fase
fase=angle(H);
semilogx(w,180/pi*fase)
grid

-20

-40

-60

-80

-100

-120

-140

-160

-180
-1 0 1 2
10 10 10 10

Ejemplo 2:
Dado el sistema dinamico,

𝑠+3
𝐻(𝑠) =
𝑠 3 + 𝑠 2 + 2𝑠 + 1

 trazar el diagrama de Bode de H(s)


 trazar el diagrama de Bode del sistema retroalimentado para valores de k=1,10, 15, 20

+
H(s)
-

k/s
solucion

Diagrama de Bode para el sistema


sist1=tf([1 3],[1 1 2 1 ])

Transfer function:
s + 3
-------------------
s^3 + s^2 + 2 s + 1

bode(sist1)

Bode Diagram
20

0
Magnitude (dB)

-20

-40

-60

-80
0

-45
Phase (deg)

-90

-135

-180

-225
-2 -1 0 1 2
10 10 10 10 10
Frequency (rad/sec)

Diagrama de Bode para sistemas retroalimentados con k=1,10,15 y 20

k=[1,10,15 , 20]
figure
hold on
for j=1:4,
sist2=tf(k(j),[1 0]);

sist=feedback(sist1,sist2);

bode(sist)
pause

end

k =
1 10 15 20
Bode Diagram
20

0
Magnitude (dB)

-20

-40

-60

-80
-180
Phase (deg)

-225

-270

-315
-1 0 1 2
10 10 10 10
Frequency (rad/sec)

II. Diagrama de Nyquist

1. Introduccion,
Dado que la funcion H(jw), es un numero complejo; este puede ser representado en la
forma anterior (Diagrama de Bode). Tambien puede ser representado en la forma de parte
real y parte imaginaria.

Ejemplo, considerando el ejemplo nro. 01,


N=1;
D=[1 1 3];
sist=tf(N,D)

j=sqrt(-1)
w=linspace(-100,100,2003);
D=[1 1 3];
N=1;
H=zeros(1,1001);
for k=1:2003,
Nk=N;
Dk=polyval(D,j*w(k));
H(k)=Nk/Dk;
end

whos H

plot(real(H),imag(H))
grid
Name Size Bytes Class Attributes

H 1x2003 32048 double complex


0.6

0.4

0.2

-0.2

-0.4

-0.6

-0.8
-0.3 -0.2 -0.1 0 0.1 0.2 0.3 0.4 0.5

Se puede concluir que el diagrama de Nyquist, representa a la representacion de la parte real y de la parte
imaginaria de la funcion H(jw) . Esto se puede verificar utilizando el comnando nyquist en el matlab.

nyquist(sist)

Nyquist Diagram
0.8

0.6

0.4

0.2
Imaginary Axis

-0.2

-0.4

-0.6

-0.8
-1 -0.5 0 0.5
Real Axis
j=sqrt(-1)
w=linspace(-100,100,103);
D=[1 1 3];
N=1;
figure
hold on;

for k=1:103,
Nk=N;
Dk=polyval(D,j*w(k));
Hk=Nk/Dk;
plot(real(Hk),imag(Hk),'*');
pause
end

j =
0 + 1.0000i

j =
0 + 1.0000i

You might also like