How to convert sine wave signal to square wave in Simulink?

  • Permalink
  • submit to reddit
  • Email
  • Follow


How to convert sine wave signal to square wave in Simulink?
0
Reply as422422 (20) 9/27/2009 12:37:01 PM

See related articles to this posting


I want to convert a sine wave into square wave in Simulink so that i could use counter and measure the frequency. 
How to convert a sine wave signal to square wave in Simulink?
thanks in advance
0
Reply as422422 (20) 9/27/2009 9:51:01 PM

"stime ss" wrote in message <h9nm9d$b1q$1@fred.mathworks.com>...
> 
> How to convert sine wave signal to square wave in Simulink?

Check this 

http://www.mathworks.in/products/matlab/demos.html?file=/products/demos/shipping/matlab/xfourier.html
0
Reply shaun3798 (1) 1/24/2012 2:09:10 PM

Use sign(sine(wt)) 
0
Reply fabian.uriarte (11) 2/13/2013 10:43:01 PM

On Wed, 13 Feb 2013 14:43:01 -0800, fabian.uriarte wrote:

> Use sign(sine(wt))

Well, yeah... but the OP may want to increase the sample rate a bit.
0
Reply anyone 2/14/2013 1:40:11 AM
comp.soft-sys.matlab 203823 articles. 539 followers. Post

4 Replies
521 Views

Similar Articles

[PageSpeed] 27


  • Permalink
  • submit to reddit
  • Email
  • Follow


Reply:

Similar Artilces:

"Sine Wave" block in Simulink vs "Sine Wave" block in Signal Processing Blockset
Kindly refer to figure below. What is the different between the sinewave generated by "Sine Wave" block in Simulink vs "Sine Wave" block in Signal Processing Blockset (SPB)? I wish to understand the "physical" meaning and difference. I will appreciate if someone can give a "real-world" example in which sinewave generated by SPB is useful. Thanks http://img.photobucket.com/albums/v608/zhaopian/simulink_dsp_sw.png Can someone please help me to clear my doubt? Thanks ...

convert square wave to sine in simulink
Hi there. I want to convert a square wave signal to sine with equal frequency in simulink. Who has an idea? Thanks for your help! :-) sorry,typing error! e-mail address: mail@lars-krueger.com Lars Kr�ger wrote: > > > Hi there. > I want to convert a square wave signal to sine with equal frequency > in simulink. > Who has an idea? > Thanks for your help! :-) ...

How to generate Sine wave,saw tooth wave,triangle wave,square wave using equation?
HI expert.. &nbsp; i am new in a Labview programming and attend some conference and seminar from Labview.. i am trying to simulate a Sine wave,saw tooth wave,triangle wave,square wave using equation same like "simulate signal package in labview, because&nbsp; but i need to configure all the variable data inside the equation. .. like&nbsp; x= a sin 2*pi*f*t or x= a sin w*t.. &nbsp; i am using labview 7.0.. can anyone help me please.... Hi Shid, I do not have LV 7.0, but an example program that I would look into is the Function Waveform Generation.vi example.&nbsp; I fo...

Converted Sine wave from DC-AC inverter not having the same amplitude as the Square Wave
I have a Inverter with a DC input and output as a Square wave. My aim was to convert this DC input into an AC Sine wave. Therefore, I had placed LC filter at the output of the inverter. I did get a square wave which has the same amplitude as that of the input DC voltage. But when I convert this into a sine wave, the amplitude is decreased irrespective the values I change. The following are the parameters I have used: DC input : 170 V Inverter: 2-arm four diode Universal Bridge (Ideal Switches) PWM Generator: Carrier Frequency (triange wave frequency) : 9000hz Sine wav...

how to create a 10%AM signal that module by a square wave? square wave ?
Just like the Title , any suggestion is appreciate! ...

superposition of a square wave over a sine wave
Hi all, I am new to VHDL programming. My task is to generate a high frequency square wave(500 Hz) super positioned over a low frequency sine wave(5 Hz). how can this be achieved in VHDL. I know how to generate both these waves separately, but i dunno how to generate them together and superposition them. i would be thankful if someone could help me in this task. even your valuable ideas will be quite useful for me. thanks On Fri, 30 Jan 2009 12:43:32 -0800 (PST), Shiva <chibi.sub@gmail.com> wrote: >Hi all, > >I am new to VHDL programming. My task is to generate a high frequen...

square wave / sine wave generator
I'm looking for a simple program or method to generate sine waves or square waves at a desired frequency. Thanks for your help Ray RayD wrote: > I'm looking for a simple program or method to generate sine waves or > square waves at a desired frequency. > Have you tried Google? What's your C++ question? On Jun 21, 1:43 pm, RayD <rgdyke...@aol.com> wrote: > I'm looking for a simple program or method to generate sine waves or > square waves at a desired frequency. > > Thanks for your help > > Ray Isn't this a Home Work? RayD wrote: &...

sample a sine wave with square wave
Hi I would like to sample a sing wave with a square wave. Can anyone help me how to implement it in MATLAB On Jul 4, 11:07 am, fas <faisalmu...@gmail.com> wrote: > Hi > I would like to sample a sing wave with a square wave. Can anyone help > me how to implement it in MATLAB In other words I want to convolve a sine with a square wave(rect) > In other words I want to convolve a sine with a square wave(rect) You can create a sampled sine wave using the sin function (the result is a vector). You can create a rectangular wave (vector) by using a hard limiter on a DC shifted si...

Square wave vs sine wave oscillator for mixer
Hi All, I have a 80MHz crystal clock oscillator that I am using to clock ADCs and DACs and an FPGA in a design that I am working on. I also would like to use the same 80MHz clock as the Local Oscillator (LO) reference for a mixer to mix my ADC outputs up from 8-28MHZ to 88-108MHz. Do you know if I can run a square wave into a mixer? or will this cause my issues? Also the mixer requires a LO power of about +10dBm (50ohm). Is there any easy way to get the clock oscillator up to this kinda power level to drive the mixer. Regards, Paul Solomon -- Paul Solomon wrote: ... > Do you k...

Conver sine to square wave in simulink
hi there, I'm using simulink. My incomming data is sine wave and i need to convert it to square wave. how i make that. Well, for test, i did some thing like, using signal generator i generate sine and then use the FFT but i can't saw any square wave. so, please let me know what to do. thanks deena What is the method you used for converting sine into square. How does fft of sine will lead to square? Infact, if you combine odd harmonics of sine (10 harmonics will do), you may get square. A. Kumar Deena Chow wrote: > > > hi there, > I'm using simulink. My incomming data...

Sine wave samples to sine wave equation
I have a sine wave sampled at 16 samples per cycle, and a total of (approxi= mately) 8 cycles, although where the data starts and stops with respect to = the phase of the sine waves is not determined. Amplitude is reasonably cons= tant. Resolution is around 10 bits. I need to generate an equation from that data to enable me to calculate a z= ero crossing point to an accuracy of better than one sample period. On 9/29/14 9:22 AM, Dirk Bruere at NeoPax wrote: > I have a sine wave sampled at 16 samples per cycle, and a total of (approximately) 8 cycles, although where the data starts ...

build sine wave,sawtooth, square,triangle wave using equation
HI expert.. &nbsp; i am new in a Labview programming and attend some conference and seminar from Labview.. i am trying to simulate a Sine wave,saw tooth wave,triangle wave,square wave using equation same like "simulate signal package in labview, because&nbsp; but i need to configure all the variable data inside the equation. .. like&nbsp; x= a sin 2*pi*f*t or x= a sin w*t.. &nbsp; i am using labview 7.0.. can anyone help me please I believe this is a duplicate post, but here is my response. &nbsp; I do not have LV 7.0, but an example program that I would look into is ...

Conver sine to square wave in simulink #2
hi there, I'm using simulink. My incomming data is sine wave and i need to convert it to square wave. how i make that. Well, for test, i did some thing like, using signal generator i generate sine and then use the FFT but i can't saw any square wave. so, please let me know what to do. thanks deena Deena Chow wrote: > > > hi there, > I'm using simulink. My incomming data is sine wave and i need to > convert it to square wave. how i make that. > Well, for test, i did some thing like, using signal generator i > generate sine and then use the FFT but i can't s...

convert sum of two sines to square wave?
Suppose two 16 bit words define the frequency of two sine waves from 0.1Hz to 20 Khz +/-0.1Hz which are then summed, amplified by "infinity" and then clipped, giving a pulsed output. In theory, I think this could be done using a DSP to do everything, but what's the best strategy? Method 1: 1. Store a Nyquist sampled sinewave in Eprom 2. upsample the lower frequency to that of the higher frequency and add together 3. MMmm... this is getting tricky OK. Is there an algorithm that gives us the times for which a sampled waveform crosses zero and whether the gradient is positve or ne...

Simulink sine wave
I need to make a sinusoidal function that will model the movement of the point where wheel touch the ground. Ground is sinusoidal with altitude 0,07m, distance between each high point of the ground is 0,125m. Wheel diameter is 0,25m. Wheel is moving at speed 60km/h. (here's a quick picture: <http://drusek.webpark.pl/matlab.jpg)> hat values i need to put into "Sine Wave"? Thanks in advance. Drusek Anyone...? ...

In phase and quadrature components of a sine wave and a cosine wave
Hi, I have a question that seems simple but is surrounding my mind. From my understanding, a signal can be represented by its in-phase and quadrature componentes (which are low pass signals). The relationship is the following A(t)*cos(wt +phi(t) ) = si(t) * cos(wt) - sq(t) * sin(wt) , being si(t) and sq(t) the associated I and Q signals respectively. So, imagine I have just cos(wt), does it means that si(t) is always = 1? I.e, samples IQ IQ IQ IQ IQ IQ would be And what about sin(wt), would be sq(t) = -1 amd si(t) = 1, i.e. samples IQ IQ IQ IQ IQ IQ would be 0-1 0-1 0-1....

Sine wave with conditions- simulink
Hi there, I am new to simulink, i am wondering how do i input a sine wave with conditions in simulink. eg. 10sin ( pi*t/0.4) valid for 0=< t =< 0.4 0 valid for 0.4< t =<1 Pls help. thanks JT ...

Wave goodbye to Wave
http://www.bbc.co.uk/news/technology-10877768 I wonder if Google will reimburse all the development houses who pitched their sales channels around Wave and promised developments? LOL. It seems like yesterday that all the "advocates" were creaming themselves here in COLA about how Wave would be another nail in MS's coffin! Hadron wrote: > I wonder if Google will reimburse all the development houses who pitched > their sales channels around Wave and promised developments? I tried it and wasn't impressed at all. Why should Google reimburse anyone f...

converting square wave to double
I am trying to pass to square wave signal into math script.&nbsp; I am assumeing that i have to convert the signal into a double.&nbsp; Is this possible?&nbsp; If so how could I convert this signal so it can be passed into math script? Thanks,Leif Which data type does your square wave signal has? If it is a waveform you can get the value as an array of double with the Get Waveform Components primitve. ...

How to convert a sound signal with a dark green wire of a wave file path into a input signal data typ wire?
How to convert a sound signal with a dark green wire of a wave file path into a input signal data typ wire? We want to compare a signal comming from the micro with a sound on the computer? Can somebody pls help us? We are making a guitar, and the VI must compare and find the accords. Our VI is included. Greets from belgium. Geluid.vi: http://forums.ni.com/attachments/ni/170/156235/1/Geluid.vi ...

Hilbert transform of a sine wave is an inverted cos wave, right?
The Hilbert transform of a sine wave is an inverted cos wave, right? "maxplanck" <erik.bowen@comcast.net> wrote in news:2cWdnWMVW8B29V7anZ2dnUVZ_qCunZ2d@giganews.com: > The Hilbert transform of a sine wave is an inverted cos wave, right? > No. sin(wt) is not the same as -cos(wt). Al Clark Danville Signal Processing, Inc. Al Clark wrote: > "maxplanck" <erik.bowen@comcast.net> wrote in > news:2cWdnWMVW8B29V7anZ2dnUVZ_qCunZ2d@giganews.com: > >> The Hilbert transform of a sine wave is an inverted cos wave, right? >> > > No...

Count pulses of a sine wave in simulink
I have a sine wave signal generator in Simulink. I want to use some counter block to keep counting the pulses of sine wave signal. Which block I should use? thanks some help please. which block i can use to count the sine wave pulses or alternatively how I can convert the sine wave to square ? (then i can use counter block) ...

simulink: discrete sine wave to array?
Hello I've got a sine wave block generating 16 discrete values for a one period sine signal. How can I put all 16 values into one array? Thank you Sincerely Lore Hi Lore, to have the array in the matlab workspace, use a 'to workspace' block and take the array from the result variable (apply proper simulaion settings for the model in addition -> fixed step, discrete). To have an array in simulink, use cascading 'unit delay' blocks and a 'mux' collecting their outputs. Cheers, Robert > Hello > > I've got a sine wave block generating 16 disc...

Swept Sine Wave signal drift
I am using the "Getting Started with Swept Sine Wave" example which comes with the Sound and Vibration toolkit. As soon as I start running the program the stimulus and response signals begins to drift up to about 4.5 Volts. However, when I connect the the stimulus to an oscilloscope, the oscilloscope reads no drifting in the signal. I am using a PCI-6052E and an SCB-68. Does anyone have any ideas why this is happening? ...