Formal Requirements for Structural Code-Coverage Preservation of Code Optimization: The SCCP/x Framework ⁄

A digital lock-in amplifier has a digital-to-analog converter connected between a central processing unit and a source of a signal to be detected or measured and which modulates the signal, an analog-to-digital converter connected between the source of the signal to be measured and the central processing unit, which includes a low pass filtered amplifier, a voltage controlled oscillator having a voltage offset reference supply and a counter, so that the modulated signal is converted to a series of electronic pulses counted over a set period, and a central processing unit which reads, resets and restarts the counter, analyzes the counts received, outputs digital information relating to the amplitude and phase of the signal to be measured or detected, reads a function table and outputs a signal to the digital-to-analog converter. A method detects and measure timed periodic signals using the above digital lock-in amplifier.