Ask a question to Desklib · AI bot

2 Pages382 Words227 Views

BookmarkShareRelated Documents
%Task2M1=0.001;B1=0.1;K1=1M2=0.001;B2=0.01;K2=1M3=0.001;B3=0.001;K3=1H1=tf([1],[M1 B1 K1])H2=tf([1],[M2 B2 K2])H3=tf([1],[M3 B3 K3])f=0:0.1:100; %Frequancy in Hzw=2*pi*f; %Frequancy in rad/sG1=freqresp(H1,w);Test1=G1(1,1,:)mag_H1=20*log10(abs(Test1(:)));ph_H1=unwrap(angle(Test1(:)));G2=freqresp(H2,w);Test2=G2(1,1,:)mag_H2=20*log10(abs(Test2(:)));ph_H2=unwrap(angle(Test2(:)));G3=freqresp(H3,w);Test3=G3(1,1,:)mag_H3=20*log10(abs(Test3(:)));ph_H3=unwrap(angle(Test3(:)));figure()subplot(2,1,1)plot(mag_H1,'red')hold onplot(mag_H2,'blue')hold onplot(mag_H3,'black')title('Magnitude for H1,H2,H3')subplot(2,1,2)plot(ph_H1,'red')hold onplot(ph_H2,'blue')hold onplot(ph_H3,'black')title('Phase Response for H1,H2,H3')%task3t=[0:1/20000:10]A=1;f1=1;x1=A*sin(2*pi*f1*t);f2=3;x2=A*sin(2*pi*f2*t);f3=5;x3=A*sin(2*pi*f3*t);figure()subplot(3,1,1)lsim(H3,x1,t)

## Found this document preview useful?

### Support

#### +1-312 997 5479

Chat with our experts. we are online and ready to help.