解:电路的频率响应为H(?)?y(t)?x(t)11j?C? ?Rj?RC?1j?C1syms r c k; r=input('r='); c=input('c='); k=r*c; b=[1]; a=[k 1];
[H,w]=freqs(b,a); subplot(211); plot(w,abs(H));
set(gca,'xtick',[0,10]);
set(gca,'ytick',[0 0.4 0.707 1]); xlabel('\\omega(rad/s)'); ylabel('Magnitude'); title('|H(j\\omega)|'); grid on; subplot(212); plot(w,angle(H));
set(gca,'xtick',[0,10]); xlabel('\\omega(rad/s)'); ylabel('Phase');
title('|phi(\\omega)|'); grid on;
r=1 c=0.1
|H(j?)|1Magnitude0.7070.40010?(rad/s)|phi(?)|0-0.5-1-1.5Phase010?(rad/s)
r=10 c=0.1
|H(j?)|1Magnitude0.7070.4X: 1.012Y: 0.7030010?(rad/s)|phi(?)|0-0.5-1-1.5Phase010?(rad/s)
r=100 c=0.1
|H(j?)|1Magnitude0.7070.4X: 0.1012Y: 0.70300?(rad/s)|phi(?)|0-0.5-1-1.5Phase0?(rad/s)
(2)系统输入信号x(t)?cos(100t)?cos(3000t),t?0~0.2s,该信号包含了一个低频分量和一个高频分量。试确定适当的RC值,滤除信号中的高频分量,并绘出滤波前后的时域信号波形及系统的频率响应曲线。 解: b=[1];
a=[0.0015 1]; h=tf(b,a);
[H,w]=freqz(b,a); t=0:0.001:0.2;
x=cos(100*t)+cos(3000*t);plot(t,x); lsim(h,x,t);plot(w,abs(H)); xlabel('\\omega(rad/s)'); ylabel('Magnitude'); title('|H(j\\omega)|'); grid on;
RC=0.0015
Linear Simulation Results210-1-200.020.040.060.080.10.120.140.160.180.2AmplitudeTime (seconds)|H(j?)|1.0031.002Magnitude1.00110.9990.99800.511.522.533.5?(rad/s)
RC=0.001
Linear Simulation Results210-1-200.020.040.060.080.10.120.140.160.180.2
AmplitudeTime (seconds)|H(j?)|1.0031.002Magnitude1.00110.9990.99800.511.522.533.5?(rad/s)
相关推荐: