Assume the load resistor RL= 100 Ohms. Assume vS(t) = 1cos(wt). Rs=3ohms, L1=7H, L2=9H, and C=8uF
write a MATLAB code which takes in vS(t) with various frequencies for the range of frequencies from 0Hz to 20kHz, and finds vL(t) for each of those frequencies, and the computes the gain ratio of the amplitudes |vL(t)|/|vS(t)| which is also equal to g = |VL |/|VS|. Use at least 1000 data points for w, within the frequency range. Plot g versus w: a) using normal scale and also b) in the log g vs log w scale, using the logspace command or loglog command. Type “help logspace” or “help loglog” in MATLAB. Provide the codes and the plots here. Which plot do you like better, why? Adjust the horizontal and vertical axis limits if necessary, for better viewing. Inspect the curves, at what frequency does the non-zero frequency “peak” occur? Why at this particular frequency? Can you find a relationship of this frequency to the circuit variables?
Matlab Code:
wlog=logspace(-2,5,1000) %creating 1000 points from 10^(-2) to
10^(5)
Rl=100 %values given
Rs=3
L1=7
L2=9
C=0.000008
for i=1:1000
denom(i) =
(-j*(w(i).^3)*C*L1*L2)-((w(i).^2)*(C*L2*Rs+C*Rl*L1))+(j*w(i)*(C*Rl*Rs+L1+L2))+Rs+Rl
%defiining denominator of transfer function
H(i) =(L2*Rl*j*w(i))/ denom(i);
end
HdB=20*log10(abs(H)) %this is gain in dB
figure
plot(w,abs(H)) %ploting gain vs w=frequency in (rad/s)
xlabel('frequency (rad/s)')
ylabel ('|H(jw)|')
figure
semilogx(wlog,HdB) %ploting gain in dB vs log(w)
xlabel('frequency (rad/s)')
ylabel ('|H(jw)| in dB')
a) Plot og gain vs frequency (rad/s) :
b) Plot of gain in dB vs frequency in log scale:
From the two curves it is clear that the 2nd plot is better for viewing.
At frequency in rad/s=125.8 rad/s gain is maximum which is equal to 112.1
Thus at frequency =20Hz gain is maximum.
This is the resonant frequency at which gain is maximum.
Assume the load resistor RL= 100 Ohms. Assume vS(t) = 1cos(wt). Rs=3ohms, L1=7H, L2=9H, and C=8uF...
Assume the load resistor RL= 100 Ohms. Assume vS(t) = 1cos(wt). Rs=3ohms, L1=7H, L2=9H, and C=8uF First, convert the circuit to an impedance equivalent circuit in the phasor domain finding impedances in terms of w. Draw the circuit and mark the impedances. Then analyze the circuit (you will need to find equivalent impedances and apply voltage division rule) to find the phasor VL in terms of VS, and find an expression for g = |VL|/|VS|, the gain ratio of the...