0
\$\begingroup\$

I designed the circuit and obtained the desired outputs correctly. for for circuit it R = 1e3 , C= 0.15e-6, and f = 250 , ( for RC circuit) and in the second part it asks to increase the frequency to 2Kh that is R = 1e3 , C= 0.15e-6, and f = 2kh. now it asks Compare the gains and phases from question 1)d) and 1)e). Justify and explain similarities and/or differences I know the gain is Vout/Vin but the output looks pretty weird I have an idea but is there a difference between the two? I mean changing the frequency should change the gain or not? enter image description here

here is output/input waveform for circuit with f=250H enter image description here

and here is the one with f=2KH enter image description here

I also plotted the bode diagram for both circuits. f=250, and f=2kh respectively. enter image description here

enter image description here

here is the code for Bode digram ( frequency domain) enter image description here

\$\endgroup\$
  • 1
    \$\begingroup\$ That looks as expected (note the X-axis is log if that is part of your confusion). Why do you think it is odd? \$\endgroup\$ – JonRB Feb 24 '15 at 20:04
  • 1
    \$\begingroup\$ @user65652 Gain is not the same. From the time-based plots, the first (at \$f = 250\$) has unity gain (the amplitudes of the purple and yellow plots are the same). But the second (at \$f = 2000\$) has the purple output at much lower amplitude than the yellow input. \$\endgroup\$ – Null Feb 24 '15 at 20:10
  • 1
    \$\begingroup\$ Check the units on your bode plot... rad/s rather than cycles/ sec. \$\endgroup\$ – George Herold Feb 24 '15 at 20:10
  • 1
    \$\begingroup\$ yes it does as there is no difference between the two bode plots. See my updated response as it is a slight tweak on the bode command to help show this. \$\endgroup\$ – JonRB Feb 24 '15 at 20:36
  • 1
    \$\begingroup\$ By the way the title say RLC but all presented information is for RC \$\endgroup\$ – JonRB Feb 24 '15 at 21:05
1
\$\begingroup\$

You have two sets of waveforms

1) time domain

2) frequency domain

While you will see a difference between the two time domain plots (higher frequency resulting in a lower output, as expected) you will not between the two frequency domain plots

Why? it is how the matlab command works. You are not instructing Matlab to provide gain:phase at a particular frequency for the two frequency domain plots, you have essentially instructed Matlab to run a frequency sweep and resultant bode plot twice.

As a result you will not see any difference between these two plots.

--edit-- Based upon the presented matlab code:

The simplest solution to demonstrate a difference at different frequencies is to change the bode function call from

bode(monSysteme)

to

bode(monSysteme,{249,251})

and also:

bode(monSysteme,{1999,2001})

ie a specific frequency range, tight to the freq of interest.

enter image description here enter image description here

PLEASE note, this isn't really needed as you can just read off of the original bode plot the magnitude at 250Hz and 2kHz and see a difference.

If a specific time domain reference point is needed & the desire isn't to read the result off of a bode plot then the BODE command isn't the correct command but lsim with a specific stim:

R=1e3;
C=0.15e-6;
num=1;
denum = [R*C 1];
m = tf(num,denum);

[u,t] = gensig('sin',1/250);
lsim(m,u,t)
figure
[u,t] = gensig('sin',1/2000);
lsim(m,u,t)

enter image description here

enter image description here

\$\endgroup\$
  • \$\begingroup\$ Oh I see, I had an argument with my partner saying that. there must be a gain difference between the two circuits. he said frequency does not change the gain !! \$\endgroup\$ – user65652 Feb 24 '15 at 20:15
  • \$\begingroup\$ could you edit the original post and post the script, with the carriage return delimiters \$\endgroup\$ – JonRB Feb 24 '15 at 20:20
  • \$\begingroup\$ I added the bode diagram code in the original question \$\endgroup\$ – user65652 Feb 24 '15 at 20:25
  • \$\begingroup\$ well I think I asked if I could find the gain through bode diagram. ( time domain) but the graphs are still in frequency domain \$\endgroup\$ – user65652 Feb 24 '15 at 20:41
  • 1
    \$\begingroup\$ yes, as shown in the bode plot. It is a 1st order system. G = 1/sqrt(1 + (wRC)^2) & Phase = arctan(-wRC) Increase frequency of the input voltage and the output voltage amplitude decreases and the phase increases \$\endgroup\$ – JonRB Feb 24 '15 at 21:01

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.