How do I determine the resistance for RLC low pass filter?

  • Thread starter Thread starter rickyw2777
  • Start date Start date
Click For Summary
To determine the resistance for an RLC low pass filter that attenuates frequencies above 4500 Hz, the user is struggling with an unrealistically low resistance value of 0.0001, which leads to unsolvable equations. The discussion clarifies that the resistance impacts the filter's response near resonance, affecting the decay rate of the amplitude. It is suggested that the user should understand the relationship between resistance, inductance, and capacitance to design the filter effectively. Additionally, the importance of grasping the underlying principles of filter design is emphasized, as it is crucial for various applications in physical sciences. The conversation encourages further study on concepts like the quality factor (Q) in second-order filters.
rickyw2777
Messages
11
Reaction score
2
Homework Statement
A music filter. Cheap or low-quality audio amplifiers can add noise to an audio recording that is
distracting and undesired. Two examples are a white-noise “hiss” across all frequencies, which
arises from electrons that randomly move inresponse to thermal fluctuations, and a 60Hz “hum”,
which comes from the electrical grid itself (power lines and electrical wires within buildings)
coupling inductively into the circuit.

Our objective is to design an RLC filter to remove these noise sources while allowing the audio
itself (e.g., tones from musical instruments and speech) to get through. The time-series vector 𝑣in
will represent the noisy music, which could be carried on an audio cable from a phone, laptop, or
stereo system, and 𝑣out represents the filtered audio signal from your circuit.
Relevant Equations
V_{in}-V_L-V_c-V_R=0;
V_{c,k+1} = V_{c,k} +(h/c)*i_k;
V_{R,k} = i_k*R;
i_{k+1} = i_k +(h/L)*V_{L,K};
Hi, I am trying to build a RLC low pass filter that atenuates the frequency below 4500 Hz. However, I have encountered some problem when choosing the correct R to work with.
Here is the Circuit
1761794381066.webp


Here is the original sound.

1761793908108.webp


Here is my code in Matlab

function Vout = myFilterCircuit(Vin,h)
n_V = length(Vin);
f_7 = 4470;; % Undesired frequency
h_7 = h; % delta time
% These are for the constant and initialization of the variables
t_7 = 0:h_7:(n_V-1)*h_7; % This is the independent variable

LC_2 = 1/((f_7*2*pi)^2);% This is for L C
R_7 = 0.0001; % This is R
L_7 = 1*10^-3; % This is L
C_7 = LC_2/L_7; % This is C
%
A_2 = [1,h_7/C_7;-h_7/L_7,1-h_7*R_7/L_7]; % This is the A matrix
B_2 = [0;h_7/L_7]; % This is the B matrix
C_2 = [1,0]; % This is the C matrix
D_2 = [0]; % This is the D matrix
%
sys_8 = ss(A_2,B_2,C_2,D_2,h_6); % This is the system
[y_8,tout_8,x_8] = lsim(sys_8, V_inter, t_7); % Simulate the system response
%
Vout = y_8(:,1); % This is the V_c output.

figure;
bode(sys_7, sys_8);
legend('60Hz LPF', '4470Hz LPF');

end


Here is the Bode Diagram

1761793998364.webp

So you can see I used the inductance of 1*10^-3, and capacitance around 1.26*10^-6. I try to use the resistance of 0.0001, but it does not work. And the system of equation eventually becomes not solvable. Please let me know what value of R I should choose.
 

Attachments

  • 1761794348733.webp
    1761794348733.webp
    10.2 KB · Views: 1
Physics news on Phys.org
Hi,

Interesting exercise. Your post is rather incomplete though, and also hard to follow.
Cosmetically: you want to enclose code with the tags [code=matlab] ... [/code]
Matlab:
function Vout = myFilterCircuit(Vin,h)
n_V = length(Vin);
f_7 = 4470;; % Undesired frequency
h_7 = h; % delta time
% These are for the constant and initialization of the variables
t_7 = 0:h_7:(n_V-1)*h_7; % This is the independent variable
%etc

I only have Octave instead of matlab, but it tells me I need to run pkg load control to use the ss function.

Furthermore, your code only shows a function, not what is calling the function. So Vin and h are unknown; further down h_6 is unknown and so is V_inter.

I personally have no idea what matrices A, B, C, D represent, but that may be just ignorance.

rickyw2777 said:
build a RLC low pass filter that atenuates the frequency below 4500 Hz
Do you mean "attenuates frequencies above 4500 Hz" ? What about the 60 Hz ?

R = 0.0001 is unrealistically low.

Can you explain what the variables in your relevant equations are ?

##\ ##
 
My bad, it should be keep the frequency lower than 4500 Hz and Atenuates the frequency above 4500 Hz.

The 60 Hz should be reduced by a RLC bandpass filter.

A, B, C D are just the matrix representation of the set of differential equations.

you can see my note here

1761833964903.webp


I guess just generally what is the factor that determines how quickly the amplitude decays for the low pass filter.
 
The resistance (the losses) in the circuit control the filter response at/near resonance. EEs call this Q, others use damping. I wouldn't ask your code to choose this, it's easy enough with simple formulas to do it based on what you want your filter response (bode plot, etc.) to look like. That way you'll be more likely to understand and remember it.

Yes, we could just tell you the answer, but that's not how we roll here. Study some of my comments on the web a bit first. I like Khan Academy for most things like this. Then ask us about the parts that you don't understand.

BTW, I know this seems like just a HW problem, but this is a really, really, important thing for anyone in the physical sciences to understand. It is a version of the simple harmonic oscillator which is crucial for damn near every subject, from race car suspensions, antennas, power supplies, up through quantum mechanics. You WILL learn it at some point, you'll have to.

PS: Maybe start with a search for "second order filter Q".
 
rickyw2777 said:
I guess just generally what is the factor that determines how quickly the amplitude decays for the low pass filter.
Can you write a simple equation for ##{V_{out}(\omega)}## / ##{V_{in}(\omega)}## using complex impedance values (phasors, et. al.)? Have you studied that yet? Hint: it's a voltage divider.
 
Greetings to all, I am writing with a question regarding graph generation in LTSpice. I am using LTSpice XVII and am trying to plot AM-AM and AM-PM characterization for a power amplifier, but I haven't been successful yet, likely due to my lack of practice with this specific analysis. I have been using a square wave input at 8.2 MHz as the voltage waveform for my power amplifier. It is said that for a switching amplifier like Class-D, the AM-AM / AM-PM (amplitude-to-amplitude and...