필터 지우기
필터 지우기

Bode Plot over time and frequency

조회 수: 5 (최근 30일)
Drvoljub
Drvoljub 2011년 8월 22일
Hello
I have a problem with a 3D-Bode Plot. The result i want to have is: http://img849.imageshack.us/img849/5048/sam0576i.jpg
A family of logarithmic respones over time and frequency.
The code in Matlab is:
clear
w_min = 10^(-1);
w_max = 10^3;
mag_min = -30;
mag_max = 50;
mag_step = 20;
phs_min = -180;
phs_max = 45;
phs_step = 45;
t=linspace(0,40,100);
figure;
w=logspace(log(w_min),log(w_max),100);
for i=1:length(w)
TF = tf(1,[0.0625 0.2 1]);
[mag,phs] = bode(TF,w);
magdb = 20*log10(mag);
magdb
z(i,:)=magdb(1,1,:);
end
[X,Y] = meshgrid(t,w);
Z = griddata(t,w,z',X,Y);
surf(X,Y,Z);
xlabel('time (s)');
set(gca, 'yscale','log','YDir','reverse');
ylabel('Magnitude frequency (1/s)');
ylim([w_min,w_max]);
zlabel('Amplitude [db]');
zlim([mag_min mag_max]);
set(gca,'ZTick',mag_min:mag_step:mag_max);
As you can see there is no (t) in the loop and I dont know how to build it in. How to put the loop over time in the frequency loop.
I would be grateful for some advice or example codes.

답변 (1개)

Fangjun Jiang
Fangjun Jiang 2011년 8월 22일
Those are multiple Bode plots plotted together. There must be some parameters of the transfer function changed over the time which result in the different Bode plots. You didn't have anything changed over the time in your code. What is supposed to change over the time? Bode plot itself won't change over time.

카테고리

Help CenterFile Exchange에서 Frequency-Domain Analysis에 대해 자세히 알아보기

Community Treasure Hunt

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

Start Hunting!

Translated by