why bandwidth returns an "inf"?
8 visualizaciones (últimos 30 días)
Mostrar comentarios más antiguos
Antonio Del Vecchio
el 15 de Dic. de 2021
Respondida: Star Strider
el 15 de Dic. de 2021
I have this tf with the following bode plot
k = 1
z = [-1 4 0]
p = [-10+4*j -10-4*j -3 -3 -3]
sys = zpk(z,p,k);
display(sys);
figure(1);
bode(sys);
grid
Why, in this case, the bandwidth(sys) retruns an "Inf"?
And is it only a problem in matlab to calculate the bandwidth or a bandpass exist but I have to calculate in another way?
it is not clear to me looking the plot.
thanks in advance.
0 comentarios
Respuesta aceptada
Star Strider
el 15 de Dic. de 2021
It returns Inf because the bandwidth function requires a monotonically-decreasing signal, not one with a passband.
Try this —
k = 1
z = [-1 4 0]
p = [-10+4*j -10-4*j -3 -3 -3]
sys = zpk(z,p,k);
display(sys);
[mag,phs,wout] = bode(sys);
smag = squeeze(mag)
sphs = squeeze(phs)
dB3 = 10^(-3/20)
[maxmag,idx] = max(smag)
wascdB3 = interp1(smag(1:idx), wout(1:idx), dB3*maxmag)
wdscdB3 = interp1(smag(idx:end), wout(idx:end), dB3*maxmag)
bndwdh = wdscdB3 - wascdB3
figure(1);
semilogx(wout, mag2db(smag))
hold on
plot([wascdB3, wdscdB3], [1 1]*mag2db(maxmag*dB3), '+-r')
hold off
grid
xlabel('Frequency (rad/s)')
ylabel('Magnitude(dB)')
text(mean([wascdB3, wdscdB3]), mag2db(maxmag*dB3), sprintf('\\uparrow\nBandwidth = %.2f',bndwdh), 'Horiz','center', 'Vert','top')
The red line is between the -3 dB points on the passband.
.
0 comentarios
Más respuestas (1)
Chunru
el 15 de Dic. de 2021
Editada: Chunru
el 15 de Dic. de 2021
fb = bandwidth(sys) returns the bandwidth of the SISO dynamic system model sys. The bandwidth is the first frequency where the gain drops below 70.79% (-3 dB) of its DC value. The bandwidth is expressed in rad/TimeUnit, where TimeUnit is the TimeUnit property of sys.
So this bandwidth is applicable for a low pass filter only.
For your system, DC response is 0, so the bandwidth is Inf
2 comentarios
Chunru
el 15 de Dic. de 2021
You can write a code to do that:
- Find the peak response
- Find the first points to the left of peak that is 3dB lower
- Find the first points to the right of peak that is 3dB lower
- Then compute the bandwidth.
Note that this is not full-proof bandwidth for arbitrary response.
Ver también
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!