02-29-2020 01:04 PM
Hello all,
I'm doing a project on LabVIEW, but I'm still novice in this software.
I want to simulate the breathing sound as one sine wave with two different amplitudes, I searched everywhere but couldn't produce such a signal.
your help is most appreciated.
Solved! Go to Solution.
02-29-2020 03:27 PM
What do you mean by "two different amplitudes".
Can you post a picture of what that waveform would look like?
02-29-2020 03:40 PM
more specifically, it's a rectified sin wave with 1Hz frequency
the two alternating amplitudes would represent the inhale and exhale events
it would look like the envelope of the following sound signal
02-29-2020 03:46 PM
Nothing about that picture looks as simple as a sine wave, or a sine wave with two different amplitudes.
But let's assume that you are creating a simplified version of that picture.
Create one sine wave of one amplitude for whatever length of time you want it to be. It looks like 1.6 seconds, so depending on the frequency of that sine wave, pick a time that lets you have complete periods.
Do the same for another sine wave with a different amplitude for what again looks like 1.6 seconds.
Append the waveforms one right after the other.
02-29-2020 11:55 PM
If you're trying to produce the fast oscillating black line (not the labelled line) then I'd suggest starting with a high frequency sine wave with the same total duration you're wanting to produce.
Then, produce two half sine waves of different amplitudes and a long wavelength, such that they together have the same duration as your target time. Append the second, lower amplitude half wave to the first using Build Array.
Finally, multiply the two arrays (which should have the same length).
03-01-2020 06:37 AM
Not sure exactly what you're after, but I'll take a wild guess.
03-01-2020 06:49 AM
I tried an algorithm that will toggle a Boolean to change the values, it worked fine for me.
but the amplitudes are showing in two separate signals.
to explain more, I attached the vi that I created, the only thing that I still need is to do is to make the white curve appear once, then the red curve, and the would alternate during the loop.
03-01-2020 08:02 AM - edited 03-01-2020 08:04 AM
03-01-2020 08:30 AM
I changed my code to correspond to yours, and this is what i got.
what other changes have you made?
03-01-2020 08:37 AM