Luận án Giải pháp chuyển đổi dấu phẩy tĩnh và hiệu chỉnh sai lệch trong TI-ADC cho khối thu băng rộng

Trong những năm gần đây, các hệ thống thông tin vô tuyến và hữu tuyến
tốc độ cao như set-top box (STB)/Gateway, BTS, Wave Backhaul đã có những
thành công và sự tăng trưởng mạnh mẽ. Bằng cách khai thác lợi ích của việc
thu nhỏ kích thước các linh kiện CMOS và mạch kỹ thuật số, bộ biến đổi tín
hiệu tương tự sang tín hiệu số (ADC) được đặt trong đầu cuối (front-end) máy
thu ở gần với ăng-ten hơn. Khi đó, các khối xử lý tương tự (Bộ lọc, bộ trộn và
bộ khuếch đại) dịch chuyển vị trí dần sang miền số để tăng khả năng cấu hình
và tính linh hoạt của máy thu như Hình 1.1. Kiến trúc máy thu ở Hình 1.1 được
gọi là máy thu lấy mẫu trực tiếp trên miền số (DDS) hoặc máy thu trực tiếp
RF (RF direct receiver). Trong máy thu trực tiếp RF, chỉ có một khối front-end
duy nhất cho xử lý tín hiệu tương tự, còn hầu hết phần xử lý tín hiệu được thực
hiện trên miền số và do đó cho phép các tuyến thu có thể được lập trình và điều
chỉnh thiết kế. 
pdf 171 trang phubao 26/12/2022 2000
Bạn đang xem 20 trang mẫu của tài liệu "Luận án Giải pháp chuyển đổi dấu phẩy tĩnh và hiệu chỉnh sai lệch trong TI-ADC cho khối thu băng rộng", để tải tài liệu gốc về máy hãy click vào nút Download ở trên.

File đính kèm:

  • pdfluan_an_giai_phap_chuyen_doi_dau_phay_tinh_va_hieu_chinh_sai.pdf
  • pdf2.Tomtat_LA_DKP_2022_13_10.pdf
  • doc3.Trich yeu luan an_DKP.doc
  • pdf3.Trich yeu luan an_DKP.pdf
  • doc12.Thong tin tom tat luan an dua len mang tieng Anh_DKP.doc
  • pdf12.Thong tin tom tat luan an dua len mang tieng Anh_DKP.pdf
  • doc12.Thong tin tom tat luan an dua len mang tieng Viet_DKP.doc
  • pdf12.Thong tin tom tat luan an dua len mang tieng Viet_DKP.pdf

Nội dung text: Luận án Giải pháp chuyển đổi dấu phẩy tĩnh và hiệu chỉnh sai lệch trong TI-ADC cho khối thu băng rộng

  1. 119 KẾT LUẬN Trên cơ sở đặc điểm của TI-ADC áp dụng trong khối thu băng rộng, Luận án đưa ra những phân tích về kỹ thuật hiệu chỉnh đồng thời lệch hệ số khuếch đại và thời gian lấy mẫu của TI-ADC theo nguyên tắc lọc thích nghi loại bỏ nhiễu. Việc hiệu chỉnh đồng thời hai loại sai lệch này giúp cải thiện hiệu năng của TI-ADC và giảm bớt độ phức tạp của mạch thiết kế. Bên cạnh đó, Luận án phát triển giải pháp FFC có nhóm tín hiệu nhằm giảm thời gian thực hiện FFC. Giải pháp này được áp dụng cho các thuật toán DSP, bao gồm FFT đa phương thức trong các thiết bị WLAN chuẩn IEEE 802.11ax và bộ hiệu chỉnh TI-ADC ANC. Các giải pháp đề xuất đã trải qua quá trình mô phỏng và được thực nghiệm trên các thiết bị phần cứng, tổng hợp bằng công cụ Cadence, công cụ Genus 162, PDK XFab SOI CMOS 180nm, từ đó chứng minh tính hiệu quả trên thực tế. A. Một số kết quả đạt được của Luận án 1. Đề xuất giải pháp hiệu chỉnh đồng thời lệch hệ số khuếch đại, thời gian lấy mẫu của TI-ADC dựa trên nguyên tắc lọc thích nghi loại bỏ nhiễu. Kỹ thuật này cho phép ứng dụng rộng rãi cho các bộ TI-ADC tốc độ cao trong khối thu băng rộng. 2. Đề xuất FFC có nhóm tín hiệu và chứng minh tính hiệu quả của đề xuất. Giải pháp nhóm tín hiệu trong FFC đưa ra dựa trên việc chứng minh cơ sở toán học của việc nhóm dữ liệu dựa trên dải biên độ tín hiệu vào, ra và hàm truyền đạt của các khối chức năng trong hệ thống DSP. Giải pháp đề xuất nhằm cải thiện thời gian chuyển đổi FFC, tối ưu tài nguyên phần cứng và tích hợp các thiết kế thuật toán hiệu chỉnh vào lõi ADC đáp ứng yêu cầu các máy thu băng rộng.
  2. 121 lệch băng thông theo nguyên tắc ANC. - Nghiên cứu áp dụng bộ hiệu chỉnh TI-ADC-ANC kết hợp cùng FFT đa phương thức đã thiết kế để xây dựng các bộ thu trong thiết bị WLAN băng rộng, tốc độ cao.
  3. 123 actions on Fundamentals, Vol.E105-A,No.12,pp.-,Dec. 2022.(Đã được chấp nhận đăng) II. CÁC CÔNG TRÌNH CÓ LIÊN QUAN ĐẾN LUẬN ÁN [J4] Loan Pham-Nguyen, Nguyen Thien Viet, Dinh Thi Kim Phuong , “A Configurable Direct Delta-Sigma Converter for Frequency Division Duplex (FDD) Bands from 0.4 GHz to 3.6 GHz”, Journal of Science and Technology Technical Universities, pp: 067–075, Volume 32, Issue 1, Jan, 2022.
  4. 125 [7] William C Black and David A Hodges (1980), “Time interleaved con- verter arrays”, IEEE Journal of Solid-state circuits, 15 (6), pp. 1022– 1029. [8] Brad Brannon, Steve Dorn, and Vandita Pai Raikar (), “Wideband Receiver for 5G, Instrumentation, and ADEF”, Analog Devices. [9] Gabriel Caffarena and Daniel Menard (2016), “Quantization noise power estimation for floating-point DSP circuits”, IEEE Transactions on Cir- cuits and Systems II: Express Briefs, 63 (6), pp. 593–597. [10] Gabriel Caffarena et al., “SQNR estimation of non-linear fixed-point al- gorithms”, in: 2010 18th European Signal Processing Conference, IEEE, 2010, pp. 522–526. [11] David Camarero et al. (2008), “Mixed-signal clock-skew calibration technique for time-interleaved ADCs”, IEEE Transactions on Circuits and Systems I: Regular Papers, 55 (11), pp. 3676–3687. [12] Francesco Centurelli, Pietro Monsurrò, and Alessandro Trifiletti (2012), “Efficient digital background calibration of time-interleaved pipeline analog-to-digital converters”, IEEE Transactions on Circuits and Sys- tems I: Regular Papers, 59 (7), pp. 1373–1383. [13] Chao-Ming Chen, Chien-Chang Hung, and Yuan-Hao Huang (2010), “An energy-efficient partial FFT processor for the OFDMA communi- cation system”, IEEE Transactions on Circuits and Systems II: Express Briefs, 57 (2), pp. 136–140. [14] Hongmei Chen et al. (2017), “All-digital background calibration tech- nique for timing mismatch of time-interleaved ADCs”, Integration, 57, pp. 45–51. [15] Hongmei Chen et al. (2020), “A split-based fully digital feedforward background calibration technique for timing mismatch in TIADC”, In- tegration, 71, pp. 105–114.
  5. 127 [25] Kenneth Dyer et al., “Analog background calibration of a 10 b 40 Msample/s parallel pipelined ADC”, in: 1998 IEEE International Solid- State Circuits Conference. Digest of Technical Papers, ISSCC. First Edition (Cat. No. 98CH36156), IEEE, 1998, pp. 142–143. [26] Manar El-Chammas and Boris Murmann (2011), Background calibra- tion of time-interleaved data converters, Springer Science & Business Media. [27] Manar El-Chammas and Boris Murmann (2011), “A 12-GS/s 81-mW 5-bit time-interleaved flash ADC with background timing skew cali- bration”, IEEE journal of solid-state circuits, 46 (4), pp. 838–847. [28] Jonas Elbornsson, “Analysis, estimation and compensation of mis- match effects in A/D converters”, PhD thesis, Link¨opingUniversity, 2003, chap. 4. [29] Jonas Elbornsson, Fredrik Gustafsson, and J-E Eklund (2004), “Blind adaptive equalization of mismatch errors in a time-interleaved A/D converter system”, IEEE Transactions on Circuits and Systems I: Reg- ular Papers, 51 (1), pp. 151–158. [30] Jonas Elbornsson, Fredrik Gustafsson, and J-E Eklund (2005), “Anal- ysis of mismatch effects in a randomly interleaved A/D converter sys- tem”, IEEE Transactions on Circuits and Systems I: Regular Papers, 52 (3), pp. 465–476. [31] Jonas Elbornsson, Fredrik Gustafsson, and J-E Eklund (2005), “Blind equalization of time errors in a time-interleaved ADC system”, IEEE Transactions on signal processing, 53 (4), pp. 1413–1424. [32] Ph.D.Distinguished Technologist Eldad Perahia, “High Efficiency Wi- Fi: 802.11ax, publised by A Hewlett Packard Enterprise company”, in: A Hewlett Packard Enterprise company, March, 2017. [33] Matthew S. Gast (2013), 802.11 n: A survival Guide, OReilly.
  6. 129 cursive least square algorithm”, AEU-International Journal of Elec- tronics and Communications, 130, p. 153574. [43] Jiadong Hu et al. (2018), “A new all-digital background calibration technique for time-interleaved ADC using first order approximation FIR filters”, arXiv preprint arXiv:1806.09120. [44] Chun-Cheng Huang, Chung-Yi Wang, and Jieh-Tsorng Wu (2011), “A CMOS 6-bit 16-GS/s time-interleaved ADC using digital background calibration techniques”, IEEE Journal of Solid-State Circuits, 46 (4), pp. 848–858. [45] Steven Huang and Bernard C Levy (2007), “Blind calibration of timing offsets for four-channel time-interleaved ADCs”, IEEE Transactions on Circuits and Systems I: Regular Papers, 54 (4), pp. 863–876. [46] Echere Iroaga, Boris Murmann, and Lalitkumar Nathawad, “A back- ground correction technique for timing errors in time-interleaved analog- to-digital converters”, in: 2005 IEEE International Symposium on Cir- cuits and Systems, IEEE, 2005, pp. 5557–5560. [47] Chadi Jabbour, David Camarero, Patrick Loumeau, et al., “Optimizing the number of channels for time interleaved sample-and-hold circuits”, in: 2008 Joint 6th International IEEE Northeast Workshop on Circuits and Systems and TAISA Conference, IEEE, 2008, pp. 245–248. [48] Chadi Jabbour, Patricia Desgreys, and Dominique Dallet (2019), Digi- tally enhanced mixed signal systems, Institution of Engineering & Tech- nology. [49] Shafiq M Jamal et al. (2002), “A 10-b 120-Msample/s time-interleaved analog-to-digital converter with digital background calibration”, IEEE Journal of Solid-State Circuits, 37 (12), pp. 1618–1627.
  7. 131 [58] Naoki Kurosawa et al. (2001), “Explicit analysis of channel mismatch effects in time-interleaved ADC systems”, IEEE Transactions on Cir- cuits and Systems I: Fundamental Theory and Applications, 48 (3), pp. 261–271. [59] Timo I Laakso et al. (1996), “Splitting the unit delay [FIR/all pass filters design]”, IEEE Signal Processing Magazine, 13 (1), pp. 30–60. [60] Nicolas Le Dortz, “Compensation numérique pour convertisseur large bande hautement parallélisé.”, PhD thesis, CentraleSupélec, 2015. [61] Nicolas Le Dortz et al., “22.5 A 1.62 GS/s time-interleaved SAR ADC with digital background mismatch calibration achieving interleaving spurs below 70dBFS”, in: 2014 IEEE International Solid-State Circuits Conference Digest of Technical Papers (ISSCC), IEEE, 2014, pp. 386– 388. [62] H. Le Duc et al., “A Fully Digital Background Calibration of Tim- ing Skew in Undersampling TI-ADC”, in: New Circuits and Systems Conference (NEWCAS), 2014 IEEE 12th International, 2014. [63] Han Le Duc et al., “A fully digital background calibration of tim- ing skew in undersampling TI-ADC”, in: 2014 IEEE 12th Interna- tional New Circuits and Systems Conference (NEWCAS), IEEE, 2014, pp. 53–56. [64] Han Le Duc et al., “Hardware implementation of all digital calibration for undersampling TIADCs”, in: 2015 IEEE International Symposium on Circuits and Systems (ISCAS), IEEE, 2015, pp. 2181–2184. [65] Han Le Duc et al. (2015), “All-digital calibration of timing skews for TIADCs using the polyphase decomposition”, IEEE Transactions on Circuits and Systems II: Express Briefs, 63 (1), pp. 99–103.
  8. 133 [74] Daniel Menard and Olivier Sentieys, “Automatic evaluation of the ac- curacy of fixed-point algorithms”, in: Proceedings 2002 Design, Au- tomation and Test in Europe Conference and Exhibition, IEEE, 2002, pp. 529–535. [75] Daniel Menard and Olivier Sentieys, “DSP code generation with opti- mized data word-length selection”, in: International Workshop on Soft- ware and Compilers for Embedded Systems, Springer, 2004, pp. 214– 228. [76] Daniel Menard et al., “Quantization mode opportunities in fixed-point system design”, in: 2010 18th European Signal Processing Conference, IEEE, 2010, pp. 542–546. [77] Sang-Kyo Shin Michael Wohlert and Keysight Technologies Xiang Feng, “Eye on 802.11ax: What it is and How to Overcome the Test Challenges it Creates”, in: Keysight Technologies, March 17, 2017. [78] Alan V Oppenheim (1999), Discrete-time signal processing, Pearson Education India. [79] Alan V Oppenheim, John R Buck, and Ronald W Schafer (2001), Discrete-time signal processing. Vol. 2, Upper Saddle River, NJ: Pren- tice Hall. [80] Ken Poulton, John J Corcoran, and Thomas Hornak (1987), “A 1- GHz 6-bit ADC system”, IEEE Journal of Solid-State Circuits, 22 (6), pp. 962–970. [81] Ken Poulton et al., “A 20 GS/s 8 b ADC with a 1 MB memory in 0.18/spl mu/m CMOS”, in: 2003 IEEE International Solid-State Circuits Conference, 2003. Digest of Technical Papers. ISSCC. IEEE, 2003, pp. 318–496.
  9. 135 [92] Patrick Satarzadeh, Bernard C Levy, and Paul J Hurst (2008), “Adap- tive semiblind calibration of bandwidth mismatch for two-channel time- interleaved ADCs”, IEEE Transactions on Circuits and Systems I: Reg- ular Papers, 56 (9), pp. 2075–2088. [93] Patrick Satarzadeh, Bernard C Levy, and Paul J Hurst, “A paramet- ric polyphase domain approach to blind calibration of timing mis- matches for M-channel time-interleaved ADCs”, in: Proceedings of 2010 IEEE International Symposium on Circuits and Systems, IEEE, 2010, pp. 4053–4056. [94] Richard Schreier, Gabor C Temes, et al. (2005), Understanding delta- sigma data converters, vol. 74, IEEE press Piscataway, NJ. [95] Changchun Shi, “Statistical method for floating-point to fixed point conversion”, PhD thesis, MS Thesis, UC Berkeley, EECS, 2002. [96] Changchun Shi (2004), Floating-point to fixed-point conversion, Uni- versity of California, Berkeley. [97] Changchun Shi and Robert W Brodersen, “An automated floating- point to fixed-point conversion methodology”, in: 2003 IEEE Interna- tional Conference on Acoustics, Speech, and Signal Processing, 2003. Proceedings.(ICASSP’03). Vol. 2, IEEE, 2003, pp. II–529. [98] Changchun Shi and Robert W Brodersen, “Automated fixed-point data-type optimization tool for signal processing and communication systems”, in: Proceedings of the 41st annual Design Automation Con- ference, ACM, 2004, pp. 478–483. [99] Hayden So, Introduction to fixed point number representation, 2006. [100] Robert Stacey (2015), doc: IEEE 802.11-15/0132r8, TGax Spec Frame- work.
  10. 137 [109] C Vogel, “All-digital Calibration Techniques of Timing Skews for Un- dersampling Time-Interleaved ADCs,””, PhD thesis, Ph. D. disserta- tion, COMELEC Department, Telecom-ParisTech, 46 Rue Barrault . . ., 2015. [110] C. Vogel, S. Saleem, and S. Mendel, “Adaptive blind compensation of gain and timing mismatches in M-channel time-interleaved ADCs”, in: Electronics, Circuits and Systems, 2008. ICECS 2008. 15th IEEE International Conference on, 2008, pp. 49–52, doi: 10.1109/ICECS. 2008.4674788. [111] Christian Vogel (2005), “The impact of combined channel mismatch effects in time-interleaved ADCs”, IEEE transactions on instrumenta- tion and measurement, 54 (1), pp. 415–427. [112] Christian Vogel, Dieter Draxelmayr, and Franz Kuttner, “Compen- sation of timing mismatches in time-interleaved analog-to-digital con- verters through transfer characteristics tuning”, in: The 2004 47th Mid- west Symposium on Circuits and Systems, 2004. MWSCAS’04. Vol. 1, IEEE, 2004, pp. I–341. [113] Christian Vogel and H˚akan Johansson, “Time-interleaved analog-to- digital converters: Status and future directions”, in: 2006 IEEE Inter- national Symposium on circuits and systems, IEEE, 2006, 4–pp. [114] Christian Vogel and Gernot Kubin (2005), “Modeling of time-interleaved ADCs with nonlinear hybrid filter banks”, AEU-International Journal of Electronics and Communications, 59 (5), pp. 288–296. [115] Christian Vogel and Stefan Mendel (2009), “A flexible and scalable structure to compensate frequency response mismatches in time-interleaved ADCs”, IEEE Transactions on Circuits and Systems I: Regular Papers, 56 (11), pp. 2463–2475.
  11. 139 [124] Chia-Hsiang Yang, Tsung-Han Yu, and Dejan Markovic (2011), “Power and area minimization of reconfigurable FFT processors: A 3GPP-LTE example”, IEEE journal of solid-state circuits, 47 (3), pp. 757–768. [125] Chu Yu et al., “Design of a low-power OFDM baseband receiver for wireless communications”, in: 2012 IEEE International Conference on Consumer Electronics (ICCE), IEEE, 2012, pp. 548–549. [126] Yuan-Chu Yu and Yuan-Tse Yu, “Design of a high efficiency recon- figurable pipeline processor on next generation portable device”, in: 2013 IEEE Digital Signal Processing and Signal Processing Education Meeting (DSP/SPE), IEEE, 2013, pp. 42–47. [127] Guichang Zhong, Fan Xu, and Alan N Willson (2006), “A power- scalable reconfigurable FFT/IFFT IC based on a multi-processor ring”, IEEE Journal of solid-state circuits, 41 (2), pp. 483–495.
  12. PL2 15 15 X X nk X(k) = (n4 + 16n3).W256 (A.4) n4=0 n3=0 Công thức (A.1) khai triển tính FFT 2048 điểm sử dụng 5 tầng trong đó các Butterfly có Radix tương ứng như Bảng A.1. Để chứng minh các giá trị n, k của bảng 3.2,lần lượt phân tích từng tầng như sau: Tầng số 2, tầng số 3: Xét tầng số 2, do chỉ sử dụng radix 2 nên n1 nhận giá trị 0 hoặc 1, thay vào công thức (A.2) có công thức (A.5) 15 15 1 X X X (n4+16n3+256n2)(k1+2k2+4k3+64k4) X(k) = [x(n4 + 16n3 + 256n2) × W1024 n4=0 n3=0 n2=0 (A.5) (n4+16n3+256n2+512)(k1+2k2+4k3+64k4) +x(n4 + 16n3 + 256n2 + 512) × W1024 ] 15 15 1 X X X X(k) = [x(n4 + 16n3 + 256n2) + x(n4 + 16n3 + 256n2 + 512) (A.6) n4=0 n3=0 n2=0 512.(k1+2k2+4k3+64k4) (n4+16n3+256n2)(k1+2k2+4k3+64k4) ×W1024 ] × W1024 N2 1 k.N Do tính chất đối xứng của Tw, WN = W2 ; WN = 1 ta có : 15 15 1 X X X X(k) = [x(n4 + 16n3 + 256n2) + x(n4 + 16n3 + 256n2 + 512) n4=0 n3=0 n2=0 (A.7) 512k1 5122k2 2.1024k3 32.1024k4) (n4+16n3+256n2)(k1+2k2+4k3+64k4) ×W1024 × W1024 × W1024 × W1024 ] × W1024 15 15 1 X X X  k1  X(k) = x(n4 + 16n3 + 256n2) + x(n4 + 16n3 + 256n2 + 512).W2 n4=0 n3=0 n2=0 (A.8) (n4+16n3+256n2)(k1+2k2+4k3+64k4) ×W1024
  13. PL4 G4(δ1 + 2δ2 + 4δ3 + 8δ4, n4) = (A.16) 1 1 1 1 X X X X X3 [n4 + 16(8σ1 + 4σ2 + 2σ3 + σ4) + 256k2 + 512k1] σ1=0 σ2=0 σ3=0 σ4=0 (8σ1+4σ2+2σ3+σ4)(δ1+2δ2+4δ3+8δ4) ×W16 Khai triển công thức (A.16) thu được công thức (A.17). G4(δ1 + 2δ2 + 4δ3 + 8δ4, n4) = (A.17) 1 1 1 1 X X X X σ1δ1 σ2δ1 [ [ ( X3 [n4 + 16(8σ1 + 4σ2 + 2σ3 + σ4) + 256k2 + 512k1] × W2 .(−j) ) σ1=0 σ2=0 σ3=0 σ4=0 σ2δ2 (δ1+2δ2)(2σ3+σ4) σ3δ3 σ4δ3 σ4δ4 ×W2 .W16 ] × W2 .(−j) ].W2 Đặt: X4 [n4 + 16(8σ1 + 4σ2 + 2σ3 + σ4) + 256k2 + 512k1] = (A.18) (δ1+2δ2+4δ3+8δ4) G4(δ1 + 2δ2 + 4δ3 + 8δ4, n4) × W256 Công thức (A.19) là công thức thực hiện FFT cho tầng số 4. 15 X n4.k4 X(k) = X4 [n4 + 16(8σ1 + 4σ2 + 2σ3 + σ4) + 256k2 + 512k1] × W16 (A.19) n4=0 4 Tầng số 5: Ở tầng số 5 sử dụng các butterfly Radix 2 , Với n4, k4 như sau: n4 = 8α1 +4α2 +2α3 +α4 và k4 = β1 +2β2 +4β3 +8β4 và α1,2,3,4 = 0, 1 ; β1,2,3,4 = 0, 1. Thay các giá trị n4, k4 vào công thức (A.19) có công thức (A.20). Công thức này là công thức thực hiện FFT đa phương thức tại tầng số 5. 1 1 1 1 X X X X X(k) = [ ( [ X4(8α1 + 4α2 + 2α3 + α4 + 16(8σ1 + 4σ + 2σ3 + σ4) α1=0 α2=0 α3=0 α4=0 (A.20) β1.α1 β1α2 β1.α2 (2α3+α4)(β1+2β2 β3α4 β4α4 +256k2 + 512k1).W2 .(−j) ].W2 W16 ).2 ].W2
  14. PL6 orig_snr = zeros(n_sims,n_fins); orig_sndr = zeros(n_sims,n_fins); cal_sfdr = zeros(n_sims,n_fins); cal_snr = zeros(n_sims,n_fins); cal_sndr = zeros(n_sims,n_fins); %% Randomize the mismatches g_mis = sigma_g * randn(n_sims,n_channels); s_mis = sigma_t * randn(n_sims,n_channels); o_mis = sigma_0 * randn(n_sims,n_channels); %% Kaiser window to estimate PSD kaiser_win=kaiser(n_samples,38); kaiser_win_rbw=enbw(kaiser_win,fs); %% Randomize the errors noise_mat = (sigma_jitt + sigma_noise) * randn(n_sims,Nfft); %% Monte Carlo tic % Preallocate signals out_tiadc = zeros(1,Nfft); out_ideal = zeros(1,Nfft); t = 0:Ts:0+Ts*(Nfft-1); assignin(’base’,’t’, t); assignin(’base’,’t_s’, t); for sim_i=1:n_sims % Set errors and noise gain_err = g_mis(sim_i,:); skew_err = s_mis(sim_i,:); offset_err = o_mis(sim_i,:); noise = noise_mat(sim_i,:); for fin_i=1:n_fins assignin(’base’,’nyquist_zone’, NZs(fin_i)); assignin(’base’,’NY’, NZs(fin_i)); % Assign the bin to input
  15. PL8 %[orig_snr1(sim_i,fin_i), orig_sndr1(sim_i,fin_i), orig_sfdr1(sim_i,fin_i)] = myperfMeasureTung(out_tiadc,fin_bin,n_channels); %[cal_snr1(sim_i,fin_i), cal_sndr1(sim_i,fin_i), cal_sfdr1(sim_i,fin_i)] = myperfMeasureTung(comp_sig,fin_bin,n_channels); % Original performance [orig_spec F]=periodogram(out_tiadc,kaiser_win,numel(out_tiadc),fs,’power’); try orig_snr(sim_i,fin_i) = snr(orig_spec,F,kaiser_win_rbw,’power’); catch err orig_snr(sim_i,fin_i) = snr(orig); end try orig_sfdr(sim_i,fin_i)=sfdr(orig_spec,F,’power’); catch err orig_sfdr(sim_i,fin_i)=sfdr(orig); end try orig_sndr(sim_i,fin_i)=sinad(orig_spec,F,kaiser_win_rbw,’power’); catch err orig_sndr(sim_i,fin_i)=sinad(orig); end % Calibrated performance if not(isnan(comp_sig(:))) % Performance [cal_specF]= periodogram(comp_sig(:),kaiser_win,numel(comp_sig(:)),fs,’power’); try
  16. PL10 max_tmp = max(eval([’sig_log’ num2str(grp_i)])); block_attrs(grp_i).OutMax=max(block_attrs(grp_i).OutMax,max_tmp); end end end end end toc %% Store the result result_file=[input_file’.multisim_’ num2str(n_sims)’.res.mat’]; save(result_file, ’fins’, ’orig_sfdr’,’orig_snr’,’orig_sndr’, ’cal_sfdr’,’cal_snr’,’cal_sndr’, ’g_mis’,’s_mis’,’o_mis’,’noise_mat’); if (n_block_grps>0) save(result_file,’block_attrs’,’-append’); end save_system(mdl); close_system(mdl); B.2. Hàm tạo mô hình sim_log % Create log system by adding Toworkspace blocks after interested blocks to log signal max, min values. Input: system, dut: system and dut. file [system’_block_tags.mat’] contains variable block_tags. Output: file [system’_log’] is new model in which new ToWorkspace blocks are added. function newsystem = create_log_model(system, dut, block_tags_file) load_system(system); newsystem=[system’_log’];
  17. PL12 if (n_block_grps<block_tags(blk_i).tag) n_block_grps=block_tags(blk_i).tag;end end end % Blocks that be observed/logged max/min values, configure wordlength are grouped block_attrs=struct(’name’,{},’OutMin’,{},’OutMax’,{},’range’,{}, ’OutDataTypeStr’,{},’ProductDataTypeStr’,{},’CoefDataTypeStr’,{},’RndMeth’,{},’ ’,{}); %% Find the groups and add ToWorkspace block to log values for grp_i=1:n_block_grps block_names=find_system([newsystem ’/’ dut],’LookUnderMasks’,’all’,’tag’,num2str(grp_i)); block_attrs(grp_i).name=block_names; block_id=get_param(char(block_names(1)),’Handle’); block_parent=get_param(block_id,’Parent’); block_ports=get_param(block_id,’PortHandles’); block_pos=get_param(block_id,’Position’); % for each group, add min,max blocks to log the max, min of the block outputs log=add_block(’built-in/ToWorkspace’,[char(block_parent) ’/log’ num2str(grp_i)]); set_param(log,’VariableName’,[’sig_log’ num2str(grp_i)]); set_param(log,’MaxDataPoints’,[’inf’]); set_param(log,’SampleTime’,’-1’); set_param(log,’Position’,[block_pos(1)+50 block_pos(2)-20 block_pos(1)+90 block_pos(2)]); log_ports=get_param(log,’PortHandles’); add_line(block_parent,block_ports.Outport,log_ports.Inport); end save([newsystem ’_block_attrs.mat’],’block_attrs’); save([newsystem ’_block_tags.mat’], ’block_tags’); save_system(newsystem);