01-14-2021 03:23 AM
hello mcduff,
thank you for your quick reply. We now try the solution with the reference signal cos (2pift). We are not sure how to multiply (2pift) by an integer. If we create a cos signal and multiply the whole signal, we get 3*cos(2pift). What blocks do I need to use in Labview to multiply only the part (2pift).
thanks in advance
01-14-2021 08:39 AM
If you are making your own reference, just make new cosine data with a different frequency. Because it is synthetic you don't need to do any multiplications, etc. I suggested the multiplications in case you wanted an EXTERNAL reference, such as from a function generator. To use that reference for higher harmonics then you need the multiplication trick.
mcduff
01-18-2021 09:23 AM
hi mcduff,
we are currently trying to implement your solution with an internal reference. Now we have the problem that we do not get a quiet signal. In our solution for the second harmonic we don't have this problem. Do you have any idea what could be the reason ?
Thanks for everything
01-18-2021 03:17 PM
I think I am correct that even @mcduff is not a mind-reader, able to "see the code you failed to attach" to understand what you are doing, and thereby explain how to fix it.
If you are having a problem with your LabVIEW code and need a suggestion about how to fix it, you should attach your code (not a "picture" of the code) so we can examine it, edit it, and execute it (to see what it really does). If you are using the LabVIEW Project environment, compress the folder that contains your Project (and the .lvproj file) and attach the resulting .zip file. This will really help us to help you!
Bob Schor
01-18-2021 07:35 PM
@maxmustermann132 wrote:
hi mcduff,
we are currently trying to implement your solution with an internal reference. Now we have the problem that we do not get a quiet signal. In our solution for the second harmonic we don't have this problem. Do you have any idea what could be the reason ?
Thanks for everything
As @Bob_Schor said it's hard to help without seeing the problem.
I think you step back for a minute and write down the problem you are trying to solve. Think about what you need, what you can measure, and what is missing.
For example, if you choose a COSINE function as your reference, there is no need to get the phase of the reference, it is always 0. You are getting the phase from a FFT function; how does that work? Do you get the same answer if you fit the time series data? I have always fit time series data for phase, so I don't have good experience using the FFT. Does it (FFT) depend on the number of points, window function, etc?
If it was me, I would probably fit the time series to the following function
A Cos [ θ ] Cos [ 2 f π t ] - A Sin [ θ ] Sin [ 2 f π t ]
which is equivalent to
A Cos [ 2 f π t + θ ]
Then I would have my phase for whatever frequency I want, 1st, 2nd, etc, harmonic, all I need to do is change f.
mcduff
02-11-2021 05:36 AM
hello mcduff,
sorry for the late message. we got everything done now. thanks again for your detailed help.