Browse Source

Тестовые изменения

ChStepan 4 tháng trước cách đây
mục cha
commit
24e1517057

+ 30 - 30
src/src/Sim/AfterFir.txt

@@ -6,36 +6,36 @@
           0
           0
           0
-     -16479
-      28159
-     421517
-     844246
-     781469
-     318354
-    -634122
-    -467959
-    4309982
-   14548922
-   29928013
-   49055434
-   66076865
-   77960175
-   84344085
-   82099693
-   72563535
-   58197977
-   39374074
-   21512941
-    8818258
-    1219862
-    -980959
-     -92074
-     608130
-     835837
-     693118
-     193445
-     -34305
-      -1831
+   -2341849
+    5293579
+   63048205
+   83243206
+ -137481208
+ -319234592
+  100466762
+  701131905
+  733746604
+  639192568
+  788287753
+  721245448
+  646285816
+  779695533
+  453625201
+ -187370243
+ -284760621
+    4986491
+   95895522
+   26353382
+   -2701813
+    -466905
+          0
+          0
+          0
+          0
+          0
+          0
+          0
+          0
           0
           0
           0

+ 8 - 3
src/src/Sim/DecimFilterWrapperTb.sv

@@ -7,7 +7,7 @@ module DecimFilterWrapperTb	();
 //================================================================================
 
 parameter	N	=   4; // Order of the filter
-parameter	M	=	4;// Delay in CIC filter
+parameter	M	=	2;// Delay in CIC filter
 parameter	InDataWidth	=	14;
 parameter	integer DECIM_WIDTH	=	$ceil($clog2(2*M)) + 4; // Decimation factor width
 
@@ -116,7 +116,7 @@ end
 always	@(posedge	Clk50)	begin
 	if	(!Rst)	begin
 		if (tbCnt == 100) begin
-			decimFactor	<= M/1;
+			decimFactor	<= 4;
 		end
 		// end else if (tbCnt == 5400) begin
 			// decimFactor	<= 1;
@@ -134,7 +134,7 @@ always	@(posedge	Clk50)	begin
 			// decimFactor	<= 7;
 		// end
 	end else begin
-	 decimFactor <= M/1; // 
+	 decimFactor <= 4; // 
 	end 
 end
 
@@ -236,8 +236,10 @@ ImpulseResponseFilter2ndStage
 	.DecimFactor_i	(decimFactor),
 	.Rst_i			(Rst),
 	.DataVal_i		(impResponseVal),
+	// .DataVal_i		(oscWind),
 
 	.Data_i			(impResponse),
+	// .Data_i			(singlePulse),
 	
 	.Data_o			(impResponse2nd),
 	.DataVal_o		(impResp2ndVal)
@@ -340,13 +342,16 @@ always	@(posedge	Clk50)	begin
 	if	(tbCnt==32'd1)	begin
 		impResp = $fopen("C:/S5243_FFT_REPO/src/src/Sim/ImpResp.txt","w");
 	end	else	begin
+		// if	(impResp2ndVal)	begin
 		if	(impResponseVal)	begin
 			// $fwrite(impResp,"%d\n",   firRespout);
 			$fwrite(impResp,"%d\n",   impResponse);
+			// $fwrite(impResp,"%d\n",   impResponse2nd);
 		end	
 	end
 end
 
+
 always @(posedge Clk50) begin 
 	if (tbCnt == 32'd1) begin
 		afterFir  <= $fopen("C:/S5243_FFT_REPO/src/src/Sim/AfterFir.txt","w");

+ 197 - 0
src/src/Sim/FFTTest.asv

@@ -0,0 +1,197 @@
+FormatSpec = '%d';
+
+N = 4;
+R = 2;
+B = 14;
+M = 1;
+
+PointsNum = 100;
+
+Bmax = ceil(log2(((R*M)^N)/R)+B);
+MaxWidthR2 = ceil(log2(((2*M)^N)/2)+B);
+MaxWidthR4 = ceil(log2(((4*M)^N)/4)+B);
+
+K = N*20*log10(M);
+BitGrowth = ceil(2^(K/20));
+Bnew = B+BitGrowth;
+
+x = 1:1:PointsNum;
+xDecim = 1:1:PointsNum/R;
+
+Fc = 3;
+Fs = 50;
+
+DeltaPulse = [1, zeros(1, PointsNum*R-1)];
+DeltaPulseTransposed = transpose(DeltaPulse);
+
+IdealCicDecim = dsp.CICDecimator(R,M,N);
+ImpResp = IdealCicDecim(DeltaPulseTransposed);
+
+FftPNum = 50000;
+Step = 1 / FftPNum;
+f = linspace(1e-10, 1 - Step, FftPNum);
+H = ones(1,50000);
+
+for i = 1:50000
+    H(i) = abs(sin(pi * M * R * f(i)) / sin(pi * f(i)))^N;
+end
+
+Hdb = 20 * log10(abs(H));
+Hdb = Hdb - max(Hdb);
+%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
+ReadInDataId = fopen('C:/S5243_FFT_REPO/src/src/Sim/InputSignal.txt','r');
+InDataSignal = fscanf(ReadInDataId,FormatSpec);
+fclose(ReadInDataId);
+
+ReadFilteredDataId = fopen('C:/S5243_FFT_REPO/src/src/Sim/FilteredData.txt','r');
+FilteredData = fscanf(ReadFilteredDataId,FormatSpec);
+fclose(ReadFilteredDataId);
+
+ReadImpulseRestId = fopen('C:\S5243_FFT_REPO\src\src\Sim\ImpResp.txt','r');
+ImpulseResp = fscanf(ReadImpulseRestId,FormatSpec);
+fclose(ReadImpulseRestId);
+
+ReadFilterCoefsId = fopen('C:\S5243_FFT_REPO\src\src\Sim\CorrFilterCoefs.txt','r');
+FilterCoefs = fscanf(ReadFilterCoefsId,FormatSpec);
+fclose(ReadFilterCoefsId);
+
+
+%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
+
+FreqBandOrig = Fs*(1:(PointsNum))/PointsNum;
+FreqbandDecim = (Fs/2*R)*(1:(PointsNum))/PointsNum;
+
+InDataFft = abs(fft(InDataSignal+randn(size(InDataSignal)))/PointsNum);
+InDataFftDb = 20*log10(InDataFft);
+
+IdealCicFFt = abs(fft(ImpResp));
+IdealCicFFtDb = 20*log10(IdealCicFFt);
+IdealCicFFtDb = IdealCicFFtDb-max(IdealCicFFtDb);
+
+CalcCicFft = abs(fft(ImpResp));
+CalcCicFftDb = 20*log10(IdealCicFFt);
+CalcCicFftDb = IdealCicFFtDb-max(IdealCicFFtDb);
+
+FilteredDataFft = abs(fft(FilteredData+randn(size(FilteredData)))/PointsNum);
+% FilteredDataFft = abs(fft(FilteredData)/PointsNum);
+FilteredDataFftDb = 20*log10(FilteredDataFft);
+FilteredDataFftDb = FilteredDataFftDb-max(FilteredDataFftDb);
+
+ImpuseRespFft = abs(fft(ImpulseResp));
+ImpuseRespFftDb = 20*log10(ImpuseRespFft);
+ImpuseRespFftDb = ImpuseRespFftDb-max(ImpuseRespFftDb);
+
+Fband = 0:(Fs/R)/(PointsNum/R):(Fs/R)-1/(PointsNum/R);
+FbandOrig = 0:Fs/PointsNum:Fs-1/PointsNum;
+
+%InDataFftDb = InDataFftDb(1:length(Fband));
+%FilteredDataFftDb = FilteredDataFftDb(1:length(Fband));
+%ImpuseRespFftDb = ImpuseRespFftDb(1:length(Fband));
+
+%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
+% figure('name','In Data Time/Freq', 'Numbertitle', 'off')
+% subplot(2,1,1)
+% plot(InDataSignal)
+% grid on;
+% grid minor;
+% title('In Signal')
+% xlabel('Time')
+% ylabel('Amp')
+% 
+% subplot(2,1,2)
+% plot(FilteredData)
+% grid on;
+% grid minor;
+% title('Filtered Data')
+% xlabel('Time')
+% ylabel('Amp')
+
+%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
+% figure('name','Frequency compare', 'Numbertitle', 'off')
+% subplot(3,1,1)
+% plot(FbandOrig,InDataFftDb)
+% grid on;
+% grid minor;
+% title('Single-Sided Amplitude Spectrum of Data before filter')
+% xlabel('Time')
+% ylabel('Amp')
+% 
+% subplot(3,1,2)
+% plot(FbandOrig,ImpuseRespFftDb)
+% grid on;
+% grid minor;
+% title('Cic Frequency response')
+% xlabel('f (Hz)')
+% ylabel('Amp')
+% 
+% subplot(3,1,3)
+% plot(Fband,FilteredDataFftDb)
+% grid on;
+% grid minor;
+% title('Single-Sided Amplitude Spectrum of Data after filter')
+% xlabel('f (Hz)')
+% ylabel('Amp')
+% 
+% figure('name','Impulse Response Time/Freq', 'Numbertitle', 'off')
+% subplot(2,1,1)
+% plot(FbandOrig,ImpulseResp)
+% grid on;
+% grid minor;
+% title('In Signal')
+% xlabel('Time')
+% ylabel('Amp')
+% 
+% subplot(2,1,2)
+% plot(FbandOrig,ImpuseRespFftDb)
+% grid on;
+% grid minor;
+% title('Single-Sided Amplitude Spectrum of InData')
+% xlabel('f (Hz)')
+% ylabel('Amp')
+
+
+figure('name','In Data Time/Freq', 'Numbertitle', 'off')
+plot(Hdb)
+grid on;
+grid minor;
+title('In Signal')
+xlabel('Time')
+ylabel('Amp')
+
+% figure(2)
+% plot(IdealCicFFtDb)
+% grid on;
+% grid minor;
+% title('Filtered Data')
+% xlabel('Time')
+% ylabel('Amp')
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+

+ 78 - 36
src/src/Sim/FFTTest.m

@@ -1,9 +1,9 @@
 FormatSpec = '%d';
 
-N = 3;
-R = 1;
+N = 4;
+R = 2;
 B = 14;
-M = 3;
+M = 1;
 
 PointsNum = 100;
 
@@ -21,6 +21,23 @@ xDecim = 1:1:PointsNum/R;
 Fc = 3;
 Fs = 50;
 
+DeltaPulse = [1, zeros(1, PointsNum*R-1)];
+DeltaPulseTransposed = transpose(DeltaPulse);
+
+IdealCicDecim = dsp.CICDecimator(R,M,N);
+ImpResp = IdealCicDecim(DeltaPulseTransposed);
+
+FftPNum = 50000;
+Step = 1 / FftPNum;
+f = linspace(1e-10, 1 - Step, FftPNum);
+H = ones(1,50000);
+
+for i = 1:50000
+    H(i) = abs(sin(pi * M * R * f(i)) / sin(pi * f(i)))^N;
+end
+
+Hdb = 20 * log10(abs(H));
+Hdb = Hdb - max(Hdb);
 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
 ReadInDataId = fopen('C:/S5243_FFT_REPO/src/src/Sim/InputSignal.txt','r');
 InDataSignal = fscanf(ReadInDataId,FormatSpec);
@@ -47,6 +64,14 @@ FreqbandDecim = (Fs/2*R)*(1:(PointsNum))/PointsNum;
 InDataFft = abs(fft(InDataSignal+randn(size(InDataSignal)))/PointsNum);
 InDataFftDb = 20*log10(InDataFft);
 
+IdealCicFFt = abs(fft(ImpResp));
+IdealCicFFtDb = 20*log10(IdealCicFFt);
+IdealCicFFtDb = IdealCicFFtDb-max(IdealCicFFtDb);
+
+CalcCicFft = abs(fft(ImpResp));
+CalcCicFftDb = 20*log10(IdealCicFFt);
+CalcCicFftDb = IdealCicFFtDb-max(IdealCicFFtDb);
+
 FilteredDataFft = abs(fft(FilteredData+randn(size(FilteredData)))/PointsNum);
 % FilteredDataFft = abs(fft(FilteredData)/PointsNum);
 FilteredDataFftDb = 20*log10(FilteredDataFft);
@@ -82,47 +107,64 @@ FbandOrig = 0:Fs/PointsNum:Fs-1/PointsNum;
 % ylabel('Amp')
 
 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
-figure('name','Frequency compare', 'Numbertitle', 'off')
-subplot(3,1,1)
-plot(FbandOrig,InDataFftDb)
-grid on;
-grid minor;
-title('Single-Sided Amplitude Spectrum of Data before filter')
-xlabel('Time')
-ylabel('Amp')
-
-subplot(3,1,2)
-plot(FbandOrig,ImpuseRespFftDb)
-grid on;
-grid minor;
-title('Cic Frequency response')
-xlabel('f (Hz)')
-ylabel('Amp')
+% figure('name','Frequency compare', 'Numbertitle', 'off')
+% subplot(3,1,1)
+% plot(FbandOrig,InDataFftDb)
+% grid on;
+% grid minor;
+% title('Single-Sided Amplitude Spectrum of Data before filter')
+% xlabel('Time')
+% ylabel('Amp')
+% 
+% subplot(3,1,2)
+% plot(FbandOrig,ImpuseRespFftDb)
+% grid on;
+% grid minor;
+% title('Cic Frequency response')
+% xlabel('f (Hz)')
+% ylabel('Amp')
+% 
+% subplot(3,1,3)
+% plot(Fband,FilteredDataFftDb)
+% grid on;
+% grid minor;
+% title('Single-Sided Amplitude Spectrum of Data after filter')
+% xlabel('f (Hz)')
+% ylabel('Amp')
+% 
+% figure('name','Impulse Response Time/Freq', 'Numbertitle', 'off')
+% subplot(2,1,1)
+% plot(FbandOrig,ImpulseResp)
+% grid on;
+% grid minor;
+% title('In Signal')
+% xlabel('Time')
+% ylabel('Amp')
+% 
+% subplot(2,1,2)
+% plot(FbandOrig,ImpuseRespFftDb)
+% grid on;
+% grid minor;
+% title('Single-Sided Amplitude Spectrum of InData')
+% xlabel('f (Hz)')
+% ylabel('Amp')
 
-subplot(3,1,3)
-plot(Fband,FilteredDataFftDb)
-grid on;
-grid minor;
-title('Single-Sided Amplitude Spectrum of Data after filter')
-xlabel('f (Hz)')
-ylabel('Amp')
 
-figure('name','Impulse Response Time/Freq', 'Numbertitle', 'off')
-subplot(2,1,1)
-plot(FbandOrig,ImpulseResp)
+figure('name','In Data Time/Freq', 'Numbertitle', 'off')
+plot(Hdb)
 grid on;
 grid minor;
 title('In Signal')
 xlabel('Time')
 ylabel('Amp')
 
-subplot(2,1,2)
-plot(FbandOrig,ImpuseRespFftDb)
-grid on;
-grid minor;
-title('Single-Sided Amplitude Spectrum of InData')
-xlabel('f (Hz)')
-ylabel('Amp')
+% figure(2)
+% plot(IdealCicFFtDb)
+% grid on;
+% grid minor;
+% title('Filtered Data')
+% xlabel('Time')
+% ylabel('Amp')
 
 
 

Những thai đổi đã bị hủy bỏ vì nó quá lớn
+ 512 - 512
src/src/Sim/FilteredData.txt


+ 35 - 29
src/src/Sim/FreqDomainCicFilt.py

@@ -1,10 +1,13 @@
-
 import os
 import sys
 import numpy as np
+import matplotlib
 import matplotlib.pyplot as plt
+matplotlib.use('TkAgg')
+
+
+R = 4  # Decimation factor
 
-R = 4 # Decimation factor
 
 # Open the input file and read the impulse response data
 def read_impulse_response(file_path):
@@ -25,73 +28,78 @@ def read_impulse_response(file_path):
 
     return np.array(impulse_response)
 
+
 def convert_to_frequency_domain(impulse_response):
     # Perform FFT
     frequency_response = np.fft.fft(impulse_response)
-    
+
     frequency_response /= np.max(np.abs(frequency_response))
-    
+
     return frequency_response
 
+
 # Plot the frequency response
 def plot_frequency_response(frequency_response, input_signal_time_domain, fs=50e6):
-    normalized_freq = np.fft.fftfreq(len(input_signal_time_domain), 1/fs) / fs
-    
+    normalized_freq = np.fft.fftfreq(len(input_signal_time_domain), 1 / fs) / fs
+
     plt.figure(figsize=(10, 6))
     half_len = len(normalized_freq) // 2
-    plt.plot(normalized_freq[:half_len], np.abs(frequency_response[:half_len]), 
+    plt.plot(normalized_freq[:half_len], np.abs(frequency_response[:half_len]),
              label='Signal Frequency Response')
     plt.title('Frequency Response')
     plt.xlabel('Normalized Frequency (f/fs)')
     # Magnitude in dB
     plt.plot(normalized_freq[:half_len], 20 * np.log10(np.abs(frequency_response[:half_len])), label='Magnitude (dB)')
     plt.ylabel('Magnitude (dB)')
-    plt.ylim(-150, 10) 
+    plt.ylim(-150, 10)
     plt.grid(True)
     plt.legend()
     plt.xlim(0, 0.5)
     plt.show()
 
+
 # Main function to execute the conversion
 def main():
-    impulse_response_file = 'C:\S5243_FFT_REPO\src\src\Sim\FilteredData.txt'
+    impulse_response_file = r'C:\S5243_FFT_REPO\src\src\Sim\FilteredData.txt'
 
     filt_data_impulse_response = read_impulse_response(impulse_response_file)
     filt_data_frequency_response = convert_to_frequency_domain(filt_data_impulse_response)
-    plot_frequency_response(filt_data_frequency_response,filt_data_impulse_response)
+    plot_frequency_response(filt_data_frequency_response, filt_data_impulse_response)
     print("Frequency response conversion completed successfully.")
     # Show the input signal 
-    input_signal_time_domain = read_impulse_response('C:\S5243_FFT_REPO\src\src\Sim\InputSignal.txt')
+    input_signal_time_domain = read_impulse_response(r'C:\S5243_FFT_REPO\src\src\Sim\InputSignal.txt')
     input_signal_frequency_response = convert_to_frequency_domain(input_signal_time_domain)
-    fs = 50e6  
-    freq_axis = np.fft.fftfreq(len(input_signal_time_domain), 1/fs) / 1e6
-    
+    fs = 50e6
+    freq_axis = np.fft.fftfreq(len(input_signal_time_domain), 1 / fs) / 1e6
+
     plt.figure(figsize=(10, 6))
     half_R = R // 2
-    Denominator = R if R > 1 else 2  
+    Denominator = R if R > 1 else 2
     half_len = len(freq_axis) // Denominator
-    plt.plot(freq_axis[:half_len], np.abs(input_signal_frequency_response[:half_len]), label='Input Signal Frequency Response')
+    plt.plot(freq_axis[:half_len], np.abs(input_signal_frequency_response[:half_len]),
+             label='Input Signal Frequency Response')
     plt.title('Input Signal Frequency Response')
     plt.xlabel('Frequency (MHz)')
     plt.ylabel('Magnitude')
     plt.grid()
     plt.legend()
-    plt.xlim(0, fs/(2*1e6)) 
+    plt.xlim(0, fs / (2 * 1e6))
     plt.show()
 
-    cic_filter_impulse_response = read_impulse_response('C:\S5243_FFT_REPO\src\src\Sim\ImpResp.txt')
+    cic_filter_impulse_response = read_impulse_response(r'C:\S5243_FFT_REPO\src\src\Sim\ImpResp.txt')
     cic_filter_frequency_response = convert_to_frequency_domain(cic_filter_impulse_response)
     # plot the frequency response of the CIC filter in dB
     plt.figure(figsize=(10, 6))
-    plt.plot(freq_axis[:half_len], 20 * np.log10(np.abs(cic_filter_frequency_response[:half_len])), label='CIC Filter Frequency Response (dB)')
+    plt.plot(freq_axis[:half_len], 20 * np.log10(np.abs(cic_filter_frequency_response[:half_len])),
+             label='CIC Filter Frequency Response (dB)')
     # Show the current R   
     plt.title(f'CIC Filter Frequency Response (R={R})')
     plt.xlabel('Frequency (MHz)')
     plt.ylabel('Magnitude (dB)')
-    plt.ylim(-300, 10) 
+    plt.ylim(-300, 10)
     plt.grid()
     plt.legend()
-    plt.xlim(0, fs/(2*R*1e6))
+    plt.xlim(0, fs / (2 * R * 1e6))
     plt.show()
 
     # fir_filter_impulse_response = read_impulse_response('C:\S5243_FFT_REPO\src\src\Sim\AfterFir.txt')
@@ -108,7 +116,7 @@ def main():
     # plt.xlim(0, fs/(2*R*1e6))
     # plt.show()
 
-    fir_comp_resp = read_impulse_response('C:\S5243_FFT_REPO\src\src\Sim\FirFilt.txt')
+    fir_comp_resp = read_impulse_response(r'C:\S5243_FFT_REPO\src\src\Sim\FirFilt.txt')
     # Plot in time domain
     plt.figure(figsize=(10, 6))
     plt.plot(fir_comp_resp, label='FIR Compensator Impulse Response')
@@ -121,7 +129,7 @@ def main():
     plt.show()
 
     # After FIR time domain
-    after_fir_resp = read_impulse_response('C:\S5243_FFT_REPO\src\src\Sim\AfterFir.txt')
+    after_fir_resp = read_impulse_response(r'C:\S5243_FFT_REPO\src\src\Sim\AfterFir.txt')
     plt.figure(figsize=(10, 6))
     plt.plot(after_fir_resp, label='After FIR Impulse Response')
     plt.title('After FIR Impulse Response')
@@ -134,24 +142,22 @@ def main():
     # Plot the frequency response of the FIR compensator
     fir_compensation_response = convert_to_frequency_domain(after_fir_resp)
     plt.figure(figsize=(10, 6))
-    plt.plot(freq_axis[:half_len], 20 * np.log10(np.abs(fir_compensation_response[:half_len])), label='FIR Compensation Frequency Response (dB)')
+    plt.plot(freq_axis[:half_len], 20 * np.log10(np.abs(fir_compensation_response[:half_len])),
+             label='FIR Compensation Frequency Response (dB)')
     plt.title('FIR Compensation Frequency Response')
     plt.xlabel('Frequency (MHz)')
     plt.ylabel('Magnitude (dB)')
     plt.ylim(-300, 10)
     plt.grid()
     plt.legend()
-    plt.xlim(0, fs/(2*R*1e6))
+    plt.xlim(0, fs / (2 * R * 1e6))
     plt.show()
 
-
     # # FIR compensation filter
     # Order = 64  # FIR filter order
     # fir_compensation_response = fir_compensation_filt(cic_filter_frequency_response, Order)
     # print("FIR compensation filter created successfully.")
 
-    
-    
+
 if __name__ == "__main__":
     main()
-

Những thai đổi đã bị hủy bỏ vì nó quá lớn
+ 512 - 512
src/src/Sim/ImpResp.txt


+ 512 - 0
src/src/Sim/ImpResp2.txt

@@ -0,0 +1,512 @@
+              163820
+              982920
+             2981524
+             6683856
+            12614140
+            21296600
+            33255460
+            49014944
+            69099276
+            94032680
+           124339380
+           160543600
+           202514284
+           248809816
+           297857524
+           348084736
+           397918780
+           445786984
+           490116676
+           529335184
+           561869836
+           586147960
+           600596884
+           603643936
+           594699364
+           575139256
+           546536284
+           510463120
+           468492436
+           422196904
+           373149196
+           322921984
+           273087940
+           225219736
+           180890044
+           141671536
+           108481604
+            80927080
+            58483740
+            40627360
+            26833716
+            16578584
+             9337740
+             4586960
+             1802020
+              458696
+               32764
+                   0
+                   0
+                   0
+                   0
+                   0
+                   0
+                   0
+                   0
+                   0
+                   0
+                   0
+                   0
+                   0
+                   0
+                   0
+                   0
+                   0
+                   0
+                   0
+                   0
+                   0
+                   0
+                   0
+                   0
+                   0
+                   0
+                   0
+                   0
+                   0
+                   0
+                   0
+                   0
+                   0
+                   0
+                   0
+                   0
+                   0
+                   0
+                   0
+                   0
+                   0
+                   0
+                   0
+                   0
+                   0
+                   0
+                   0
+                   0
+                   0
+                   0
+                   0
+                   0
+                   0
+                   0
+                   0
+                   0
+                   0
+                   0
+                   0
+                   0
+                   0
+                   0
+                   0
+                   0
+                   0
+                   0
+                   0
+                   0
+                   0
+                   0
+                   0
+                   0
+                   0
+                   0
+                   0
+                   0
+                   0
+                   0
+                   0
+                   0
+                   0
+                   0
+                   0
+                   0
+                   0
+                   0
+                   0
+                   0
+                   0
+                   0
+                   0
+                   0
+                   0
+                   0
+                   0
+                   0
+                   0
+                   0
+                   0
+                   0
+                   0
+                   0
+                   0
+                   0
+                   0
+                   0
+                   0
+                   0
+                   0
+                   0
+                   0
+                   0
+                   0
+                   0
+                   0
+                   0
+                   0
+                   0
+                   0
+                   0
+                   0
+                   0
+                   0
+                   0
+                   0
+                   0
+                   0
+                   0
+                   0
+                   0
+                   0
+                   0
+                   0
+                   0
+                   0
+                   0
+                   0
+                   0
+                   0
+                   0
+                   0
+                   0
+                   0
+                   0
+                   0
+                   0
+                   0
+                   0
+                   0
+                   0
+                   0
+                   0
+                   0
+                   0
+                   0
+                   0
+                   0
+                   0
+                   0
+                   0
+                   0
+                   0
+                   0
+                   0
+                   0
+                   0
+                   0
+                   0
+                   0
+                   0
+                   0
+                   0
+                   0
+                   0
+                   0
+                   0
+                   0
+                   0
+                   0
+                   0
+                   0
+                   0
+                   0
+                   0
+                   0
+                   0
+                   0
+                   0
+                   0
+                   0
+                   0
+                   0
+                   0
+                   0
+                   0
+                   0
+                   0
+                   0
+                   0
+                   0
+                   0
+                   0
+                   0
+                   0
+                   0
+                   0
+                   0
+                   0
+                   0
+                   0
+                   0
+                   0
+                   0
+                   0
+                   0
+                   0
+                   0
+                   0
+                   0
+                   0
+                   0
+                   0
+                   0
+                   0
+                   0
+                   0
+                   0
+                   0
+                   0
+                   0
+                   0
+                   0
+                   0
+                   0
+                   0
+                   0
+                   0
+                   0
+                   0
+                   0
+                   0
+                   0
+                   0
+                   0
+                   0
+                   0
+                   0
+                   0
+                   0
+                   0
+                   0
+                   0
+                   0
+                   0
+                   0
+                   0
+                   0
+                   0
+                   0
+                   0
+                   0
+                   0
+                   0
+                   0
+                   0
+                   0
+                   0
+                   0
+                   0
+                   0
+                   0
+                   0
+                   0
+                   0
+                   0
+                   0
+                   0
+                   0
+                   0
+                   0
+                   0
+                   0
+                   0
+                   0
+                   0
+                   0
+                   0
+                   0
+                   0
+                   0
+                   0
+                   0
+                   0
+                   0
+                   0
+                   0
+                   0
+                   0
+                   0
+                   0
+                   0
+                   0
+                   0
+                   0
+                   0
+                   0
+                   0
+                   0
+                   0
+                   0
+                   0
+                   0
+                   0
+                   0
+                   0
+                   0
+                   0
+                   0
+                   0
+                   0
+                   0
+                   0
+                   0
+                   0
+                   0
+                   0
+                   0
+                   0
+                   0
+                   0
+                   0
+                   0
+                   0
+                   0
+                   0
+                   0
+                   0
+                   0
+                   0
+                   0
+                   0
+                   0
+                   0
+                   0
+                   0
+                   0
+                   0
+                   0
+                   0
+                   0
+                   0
+                   0
+                   0
+                   0
+                   0
+                   0
+                   0
+                   0
+                   0
+                   0
+                   0
+                   0
+                   0
+                   0
+                   0
+                   0
+                   0
+                   0
+                   0
+                   0
+                   0
+                   0
+                   0
+                   0
+                   0
+                   0
+                   0
+                   0
+                   0
+                   0
+                   0
+                   0
+                   0
+                   0
+                   0
+                   0
+                   0
+                   0
+                   0
+                   0
+                   0
+                   0
+                   0
+                   0
+                   0
+                   0
+                   0
+                   0
+                   0
+                   0
+                   0
+                   0
+                   0
+                   0
+                   0
+                   0
+                   0
+                   0
+                   0
+                   0
+                   0
+                   0
+                   0
+                   0
+                   0
+                   0
+                   0
+                   0
+                   0
+                   0
+                   0
+                   0
+                   0
+                   0
+                   0
+                   0
+                   0
+                   0
+                   0
+                   0
+                   0
+                   0
+                   0
+                   0
+                   0
+                   0
+                   0
+                   0
+                   0
+                   0
+                   0
+                   0
+                   0
+                   0
+                   0
+                   0
+                   0
+                   0
+                   0
+                   0
+                   0
+                   0
+                   0
+                   0
+                   0
+                   0
+                   0
+                   0
+                   0
+                   0
+                   0
+                   0
+                   0
+                   0
+                   0