matlab - How to use `feedback` function in Matlab?
问题描述
Matlab's feedback function is used to obtain the closed loop transfer function of a system. Example:
sys = feedback(sys1,sys2)
returns a model object sys for the negative feedback interconnection of model objects sys1
,sys2
. To compute the closed-loop system with positive feedback, use sign = +1, for negative feedback we use -1.
My question arises when we have a system of the following type:
According to these docs, we can use feedback to create the negative feedback loop with G and C.
sys = feedback(G*C,-1)
This is a source of confusion, shouldn't the above be: sys = feedback(G*C,1,-1)?
These are not the same.
However, looking at these docs, for a unit loop gain k, you can compute the closed-loop transfer function T using:
G = tf([.5 1.3],[1 1.2 1.6 0]);
T = feedback(G,1);
Why are we using 1
and not -1
? This is still negative feedback and not positive feedback.
解决方案
G = tf([.5 1.3],[1 1.2 1.6 0]);
T = feedback(G,1);
中的一个feedback(G,1)
表示sys2
并且由于该函数有两个输入,因此根据以下行,默认值将是负统一反馈
sys = feedback(sys1,sys2) 返回一个模型对象 sys,用于模型对象 sys1,sys2 的负 反馈互连。
考虑以下脚本
s = tf('s');
G = 1/s;
T1 = feedback(G,1)
T2 = feedback(G,1,-1)
T1 和 T2 相同。
推荐阅读
- javascript - 谷歌浏览器中缓存的自动清除 (Javascript)
- python - 使用正则表达式从字符串中提取首字母缩写词模式
- c# - 如何知道通过 vb6 或 c# 调用我的程序的程序?
- php - 链接到 Drupal 8 中的其他页面
- computer-science - 有没有比传统计算机更容易在图灵机上实现的问题?
- hyperledger-composer - 如何为个人参与者生成个人分类账
- python - 如何在 python 类中使用字典键和值?
- php - 重定向问题 - 网站仅在移动设备上重定向,而不在桌面设备上重定向
- ios - Xcode 10 - 如何刷新 Siri 快捷方式意图定义文件的本地化?
- ssh - 无法在 oracle VM 中将 SSH rsa 密钥从主机复制到从机