Why only sine waves?

I have already read a few EE texts where a sine wave is often seen.

Why is the sine wave often used as a test function for a circuit or a system? Why don't we use any other signal instead of sine?

Do we use sine waves as test signal because of the fact that they are common, (for example, AC power)?

• A wide range of test signals are used depending on what is being tested. This question needs more context to understand why you think only sine waves are used. They may be in some circumstances but by no means all. Any repeating waveform can be made just from sine waves for example. – Warren Hill Nov 30 at 14:54
• Very closely related: What is the function of a Fourier Series? – The Photon Nov 30 at 16:42
• Often $\neq$ only. – copper.hat Dec 1 at 20:03
• In principle you got one key factor already .. yes a sine-wave can be created very simple.And Second - like @Warren Hill - any repeating signal can be expressed using sine-waves by using multiples of the base-frequency. – eagle275 Dec 2 at 10:51
• See also the answers to this question for similar explanations to the other linked one electronics.stackexchange.com/questions/463669/… – llama Dec 2 at 20:50

Because sinusoids have some important mathemtical properties. The first being how they behave under differentiation and integration.

$$\frac{d}{dt}\sin(\omega t+\varphi) = \omega\cos(\omega t+\varphi) = \omega\sin(\omega t+\varphi+\frac{\pi}{2})$$

In other words when we differentiate or integrate a sinusoid we get a sinusoid of the same frequency. The sinusoids are the only periodic functions (from the reals to the reals)* for which this is true.

The second being how they behave under addition. Two sinusoids of the same frequency but different phase add together to make a sinusoid of the same frequency (unless they are equal and opposite in which case they cancel to produce zero).

$$a\sin(\omega t)+b\sin(\omega t+\theta)= \sqrt{a^2 + b^2 + 2ab\cos \theta} \sin(\omega t+\operatorname{atan2} \left( b\,\sin\theta, a + b\cos\theta \right))$$

These properties mean that when we feed a sinusoid into a linear time invariant system we get a sinusoid of the same frequency out. Many real-world systems behave to a first approximation as linear time invariant systems, especially for small signals. We can characterise a linear time invariant system by measuring its magnitude and phase response to a sinusoidal sweep and then we can predict its response to other signals by breaking those signals down into combinations of sine waves and then applying the superposition principle.

If we tried to do a similar frequency sweep test with any other waveform we would have an output waveform a different shape to our input waveform, which we would have to deal with somehow, making the characterisation process much trickier.

* As has been pointed out in the comments the exponential is it's own derivative, but the exponential of a real variable is not periodic. The exponential of a real variable multiplied by the imaginary unit is periodic but produces a complex result. If we decompose it into it's real and imaginary parts using Euler's formula then we are back to a pair of sinusoids.

• "The sinusoids are the only periodic functions for which this is true." How do we know that's the case, and not that other such functions exist that we don't know about yet? Is there a proof? – Alexander - Reinstate Monica Dec 1 at 17:51
• @Alexander-ReinstateMonica math.stackexchange.com/questions/3196600/… – gst Dec 1 at 18:07
• It isn't true- $e^{j\omega t}$ is also a periodic function where this is the case. But then you can say that it is composed of sine-waves and cosine-waves $e^{j\omega t} = cos(\omega t) + j sin(\omega t)$. However the sine wave itself is composed of two exponential frequencies ((\$e^{j\omega t} + e^{-jomega t})/(2j)) and it is the exponential function where we get this characteristic of it being its own differential. (So even more fundamental than a sine wave). – Dan Boschen Dec 2 at 3:43
• @DanBoschen I know it is convenient to work with complex signals, but I would argue that real functions are more fundamental than complex ones (I still havent seen an oszilloscope measureing complex voltages) – lalala Dec 2 at 8:30
• @lalala Sure you could argue that since a single scope probe can only measure a real signal. Note that there are such instruments, (IQ signal analyzer) even an oscilloscope can measure complex signals; you just need two scope probes since complex signals have real and imaginary components. I work with transceiver designs and we routinely use and implement complex signals in hardware implementation (two real signals are used to describe a complex signal so we have i and Q datapaths both in the analog and digital domain). – Dan Boschen Dec 2 at 11:52

If we apply a sinusoidal signal into a linear time-invariant system (LTI), the output of that system will also be sinusoidal, of same frequency, but possibly different phase and magnitude. If we apply an input that can be described as a sum of sinusoids, output will also be the sum of sinusoids of same frequency, possibly different phase and magnitude. This makes it very easy to characterize the system in terms of phase and magnitude responses.

Using Fourier series, we can build any periodic waveforms with sinusoidal signals. This adds to the attractiveness of using sine as a test signal. We get to know the response of any periodic waveform if we know the response to a sinusoidal signal.

As to the second question, other signals like step and ramp signals are also used as test inputs. However, these signals does not enjoy the privilege of sine as these are not eigen values of LTI system. The application of a test signal depends on what we are trying to see. For example, a step signal is applied to see how the output reacts to a sudden change in input.

• Re, "sum of sinusoids..." Yeah but the changes in phase and magnitude will be different for different frequency components. If you're trying to learn the transfer function of an unknown LTI circuit, it's simpler to probe it with one pure frequency at a time. – Solomon Slow Dec 1 at 16:56
• Yes, that's exactly what i was trying to convey. – Anil CS Dec 1 at 17:25
• This is a consequence of a simpler also-unique feature of sine-waves: adding any two sine waves of the same frequency will either yield a null output or a sine wave of that frequency; this extends to adding any number--or even an infinite number--of sine waves. – supercat Dec 3 at 16:43

A pure sine wave is an useful test signal because it has a special property, it contains only energy at a single frequency, while other waveforms contain energy on multiple frequencies. So depending on what is being tested, a sine wave or other waveforms may be used.

With a sine wave generator and a tool that can simply measure amplitude of sine wave (e.g. multimeter, oscilloscope), you can measure ratio of output and input amplitudes with sine waves of different frequencies to find out frequency response or bandwidth of a system under test.

• This is circular reasoning. When we say that a sine wave contains energy only at a certain frequency, we're assuming Fourier analysis, which assumes sine waves. – Ben Crowell Dec 3 at 16:49

Only sine wave don’t have harmonics (frequency spectrum at integer multiples of the main periodic frequency), which have energy, and thus can radiate RF above and outside the fundamental frequency. See “Fourier”.

Testing with a non-sinewave also tests at all those harmonic frequencies, which, if not being done intentionally, can end up messing up the test results.

• That doesn't really answer the question, because the Fourier basis consists by definition of sinusoidals. – leftaroundabout Dec 1 at 17:10
• Only a sine wave doesn't have harmonics when you decompose it into sine waves. Only a square wave doesn't have harmonics when you decompose it into square waves. Only a drawing of a rabbit doesn't have harmonics when you decompose it into rabbit drawings. – user253751 Dec 1 at 17:22
• Square waves (e.g. cheap LED light power supplies) will spatter tons of EMI all over your lab, perhaps outside legal limits. Not sure about rabbits, ask an Australian about that problem. – hotpaw2 Dec 2 at 13:33
• Haha, good response! And of course it is true that sinusoidals have particularly well-behaved properties, but still: your argument is begging the question. There are other basis functions that are physically well behaved too – a square wave or rabbit image isn't, but e.g. a Morlet wavelet is, though in a different way. – leftaroundabout Dec 2 at 19:07

It depends on the properties of the device under test which we are interested in.

• For testing the frequency response of a device or circuit (magnitude and phase) we use a tunable sinus source

• For testing the linearity of a device at a fixed frequency for different amplitudes we often are using a triangle wave form. Because it is relatively easy to detect the quality of the slopes of the output signal in comparison to the (hopefully) ideal input form

• For testing the ability of a circuit to amplify/recover a squarewave clock without causing unacceptable distortions we are usuing, of course, an "ideal" input clock signal.

A test function has to be "simple" in some regard (depending on what is the purpouse of the test) in order to test a particular property of the system and create an easily understandable output signal.

When testing a linear or near-linear or wannabe-linear or in-some-sense-linear system, a Fourier analisys or a similar approach (like, say, listening to the signal if it has audible spectre) is one of the most used techniques. It is based on the fact that all signals can be represented by a sum of a sine waves of some frequency, amplitude and phase (caveats apply, of course).

In this regard, a sine wave is a good testing signal. It consist of exactly one sine wave in the Fourier sense, so the output of some linear-ish system is expected to consist mainly of one sine wave and you can easilly measure it's frequency, amplitude and phase (and for most systems, the frequency stays the same so you can even skip it's measurement). Or easilly measure the non-linearity of the system by getting all the sinewaves in the output and relating them to the single sine input in some way.

Every waveform is just a bunch of sinewaves anyway so why bother using many if you can use just one. Another reason is non-linearity aka distortion, anytime there are two or more sinewaves, the first one can modulate the other one creating complex intermodulation distortion which means if you put two sines in, it spits out gazillion new inharmonic sines, it creates a "sea" of these intermodulation sines, like tens or even hundreds of them.

Its much easier to measure the device under test amplitude and distortion with just single sine wave. Its a simplicity thing.

I would say sine wave relates to circle. Circles have unique property of treating periodicities and symmetry. I have always found this question intriguing and still i am finding any good intuition for the same. So will be following this question.

But to finish, i think sine wave having directly related to circles has a great influence in having its use all over the place, similar to the use of PI which is seen allover the place and especially in situations where you think what PI is doing here! I would say, it again relates to circles. So anywhere when you see PI or sin wave, it's elegant to find a hidden circle in the quest.

People here are giving suggestions to a look up for fourier transform, which i guess is a good, deep and elegant way to start your journey in understanding sine waves. I will straight-away say that fourier transform has everything to do with symmetries and periodicities. This transform maps (wraps) any waveform onto a circle. I would let you follow on this base cause i think the more you dig in by yourself, the more you will understand and hope you'll find something here which eventually will be the best answer to this here. who knows!

As it turns out, a "sine wave" (or a phase shifted variant, like a "cosine wave") will be part of the solution of a second order differential equation. Those are common (even more common than first order), and there is a complete theory of their solutions. This is why this function is used so often.

Some people regard it as a special case of the exponential function, which makes things even easier.

Analog designs use sine waves to verify the frequency or amplitude-dependent feature as a general rule. This simplifies the results.

Digital designs use pulses to sequence the design features.

Any periodical signal can be represented as sum of sinusoidal signals of various harmonics -- this type of analysis is named Fourier analysis.

https://whatis.techtarget.com/definition/Fourier-analysis

Fourier analysis allows calculate/simulate mathematical model of electronic circuit and it's reaction on periodic signal as input.

Nowadays 'wavelets' represent an alternative approach (this method gain popularity with increased affordability of computation power).

The key unique property of sine waves is that adding two or more sine waves which have the same frequency but possibly-different phase will either yield a null signal or a single sine wave with the original frequency, whose amplitude and phase is the vector sum of the phase/amplitude vectors being added. In general, if one passes a signal containing any kind of wave of some particular frequency through a linear time-invariant filter, the result can be expressed as the sum or integral of a combination of waves of that same shape and frequency but differing phases and amplitudes, but for most kinds of waves it's impractical to do much with such sums. Unfortunately, if one tries to pass a wave through multiple such filters, each of the original waves from the first filter will need to be added in the second, resulting in nasty nested sums or integrals. Evaluating the effect of a fourth-order filter would require a fourth-order integral. This isn't a problem with sine waves, however, because any such sum produced from the output of the first filter will be reducible to a single sine wave, and likewise for each filter after that. The effect of each phase may thus be processed independently in sequence.

Depends on which ee texts you read.

Use sines for investigating the response on periodic signals, which can be decomposed to a series of sines using the Fourier transform.

Use impulse signals such as block wave for investigating the transient behaviour of a system. Using the Laplace transform you can then analyze any "single shot" signals, such as sawtooth, triangle, etc.

An impulse (block) signal can be seen as a combination of an infinite number of sine frequencies. Of course no impuls is infinitely steep, so the spectrum is in practice limited.

Do not make the mistake to think that sines are more important. Any switched mode power supply has one or more switches that lead to impulses and transients and Laplace. A transmission line for 50 or 60 Hz power may have a sine signal for most of the time, but the transient analysis in case of a short-circuit is very important.