SubbandCodingDemo

PURPOSE ^

SubbandCodingDemo(SourceSwitch)

SYNOPSIS ^

function SubbandCodingDemo(SourceSwitch)

DESCRIPTION ^

SubbandCodingDemo(SourceSwitch)

  Demonstrates the use of SBR2 and SBR2C to the problem of subband coding. 
  The optional subband coder is given by the paraunitary matrix extracted 
  by a PEVD. 
  
  SubbandCodingDemo(SourceSwitch) provides two demonstrations selected 
  through the variable SourceSwitch.

  SubbandCodingDemo('MA14') generates a random moving average innovation 
  filter of order 14, with coefficients drawn from a complex Gaussian 
  distribution, from which an auto-correlation sequence is derived. This 
  process is assumed to be multiplexed into 4 subchannels. 

  SubbandCodingDemo('AR4') approximates an autoregressive (RA) process
  with two complex pole pairs. This AR4 process is approximated by 
  finite length auto-correlation of order 200.

  SubbandCodingDemo('Simple') uses a short auto-correlation sequence of 
  order 6, with a demultiplexing into 3 channels.

  The examples 'MA14' and 'AR4' are similar to the examples in [1].

  Reference:

  [1] S. Redif, J.G. McWhirter, and S. Weiss, "Design of FIR Paraunitary 
      Filter Banks for Subband Coding Using a Polynomial Eignvalue Decompo- 
      sition," IEEE Transactions on Signal Processing, vol. 59, no. 11, 
      pp. 5253-5264, Nov 2011.

CROSS-REFERENCE INFORMATION ^

This function calls: This function is called by:

SOURCE CODE ^

0001 function SubbandCodingDemo(SourceSwitch)
0002 %SubbandCodingDemo(SourceSwitch)
0003 %
0004 %  Demonstrates the use of SBR2 and SBR2C to the problem of subband coding.
0005 %  The optional subband coder is given by the paraunitary matrix extracted
0006 %  by a PEVD.
0007 %
0008 %  SubbandCodingDemo(SourceSwitch) provides two demonstrations selected
0009 %  through the variable SourceSwitch.
0010 %
0011 %  SubbandCodingDemo('MA14') generates a random moving average innovation
0012 %  filter of order 14, with coefficients drawn from a complex Gaussian
0013 %  distribution, from which an auto-correlation sequence is derived. This
0014 %  process is assumed to be multiplexed into 4 subchannels.
0015 %
0016 %  SubbandCodingDemo('AR4') approximates an autoregressive (RA) process
0017 %  with two complex pole pairs. This AR4 process is approximated by
0018 %  finite length auto-correlation of order 200.
0019 %
0020 %  SubbandCodingDemo('Simple') uses a short auto-correlation sequence of
0021 %  order 6, with a demultiplexing into 3 channels.
0022 %
0023 %  The examples 'MA14' and 'AR4' are similar to the examples in [1].
0024 %
0025 %  Reference:
0026 %
0027 %  [1] S. Redif, J.G. McWhirter, and S. Weiss, "Design of FIR Paraunitary
0028 %      Filter Banks for Subband Coding Using a Polynomial Eignvalue Decompo-
0029 %      sition," IEEE Transactions on Signal Processing, vol. 59, no. 11,
0030 %      pp. 5253-5264, Nov 2011.
0031 
0032 %  S Weiss, Univ. of Strathclyde, 27/8/14
0033 
0034 if nargin==0,
0035    SourceSwitch='Simple';
0036 end;
0037 
0038 %---------------------------------------
0039 %  Define Scenario
0040 %---------------------------------------
0041 % create autocorrelation sequence for scenatio
0042 if strcmp(SourceSwitch,'MA14')==1,
0043    a = (randn(14,1)+sqrt(-1)*randn(14,1))/sqrt(2);
0044    r = conv(a,flipud(conj(a)));
0045    M = 4;
0046 elseif strcmp(SourceSwitch,'AR4')==1, 
0047    poles=[0.9*exp(j*0.6283), 0.9*exp(-j*0.6283), 0.85*exp(j*2.8274), 0.85*exp(-j*2.8274)];
0048    x = [1; zeros(99,1)];
0049    a = filter(1,poly(poles),x);
0050    r = conv(a,flipud(conj(a)));
0051    M = 4;
0052 elseif strcmp(SourceSwitch,'Simple')==1,
0053    r = [-j/4 .5 -j 2 j .5 j/4];
0054    M = 3;
0055 else                    
0056    error('option for input parameter SourceSwitch not implemented');
0057 end;  
0058 
0059 % create parahermitian matrix from autocorrelation sequence
0060 R = MuxPolyCovMat(r,M);
0061 
0062 %---------------------------------------
0063 %  Perform decompositions
0064 %---------------------------------------
0065 % SBR2
0066 [H,Gamma]=SBR2(R,50,0.00000001,0,'SBR2');
0067 P1 = PolyMatDiagSpec(Gamma,1024);
0068 CG1 = CodingGain(Gamma);
0069 % SBR2C (SBR2 version optimised for coding gain)
0070 [H,Gamma_C]=SBR2(R,50,0.00000001,0,'SBR2C');
0071 CG2 = CodingGain(Gamma_C);
0072 P2 = PolyMatDiagSpec(Gamma_C,1024);
0073 
0074 %---------------------------------------
0075 %  Display results
0076 %---------------------------------------
0077 % numerical results
0078 disp('Subband Coding Demo');
0079 disp('-------------------');
0080 disp(sprintf('  coding gain with SBR2:  %f',CG1));
0081 disp(sprintf('  coding gain with SBR2C: %f',CG2));
0082 
0083 % graphical output
0084 W=(0:1023)/512;
0085 figure(1); clf;
0086 plot(W,10*log10(abs(P1)));
0087 hold on;
0088 plot(W,10*log10(abs(P2)),'--');
0089 xlabel('normalised angular frequency \Omega/\pi');
0090 ylabel('power spectral densities / [dB]');
0091 disp('power spectral densities are displayed in Figure 1:')
0092 disp('  solid lines: PSDs achieved by SBR2'); 
0093 disp('  dashed lines: PSDs achieved by SBR2C'); 
0094

Generated on Wed 03-Dec-2014 19:38:11 by m2html © 2005