Closed avsteele closed 2 years ago
Yes, that's the expected behaviour.
The problem is that it's not documented properly. My error.
The idea is this:
out1
and out2
.out1
a cos_ref
signal is addedout2
, a sin_ref
signal is addedHere's the code: https://github.com/marceluda/rp_lock-in_pid_h/blob/master/lock_in%2Bpid_harmonic/fpga/rtl/lock.v#L421
Sorry for the poor description.
Thank you Marcelo. Ok I understand partially.
Normally, I set Out 1
to cos_1f
, or sin_1f
. Then the demodulation works well and the phase setting's effect on the demodulated output works as expected. (I see from the code that _1f
signals get phases added).
The cos_ref
and sin_ref
do not have a phase added to them, so the demodulation cannot be optimized.
Also, (for reasons I cannot quite understand), using cos_ref
, sin_ref
(or any other output with these added) do not demodulate correctly at 46 kHz, but seem to work OK at every other lower frequency.
Is there something I'm missing?
That's right.
What I use to do is add cos_ref
on out1
(with the control_A
signal assigned) and then use F1
signa for demodulation. So I can tune it for maximum amplitude before the PID input.
Ah I see now. I didn't realize the which was meant by signal F1o
. But now I see it here:
https://marceluda.github.io/rp_lock-in_pid/TheApp/instruments/instruments_02_scope/
Thanks!
The modulation amplitude does not behave like I would expect. I expected that if I had for example Output 1 set to cos_ref or cos_1f, then a modulation amplitude integer value of -1...8100 would let me select the amplitude of the output wave over its full range. But instead I see the results below:
If I set Output 1 to cos_1f then for Mod Amplitude A Out 1 =-1...8100 Output 1 sine wave amplitude goes from ~0.5 V ... 0.75V
If I set Output 1 to cos_ref then for Mod Amp A Out 1 =-1...8100 the sine wave amplitude goes from 0.5...1.0 V
The only configuration which works like I expect is I use the Modulation Amplitude Out 2, where output 2 is set to Ctrl_A . Then a the modulation amplitude integer -1...8100 causes a sine wave of amplitude ~0V to ~0.5 V to get added to the ramp.
Is this the expected behavior?
Thanks a lot!