how can I plot a bode plot of transfer function that has one variable that changes the frequency response?
Afficher commentaires plus anciens
I would like to plot an RLC filter that has an inductor L that I can control the value and see the bode plot shows for example 10 different value of L and 10 different bode plot on the same bode plot.
is there like 3 D bode plot?
Réponse acceptée
Plus de réponses (1)
Tunable Models might be worth a look. They basically let a single model be defined with a one or more parameters that have default values that can be overridden with specified values at some later time. For example, using the data from @Star Strider's Answer for comparison
R = 1E+3;
C = 1E-6;
L = realp('L',1E-3); % default value for L
s = tf('s');
H = 1 / (R + L*s + 1/(C*s));
H.Name = 'Tunable Model';
Lval = logspace(-6, -2, 5);
w = logspace(-1, 9, 50)*pi;
bode(sampleBlock(H,'L',Lval),w);
xlim([1e-2 1e10])
legend
The advantage of this approach is that a single model, in this case H (or alternatively the output of sampleBlock, which returns a model array), can be used with most (all?) Control System Toolbox functionality, like the other plotting functions, model interconnection functions, etc. A downside is that there seems to be very little direct control over the appearance of the plots, i.e., can't control the LineSpecs directly, and the legend doesn't seem to distinguish the lines on the plot. The LineSpecs can be modified with a little more work; not sure if the legend is fixable.
1 commentaire
SimTec
le 28 Avr 2022
Catégories
En savoir plus sur Time and Frequency Domain Analysis dans Centre d'aide et File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!



