JPS6313506A - Sinusoidal wave generating method - Google Patents

Sinusoidal wave generating method

Info

Publication number
JPS6313506A
JPS6313506A JP15630486A JP15630486A JPS6313506A JP S6313506 A JPS6313506 A JP S6313506A JP 15630486 A JP15630486 A JP 15630486A JP 15630486 A JP15630486 A JP 15630486A JP S6313506 A JPS6313506 A JP S6313506A
Authority
JP
Japan
Prior art keywords
cos
sin
sinusoidal wave
adder
multiplier
Prior art date
Legal status (The legal status 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 status listed.)
Pending
Application number
JP15630486A
Other languages
Japanese (ja)
Inventor
Fumihiko Matsumura
文彦 松村
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Panasonic Holdings Corp
Original Assignee
Matsushita Electric Industrial Co Ltd
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 Matsushita Electric Industrial Co Ltd filed Critical Matsushita Electric Industrial Co Ltd
Priority to JP15630486A priority Critical patent/JPS6313506A/en
Publication of JPS6313506A publication Critical patent/JPS6313506A/en
Pending legal-status Critical Current

Links

Abstract

PURPOSE:To obtain a sinusoidal wave with an excellent weveform by setting a step width decided by a frequency of a sinusoidal wave and using a multiplier, an adder or a subtractor so as to calculate the next sample of the sinusoidal wave sequentially thereby decreasing the memory capacity. CONSTITUTION:A multiplier MUL and an adder(subtractor) ALU are provided and four memories are used for the sequential calculation. That is. when four values {sin(n-1), cos(n-1)} and steps {sind(1), cos(1)} are given in the memories. {sin(n), cos(n)} are calculated by using the multiplier and the adder (subtractor) to calculate recurrence formulae sin(n)=sin(n-1)cos(1)+cos(n-1)sind(1), and cos(n):cos(n-1)cos(1)-sin(n-1)sin(1). A wave approaching infinitely an ideal sinusoidal wave theoretically is generated by continuing the calculation above.

Description

【発明の詳細な説明】 (産業上の利用分野) 本発明は、ディジタル信号処理において、正弦波のテー
ブルを用いる変(復)調器に関するものである。
DETAILED DESCRIPTION OF THE INVENTION (Field of Industrial Application) The present invention relates to a modulator (demodulator) that uses a sine wave table in digital signal processing.

(従来の技術) 従来、ディジタル信号処理において、ある周波数の正弦
波が必要な時には、sin関数、cos関数の全てのサ
ンプル点での値(サンプル値)を用いた。
(Prior Art) Conventionally, in digital signal processing, when a sine wave of a certain frequency is required, values (sample values) at all sample points of a sine function or a cosine function are used.

第3図(u)、(b)は、従来のsin関数のサンプル
列と、メモリーヒのサンプル値のテーブルを示す。初期
値は(0)としている。
FIGS. 3(u) and 3(b) show a table of a sample string of a conventional sine function and a memory sample value. The initial value is (0).

第4図(a) 、 (b)は、同様にCoa1関数のサ
ンプル列と、メモリ」二の1」ンブル値のテーブルを示
す。
Similarly, FIGS. 4(a) and 4(b) show a table of sample strings of the Coa1 function and memory "2/1" combination values.

次に、従来例の動作に−)いて説明する。Next, the operation of the conventional example will be explained.

例えば、sin関数を用いる時に、メモリ」二のアドレ
ス値(以下MAとする)を、初期に0にしておき、各サ
ンプル間隔での処理が終る毎に、MAに1を足していき
、次の処理でM A−1=のサンプル値をロードしてく
る。cos関数についても同様である。
For example, when using the sine function, the address value of memory "2" (hereinafter referred to as MA) is initially set to 0, and each time processing at each sample interval is completed, 1 is added to MA, and the next The sample value of MA-1= is loaded in the process. The same applies to the cos function.

この様に、」二記従来例でも、sin関数、CO8関数
の全てのサンプル値を、メモリ上に記憶させておけば、
正弦波のテーブルを、そのまま使うことができる。
In this way, even in the conventional example described in Section 2, if all sample values of the sine function and CO8 function are stored in memory,
You can use the sine wave table as is.

(発明が解決しようとする問題点) しかしながら、(〕記従来の正11+二波発生方法では
大きなメモリ容置が必要である。
(Problems to be Solved by the Invention) However, the conventional positive 11+2 wave generation method described in () requires a large memory capacity.

例えば、s]「1関数のテーブルについては、サンプリ
ング周波数 fs 正弦波の周波数   F とすると、 Ofs  =  mF  (<1.mは最小の自然数)
・・・■を満たすようなm個のサンプルのテーブルが必
要となる。
For example, for a table of one function, if the sampling frequency is fs and the frequency of the sine wave is F, then Ofs = mF (<1.m is the smallest natural number)
...A table of m samples that satisfies ■ is required.

例えば、fs=16KHz、F=4010Hzの場合に
は、1600サンプルのテーブルが必要である。
For example, if fs=16KHz and F=4010Hz, a table of 1600 samples is required.

COS関数についても同様である。The same applies to the COS function.

この様に、従来の方法は、大きなメモリ容量が必要であ
るという問題があった。
As described above, the conventional method has the problem of requiring a large memory capacity.

本発明は、このような従来の問題を解決するものであり
、メモリ容量を少くできる優れた正弦波発生方法を提供
するものである。
The present invention solves these conventional problems and provides an excellent sine wave generation method that can reduce memory capacity.

(問題点を解決するための手段) 本発明は、上記目的を達成するために、乗算器と加(減
)算器を設け、4個のメモリを用いて逐次計算すること
により、正弦波のテーブルを発生するようにしたもので
ある。
(Means for Solving the Problems) In order to achieve the above object, the present invention provides a multiplier and an adder (subtractor) and performs sequential calculations using four memories, thereby generating a sine wave. It is designed to generate a table.

第1図は本発明における逐次計算法の構成図であり、4
個のメモリ、乗算器、及び、加(減)算器による逐次計
算のノU−に−〕いて示す。
FIG. 1 is a block diagram of the sequential calculation method according to the present invention.
The sequential calculations using the memory, the multiplier, and the adder (subtractor) are shown below.

(作用) 本発明は、第1図の様な構成により、次の様な作用を有
する。
(Function) The present invention has the following function by virtue of the configuration shown in FIG.

第1図において、n = a + 1の場合、ここで、
である。
In FIG. 1, when n = a + 1, here,
It is.

テーブルの出発点の値(sjn(lI)、cos(a)
)と刻み幅(sin(1)、cos(]))をメモリー
にに記憶させておく。
The starting point value of the table (sjn(lI), cos(a)
) and step size (sin(1), cos(])) are stored in memory.

次のサンプル値(sin(a+1)、cos(a+1)
)は、乗算器、加(減)算器を用いて、次式で泪算され
る。
Next sample value (sin(a+1), cos(a+1)
) is calculated using the following formula using a multiplier and an adder (subtractor).

5in(a + ]) = 5in(a)cos(1)
+cos(a)sin(1)−■cos(a+ 1) 
=cos(a)cos(1)−sin(a)sjn(1
)−■ここで計算された(sin(++ +1)、eo
s(a +1))を、メモリ」二にス1〜アしておく。
5in(a + ]) = 5in(a)cos(1)
+cos(a)sin(1)−■cos(a+1)
=cos(a)cos(1)-sin(a)sjn(1
) − ■ Calculated here (sin (++ +1), eo
s(a+1)) are stored in memory.

次に、同様にして(sin(])、co8(1))と(
sin(a+1)、cos(a + ]))とから、(
sjn(a+2)、cos(a+2))が計算できる。
Next, in the same way, (sin(]), co8(1)) and (
sin(a+1), cos(a + ])), then (
sjn(a+2), cos(a+2)) can be calculated.

一3= すなわち、(sun(n−1)、cos(n−1))と
、刻み幅(si、n(1)、cos(1))の4個の値
がメモリ上にあれば、乗算器、加(減)算器を用いて、
次の漸化式を計算することにより、 5in(n) =sin(n−1)cos(1) +c
os(n−1)sin(1)・・・■cos(n) =
cos(n−1)cos(1)−sin(n−1)si
n(1)・・・■(sin(n)、cos(n))を計
算することができる。この計算を続けることにより、論
理上無限に正弦波を発生することができる。
-3 = In other words, if the four values of (sun (n-1), cos (n-1)) and step size (si, n (1), cos (1)) are in memory, multiplication Using a container, an addition (subtraction) machine,
By calculating the following recurrence formula, 5in(n) = sin(n-1)cos(1) +c
os(n-1) sin(1)...■ cos(n) =
cos(n-1)cos(1)-sin(n-1)si
n(1)...■(sin(n), cos(n)) can be calculated. By continuing this calculation, it is possible to theoretically generate an infinite number of sine waves.

(実施例) 第2図は、本発明の一実施例におけるフローチャートで
ある。第1図と同様のフローであるが、初期値a = 
Oとしである。
(Example) FIG. 2 is a flowchart in an example of the present invention. The flow is similar to that in Figure 1, but the initial value a =
It is O.

ここで、第2図の動作について説明する。Here, the operation shown in FIG. 2 will be explained.

初期に希望する正弦波の周波数を設定するために、刻み
幅(A、B)をメモリ上にストアする。
To initially set the desired frequency of the sine wave, the step size (A, B) is stored in memory.

出発点の(sin(0)、cos(0))の値は、代入
しなければならない。
The values of (sin(0), cos(0)) at the starting point must be substituted.

上記作用に示す通り、(sun(n−1)、cos(n
−1))と(A、r’l)から(sin(n)、cos
(n))が計算できる。
As shown in the above action, (sun(n-1), cos(n
-1)) and (A, r'l) to (sin(n), cos
(n)) can be calculated.

nがテーブルの数rnと一致したら、戻ってまた、(s
un(0) 、cos((1)) J:り始める。
When n matches the number of tables rn, go back and write (s
un(0), cos((1)) J: Start.

この様に、上記実施例によれば、通常、4個のメモリ上
の値と初期値(sin(0) 、cos(0))とから
、逐次(sin(n)、cos(n))のテーブルの値
を計算テキる。
In this way, according to the above embodiment, normally, from the four values in memory and the initial values (sin(0), cos(0)), Calculate table values.

(発明の効果) 本発明は、」1記実施例より明らかなように、以下に示
す効果を有する。
(Effects of the Invention) The present invention has the following effects as is clear from Example 1.

(1)乗算器、加(減)算盤により、逐次、テーブルの
値を計算しているので、メモリの容量を極端に小さくで
きる。
(1) Since table values are calculated sequentially using a multiplier and an addition (subtraction) board, the memory capacity can be extremely reduced.

(2)正弦波の周波数を変えろ時には、刻み幅(A、B
)の値を変えることにより、簡単に行える。
(2) When changing the frequency of the sine wave, the step size (A, B
) can be easily done by changing the value of

(3)初期値(sf(,1)、cos(II))の値を
変えることにより、どの位相からでも正リム波を発生で
きる。
(3) By changing the initial values (sf(,1), cos(II)), a positive limb wave can be generated from any phase.

【図面の簡単な説明】[Brief explanation of the drawing]

第1図は本発明における逐次計算法の構成図、第2図は
本発明の一実施例におけるフローチャート、 第3図は従来の例のsun関数のサンプル列と、メモリ
上のサンプル値のテーブルを示す図、第4図は従来の例
のcos関数のサンプル列と、メモリLのサンプル値の
テーブルを示す図である。 特許出願人 松下電器産業株式会社 第3図 (o)                 (b)第4
Fig. 1 is a block diagram of the sequential calculation method in the present invention, Fig. 2 is a flowchart in an embodiment of the present invention, and Fig. 3 is a sample sequence of the sun function in the conventional example and a table of sample values in memory. FIG. 4 is a diagram showing a sample string of a cos function and a table of sample values in memory L in a conventional example. Patent applicant Matsushita Electric Industrial Co., Ltd. Figure 3 (o) (b) 4
figure

Claims (1)

【特許請求の範囲】[Claims] 乗算器と、加算器または減算器と、メモリを設け、初期
に、正弦波の周波数によって決まる刻み幅を設定し、初
期値を代入することによって、これらの値から、乗算器
、加算器または減算器を用いて、逐次、正弦波の次のサ
ンプル値を計算するようにしたことを特徴とする正弦波
発生方法。
By providing a multiplier, an adder or subtractor, and a memory, initially setting the step size determined by the frequency of the sine wave, and substituting the initial value, the multiplier, adder, or subtraction is performed from these values. A sine wave generation method characterized in that the next sample value of a sine wave is calculated sequentially using a sine wave generator.
JP15630486A 1986-07-04 1986-07-04 Sinusoidal wave generating method Pending JPS6313506A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
JP15630486A JPS6313506A (en) 1986-07-04 1986-07-04 Sinusoidal wave generating method

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
JP15630486A JPS6313506A (en) 1986-07-04 1986-07-04 Sinusoidal wave generating method

Publications (1)

Publication Number Publication Date
JPS6313506A true JPS6313506A (en) 1988-01-20

Family

ID=15624881

Family Applications (1)

Application Number Title Priority Date Filing Date
JP15630486A Pending JPS6313506A (en) 1986-07-04 1986-07-04 Sinusoidal wave generating method

Country Status (1)

Country Link
JP (1) JPS6313506A (en)

Cited By (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JPH01268999A (en) * 1989-03-11 1989-10-26 Okumura Corp Manufacture of spray concrete

Cited By (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JPH01268999A (en) * 1989-03-11 1989-10-26 Okumura Corp Manufacture of spray concrete

Similar Documents

Publication Publication Date Title
US4342245A (en) Complex waveform generator for musical instrument
US4285044A (en) Digital generator for producing a sinewave
JPH0631990B2 (en) Waveform interpolator
CN108123684A (en) A kind of Digital Down Convert processing method and equipment
US4577287A (en) Method and apparatus for generating digital signals representing periodic samples of a sine wave
US4737729A (en) Method and circuit for the demodulation of time discrete, frequency modulated signals
US4860238A (en) Digital sine generator
US6642796B2 (en) Digital phase-quadrature oscillator
JPS6313506A (en) Sinusoidal wave generating method
US4021654A (en) Digital filter
AU637262B2 (en) Rate conversion apparatus
US11689191B2 (en) High frequency resolution digital sinusoid generator
JPH01103312A (en) Code correlation structure
JPH0473351B2 (en)
CN114710139B (en) Harmonic extraction and synthesizer of APF control system
JPS5447688A (en) Digital circuit
JPS5915536B2 (en) digital phase locked loop
JPS63185105A (en) Generating circuit for high frequency optional signal
JP2550597B2 (en) Squarer
JPS6023359B2 (en) electronic musical instruments
JPH06195207A (en) Digital sine wave generation circuit
Ben-Tzvi et al. Analogue implementation of Hough transform
JPS6434004A (en) Digital frequency generator
JPH0439243B2 (en)
Steber Audio frequency DSP laboratory on a chip-TMS32010