Digital Signal Processing Reference
In-Depth Information
N=77; f=1/N; nmax=2000; K=1:nmax; phi=pi/20;
delay=40;
dly=1:delay; dly=dly*0;
bufer=1: delay+1; bufer=bufer*0;
Uk=cos(2*pi*f*K + phi ); rk=0.2; uk0=0; xk0=0; pk=0;
noise=randn(size(Uk));
Uk=Uk+0.0*noise;
loopGain=0.008;shift=0;
for k=1:nmax;
uk1=uk0;
xk1=xk0;
uk0=Uk(k);
xk0=rk*xk1 - rk*uk0 + uk1;
Xk(k)=xk0;
zk=uk0*xk0;
bufer(2:delay+1)=dly; bufer(1)=zk;
dly=bufer(1:delay);
ek=(dly(delay)-dly(1))/(delay);
pk=pk+ek; Pk(k)=pk;
rk=rk - loopGain*(pk+shift);
Rk(k)=rk; T(k)=k;
if abs(rk)
>
0.95
rk=0.95;
end
end
subplot(221)
plot(Xk,Uk, '. ');grid; xlabel(' xk '); ylabel(' uk ');title(' A ');
subplot(222)
plot(T,Rk);grid;ylabel(' rk '); title(' B ');
A.4 Chapter 4 MATLAB Programs
In this chapter we used a matrix approach to explain the principles of the FFT. We
did not used butterfly diagrams. Circular convolution was explained in depth. We
presented a hardware scheme for implementation in real time. We looked at a
problem of estimating frequency using a DFT. We elaborated a hardware structure
for real-time implementation of continuous spectrum update. We ended by covering
the principles of the network analyser, an example from RF systems.
A.4.1 Program f 4_4
%Digital Signal Processing:A Practitioner's Approach
%Dr.Kaluri Venkata Ranga Rao, kaluri@ieee.org
%Generates figure 4.10
Search WWH ::




Custom Search