05-18-2017 03:22 AM
Hello!
I'm working on a program right now where I want to stack my response signal, so that after e.g. 4-8 acquisitions i have a mean value of the response.
The problem is that although my output is the same each iteration, the response has a phase shift each time. So that when i add them together and divide by the number of iterations the plot looks like crap. I wonder if there is any easy way to detect the phase shift and compensate for it? Attaching some screenshots of the code handling this and pictures of the result.
Best regards,
Oscar
05-18-2017 10:12 AM
Hello,
In your screen shot, I could only see partly your code.
Could you please attach your code, and describe a little bit more what you want the code to do?
PS: Could it be possible that this phase shift, that happens every time is because you didn’t initialize your shift Register?
Greetings and Regards,
James.
05-18-2017 10:50 AM
The better approach will be to focus on either preventing or controlling the phase shift. Many data acq boards have hardware timing and triggering capabilities that'll be much more reliable than your software-timed loop taking 1 sample at a time.
I only have time to give you this little nudge, but if you can post code and identify the data acq board you have, you'll have a better shot at getting more detailed help.
-Kevin P