フィルターのクリア

How to plot the response of a closed loop system to a reference signal?

10 ビュー (過去 30 日間)
Thomas
Thomas 2023 年 3 月 2 日
編集済み: Thomas 2023 年 3 月 6 日
I would like to kindly ask how to plot the response of a closed loop system to a given reference signal.
A very simple closed loop system is provided below, time intervals, and specified 'w':
Many thanks in advance.

採用された回答

Sarvesh Kale
Sarvesh Kale 2023 年 3 月 2 日
Hi Thomas,
I hope the following code snippet helps
% construct transfer function using tf
g = tf(10*[1 4],[1 4 5 0]);
k= tf([1 1],[1 3]);
% obtain the overall transfer function
y_by_x = feedback(g*k,1);
% define input
t = 0:0.01:10;
w=1.7;
r = sin(w*t);
%visualize result
figure ;
lsim(y_by_x,r,t) % used to simulate response to input
the gray line in input to system and the line is blue is the system output, since the input is sinusoidal, the output will also be sinusoidal in nature by definition of LTI systems, for more help on feedback, lsim, and tf refer the following documentation
I hope this helps, please accept the answer if query resolved.
Thank you
  2 件のコメント
Thomas
Thomas 2023 年 3 月 2 日
This was very helpful, thank you for sharing you're knowledge.
Thomas
Thomas 2023 年 3 月 2 日
Is there any Matlab function which could estimate the Phase Shift that is present between the output and reference signal in closed loop systems such as this?

サインインしてコメントする。

その他の回答 (0 件)

カテゴリ

Help Center および File ExchangeFilter Analysis についてさらに検索

製品


リリース

R2022b

Community Treasure Hunt

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

Start Hunting!

Translated by