Nurseda Posted June 21, 2018 Share Posted June 21, 2018 Hi, in order to realise a lock-in amplifier I need to capture the Output of my amplifier stage, the generated Input sine wave and a 90 degree phase shifted version of it. Is it possible to realise the phase shift of the input signal in the Scope window? Thanks in advance :) Link to comment Share on other sites More sharing options...
attila Posted July 18, 2018 Share Posted July 18, 2018 Hi @Nurseda The save/load of custom math filter is fixed in WF v3.8.7:https://forum.digilentinc.com/topic/8908-waveforms-beta-download/ Link to comment Share on other sites More sharing options...
attila Posted June 21, 2018 Share Posted June 21, 2018 Hi @Nurseda You could use the Math/Filter/Custom to shift. In this example: Channel 1 = output AWG 1 Channel 2 = input DUT Math 1= custom filter with one 1 and 49 zeros shifts with 25 samples, 1MHz signal sampled at100MHz will be shifted with 90* Math 2 = C1 x C2 Math 3 = M1 x C2 Link to comment Share on other sites More sharing options...
Nurseda Posted June 21, 2018 Author Share Posted June 21, 2018 Hi @attila , thank you so much. But I didn't understand why this "Math 1= custom filter with one 1 and 49 zeros shifts with 25 samples, 1MHz signal sampled at100MHz will be shifted with 90*" causes a 90 degree shift. Would be pleased if you can explain. Thanks in advance Link to comment Share on other sites More sharing options...
attila Posted June 21, 2018 Share Posted June 21, 2018 Hi @Nurseda The Math/Filter/Custom is intended for "sliding window", like to apply a gaussian window on 50 samples, from N-25,N-24....N+24 If you enter for 1 for N-25 and 0 for the other 49 up to N+24, the result will be shifted by 25 samples, which is 90* for 100 sample signal period, like 1MHz signal sampled at 100MHz I think at the moment there is no other way to shift the data... Link to comment Share on other sites More sharing options...
Nurseda Posted July 18, 2018 Author Share Posted July 18, 2018 Hi @attila now I understand, thank you very much! Currently I have problems with saving the window coefficients. When I reopen my saved workspace I have to set them every time by hand, so I'd like to set them in my script. But I don't know how to do that. Currently I can just set the Filter type= Custom (2). Would pe pleased If you can help me, thanks in advance! Link to comment Share on other sites More sharing options...
Nurseda Posted July 19, 2018 Author Share Posted July 19, 2018 Hi @attila Thank you so much!!! Best regards, Nurseda Link to comment Share on other sites More sharing options...
Nurseda Posted October 15, 2018 Author Share Posted October 15, 2018 Hi @attila is it possible to set the number and value of the Custom Filter window coefficients in a script and not manually in the Scope GUI? Thanks in advance. Best regards, Nurseda Link to comment Share on other sites More sharing options...
attila Posted October 15, 2018 Share Posted October 15, 2018 Hi @Nurseda The filter can be set programmatically using the Scope#.Math#.customFilter property. This Logging/Script adjusts the filter based on frequency: var hzSig = Scope.Channel1.measure("Frequency") var hzRate = Scope.Time.Rate.value var cFilter = round(hzRate/hzSig/2) if(cFilter>200) cFilter = 0 var rg = [1] for(var i = 0; i < cFilter; i++) rg.push(0) Scope.Math1.customFilter = rg In Script tool use Scope1 to identify the scope window. Link to comment Share on other sites More sharing options...
Question
Nurseda
Hi,
in order to realise a lock-in amplifier I need to capture the Output of my amplifier stage, the generated Input sine wave and a 90 degree phase shifted version of it. Is it possible to realise the phase shift of the input signal in the Scope window?
Thanks in advance :)
Link to comment
Share on other sites
8 answers to this question
Recommended Posts
Archived
This topic is now archived and is closed to further replies.