Academic Integrity: tutoring, explanations, and feedback — we don’t complete graded work or submit on a student’s behalf.

Can you help me this problem by using the MATHLAB? Thank you so much. Please hel

ID: 2084717 • Letter: C

Question

Can you help me this problem by using the MATHLAB? Thank you so much. Please help me to do all questions.

Can you just put directly the MathLab code on this website, please don't take a screenshot of the codingbecause I had a hard time to write it again. But the graph pic is useful :).

I appreciate your time to help me.

1. Introduction In circuit theory, a filter is an electrical network that alters the amplitude and/or phase characteristics of a signal with respect to frequency. The following circuit in Fig. 1 is an example of band-reject or notch filter. This assignment studies the function of this filter. 0.12 0.1H VouT VIN 0.1F Figure 1. Notch Filter 2. Tasks (a) Derive the transfer function and differential equation of the system in Fig. 1 (b) Evaluate and plot the magnitude frequency response, i.e., |H(jw] vs. w. (c) Plot the bode plots using MATLAB command freqs. Compare the magnitude bode plot with the plot in (b) (d) Let the input voltage be cos t, cos 5t, cos 9 t, cos 10 t, and cos 20t, respectively, and assume initial conditions to be zero. Solve the system equation to find the output response. Plot the steady state response to each input signal and comment on the system amplitude. 3. Requirements The following are the requirements about this project: (1) The report needs to be all typed, without any handwriting. (2) The report should include at least, "introduction", "Results", and "Conclusion". The "Results" section should include each required plot following by discussions, sequentially according to the numbering of the tasks. (3) The MATLAB code should be grouped as one M file and attached to the end of the report as "Appendix".

Explanation / Answer

clc
close all
clear all
% (a)
L=0.1;
C=0.1;
R=0.1;
s=tf('s');
Z1=0.1;
Z2=0.1*s+1/(0.1*s);
sys=Z2/(Z1+Z2)
% transfer funnction
H= minreal(sys)
% for differential equation we need to derive its state space model
% H =num/den
num=[1 0 100];
den=[1 1 100];
[A,B,C,D] = tf2ss(num,den)
%(b)
% the frequencies values in the plot
omega=0:0.01:50;
% magnitude frquency response values
magnitude1=(100-(omega).^2)/sqrt(((100-(omega).^2)).^2+(omega).^2);
magnitude=20*log(magnitude1)
% plot magnitude vs frquency
figure(1)
plot(omega,magnitude)
xlabel('omega in rad/sec')
ylabel('magnitude')
%(c)
% using matlab command
num=[1 0 100];
den=[1 1 100];
figure(2)
freqs(num,den)
% specify frequency ranges
num=[1 0 100];
den=[1 1 100];
w=0.01:0.1:100;
figure(3)
freqs(num,den,w)
% (d) from written part put the differential equation here
syms x(t) y(t)

x(t)=cos(t);
Dx=diff(x,t);
D2x=diff(x,t,2);
Dy=diff(y,t);
D2y=diff(y,t,2);
eqn=D2y==-Dy-100*y+D2x+100*x;
cond=[y(0)==0,Dy(0)==0,D2y(0)==0];
sol(t)=dsolve(eqn,cond)
figure(4)
subplot(3,2,1)
t=0:0.01:2;
plot(t,sol(t))

x(t)=cos(5*t);
Dx=diff(x,t);
D2x=diff(x,t,2);
Dy=diff(y,t);
D2y=diff(y,t,2);
eqn=D2y==-Dy-100*y+D2x+100*x;
cond=[y(0)==0,Dy(0)==0,D2y(0)==0];
sol(t)=dsolve(eqn,cond)
subplot(3,2,2)
t=0:0.01:2;
plot(t,sol(t))

x(t)=cos(9*t);
Dx=diff(x,t);
D2x=diff(x,t,2);
Dy=diff(y,t);
D2y=diff(y,t,2);
eqn=D2y==-Dy-100*y+D2x+100*x;
cond=[y(0)==0,Dy(0)==0,D2y(0)==0];
sol(t)=dsolve(eqn,cond)
subplot(3,2,3)
t=0:0.01:2;
plot(t,sol(t))

x(t)=cos(10*t);
Dx=diff(x,t);
D2x=diff(x,t,2);
Dy=diff(y,t);
D2y=diff(y,t,2);
eqn=D2y==-Dy-100*y+D2x+100*x;
cond=[y(0)==0,Dy(0)==0,D2y(0)==0];
sol(t)=dsolve(eqn,cond)
subplot(3,2,4)
t=0:0.01:2;
plot(t,sol(t))

x(t)=cos(20*t);
Dx=diff(x,t);
D2x=diff(x,t,2);
Dy=diff(y,t);
D2y=diff(y,t,2);
eqn=D2y==-Dy-100*y+D2x+100*x;
cond=[y(0)==0,Dy(0)==0,D2y(0)==0];
sol(t)=dsolve(eqn,cond)
subplot(3,2,5)
t=0:0.01:2;
plot(t,sol(t))