Signal Generators

cancel
Showing results for 
Search instead for 
Did you mean: 

Simulation of Sine Signals

Solved!
Go to solution

Hello,

 

I am trying to simulate sinusoidal signals as speed signals. With Min and Max amplitudes as 5  and 12 V. The range is 10Hz to 800Hz. The output impedance is to be 100ohm and should have soft switchable sweep 800 Hz rising @ 7% per second.

 

I have configured used sliders for the amplitudes of 5-12V and also for the frequency range. The waveform freezes when the frequency gets closer to 800Hz. I have configured the sampling rate to be 8000Hz which is 10 times of 800Hz still no suitable waveform.

 

I also have difficulty in configuring the soft switchable sweep and the impedance.

 

Please help.

 

 

Thanks.

0 Kudos
Message 1 of 5
(7,008 Views)
Hello maxidivine,

It would be helpful with your description if you could post your current code, I have created an example of something like what you described, but this could be (and probably is) nothing like what you are looking for. If you could also let me know what hardware you are using it would also be very helpful in diagnosing the problem and suggesting a possible solution.

Regards,
Dan King

0 Kudos
Message 2 of 5
(7,004 Views)

Thanks a lot Dan_K,

 

 

I am actually doing a signal generator and simulating the signals at the moment. I intend to use the two signals to test a device in the near future. The first signal has the specifications:

 

min amplitude: 5V

max amplitude: 12v

shape: sinusoidal

OP impedance: ~100 ohm

switchable: 8Hz or 800Hz

 

I have used simulate signal, sliders and a switch to effect this as seen in my VI attached. I have trouble taking care of the impedance part.

 

For the second signal, I would use the exact specifications as above but with the added requirements that:

 

soft switchable sweep   800Hz rising @ 7% per second

                                    800Hz rising @ 9% per second

                                    800Hz rising @ 11% per second

 

I am thinking of doing ramps but am stuck here.

 

Please help out again.

 

Thanks a million.

0 Kudos
Message 3 of 5
(7,001 Views)
Hello maxidivine,

I ran your code and am not seeing any problems that make it completely unusable. I would suggest, that even though a 1.6 kHz sampling rate is sufficient for all frequency information of a 800 Hz signal, increasing your sampling rate to 8 kHz would result in a better shape to the higher frequency sine wave.

As far as simulating the output impedance, I'm not clear on what you mean by this. Are you talking about simulating sending this signal into a device with a specific input impedance, therefore affecting your amplitude through voltage division?

However, when actually creating your signal you should probably use a different method for creating your sine wave. What I would do is create two waveforms (using the Sine Waveform VI) with the same sampling rate and number of samples and use of the waveforms (it wouldn't matter which one) to determine the sampling rate. You can then use a latching Boolean to switch between the two waveforms within the loop, writing the off waveform to the buffer using the DAQmx Write VI to change the current waveform in the buffer.

As far as the second part goes, are you talking about a frequency sweep that changes from some frequency to 800 Hz over a given period of time? If so, you may want to take a look at the Formula Waveform VI, which allows you to specify a formula that will take the time information and create a waveform from a given formula. By determining you time range and developing a formula for the frequency ramp, you should be able to create this waveform without too much difficulty.

Regards,
Dan King

0 Kudos
Message 4 of 5
(6,996 Views)
Solution
Accepted by topic author maxidivine

Thanks a lot Dan_K,

 

 

 

I love your method of generating sine signal. I would look at the impedance and the frequency sweep again. You have been very helpful and informative.

 

 

0 Kudos
Message 5 of 5
(6,993 Views)