How can I plot the fast Fourier transform of a given step response
조회 수: 27 (최근 30일)
이전 댓글 표시
How can I plot the fast Fourier transform of a given step response as shwon in the atatched code & picture
And here is my code
clear; clc;close all;
s= tf('s');
num=1;
den=s*(s/10+1);
G= num/den;
H=1;
K2=sqrt(10); %K2
G2=G*K2;
closed_system2=feedback(G2,H);
step(closed_system2,H,'r');
hold on
K3=10; %K3
G3=G*K3;
closed_system3=feedback(G3,H);
step(closed_system3,H,'b');
grid on
title('Response to a refrence step input');
legend('step input @k=10^0.5','step input @k=10')
댓글 수: 0
답변 (1개)
Milan Padhiyar
2020년 10월 29일
Hello,
To plot a fast Fourier transform of the step response, first, you need to store the signal values.
Please find below command to store the output from the “step” command,
% y is the step response signal array and tOut represent the time array
[y,tOut] = step(sys)
Please find the following documents that show how to use “fft” command to find the fast Fourier transform and how to plot that.
I hope this help you to resolve your query.
Thanks
댓글 수: 0
참고 항목
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!