Impedance determination of blackbox circuit
For getting to know an unknown black box, usually a theoretical model called linear system theory (LST) is used. 

LST states that if connect a sinusoidal input voltage with a fixed frequency to a black box, you will get a sinusoidal input current with the same frequency, but with a certain amplitude and a certain phase. This also means that with a black box of type LST system, you will not get another frequency out than the stimulating input. (This can be used to test if the sytem is an LST one). 

From this measurements (amplitude and phase of current) you can then extract the electrical parameters, namely resistance R, inductance L and capacitance C within that black box. 

Unfortunately, a diode is a nonlinear device and thus can not be modeled with LST.