{[ promptMessage ]}

Bookmark it

{[ promptMessage ]}

HW3Solutions GMSKtrellis

# HW3Solutions GMSKtrellis - trellishat(L 1*Ts 1(L...

This preview shows page 1. Sign up to view the full content.

clear BT=0.3; L=6; % trellis length. to=[-1.995:0.01:1.995]; q=GMSKphase(0.3,to); qhat=zeros(size(to)); qhat=qhat+(1+to)/2.*(to>-1); qhat=qhat-(to-1)/2.*(to>1); qL=length(q); Ts=qL/4; phi=zeros(L,(L+3)*Ts); phihat=phi; for m=1:L phi(m,(m-1)*Ts+1:(m+3)*Ts)=q; phi(m,(m+3)*Ts+1:(L+3)*Ts)=ones(1,(L-m)*Ts); phihat(m,(m-1)*Ts+1:(m+3)*Ts)=qhat; phihat(m,(m+3)*Ts+1:(L+3)*Ts)=ones(1,(L-m)*Ts); end trellis=zeros(2^L,(L+3)*Ts); trellishat=trellis; for m=1:2^L decimal=m-1; d=ones(1,L); d(1,L-ceil(log2(m))+1:L)=1-2*(dec2bin(decimal)-48); trellis(m,:)=d*phi; trellishat(m,:)=d*phihat; end trellis(:,(L+1)*Ts+1:(L+3)*Ts)=trellis(:,(5)*Ts+1:(7)*Ts);
This is the end of the preview. Sign up to access the rest of the document.

Unformatted text preview: trellishat(:,(L+1)*Ts+1:(L+3)*Ts)=trellishat(:,(5)*Ts+1:(7)*Ts); trellis=[trellis trellis(:,(5)*Ts+1:(7)*Ts)]; trellishat=[trellishat trellishat(:,(5)*Ts+1:(7)*Ts)]; t=[1:(L+5)*Ts]/Ts; plot(t,angle(exp(j*(pi/2)*trellis(1,:))),'b.') plot(t,angle(exp(j*(pi/2)*trellishat(1,:))),'r.') hold on for m=2:2^L plot(t,angle(exp(j*(pi/2)*trellis(m,:))),'b.') plot(t,angle(exp(j*(pi/2)*trellishat(m,:)))','r.') end hold off axis([0 (11) -pi pi]) grid on xlabel('t/T') ylabel('phase (radians)') title('Phase trellis for GMSK (BT=0.3) and CPM (2REC, h=1/2)')...
View Full Document

{[ snackBarMessage ]}

Ask a homework question - tutors are online