RU2057364C1 - Programming digital filter - Google Patents
Programming digital filter Download PDFInfo
- Publication number
- RU2057364C1 RU2057364C1 RU92008142A RU92008142A RU2057364C1 RU 2057364 C1 RU2057364 C1 RU 2057364C1 RU 92008142 A RU92008142 A RU 92008142A RU 92008142 A RU92008142 A RU 92008142A RU 2057364 C1 RU2057364 C1 RU 2057364C1
- Authority
- RU
- Russia
- Prior art keywords
- input
- output
- adder
- multiplication
- inputs
- Prior art date
Links
Images
Landscapes
- Complex Calculations (AREA)
Abstract
Description
Изобретение относится к вычислительной технике и может быть использовано в измерительных устройствах систем автоматического регулирования, радио- и гидролокации и космической связи. The invention relates to computer technology and can be used in measuring devices of automatic control systems, radio and sonar and space communications.
Известен рекурсивный цифровой фильтр (РЦФ) 2-го порядка, который содержит пять элементов задержки, пять матричных блоков умножения, шесть преобразователей кода и сумматор на пять входов. Вход первого блока умножения соединен с первым блоком задержки. Выход первого, третьего, четвертого и пятого элементов задержки подключены к первым входам соответственно второго, третьего, четвертого и пятого блоков умножения. Вторые входы всех блоков умножения соединены с шинами весовых коэффициентов, выход первого блока умножения соединен через дополнительный элемент задержки с соответствующим входом сумматора. Выход сумматора соединен через преобразователь дополнительного кода в прямой с входами четвертого элемента задержки, выход которого соединен с входами четвертого блока умножения и пятого элемента задержки. Цифровой фильтр имеет высокое быстродействие (1 мкс), благодаря применению матричных блоков умножения и выполнению основных операций в параллельных кодах. A well-known recursive digital filter (RCF) of the 2nd order, which contains five delay elements, five matrix multiplication blocks, six code converters and an adder for five inputs. The input of the first multiplication block is connected to the first delay block. The output of the first, third, fourth and fifth delay elements are connected to the first inputs of the second, third, fourth and fifth multiplication blocks, respectively. The second inputs of all the multiplication units are connected to the buses of the weighting coefficients, the output of the first multiplication unit is connected through an additional delay element to the corresponding input of the adder. The output of the adder is connected via a converter of the additional code in a straight line with the inputs of the fourth delay element, the output of which is connected to the inputs of the fourth block of multiplication and the fifth delay element. The digital filter has a high speed (1 μs) due to the use of matrix multiplication blocks and the implementation of basic operations in parallel codes.
Однако такой цифровой фильтр имеет фиксированные связи, т.е. настроен на передаточную функцию одного вида, причем с большими аппаратурными затратами. Сложность фильтра обусловлена применением пяти матричных блоков умножения, а также тем, что умножение выполняется в прямых кодах, а алгебраическое сложение в дополнительных. Поэтому на выходах блоков умножения введены преобразователи прямого кода в дополнительный, а на выходе сумматора преобразователи дополнительного кода в прямой. Блок управления в указанном фильтре отсутствует, но его функции по организации последовательности выполнения операций распределены между дополнительными элементами задержки, связанными с выходами блоков умножения. С учетом упомянутых элементов задержки входных и выходных сигналов общее количество элементов задержки достигает одиннадцати, причем каждый из них выполнен в виде многоразрядного регистра. However, such a digital filter has fixed communications, i.e. tuned to the transfer function of the same type, and with high hardware costs. The complexity of the filter is due to the use of five matrix multiplication blocks, as well as the fact that multiplication is performed in direct codes, and algebraic addition in additional codes. Therefore, direct code to additional converters were introduced at the outputs of the multiplication units, and additional code converters to direct at the output of the adder. The control unit in the specified filter is absent, but its functions for organizing the sequence of operations are distributed between additional delay elements associated with the outputs of the multiplication blocks. Given the mentioned delay elements of the input and output signals, the total number of delay elements reaches eleven, each of which is made in the form of a multi-bit register.
Известен программный РЦФ 2-го порядка, содержащий шесть регистров, два блока умножения, блок синхронизации, четыре сумматора, четыре мультиплексора, два сдвиговых регистра, дешифратор, два блока инвертирования знака, регистр константы и триггер. Known software RCF of the 2nd order, containing six registers, two multiplication blocks, a synchronization block, four adders, four multiplexers, two shift registers, a decoder, two sign inversion blocks, a constant register and a trigger.
Данный программный РЦФ существенно отличается от известного рекурсивного цифрового фильтра новым составом блоков, благодаря чему создана возможность оперативной перестройки частотных характеристик, причем не только путем смещения частот среза, но и путем преобразования формы характеристик. Программный РЦФ реализует систему разностных уравнений цифровых фильтров 2-го порядка, в том числе фильтра нижних частот (ФНЧ), фильтра верхних частот (ФВЧ) и полосового фильтра (ПФ):
yi= (1) где xi, yi текущие значения входного и выходного сигналов;
xi-1, xi-2, yi-1, yi-2 предшествующие значения переменных;
A и B весовые коэффициенты;
С константа масштабирования.This software RCF significantly differs from the well-known recursive digital filter in the new block composition, which makes it possible to quickly adjust the frequency characteristics, not only by shifting the cutoff frequencies, but also by transforming the shape of the characteristics. The software RCF implements the system of difference equations of digital filters of the 2nd order, including a low-pass filter (LPF), a high-pass filter (HPF) and a band-pass filter (PF):
y i = (1) where x i , y i are the current values of the input and output signals;
x i-1 , x i-2 , y i-1 , y i-2 previous values of variables;
A and B weights;
C is a scaling constant.
Возможность оперативной трансформации передаточной функции и сброса содержимого регистров хранения и элементов задержки расширяет класс решаемых задач, например, в адаптивных системах автоматического регулирования. The ability to quickly transform the transfer function and reset the contents of the storage registers and delay elements expands the class of tasks to be solved, for example, in adaptive automatic control systems.
Однако наличие выходного регистра фиксации результата уменьшает быстродействие фильтра. Кроме этого, масштабирующий множитель в программном РЦФ выбран фиксированным, что затрудняет его работу при скачкообразном изменении соотношения сигнал/шум на входе фильтра. However, the presence of the output register of fixing the result reduces the filter performance. In addition, the scaling factor in the program RCF is fixed, which makes it difficult to operate with a stepwise change in the signal-to-noise ratio at the filter input.
Наиболее близким к изобретению является программируемый рекурсивный цифровой фильтр 2-го порядка, включающий четыре регистра, два мультиплексора, регистр константы, дешифратор, три блока умножения, два блока инвертирования знака, три сдвиговых регистра, блок синхронизации, три сумматора, блок суммирования, состоящий из комбинированного сумматора и триггера округления результатов вычисления. Closest to the invention is a programmable recursive digital filter of the second order, which includes four registers, two multiplexers, a constant register, a decoder, three multiplication blocks, two sign inversion blocks, three shift registers, a synchronization block, three adders, a summing unit, consisting of combined adder and trigger round off the calculation results.
По сравнению с программным РЦФ цифровой фильтр (прототип) обладает более высоким быстродействием, так как отсутствует необходимость в выходном регистре фиксации результата, что сокращает цикл вычисления на 0,5 такта. Кроме того, введение третьего блока умножения позволяет устранить другой существенный недостаток программного фильтра, в котором масштабирующий множитель выбирается фиксированным. Compared to the software RCF, the digital filter (prototype) has a higher speed, since there is no need for an output register for fixing the result, which reduces the calculation cycle by 0.5 clock cycles. In addition, the introduction of the third block of multiplication eliminates another significant drawback of the software filter, in which the scaling factor is selected fixed.
Задачей изобретения является расширение функциональных возможностей, т. е. возможность реализации на базе одного устройства рекурсивных цифровых фильтров четырех видов с регулируемыми параметрами: фильтра нижних частот, фильтра верхних частот, полосовых и режекторных фильтров, а также обеспечение независимой регулировки основных параметров четырех видов фильтров, т.е. частоты среза fc (для цифровых ФНЧ и ФВЧ), полосы пропускания Δf и центральной частоты fo для полосовых РЦФ, полосы режекции Δf и частоты резонанса f
Для этого в программируемый цифровой фильтр, содержащий три регистра, два мультиплексора, регистр константы, дешифратор, три блока умножения, два блока инвертирования знака, три сдвиговых регистра, блок синхронизации, четыре сумматора и D-триггер, дополнительно введены третий мультиплексор, четвертый множитель, четвертый сдвиговый регистр и блок вычисления коэффициента передаточной функции, причем выход первого сумматора является выходом фильтра, первый числовой вход первого сумматора соединен одновременно с входом множимого первого блока умножения и выходом первого мультиплексора, прямой и инверсный выходы первого регистра подключены к первому и второму числовым входам второго сумматора, выход которого соединен одновременно с вторым числовым входом первого сумматора и входом множимого второго блока умножения. Выход второго блока умножения соединен с входом первого блока инвертирования знака, выходом соединенного с первым числовым входом третьего сумматора, второй числовой вход которого подключен к выходу второго блока инвертирования знака, входом подсоединенного к выходу первого блока умножения. Входы множителя первого и второго блоков умножения соединены соответственно с выходами первого и второго сдвиговых регистров, информационный вход первого сдвигового регистра соединен с первым выходом регистра задания константы фильтра, входом запуска последнего является вход запуска блока синхронизации, первый вход которого соединен с тактовым входом второго регистра, информационный вход которого является входом фильтра, входом первого и второго регистров и D-триггера. Выход D-триггера подключен к входу переноса четвертого сумматора, выход которого соединен с информационным входом третьего регистра и первым информационным входом третьего регистра и первым информационным входом первого мультиплексора. Выход первого разряда четвертого сумматора соединен с D-входом триггера. Первый и второй числовые входы четвертого сумматора соединены соответственно с выходом третьего сумматора и третьего блока умножения, вход множимого которого подключен к выходу второго регистра, выход множителя третьего блока умножения соединен с выходом третьего регистра сдвига, вход которого соединен с вторым выходом регистра константы, управляющие входы первого, второго и третьего блоков умножения соединены с вторым выходом блока синхронизации, третий выход которого подключен к тактовым входам первого, второго и третьего регистров сдвига. Третий выход регистра константы соединен с входом дешифратора, первый, второй, третий и четвертый выходы которого соединены с выходами переноса первого и второго сумматора, управляющими входами первого и второго мультиплексора соответственно, установочный вход регистра константы соединен с установочными входами первого и третьего регистров и является установочным входом фильтра, четвертый и пятый выходы регистра константы соединены с установочными входами первого и третьего регистров и является установочным входом фильтра. Четвертый и пятый выходы регистра константы подключены к управляющим входам соответственно первого и второго блоков инвертирования знака, первый и второй информационные входы третьего мультиплексора соединены соответственно с прямым и инверсным входами третьего регистра, выход третьего мультиплексора подключен к входу множимого четвертого блока умножения, вход множителя четвертого умножителя соединен с выходом четвертого регистра сдвига. Выход четвертого блока умножения подключен соответственно к второму числовому входу первого мультиплексора и информационному входу первого регистра. Шестой выход регистра константы подключен к входу четвертого регистра сдвига, седьмой выход регистра константы подключен к входу блока вычисления коэффициента передаточной функции, выход которого подключен к входу второго регистра сдвига, причем управляющие входы второго мультиплексора соединены с вторым выходом дешифратора, тактовые входы четвертого регистра сдвига и управляющие входы четвертого блока умножения соединены с вторым выходом блока синхронизации фильтра. To do this, in a programmable digital filter containing three registers, two multiplexers, a constant register, a decoder, three multiplication blocks, two sign inversion blocks, three shift registers, a synchronization block, four adders and a D-trigger, a third multiplexer, a fourth multiplier are additionally introduced, a fourth shift register and a transfer function coefficient calculation unit, wherein the output of the first adder is the output of the filter, the first numerical input of the first adder is connected simultaneously with the input of the multiplicative first Lok and multiplying output of the first multiplexer, direct and inverse outputs of the first register are connected to first and second numeric inputs of the second adder, whose output is connected both to a second input of the first adder numeric input multiplicand and the second multiplier block. The output of the second multiplication unit is connected to the input of the first sign inverting unit, the output connected to the first numerical input of the third adder, the second numerical input of which is connected to the output of the second sign inverting unit, the input connected to the output of the first multiplication unit. The inputs of the multiplier of the first and second multiplication blocks are connected respectively to the outputs of the first and second shift registers, the information input of the first shift register is connected to the first output of the filter constant setting register, the trigger input of the last is the trigger input of the synchronization block, the first input of which is connected to the clock input of the second register, the information input of which is the input of the filter, the input of the first and second registers and the D-trigger. The output of the D-trigger is connected to the transfer input of the fourth adder, the output of which is connected to the information input of the third register and the first information input of the third register and the first information input of the first multiplexer. The output of the first discharge of the fourth adder is connected to the D-input of the trigger. The first and second numerical inputs of the fourth adder are connected respectively to the output of the third adder and the third multiplication block, the input of the multiplicable of which is connected to the output of the second register, the output of the multiplier of the third multiplication block is connected to the output of the third shift register, the input of which is connected to the second output of the constant register, control inputs the first, second and third multiplication units are connected to the second output of the synchronization unit, the third output of which is connected to the clock inputs of the first, second and third register in shear. The third output of the constant register is connected to the input of the decoder, the first, second, third and fourth outputs of which are connected to the transfer outputs of the first and second adder, controlling the inputs of the first and second multiplexer, respectively, the installation input of the constant register is connected to the installation inputs of the first and third registers and is installation filter input, the fourth and fifth outputs of the constant register are connected to the installation inputs of the first and third registers and is the installation input of the filter. The fourth and fifth outputs of the constant register are connected to the control inputs of the first and second sign inverting units, the first and second information inputs of the third multiplexer are connected respectively to the direct and inverse inputs of the third register, the output of the third multiplexer is connected to the input of the multiplied fourth multiplication block, the input of the fourth multiplier factor connected to the output of the fourth shift register. The output of the fourth multiplication block is connected respectively to the second numerical input of the first multiplexer and the information input of the first register. The sixth output of the constant register is connected to the input of the fourth shift register, the seventh output of the constant register is connected to the input of the transfer function coefficient calculation unit, the output of which is connected to the input of the second shift register, the control inputs of the second multiplexer connected to the second output of the decoder, the clock inputs of the fourth shift register and the control inputs of the fourth multiplication block are connected to the second output of the filter synchronization block.
По сравнению с известными цифровыми фильтрами предложенный фильтр реализует систему разностных уравнений цифровых фильтров второго порядка четырех видов, в том числе полосовых фильтров нижних частот, фильтров верхних частот и режекторных цифровых фильтров с независимой регулировкой параметров
для ПФ (2)
для ФНЧ (3)
ФВЧ (4)
РЖ ЦФ (5) где xi, yi текущее значение входного и выходного сигналов;
α β A, B весовые коэффициенты передаточной функции;
vi, vi-1, vi-2 текущие значения переменных;
С константа масштабирования.Compared with the known digital filters, the proposed filter implements a system of difference equations of second-order digital filters of four types, including low-pass bandpass filters, high-pass filters and notch digital filters with independent adjustment of parameters
for PF (2)
for low-pass filters (3)
HPF (4)
РЖ ЦФ (5) where x i , y i is the current value of the input and output signals;
α β A, B weighting coefficients of the transfer function;
v i , v i-1 , v i-2 current values of variables;
C is a scaling constant.
Входящие в (2) (5) коэффициенты передаточной функции связаны с параметрами характеристики ослабления следующими соотношениями:
(6)
(7) где Δ fε f2 f1 > 0 f1 f2 требуемые частоты среза ЦФ по уровню (1+ от H(z).The transfer function coefficients included in (2) (5) are related to the attenuation characteristic parameters by the following relations:
(6)
(7) where Δ f ε f 2 f 1 > 0 f 1 f 2 the required cutoff frequencies of the DF by level (1+ from H (z) .
При этом ε точность аппроксимации; H(z)- модуль максимального значения передаточной функции H(z); f∂ частота дискретизации;
fo= arccoscoscos частота резонанса полосовых РЦФ или режекции (для режекторных РЦФ). Нужно заметить, что для цифровых ФНЧ и ФВЧ основным регулирующим параметром является частота среза fc, при этом расчетные соотношения (6) и (7), очевидно, теряют смысл, и для вычисления значений коэффициентов передаточной функции и оценки диапазона масштабной перестройки следует применять другие известные соотношения.In this case, ε approximation accuracy; H (z) - the modulus of the maximum value of the transfer function H (z); f ∂ sampling rate;
f o = arccos cos cos the resonance frequency of a strip RCF or notch (for notch RCF). It should be noted that for digital low-pass and high-pass filters, the main regulatory parameter is the cutoff frequency f c , while the calculated relations (6) and (7) obviously lose their meaning, and to calculate the values of the transfer function coefficients and estimate the scale adjustment range, other known relationships.
Возможность реализации одной из трех систем уравнений (2) (5) обеспечивается с помощью дешифратора кода передаточной функции фильтра, мультиплексора, первого, второго, третьего и четвертого сумматоров. Использование преобразователей параллельного кода в последовательный и четырех блоков умножения создает возможность независимого изменения значений коэффициентов передаточной функции у масштабирующего множителя. Инверторы знака, четвертые сумматор и умножитель позволяют перестраивать рекурсивную часть систем уравнений (2) (5). Нужно отметить, что в фильтре-прототипе для обеспечения соответствующих характеристик ослабления, неравномерности в полосе пропускания амплитудно-частотной характеристики, частоты среза необходимо одновременно изменять значения трех коэффициентов A, B и С, изменение значения одного из них (в особенности коэффициентов A и B) приводит к значительному изменению характеристик фильтра, а в отдельных случаях и устойчивости фильтра. Предлагаемый фильтр позволяет за счет введения новых блоков и организации новых связей между ними обеспечить независимую регулировку параметров фильтрации с помощью изменения коэффициентов разностных уравнений (2) (5)
На фиг. 1 представлена функциональная схема программируемого цифрового фильтра; на фиг. 2 функциональная схема блока умножения; на фиг. 3 функциональная схема блока управления; на фиг. 4 функциональная схема блока вычисления коэффициентов передаточной функции; на фиг. 5 временная диаграмма работы фильтра.The possibility of implementing one of the three systems of equations (2) (5) is provided using the code decoder of the transfer function of the filter, multiplexer, first, second, third and fourth adders. The use of parallel to serial converters and four multiplication blocks makes it possible to independently change the values of the transfer function coefficients of the scaling factor. Sign inverters, the fourth adder and the multiplier allow you to rebuild the recursive part of the system of equations (2) (5). It should be noted that in the prototype filter to ensure the corresponding attenuation characteristics, unevenness in the passband of the amplitude-frequency characteristics, cutoff frequency, it is necessary to simultaneously change the values of three coefficients A, B and C, change the value of one of them (especially the coefficients A and B) leads to a significant change in the characteristics of the filter, and in some cases, the stability of the filter. The proposed filter allows, through the introduction of new blocks and the organization of new connections between them, to provide independent adjustment of the filtering parameters by changing the coefficients of difference equations (2) (5)
In FIG. 1 shows a functional diagram of a programmable digital filter; in FIG. 2 functional diagram of the multiplication block; in FIG. 3 functional diagram of the control unit; in FIG. 4 is a functional block diagram for calculating the transfer function coefficients; in FIG. 5 is a timing diagram of a filter.
Программируемый цифровой фильтр (фиг. 1) содержит регистр 1 хранения текущего значения входного сигнала, выход которого соединен с числовым входом блока 2 умножения, выход которого соединен с первым числовым входом комбинационного сумматора 3. Выход первого разряда сумматора 3 подключен к информационному входу D-триггера 4, соединенного выходом с входом переноса этого же сумматора. Выходы остальных разрядов сумматора 3 соединены с числовым входом элемента 5 задержки и первым числовым входом сумматора 6. Прямой и инверсный выходы элемента 5 задержки подключены через мультиплексор 7 к входу множимого множительного устройства 8, выход которого подключен одновременно к второму числовому входу комбинационного сумматора 6 и к входу элемента 9 задержки, прямой и инверсный выходы которого соединены с числовыми входами мультиплексора 10. Выходы сумматора 6 и мультиплексора 10 соединены соответственно с первым и вторыми входами комбинационного сумматора 11. Выход сумматора 11 является выходом фильтра. Регистр 1, элементы 5 и 9 задержки, множительное устройство 8, мультиплексоры 7 и 10 содержат N двоичных разрядов (например N=8). В разрядной сетке сумматоров 6 и 11 N+2 разряда, а сумматор 3 имеет N+1 разряд. Входы управления мультиплексоров 7 и 10 и входы переноса сумматоров 6 и 11 соединены с выходами дешифратора 12, подключенного к первому выходу регистра 13 хранения вектора состояния фильтра. Второй и третий выходы регистра 13 хранения состояния фильтра соединены с числовыми входами соответственно преобразователей 14 и 15 параллельных кодов коэффициентов в последовательные коды множителей. Четвертый выход регистра 13 хранения состояния фильтра подключен к входу блока 16 вычисления значения коэффициента передаточной функции, выход которого соединен с числовым входом преобразователя 17 параллельного кода множителя в последовательный. Пятый выход регистра 13 хранения состояния фильтра соединен с числовым входом преобразователя 18 параллельного кода коэффициента в последовательный код множителя. Выходы сумматора 6 и мультиплексора 10 подсоединены к числовым входам множимого блоков 19 и 20 умножения соответственно. Выходы блоков 19 и 20 умножения соединены через инверторы 21 и 22 знака с входами комбинационного сумматора 23, выход которого соединен с вторым числовым входом сумматора 3. Входы управления инверторов 21 и 22 знака соединены с выходами знаковых разрядов регистра 13, входы множителей блоков 2, 8, 19 и 20 умножения соединены с выходами преобразователей 14, 15, 17 и 18 кода соответственно. Входы управления регистра 1, элементов 5 и 9 задержки, преобразователей 14, 15, 17 и 18 кода, блоков 2, 8, 19 и 20 умножения и тактовый вход D-триггера 4 соединены с соответствующими выходами блока 24 синхронизации, вход которого является входом пуска цифрового фильтра. The programmable digital filter (Fig. 1) contains a register 1 for storing the current value of the input signal, the output of which is connected to the digital input of the
Каждый из блоков 2, 8, 19 и 20 умножения (фиг. 2) содержит N-разрядный комбинационный сумматор 25, мультиплексор 26, регистр-аккумулятор 27 и D-триггер 28. Выход мультиплексора 26 соединен с первым числовым входом сумматора 25, выход которого соединен с числовым входом регистра-аккумулятора 27, первый разряд выходного слова которого подключен к D-входу триггера 28, выходом соединенного с входом переноса сумматора 25. Остальные разряды регистра 27 соединены с разрядами 1 N+1 второго числового входа сумматора 25 с расширением (N-1) разряда на N-ый разряд. Первый числовой вход мультиплексора 26 подключен к выходу регистра 1 хранения, выходу мультиплексора 7, сумматора 6 или мультиплексора 10, а разряды второго числового входа соединены с шиной логического нуля. Вход управления мультиплексора 26 является входом множителя в прямом последовательном коде и соединен с выходом преобразователя 14, 15, 17 или 18 соответственно. Входы записи и сброса регистра 27 подключены к соответствующим входам блока 24 синхронизации. Выходы разрядов 2 N и знаковый разряд мультиплексора образуют N-разрядный выход произведения в дополнительном коде. Each of the
Блок 24 синхронизации (фиг. 1 и 3) содержит двухразрядный счетчик 29, четырехразрядный счетчик 30, триггеры 31 и 32, тактовый генератор 33 и дешифраторы 34 и 35. Тактовые входы счетчиков 29 и 30 соединены с выходом генератора 33, а входы управления с выходами триггеров 31 и 32. Вход S триггера 31 является входом импульса "Пуск" фильтра. Выход переполнения счетчика 29 соединен с входами сброса триггера 31 и счетчика 29. Выходы счетчика 29 соединены с входом дешифратора 35, входы которого, кроме того, соединены с парафазными выходами генератора 33, а также с выходом дешифратора 34, входом подключенного к выходу счетчика 30. Отдельный выход дешифратора 34 соединен с входом сброса счетчика 30 и триггера 32. Преобразователи 14, 15, 17 и 18 кода рекомендуется выполнить в виде регистра сдвига с параллельной записью весового коэффициента. Block 24 synchronization (Fig. 1 and 3) contains a two-
Блок 16 вычисления значения коэффициента передаточной функции (фиг. 4) позволяет устанавливать значение полюса передаточной функции вида AI α ( A 1 ) α · A α Схема содержит блок 36 элементов Исключающее ИЛИ, блок 37 элементов И логического умножения, схему 38 вычисления знака вычислений "Исключающее ИЛИ", блок 39 элементов Исключающее ИЛИ, комбинационный сумматор 40. Следует заметить, что коэффициенты α и A содержат N разрядов (в нашем случае N=10), разрядность комбинационного сумматора равна N+1 разряд.Block 16 calculating the value of the coefficient of the transfer function (Fig. 4) allows you to set the pole value of the transfer function of the form A I α (A 1) α · A α The circuit contains a block of 36 exclusive-OR elements, a block of 37 logical multiplication elements, a
Предпочтительной элементной базой для реализации предлагаемого фильтра является полузаказная БИС на базовых матричных кристаллах, выполненная по К-МОП технологии. Поэтому макет-прототип был выполнен на элементах серии 1564 средней степени интеграции. Серия содержит функциональные блоки, используемые в предлагаемом фильтре, в том числе регистры хранения и сдвига, мультиплексоры и комбинационные сумматоры. The preferred elemental base for the implementation of the proposed filter is a semi-ordered LSI on the base matrix crystals, made by K-MOS technology. Therefore, the prototype mockup was performed on elements of the 1564 series of medium degree of integration. The series contains functional blocks used in the proposed filter, including storage and shift registers, multiplexers and combiners.
Предлагаемый фильтр работает следующим образом. The proposed filter works as follows.
Для настройки фильтра на выбранную передаточную функцию в регистр 13 (фиг. 1) импульсом "Начальная установка" вводится вектор состояния V(F, A, B, α βC), где F двухразрядный код передаточной функции. Там же импульсом стирается содержимое элементов 5 и 9 задержки. Содержимое регистра 13 сохраняется на время работы с заданной передаточной функцией фильтра. Результатом начальной установки является выбор одного из трех уравнений (2) (5), которые можно записать следующим образом
где ρ γ переменные на выходе дешифратора 12, зависящие кода F, который принимает значения 00 для ФНЧ, 01 для ФВЧ, 10 для ПФ, 11 для режекторного цифрового фильтра.To configure the filter for the selected transfer function, the state vector V (F, A, B, α βC) is introduced into the register 13 (Fig. 1) by the “Initial setting” pulse, where F is a two-digit transfer function code. There, the contents of delay elements 5 and 9 are erased by a pulse. The contents of the register 13 is stored for the duration of the operation with the specified transfer function of the filter. The result of the initial installation is the selection of one of the three equations (2) (5), which can be written as follows
where ρ γ are the variables at the output of the decoder 12, depending on the code F, which takes the values 00 for the low-pass filter, 01 for the high-pass filter, 10 for the PF, 11 for the notch digital filter.
Дешифратор 12 обеспечивает формирование функций ρ (F) и γ (F)
ρ γ
Константа масштабирования С не зависит от кода F и определяется расчетным путем в зависимости от вида сигнала на входе и величины модуля передаточной функции фильтра.Decoder 12 provides the formation of functions ρ (F) and γ (F)
ρ γ
The scaling constant C does not depend on the code F and is determined by calculation, depending on the type of signal at the input and the magnitude of the module of the transfer function of the filter.
При настройке на фильтр нижних частот между блоками устройства устанавливаются следующие связи:
мультиплексор 7 подключает прямой выход элемента 5 задержки к второму входу множимого умножителя 8, выход которого соединен с вторым входом сумматора 6 (множитель β при этом равен 1);
мультиплексор 10 соединяет прямой выход регистра 9 задержки с вторым входом сумматора 11,
на входы переноса сумматоров 6 и 11 из дешифратора 12 подается потенциал логического нуля.When tuned to a low-pass filter, the following connections are established between the device blocks:
the multiplexer 7 connects the direct output of the delay element 5 to the second input of the multiplier 8, the output of which is connected to the second input of the adder 6 (the multiplier β is equal to 1);
the multiplexer 10 connects the direct output of the delay register 9 with the second input of the
at the inputs of the transfer of the
При настройке на ФВЧ:
мультиплексор 7 соединяет инверсный выход элемента 5 задержки с входом множимого умножителя 8, выход которого подключен к входу сумматора 6 (коэффициент β при этом равен 1);
мультиплексор 10 соединяет прямой выход элемент 9 задержки с входом сумматора 11;
на вход переноса сумматора 6 из дешифратора 12 поступает потенциал логической единицы, а на вход переноса сумматора 11 потенциал логического нуля.When tuned to the HPF:
the multiplexer 7 connects the inverse output of the delay element 5 with the input of the multiplier 8, the output of which is connected to the input of the adder 6 (the coefficient β is equal to 1);
the multiplexer 10 connects the direct output of the delay element 9 with the input of the
the input of the adder 6 from the decoder 12 receives the potential of the logical unit, and the input of the transfer of the
При выборе ПФ:
мультиплексор 7 запирается и выдает нули по всем разрядам на вход множимого блока 8 умножения;
мультиплексор 10 соединяет инверсный вход элемента 9 задержка с вторым входом сумматора 11;
на вход переноса сумматора 6 из дешифратора 12 поступает потенциал логического нуля, на вход переноса сумматора 11 поступает потенциал логической единицы.When choosing a PF:
the multiplexer 7 is locked and provides zeros in all digits to the input of the multiplicable multiplication block 8;
a multiplexer 10 connects the inverse input of the delay element 9 to the second input of the
the input of the adder 6 from the decoder 12 receives the potential of a logical zero, the input of the transfer of the
При настройке на режекторный фильтр:
мультиплексор 7 соединяет прямой выход элемента 9 задержки с входом множимого умножителя 8, выход которого подсоединен к второму входу сумматора 6;
мультиплексор 10 соединяет прямой выход регистра (элемента) 9 задержки с вторым входом сумматора 11;
на входы переноса сумматоров 6 и 11 из дешифратора 12 подается потенциал логического нуля.When tuning to a notch filter:
the multiplexer 7 connects the direct output of the delay element 9 with the input of the multiplier 8, the output of which is connected to the second input of the adder 6;
the multiplexer 10 connects the direct output of the register (element) 9 delay with the second input of the
at the inputs of the transfer of the
В любом из рассмотренных вариантов настройка ЦФ завершается не более чем через 0,1-0,15 мкс после записи вектора состояния в регистр 13. In any of the considered options, the DF adjustment is completed no more than 0.1-0.15 μs after the state vector is written to register 13.
Текущее значение переменной yi на выходе фильтра вычисляется циклически с частотой выборки входной переменной xi. Эта частота зависит от быстродействия внешнего источника информации. Последний по мере готовности нового значения xi на входе регистра 1 посылает импульс "Пуск" на вход блока 24 управления (фиг. 5а) и с этого момента начинается цикл работы фильтра. В блоке 24 управления (фиг. 1 и 3) в триггер 31 переходит в состояние "1" (фиг. 5б) и остается в нем в течение двух тактов генератора 33 (фиг. 5в). Импульс "Пуск" используется и как команда пересылки числа из элемента 5 задержки в элемент 9 задержки через мультиплексор 7 и множительное устройство 8.The current value of the variable y i at the output of the filter is calculated cyclically with the sampling frequency of the input variable x i . This frequency depends on the speed of the external information source. The latter, as soon as the new value x i is ready at the input of the register 1, sends a Start pulse to the input of the control unit 24 (Fig. 5a), and from this moment the filter cycle begins. In the control unit 24 (Figs. 1 and 3), the
В результате в элемент 9 задержки записывается значение γ · vi-2. Дешифратор 35 по первому тактовому импульсу формирует импульс передачи содержимого регистра 1 в элемент 5 задержки (фиг. 5г), благодаря чему запоминаются новые значения ρ · vi-1 В первой половине второго такта дешифратор 35 формирует импульс записи очередного значения в регистр 1 (фиг. 5е). Эти же импульсом производится сброс регистров-аккумуляторов 27 в блоках 2, 8, 19 и 20 умножения, а также запись модулей весовых коэффициентов A, B, C, β в преобразователи 14, 15, 17 и 18.As a result, the value γ · v i-2 is recorded in the delay element 9. The
Нужно заметить, что значение коэффициента AI α ( A 1 ) α · A α вычисляется предварительно в блоке 16 вычисления значения коэффициента передаточной функции. Если коэффициент α и произведение α · A имеют положительное либо отрицательное значение, то вектор α и значение вектора произведения α · A проходят на вход комбинационного сумматора 40 без изменения, при этом на управляющие входы 1 и 2 схемы (фиг. 4) подается потенциал логического нуля. Напротив, если коэффициент α и произведение α · A имеют различные знаки, то вычисление выражения AI α · A α производится в дополнительном коде, при этом на управляющий вход 1 либо 2, т.е. слагаемого, имеющего отрицательное значение ( α · A или α ), подается потенциал логической "1", а слагаемого, имеющего положительное значение, логический нуль. Нужно учитывать, что для устранения переполнений расчетные значения коэффициентов α и А необходимо уменьшить вдвое.It should be noted that the value of the coefficient A I α (A 1) α · A α is preliminarily calculated in block 16 for calculating the value of the coefficient of the transfer function. If the coefficient α and the product α · A have a positive or negative value, then the vector α and the value of the product vector α · A pass to the input of the
Во втором такте дешифратор 35 переводит триггер 32 в состояние "1" (фиг. 5ж), а триггер 31 возвращается в нулевое состояние импульсом переполнения счетчика 29. In the second cycle, the
Триггер 32 разрешает работу счетчика 30, с помощью которого формируется серия управляющих импульсов для преобразователей 14, 15, 17 и 18 и блоков 2, 8, 19 и 20 умножения. Серия заканчивается в начале N+2 такта работы счетчика 30, когда дешифратор 34 фиксирует такт с указанным номером и возвращает триггер 32 в нулевое состояние (фиг. 5ж, з). В рассматриваемом примере блок синхронизации 24 выполнен для десятиразрядных коэффициентов A, B, C, β. Поэтому серия управляющих импульсов включает в себя девять импульсов сдвига для преобразователей 14, 15, 17 и 18 (фиг. 5и), из которых модули коэффициентов A, B, C, β выходят младшими разрядами вперед (фиг. 5к), девять импульсов записи чисел из сумматоров 25 в регистры-аккумуляторы 27 (фиг. 5л), восемь импульсов записи содержимого первого разряда регистра-аккумулятора 27 в триггер 28 (фиг. 5м), импульс округления результата в сумматоре 3 (фиг. 5н). The
Так как сумматоры 3, 6, 11 и 23 комбинационного типа, то сразу после выполнения масштабирования входной переменной с помощью блока 2 умножения на входе сумматора 3 появляется число xi=vi, на выходе сумматора 6 vi+ β · vi-1, на выходе сумматора 11 число yi vi + β · vi-1 + γ · vi-2 В соответствии с выбранной передаточной функцией на выходе сумматора 11 получится значение выходного сигнала yi.Since the
Операции умножения на коэффициенты A, B, C и β выполняются синхронно четырьмя блоками умножения следующим образом. Двоичная цифра последовательного кода множителя A, B, C и β управляет состоянием мультиплексора 26 в блоках 2, 8, 19 и 20 умножения. Если цифра множителя aj=0 (bj=0), где j=0, 1, 2, 8, то на выходе регистра-аккумулятора 27 будет число "0", а если aj=1 (bj=1), то число vi-1 (в блоках 8 и 19), vi-2 (в блоке 20) или xi (в блоке 2). На выходе сумматора 25 в блоке 19 умножения в j-ом такте образуется сумма
Zij vi-2 · Aj + 0,5 · Z i,j-1 + qi-1 где Zi,j-1 число в регистре-аккумуляторе 27 к началу j-го такта;
qi-1 цифра в триггере 28 к началу j-ого такта.The operations of multiplication by the coefficients A, B, C and β are performed synchronously by four blocks of multiplication as follows. The binary digit of the serial code of the multiplier A, B, C and β controls the state of the
Z ij v i-2 · A j + 0.5 · Z i, j-1 + q i-1 where Z i, j-1 is the number in the
q i-1 digit in trigger 28 to the beginning of the j-th clock.
Умножение на коэффициент 0,5 в указанных уравнениях обеспечивается за счет косых связей между выходом регистра-аккумулятора 27 и вторым входом сумматора 25, т. е. за счет смещения содержимого регистра 27 на один разряд вправо. При таком сдвиге отбрасываемая цифра первого разряда запоминается в триггере 28 и учитывается в следующем такте как цифра переноса в сумматоре 25. В середине каждого такта умножения число выхода сумматора 25 записывается в регистр-аккумулятор 27. К концу девятого такта умножения в блоке 19 умножения формируется число / AI / · vi-1, в блоке 20 умножения B · vi-2, в блоке 8 умножения β · vi-1 а в блоке 2 умножения C · xi Если коэффициенты A и β принимают отрицательное значение, то произведение инвертируется по всем разрядам, а к содержимому младшего разряда прибавляется единица. В результате число остается в дополнительном коде, но его знак меняется на противоположный. Если знак коэффициентов положительный, то произведение передается через инвертор 21 и 22 знака без изменения. В случае работы блока 2 умножения блок инвертирования отсутствует, так как коэффициент С всегда положительный. Из условия устойчивости рекурсивного цифрового фильтра 2-го порядка модуль коэффициента A выбирается в пределах от 0 до 2, коэффициент B от 0 до 1. Так как число A может быть больше единицы, то все множители приходится уменьшать вдвое. Поэтому сумма произведений передается с выхода регистра-аккумулятора 27 на инверторы 21 и 22 знака со сдвигом на один разряд. Кроме того, при передаче результата из блока 2 умножения и из сумматора 23 соответственно на первый и второй вход сумматора 3 производится сдвиг слагаемых на один разряд влево, т.е. тем самым восстанавливают истинные значения произведений на выходе блоков умножения. При передаче результата с блока 8 умножения сдвиг результата не производится, однако рассчитанное значение коэффициента β уменьшается при подготовке работы устройства в два раза. Во второй половине последнего такта работы блока 24 синхронизации число на выходе сумматора 3 округляется путем записи содержимого первого разряда этого сумматора в D-триггер 4 (фиг. 4н) с последующим добавлением этой цифры к содержимому младшего разряда по входу переноса. После округления число с выходов 2 N+1 подается на вход сумматора 6, выход которого соединен с входом комбинационного сумматора 11, т.е. после сложений получаем результирующее значение yi выходного сигнала фильтра. При этом управляющий импульс возвращает триггер 32 блока управления в нулевое состояние и тем самым переводит цифровой фильтр в ждущий режим. Результирующее значение yi на выходе сумматора 11 получается в дополнительном коде.Multiplication by a coefficient of 0.5 in these equations is provided due to the oblique relations between the output of the register-
Цикл работы фильтра от момента прихода импульса "ПУСК" до получения результирующего значения yi на выходе сумматора 11 включает в себя 1,5 такта формирования нерекурсивной части системы уравнений (2) (5), М-тактов умножения, 0,5 такта округления результата. Следовательно, длительность цикла составляет
tц ( 2 + М ) · Т (8) где Т период повторения импульсов тактового генератора 33;
М количество разрядов модуля множителя.The filter operation cycle from the moment the “START” pulse arrives until the resulting value of y i is obtained at the output of the
t c (2 + M) · T (8) where T is the pulse repetition period of the
M is the number of bits of the multiplier module.
В макете цифрового фильтра, выполненного согласно изобретению на микросхемах серии 1564 (при М=9) и тактовой частоте 5 МГц (Т=0,2 мкс) на выполнение очередного значения yi затрачивается время tц ( 2 + 9 ) · 0,2 ≈ 2,2 мкс.In the layout of a digital filter made according to the invention on 1564 series microcircuits (at M = 9) and a clock frequency of 5 MHz (T = 0.2 μs), it takes time t c (2 + 9) · 0.2 to execute the next value of y i ≈ 2.2 μs.
С переходном на элементную основу в виде БИС на базовых матричных кристаллах Н1537ХМ1 тактовая частота работы устройства равна 10 МГц, что позволяет сократить время цикла фильтрации до 1,1 мкс. With the transition to an elemental base in the form of LSI on the base matrix crystals N1537XM1, the device’s clock frequency is 10 MHz, which allows to reduce the filtration cycle time to 1.1 μs.
По сравнению с прототипом предложенный фильтр обладает более широкими функциональными возможностями, так как реализует фильтры с передаточными функциями четырех видов (в прототипе реализуются устройствах 3-х типов); обеспечивает независимую регулировку характеристик фильтрации (устройство-прототип взаимонезависимую), а также не уступает прототипу в быстродействии. Compared with the prototype, the proposed filter has wider functional capabilities, as it implements filters with transfer functions of four types (3 types of devices are implemented in the prototype); provides independent adjustment of filtering characteristics (prototype device is non-independent), and also is not inferior to the prototype in speed.
Claims (1)
Priority Applications (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
RU92008142A RU2057364C1 (en) | 1992-11-25 | 1992-11-25 | Programming digital filter |
Applications Claiming Priority (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
RU92008142A RU2057364C1 (en) | 1992-11-25 | 1992-11-25 | Programming digital filter |
Publications (2)
Publication Number | Publication Date |
---|---|
RU92008142A RU92008142A (en) | 1995-09-20 |
RU2057364C1 true RU2057364C1 (en) | 1996-03-27 |
Family
ID=20132561
Family Applications (1)
Application Number | Title | Priority Date | Filing Date |
---|---|---|---|
RU92008142A RU2057364C1 (en) | 1992-11-25 | 1992-11-25 | Programming digital filter |
Country Status (1)
Country | Link |
---|---|
RU (1) | RU2057364C1 (en) |
Cited By (1)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
RU2631976C2 (en) * | 2016-03-15 | 2017-09-29 | Федеральное государственное бюджетное образовательное учреждение высшего образования Московский авиационный институт (национальный исследовательский университет) (МАИ) | Tunable digital filter with programmable structure |
-
1992
- 1992-11-25 RU RU92008142A patent/RU2057364C1/en active
Non-Patent Citations (1)
Title |
---|
Авторское свидетельство СССР N 1374244, кл. G 06F 15/353, 1988. Авторское свидетельство СССР N 1592855, кл. G 06F 15/332, 1990. * |
Cited By (1)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
RU2631976C2 (en) * | 2016-03-15 | 2017-09-29 | Федеральное государственное бюджетное образовательное учреждение высшего образования Московский авиационный институт (национальный исследовательский университет) (МАИ) | Tunable digital filter with programmable structure |
Similar Documents
Publication | Publication Date | Title |
---|---|---|
JPS62286307A (en) | Apparatus and method for multiplication and addition of multiple stage digital signal | |
US4135249A (en) | Signed double precision multiplication logic | |
US5191547A (en) | Decimating digital finite impulse response filter | |
EP1105967A1 (en) | Multiplierless digital filtering | |
RU2057364C1 (en) | Programming digital filter | |
US4192008A (en) | Wave digital filter with multiplexed arithmetic hardware | |
RU2097828C1 (en) | Programmable digital filter | |
RU2006936C1 (en) | Programmable digital filter | |
SU1374244A1 (en) | Programmed digital filter | |
JPH06314186A (en) | Adder chain and method for addition calculation | |
SU1756887A1 (en) | Device for integer division in modulo notation | |
SU1120321A1 (en) | Device for extracting 7-th root of number | |
KR100247957B1 (en) | Iir filter using serial-parallel multiplier | |
SU1171784A1 (en) | Multiplier | |
SU942247A1 (en) | Digital non-recursive filter | |
SU789995A1 (en) | Digital filter | |
EP0213854A2 (en) | Fixed-Coefficient serial multiplication and digital circuits therefor | |
SU732946A1 (en) | Stochastic converter | |
SU1124293A1 (en) | Random process generator | |
SU1264168A1 (en) | Pseudorandom sequence generator | |
SU1072042A1 (en) | Device for extracting cube root | |
SU480081A1 (en) | Digital probability filter | |
SU748880A1 (en) | Pulse recurrence rate divider with variable division factor | |
SU961103A1 (en) | Apparatus for computing digital filter coefficients | |
SU1728858A1 (en) | Device for multiplying members of finite field gf(2@@@) at m@@@3 |