| Communications Toolbox Release Notes | ![]() |
旧リリースからのアップグレード
本節では、Communications Toolbox 2.0.1 からVersion 2.1 への移行でのアップデートの問題について記述します。本節は、以下のトピックスを説明します。
2.0.1 よりも前のバージョンからアップグレードする場合は、Communications Toolbox 2.0 Release Notesの旧リリースからのアップグレードを参照してください。
既存のガロア体コードのアップデート
既存のコードが2m 要素をもつガロア体において計算を行う場合は(mは1から16の整数)、新規のガロア体の機能を利用するために、コードをアップデートすることができます。
関数の変更
下記の表は、新規のガロア体データタイプに対して機能するRelease 13 関数または演算子に対応するRelease 12の関数の一覧です。Release 13 関数のシンタックスは異なりますが、対応するRelease 12 の関数よりも使いやすくなっています。
| Release 12 関数 |
Release 13 関数または演算子 |
コメント |
gfadd |
+ |
|
gfconv |
conv |
|
gfcosets |
cosets |
cosetsは、セル配列を出力し、gfcosetsはNaN-padded行列を出力します。 |
gfdeconv |
deconv |
|
gfdiv |
./ |
|
gffilter |
|
gffilterとは異なり、filterは、最終状態も出力します。 |
gflineq |
\ |
|
gfplus |
+ |
|
gfprimck |
isprimitive |
isprimitiveは、原始性を検出しますが分解可能性を検出しません。 |
gfprimdf |
|
|
gfprimfd |
|
|
gfrank |
rank |
|
gfroots |
roots |
gfrootsとは異なり、rootsは、ルートの重複を示し、拡張フィールド内の多項式を処理することができます。 |
gfsub |
- |
|
gftuple |
.^, log, polyval |
R13 ガロア配列を用いたフォーマットの変換と簡略化を参照 |
Release 12 とRelease 13 のフィールド要素の表現の変換
既存のコードの中には、Release 12 でサポートされている指数駅式と新規のガロア配列の間でデータを変更する必要がある部分があります。下記のコードの例は、GF(16)の要素を表わすサンプルベクトルについて変換を行います。
% Sample data m = 4; % For example, work in GF(2^4) = GF(16). a_r12 = [2 5 0 -Inf]; % GF(16) elements in exponential format % 1. Convert to the Release 13 Galois array. A = gf(2,m); % Primitive element of the field a_r13 = A.^(a_r12); % Positive exponents mean A to that power. a_r13(find(a_r12 < 0)) = 0; % Negative exponents mean zero. % 2. Convert back to the Release 12 exponential format. m = a_r13.m; A = gf(2,m); a_r12again = zeros(size(a_r13)); % Preallocate space in a matrix. zerolocations = find(a_r13 == 0); nonzerolocations = find(a_r13 ~= 0); a_r12again(zerolocations) = -Inf; % Map 0 to negative exponent. a_r12again(nonzerolocations) = log(a_r13(nonzerolocations)); % Check that the two conversions are inverses. ck = isequal(a_r12,a_r12again) ck = 1
Release 12 とRelease 13 の間の多項式の表現の変換
Release 12 とRelease 13 は、GF(2m) に関する多項式の表現に異なるフォーマットを利用します。Release 12 は、多項式を、昇 べきの順の係数のベクトルとして表わします。内容に応じて、ベクトル内の各係数は、prime field 内の要素を表わすか、あるいはextension fieldの要素の指数形式を表わします。Release 13 は、以下に説明する記法を用います。
原始多項式.. 関数gf, isprimitive, primpolyは、バイナリ表現が多項式の係数を表わす整数スカラを利用して原始多項式を表わします。最下位のビットは定数項です。
たとえば、スカラ 13 は、バイナリ表現 1101 をもち、多項式 D3 + D2 + 1 を表わします。
その他の多項式. 多項式の演算、評価、根を求める際に、あるいはフィールド要素の最小多項式を求める際に、降 べき順に係数のガロアベクトルを用いて、多項式を表わします。ベクトルに利すとされた各係数は、How Integers Correspond to Galois Field Elementsに記述されている表現を用いてフィールドの要素を表わします。
たとえば、ガロアベクトルgf([1 1 0 1],1)は、多項式 x3 + x2 + 1 を表わします。また。ガロアベクトル gf([1 2 3],3) は、多項式 x2 + Ax + (A+1) を表わします。ここで、Aは GF(23) に対するデフォルトの多項式の根です。係数A+1は、3のバイナリ表現が11であるため、3のベクトル要素に対応します。
記法を示す例題. 下記の例題コードは、Release 12 とRelease 13 の多項式のフォーマットの変換方法の決定に役立つでしょう。
m = 3; % Work in GF(8). poly_r12 = [1 1 0 1]; % 1+x+x^3, ascending order poly_r13 = gf([1 0 1 1],m); % x^3+x+1 in GF(8), descending order % R12 polynomials pp_r12 = gfprimdf(m); % A primitive polynomial mp_r12 = gfminpol(4,m); % The minimal polynomial of an element rts_r12 = gfroots(poly_r12); % Find roots. % R13 polynomials pp_r13 = primpoly(m,'nodisplay'); % A primitive polynomial mp_r13 = minpol(gf(4,m)); % The minimal polynomial of an element rts_r13 = roots(poly_r13); % Find roots. % R12 polynomials converted to R13 formats % For primitive poly, change binary vector to decimal scalar. pp_r12_conv = bi2de(pp_r12); % For minimal poly, change ordering and make it a Galois array. mp_r12_conv = gf(fliplr(mp_r12)); % For roots of polynomial, note that R12 answers are in % exponential format. Convert to Galois array format. rts_r12_conv = gf(2,m) .^ rts_r12; % Check that R12 and R13 yield the same answers. c1 = isequal(pp_r13,pp_r12_conv); % True. c2 = isequal(mp_r13,mp_r12_conv); % True. c3 = isequal(rts_r13,rts_r12_conv); % True.
R13 ガロア配列を用いたフォーマットの変換と簡略化
既存のコードがgftupleを用いて指数と多項式フォーマット間の変換を行ったりう場合は、これらのフォーマットのいずれかを簡略化する場合は、下記の例題コードは、Release 13 のガロア配列を用いてそれらの作業を行う方法を決定するのに役立つでしょう。
% First define key characteristics of the field. m = 4; % For example, work in GF(2^4) = GF(16). A = gf(2,m); % Primitive element of the field % 1. Simplifying a Polynomial Format poly_big = 2^10 + 2^7; % Want to refer to the element A^10 + A^7. However, % cannot use gf(poly_big,m) because poly_big is too large. poly1 = A.^10 + A.^7 % One way to define the element. poly2 = polyval(de2bi(poly_big,'left-msb'),A); % Another way. % The results show that A^10 + A^7 equals A^3 + A^2 in this % field, using the binary representation of 12 as 1100. % 2. Simplifying an Exponential Format exp_big = 39; exp_simple = log(A.^exp_big) % Simplest exponential format. % The results show that A^39 equals A^9 in this field. % 3. Converting from Exponential to Polynomial Format expf1 = 7; pf1 = A.^expf1 % The results show that A^7 equals A^3 + A + 1 in this % field, using the binary representation of 11 as 1011. % 4. Converting from Polynomial to Exponential Format pf2 = 11; % Represents the element A^3 + A + 1 expf2 = log(gf(pf2,m)) % The results show that A^3 + A + 1 equals A^7 in this field.
poly1 = GF(2^4) array. Primitive polynomial = D^4+D+1 (19 decimal) Array elements = 12 exp_simple = 9 pf1 = GF(2^4) array. Primitive polynomial = D^4+D+1 (19 decimal) Array elements = 11 expf2 = 7
既存のReed-Solomon M-コードの更新
既存のM-コードがReed-Solomon符号を処理する場合は、それらの更新して、強化されたReed-Solomonの機能を利用したい場合があります。以下に、留意すべき重要な点について記述します。
rsenco, rsencode, encode(...,'rs')の代わりにrsencを利用してください。
rsdeco, rsdecode, decode(...,'rs')の代わりにrsdecを利用してください。
rspolyの代わりにrsgenpolyを利用してください。
rsencおよびrsdecは、メッセージおよびcodewordsに対してガロア配列を利用します。ガロア配列に関する情報を得るには、Representing Elements of Galois Fieldsを参照してください。
rsencおよびrsdecは、Release 12 の関数と比較して異なる方法で、シンボルを解釈します。For an example showing how to convert between Release 12 とRelease 13 の間での解釈の変換方法を示す例として、Release 12 とRelease 13 の符号データの表現の変換を参照してください。
rsenc, rsdec, およびrsgenpolyは、生成多項式引数を表わすために降 順にガロア配列を用います。下記のコマンドは、Release 12 フォーマットからRelease 13 フォーマットに生成多項式を変換する方法を示します。
n = 7; k = 3; % Examples of code parameters m = log2(n+1); % Number of bits in each symbol gp_r12 = rspoly(n,k); % R12 exponential format, ascending order gp_r13 = gf(2,m).^fliplr(gp_r12); % Convert to R13 format.
rsencは、デフォルトで各ワードの最後 にパリティシンボルを置きます(rsdecは、パリティシンボルを探します)。パリティシンボルがワードの専用にあるコードを処理するには、rsencおよびrsdecを呼び出すときに文字列'beginning'を入力引数として用います。
Release 12 とRelease 13 の符号データの表現の変換
Reed-Solomon符号を処理する既存のM-コードを更新するために、下記の例は新規関数rsencと従来からの関数rsencoを使ってデータを符号化する方法を示します。
% Basic parameters for coding m = 4; % Number of bits per symbol in each codeword t = 2; % Error-correction capability n = 2^m-1; k = n-2*t; % Message length and codeword length w = 10; % Number of words to encode in this example % Lookup tables to translate formats between rsenco and rsenc p2i = [0 gf(2,m).^[0:2^m-2]]; % Galois vector listing powers i2p = [-1 log(gf(1:2^m-1,m))]; % Integer vector listing logs % R12 method, exponential format % Exponential format uses integers between -1 and 2^m-2. mydata_r12 = randint(w,k,2^m)-1; code_r12 = rsenco(mydata_r12,n,k,'power'); % * Encode the data. * % Convert any -Inf values to -1 to facilitate comparisons. code_r12(isinf(code_r12)) = -1; code_r12 = reshape(code_r12,n,w)'; % One codeword per row % R12 method, decimal format % This yields same results as R12 exponential format. mydata_r12_dec = mydata_r12 + 1; % Convert to decimal. code_r12_dec = rsenco(mydata_r12_dec,n,k,'decimal'); % Encode. code_r12_dectoexp = code_r12_dec - 1; % Convert to exponential. c1 = isequal(code_r12,code_r12_dectoexp); % True. % R12 method, binary format % This yields same results as R12 exponential format. mydata_r12_bin = de2bi(mydata_r12_dec',m); % Convert to binary. code_r12_bin = rsenco(mydata_r12_bin,n,k,'binary'); % Encode. code_r12_bintoexp = reshape(bi2de(code_r12_bin),n,w)' - 1; c2 = isequal(code_r12,code_r12_bintoexp); % True. % R13 method mydata_r13 = fliplr(mydata_r12); % Reverse the order. % Convert format, using +2 to get in the right range for indexing. mydata_r13 = p2i(mydata_r13+2); code_r13 = rsenc(mydata_r13,n,k); % * Encode the data. * codeX = double(code_r13.x); % Retrieve data from Galois array. % Convert format, using +1 to get in the right range for indexing. codelogX = i2p(codeX+1); codelogX = fliplr(codelogX); % Reverse the order again. c3 = isequal(code_r12,codelogX) % True. c3 = 1
様々なRelease 12 のデータ符号化表現の変換
以下の規則は、Release 12 Reed-Solomon関数がサポートする指数、10進、2進フォーマットの変換方法を示します。
de2biおよびbi2deを用います。一番右のビットは、この意味においては最上位のビットです。
msgbin = randint(11,4); % Message for a (15,11) = (2^4-1, 11) code msgdec = bi2de(msgbin)'; % Binary to decimal msgexp = msgdec - 1; % Decimal to exponential codeexp = rsenco(msgexp,15,11,'power'); codeexp(find(codeexp < 0)) = -1; % Use -1 consistently. codedec = codeexp + 1; % Exponential to decimal codebin = de2bi(codedec); % Decimal to binary
機能の変更点
| 関数 |
機能の変更点 |
wgn |
デフォルトの測定単位は、dBWfで、従来は"dB"でした。単位をシンタックスで明示的に指定するには、powertype入力引数を'dB'ではなく'dBW'に設定します。関数の出力は、この変更によってシンタックス内で影響を受けません。 |
廃止された関数
下記の表は、廃止された関数の一覧です。これらの関数は、下位互換性のためRelease 13 に含まれていますが、将来のリリースでは削除される予定です。2列目は、同様の機能を与える関数です。同様の関数は、オリジナルの関数と比較して、異なる入力引数を要求したり、あるいは異なる出力引数を生成する場合があります。
| 関数 |
同機能の関数 |
gfplus |
ガロア配列に対する+演算子 |
rsdeco |
rsdec |
rsdecode |
rsdec |
rsenco |
rsenc |
rsencode |
rsenc |
rspoly |
rsgenpoly |
| メジャーバグフィックス | 既知のソフトウェアとドキュメントの問題 | ![]() |