reference will now be made in detail to embodiments of the present invention , examples of which are illustrated in the accompanying drawings , wherein like reference numerals refer to the like elements throughout . the embodiments are described below in order to explain the present invention by referring to the figures . fig1 is a functional block diagram of an audio coding apparatus according to an embodiment of the present invention . referring to fig1 , the audio coding apparatus includes a pitch analyzer 110 , a signal classifier 120 , a bit allocator 130 , a first harmonic coding module 140 , a first detector 150 , a second harmonic coding module 160 , a second detector 170 , and a code excited linear prediction ( celp ) module 180 . the pitch analyzer 110 analyzes the pitch of an input audio signal and detects a pitch lag t p . the pitch lag t p is obtained using a normalized auto - correlation function shown in equation 1 r ⁡ ( i ) = ∑ n = 0 l i - 1 ⁢ s ⁡ ( n ) ⁢ s ⁡ ( n - i ) ∑ n = 0 l i - 1 ⁢ s 2 ⁡ ( n - i ) , i = l min , … ⁢ , l max , ( 1 ) where s ( n ) is the input audio signal , l f is the length of a portion of the audio signal s ( n ) to be analyzed , and l min and l max are the maximum and minimum of the pitch , respectively . in general , l min and l max are 20 and 143 , respectively . maximum values of r ( i ) are found for l min ≮ ≮ min + 19 , l min + 20 ≮ ≮ min + 39 , l min + 40 ≮ ≮ max , respectively . if the respective values of i as t 3 , t 2 , and t 1 , one value is selected from t 3 , t 2 , and t 1 as a pitch lag t p based on equation 2 . t p = t 1 r ( t p ) = r ( t 1 ) if r ( t 2 ) = 0 . 85 r ( t p ) r ( t p ) = r ( t 2 ) t p = t 2 end if r ( t 3 ) = 0 . 85r ( t p ) r ( t p ) = r ( t 3 ) t p = t 3 end ( 2 ) the pitch lag t p detected by the pitch analyzer 110 is provided to the first harmonic coding module 140 . the signal classifier 120 determines whether harmonics are included in the input audio signal . that is , the signal classifier 120 detects values of the input signal such as a sharpness rate , a right and left energy rate , a zero - crossing rate , and a first - order prediction coefficient , compares a threshold value for each detected value with the detected values , and if the comparison result satisfies a predetermined condition , the signal classifier 120 can determine that the harmonics are included in the input audio signal . the comparison can be performed in subframe units . the determination result of the signal classifier 120 is provided to the bit allocator 130 . the bit allocator 130 provides allocation bit information for the first harmonic coding module 140 , the second harmonic coding module 150 , and the celp module 180 according to the determined result provided by the signal classifier 120 . if a signal indicating that the harmonics are included in the input audio signal is provided by the signal classifier 120 , the bit allocator 130 can provide information indicating that bits are allocated at a ratio of 3 : 3 : 2 , for example , to the first harmonic coding module 140 , the second harmonic coding module 150 , and the celp module 180 . if a signal indicating that the harmonics are not included in the input audio signal is provided by the signal classifier 120 , the bit allocator 130 can provide information indicating that bits are allocated at a ratio of 2 : 2 : 4 , for example , to the first harmonic coding module 140 , the second harmonic coding module 150 , and the celp module 180 . the bit allocation information can be set in advance . the first harmonic coding module 140 performs harmonic coding on the input audio signal using the pitch lag and outputs a linear prediction coding ( lpc ) coefficient quantized for audio decoding , a quantized lpc ( qlpc ) coefficient index , and a quantized phase index . to this end , the first harmonic coding module 140 includes a first harmonic analyzer 201 , an amplitude / lpc coefficient converter 202 , an lpc coefficient quantizer 203 , a qlpc / amplitude converter 204 , a phase quantizer 205 , and a first harmonic synthesizer 206 , as shown in fig2 . the first harmonic analyzer 201 analyzes harmonics of the input audio signal using a pitch lag ( or a pitch delay ). that is , the first harmonic analyzer 201 searches for a fundamental frequency ω 0 using the pitch lag and searches for harmonic parameters using a sine dictionary . the harmonic parameters include an amplitude a and a phase φ . the amplitude a and the phase φ of the sine dictionary are found using a matching pursuit ( mp ) algorithm in which the input audio signal s ( n ) is used as a target signal . the input audio signal s h ( n ) can be expressed using the sine dictionary as shown in equation 3 s h ⁡ ( n ) = w ham ⁡ ( n ) ⁢ ∑ k = 0 k - 1 ⁢ a k ⁢ cos ⁢ ⁢ ( ω k ⁢ n + ϕ k ) , ( 3 ) where a k is the amplitude of a k - th sine wave , ω k is an angle frequency of the k - th sine wave , φ k is the phase of the k - th sine wave , w ham ( n ) is a hamming window , and k is the number of sine dictionaries , which is generally obtained using equation 4 . k = ⌊ t p 2 ⌋ ( 4 ) the angle frequency ω k of sine dictionaries can be obtained using equation 5 . ω k = 2 ⁢ ⁢ π t p ⁢ ( k + 1 ) ( 5 ) referring to fig1 and 2 , the search for the amplitude a and the phase φ of the sine dictionary using the mp algorithm is performed in such a way that an operation of projecting a k - th target signal on a k - th sine dictionary to extract the amplitude of a component and an operation of offsetting the extracted amplitude of the component with the k - th target signal to generate a new ( k + 1 )- th target signal are repeatedly performed . the amplitude and the phase of the sine dictionary using the mp algorithm can be found using equation 6 e k = ∑ n = 0 l sf - 1 ⁢ w ham ⁡ ( n ) ⁡ [ r h , k ⁡ ( n ) - a k ⁢ cos ⁢ ⁢ ( ω k ⁢ n + ϕ k ) ] 2 , ( 6 ) where r h , k is a k - th target signal and e k is a value obtained by multiplying a mean squared error between r h , k and a k - th sine dictionary by a hamming window wham . if k = 0 , r h , k ( n ) is the same as the original audio signal s ( n ). a k and φ k which minimize e k can be defined using equation 7 . a k = a k 2 + b k 2 , ϕ k = - tan - 1 ⁡ ( b k a k ) ⁢ ⁢ a k = ∑ n = 0 l sf - 1 ⁢ sin 2 ⁡ ( ω k ⁢ n ) ⁢ ∑ n ⁢ = ⁢ 0 ⁢ l ⁢ sf ⁢ - ⁢ 1 ⁢ r h , k ⁡ ( n ) ⁢ cos ⁢ ⁢ ( ω k ⁢ n ) - ∑ n = 0 l sf - 1 ⁢ cos ⁡ ( ω k ⁢ n ) ⁢ sin ⁡ ( ω k ⁢ n ) ⁢ ∑ n ⁢ = ⁢ 0 ⁢ l ⁢ sf ⁢ - ⁢ 1 ⁢ r h , k ⁡ ( n ) ⁢ sin ⁢ ⁢ ( ω k ⁢ n ) ∑ n = 0 l sf - 1 ⁢ cos 2 ⁡ ( ω k ⁢ n ) ⁢ ∑ n = 0 l sf - 1 ⁢ sin 2 ⁡ ( ω k ⁢ n ) - ∑ n = 0 l sf - 1 ⁢ cos ⁢ ⁢ ( ω k ⁢ n ) ⁢ ⁢ sin ⁢ ⁢ ( ω k ⁢ n ) ⁢ ∑ n = 0 l sf - 1 ⁢ cos ⁢ ⁢ ( ω k ⁢ n ) ⁢ sin ⁡ ( ω k ⁢ n ) , ⁢ b k = ∑ n = 0 l sf - 1 ⁢ cos 2 ⁡ ( ω k ⁢ n ) ⁢ ∑ n ⁢ = ⁢ 0 ⁢ l ⁢ sf ⁢ - ⁢ 1 ⁢ r h , k ⁡ ( n ) ⁢ sin ⁢ ⁢ ( ω k ⁢ n ) - ∑ n = 0 l sf - 1 ⁢ cos ⁡ ( ω k ⁢ n ) ⁢ sin ⁡ ( ω k ⁢ n ) ⁢ ∑ n ⁢ = ⁢ 0 ⁢ l ⁢ sf ⁢ - ⁢ 1 ⁢ r h , k ⁡ ( n ) ⁢ cos ⁢ ⁢ ( ω k ⁢ n ) ∑ n = 0 l sf - 1 ⁢ cos 2 ⁡ ( ω k ⁢ n ) ⁢ ∑ n = 0 l sf - 1 ⁢ sin 2 ⁡ ( ω k ⁢ n ) - ∑ n = 0 l sf - 1 ⁢ cos ⁢ ⁢ ( ω k ⁢ n ) ⁢ ⁢ sin ⁢ ⁢ ( ω k ⁢ n ) ⁢ ∑ n = 0 l sf - 1 ⁢ cos ⁢ ⁢ ( ω k ⁢ n ) ⁢ sin ⁡ ( ω k ⁢ n ) ( 7 ) the first harmonic analyzer 201 transmits the amplitude of the sine dictionary to the amplitude / lpc coefficient converter 202 and transmits the phase of the sine dictionary to the phase quantizer 205 . the amplitude / lpc coefficient converter 202 converts the amplitude a of the input sine dictionary into an lpc coefficient . the lpc coefficient analyzer 203 quantizes the lpc coefficient using the allocated bit information provided by the bit allocator 130 and outputs the quantized lpc ( qlpc ) coefficient and the quantized lpc coefficient index . the qlpc / amplitude converter 204 converts the quantized lpc coefficient into an amplitude vector â of the quantized sine dictionary and outputs the amplitude vector â . the phase quantizer 205 quantizes a phase output from the first harmonic analyzer 201 based on the allocated bit information provided by the bit allocator 130 and outputs a quantized phase vector { circumflex over ( φ )} and a quantized phase index . the first harmonic synthesizer 206 synthesizes the amplitude vector â of the quantized sine dictionary output from the qlpc / amplitude converter 204 and the quantized phase vector { circumflex over ( φ )} output from the phase quantizer 205 using equation 8 to obtain a synthesized audio signal { circumflex over ( s h )}( n ) with respect to the input audio signal . s ^ h ⁡ ( n ) = w ham ⁢ ∑ k = 0 k ⁢ a ^ k ⁢ cos ⁢ ⁢ ( ω k ⁢ n + ϕ ^ k ) ( 8 ) the first harmonic synthesizer 206 transmits the synthesized audio signal { circumflex over ( s h )}( n ) to the first detector 150 . the first detector 150 detects and outputs a first difference audio signal obtained from the first difference between the input audio signal and the synthesized audio signal output from the first harmonic coding module 140 . the second harmonic coding module 160 harmonically codes the first difference audio signal detected by the first detector 150 using the quantized lpc coefficient obtained by the first harmonic coding module 140 and a previous output signal of the second harmonic coding module 160 , outputs a first synthesized difference audio signal , a harmonic index quantized for audio signal decoding and a first quantized gain index . to this end , referring to fig3 , the second harmonic coding module 160 includes an lpc coefficient analyzer 301 , an inverse synthesis filter 302 , a second harmonic analyzer 303 , an index quantizer 304 , a second harmonic synthesizer 305 , and a synthesis filter 306 . the lpc coefficient analyzer 301 analyzes an lpc coefficient on the first difference audio signal output from the first detector 150 using the quantized lpc coefficient provided by the first harmonic coding module 140 and extracts an lpc coefficient needed by the second harmonic coding module 160 . the lpc coefficient analyzer 301 can be configured to extract a reduced lpc coefficient when the order of the quantized lpc coefficient provided by the first harmonic coding module 140 must be reduced according to the operation conditions of a corresponding audio coding apparatus . an lpc coefficient can be reduced by obtaining only necessary lpc coefficients in a head part among transmitted lpc coefficients . in this case , the number of lpc coefficients should be even . for example , when the order of the quantized lpc coefficient is p and the order of an lpc coefficient to be intended to be used in the second harmonic coding module 160 is q , the number of q lpc coefficients existed in the head part are extracted from all p lpc coefficients . the extracted lpc coefficients are provided to the inverse synthesis filter 302 and the synthesis filter 306 , respectively . the inverse synthesis filter 302 performs the inverse operation of the operation performed by a synthesis filter on the first difference audio signal detected by the first detector 150 to generate an excitation signal of the first difference audio signal and transmits the generated excitation signal to the second harmonic analyzer 303 . referring to fig1 - 3 , the second harmonic analyzer 303 has the same structure as the first harmonic analyzer 201 of fig2 , searches for an amplitude a and a phase φ of the sine dictionary with respect to the excitation signal output from the inverse synthesis filter 302 and outputs a harmonic index including the amplitude a and the phase φ of the sine dictionary . the output harmonic index is transmitted to the index quantizer 304 . the index quantizer 304 quantizes the harmonic index output from the second harmonic analyzer 303 using the allocated bit information provided by the bit allocator 130 and outputs the quantized harmonic index and the quantized gain index . the second harmonic synthesizer 305 has the same structure as the first harmonic synthesizer 206 of fig2 , synthesizes the quantized harmonic index output from the index quantizer 304 , and outputs the synthesized audio signal . the synthesis filter 306 outputs the first synthesized difference audio signal by synthesis filtering the synthesized audio signal output from the second harmonic synthesizer 305 using the quantized lpc coefficient output from the lpc coefficient analyzer 301 . the first synthesized difference audio signal is output to the second detector 170 . the second detector 170 detects a difference audio signal obtained from the difference between the first difference audio signal output from the first detector 150 and the first synthesized difference audio signal output from the second harmonic coding module 160 and outputs the detected difference audio signal as a second difference audio signal . the celp module 180 celp - codes the second difference audio signal output from the second detector 170 using the quantized lpc coefficient obtained by the first harmonic coding module 140 and outputs a stochastic index quantized and a second quantized gain index in order to decode an audio signal . to this end , the celp module 180 includes a third detector 401 , a perceptual weighting filter 402 , a stochastic codebook search unit 403 , an index quantizer 404 , a stochastic codebook 405 , a multiplier 406 , an lpc coefficient analyzer 407 , and a synthesis filter 408 , as shown in fig4 . the third detector 401 detects a difference audio signal obtained from a difference between the second difference audio signal output from the second detector 170 and a synthesized audio signal previously obtained by the celp module 180 . the perceptual weighting filter 402 perceptual - weighting - filters the difference audio signal using the lpc coefficient provided by the lpc coefficient analyzer 407 so that quantization noise of the difference audio signal output from the third detector 401 is equal to or less than a masking level using a hearing masking effect . the stochastic codebook search unit 403 searches one corresponding stochastic codebook based on a signal output from the perceptual weighting filter 402 and outputs an index of the searched stochastic codebook . the index quantizer 404 quantizes the index provided by the stochastic codebook search unit 403 and outputs the quantized stochastic codebook index and the quantized gain index . the stochastic codebook 405 includes a plurality of stochastic codebooks and outputs a stochastic codebook that corresponds to the quantized stochastic codebook index provided by the index quantizer 404 . the multiplier 406 multiplies the stochastic codebook output from the stochastic codebook 405 by the quantized gain output from the index quantizer 404 . the lpc coefficient analyzer 407 analyzes the quantized lpc coefficient of the signal output from the third detector 401 using the quantized lpc coefficient provided by the first harmonic coding module 140 and extracts the quantized lpc coefficient . the method of extracting the quantized lpc coefficient is similar to the method used in the lpc coefficient analyzer 301 provided in the second harmonic coding module 160 . the extracted lpc coefficient is provided to the perceptual weighting filter 402 and the synthesis filter 408 . the synthesis filter 408 performs synthesis filtering on the signal output from the multiplier 406 using the quantized lpc coefficient output from the lpc coefficient analyzer 407 and provides the synthesis - filtered result to the third detector 401 . the synthesis filtering is performed by obtaining an impulse response of the synthesis filter 408 from the quantized lpc coefficient and then convoluting the impulse response and the signal output from the multiplier 406 to obtain the synthesized audio signal . fig5 is a functional block diagram of an audio decoding apparatus according to another embodiment of the present invention . referring to fig5 , the audio decoding apparatus of fig5 includes an lpc coefficient inverse quantizer 501 , a phase index inverse quantizer 502 , a harmonic index inverse quantizer 503 , a first gain index inverse quantizer 504 , a stochastic index quantizer 505 , a second gain index inverse quantizer 506 , a first harmonic decoding module 510 , a second harmonic decoding module 520 , a first adder 530 , a celp decoding module 540 , and a second adder 550 . the inverse quantizers 501 , 502 , 503 , 504 , 505 , and 506 can constitute an inverse quantization unit for inversely quantizing a plurality of parameters for restoring an audio signal . the first harmonic coding module 510 performs harmonic decoding using an lpc coefficient output from the lpc coefficient inverse quantizer 501 and a phase vector output from the phase index inverse quantizer 502 to output the restored audio signal including harmonics . to this end , the first harmonic coding module 510 includes an lpc coefficient / amplitude converter 511 and a harmonic synthesizer 512 . the lpc coefficient / amplitude converter 511 converts the lpc coefficient into a amplitude vector â of a sine dictionary . the harmonic synthesizer 512 synthesizes the phase vector { circumflex over ( φ )} output from the phase index inverse quantizer 502 with the amplitude vector â of the sine dictionary output from the lpc / amplitude converter 511 using equation 8 and outputs an audio signal including harmonics . the output audio signal including harmonics is output to the first adder 530 . the second harmonic coding module 520 performs harmonic coding based on the lpc coefficient output from the lpc coefficient inverse quantizer 501 , a harmonic index output from the harmonic index inverse quantizer 503 , and a first gain value output from the first gain index inverse quantizer 504 . to this end , the second harmonic coding module 520 includes a harmonic code generator 521 , a first multiplier 522 , and a first synthesis filter 523 . the harmonic code generator 521 includes a plurality of harmonic codes and generates a harmonic code based on the input harmonic index . the first multiplier 522 multiplies the generated harmonic code by the first gain value . the first synthesis filter 523 performs synthesis filtering on the signal output from the first multiplier 522 based on the input lpc coefficient and outputs the synthesized and filtered audio signal to the first adder 530 . if the audio signal output from the first multiplier 522 is s h ( n ), the lpc coefficient is a and the synthesized and filtered audio signal is s 1 ( n ), the synthesis filtering can be defined by equation 9 s 1 ⁡ ( n ) = s h ⁡ ( n ) - ∑ i = 1 p ⁢ a i ⁢ s 1 ⁡ ( n - i ) , ( 9 ) the first adder 530 adds the signal output from the first harmonic coding module 510 to the signal output from the second harmonic coding module 520 and outputs the added result to the second adder 550 . the celp decoding unit 540 performs celp decoding based on the stochastic index output from the stochastic index inverse quantizer 505 and the second gain value output from the second gain index inverse quantizer 506 . to this end , the celp decoding module 540 includes a stochastic codebook 541 , a multiplier 542 , and a second synthesis filter 543 . the stochastic codebook 541 includes a plurality of stochastic codebooks and outputs a stochastic codebook corresponding to the stochastic index . the second multiplier 542 multiplies the second gain value by the stochastic codebook . the second synthesis filter 543 provides the synthesized audio signal obtained by performing synthesis filtering on the signal output from the second multiplier 542 based on the lpc coefficient using equation 9 to the second adder 550 . the second adder 550 adds the signal output from the first adder 530 to the signal output from the celp decoding module 540 to restore the audio signal and outputs the restored audio signal . fig6 is a flowchart illustrating an audio coding method according to another embodiment of the present invention . the audio coding method illustrated in fig6 will now be described with reference to fig1 for ease of explanation only . in operation 601 , a pitch of an input audio signal is analyzed to obtain a pitch lag . in operation 602 , it is determined whether harmonics are included in the input audio signal to classify the input audio signal and bits allocated to the first harmonic coding module 140 , the second harmonic coding module 160 , and the celp module 180 based on the classification . in operation 603 , harmonic coding is performed with respect to the input audio signal by the first harmonic coding module 140 using the pitch lag obtained in operation 601 , without analyzing an lpc coefficient . that is , harmonic analysis with respect to the input audio signal is performed , the amplitude of the sine dictionary detected by harmonic analysis is converted into an lpc coefficient , the lpc coefficient is quantized and converted into the amplitude vector , and harmonic synthesis is performed . the quantized lpc coefficient is used in second harmonic coding and celp coding . in operation 604 , a difference audio signal obtained as a difference between the input audio signal and the harmonic coding result obtained in operation 603 is set as a first difference audio signal , an lpc coefficient of the first difference audio signal is analyzed , and harmonic coding is performed on the first difference audio signal by the second harmonic coding module 160 . here , the lpc coefficient of the first difference audio signal is extracted using the quantized lpc coefficient detected in operation 603 . in operation 605 , a difference audio signal obtained as a difference between the harmonic coding result obtained from the first difference audio signal and the input audio signal is set as a second difference audio signal , and the second difference audio signal is celp coded by the celp module 180 . in the celp coding , the lpc coefficient of the second difference audio signal is extracted using the quantized lpc coefficient detected in operation 603 . in operation 606 , the plurality of parameters obtained in operations 603 , 604 , and 605 are transmitted in order to decode an audio signal . the plurality of parameters include the quantized lpc coefficient index , a quantized phase index , a quantized harmonic index , a first quantized gain index , a quantized stochastic index , and a second quantized gain index . fig7 is a flowchart illustrating an audio decoding method according to another embodiment of the present invention . the audio decoding method illustrated in fig7 will now be described with reference to fig5 for ease of explanation only . a plurality of parameters for restoring an audio signal are received in operation 701 , and each of the plurality of received parameters is inverse quantized in operation 702 . in operation 703 , harmonic decoding is performed by the first harmonic coding module 510 based on an lpc coefficient and a phase value obtained in operation 702 . in operation 704 , harmonic decoding is performed by the second harmonic coding module 520 based on the lpc coefficient , a harmonic index , and a first gain value obtained in operation 702 . in operation 705 , an audio signal in which the first harmonic decoding result obtained in operation 703 is added to the second harmonic decoding result obtained in operation 704 is obtained . in operation 706 , celp decoding is performed by the celp decoding module 540 based on a stochastic index and a second gain value obtained in operation 702 . in operation 707 , the addition result obtained in operation 705 is added to the celp decoding result obtained in operation 706 to restore the audio signal . embodiments of the present invention can also be embodied as computer readable code on a computer readable recording medium . the computer readable recording medium is any data storage device that can store data which can be thereafter read by a computer system . examples of the computer readable recording medium include read - only memory ( rom ), random - access memory ( ram ), cd - roms , magnetic tapes , floppy disks , optical data storage devices , and carrier waves ( such as data transmission through the internet ). the computer readable recording medium can also be distributed over network coupled computer systems so that the computer readable code is stored and executed in a distributed fashion . also , functional programs , code , and code segments for accomplishing the present invention can be easily construed by programmers skilled in the art to which the present invention pertains . according to the above - described embodiments of the present invention , harmonic analysis is performed twice such that more harmonics can be searched for using the same bits . allocation of bits used in harmonic coding is variably performed according to whether harmonics are included in the input audio signal such that a coarse granularity scalability function can be easily supported and harmonic sound quality can be optimised . in addition , after harmonic coding in which the lpc coefficient is not analysed is performed , harmonic coding in which the lpc coefficient is analysed is performed , and then , celp coding is performed such that pitch halving prediction or pitch doubling prediction can be prevented and lowering of sound quality can be minimized . although a few embodiments of the present invention have been shown and described , the present invention is not limited to the described embodiments . instead , it would be appreciated by those skilled in the art that changes may be made to these embodiments without departing from the principles and spirit of the invention , the scope of which is defined by the claims and their equivalents .