Making Bode Amplitude Plot of LC Filter in Matlab

In summary: However, I still need to solve for Rp theoretically.In summary, the conversation discusses making a theoretical Bode Amplitude plot for a given circuit in Matlab. The transfer function for the circuit is provided and the graph is meant to resemble a notch filter. However, the plotted graph does not match the expected result due to a low parallel resistance equivalent. The conversation also discusses solving for the parallel resistance theoretically using quality factor relationships.
  • #1
roam
1,271
12

Homework Statement



I'm trying to make a theoretical Bode Amplitude plot of the following circuit in Matlab:

sm6q6b.jpg


The transfer functions is given by

##T=\frac{V_{out}}{V_{in}}=\frac{R_2}{R_2+z_p}##

##z_p=R_p|| j \omega L || \frac{1}{j \omega C} = \frac{R_p}{1+ j R_p (\omega C - \frac{1}{\omega L})}##

Where ##R_p## is the parallel loss resistance of the inductor (~19.49 Ω). R2=300, C=22.09 nF, L=10.08 mH.

I know that the graph is supposed to look like a notch (trap) filter, here is an experimental graph of this same filter:

xcnh94.jpg


The Attempt at a Solution



Here is the code I used to make a theoretical plot:

R=1440.96;
C=22.09e-9;
Rp=19.49;
R2=300;
L=10.08e-3;

s = tf('s');
z=Rp/(1+(Rp*C)+(Rp/(s*L)));
sys = R2/(R2+z);
h = bodeplot(sys);
setoptions(h,'FreqUnits','Hz','PhaseVisible','off');
grid;

But my plot looks like this:

2vcdrm9.jpg


And after the 103 point it's completely flat.

What is wrong with my code? :confused:

Any help is appreciated.
 
Physics news on Phys.org
  • #2
19.49Ω seems a disastrously low parallel resistance equivalent. I think it will wreak havoc on a filter's response. Are you sure that isn't meant to be a series resistance of 19.49Ω?

I can't comment on matlab.
 
Last edited:
  • Like
Likes 1 person
  • #3
roam said:
Code:
z=Rp/(1+(Rp*C)+(Rp/(s*L)));
I think you forgot an 's' in there. It should be:
Code:
z=Rp/(1+(Rp*s*C)+(Rp/(s*L)));
But I doubt it makes any difference. Like NascentOxygen wrote, that RLC circuit will be extremely lossy, i.e. its Q factor will be very low/bandwidth will be very high.
 
  • Like
Likes 1 person
  • #4
Judging by the "experimental graph of this same filter", Rp is likely closer to 20 kΩ than 20 Ω.
 
  • #5
Thank you so much for the feedback.

NascentOxygen said:
19.49Ω seems a disastrously low parallel resistance equivalent. I think it will wreak havoc on a filter's response. Are you sure that isn't meant to be a series resistance of 19.49Ω?

I can't comment on matlab.
Yes, I think 19.49 Ω may be the series resistance of the inductor (I measured it using an RCL meter, I will double check this).

But according to my book the parallel resistance Rp may be calculated from the graph using the quality factor relationships:

##Q_p = \frac{R_p}{\omega_0 L}=\omega_0 R_p C##

##Q= Q_p \sqrt{1-2|T_{min}|^2}##

Qp being the quality factor of the parallel inductor-capacitor combination, and Q is the actual quality factor of the filter (a measure of the sharpness of the peak).

|Tmin| is the minimum value of the transfer function (minimum value of |T|), which occurs when |zp| is a maximum (at resonant frequency ##\omega_0 =1/\sqrt{LC}##).

In my plot Tmin is my last data point where it is equal to -0.080 dB (or 1.01 in linear magnitude), so

##1.01 = \frac{V_{out}}{V_{in}}= \frac{300}{300+z_p} \implies z_p = -2.97##

zp and Rp are related by:

##z_p=\frac{R_p}{1+jR_p(\omega C - \frac{1}{\omega L})}##

But then how do I solve for ##R_p## from this impedance? How can I get rid of the j's in the denominator? (I'm looking for a way to solve for Rp without actually having to measure it experimentally).

gneill said:
Judging by the "experimental graph of this same filter", Rp is likely closer to 20 kΩ than 20 Ω.

Yes, when I vary the resistance to to Rp≈1 kΩ, the theoretical graph starts to look right.
 
Last edited:

1. What is a Bode amplitude plot?

A Bode amplitude plot is a graphical representation of the amplitude response of a system, such as an LC filter, as a function of frequency. It is used to analyze the frequency response of a system and identify characteristics such as gain, resonance, and bandwidth.

2. How is a Bode amplitude plot created in Matlab?

In Matlab, a Bode amplitude plot can be created using the bode function. This function takes in the transfer function of the system and automatically generates a plot of the amplitude response.

3. What is the significance of the amplitude plot in analyzing an LC filter?

The amplitude plot of an LC filter provides important information about its frequency response. It can show the gain or attenuation of the filter at different frequencies, as well as the resonance frequency and bandwidth of the filter. This information is crucial in understanding and designing filters for specific applications.

4. How can I interpret the results of a Bode amplitude plot for an LC filter?

The results of a Bode amplitude plot for an LC filter can be interpreted by looking at the shape of the plot. A flat response indicates that the filter has a constant gain over a wide range of frequencies. A peak in the plot indicates resonance, while a sharp drop-off in the plot indicates the filter's bandwidth. The slope of the plot also provides information about the filter's order and characteristics.

5. Can a Bode amplitude plot be used to design an LC filter?

Yes, a Bode amplitude plot can be used to design an LC filter. By analyzing the plot and understanding the filter's frequency response, it is possible to adjust the filter's components to achieve the desired characteristics, such as gain, resonance, and bandwidth. Matlab also has tools and functions that can assist in the design process.

Similar threads

  • Engineering and Comp Sci Homework Help
Replies
4
Views
3K
  • Engineering and Comp Sci Homework Help
Replies
10
Views
2K
  • Engineering and Comp Sci Homework Help
Replies
1
Views
2K
  • Engineering and Comp Sci Homework Help
Replies
14
Views
7K
  • Engineering and Comp Sci Homework Help
Replies
1
Views
2K
  • Engineering and Comp Sci Homework Help
Replies
8
Views
3K
  • Engineering and Comp Sci Homework Help
Replies
1
Views
2K
  • MATLAB, Maple, Mathematica, LaTeX
Replies
1
Views
2K
  • Advanced Physics Homework Help
Replies
4
Views
980
  • Engineering and Comp Sci Homework Help
Replies
12
Views
3K
Back
Top