can anyone explain what this piece of code do?
6 views (last 30 days)
Show older comments
Answers (1)
Abderrahim. B
on 2 Aug 2022
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 Comments
See Also
Categories
Find more on Digital Filter Analysis in Help Center and File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!