Sine signal with alternatin​g frequencie​s.

Hello,
I am interested in generating a sine signal whose frequency and amplitude change after every cycle. For example: lets assume we have two amplitudes a1, a2 and frequencies f1 and f2.
I want a sine signal with a1, f1 and a2, f2 alternatingly. One sine pulse a1,f1 and other sine pulse a2,f2 and this pattern repeats.

Preetham1 wrote:
Hello srikrishnaNF,
Thanks for the solution. But the issue is I just want to append one cycle of a1,f1 and one cycle of a2, f2. f1 and f2 could be DBL. Let me know if you have a solution. I shall appreciate it.
I would make an array for your amplitudes and frequencies.  Use a FOR loop to create the waveforms and concatinate.
There are only two ways to tell somebody thanks: Kudos and Marked Solutions
Unofficial Forum Rules and Guidelines
Attachments:
Build Waveforms.png ‏23 KB

Similar Messages

  • The measurement of the phase between two sine signals with NI 6251

    Hi, I am working with NI 6251. I need to measure the phase between two sine signals. I used "Tone Measurements" on each signal and then substracted there phases, but the result was  incorrected. Please, help me to solve this problem.

    You should have a look at the Signal Processing VIs
    Ton
    Free Code Capture Tool! Version 2.1.3 with comments, web-upload, back-save and snippets!
    Nederlandse LabVIEW user groep www.lvug.nl
    My LabVIEW Ideas
    LabVIEW, programming like it should be!

  • FRF Problem about amplitudes of two sine signals

    Hi everyone,
    I'm carrying out a FRF operation between two acquised signals, so I decided to simulate it simply first.I created two dummy sine signals with 50 Hz frequency value and "1" amplitude level for both.And I divide the second signal with a integer and took the FRF function between them, as below.
    as expected for all frequencies, the result is 0,5 which comes from the ratio of sig2 to sig1.
    But, when I changed the integer value to a float, 1,3 for example, it results nonsense;
    Why these two processes do not match?
    Thanks,
    Ozgur

    Deborah, it happens every time as Jeff indicated. Thanks anyway.
    Jeff, am I understanding right, you're saying that the graph shows the sum of the errors that caused by the uncertainity? And there is another thing, when the data is not simulated but acquised, there will be not a precise amplitude and frequency valuei will it the FRF block go crazy then ?
    I've tried that process with several post-processing softwares; MATLAB, dbFA Suite (A vibratory daq system interface). All results different
    Do you have any suggestions to solve that? Or can it be corrected?
    Regards,
    Ozgur

  • Creating two sin signals using function generator.vi example

    hi all. i want to create two sin signals with different parameters using function generator.vi example. i tried to modify the example by copying the code and try to output two sin signals on different channels of the DAQ but error message saying that you are validating of the AO write buffer . attached is the file. how can i modify it to solve the problem?!
    Attachments:
    function_generator2.vi ‏123 KB

    Nidal,
    Below is an example that illustrates how to generate different sine waves on two separate analog output channels.
    Example

  • Better estimation of phase difference between two signals with variable frequency!

    Hello LabView Gurus, 
    Being a power engineer and having just a little knowledge of signal processing and labview, I have been pulling my hair out for the last couple of days to get a better estimation of phase difference between two signals.
    We have two analog voltage signals; 1. sine wave (50Hz ± 1Hz) and 2. a square wave with exactly half of sine wave frequency at any time.
    At the starting point of operation (and simulation/acquisition) both signals will have no phase difference. However, the square wave's frequency changes unpredictably for a just a few millisecond but then it gets synchronized with sine wave's frequency again. This means that the square wave will be phased out from its original position. The task of the labview is to find the phase difference between the two signals continuously.
    My approach to determine the phase difference is to measure the time when sine wave crosses zero amplitude and the time when the very next square wave changes amplitude from zero volts to +ve voltage (I have a 0.5volts threshold just to avoid any dramas from small line noise). The difference between these times is then divided by the time period and multiplied by 360 to get this phase difference in angles. 
    As this part is just a small block of a big project, I can only allow 5000Hz sampling rate each for both signals. I read 500 samples (which means I read data from 5 cycles of sine wave and 2.5 cycles of square wave).
    Now the problem is, as long as the frequency of sine wave stays constant at exactly 50Hz, I get a good estimation of the phase difference but when the frequency changes even a little (and it will happen in the real scenario i.e 50Hz ± 1Hz  and the square wave's frequency is dependent of sine wave's frequency), the estimation error increases.
    I have attached my labview program. From front panel, you can set the phase of square wave (between -180 and 0) and you should see the labview's calculated phase in the indicator box named 'Phase'. Then you can press 'Real Frequency' switch that would cause the frequency to change like it would in real operation.
    You can observe that the estimation error increases after you push the button. 
    All I need to do is to reduce this estimation error and make it as close to the actual phase difference as possible. Any help would be greatly appreciated.
    I am using LabView 2009 for this task.
    The application is for electric machines and the stability/performance of machines under different faults.
    Thank you for reading this far!
    Regards,
    Awais
    Attachments:
    v603.png ‏320 KB
    v603.vi ‏186 KB

    Jeff Bohrer wrote:
    Basic math gives me a bit of pause on this approach.  You are sampling at 50 times the frequency of interest so you get 50 samples per cycle.  your phase resolution is 1/50th cycle or 7.2 degrees +/- noise.  You will need to samlpe faster to reduce phase resolution or average multiple readings (at a time cost that is signifigant)
    Jeff- (Hardly Working)
    I am sampling at 100 times the sine wave's frequency and 200 times the square wave's frequency.  Increasing the sampling rate completely solves my problem. But since I am acquiring several other inputs, I cannot afford a sampling rate higher than 5kHz.
    F. Schubert wrote:
    I'm not a signal processing expert, but here my basic understanding.
    If you simulate sampling with 5kHz and a frequency of 50 Hz (and both are 'sync' by design), you always get an exact 5 periods. Any variation of your signals frequency gives you a propability to get 4 or 6 'trigger' events. That's an up or down of 20%!
    The one measure to reduce such problems is using 'window functions'. They don't fit your current approach (counting instead of a DSP algorithm), so this needs to be reworked as well.
    My approach would be to use the concept of a Locki-In amplifier. You need to phaseshift your ref-signal by 90°. Then multiply your measurement signal with the ref signal and the phase shifted ref signal. The obtained values for x/y coordinates of a complex number. Calculate the theta of the complex number (with the LV prim). Feed this in a low pass filter.
    The trick on this is, that the square wave has harmonics in it, in this you are interested in the second harmonic which is the sine wave.
    To get rid of the effect that the sync between sampling rate and ref signal frequency gives an error, you then can use the window I mentioned above (place it before the lock-in).
    For a design that really plays well, use a producer-consumer design pattern to get the calculations done in parallel with the DAQ.
    I suggest you to check on wikipedia for some of the keywords I mentioned. Go also for the external links which lead to great tutorials and AppNotes on the signal processing basics.
    Sorry, it's not a simple solution I offer and we will have quite some conversation on this forum if you follow this path. Maybe someone else knows a simpler way.
    Felix
    www.aescusoft.de
    My latest community nugget on producer/consumer design
    My current blog: A journey through uml
    An interesting view. the sine wave can indeed be looked as a second harmonic of the square wave. I will implement your idea and get back to you as soon as I get some results. But since I have very limited knowledge of signal processing, it might take me a while to get my hear around the solution you mentioned.

  • Generating signal with several frequencies - Timing issues

    Hi
    I use Labview 7.1.
    I am trying to generate a signal composed of 1000 different frequencies.
    For this purpose I am using the Multitone Generator VI .
    My problem is that the generating process is too long for my real-time
    application.
    Is there any way to accelerate (optimize) this process?
    I think about several options, such as:
    Using more powerful computer (multicore)
    Making the process parallel (is it relevant
    for Labview7.1?)
    Changing VI's properties (priority etc..)
    Please advice
    Amir

    Hi,
    Attached my problem.
    I am trying to generate signal with 100 frequency component (100 different sine waves).
    According to the timers it is taking 87mSec to produce the signal which length is 1 second.
    In my project, I need to generate 1000 frequency components. And also 20 channel of this kind.
    So it is clear that i will not be able to achieve the timing requirements
    (It will take more than 1 second to generate a signal of 1 second)
    What can you advise me ?
    Thanks
    Amir
    Attachments:
    Generate_100_freq_signal.jpg ‏156 KB

  • How to convert a baseband signal with bandwidth 20MHz to an RF signal with center frequency 2.4GHz and the same bandwidth 20MHz

    Hi,
            I was wondering how to convert a complex baseband signal with bandwidth 20MHz to an RF signal with center frequency 2.4GHz and the same bandwidth 20MHz in simulation. I tried 
        1. Multiplying the complex double type baseband signal (1-D array) by exp( j * 2 * pi * 2.4E+9 * T ) where T is the symbol period of baseband signal.
        2. Usage of MT upconvert baseband but doesnt keep the BW constant
    Looking forward to your help. 

    I should add that you can multiply your baseband signal with two carrier signals that are shifted by 90° and then add or subtract the result to obtain upper or lower sideband only. You can try to search about IQ moduilators/demodulators to learn more.
    Cheers
    Edgar

  • What is the effect of output signal with the same sampling frequency but different number of samples?

    Hi,
    I'm using PXI4461 for audio measurement and there is a question about analog output. I'm using the Basic Multitone vi for generating multitone signal. The sampling rate is 200k and my question is how to determine the number of samples. I used an audio analyzer to measure the distortion of the output signal with 200k and 1k points and there are no different except the update rate. What number of samples is suitable for 200k sampling rate?
    Thanks,
    Bill

    The Sampling Rate determines the maximum frequency that you can see (the rate/2 according to Nyquist).
    The number of samples divided by the rate determines how long you will sample. This sample time can only be determined by you. Do you need .1 seconds worth of data, or 1 second? But note that the MINIMUM frequency that you can detect is 1/(Sample Time) or the Sampling Rate/Number of Samples. So if your system has a minimum and maximum frequency specification use that as your guild.
    [email protected]

  • Is it possible to detect low frequency signals with a high sampling rate?

    Hello everyone,
    I'm having an issue detecting low frequency signals with a high sampling rate.  Shouldn't I be able to detect the frequencies as long as the sampling rate is at least 2 times the highest frequency I will measure?  The frequency range I am measuring is 5-25 Hz, and I use Extract Single Tone.vi to measure the frequency.  The sampling setting I am using is 2 samples at 10 kHz.  Is there a method I can use to make this work?
    Attached is the vi.
    Attachments:
    frequencytest.vi ‏21 KB

    You are sampling at 10Ks/S, but only taking two samples. What do you expect to see? If your signals are binary (On or Off) you would only see either an on or an off, or if the rise/fall time was fast and you were Extremely lucky, one of each. If you want to see a waveform you have to sample for at least the period of a waveform. So you should take samples for at least 0.2 seconds to capture an entire waveform at 5Hz, ideally longer.   Think of looking at a tide change at a dock. If you want to see the entire tide change you will probably have to measure repeatedly over 24 hours, not just run out on the dock, measure the height twice and leave. That wouldn't tell you anything other than at that precise moment the tide height was X, but not that it was at high tide, low tide, in between, etc.
    I type too slowly, I see that a more technical answer has been given, so mine will be the philosophical one!
    Putnam
    Certified LabVIEW Developer
    Senior Test Engineer
    Currently using LV 6.1-LabVIEW 2012, RT8.5
    LabVIEW Champion

  • Estimate AC/DC of a sine signal

    Hi,
    i capture an analog signal (a sine) with labview and i want to extract several informations from the signal like : Amplitude, offset, peak value, frequency, etc.
    I almost get what i want, but i can't get the correct value of AC / DC components of my signal.
    For example, i receive a signal like this one :
    y = 1.25 + 1.25 * sin (2*Pi*3000*t).   
    I except the following value :
    f = 3000 Hz  (I got it)
    Peak = 2.5 (I got it)
    Ampl = 2.5 (I got It)
    DC = 1.25 (I got it)
    AC = 1.25    and there is the problem. I don't have this value.
    Maybe i forgot a vi in my design, or maybe labview can't process this value or maybe i'm do it wrong because i don't exactly talk about AC value.

    mhed wrote:
    Hi,
    i capture an analog signal (a sine) with labview and i want to extract several informations from the signal like : Amplitude, offset, peak value, frequency, etc.
    I almost get what i want, but i can't get the correct value of AC / DC components of my signal.
    For example, i receive a signal like this one :
    y = 1.25 + 1.25 * sin (2*Pi*3000*t).   
    I except the following value :
    f = 3000 Hz  (I got it)
    Peak = 2.5 (I got it)
    Ampl = 2.5 (I got It)
    DC = 1.25 (I got it)
    AC = 1.25    and there is the problem. I don't have this value.
    Maybe i forgot a vi in my design, or maybe labview can't process this value or maybe i'm do it wrong because i don't exactly talk about AC value.
    Look at the terms you reported and compare to your equation. There is a "DC=1.25" and an "Ampl=2.5" in your list. Your equation describes a sine wave with an amplitude of 2.5 units (peak-to-peak) centered at 1.25 units. I believe you are trying to solve for an extra term!
    Jeff
    Jeffrey Zola

  • How come two signals of the same frequency show on the graph as having the same?

    Hi!
    My assignment for school is to build a 2 channel oscilloscope, with generators too. Initially, I tried using a waveform chart, that actually showed a very "ugly" image. Just for testing, I left the chart there with hidden indicator.
    The student teacher suggested I use a graph, which is ok, as far as the shape of the signal. The "time" axis however doesn't really show the time.
    Thinking that it might show the samples, I put at the "nr.of samples" the reciprocal of the sampling rate multiplied with 1000,000 and the result was the same. The really strange part is that if I'd put two different frequencies for each channel it showed as is the signals had the same frequency.
    And that's not the only problem... The while loop everything is in doesn't look like it's executing more than once. Now, I know the vi is pretty large but is that what makes it behave like that?
    I also put cursors (like in the example from Fundamentals> Graphs and Charts > Programatically Control Cursors) that should be in the middle of the graph. Since I didn't use a chart, are the values at "Style" or "Pointer Style" different? (I wanted the cursors to be multi-plot).
    Can you help me with any of that?
    Thank you very much!
    Patricia

    Hi Patricia !
    First of all, I would suggest you to synchronize all actions according to data flow concept : try to link all property nodes with error wires... That way, you MAY notice some warnings/errors. Then you should try to group functionalities into clusters, that way your code would be easier to debug...
    Then your While Loop runs as fast as possible (which makes your processor to run at 100% all time long), you should consider using a timing function to slow down the loop.
    Then using "Graphs", the X-axis will display the number of samples in the array to plot. If you know the sampling frequency of your signal and the number of samples in the array, you can try use "Xaxis.Multiplier" property node to convert the number of samples into time.
    Then for your cursors, you should consider using "Cursos List" property node... It's not really cool to program it (lot of options) but it works very well and allows you to deeply customize your cursors.
    I hope this helps... Otherwise, don't hesitate to post another message !
    Zyl

  • How to send a ttl signal with a good exactitude less than 10ms?

    i have a pci 6013 (8 input channel) and pci 6711 (4 outpout channel).Then i need to send a ttl signal to a camera ccd to take a photo when a waveform sinus is equal at zero (rising), but when i send this TTl signal with dasylab using generator pulse or combi trigger and readind this signal, i have difference between dasylab pulse(that is exactly) and measurement pulse that is approximate 40ms after.But i need to have less than 10ms is it possible?
    Frequence rate =1000hz and block size=512 the waveform sinus is 0.2Hz.i have already try to increase the sampling rate but nothing happens.Thank for your help.

    Yes, it's possible.
    You just have to reduce your block size to 10 !
    For more informations, visit Forum Dasylab en français at http://forum.aceboard.net/?login=128657
    Frédéric Miqueau
    MD Electronic, France
    http://www.mdelectronic.fr
    French Dasylab Forum : http://www.dasylab-forum.de/forum/index.php?showforum=43

  • How can i do a sine wave with High Throughput Sine for fpga?

    I try to do a sine wave looking the examples but i can't. I have a sbRio 9606. 
    I need to do a sine wave with high throughput block. In my exercise i have 2 inputs (amplitude and frecuency) and i have to look the output (sinewave)
    I need help!!

    Hi pablosan,
    If I understood correctly, you want to generate a sine wave with a high throughput block in Labview FPGA.
    I'm afraid you won't e able to do this, as these blocks are specifically designed for other FPGA targets with better features for high performance. So instead of using the example named "Sine and Cosine.lvproj" under High Throughput examples, you can use the "Sine Wave.lvproj" under Signal Generation and Processing examples, which is more adequate to your Single-Board RIO.
    Regards.

  • Simulate GHz signal with big number of samples

    I would like to simulate 650nm wavelength signal with 3.5ms of pulse duration. So I need very high sampling frequency and big samples in LabVIEW, if I go generate about 1M #s, its very long to generate. Is there any solution for that?
    When you feel sad, laugh

    Just taking a very quick look at your code, my guess for the increasing CPU over time is how the waveform data is being built. Anytime LabVIEW builds an array by appending, rather than having a predefined array that has the elements modified, the program must keep reallocating memory to store the increasingly bigger array. This takes time and CPU, more and more as the data set gets bigger. I'll try and look at it a little more later and see if an easy solution becomes apparent. I don't use the waveform data type often so it isn't quite as obvious to me.
    P.M.
    Putnam
    Certified LabVIEW Developer
    Senior Test Engineer
    Currently using LV 6.1-LabVIEW 2012, RT8.5
    LabVIEW Champion

  • Count edges of AI signal with NI 9221

    Hi,
    I'm trying to count edges of an AI signal that are acquired with an NI-9221 on a cDAQ. The average frequency is about 1kHz.
    I'm acquiring the signal with 10kHz but don't get the right amount of edges. 
    Is
    there any solution for this problem. I know, of course it would be
    easier to use a CTR-modul but my signals doesn't fit with the specs.
    Thanks for any help
    Yves

    Yes, I know. I wanted it to be posted in the Labview forum and hadn't realized my mistake.
    But I still don't have any solution....
    Yves

Maybe you are looking for

  • Unable to generate spool for two tables in report output

    Hi, I created report with two custom containers displaying two tables in output. When I execute the report in background spool is created only for one table in top custom container. What should be done to generate spool for both the tables in two dif

  • Missing option in elements 12 ?

    Hello, I am following a photography class that requires photoshop elements 12. I purchased it recently and in class yesterday it seemed there is an option missing...? In expert it's supposed to be possible to go to: - enhance - adjust colours - colou

  • How do I get my Imac to see my MX452

    I have downloaded the drivers from the website, the cd, and Apple, but when I go to print, it tells me to download the drivers every time. The wifi portion of the printer works great however, I can print from my Ipad, just not my imac! Please help. I

  • File name duplicated

    I cannot buy anything with Itunes. Whenever I try to download anything from my PC (No Wifi available) I receive the message Duplicated file name. I've restored the Ipad mini to default factory settings twice, and the problem persists. Any idea what i

  • BUG? Interactive report select other tab results in Page not found

    Hello all, Recently I have updated our Apex install to version 4.0.1 on Oracle 11.2. There I found the following problem, for which I don't know if it is a bug or not: Steps to reproduce: 1. Select a sample application and open a page that contains a