How can I plot a complex transfer function with sweeping parameter?

10 views (last 30 days)
Hi, i would like to plot something like a Nyquist plot (of a complex-valued electric circuit) with the difference, that I would sweep the value of a resistance rather than the frequency. It is a parallel circuit of a serial connection of R and L in both paths. (R1+L1)||(R2+L2)
R_1 = 0:inf; % error: Maximum variable size allowed by the program is exceeded.
R_2 = 24;
L_1 = 3.828*10^(-9);
L_2 = 2.865*10^(-9);
w = pi*10^9;
My transfer function is:
Z = (R_1+j*w*L_1)*(R_2+j*w*L_2) / (R_1+j*w*L_1+R_2+j*w*L_2)
R_1 is to be sweeped between 0 and infinity, other values are constants. Axes should be Re & Im. How can I do it?

Accepted Answer

Chaya N
Chaya N on 20 Oct 2016
Edited: Chaya N on 20 Oct 2016
I would suggest that you use as large an upper limit (a very very big number) for R_1 as possible.
Also as an observation, I would like to point out that since you are doing a sweep with your transfer function, with one of your inputs being an array, you should try element-wise operation, so your expression for Z should look like this (please note the .* and ./ notation):
Z = (R_1+j*w*L_1) .* (R_2+j*w*L_2) ./ (R_1+j*w*L_1 + R_2+j*w*L_2)
Once you have your desired vector of values for Z you can plot it as :
plot(real(Z), imag(Z)) % x-axis is real and y-axis is imaginary
  3 Comments
Chaya N
Chaya N on 20 Oct 2016
Edited: Chaya N on 20 Oct 2016
To clarify your original question for the case of R_1=Inf, recall that in a parallel network the net resistance of the circuit is limited by the smallest resistance among the parallel arms of the circuit. Theoretically, this means that as the resistance in one of the arms becomes infinite, that particular branch acts like an open circuit. This means that as your value of R_1 tends towards infinity, the net resistance of the circuit tends towards (R_2 + j*w*L_2).
So, as (R_1 --> Inf) the value (Z --> (R_2 + j*w*L_2)). You can verify this very easily by looking at the last number in your vector Z!
Ashish Papreja
Ashish Papreja on 22 Jul 2021
it helps, but lets say if I also want to know that which point corresponds to what value of R_1 . Is there a way I can do that . Thanks in advance

Sign in to comment.

More Answers (0)

Categories

Find more on Circuit Envelope Simulation 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!