can anyone explain what this piece of code do?
6 次查看(过去 30 天)
显示 更早的评论
回答(1 个)
Abderrahim. B
2022-8-2
Hi!
Try to learn from the documentation:
doc tf
doc series
doc parallel
doc feedback
doc pzmap
Transfer function g1:
num = 10 ; % numerator
den = [1 5 0] ; % denominator
g1 = tf(num, den)% tf: transfer function
Transfer function g2:
num1 = [1 1] ; % numerator
den1 = [1 0] ; % denominator
g2 = tf(num1, den1)% tf: transfer function
Transfer function sal, pal:
g1 and g2 are cascade, which means sal = g1 x g2 (multiplication). using series function you can compute this.
sal = series(g1, g2)
g1 and g2 are parallel, which means pal = g1 + g2 (addition). using parallel function you can compute this.
pal = parallel(g1, g2)
Closed loop transfer functions:
feedback function allows connecting models to calculate closed loop tf. Learn more about closed loop transfer function.
- feedback transfer function has a gain of 1.
pfeb = feedback(g1, g2, 1)
- feedback transfer function has a gain of -1.
nfeb = feedback(g1, g2, -1)
- Closed loop tf from g1 and 1 .
ufb = feedback(g1, g2, -1)
Pole Zero Plots:
I assume you know about this plot.
pzmap(g1)
figure % new figure
pzmap(g2)
Hope this helps
0 个评论
另请参阅
类别
在 Help Center 和 File Exchange 中查找有关 Digital Filter Analysis 的更多信息
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!