文章

顯示從 12月, 2020 起發佈的文章

逆向思維 reverse operation

We have input x and output y with the relationship: 假設有一未知函數 F (i.e. 電子線路),輸入X 後會得到 輸出Y:      x --> [ f(x) ] --> y Given y, if we want to find x, we need   f^-1(y)  so that 如果有逆函數 F^-1 ,就可以從目標輸出 Y 找到需要的 輸入 X:      y --> [ f^-1(y) ] --> x Another approach:      for each xi among all possible x's, check          if  f(xi)  equals to y, then answer is xi, and return;          otherwise, next xi. ADC uses the same approach (internally has a DAC) 另一途徑,是輪流測試不同的輸入,直至得到目標輸出。例如有些類比信號的量化(ADC)便是用這方法。          逐一測試  由 0 至 255 (8-bit) 輸入到內置DAC ,得出的類比電壓 與 目標電壓 作比較。當比較差是零或少於所需誤差值,該測試輸入值便是答案。