SU1012272A1 - Device for computing sliding mean - Google Patents

Device for computing sliding mean Download PDF

Info

Publication number
SU1012272A1
SU1012272A1 SU813373675A SU3373675A SU1012272A1 SU 1012272 A1 SU1012272 A1 SU 1012272A1 SU 813373675 A SU813373675 A SU 813373675A SU 3373675 A SU3373675 A SU 3373675A SU 1012272 A1 SU1012272 A1 SU 1012272A1
Authority
SU
USSR - Soviet Union
Prior art keywords
output
input
register
code
adder
Prior art date
Application number
SU813373675A
Other languages
Russian (ru)
Inventor
Андрей Николаевич Белевич
Анатолий Викторович Ефремов
Александр Иванович Колгин
Игорь Васильевич Корелов
Виталий Артурович Кошелев
Original Assignee
Предприятие П/Я Г-4152
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Предприятие П/Я Г-4152 filed Critical Предприятие П/Я Г-4152
Priority to SU813373675A priority Critical patent/SU1012272A1/en
Application granted granted Critical
Publication of SU1012272A1 publication Critical patent/SU1012272A1/en

Links

Landscapes

  • Complex Calculations (AREA)
  • Stabilization Of Oscillater, Synchronisation, Frequency Synthesizers (AREA)

Description

фиг.1 Изобретение относитс  к вьочислйтельной технике и может быть исполь зовано дл  определени  скольз щего среднего в устройствах обработки цифровой информации в цифровых изме рительных приборах и других устройс вах. Известно устройство дл  статйстич кой обработки результатов измерений со скольз щей выборкой, содержащее входной блок, коммутатор, элемент задержки, счетчики-хранители информации , количество которых равно объему выборки N,N элементов И, чер которые производитс  запись кода со входа в счетчики-хранители информации , генератор импульсов, реверсивный счетчик С1. Недостатками устройства  вл ютс  большой требуемый объем пам ти и ни кое быстродействие. Наиболее близким по технической сущности к предлагаемому  вл етс  устройство дл  вычислени  скольз щего среднего, содержащее генератор тактовой частоты, первый и второй регистр, два сумматора. Адгоритм работы устройства описываетс  разностным уравнением e,T)),Tl-)i:CM,Tl+vCi,T),. значени  выходно где9(1,Т),Ш-),Т го кода устройctaa соответственно в момент времени i Т и I i -1 ) Т значение входцю кода в момент времени i Т; . номер момента времени (,-2, интервал дискре тизации J объем выборки. В известном устройстве запись текущего значени  входного кода x(i,T) производитс  в первый регистр а предыдущее значение выходного кода СО-О.ТЗ .записываетс  во второй регистр пам ти. Операци  делени  на N предьвдущего Значени  выходного кода осуществл етс  на втором регист ре путем отбрасывани  k-Mna mx разр дов кода. Операци  вычитани 5t( ((),Ti реализуетс  с помощью первого сумматора путем сложени  код уменьшаемого jf i-lXTj е дополнительным кодом вычитаемого ч) (iH)ffl Операци  сложени  текущего значени  входнЬго кода с кодом разности Ши)Д )т1 реализуетс  на втором сумматоре. Выходной код второго сумматора  вл етс  текущим значением выходного устройства 2J, . Недостатками этого устройства  вл ютс  наличие посто нно присутствующей ошибки при вычислении скольз щего среднего и большое врем  установлени  стационарного режима вычис. лени  скольз щего среднего, которое при скачкообразном изменении входной величины в практически возможных случа х составл ет 3-8 периодов усреднени . С учетом выбранного интервала дискретизации Т период усреднени  в данном случае равен NfT. Цель изобретени  - повышение точности и быстродействи  устройства. Указанна  цель достигаетс  тем, что в устройство дл  вычислени  скольз щего среднего, содержащее сумматор, выход которого подключен к информационному входу первого регистра, генератор тактовых импульсов, выход которого соединен с управл ющим входом второго регистра, выход которого подключен к первому информационному входу сумматора, введены коммутатор и блок управлени , при этом первый выход блока управлени  подключен к управл ющим входам коммутатора и сумматора , второй информационный вход которого соединен с выходом коммутатора , первый информационный вход которого  вл етс  входом устройства, второй информационный вход кО1УЯ утатора подключен к выходу первого регистра, управл ющий вход которого соединен со вторым выходом блока, управлени , вход которого подключен к выходу генератора тактовых импульсов , выход сумматора.соединен с информационным входом второго регистра , выход которого  вл етс  выходом устройства. . Кроме того, блок управлени  содержит триггер и делители частоты, входы которых объединены и  вл ютс  входом блока управлени , выход триггера  вл етс  первым выходом блока, выход делител  частоты  вл етс  вторым выходом блока,. На фиг.1 представлена функциональна  схема предложенного устройства дл  вычислени  скольз щего среднего на фиг.2 - то же, блока управлени . - . Устройство содержит генератор 1 тактовых импульсов, блок 2 управлени , коммутатор.3, сумматор 4, первый регистр 5 (хранени  в течение времени обработки текущей выборки вычисленного среднего значени  кода из объема предыдущей выборки), второй регистр 6 iхранени  в течение одного такта выходного текущего значени  кода скольз щего среднего). Блок 2 управлени  (фиг.2) содержит делитель частоты 7, триггер 8. Устройство работает следующим образом .. Коммутатор 3, имеющий разр дност n+2k, подключает по сигналам с первого выхода блока 2 управлени  ко второму входу (n+2k)-разр дного сум матора 4 поочередно либо входной п-разр дный двоичный код, либо (n+2k)тpaзp дный инверсный код с вы хода регистра 5. Количество разр до k определ етс  по двоичному логариф му числа N значений входного кода, составл ющих объем выборки. Выход сумматора 4 подключен поразр дно к соответствующим разр дным входным деп м (n+2k)-paзp днoгo регистра б, выход которого подключен поразр дно к первому входу сумматора 4 дл  обе печени , работы в режиме накапливающего сумматора. Вместе с этим (n+k) старших разр дов сумматора 4 подключены к (n+k) входным цеп м регистра 5, соответствующие инверсные выходы которого используютс  в качестве (n+k) мпадших-разр дов инверсного кода. Таким образом, при записи значений кода из сумматора 4 в регистр 5 осуществл етс  смещение в сторону младших разр дов на k разр дов, т.е. реализуетс  операци  делени  на и инвертирование полученных значений младдаих (n+k) разр дов кода. При этом значени  k старших разр дов полной разр дной сетки кода со стороны входа регистра 5 не заполнены, т.е. равны нулю. Поэтому соответствующие им значени  k старших ра,зр дов инверсного кода на выходе регистра 5 формируютс  как посто нные одинаковые сигналы лодической 1, дл  передачи которых через коммутатор 3 при технической реализации достаточ но однопроводной линии св зи, с кото рой на выходе сумматора 3 соединены k старших разр дов второго входа сумматора 4. Дл  выполнени  операции вычитани  образуетс  дополнительный код на основе сформированного инверс ного кода регистра 5 путем подачи на вход переноса сумматора 4 сигнала логической 1 -Ь первого выхода блока 2 управлени . Этот сигнал поступает в те промежутки времени, когда через коммутатор 3 на второй вход сумматора 4 передаетс  с регистра 5 инверсный код. К выходу генератора 1 тактовых импульсов подключены вход блока 2 упра влени  и управл кхций вхйД.. регистра 6. Выход регистра 6  вл етс  выходом устройства, с которого сн маетс  текущее значени  обрабатываег мых величин в форме п-разр дного параллельного кода. Алгоритм работы устройства описыг ваетс  разностным уравнением U,T -3Ui-0,Tl--5 i(.)t-xC,-r), где C,T), V Ш-1)Д 3 -значени  выход . ного кода уртройства соответственно в моменты времени Т, ( i -1 ) Т x(i,Т) -значение вх:одного кода в момент времени IT; -среднее значе (зМ,т) ние кода на объеме предыдущей выборки; -номер отсчета дискретных временных значений. (,2,3...) -номер такта J -номер отсчета дискретных временных значений; - цела  часть ( ,l,2,...) Т- интервал дискретизации , N- объем выборки. Каждый i-ый такт работы устройства состоит из полутактов,определ емых двум  соседними импульсами (нeчeтчым и четным.) генератора 1 тактовых импульсов. В первом полутакте входной код поступает через коммутатор 3 на второй вход сумматора 4 и суммируетс  в нем с кодом SL(H-1),T3 регистра 6. Полученное на выходе сумматора 4 значение кода суммыVCC ATil+XC-ijT.J записываетс  в регистр 6 по заднему Лронту нечетного импульса генератора 1тактовых .импульсов, который воздействует также на триггер 8 и измен етсосто ние его выхода с логического О на логическую 1. Во втором полу; такте под действием сигнала логической 1 с выхода блока 2 управлени  (триггер 8) в коммутаторе открываетс  цепь дл  пропускани  на второй вход. сумматора 4 инверсного кода с выхода регистра 5. В результате суммировани  пр мого кода регистра 6 и дополнитeльнqгo кода запомненного в jN-oM такте значени  кода регистра 5 в сумматоре 4 реализуетс  операци  вычитани  ICt-l),TM(i,T)Vj9(JN,T), Полученное на выходе сумматора 4 текущее среднее значение кода записываетс - в регистр 6 по заднему фронту четного импульса генератора 1 тактовых импульсов, при этом триггер В блока 2управлени  возвращаетс  в-исходное положение. Запись в регистр 5 с выхода сумматора 4 производитс  в каждом такт-; по заднему фронту импульса, поступающего со аторого выхода блока 2 управлени . Этот импульс формирует-о с  в делителе 7 (коэффициент делени  равен 2 N) синхронно с соответствующим четным импульсом генератора 1 тактовых импульсов. Первые N тактов, регистр 5 сохрг1н ет запись нулевого значени  кода (о,N,T)O. . На практике широко распространены случаи, когда вычисление скольз щего среднего должно проводитьс  при обработке процессов, имеющих близко соприкасающиес  области частотных диапазонов составл ющих из сигналов область нижних частот-диапазона CTa ционарных случайных возмущений и область верхних частот диапазона низкочастотных регул рных изменений входной величины. При этом все регул рные низкочастотные и скачко . образные изменени  входной величины превышающие по времени следовани  период усреднени , должны обрабатыватьс  с возможно меньшим искажением т.е. без усреднени . В известном . устройстве формирование скольз щего среднего осуществл етс  по закону, близкому к экспоненциальному, т.е. в нем реализован асимптотический процесс приближени  к точному результату . Поскольку точность ограничена значением младшего разр да кода ycpeдн eмoJ(l велгичины, то переходный процесс устаноЕ1лени  стационарног режима вычислени  не обесконечён, а заканчиваетс  за несколько периодов усреднени  (практически от 3 до 8, как показали результаты обработки записей кривых реального процесса изменени  информации) в зависимости от величины скачкообразного изменени  входной величины (от малых отклонений до полного изменени ). За это врем  в устройстве происходит.обработка текущих изменений регул рной низкочастотной составл ющей процесса. По указанным причинам при использовании результата усреднени  полученного в течение одного периода усреднени , в известном устройстве ошибка составл ет примерно 30% от величины скачкообразного изменени  входной величины, тогда как в предложенном устройстве при тех же услови х результирующа  ошибка не превышает значени  младшего разр да кода усредн емой величины,т.е. ОО о/ -QTT /оВрем  установлени  стационарного режима вычислени  скольз щего среднего равно одному периоду усреднени . Таким образом, предложенное устройство обладает более высокой точностью вычислени  скольз щего среднего при образовании результатов в течение одного периода усреднени  и обеспечивает уменьшение в несколько раз времени установлени  стационарного режима вычислени  скольз ще- го среднего.Fig. 1 The invention relates to a number technology and can be used to determine a moving average in digital information processing devices in digital measuring devices and other devices. A device for statistical processing of measurement results with a slipping sample is known, which contains an input unit, a switch, a delay element, information storage counters, the number of which is equal to the sample size N, N elements AND, which are used to write the code from the input to the information storage counters pulse generator, reverse counter C1. The drawbacks of the device are the large required memory capacity and no speed. The closest in technical essence to the present invention is a device for calculating a moving average, comprising a clock frequency generator, a first and a second register, and two adders. The device operation algorithm is described by the difference equation e, T)), Tl-) i: CM, Tl + vCi, T) ,. the values are output where 9 (1, T), W -), T of the code are set to actaa, respectively, at time i T and I i -1) T are the value of the input code at time i T; . time point number (, -2, discretization interval J sample size. In the known device, the current value of the input code x (i, T) is recorded in the first register and the previous value of the output code CO-O.TZ. is recorded in the second memory register The operation of dividing by N the previous value of the output code is performed on the second register by dropping the k-Mna mx bits of the code. The subtraction operation is 5t (((), Ti is realized by the first adder by adding the code of the decremented jf i-lXTj by an additional code deductible h) (iH) ffl Compound operations audio current value vhodngo code Shi difference code) D) m1 implemented on the second adder. The output code of the second adder is the current value of the output device 2J,. The disadvantages of this device are the presence of a constantly present error in the calculation of the moving average and the long time to establish the stationary computation mode. ling of the moving average, which, with a jump-like change in the input value in practically possible cases, is 3–8 averaging periods. Taking into account the chosen sampling interval T, the averaging period in this case is equal to NfT. The purpose of the invention is to improve the accuracy and speed of the device. This goal is achieved in that a clock generator, the output of which is connected to the control input of the second register, the output of which is connected to the first information input of the adder, is entered into a device for calculating a moving average containing an adder, the output of which is connected to the information input of the first register a switch and a control unit, wherein the first output of the control unit is connected to the control inputs of the switch and the adder, the second information input of which is connected to the output of the switch The first information input of which is the input of the device, the second information input of the KNOWN of the utator is connected to the output of the first register, the control input of which is connected to the second output of the block, the control whose input is connected to the output of the clock generator, the output of the totalizer. a register whose output is a device output. . In addition, the control unit contains a trigger and frequency dividers, the inputs of which are combined and are the input of the control unit, the output of the trigger is the first output of the block, the output of the frequency divider is the second output of the block. Fig. 1 shows a functional diagram of the proposed device for calculating the moving average in Fig. 2 - the same, the control unit. -. The device contains a clock pulse generator 1, a control block 2, a switch 3, an adder 4, a first register 5 (storage for the current sample processing time of the calculated average code value from the volume of the previous sample), a second storage register 6 i for one clock cycle of the output current value moving average code). Control unit 2 (FIG. 2) contains frequency divider 7, trigger 8. The device operates as follows. Switch 3, having a resolution of n + 2k, connects signals from the first output of control unit 2 to the second input (n + 2k) - bit sum mater 4 alternately either input n-bit binary code, or (n + 2k) traverse inverse code with register output 5. Number of bits to k is determined by the binary logarithm of the number N of the input code that make up the volume sampling. The output of adder 4 is connected bitwise to the corresponding bit input depots (n + 2k) -part of the second register b, the output of which is connected bitwise to the first input of adder 4 for both livers, operating in the accumulating adder mode. At the same time, the (n + k) most significant bits of adder 4 are connected to (n + k) input circuits of register 5, the corresponding inverse outputs of which are used as (n + k) low-order bits of the inverse code. Thus, when writing code values from adder 4 to register 5, the lower bits are shifted by k bits, i.e. the operation of dividing and inverting the received values of the (n + k) code bits is implemented. In this case, the values of the k most significant bits of the full bit grid of the code from the input side of register 5 are not filled, i.e. are zero. Therefore, the corresponding k values of the higher orders of the inverted code at the output of the register 5 are formed as constant identical signals of the logistic 1, for transmission of which through the switch 3 with the technical implementation, a single-wire communication link is sufficient, with which k is connected to the output of the adder 3 the higher bits of the second input of the adder 4. To perform the operation of the subtraction, an additional code is formed based on the generated inverse register code 5 by feeding the transfer input of the adder 4 a logical 1 to the first output signal yes block 2 controls. This signal arrives at those times when the inverse code is transmitted from the register 5 through the switch 3 to the second input of the adder 4. The output of the clock generator 1 is connected to the input of the control unit 2 and the controllers inlet. Register 6. The output of register 6 is the output of the device from which the current value of the processed values is taken in the form of an n-digit parallel code. The device operation algorithm is described by the difference equation U, T -3Ui-0, Tl-5 i (.) T-xC, -r), where C, T), V W-1) D 3 is the output value. the first code of the device, respectively, at times T, (i -1) T x (i, T) is the value of in: one code at time IT; -the average value (3M, m) of code on the volume of the previous sample; -number of discrete time values. (, 2,3 ...) -the number of the cycle J -the number of the reference of discrete time values; - the whole part (, l, 2, ...) T is the sampling interval, N is the sample size. Each i-th cycle of the device operation consists of half-strokes determined by two adjacent pulses (counter and even) of the generator of 1 clock pulses. In the first half-cycle, the input code goes through switch 3 to the second input of adder 4 and is summed in it with the code SL (H-1), T3 register 6. The value of the code of sum VCC ATil + XC-ijT.J received at the output of adder 4 is written to register 6 on the back front of an odd pulse of a 1-stroke pulse generator, which also acts on the trigger 8 and changes its output from logical O to logical 1. In the second floor; The cycle under the action of the logical 1 signal from the output of the control unit 2 (trigger 8) in the switch opens the circuit to pass to the second input. the adder 4 of the inverse code from the register 5 output. As a result of summing the direct register code 6 and the additional code stored in the jN-oM cycle of the register code value 5 in the adder 4, the subtraction operation ICt-l), TM (i, T) Vj9 (JN , T) The current average code value obtained at the output of the adder 4 is written to register 6 on the trailing edge of the even pulse of the clock pulse generator 1, while the trigger B of the control unit 2 returns to its original position. Record in the register 5 from the output of the adder 4 is made in each clock; on the falling edge of the impulse coming from the interesting output of the control unit 2. This pulse forms-about with in the divider 7 (the division factor is 2 N) in synchronism with the corresponding even pulse of the generator 1 clock pulses. The first N ticks, register 5 preserves the entry of the zero code value (o, n, t) o. . In practice, there are widespread cases when the calculation of the moving average should be carried out when processing processes that have closely contiguous frequency ranges of the components of the signals of the low frequency range of the CTa stationary random disturbances and the high frequencies of the low frequency range of the input value. In this case, all regular low-frequency and abruptly. figurative changes in the input value that exceed the averaging period in time should be processed with the least possible distortion, i.e. without averaging. In the famous. the formation of a moving average is carried out according to a law close to exponential, i.e. it implements an asymptotic process of approximation to the exact result. Since the accuracy is limited by the value of the low bit of the code of the most advanced mode (l validity), the transition process of setting the stationary mode of calculation is not infinite, but ends for several periods of averaging (almost from 3 to 8, as shown by the results of processing the records of real data changing curves) depending on from the magnitude of the jump-like change in the input quantity (from small deviations to the total change). During this time, the device is processing current changes in the regular low-frequency oscillator. For these reasons, when using the result of averaging the average obtained during one period, the error in the known device is approximately 30% of the magnitude of the stepwise change in the input value, whereas in the proposed device under the same conditions, the resulting error does not exceed the value of the bit code of the averaged value, i.e., OO o / -QTT / o The establishment of the stationary mode for calculating the moving average is equal to one averaging period. Thus, the proposed device has a higher accuracy of calculating the moving average when generating results during one averaging period and provides a reduction of the establishment time of the stationary mode of calculating the sliding average several times.

Claims (2)

1. УСТРОЙСТВО ДЛЯ ВЫЧИСЛЕНИЯ СКОЛЬЗЯЩЕГО СРЕДНЕГО, содержащее . сумматор, выход которого подключен к информационному входу первого регистра, генератор тактовых импульсов, выход которого соединен с управляющим входом второго регистра, выход которого подключен к первому информационному входу сумматора, о тл и ч а ю щ е е с. я тем, что, с целью повышения точности и быстродействия устройства, в него введены коммутатор и блок управления, при . этом первый выход блока управления подключен к управляющим входам коммутатора и сумматора, второй информационный вход которого соединен с выходом коммутатора, первый информационный вход которого является входом ъ устройства, второй информационный вход коммутатора подключен к выходу первого регистра, управляющий вход которого соединен со вторым выходом блока управления, вход которого под* ключей к выходу генератора тактовыхимпульсов, выход сумматора соединен с информационным входом второго регистра, выход которого является выходом устройства.1. DEVICE FOR CALCULATING A SLIDING AVERAGE, containing. an adder, the output of which is connected to the information input of the first register, a clock pulse generator, the output of which is connected to the control input of the second register, the output of which is connected to the first information input of the adder, excluding. I mean that, in order to improve the accuracy and speed of the device, a switch and a control unit are introduced into it, with. wherein the first control unit output is connected to the control inputs of the switch and the adder, a second information input connected with the output switch, the first information input of which is the input b device, a second information input of switch is connected to the output of the first register, a control input coupled to the second output of the control unit whose input is under * keys to the output of the clock generator, the adder output is connected to the information input of the second register, the output of which is the output of construction. 2. Устройство по п.1, о т л и чающееся тем, что блок управ ления содержит триггер и делитель частоты, входы которых объединены и являются входом блока управления, вы ход триггера является первым выходом блока, выход делителя частоты является вторым выходом блока.2. The device according to claim 1, wherein the control unit comprises a trigger and a frequency divider, the inputs of which are combined and are the input of the control unit, the trigger output is the first output of the unit, the output of the frequency divider is the second output of the unit. фиг.1figure 1 ...SU „„1012272... SU „„ 1012272
SU813373675A 1981-12-25 1981-12-25 Device for computing sliding mean SU1012272A1 (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
SU813373675A SU1012272A1 (en) 1981-12-25 1981-12-25 Device for computing sliding mean

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
SU813373675A SU1012272A1 (en) 1981-12-25 1981-12-25 Device for computing sliding mean

Publications (1)

Publication Number Publication Date
SU1012272A1 true SU1012272A1 (en) 1983-04-15

Family

ID=20989429

Family Applications (1)

Application Number Title Priority Date Filing Date
SU813373675A SU1012272A1 (en) 1981-12-25 1981-12-25 Device for computing sliding mean

Country Status (1)

Country Link
SU (1) SU1012272A1 (en)

Non-Patent Citations (1)

* Cited by examiner, † Cited by third party
Title
1. Авторское свидетельство СССР /78227, кл. G Об F l5/36r 1966. 2. Авторское свидетельство СССР 762009, кл. G 06 F 15/36, 1978. *

Similar Documents

Publication Publication Date Title
SU1012272A1 (en) Device for computing sliding mean
SU961103A1 (en) Apparatus for computing digital filter coefficients
SU1087990A1 (en) Device for raising to power
SU922765A1 (en) Device for determining probability distribution laws
RU2116670C1 (en) Information search engine
SU1107131A1 (en) Function generator
SU1092499A1 (en) Device for digital presentation of cosine function
SU1337904A1 (en) Device for fast fourier transform
SU762009A1 (en) Moving average computing apparatus
SU1437877A1 (en) Device for smoothing signals
SU1617437A1 (en) Device for dividing binary numbers
RU2057364C1 (en) Programming digital filter
SU744597A1 (en) Digital function generator
SU1141407A1 (en) Device for calculating value of square root
SU807285A1 (en) Function converter of pulse number into digital code
SU1472901A1 (en) Function generator
RU1783520C (en) Device for dividing binary number
SU1051537A1 (en) Device for implementing square dependence
SU1478225A1 (en) Correlometer
SU1642479A1 (en) Device of determination of random-process characteristics
SU1018123A1 (en) Fast fourier transform device
SU1487030A1 (en) Digital functional converter
SU985782A1 (en) Device for computing two number array product sum
SU1401456A1 (en) Digital device for computing the logarithm of a number
SU1748085A1 (en) Digital tracking phase meter