F0 IIR Simulations » History » Revision 2
Revision 1 (Alexis Jeandet, 05/11/2016 02:12 AM) → Revision 2/3 (Alexis Jeandet, 05/11/2016 02:20 AM)
# F0 IIR Simulations ## Context Simulation made with VHD_Lib design Validation_IIR_f0_LFR r643. To reproduce, run *generate.xsh* script with the number of iterations you want as parameter ```bash ./generate.xsh 10 ``` Then to plot results open *plot_results* notebook. ## Notebook ```python import numpy as np import matplotlib.pyplot as plt import glob import pandas as pds ``` ```python inputsig = pds.read_csv("./2016-11-05_01-35-28/input.txt",sep=" ",header=None) inputsig.columns=[ "CH{}".format(i) for i in range(inputsig.shape[1])] outputsig = pds.read_csv("./2016-11-05_01-35-28/output_fx.txt",sep=" ",header=None) outputsig.columns=["Tstamp"]+[ "CH{}".format(i) for i in range(outputsig.shape[1]-1)] ``` ```python for folder in glob.glob("./2016*"): inputsig = pds.read_csv(folder+"/input.txt",sep=" ",header=None) inputsig.columns=[ "CH{}".format(i) for i in range(inputsig.shape[1])] outputsig = pds.read_csv(folder+"/output_fx.txt",sep=" ",header=None) outputsig.columns=["Tstamp"]+[ "CH{}".format(i) for i in range(outputsig.shape[1]-1)] f, axarr = plt.subplots(1,2,figsize=(14, 6)) (outputsig.filter(regex="CH*")- inputsig*0.8912)[150:].plot(ax=axarr[0]) axarr[0].legend(loc='upper right') (outputsig.filter(regex="CH*")[:100]/0.8912).plot(ax=axarr[1]) axarr[1].legend(loc='upper right') plt.show() ``` ![png](output_2_0.png) ![png](output_2_1.png) ![png](output_2_2.png) ![png](output_2_3.png) ![png](output_2_4.png) ![png](output_2_5.png) ![png](output_2_6.png) ![png](output_2_7.png) ![png](output_2_8.png) ![png](output_2_9.png) ![png](output_2_10.png) ![png](output_2_11.png) ![png](output_2_12.png) ![png](output_2_13.png) ![png](output_2_14.png) ![png](output_2_15.png) ![png](output_2_16.png) ![png](output_2_17.png) ![png](output_2_18.png) ![png](output_2_19.png) ![png](output_2_20.png) ![png](output_2_21.png) ![png](output_2_22.png) ![png](output_2_23.png) ![png](output_2_24.png)