Plotting amplitude and phase spectrum

20 ビュー (過去 30 日間)
chaneil james
chaneil james 2019 年 10 月 13 日
We have been given the Response of a mechanical sensor (seismometer) where:
We were then given the original frequency, f, damping, h, and gain factor, G. With this we are meant to be able to plot the amplitude and phase spectrum against frequency. I have no idea where to start, and have been looking at coding for Fourier transformations and polynomials for ages. Could anyone suggest where to start?

回答 (1 件)

Thiago Henrique Gomes Lobato
Thiago Henrique Gomes Lobato 2019 年 10 月 13 日
This amplitude and phase spectrum plot of a transfer function is called the Bode plot , it is very well known and you may easily find some references online, this guy, for example, has some very nice tutorials about control engineering that may apply to your problem :https://www.youtube.com/watch?v=_eh1conN6YM&t=12s. In Matlab you have a tool to define the coefficients of your transfer function and then plot the result (as example of your equation):
% Parameters
G = 1;
h = 0.3;
w0 = 5;
% Generate the transfer function
numerator = [G,0,0];
denominator = [-1,-2*h*w0,w0^2];
sys = tf(numerator,denominator)
% Plot it
bode(sys)
grid
sys =
-s^2
--------------
s^2 + 3 s - 25
Continuous-time transfer function.
Untitled.png
I feel however about uneasy about your equation since it is not stable and I believe it should be a stable damped system. Maybe you had some typo erros? A more reasonable transfer function for a damped system would look like this
% Parameters
G = 1;
h = 0.3;
w0 = 5;
% Generate the transfer function
numerator = [w0^2*G];
denominator = [1,2*h*w0,w0^2];
sys = tf(numerator,denominator)
% Plot it
bode(sys)
grid
sys =
25
--------------
s^2 + 3 s + 25
Continuous-time transfer function.
Untitled.png

カテゴリ

Help Center および File ExchangeSpectral Measurements についてさらに検索

Community Treasure Hunt

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

Start Hunting!

Translated by