07-12-2022 10:51 AM
Hey there,
I am trying to simulate a sine wave signal and for this I used the Express VI Simulate Signal block (probably not the best choice but I'm still figuring out how to achieve the same without using this Express VI). Everything was fine until I changed the frequency of the simulate signal block to 13Hz or above and it started showing me a sine wave that has some peaks that are flat. Does anyone know why this is happening? Kindly find attached a screenshot of the graph. The simulated sine wave is in green.
On a side note, does anyone know how to generate a sine wave in a similar way without using the Express VI Simulate Signal block?
Thanks. Would gladly attach my .vi if it's needed.
Regards,
Stella
07-12-2022 11:18 AM
Hey,
first I think you can just use the Sine Vi within a loop instead the Express VI.
For your actual problem. I don't have a glue but what does your data look like. Do you have the right maxima within your dataset?
07-13-2022 08:00 AM
Hey,
thanks for the response.
For your actual problem. I don't have a glue but what does your data look like. Do you have the right maxima within your dataset?
Im not quite sure what you meant by the right maxima within my dataset. For my generated sine wave, it is independent from my dataset..
Im attaching a simple version of my vi which is also giving the same problem where if frequency of sine wave generated is 13Hz or greater, it started to be uneven. It would you could tell me where I could find the maxima of my dataset.
Regards,
Stella
07-13-2022 08:51 AM
@stellasoon wrote:
Hey,
thanks for the response.
For your actual problem. I don't have a glue but what does your data look like. Do you have the right maxima within your dataset?
Im not quite sure what you meant by the right maxima within my dataset. For my generated sine wave, it is independent from my dataset..
Im attaching a simple version of my vi which is also giving the same problem where if frequency of sine wave generated is 13Hz or greater, it started to be uneven. It would you could tell me where I could find the maxima of my dataset.
Regards,
Stella
What you are running into here is a combination of a few things. First and foremost you are simply not generating enough samples per cycle to get good fidelity. Imagine if you sampled a 1 hz signal once per second! You would always see the same value and the graph would look like A FLAT LINE! If you sampled at 0.5 hertz you will have a triangle wave between 2 values. Next the plot style is default ( straight lines pt to pt) if the were shown with a sin(x)/dx interpolation you would recover some fidelity in the graph (but not in the data)