COMPUTATIONAL PROBLEMS OF ELECTRICAL ENGINEERING Vol. 2, No. 1, 2012 CREATING ELECTRONIC DEVICE MACROMODELS BY QUADRATIC AND CHEBYSHEV APPROXIMATION Yaroslav Matviychuk 1 , Peter Malachivsky 2 , Roman Hasko 1 1 Lviv Polytechnic National University, 2 Leading researcher, Centre for Mathematical Modeling IAPMM National Academy of Sciences of Ukraine matv@ua.fm, psmal@cmm.lviv.ua, r.hasko@gmail.com Abstract: In the article the problem of mathematical macromodeling of electronic devices has been considered. The results of macromodeling by the least squares approximation and the Chebyshev approximation for frequency detectors, multivibrators, and oscillators have been shown. The efficiency of the method of least squares in reproducing the original signal macromodels of nonlinear electronic devices has been proved. Key words: mathematical macromodeling, electronic devices, least squares and Chebyshev approximation. 1. Introduction Macromodels are the mathematical models of devices and systems that are simpler than the original ones, but accurately reflect their external features. Macromodeling is the approximation of nonlinear functions of several arguments that appear in the models described by differential equations [1]. Polynomials in many variables are used for the approximation, and approximation coefficients are determined by the method of least squares or by Chebyshev method. 2. Macromodel of the Frequency Detector A circuit representing a simple frequency detector is shown in Fig. 1. Fig. 1. Frequency detector circuit in MC7 The input phase-modulated signal v(1)=u is the voltage source between the node 1 and the basic one. The output signal is the voltage on the capacity С2: v(C2)=y 2 . Numeric arrays of the input and output signals of the detector and their derivatives are transferred into MATLAB program that determines the coefficients of approximation. The macromodel of the frequency detector is a system of equations (1): 1 3 3 11 2 1 3 3 1 2 1 1 2 3 , , , , , , . t t t t dy dt ky dy dt k Au Ay Ay du dt ku dy dt kf u y y y (1) A detailed explanation of the macromodel (1) was given in [1]. The first two equations describe a second- order linear subsystem, and the fourth one describes a non-linear polynomial function in four arguments. The approximation of the output signal derivative dy 2 /dt has been performed by polynomials of second and third degree in the variables u 1 , y 1 , y 2 and y 3 . The coefficients of the polynomials have been defined by 1429 samples of signals of the circuit in Fig. 1 using the method of least squares and Chebyshev approximation by means of MATLAB-6.5. The Fminimax MATLAB function has been used for performing Chebyshev approximation. The graphs of the output signals of the frequency detector and its macromodels are presented in Fig. 2. Fig. 2. The output signal of the frequency detector and the output signals of its macromodels The output signal of the macromodel obtained by means of the least-squares method is similar to the detector output signal (middle curves in Fig. 2). But the output signals of the macromodels obtained by means of Chebyshev approximation using second and third degree signal phase- modulation output signal Phase-modulated signal v(1)=u – freq.det.¯omodel input signal. Carrier frequency 1.2 MHz. Phase modulation frequency 15 kHz. Lviv Polytechnic National University Institutional Repository http://ena.lp.edu.ua