Contacts

The first harmonic of the Fourier series. Fourier series. An overview of the new PSpice commands used in this chapter

In many cases, the task of obtaining (calculating) the signal spectrum is as follows. There is an ADC, which with a sampling frequency Fd converts a continuous signal arriving at its input during the time T, into digital readings - N pieces. Next, the array of readings is fed into a certain program that gives out N / 2 of some numerical values ​​(the programmer who pulled from internet wrote a program, claims that it does the Fourier transform).

To check if the program is working correctly, we will form an array of readings as the sum of two sinusoids sin(10*2*pi*x)+0.5*sin(5*2*pi*x) and slip it into the program. The program drew the following:

fig.1 Graph of the time function of the signal

fig.2 Graph of signal spectrum

On the spectrum graph there are two sticks (harmonics) 5 Hz with an amplitude of 0.5 V and 10 Hz - with an amplitude of 1 V, all as in the formula of the original signal. Everything is fine, well done programmer! The program is working correctly.

This means that if we apply a real signal from a mixture of two sinusoids to the input of the ADC, then we will get a similar spectrum consisting of two harmonics.

Total, our real measured signal, duration 5 sec, digitized by the ADC, i.e. represented discrete counts, has discrete non-periodic spectrum.

From a mathematical point of view, how many mistakes are there in this phrase?

Now the authorities have decided we decided that 5 seconds is too long, let's measure the signal in 0.5 seconds.



fig.3 Graph of the function sin(10*2*pi*x)+0.5*sin(5*2*pi*x) for a measurement period of 0.5 sec


fig.4 Function spectrum

Something is not right! The 10 Hz harmonic is drawn normally, but instead of a 5 Hz stick, several incomprehensible harmonics appeared. We look on the Internet, what and how ...

In, they say that zeros must be added to the end of the sample and the spectrum will be drawn normal.

fig.5 Finished zeros up to 5 seconds

fig.6 We got the spectrum

Still not what it was at 5 seconds. You have to deal with the theory. Let's go to Wikipedia- source of knowledge.

2. A continuous function and its representation by a Fourier series

Mathematically, our signal with a duration of T seconds is a certain function f(x) given on the interval (0, T) (X in this case is time). Such a function can always be represented as a sum of harmonic functions (sine or cosine) of the form:

K - number of trigonometric function (number of harmonic component, harmonic number)
T - segment where the function is defined (signal duration)
Ak - amplitude of k-th harmonic component,
?k - initial phase of k-th harmonic component

What does it mean to "represent a function as a sum of a series"? This means that by adding the values ​​of the harmonic components of the Fourier series at each point, we will get the value of our function at this point.

(More strictly, the standard deviation of the series from the function f(x) will tend to zero, but despite the standard convergence, the Fourier series of the function, generally speaking, is not required to converge pointwise to it. See https://ru.wikipedia.org/ wiki/Fourier_Series .)

This series can also be written as:

(2),
where , k-th complex amplitude.

The relationship between the coefficients (1) and (3) is expressed by the following formulas:

Note that all these three representations of the Fourier series are completely equivalent. Sometimes, when working with Fourier series, it is more convenient to use the exponents of the imaginary argument instead of sines and cosines, that is, to use the Fourier transform in complex form. But it is convenient for us to use formula (1), where the Fourier series is represented as a sum of cosine waves with the corresponding amplitudes and phases. In any case, it is incorrect to say that the result of the Fourier transform of the real signal will be the complex amplitudes of the harmonics. As the wiki correctly says, "The Fourier transform (?) is an operation that maps one function of a real variable to another function, also of a real variable."

Total:
The mathematical basis of the spectral analysis of signals is the Fourier transform.

The Fourier transform allows us to represent a continuous function f(x) (signal) defined on the segment (0, T) as the sum of an infinite number (infinite series) of trigonometric functions (sine and/or cosine) with certain amplitudes and phases, also considered on the segment (0, T). Such a series is called a Fourier series.

We note some more points, the understanding of which is required for the correct application of the Fourier transform to signal analysis. If we consider the Fourier series (the sum of sinusoids) on the entire X-axis, then we can see that outside the segment (0, T) the function represented by the Fourier series will periodically repeat our function.

For example, in the graph in Fig. 7, the original function is defined on the segment (-T \ 2, + T \ 2), and the Fourier series represents a periodic function defined on the entire x-axis.

This is because the sinusoids themselves are periodic functions, respectively, and their sum will be a periodic function.

fig.7 Representation of a non-periodic original function by a Fourier series

In this way:

Our original function is continuous, non-periodic, defined on some interval of length T.
The spectrum of this function is discrete, that is, it is presented as an infinite series of harmonic components - the Fourier series.
In fact, a certain periodic function is defined by the Fourier series, which coincides with ours on the segment (0, T), but this periodicity is not essential for us.

The periods of the harmonic components are multiples of the segment (0, T) on which the original function f(x) is defined. In other words, the harmonic periods are multiples of the duration of the signal measurement. For example, the period of the first harmonic of the Fourier series is equal to the interval T on which the function f(x) is defined. The period of the second harmonic of the Fourier series is equal to the interval T/2. And so on (see Fig. 8).

fig.8 Periods (frequencies) of the harmonic components of the Fourier series (here T = 2?)

Accordingly, the frequencies of the harmonic components are multiples of 1/T. That is, the frequencies of the harmonic components Fk are equal to Fk= k\T, where k ranges from 0 to?, for example, k=0 F0=0; k=1 F1=1\T; k=2 F2=2\T; k=3 F3=3\T;… Fk= k\T (at zero frequency - constant component).

Let our original function be a signal recorded for T=1 sec. Then the period of the first harmonic will be equal to the duration of our signal T1=T=1 sec and the frequency of the harmonic is 1 Hz. The period of the second harmonic will be equal to the duration of the signal divided by 2 (T2=T/2=0.5 sec) and the frequency is 2 Hz. For the third harmonic T3=T/3 sec and the frequency is 3 Hz. And so on.

The step between harmonics in this case is 1 Hz.

Thus, a signal with a duration of 1 sec can be decomposed into harmonic components (to obtain a spectrum) with a frequency resolution of 1 Hz.
To increase the resolution by 2 times to 0.5 Hz, it is necessary to increase the measurement duration by 2 times - up to 2 seconds. A signal with a duration of 10 seconds can be decomposed into harmonic components (to obtain a spectrum) with a frequency resolution of 0.1 Hz. There are no other ways to increase the frequency resolution.

There is a way to artificially increase the duration of the signal by adding zeros to the array of samples. But it does not increase the real frequency resolution.

3. Discrete signals and discrete Fourier transform

With the development of digital technology, the ways of storing measurement data (signals) have also changed. If earlier the signal could be recorded on a tape recorder and stored on tape in analog form, now the signals are digitized and stored in files in the computer's memory as a set of numbers (counts).

The usual scheme for measuring and digitizing a signal is as follows.

fig.9 Scheme of the measuring channel

The signal from the measuring transducer arrives at the ADC during a period of time T. The signal samples (sample) obtained during the time T are transferred to the computer and stored in memory.

fig.10 Digitized signal - N readings received in time T

What are the requirements for signal digitization parameters? A device that converts an input analog signal into a discrete code (digital signal) is called an analog-to-digital converter (ADC, English Analog-to-digital converter, ADC) (Wiki).

One of the main parameters of the ADC is the maximum sampling rate (or sampling rate, English sample rate) - the frequency of taking samples of a signal continuous in time during its sampling. Measured in hertz. ((Wiki))

According to the Kotelnikov theorem, if a continuous signal has a spectrum limited by the frequency Fmax, then it can be completely and uniquely restored from its discrete samples taken at time intervals , i.e. with frequency Fd ? 2*Fmax, where Fd - sampling frequency; Fmax - maximum frequency of the signal spectrum. In other words, the signal sampling rate (ADC sampling rate) must be at least 2 times the maximum frequency of the signal that we want to measure.

And what will happen if we take readings with a lower frequency than required by the Kotelnikov theorem?

In this case, the effect of "aliasing" (aka stroboscopic effect, moiré effect) occurs, in which the high-frequency signal after digitization turns into a low-frequency signal that does not actually exist. On fig. 5 high frequency red sine wave is the real signal. The lower frequency blue sine wave is a dummy signal resulting from the fact that during the sampling time more than half a period of the high-frequency signal has time to pass.

Rice. 11. The appearance of a false low-frequency signal when the sampling rate is not high enough

To avoid the effect of aliasing, a special anti-aliasing filter is placed in front of the ADC - LPF (low-pass filter), which passes frequencies below half the ADC sampling frequency, and cuts off higher frequencies.

In order to calculate the spectrum of a signal from its discrete samples, the discrete Fourier transform (DFT) is used. We note once again that the spectrum of a discrete signal is "by definition" limited by the frequency Fmax, which is less than half the sampling frequency Fd. Therefore, the spectrum of a discrete signal can be represented by the sum of a finite number of harmonics, in contrast to the infinite sum for the Fourier series of a continuous signal, the spectrum of which can be unlimited. According to the Kotelnikov theorem, the maximum harmonic frequency must be such that it has at least two samples, so the number of harmonics is equal to half the number of samples of the discrete signal. That is, if there are N samples in the sample, then the number of harmonics in the spectrum will be equal to N/2.

Consider now the discrete Fourier transform (DFT).

Comparing with the Fourier series

We see that they coincide, except that the time in the DFT is discrete and the number of harmonics is limited to N/2 - half the number of samples.

The DFT formulas are written in dimensionless integer variables k, s, where k are the numbers of signal samples, s are the numbers of spectral components.
The value of s shows the number of full oscillations of the harmonic in the period T (the duration of the signal measurement). The discrete Fourier transform is used to find the amplitudes and phases of harmonics numerically, i.e. "on the computer"

Returning to the results obtained at the beginning. As mentioned above, when expanding a non-periodic function (our signal) into a Fourier series, the resulting Fourier series actually corresponds to a periodic function with a period T. (Fig. 12).

fig.12 Periodic function f(x) with period Т0, with measurement period Т>T0

As can be seen in Fig. 12, the function f(x) is periodic with period Т0. However, due to the fact that the duration of the measurement sample T does not coincide with the period of the function T0, the function obtained as a Fourier series has a discontinuity at the point T. As a result, the spectrum of this function will contain a large number of high-frequency harmonics. If the duration of the measurement sample T coincided with the period of the function T0, then only the first harmonic (a sinusoid with a period equal to the sample duration) would be present in the spectrum obtained after the Fourier transform, since the function f(x) is a sinusoid.

In other words, the DFT program "does not know" that our signal is a "piece of a sine wave", but is trying to represent a periodic function as a series, which has a gap due to the inconsistency of the individual pieces of the sine wave.

As a result, harmonics appear in the spectrum, which in total should represent the form of the function, including this discontinuity.

Thus, in order to obtain the "correct" spectrum of the signal, which is the sum of several sinusoids with different periods, it is necessary that an integer number of periods of each sinusoid fit on the signal measurement period. In practice, this condition can be met for a sufficiently long duration of the signal measurement.

Fig.13 An example of the function and spectrum of the signal of the kinematic error of the gearbox

With a shorter duration, the picture will look "worse":

Fig.14 An example of the function and spectrum of the rotor vibration signal

In practice, it can be difficult to understand where are the “real components” and where are the “artifacts” caused by the non-multiplicity of the periods of the components and the duration of the signal sample or the “jumps and breaks” of the waveform. Of course, the words "real components" and "artifacts" are not in vain quoted. The presence of many harmonics on the spectrum graph does not mean that our signal actually “consists” of them. It's like thinking that the number 7 "consists" of the numbers 3 and 4. The number 7 can be represented as the sum of the numbers 3 and 4 - this is correct.

So is our signal ... or rather, not even “our signal”, but a periodic function compiled by repeating our signal (sampling) can be represented as a sum of harmonics (sinusoids) with certain amplitudes and phases. But in many cases important for practice (see the figures above), it is indeed possible to relate the harmonics obtained in the spectrum to real processes that are cyclic in nature and make a significant contribution to the signal shape.

Some results

1. The real measured signal, duration T sec, digitized by the ADC, that is, represented by a set of discrete samples (N pieces), has a discrete non-periodic spectrum, represented by a set of harmonics (N/2 pieces).

2. The signal is represented by a set of real values ​​and its spectrum is represented by a set of real values. The harmonic frequencies are positive. The fact that it is more convenient for mathematicians to represent the spectrum in a complex form using negative frequencies does not mean that “it is right” and “it should always be done this way”.

3. The signal measured on the time interval T is determined only on the time interval T. What happened before we began to measure the signal, and what will happen after that - this is unknown to science. And in our case - it is not interesting. The DFT of a time-limited signal gives its "real" spectrum, in the sense that, under certain conditions, it allows you to calculate the amplitude and frequency of its components.

Used materials and other useful materials.

The Fourier transform is the most widely used means of converting an arbitrary function of time into a set of its frequency components in the complex number plane. This transformation can be applied to aperiodic functions to determine their spectra, in which case the complex operator s can be replaced by /co:

In order to determine the most interesting frequencies, numerical integration on the complex plane can be used.

To get acquainted with the basics of the behavior of these integrals, we consider several examples. On Fig. 14.6 (left) shows the unit area pulse in the time domain and its spectral composition; in the center - a pulse of the same area, but of greater amplitude, and on the right - the amplitude of the pulse is infinite, but its area is still equal to unity. The right picture is especially interesting because the zero-width pulse spectrum contains all frequencies with equal amplitudes.

Rice. 14.6. Spectra of pulses of the same width, along the same piaosrdi

In 1822 the French mathematician J. B. J. Fourier (J. B. J. Fourier) showed in his work on thermal conductivity that any periodic function can be decomposed into initial components, including the repetition frequency and a set of harmonics of this frequency, and each of the harmonics has its own amplitude and phase with respect to repetition rate. The basic formulas used in the Fourier transform are:

where A() is the direct current component, and A p and B p are harmonics of the fundamental frequency of order and, respectively, in phase and antiphase with it. The function f(*) is thus the sum of these harmonics and Lo-

In cases where f(x) is symmetric with respect to mc/2, i.e. e. f(x) on the region from n to 2n = -f(x) on the region from 0 to n, and there is no DC component, the Fourier transform formulas are simplified to:

where n = 1, 3.5, 7…

All harmonics are sinusoids, only some of them are in phase, and some are out of phase with the fundamental frequency. Most waveforms encountered in power electronics can be decomposed into harmonics in this manner.

If the Fourier transform is applied to rectangular pulses with a duration of 120°, then the harmonics will be a set of order k = bi ± 1, where n is one of the integers. The amplitude of each harmonic h with respect to the first one is related to its number by the relation h = l//e. In this case, the first harmonic will have an amplitude 1.1 times greater than the amplitude of a rectangular signal.

The Fourier transform gives the amplitude value for each harmonic, but since they are all sinusoidal, the rms value is obtained simply by dividing the corresponding amplitude by the root of 2. The rms value of a complex signal is the square root of the sum of the squares of the rms values ​​of each harmonic, including the first.

When dealing with repetitive impulse functions, it is useful to consider the duty cycle. If the repeated pulses in Fig. 14.7 have an rms value X at time A, then the rms value at time B will be X(A/B) 1 2 . Thus, the RMS value of the repetitive pulses is proportional to the square root of the duty cycle value. Applying this principle to a 120° (duty cycle 2/3) unit amplitude rectangular pulse gives the RMS value (2/3) 1/2 = 0.8165.

Rice. 14.7. Determining the Root Mean Square (RMS) for Repeated

impulses

It is interesting to check this result by summing the harmonics corresponding to the mentioned square wave train. In Table. 14.2 shows the results of this summation. As you can see, everything matches.

Table 14.2. The results of the summation of harmonics corresponding to

periodic signal with duty cycle 2/3 and unit amplitude

Harmonic number

Harmonic amplitude

Total RMS

For comparison purposes, any set of harmonics can be grouped together and the corresponding overall level of harmonic distortion determined. In this case, the mean square value of the signal is determined by the formula

where h\ is the amplitude of the first (fundamental) harmonic, and h„ is the amplitude of harmonics of order n > 1.

The components responsible for distortion can be written separately as

where n > 1. Then

where Fund is the first harmonic and the total harmonic distortion (THD) is equal to D/Fund.

Although square wave analysis is interesting, it is rarely used in the real world. Switching effects and other processes make rectangular pulses more like trapezoidal, or, in the case of converters, with a rising edge described by the expression 1 cos(0) and a falling edge described by cos(0), where 0< 0

on a logarithmic scale, the slope of the corresponding sections of this graph is -2 and -1. For systems with typical reactance values, the slope change occurs approximately at frequencies from the 11th to the 35th harmonic of the mains frequency, and with an increase in reactance or current in the system, the frequency of slope change decreases . The practical result of all this is that higher harmonics are less important than one might think.

Although increasing the reactance helps to reduce the higher order harmonics, this is usually not feasible. It is more preferable to reduce the harmonic components in the consumed current by increasing the number of pulses during rectification or voltage conversion, achieved by phase shift. With regard to transformers, this topic was touched upon in Chap. 7. If the thyristor converter or rectifier is fed from the transformer windings connected by a star and a delta, and the outputs of the converter or rectifier are connected in series or in parallel, then a 12-pulse rectification is obtained. The harmonic numbers in the set are now k = \2n ± 1 instead of k = 6u + 1, where n is one of the integers. Instead of harmonics of the 5th and 7th order, harmonics of the 11th and 13th orders now appear, the amplitude of which is much less. It is quite possible to use even more ripples, and, for example, 48-pulse systems are used in large power supplies for electrochemical installations. Since large rectifiers and converters use sets of diodes or thyristors connected in parallel, the additional cost of phase-shifting windings in a transformer mainly determines its price. On Fig. 14.8 shows the advantages of a 12-pulse circuit over a 6-pulse one. The 11th and 13th order harmonics in a 12-pulse circuit have a typical amplitude value of about 10% of the first harmonic. In circuits with a large number of ripples, the harmonics are of the order k = pn + 1, where p is the number of ripples.

For interest, we note that pairs of harmonic sets that are simply shifted relative to each other by 30° do not cancel each other out in a 6-pulse scheme. These harmonic currents flow back through the transformer; thus, an additional phase shift is required to obtain the possibility of their mutual annihilation.

Not all harmonics are in phase with the first. For example, in a three-phase harmonic set corresponding to a 120° square wave train, the phases of the harmonics change according to the sequence -5th, +7th, -11th, +13th, and so on. When unbalanced in a three-phase circuit, single-phase components can occur, which entails a tripling of harmonics with zero phase shift.

Rice. 14.8. Spectra of 6 and 12 pulsation transducers

Isolation transformers are often seen as a panacea for harmonic problems. These transformers add some reactance to the system and thereby help to reduce higher harmonics, however, apart from suppression of zero-sequence currents and electrostatic isolation, they are of little use.

Let's start with a simple circuit to cover the basic concepts that we will use later for more complex circuits. On fig. 7.1 shows the input voltage V BX.p = 1 V, this is a sine wave with a frequency f\u003d 1 kHz and a maximum value of 1 V (rms V in=√2). In order to provide an output voltage that is a non-linear function of the input voltage, a voltage source E controlled by voltage (VUN) is used as an amplifier. In this example, the dependence of the output voltage on the input is displayed by the function

f(x) = 1 + X + X².

Rice. 7.1. Scheme with a nonlinear relationship between input and output voltages


This functional relationship is displayed in the E command using polynomial coefficients. General view of the polynomial:

f(X) = k 0 + k 1 X + k 2 X².

To get to our example dependency, we use the last three numbers of the E input command. We want to do a harmonic analysis to see which harmonics are present in the output voltage, but first let's try to determine what we should expect.

Before proceeding to the expansion of time dependences in a Fourier series, it is necessary to perform an analysis for transient processes (transient analysis program in PSpice).

Therefore, both .TRAN and .FOUR commands must be used. Typically, a transient analysis is performed for a full period of the fundamental frequency. In this example f=1 kHz; Consequently, T=1/f=1 ms. Harmonic analysis reflects frequency components up to the ninth harmonic. For most purposes this should be more than enough. If higher harmonics are shown, they will not matter much due to the accumulation of rounding error in the results.

To give a more detailed description of the input voltage V BX, use the form sin to describe the source. Parameters sin( a, b,With,…) mean: a- constant component, b- maximum value, With- frequency, d- delay, e- attenuation coefficient and f- phase.

When the .FOUR command is included in the input file, a harmonic analysis is performed that yields a Fourier expansion of the results of the transient analysis. The parameters for this command include the fundamental frequency and the variables for which the expansion will be obtained. In this example, these variables will be periodic functions of input V(1) and output V(2) voltages. Input file:

Vin 1 0 sin(0 1 1000); arguments for offset, maximum, and frequency
E 2 0 poly(1) 1.0 1 1 1; last 3 values ​​for k0, k1, k2

Do the analysis, then get the V(1) and (V)2 plots. Make sure V(1) is an exact copy of the input voltage V VX. The output voltage should show a DC component and a complex wave with a maximum of 3 V. From a theoretical study of the Fourier series, it can be concluded that this graph resembles a periodic wave consisting of the fundamental and second harmonics. It is advisable to print a copy of this graph for future study. On fig. 7.2 shows these graphs.

Rice. 7.2. Stress graphs v 1 and v 2 for the circuit in fig. 7.1


Consider also the output file for this circuit (Figure 7.3), which shows the following values ​​for the node voltages: V(1)=0 V and V(2)=1 V. This means that although the input signal has no offset, the output the voltage has an offset V(2)=1V.

On fig. 7.3 in the table of components of the Fourier series for V(1), not all components have real values. Thus, the value of the constant component should theoretically be equal to zero, but the analysis gives a very small value of 3.5E-10, which is not exactly equal to zero due to the accumulation of rounding errors.

Fourier Analysis; Decomposition of Polynomial
Vin 1 0 sin(0 1 1000); arguments are offset, peak, and frequency
E 2 0 poly(1) 1.0 1 1 1; last 3 1s are for k0, k1, k2
2 2.000E+03 1.994E-08 1.994E-08 -9.308E+01 -9.308E+01
5 5.000E+03 3.134E-09 3.134E-09 -9.107E+01 -9.107E+01
6 6.000E+03 1.525E-09 1.525E-09 -6.706E+01 -6.706E+01
HARMONIC FREQUENCY FOURIER NORMALIZED PHASE NORMALIZED
NO (HZ) COMPONENT COMPONENT (DEG) PHASE (DEG)
1 1.000E+03 1.000E+00 1.000E+00 -2.888E-07 0.000E+00
2 2.000E+03 5.000E-01 5.000E-01 -9.000E+01 -9.000E+01
3 3.000E+03 7.971E-08 7.971E-08 -1.546E+02 -1.546E+02
4 4.000E+03 5.126E-08 5.126E-08 -1.439E+02 -1.439E+02
5 5.000E+03 3.918E-08 3.918E-08 -1.420E+02 -1.420E+02
6 6.000E+03 3.327E-08 3.327E-08 -1.299E+02 -1.299E+02
7 7.000E+03 3.606E-08 3.606E-08 -1.268E+02 -1.268E+02
8 8.000E+03 2.889E-08 2.859E-08 -1.316E+02 -1.316E+02
9 9.000E+03 2.584E-08 2.584E-08 -1.189E+02 -1.189E+02
TOTAL HARMONIC DISTORTION = 4.999939E+01 PERCENT

Rice. 7.3. The output file with the results of the circuit analysis in fig. 7.1


The first harmonic is the fundamental harmonic at f=1 kHz. The amplitude of the first harmonic of the Fourier series and its phase 2.4Е-7 (also almost zero) are shown. If we assume that this component is expressed by the formula

b n sin( nx),

then this means that b 1 =1, n=1, where index 1 corresponds to the fundamental frequency. Other harmonics can be ignored, since their amplitudes are many orders of magnitude smaller than the fundamental harmonic. It is the fundamental harmonic that is reflected in the V(1) graph in Probe, obtained from the data in Fig. 7.3.

Another table of Fourier components in fig. 7.3 refers to V(2). When looking at the various harmonics, note that there is a 1.5V DC component. Why 1.5V? Component k 0 = 1 V gives only a part of this value, the remaining 0.5 V is associated with the second harmonic. The theory shows that with harmonic distortion in the second harmonic in the output voltage, in addition to the second harmonic itself with amplitude b 2, a constant component associated with distortions in the second harmonic appears with the value b 0 =b 2. The amplitude of the fundamental frequency in the expansion is b 1 \u003d 1 V, amplitude of the second harmonic b 2 =0.5 V, its phase angle is -90°. Higher harmonics are much smaller and can be ignored.

As a harmonic synthesis exercise, you can draw the individual harmonics and add them together to predict the result you get in Probe for V(2). Remember to take into account the DC component and the corresponding amplitudes and phases for the fundamental and second harmonics. Once you've drawn the resulting waveform, you'll no doubt be pleased to know that PSpice can do the tedious work for you.

Addition of harmonics and decomposition into harmonic components

Let's create a new input file corresponding to Fig. 7.4, on which to the diagram of Fig. 7.1, two more independent current sources are added.

We used two sources just so you can get the fundamental and second harmonics on the same plot as the output voltage. Additional sources feed a 1-ohm resistor connected in parallel. Such a change in the original scheme is not at all necessary, it just turned out to be convenient with a given set of parameters. The new input file is an extension of the previous file and looks like this:

Fourier Analysis; Decomposition of Polynomial
Vin 1 0 sin(0 1 1000); arguments - offset, amplitude and frequency
E 2 0 poly(1) 1.0 1 1 1; last 3 records for k0, k1, k2
i2 0 3 sin(0.5 0.5 2000 0 0 -90)

Rice. 7.4. Scheme for analyzing the addition of harmonics and expansion in a Fourier series


Before performing the analysis, let's take a closer look at the descriptions for i 1 and i 2. For harmonic synthesis, the results of the Fourier series expansion from the previous problem are used. Make sure you understand the meaning of all parameters; then run the analysis in Probe to get I(i1), I(i2), and I(r) plots. Although they are currents, they are numerically equal to voltages, since they pass through a resistance of 1 ohm. On fig. 7.5 presents the results. Now you can establish that the first graph is the fundamental harmonic, the second is the second harmonic, and the third is the result of adding them together in a resistor r. Of course, you can get a plot of V(3) instead of I(r). At the same time, the axis Y will be labeled in units of voltage, not current. Verify that the sum of the first two curves gives the third curve at different points in time. To make the graph more compact, we used a 1V offset for the fundamental and 0.5V for the 2nd harmonic. In fact, the fundamental harmonic has zero offset.

Rice. 7.5. The fundamental and second harmonics and the result of their addition

Second harmonic distortion in amplifiers

When the operating area of ​​the amplifier goes beyond the linear part of the characteristic, this leads to some distortion. The first approximation to the real output curve is achieved by including the second harmonic in the model, showing that the transient function connecting i c and i b(collector and base current) is a kind of parabola. Typically, the distortion is much less than that assumed in our first introductory example, which was shown in Fig. 7.1. A more accurate polynomial is given by the formula

f(x) = 0,1 + x + 0,2x².

It is sufficient to simply transform the original input file to reflect this situation. Input command for dependent source E will take the form:

E 2 0 poly(1) 1.0 0.1 1 0.2; last three values ​​for k0, k1, k2

and the entire input file will be:

Run the analysis and get V(1) and V(2) plots in Probe. You will see that both waves look like real sine waves. For a more accurate comparison, remove the V(2) plot and get a V(2)–0.1 plot instead. This will bring both curves closer together. When comparing waves, remember that V(1) is just a sine wave and V(2) is a combination of fundamental and second harmonics. In this example, the second harmonic is much smaller in amplitude than in the previous one. You can print out the results of the study shown in fig. 7.6.

Rice. 7.6. The fundamental and second harmonics and the result of their addition


After exiting the Probe program, consider the output file for this case. The input voltage V(1) is exactly the same as in the previous example, but V(2) is of course different. Please note that the DC component of the output voltage is 0.2 V, and the second harmonic at f=2 kHz has an amplitude of 0.1 V and a phase angle of -90°. Other harmonics are much smaller and can be neglected. Finally, determine the total harmonic distortion, which is very close to 10%, as expected. Second harmonic distortion is defined as b 1 /b 2 where b 1 and b 2 - coefficients at the second and fundamental harmonics, respectively. These data are shown in fig. 7.7.

Fourier Analysis; Second Harmonic Distortion, Power Amplifier
NODE VOLTAGE NODE VOLTAGE NODE VOLTAGE NODE VOLTAGE
FOURIER COMPONENTS OF TRANSIENT RESPONSE V(1)
HARMONIC FREQUENCY FOURIER NORMALIZED PHASE NORMALIZED
NO (HZ) COMPONENT COMPONENT (DEG) PHASE (DEG)
1 1.000E+03 1.000E+00 1.000E+00 1.115E-06 0.000E+00
2 2.000E+03 1.994E-08 1.994E-08 -9.308E+01 -9.308E+01
3 3.000E+03 7.381E-09 7.381E-09 -9.083E+01 -9.083E+01
4 4.000E+03 4.388E-09 4.388E-09 -8.993E+01 -8.993E+01
5 5.000E+03 3.134E-09 3.134E-09 -9.107E+01 -9.107E+01
6 6.000E+03 1.525E-09 1.525E-09 -6.706E+01 -6.706E+01
7 7.000E+03 1.511E-09 1.511E-09 -1.392E+02 -1.392E+02
8 8.000E+03 1.237E-09 1.237E-09 -3.990E+01 -3.990E+01
9 9.000E+03 7.642E-10 7.642E-10 3.320E+01 3.320E+01
TOTAL HARMONIC DISTORTION = 2.208405E-06 PERCENT
FOURIER COMPONENTS OF TRANSIENT RESPONSE V(2)
HARMONIC FREQUENCY FOURIER NORMALIZED PHASE NORMALIZED
NO (HZ) COMPONENT COMPONENT (DEG) PHASE (DEG)
1 3.000E+03 1.000E+00 1.000E+00 7.683E-07 0.000E+00
2 2.000E+03 1.000E-01 1.000E-01 -9.000E+01 -9.000E+01
3 3.000E+03 1.756E-08 1.756E-08 -1.336E+02 -1.336E+02
4 4.000E+03 1.430E-08 1.430E-08 -1.348E+02 -1.348E+02
5 5.000E+03 9.547E-09 9.547E-09 -1.365E+02 -1.365E+02
6 6.000E+03 8.100E-09 8.100E-09 -1.232E+02 -1.232E+02
7 7.000E+03 6.463E-09 6.463E-09 -1.342E+02 -1.342E+02
8 8.000E+03 5.743E-09 5.743E-09 -9.544E+01 -9.544E+01
9 9.000E+03 6.931E-09 6.931E-09 -1.092E+02 -1.092E+02
TOTAL HARMONIC DISTORTION = 9.999880E+00 PERCENT

Rice. 7.7. The results of the analysis of second harmonic distortion in amplifiers

Intermodulation distortion

We use a simple circuit (fig. 7.8) to show how two sine waves are combined in a non-linear device using frequencies that are quite close to each other, namely f 1 =1 kHz and f 2 = 1.5 kHz. The non-linear mixing takes place in the e-type dependent source VCVS (INUN). The polynomial describing the relationship has more terms than in the previous example:

f(x) = 1 + x + X² + x³.

Rice. 7.8. Circuit for demonstrating intermodulation distortion


The currents, summing up, create in R= 1 Ω voltage V(1), numerically equal to the current in R. Thus, the input voltage V(1) can be thought of as the voltage in a non-linear mixer. Since sinusoidal waves have different frequencies, their sum is a complex periodic oscillation with a frequency different from the frequency of the original components (beat frequency). Input file:

Run simulation and get in Probe V(1). Select Plot, X-Axis Settings…, User Defined, and set the range from 0 to 10 ms to achieve a steady input voltage. This graph is shown in Fig. 7.9. To confirm that it is actually the sum of the 1 and 1.5 kHz harmonics, we select Trace, Fourier, moving from the time domain to the frequency domain. Let's change the borders along the axis X by setting the frequency range from 4 to 12 kHz. Make sure that the axis parameters correspond to the desired frequencies and expected amplitudes. In fact, when f\u003d 1 kHz, the voltage is 0.991 V, and at f=1.5kHz it is 0.979V. Keep in mind that there is some accumulation error with this synthesis. On fig. 7.10 shows the corresponding frequency response.

Rice. 7.9. Output voltage at intermodulation distortion


Rice. 7.10. Spectral composition of the input voltage


Then select Trace, End Fourier to return to the time domain, delete the V(1) plot and get the mixer output voltage V(2). Recall that the mixer is an INUN with a polynomial connection given by the function f(X). The time dependence is a graph similar to the V(1) graph, but a closer look reveals that the stress shapes are significantly different. Some clues can be gleaned from the harmonic content of this complex waveform, so it will be necessary to go back into the frequency domain by selecting a range along the axis X from 0 to 5 kHz. We recommend printing the frequency spectrum for further study. Theoretical analysis of the frequency modulation components allows you to predict and verify the results of the analysis on PSpice. Note that there is a 2V DC component along with significant components in the 0.5 to 4.5 kHz range (see Figure 7.11 for the frequency spectrum).

Rice. 7.11. Spectral composition of the output voltage

Addition of harmonics

The simplest case for theoretical analysis is the case of a harmonic effect on a circuit consisting of linear components such as resistors, capacitors and inductors, and, as you know, the response is a harmonic oscillation at the same frequency of the input signal. Different voltage drops in the circuit are also harmonic oscillations with the same frequency, differing only in amplitude and phase. Let's use a simple diagram to illustrate some of these properties. On fig. 7.12 shows three voltage sources feeding a circuit containing resistors R= 1 ohm and R 1 =R 2 \u003d 0.001 Ohm. The last two resistors are required to make the voltage sources non-ideal. Using this diagram, we can show the addition of sine waves in Probe. Input file:

Addition of Sine Waves of the Same Frequency
*The order of the parameters in a complex expression for harmonic
*components: offset, amplitude, frequency, delay, attenuation, phase
v2 2 0 sin(0 1 1kHz 0 0 45); phase=45 degrees
v3 3 0 sin(0 1 1kHz 0 0 90); phase=90 degrees

Rice. 7.12. Scheme for adding harmonic signals of one frequency


Run the simulation and Probe plots v(1), v(2), and v=v(1)+v(2). The resulting graphs show the voltage v 2 with maximum lagging approximately 45° from maximum v 1 , and the total voltage v 1 +v 2 with a maximum located between their maximum values. Make sure the maximum v 1 = 1 V reached at 251 µs (90°), maximum v 2 \u003d 1 V - at the time of 131 μs (47.16 °) and maximum v 1 +v 2 \u003d 1.8381 V - at the time of 171 μs (61.56 °). Delete these graphs and get time dependences for other combinations of voltages, for example, for v(1), v(3) and v(1)+v(3). Based on your ability to add stress vectors, try to predict the amplitude value for the sum of stresses before you get the Probe plots shown in Figure 2. 7.13.

Rice. 7.13. The result of the addition of harmonic signals of the same frequency

Addition of fundamental and second harmonics

In the input file corresponding to the scheme in Fig. 7.12, you can easily vary the parameters and composition of power supplies. Let's delete v 3 and double the voltage frequency v 2 to become the second harmonic frequency for v one . Of course, the resulting oscillation will immediately become non-sinusoidal. In fact, its shape will depend on the ratio of phase angles v 1 and v 2. Let both harmonics reach their maximum simultaneously in the considered example. Input file for this case:

Adding Sine Waves; Fundamental and 2nd Harmonic Peaking Together

Run the simulation and plot v(1), v(2), and v=v(1)+v(2) in Probe. Because the v 1 and v 2 peak at the same time, the maximum of the resulting oscillation is 2 V, but when the fundamental harmonic reaches a negative maximum, the second harmonic returns to a positive maximum, and their sum goes to zero. It is clear that the total fluctuation ( v 1 +v 2) non-sinusoidal. These graphs are shown in fig. 7.14.

Rice. 7.14. The result of adding the first and second harmonics

Amplitude modulation

An interesting plot of an amplitude-modulated waveform can be obtained in PSpice by using the multiplication function of harmonic waves with significantly different frequencies. On fig. 7.15 shows a circuit simulating such a device. The first harmonic source is v 1 with a frequency of 1 kHz. second origin v 2 has a frequency of 20 kHz. The multiplication is carried out in the dependent source e, which is the INUN (VCVS). Resistors are needed to avoid floating potentials. Input file:

e 3 0 poly(2) 1.0 2.0 0 0 0 0 1

Rice. 7.15. Multiplier for sine wave modulation


The last five entries in the polynomial source input command are: 0 0 0 0 1. Recall that these are the values ​​of the coefficients in the terms k 0 , k 1 v 1 , k 2 v 2 , k 3 v 12 and k 4 v 1 v 2. All values ​​are 0 except k 4 , which is equal to 1.

Run the simulation and get v(1) and v(3) plots in Probe. The harmonic component with a frequency of 20 kHz is deliberately not built on the general graph, so as not to complicate the understanding of the processes. The resulting oscillation v(3) has the classical form of an amplitude-modulated oscillation. In this example, both input harmonics v 1 and v 2 have an amplitude of 1 V. Graphs are shown in fig. 7.16.

Rice. 7.16. The result of the study of amplitude-modulated signals


While still in Probe, add another input voltage v(2) plotted to show all voltages: v(1), v(2), and v(3). Now this graph contains, along with the other two waves, the carrier, giving the complete image. Get a printout for further study, then delete the v(2) plot and select Trace, Fourier. Install along the axis X range limits from 0 to 30 kHz. The frequency domain now displays 1.19 kHz and 21 kHz components. The last components are the upper and lower side frequencies resulting from this modulation. Determine the amplitude of each of these waves. Remember the trigonometric identity,

(sin a)(sin b) = 0.5,

which explains the 0.5 V amplitudes for the sideband frequencies. Refer to fig. 7.17, which shows the frequency spectrum. (Markers have been removed for a clearer picture.) Analyze with different relative amplitudes for the modulation voltage v 1 to see what effect this has on modulation depth t. For example, when v 1 has an amplitude of 0.8, what is the modulation depth and what does the resulting oscillation look like?

Rice. 7.17. Frequency spectrum of an amplitude-modulated oscillation

An overview of the new PSpice commands used in this chapter

.FOUR <частота>*<выходные переменные>

For example, the entry

shows that a Fourier expansion is being performed. Decomposition can be performed only after obtaining the time dependence for the steady state obtained in the analysis of the transient. Such a command must be present in the input file:

TRAN <шаг><момент окончания>

Tasks

Harmonic analysis gives the dc component of the fundamental, and all harmonics up to and including the ninth. Their amplitudes and phases are shown with actual and relative values. In the previous example, V(1) and V(2) and their components were analyzed. Usually, to perform harmonic analysis, the command is used .PROBE: however, the commands can also be used instead .PRINT or .PLOT.

7.1. On fig. 7.18 the polynomial for E has the form

f(x) = X + X².

Rice. 7.18


Using v i peak=1 V, f=1 kHz and V= 1 Compare v 0 s v i. Predict the approximate harmonic content of the output voltage; then perform an analysis on PSpice which will show the harmonic content of both the input and output voltages. In the .FOUR command, use the voltages V(2, 1) and V(3). Examine the output file and determine the harmonic content of V(3).

7.2. In Problem 7.1, use Trace, Fourier to get the harmonic content of V(3). Displaying V(2,1) and V(3), set the axis X limits from 0 to 5 kHz.

7.3. Perform the analysis for problem 7.1 with

f(x) = 2 + 0,1x².

Predict the approximate harmonic content of the output voltage; then plot V(2,1) and V(3) to check the accuracy of your predictions.

7.4. On fig. 7.4 shows a polynomial source E. It was given as

f(X) = 1 + X + X².

Change the polynomial to

f(X) = X + X²,

and perform synthesis and decomposition by changing i 1 and i 2 so that the current I(r) follows the shape of the voltage V(2).

7.5. In the "Second Harmonic Distortion in Amplifiers" section of this chapter, replace the polynomial with the following:

f(X) = 0,05 + X + 0,1X²,

and run the analysis on PSpice as suggested in the text. Get a plot of V(1) and (V)2-0.05 to compare the variable input and output voltages. Predict the values ​​of the DC component of the output voltage, amplitude and phase of the second harmonic, and total harmonic distortion. Test your predictions against the results of Probe and the output file.

7.6. In the Intermodulation Distortion section, we combined two sine waves of different frequencies. Perform analysis at frequencies f 1 =2 kHz and f 2 = 2.5 kHz, leaving the expression for f(X) without change. Modify the .TRAN command according to the task. Follow the steps in the same order as in the text example to test your predictions about the harmonic content of the output voltage.

7.7. In the section "Addition of harmonics" in fig. 7.12 shows parallel branches with three voltage sources. The addition of harmonics was more mathematical than physical. Change the circuit so that all voltage sources are connected in series, then run the analysis again. Did you get the same results?

7.8. Perform analysis to add the following single frequency harmonic voltages f=1 kHz:

v 1 = 0.5∠0°V, v 2 =1∠45°V and v 23 =1.5∠90° V.

Wherein:

a) Find the maximum value ( v 1 +v 2), as well as the time and phase angle at which the maximum is reached.

b) Repeat step a) for ( v 1 +v 3).

When using cursor mode and multiple graphs on the same screen, use the [ ctrl] and the ← and → arrows to select which of the graphs the cursor should move on.

7.9. To illustrate the effect of adding harmonics with close frequencies, perform the analysis as in Problem 7.8 for the following set of parameters: v 1 =1∠0° V, f 1 =1 kHz, v 1 =1∠0° V, f 2 \u003d 1.2 kHz, v 1 =1∠0° V and f 3=1.4 kHz:

a) Get the charts v 1 , v 2 and ( v 1 +v 2). Find the maximum value ( v 1 +v 2).

b) Get charts v 1 , v 3 and ( v 1 +v 3). Find the maximum value ( v 1 +v 3).

7.10. Solve the problem from the section on amplitude modulation by setting v 1 = 1 V at 1 kHz, and changing v 1 so that the modulation depth is 0.5. Run the analysis on PSpice to show your results.

As you know, in the electric power industry, a sinusoidal form is adopted as a standard form for currents and voltages. However, in real conditions, the shapes of the curves of currents and voltages may differ to some extent from sinusoidal ones. Distortions in the shapes of the curves of these functions in receivers lead to additional energy losses and a decrease in their efficiency. The sinusoidal shape of the generator voltage curve is one of the indicators of the quality of electrical energy as a commodity.

The following reasons for the distortion of the shape of the curves of currents and voltages in a complex circuit are possible:

1) the presence in the electrical circuit of non-linear elements, the parameters of which depend on the instantaneous values ​​of current and voltage, (for example, rectifiers, electric welding units, etc.);

2) the presence in the electrical circuit of parametric elements, the parameters of which change over time;

3) the source of electrical energy (three-phase generator), due to design features, cannot provide an ideal sinusoidal shape of the output voltage;

4) influence in the complex of the factors listed above.

Nonlinear and parametric circuits are discussed in separate chapters of the TOE course. This chapter investigates the behavior of linear electrical circuits when exposed to energy sources with a non-sinusoidal waveform.

It is known from the course of mathematics that any periodic function of time f(t) that satisfies the Dirichlet conditions can be represented by a harmonic Fourier series:

Here А0 is a constant component, Ak*sin(kωt+ αk) is the k-th harmonic component or k-th harmonic in short. The 1st harmonic is called the fundamental, and all subsequent harmonics are called the highest.

Amplitudes of individual harmonics Ak do not depend on the method of expansion of the function f(t) in a Fourier series, at the same time, the initial phases of individual harmonics αk depend on the choice of the time reference (origin).

The individual harmonics of the Fourier series can be represented as the sum of the sine and cosine components:

Then the whole Fourier series will take the form:

The ratios between the coefficients of the two forms of the Fourier series are:

If the k-th harmonic and its sine and cosine components are replaced by complex numbers, then the relationship between the coefficients of the Fourier series can be represented in complex form:

If a periodic non-sinusoidal function of time is given (or can be expressed) analytically in the form of a mathematical equation, then the coefficients of the Fourier series are determined by the formulas known from the mathematics course:


In practice, the investigated non-sinusoidal function f(t) is usually given in the form of a graphic diagram (graphically) (Fig. 46.1) or in the form of a table of point coordinates (tabular) in the interval of one period (Table 1). To perform a harmonic analysis of such a function according to the above equations, it must first be replaced by a mathematical expression. Replacing a function given graphically or tabularly by a mathematical equation is called function approximation.



At present, the harmonic analysis of non-sinusoidal functions of time f(t) is performed, as a rule, on a computer. In the simplest case, a piecewise linear approximation is used for the mathematical representation of a function. To do this, the entire function in the interval of one full period is divided into M = 20-30 sections so that individual sections are as close as possible to straight lines (Fig. 1). In separate sections, the function is approximated by the straight line equation fm(t)=am+bm*t, where the approximation coefficients (am, bm) are determined for each section through the coordinates of its end points, for example, for the 1st section we get:

The period of the function T is divided into a large number of integration steps N, the integration step Δt=h=T/N, the current time ti=hi, where i is the ordinal number of the integration step. Certain integrals in the formulas of harmonic analysis are replaced by the corresponding sums, they are calculated on a computer using the trapezoid or rectangle method, for example:

To determine the amplitudes of higher harmonics with sufficient accuracy (δ≤1%), the number of integration steps should be at least 100k, where k is the harmonic number.

In technology, special devices called harmonic analyzers are used to isolate individual harmonics from non-sinusoidal voltages and currents.

Fourier and Hartley transforms transform functions of time into functions of frequency containing amplitude and phase information. Below are graphs of a continuous function g(t) and discrete g(τ), where t and τ are moments of time.


Both functions start at zero, jump to a positive value, and decay exponentially. By definition, the Fourier transform for a continuous function is an integral over the entire real axis, F(f), and for a discrete function, the sum over a finite set of samples, F(ν):

where f, ν are frequency values, n is the number of sample values ​​of the function, and i=√ –1 is the imaginary unit. The integral representation is more suitable for theoretical studies, and the representation in the form of a finite sum is more suitable for computer calculations. The integral and discrete Hartley transforms are defined in a similar way:

Although the only difference in notation between the Fourier and Hartley definitions is the presence of a factor in front of the sine, the fact that the Fourier transform has both a real and an imaginary part makes the representations of the two transforms quite different. Discrete Fourier and Hartley transforms have essentially the same form as their continuous counterparts.



Although the plots look different, the same amplitude and phase information can be derived from the Fourier and Hartley transforms as shown below.



The Fourier amplitude is determined by the square root of the sum of the squares of the real and imaginary parts. The Hartley amplitude is given by the square root of the sum of squares H(–v) and H(ν). The Fourier phase is determined by the arc tangent of the imaginary part divided by the real part, and the Hartley phase is determined by the sum of 45° and the arc tangent of H(–ν) divided by H(ν).



Liked the article? Share it