Design and Simulation of SystemView of Typical Filter

Design and Simulation of SystemView of Typical Filter

The rapid development of communication technology has made communication systems more and more complicated. It has become fashionable for the EDA technology of communication system design to realize software simulation in the research and development stage. The article introduces the system composition and main features of the communication simulation software SystemView. Combined with the digital filter simulation, it introduces how to use the software. The software system is a dynamic system analysis software used for modern engineering and scientific system design and simulation. It is a powerful and multi-purpose tool platform suitable for teaching and guiding the simulation and design of large-scale communication control systems.
This design paper first introduces the subject background and purpose of this subject, and then briefly introduces the digital filter in the second chapter, and the third chapter takes FIR and IIR filters as an example to explain in detail the MATLAB and SystemView. simulation. The fourth chapter uses SystemView to make a simulation of a direct sequence spread spectrum system.
Through the introduction of this paper, we can see that SystemView is a very convenient and practical simulation software, which plays an important role in today's teaching and software design.

Keywords: SystemView, MATLAB, FIR filter, IIR filter, simulation of direct sequence spread spectrum system
ABSTRACT
The rapid development of communicaTIon technology makes communicaTIon system more and more complex. Using the EDA technique in designing communicaTIon system to realize software simulaTIon in the research and exploitation period has been popular. This paper describes the composition of the software system. Combining with FIR and IIR filter simulation, it also introduces the method of how to use the software. SystemView is a tool platform with powerful functions and various uses, which can be used in modern engineering and science system design and analog, especially in the simulation and design of communication system.
In the beginning of this paper, the author first shows us the backdrop and significance of this discussion. Then, in the chapter 2, there are some brief introductions of digital filter, which is the example we have to carry out in this whole paper. Chapter 3 is the main part of this paper, in this part the author give us a really particular describe of the MATLAB / SystemView simulation process, using FIR / IIR filter as the simulation object. Last but not least, the chapter 4 is the expanding part in this paper; the author does an exactitude simulation of the process of Direct-sequence spread spectrum.
Via the introduction of this paper, the readers can get a brief opinion of SystemView, this extremely useful simulating software, it do earn our emphasis during the teaching and software designing nowadays.

KEY WORDS SystemView, MATLAB, FIR filter, IIR filter, Direct-sequence spread spectrum
table of Contents

Chapter 1 Introduction 1
1.1 Topic Overview 1
1.1.1 Project background 1
1.1.2 Significance of the research purpose of the subject 2
1.2 Paper structure 2
Chapter 2 Filter Principle 4
2.1 Basic concepts of digital filters 4
2.1.1 Basic concepts 4
2.1.2 Classification of digital filters 4
2.2 Overview of digital filter design methods 6
2.2.1 IIR filter design 6
2.2.2 FIR filter design 7
2.3 Introduction and selection of simulation software 7
2.3.1 Introduction to MATLAB 7
2.3.2 Introduction to SystemView 8
2.3.3 Introduction to Other Software 9
2.3.4 Simulation software selection 9
Chapter 3 SystemView design and simulation of typical filtersTen
3.1 MATLAB simulation 10
3.1.1 Design of FIR digital filter 10
3.1.2 Design of elliptical analog filters 14
3.2 SystemView simulation 15
3.2.1 Elliptical filter simulation 15
3.2.2 Verification of the effect of elliptic filter (synthesis and decomposition of square wave signal) 16
1. The principle of signal decomposition and synthesis 16
2. Simulation System Implementation 17
3.2.3 FIR filter simulation 20
3.2.4 FIR filter effect verification (Nyquist criterion simulation) 22
3.3 SystemView calls third-party M-LINK module 24
3.3.1 Main functions of M-LINK 24
3.3.2 Establish MATLAB function library under SystemView 25
Chapter 4 Simulation Application-Direct Sequence Spread Spectrum Simulation 28
4.1 Principle of Direct Sequence Spread Spectrum 28
4.1.1 Theoretical basis of spread spectrum technology 28
4.1.2 Principle of Direct Sequence Spread Spectrum 29
4.2 Simulation of Direct Sequence Spread Spectrum System 30
Chapter 5 Conclusion 37
References 38
Acknowledgements 39
Appendix 40

Chapter 1 Introduction In the traditional system design method, the design process is generally classified into two categories: system design and algorithm research and hardware and software implementation. Because the two types of design have great differences in design tools, languages, and even the designer's knowledge background, the design chain is easily interrupted and the system design simulation and engineering implementation are easily isolated. Such a design is difficult to guarantee a one-time success, and often needs to be modified many times to complete.
Realize the automatic mapping of the design results completed by the system-level design tools into engineering realization. It has always been the goal that system design researchers strive to achieve. At present, although there is still some distance to achieve this goal, it has already had such a function in many new versions of simulation tools.
The SystemView software released by Elanix is ​​an excellent simulation software [1].
1.1 Overview of the topic
1.1.1 Background

Sales

Time Chart 1.1 The relationship between product profit and time to market In today's market economy, short design cycles and fast time to market are the persistent pursuit of all manufacturers. As shown in the figure above, it shows the relationship between time to market and profit. This shows that if an enterprise can launch new products faster than its competitors and react to the market faster, it can obtain a larger market share and greater profits.
System design simulation is to use the computer to help the designer complete the tedious design work, which is an effective way to solve the above problems.
With the rapid development of simulation technology, new design tools continue to emerge. One of the most notable features is that the new simulation design tools have more and more powerful and comprehensive functions. For example, SPW of Cadence and SystemView of Elanix. The generation of these software tools is mainly due to the fact that the traditional design method of separating various levels cannot meet the needs of the current ultra-large-scale complex design.
1.1.2 Significance of the research purpose of the subject The research content of this subject mainly involves MATLAB and SystemView simulation of digital filter. The purpose is to have a clear understanding of the simulation of MATLAB and SystemView, experience the powerful functions and practical significance of the simulation software, and have a comprehensive understanding of the design and function of the filter.
With the rapid development of electronic technology and computer information technology, the speed of updating information equipment is accelerating, and the life cycle of the market is getting shorter and shorter, making traditional electronic design and analysis tools unable to meet the market needs. Under this background, EDA is electronic Design automation technology came into being and has become an indispensable technology to improve the quality and technical level of electronic products.
The development of EDA technology has changed the teaching methods and design methods of traditional electronic technology specialties. Such technologies have been used in various professional teaching software. System simulation is to build a simulation model based on the electronic system being studied, and then analyze, calculate and study on the computer. Because it is intuitive and simple on the computer, students can use the simulation software to put it on the computer interface and observe the signal intuitively and clearly for some relatively difficult subjects such as "Signals and Systems" and "Communication Principles". The transmission of the signal, the response of the signal through the system, the frequency spectrum of the signal and its movement can help students have a clearer and deeper understanding of the harder-to-understand theories learned in the classroom, increase their interest in learning, and thus improve the Teaching effect; at the same time, it can also be used by engineering technicians for the research and development of new technology products [1].
The significance of the research in this thesis is to simulate typical filters, which can be used for teaching, so that students can have a deeper understanding of the more difficult theories in mathematical signal processing, and can also be used in product development and as a component design simulation. In the application expansion part of this paper, I will embody the powerful functions of the simulation software with a more complete example, and explain the role of the filter in the communication system.
1.2 Paper structure This article is divided into four parts:
At the beginning of this article, the background and significance of the research are first introduced.
In the second chapter, in order to put forward the concrete realization method of simulation, the author introduced the principle of digital filter to be realized.
In Chapter 3, the simulation software is first introduced, and then the simulation software to be used in this article is selected. And use SystemView and MATLAB two kinds of simulation software, on the basis of the mathematical model of the filter to simulate the characteristics of a typical filter-elliptical analog filter and FIR (finite impulse response) digital wave device. And design a simulation system (such as signal synthesis and decomposition) and a Nyquist criterion simulation system to clarify its filtering effect. Then according to the powerful functions of SystemView, directly call the MATLAB function in its environment to achieve its reliable connection with the MATLAB third-party library module-M-link library, and use the simulation effect of the filter characteristics to analyze the two methods. The filtering effect of the filter.
In Chapter 4, the author uses the powerful functions of SystemView to design a more complete application example to illustrate the role of the filter in the communication system.
The last part of the article summarizes the design work done by the article.
Chapter 2 Filter Principle
2.1 Basic concepts of digital filters
2.1.1 Basic concept The so-called digital filter refers to a device whose input and output are both digital signals, which change the relative proportion of the frequency components contained in the input signal or filter out certain frequency components through a certain calculation relationship. Therefore, the concept of digital filtering is the same as that of analog filtering, but the form of the signal and the method of implementing filtering are different. Because of this difference, digital filters have the advantages of higher precision, stability, small size, light weight, flexibility, no impedance matching, and special filtering functions that analog filters cannot achieve. If you want to process an analog signal, you can use A / DC and D / AC to match the conversion of the signal form, and you can also use a digital filter to filter the analog signal [2].
2.1.2 Classification of digital filters There are many types of digital filters according to different classification methods, but they can be divided into two categories in total. One type is called a classic filter, that is, a general filter, which is characterized in that the useful frequency components in the input signal and the frequency components desired to be filtered each occupy different frequency bands, and the purpose of filtering is achieved by a suitable frequency selection filter. For example, the input signal contains interference. If the frequency band of the signal and the interference does not overlap, the interference can be filtered to obtain a pure signal. But for the general filter, if the frequency band of the signal and the interference overlap, the effective filtering of the interference cannot be completed. At this time, another type of so-called modern filter needs to be used, such as the Wiener filter, Kalman filter, and adaptive filtering. The best filters such as filters. These filters can optimally extract the signal from the interference according to some statistical distribution rules inside the random signal [3].
General digital filters are classified functionally. Like analog filters, they can be divided into low-pass, high-pass, band-pass, and band-reject filters. Their ideal amplitude characteristics are shown in Figure 2.1. Such ideal filters are impossible to achieve, because their unit impulse response is non-causal and infinitely long. We can only design the filter according to certain criteria to make it as close to it as possible. These ideal filters can be used as The standard of approximation is used. In addition, it should be noted that the transfer function of the digital filter is 2π as the cycle, the low-pass band of the filter is at an integer multiple of 2π, and the high-frequency band is near the odd multiple of π, this point is similar to the analog filter There is a difference.
Digital filters can be classified into infinite impulse response (IIR) filters and finite impulse response (FIR) filters from the implemented network structure or from unit impulse response.
The system functions are (2.1)
And (2.2)

ω
2π π 0 π 2π
(A) Low-pass filter

ω
2π π 0 π 2π
(b) High-pass filter

ω
2π π 0 π 2π
(c) Band pass filter
2π π 0 π 2π
(d) Band stop filter

Figure 2.1 Ideal low-pass, high-pass, band-pass, band-reject filter amplitude characteristics
2.2 Overview of digital filter design methods The design of filters is an indispensable part of all communication circuits and communication systems. The ultimate goal of digital filter design is to obtain a linear system with a specified transfer function (which is the digital angular frequency). Since the continuously changing amount cannot be obtained on the computer, the systems implemented on the computer are essentially discrete, that is, digital filters. Using computer-aided design filters, we must calculate a discrete linear system with a transfer function of H (z) based on various relevant theories and various tools, so that the corresponding relationship can be obtained according to [3].
Here are some basic knowledge about filter supplementation:
Let the input sequence and output sequence of a discrete linear system be x (n) and y (n), respectively, and they satisfy the following recursive difference equation:

(2.3)
And the Z transformation results corresponding to x (n) and y (n) are X (z) and Y (z) respectively, then the transfer function of the linear system is, and the inverse Z transformation result of the transfer function is the system in The response under the impulse signal is the impulse response h (n). Generally speaking, corresponding to the above recursive difference equation, the basic form of H (z) is

(2.4)
Designing a digital filter means designing the sum of coefficients in the H (z) expression.
2.2.1 IIR filter design is not all zero in the most general case. The impulse response of this type of filter is infinite in time, so it is called an infinite impulse response filter, or IIR filter for short.
Analog network synthesis theory has developed very maturely, and many efficient design methods have been produced in this field to make analog filter design convenient and accurate; therefore, analog filters are often used to design digital filters. Through the equivalence between continuous systems and discrete systems, using discrete space to continuous space conversion, IIR filters can correspond to analog filters in the continuous domain. Commonly used spatial mapping methods include bilinear transformation method and impulse invariant method.
When designing a digital filter using an analog filter approach, commonly used analog filter types include Butterworth type, Chebyshev type, Bessel type, elliptic type, linear phase shift type, etc. According to the different amplitude and frequency characteristics of the filter, each filter has low pass, high pass, band pass, band stop and other types. In the design process, first of all, based on the standard low-pass filter, the purpose of the approximation design is to find a transfer function that characterizes the causal stable system so that its amplitude-frequency / phase-frequency characteristics are close to ideal characteristics. Then use the passband transform to transform the designed amplitude-frequency / phase-frequency characteristics to the required frequency band, and the design of the filter is completed.
When designing the IIR filter according to specific requirements or indicators, first design the transfer function H (s) of the analog filter in the continuous domain according to the specified performance indicators (if the indicators given for the digital filter should be based on the digital The relationship between frequency and analog frequency, transform the index of digital filter into the index of analog filter). After completing the design of the analog filter H (s) as required, just follow the corresponding relationship of the bilinear transformation

(2.5)
By replacing s in the equation with z, the design of the IIR filter can be completed. Similarly, the impulse invariance method can also be used to map the continuous domain analog filter to the discrete domain digital filter [4].
2.2.2 FIR filter design When the coefficients of the denominator in the H (z) expression are less than zero, the H (z) expression is simplified
(2.6)

The corresponding difference equation is (2.7)
At this time, the impulse response of the system is limited in time, so this type of system is called a finite impulse response filter, or FIR filter for short. Compared with the IIR filter, the FIR filter has the following advantages: it can guarantee the stability of the system; its specific implementation corresponds to a fast algorithm; it can ensure that the system is linearly phase shifted, so it can not be generated in the passband Phase distortion. Therefore, FIR filters are often used in digital system design.
In the design of FIR filters, there are different design methods from the time domain and from the frequency domain. One method is the window design method. It is a design method based on the impulse response in the time domain. First, the inverse Fourier transform is performed on the designed target frequency response to obtain an impulse response with infinite time, and then a time window with a certain shape is used to time-intercept the impulse response to obtain an impulse response with limited time h (n), and the Z transform H (z) of the obtained impulse response can be approximated to the original by mapping. In order to make the time interception have less influence on the system frequency response, commonly used time windows include rectangular windows, Hamming windows, Hanning windows, Kaiser windows, etc. Another method is frequency sampling. That is, starting from the frequency domain, sampling the designed target frequency response to determine the required transfer function, so that the transfer function obtained by the design is close to the ideal transfer function, at least at the sampling point so that it has the same frequency response, This completes the design of the digital filter [4].
2.3 Introduction and selection of simulation software
2.3.1 Introduction to MATLAB
MATLAB is the mathematics software launched by the American MathWorks company since the mid-1980s. Its excellent numerical computing ability and excellent data visualization ability make it quickly stand out in the mathematics software. It has developed into a multi-disciplinary and multi-working platform with powerful functions Large-scale software. MATLAB has become a basic teaching tool for advanced courses such as linear algebra, automatic control theory, probability theory and mathematical statistics, digital signal processing, time series analysis, and dynamic system simulation development tools.
MALTLAB features include:
1. Rich operators, providing almost as many operators as C language;
2. Advanced but simple programming environment, MATLAB has both structured control statements and object-oriented programming features;
3. The program restrictions are not strict, and the degree of freedom in program design is large. There are a large number of mathematical functions defined in advance, and there is a strong ability of user-defined functions;
4. The program is very portable;
5. The graphic function of MATLAB is powerful. 2D and 3D diagrams with illustrations and visualizations of education, science and art;
6. The language is simple and compact, easy to use and flexible, and the library functions are extremely rich;
7. A powerful toolbox is another feature of MATLAB. MATLAB contains two parts: the core part and various optional toolboxes. There are hundreds of core internal functions in the core part. The toolbox is divided into two categories: functional toolbox and subject toolbox. The functional toolbox is mainly used to expand its symbol calculation function, graphic modeling and simulation function, word processing function and real-time interaction function with hardware. Functional toolboxes are used in multiple disciplines. The disciplinary toolbox is more professional, such as (control, signal proceessing, communmnication) toolbox, etc .;
8. The openness of the source program. Users can form a new toolbox by modifying the source files and adding their own files [3].
2.3.2 Introduction to SystemView
SystemView is a signal-level system simulation software, which is mainly used for the design and simulation of circuits and communication systems. It is a powerful dynamic system analysis tool that can meet the requirements from digital signal processing, filter design, to complex communication systems. Level design and simulation requirements. With a modular and interactive interface, SystemView provides users with an embedded analysis engine under the familiar Windows window environment. Using SystemView only needs to care about the design idea and process of the project, without having to spend a lot of time programming to establish a system simulation model. Users only need to use the mouse to click on the icon to complete the modeling, design and testing of complex systems without having to learn complicated computer programming or worry about whether there are programming errors in the program [5].
SystemView features:
1. Can simulate a large number of application systems. Can construct complex analog, digital, hybrid, and multi-rate systems in DSP, communication, and control system applications. There are a large number of selectable libraries, allowing users to selectively add communication, logic, DSP and RF / analog function modules. Especially suitable for the design of wireless phones (GSM, CDMA, FDMA, TDMA, DSSS), cordless phones, pagers and modems, and satellite communication systems (GPS, DVBS, LEOS), etc .; can emulate (C3x, C4x, etc.) DSP structures; Time domain / frequency domain analysis and spectrum analysis of various systems; theoretical analysis and distortion analysis of RF / analog circuits (mixers, amplifiers, RLC circuits and op amp circuits);
2. Fast and convenient dynamic system design and simulation using familiar Windows interface and function keys (click, double-click the left and right mouse buttons), SystemView can quickly establish and modify the system, and quickly access and adjust parameters in the dialog box, real-time modification real-time display. Simply click the icon with the mouse to create a continuous linear system, DSP filter, and input / output simulation data based on the real system model. The subsystem library (MetaSystem) that users are accustomed to can be established without writing a line of code. The SystemView icon library includes hundreds of signal sources, receivers, operators, and function blocks, providing applications from DSP, communication, signal processing, automatic control, and construction of general mathematical models. Signal source and receiver icons allow generating and analyzing signals within SystemView, and provide various file formats and input / output data interfaces that can be processed externally;
In addition, SystemView also provides design based on the organization chart; allows multi-rate systems and parallel systems; provides complete filter and linear system design and advanced signal analysis and data block processing and has good scalability and perfect Self-diagnosis function [6].
2.3.3 Introduction to other software
PSpice: PSpice is a powerful analog and digital circuit mixed-signal simulation software, which includes multiple analysis functions for medium-scale integrated circuits (MSI) and large-scale integrated circuits (LSI), and has high simulation accuracy.
EWB (Electronic Workbench) software: mainly used for simulation of analog and digital circuits. The higher version has been renamed Multisim. Compared to other EDA software, it provides virtual instruments such as multimeters, oscilloscopes, and signal generators. The software's interface is intuitive and easy to learn and use. Many of its functions imitate Spice's design, and the analysis function is also strong.
Protel software: Protel is a CAD tool launched by PROTEL (now renamed Altium) in the late 1980s. Protel 99 SE is now commonly used. It is a complete omnidirectional circuit design system, including electrical schematic drawing, mixed signal simulation of analog and digital circuits, multi-layer printed circuit board design, programmable logic device design and other functions, and has a Client / Server architecture, while It is also compatible with the file formats of some other design software. Protel software is powerful, friendly, and easy to use. It is most representative of circuit design and PCB design.
VHDL language: Vhsic Hardware Deseription Languagt (VHDL) is a standard design language of IEEE. It originated from the Very High Speed ​​Integrated Circuit (VHSIC) plan proposed by the US Department of Defense and is a major input tool for ASIC design and PLD design.
Veriolg HDL: The hardware description language introduced by Verilog Company is equally divided with VHDL language in ASIC design [7].
2.3.4 Selection of simulation software After selection, it was decided to choose MATLAB and SystemView.
The main reason is that the topic of this thesis is a research topic for teachers, and it is hoped that it can be used for teaching. On the other hand, MATLAB and SystemView are the only choices in teaching simulation.
On the other hand, as mentioned above, the two software MATLAB and SystemView have the characteristics of simple operation, easy to use, and intuitive interface, which is also the reason why the authors chose these two.
Chapter 3 SystemView of Typical Filter
Design and simulation
3.1 MATLAB simulation
3.1.1 Design of FIR digital filter
1. The transfer function of the FIR digital filter for the FIR digital filter design is:

(3.1)

The design of the FIR filter includes the following steps: give the required technical specifications of the filter; design an H (z) to approximate the required technical specifications; realize the designed H (z).
The impulse response of the FIR filter is the coefficient of each order of the system function, so one method of designing the FIR filter is: starting from the time domain, intercepting a finite length of impulse response as the coefficient of H (z), the impulse The response length N is the order of the system function H (z). As long as N is long enough, the interception method is reasonable and can always meet the requirements of the frequency domain. This is the window design method of the FIR filter. The goal is to design a linear phase FIR digital filter. The ideal frequency response required is that it is a periodic function of w.
Therefore, it can be expanded into a Fourier series: e (3.2)
Where: h (n) is the Fourier coefficient. However, we cannot design h (n) as a FIR digital filter as h (n), because h (n) is generally non-causal and infinitely long, which is physically impossible. In order to solve this problem, you can truncate the infinitely long h (n) into a finite length sequence, and then move the finite length sequence to the right to make it a causal sequence into h (n). The frequency response of a FIR filter designed with h (n) approximating h (n) must also be an approximation of the ideal frequency response. The truncation in the above method is to add windows, so it is called window design [5].
2 The frequency sampling method window method of FIR digital filter design is a time domain design method with h (n) as the medium, and the filter index is often given in the frequency domain. For this, h (n) is calculated by, After windowing, calculate h (n) from h (n) to check. When the ideal frequency response is an arbitrary curve, or there is no clear analytical expression, it is more difficult to find H (n). Therefore, we have to think: Can we design directly from the frequency domain without repeating in the frequency domain, time domain and frequency domain? This is the frequency domain design method using the FIR filter—frequency sampling method. The frequency sampling method first samples the ideal frequency response to obtain the sample value H (k), and then uses the interpolation formula to directly find the system conversion function H (z) for implementation; or find the frequency response H (e) to match the ideal frequency To compare.
N-point sampling of H (z) in the [O, 2π] interval is equivalent to a time-domain delay of π with N as the period.
The steps of the frequency sampling method can be summarized as:
a) Given the ideal frequency response.
b) Determine the number of sampling points and obtain H (k) by sampling the ideal frequency response.
c) Substitute into the following formula to get the transfer function of FIR digital filter:
H (z) = (3.3)
The frequency sampling method can be regarded as an interpolation method. The disadvantage of this method is that the edges of the passband and stopband must be accurately determined [4].
3 Chebyshev approximation method of FIR digital filter design In the above two parts, we introduced the window design method and frequency sampling method of the digital filter. The frequency characteristics of the filter designed by these two methods are all Approximation of the ideal frequency characteristics given in different senses. From the theory of numerical approximation, there are generally three methods for approximating a function f (x): interpolation method; least square approximation method; best uniform approximation method. The so-called interpolation is to find an n-th order polynomial (or triangular polynomial) P (x) so that it satisfies P (x) = f (x) at N + 1 points X, X ... X, k = 0, l, ⋯, n. At non-interpolation points, P (x) is some combination of f (x). Of course, at non-planting points, p (x) and f (x) have certain errors. The frequency sampling method can be regarded as an interpolation method, which guarantees H (e) = H (e) at the sampling point w and at the non-sampling point, H (e) is a linear combination of the interpolation function S (w, k), Its weight is H (e). The disadvantage of this design method is that the edges of the passband and stopband are not easy to determine accurately.
The least squares approximation is within the required range, such as the interval [a, b]: minimize the product. The design method is focused on minimizing the total error of the entire interval [a, b], but it does not necessarily ensure that the error is minimized at each local position. In fact, there may be large errors at certain locations. In fact, the Fourier series method is a method of least square approximation. This method has a large overshoot (Gibbs phenomenon) at the discontinuity. In order to reduce this overshoot and undershoot, the method of adding a window is adopted. Of course, the design method after adding a window is no longer the least square approximation.
The best uniform approximation method is to focus on making the error function E (x) = | p (x) -f (x) | in the required interval [a, b] more uniform, and by choosing p reasonably (x), making the maximum value E of E (x) the smallest. Chebyshev's approximation theory solves a series of problems such as the existence, uniqueness and how to construct p (x).
The basic of Chebyshev's best uniform approximation is that for a continuous function p (x) on a given interval [a, b], among all n-degree polynomial sets, find a polynomial such that it is in [a, b] The deviation of f (x) in the above is the smallest compared to the deviation of f (x) of all other polynomials p (x) belonging to the set, ie

(3.4)
Chebyshev's approximation theory points out that such a polynomial exists and is unique, and points out the method of constructing this best uniform approximation polynomial. This is the famous "staggered point group theorem".
Let f (x) be a continuous function defined on [a, b], P (x) be a polynomial in the set, and let
E = (3.5)
And E (x) =, p (x) is the sufficient and necessary condition for the best uniform approximation polynomial of f (x), E (x) has at least n + 2 interlaced points n [x, ≤ … ≤x ≤b, such that
E (x) = ± E .i = l, 2, ⋯, n + 2 (3.6)
And E (x) = -E (x), i = l, 2, ⋯, n + 2 (3.7)
These n + 2 points are the "interlaced point group", obviously x, x, x are the extreme points of E (z). Chebyshev polynomial of order n
(3.8)

There are n + 1 points in the interval [-l, 1], and the maximum value +1 and the minimum value l are alternately obtained, which is the polynomial of x, and the coefficient of the highest term is, it can be proved that in all n-order polynomials , Polynomial /, and 0 have the smallest deviation. In this way, if we can make the error function a certain one when looking for P (x), then such P (x) will be the best uniform approximation to f (x) [4].
Use MATLAB language to design FIR digital filter In addition to the above main design methods, we can also use MATLAB to design filters to achieve. MATLAB language is widely used, especially in the processing of digital signals, because it has a powerful simulation function.
It is implemented in MATLAB one by one with the various methods mentioned above.
1. The window function method uses a linear phase FIR low-pass filter as an example. Its performance indicators are: passband boundary frequency ωp = 0.5π, stopband boundary frequency ωS = 0.66π, stopband attenuation is not less than 40dB, and passband ripple Not more than 3dB.
In this example, the stop band attenuation is not less than 40dB, and the Hanning window is selected.
See Appendix 1 for MATLAB programming procedures.
After the program runs, the frequency characteristics of the designed FIR linear phase filter are obtained. As shown in Figures 3.1 and 3.2.
Figure 3.1 Frequency characteristics of FIR linear phase filter Figure 3.2 Phase characteristics of FIR linear phase filter
2. The frequency sampling method takes the previous linear phase FIR low-pass filter as an example, and its performance indicators are: the passband boundary frequency ωp = 0.5π, and the stopband boundary frequency ωS = 0.66π. In the design of this method, design indexes such as the maximum and minimum attenuation are not used.
See Appendix 2 for MATLAB programming procedures.
After the program runs, you can see the amplitude-frequency characteristics, impulse response and attenuation characteristic curve of the designed FIR filter.
As shown in Figures 3.3, 3.4 and 3.5 below.

Figure 3.3 Frequency characteristics of the designed FIR filter

Figure 3.4 The phase characteristics of the designed FIR filter
3. The Chebyshev approximation method continues to implement the previous linear phase FIR low-pass filter. The passband boundary frequency ωp = 0.5π, the stopband boundary frequency ωS = 0.66π, the stopband attenuation is not less than 40dB, and the passband ripple is not more than 3dB.

From this you can write the MATLAB program, see Appendix 3.
After the program runs, you can see the amplitude-frequency characteristics of the designed FIR filter.

Figure 3.5 Amplitude-frequency characteristics of FIR filter
3.1.2 Design of elliptical analog filter
MATLAB can also be used to design analog filters.
The squared amplitude response function of the elliptical analog low-pass filter prototype is

(3.9)
In the formula, μ is a positive number less than 1, indicating the ripple; ωC is the cutoff frequency; is an elliptic function, defined as when N is even (N = 2m),
(3.10)

When N is odd (N = 2m + 1),
(3.11)

among them,

The characteristic of the elliptical analog filter is that it has equal ripple characteristics in both the passband and the stopband. Compared with other filter prototypes, the same performance index requires the smallest order. But the phase-frequency response has obvious nonlinearity.
In addition, in MATLAB, there is a special function ELLIP that can be used for elliptical analog filter design. Its calling format is
[b, a] = ellip (n, RP, RS, ωn, 's')
[b, a] = ellip 2 (n, RP, RS, ωn, 'ftype', 's')
[z, p, k] = ellip 2 (…)
[A, B, C, D] = ellip 2 (…)
Among them, RP is the passband ripple (dB), RS is the stopband attenuation (dB) [8].
The following uses a high-pass elliptical analog filter as an example, assuming that the design performance index of this filter is: passband boundary frequency ωp = 1500Hz, stopband boundary frequency ωS = 1000Hz, passband ripple RP = 0.5dB, stopband attenuation RS = 20dB.
See Appendix 4 for programming procedures using MATLAB.
As a result of the operation, the filter is of order 3. The amplitude-frequency characteristics of the filter are shown in Figure 3.7.
Figure 3.6 Ellipse filter amplitude-frequency characteristics
3.2 SystemView simulation This paper uses SystemView and MATLAB simulation software, based on the filter mathematical model, with the help of SystemView simulation analysis of the characteristics of typical filters-elliptical analog filter and FIR (finite impulse response) digital filter.
3.2.1 Ellipse filter simulation Click the "Filter / Analog" on the menu bar or click the "Analog" button to design five analog filters. They are: Butterworth, Bessel, Chebyshev, ellipse, linear phase. These filters can be low-pass, high-pass, or band-pass.所选择的滤波器的一般形状由滤波器的类型决定,需要输入的数据是滤波器的极点数、-3dB带通或截止频率、相位纹波系数、增益等参数,按”Finish”完成设计[10]。
以在MATLAB中已仿真过的高通椭圆模拟滤波器为例,假定此滤波器的设计性能指标为:通带边界频率ωp=1500Hz,阻带边界频率ωS=1000Hz,通带波纹RP=0.5dB,阻带衰减RS=20dB。
按”Gain”可看到如下图3.7所示的增益响应波形图

图3.7 椭圆滤波器增益响应波形图按”Time”可看到如下图3.8中的特性曲线图3.8 椭圆滤波器特性曲线由此,我们可看出其特性仿真与MATLAB中的仿真结果是相吻合的。
3.2.2椭圆滤波器效果验证(方波信号的合成分解)
在此节中,为了更好的论证椭圆滤波器的特性,设计了一个仿真系统–方波信号的合成与分解,借此阐明其滤波作用。
1.信号分解与合成原理为了便于研究信号传输和信号处理等问题,往往将一些信号分解为比较简单(基本)的信号分量之和。分解的方法有多种,常见的分析方法有:直流分量与交流分量,偶分量与奇分量,脉冲分量和正交函数集等。其中将信号分解为正交函数集的研究方法在信号与系统理论中占有重要地位。傅立叶分析法是常见的一种,一个偶对称的矩形信号可分解为:

(3.12)

其中:k=1,3,5,…
它只含有1,3,5等奇次谐波分量[9]。
分解方法如图所示。

图3.9 方波分解原理框图

图中将输出信号加到一个滤波器组,其中每一个单元滤波器中心频率等于信号的各次谐波频率。在滤波器输出端得到分开来的基频信号和各次谐波信号。
将图3.9所得到的基波和各次谐波分量送到一个加法器输入端(如图3.10所示)重新合成,合成后的波形从加法器输出端得到。
图3.10 方波合成方案原理框图
2.仿真系统实现在SystemView环境上,用线性滤波器,加法器,乘法器可实现波形合成与分解。对应的仿真系统模型如图3.11和3.12所示。图3.11所示为信号分解仿真模型,被分解信号为方波,将方波信号分解为前6个不为零的谐波分量。图3.12为信号合成系统模型,将分解后的信号合成。

图3.11 信号分解仿真模型图3.12 信号合成仿真模型

如图3.9所示,将信号进行选频滤波,滤出第1、3、5、7、9和11次谐波(偶次谐波为0),系统取样速率为1000Hz,取样点数为20480,滤波器的带宽取2Hz。多取一些点数是为了减少截断误差。使FFT更接近周期信号的离散频谱。
观察图3.13和图3.14可以看原方波以及经滤波器分解后的各谐波叠加波形,由此可以清楚地看出各次谐波与原信号的频率关系。

图3.13 原方波波形图3.14经滤波器分解后的各谐波叠加波形图3.15 方波信号频谱图

图3.16 6个低次谐波频谱合成图

观察图3.15:方波信号频谱图和图3.16:6个低次谐波频谱合成图可以看出原方波信号的频谱以及分解后的几个低次谐波频谱。从原理上讲,方波信号的谐波是无限的。仿真选择了最低的6次谐波,从3.16图中很清楚地看出,这6次谐波已经占去了原频谱的大部分能量。实际上这样的处理在工程上往往已经满足需要,这一点可在图3.17看出。而误差也会随着谐波次数的增加而减小。

图3.17 6个低次谐波合成后的信号波形在实际工程中,误差是不可能消除的,这些误差是由忽略高次谐波分量造成的。因此在工程上可以根据信号分析的误差要求,确定截取的谐波次数。一般来说,选择前10项谐波合成的信号已基本满足工程要求。
我们从仿真结果中可以清楚的看到,椭圆滤波器可以将方波信号分解成多个不同幅值、不同频率的正弦波信号,满足了理论中分解情况。同时又将分解后的正弦波重新合成,得到较好的方波信号,椭圆滤波器实现了其滤波作用。
3.2.3 FIR滤波器仿真
FIR滤波器仿真过程在SystemView中,通过选择菜单条上的”FIR”或直接按滤波器设计栏下的”FIR”按钮可以进入到FIR滤波器设计窗口。左右各有两组FIR滤波器,共14种。当选择了其中任何一个滤波器后,都会出现一个相应的设计窗口,用户可以输入滤波器的通带宽度、过渡频带以及截止频率等滤波器参数。此外,还能对相应形式的滤波器设置通带内的纹波系数[9]。
以之前在MATLAB里已实现的线性相位FIR低通滤波器为实例,其性能指标为:通带边界频率ωp=0.5π,阻带边界频率ωS=0.66π,阻带衰减不小于40dB,通带波纹不大于3dB。
主要步骤为:
第一步,先确定系统采样速率,因为低通滤波器的带宽为100Hz,选择1KHz的系统采样速率比较合适。
第二步,在设计窗口放置一个算子图符,并选择使用线性系统的FIR滤波器设计。在FIR滤波器设计窗口上选择低通滤波器”Lowpass”按钮后,再按”Design”按钮,屏幕上将出现如图3.18所示的低通滤波器设计窗口。在这个窗口的下边是一组用来确定滤波器抽头、通带内纹波以及最大迭代次数的文字框,其中的数字用于计算FIR抽头系数的算法中。
图3.18 低通滤波器设计窗口第三步,在窗口中将滤波器通带内增益设为0dB,通带转折频率设为0.25,截止频率设为0.33,截止带内增益设为-40dB。带内纹波0.5dB,最大叠代次数默认25。采用系统自动优化抽头数,选择自动优化”Enable”按钮。经过计算,实现滤波器所需要的抽头数会出现在这个按钮左边的文字框内。这样选择的抽头数最佳。
当设计参数输入结束后,单击”Finish”按钮进行系数计算,在进行计算时,会有一个进度条出现以指示系数计算的状态。计算结束后,滤波器的时域单位响应曲线会出现在图形显示区内。如图3.19所示。

图3.19 时域单位响应曲线单击增益”Gain”选项,可以看到如图3.20所示的增益响应波形图。
图3.20 FIR滤波器增益响应曲线单击”phase”选项,也可看到如图3.21所示的相位响应。

图3.21 FIR滤波器相位响应曲线可看到,SystemView的仿真结果与MATLAB几乎如出一辙。
3.2.4 FIR滤波器效果验证(奈奎斯特准则仿真)
为了更好的论证FIR数字滤波器的特性,设计奈奎斯特准则仿真系统,阐明FIR数字滤波器的滤波作用。
奈奎斯特第一准则:
信号在无噪声的信道中传输时,对于二进制信号的最大数据传输率Rmax与通信信道带宽B(B=f,单位是Hz)的关系可以写为: Rmax=2*f(bps) [4]。即规定带限信道的理想低道截止频率为fH时,最高的无码间干扰传输的极限速度为2fH。

图3.22 奈奎斯特准则仿真系统如仿真图3.22所示,该电路中信号源(图符0)为幅度1V,码速率为100bps的伪随机信号。用一个抽头数为259的FIR低通滤波器(图符5)来近似模拟理想的传输信道,滤波器的截止频率设为50Hz,在60Hz处有-60dB的衰落。因此,信道的传输带宽可近似等价为50Hz,该频率正好是传输信号的奈奎斯特带宽。基带数据在输入信道之前,先通过一个升余弦滚降滤波器(图符1)整型,以保证信号有较高的功率而无码间干扰。滚降系数设置为0.3,信道的噪声用高斯噪声(图符13)表示。图符8、9、11完成接收端信号的抽样判决和整形输出。抽样器的抽样频率与数据信号的数据率一致,设为100Hz 。为了比较发送端和接收端的波形,在发送端接收器前(图符3)和升余弦滚降滤波器(图符1)后各加入一个延迟图符。
下图3.23所示为通过升余弦滚降滤波器后的信号与原输入信号的波形叠加。
图3.23 经过升余弦滚降滤波器整形后的信号与原信号叠加图3.24为输入信号波器与接收信号波器的叠加,可观察到收发波形基本一致,加入一定幅度的噪声仍然能正常传输。奈奎斯特第一准则得以验证。将输入信号的波特率由100bps改为110bps,此时的条件已不满足奈奎斯特第一准则,重新运行系统,可观察到信号传输错误,如图3.25所示。改变噪声幅度,错误波形可能增多。
图3.24 输入信号与输出信号的波形叠加

图3.25 不满足奈奎斯特第一准则时输出信号中的错误脉冲从仿真结果中,我们可以看到FIR数字滤波器将高斯噪声很好的滤除,得到与原伪随机码相一致的信号,滤波效果明显。
3.3 SystemView调用第三方M-LINK模块
3.3.1 M-LINK的主要功能为了与MATLAB联合设计仿真系统,SystemView专门提供了一个接口–M-LINK。它的主要功能如下:
1、将已经设计好的MATLAB仿真模块(.m或MEX的.DLL文件)接入SystemView直接使用。
2、在SystemView利用MATLAB提供的第三方库文件。
3、在SystemView下用MATLAB编写用户自定义的模块。
4、在SystemView和MATLAB之间输入输出信号和数据。
5、利用SystemView和MATLAB的仿真分析工具检查仿真结果。
6、直接在SystemView中创建、编辑、调试MATLAB的程序。
将MATLAB功能函数中的参数传递给SystemView作为变量或全局常数。
在SystemView中可以包含任意多个MATLAB功能函数,而且这些功能函数可以随时添加、修改、新建和删除。
所有这些操作都可以通过SystemView提供的友好的交互式界面完成,这些交互式界面与用户熟悉的其它SystemView交互式界面完全相似。用户只需要利用鼠标器简单地点击和输入参数即可完成。
SystemView的M-LINK图符不但支持标量处理,而且也支持矢量处理。软件可自动为图符分配缓冲区,当仿真执行时,输入缓冲区被填满而输出缓冲区被清空。当图符为标量处理时,缓冲区长度会自动设为1,输入数据被立即处理并输出结果。输入输出之间没有任何延时。但如果是矢量处理,则缓冲区的长度会根据输入输出之间的矢量关系自动调整缓冲区的大小,此时在输入输出之间会存在一定长度的群延时。这个群延时的大小取决于输入的速率和缓冲区的大小。
使用SystemView的M-LINK功能必须安装MATLAB并运行MATLAB引擎(engine),如果没有启动MATLAB引擎,在进行仿真时SystemView会自动装载该引擎,并调用其相应的功能[10]。
3.3.2 建立SystemView下的MATLAB函数库
MATLAB功能函数的建立过程为:
首先,在SystemView的设计窗口中放置一个M-LINK图符然后双击该图符,出现如图3.26所示的MATLAB库管理窗口界面。

图3.26
其中,”Matlab Functions”栏显示的是已经加入M-LINK库的MATLAB功能函数,”M-LINK Tokens”栏显示的是当前系统正在使用的MATLAB功能函数及对应的图符号。单击”Add Existing”按钮可以增加一个新的MATLAB功能函数,用户通过文件选择对话框将已经编辑好的.m文件添加到M-LINK库中。选择其中一个功能函数,并按”Remove”按钮可以将它从库中删除。选择其中一个功能函数,按”Define”按钮可定义该功能函数,如图3.27所示。
在该窗口中可以定义输入引脚、输出引脚以及参数的个数和名称,并通过函数语法定义栏对输入输出及参数进行有关的函数描述、定义。并通过”Function Picture”定义用户自定义的图符图标。根据不同的MATLAB函数功能可将其选择定义成信号源(Source)、功能函数(General)、输出接收计算器(Sink)三种类型。 如果需要创建一个新的MATLAB功能函数,则在窗口中单击”Create New…”按钮,出现如图3.28所示的MATLAB编辑/调试窗口。此时可以开始编辑一个新的功能函数,存盘后返回SystemView得到一个新的功能函数。原则上M-LINK库中的这些功能函数可以被反复使用并定义参数。定义参数的方法是,在图3.26所示的窗口中单击”Parameters”参数按钮,出现如图3.27所示的参数设置窗口。如果不需要输入参数,则没有参数输入对话框;如果只有一个参数则显示一个参数输入对话框;如果存在多个参数输入则有相应个参数输入对话框。

图3.27
图3.28
为正确地在MATLAB和SystemView之间交换数据、传递参数,必须对M-LINK中关于数据、参数传递的一些规定作一些了解。例如,定义一个对信号进行直流偏置的函数,要将一个输入信号x叠加一个直流成份(常数c)后输出为y[11]。
为了对利用M-Link进行仿真有一个具体的感性认识,作者以一个实例进行简要的说明。作为对比,同时使用SystemView算子库中的相应图符和一个由MATLAB定义的外部函数。
本例中的SystemView图符和M-link调用函数的方式的作用都是滤波。所用信号源为一方波。
所调用MATLAB函数即为之前在MATLAB滤波器仿真中已实现过的椭圆带通滤波器。此时直接调用之前已经编好的程序即可。
仿真界面如图3.29所示。

图3.29 仿真界面在此例中,sink5输出的是通过M-link调用MATLAB函数得到的波形,而sink2输出的是直接使用SystemView的相应图符实现的相同的滤波器。在此例中作者使用的是方波信号。在图3.30和图3.31中我们可以看到这两种方式在分析窗口所得到的结果。
由结果我们可以看到,两种方式实现的结果是一模一样的。

图3.30 Sink5输出波形(调用MATLAB函数实现)

图3.31 Sink3输出波形(直接使用SystemView图符)
第四章仿真应用–直接序列扩频仿真在实际应用中,滤波器有很多不同的作用。它主要是在频域中对输入信号进行滤波,只允许一定条件的频率通过。通常用作滤波整形和预处理等作用。比如最典型的抽样定理的仿真中就会用到两个巴特沃斯低通滤波器,前一个低通滤波器是为了滤除频率过高的输入信号,防止出现频谱混迭现象,产生混迭噪声,影响恢复出的信号质量。后面一低通滤波器是为了从抽样序列中恢复出信号,滤除抽样信号中的高次谐波分量。
在本章节中,作者就将以抽样定理的仿真为实例,详细讲述SystemView的仿真应用,以及SystemView所仿真的滤波器在各系统中的广泛使用。
4.1 抽样定理
4.1.1 抽样定理的理论基础模拟信号数字化的第一步是在时间上对信号进行离散化处理,即将时间上连续的信号处理成时间上离散的信号,这一过程称之为抽样。从信息传输的角度考虑,对抽样的要求应是用时间离散的抽样序列来代替原来的时间连续的模拟信号,并要求能完全表示原信号的全部信息,也就是离散的抽样序列能不失真地恢复出原模拟信号。在本次仿真中,作者所要表示的即是抽样过程和恢复原模拟信号过程,以阐述无失真的条件。
连续信号在时间上离散化的抽样过程如图4.1所示。具体地说,就是某一时间连续信号f(t),仅取f(t0)、 f(t1)、 f(t2)…f(tn)等各离散点数值,就变成了时间离散信号fs(t)。这个取时间连续信号离散点数值的过程就叫做抽样。
4.1.2 直接序列扩频原理直接序列扩频通信系统是直接序列扩频方式构成的扩展频谱通信系统,又称伪噪声系统,通常简称为直扩系统,它是在发送端用比信息比特率高许多的一组伪噪声码序列直接去调制载波,进行扩展频谱,即其载波被一个数码率远离于信息带宽的数字序列调制,然后在接收端用相同的本地伪噪声码序列解调。它是目前最典型、应用最广泛的一种扩展频谱系统。其特点是:
1) 扩频和解扩调制器多采用结构简单且能抑制载波的平衡调制器。
2) 接收端多采用本地伪码序列对接收的信号相关解调,或用匹配滤波器来解扩信息信号。
3) 指定的接收机很容易区分通信信号和干扰信号,如果扩频信号带宽远大于数据信号带宽,则扩频系统传输带宽由扩频信号决定,而几乎与数据信号无关。
4) 发射信号容易被指定的接收机解调,而用其他不相关的接收机检测这种信号非常困难。
5) 解扩时,载有信息的中频信号再用窄带滤波器来滤除干扰,提取有用信息信号,以达到提高扩频系统抗干扰能力的要求[12]。
直接序列扩频通信系统由发射机和接收机两部分组成。在发射端,发射机将输入信息(基带信息)调制形成数字信号–二进制的数字序列信码,当对载波进行幅度键控时,二进制的”0″码使载波抑制,而”1″码使载波输出,经过一次调制的信号再经过由扩频码发生器产生的高速率扩频码序列相位键控调制。由于信码和扩展用的地址伪码都是二进制序列,又是对同一载波进行相位键控的,所以调制器实际上是将两路编码序列进行模2加以展宽信号的频谱,展宽后的信号再经过载波调制器调制到射频发送出去。直接序列系统常用双相平衡调制,以抑制载波,载波抑制的程度取决于调制器的平衡性。调制方式可以用模拟调幅、调频或相位调制,但最常见的是采用数字相位调BPSK。由此可见,一般的扩频通信系统都要进行三次调制和相应的解调:一次调制为信息调制,二次调制为扩频调制,三次调制为射频调制。
在接收端,对接收信号的解扩有两种方法,一种方法是中频解扩,即先对收到发射来的有相当宽频谱的射频信号进行混频,将其变为中频信号,经前置放大后由本地产生的与发射端相同的扩频码序列去相关解扩,送给扩频序列同步捕捉电路、扩频序列同步跟踪电路及截波同步跟踪及数据解调电路恢复成原始信息输出,实现信息数据的接收。另一种方法是射频解扩,即先用与发送端相位同步的、波形相同的扩频码序列去相关解扩,然后殖民地用本地信号去混频。以上两种方法都可以得到窄带的、受信码调制的中频信号,把这种信号再经过中频窄带滤波器将干扰滤掉。本次设计将实现的直序扩频系统基本原理图如图4.1所示。这种工作方式是直接用伪噪声序列对载波进行调制,要传送的数据信息需要经过信道编码后,与伪噪声序列进行模2和生成复合码去调制载波。接收机在收到发射信号后,首先通过伪码同步捕获发送来的伪码的精确相位,并由此产生跟发送端的伪码相位完全一致的伪码序列,作为本地解扩信号,以便能够及时恢复出数据信息,完成整个直扩通信系统的信号接收[12]。

图4.1直序扩频系统原理图在发射机端,要传送的信息先转换成二进制数据或符号,与伪噪声码(PN码)进行模2和运算后形成复合码,再用该复合码去直接调制载波。通常为提高发射机的工作效率和发射功率,扩频系统中一般采用平衡调制器。抑制载波的平衡调制对提高扩频信号的搞侦破能力也十分有利。在接收机端,用与发射机端完全同步的PN码对接收信号进行解扩后经解调器还原输出原始数据信息。
4.2 直接序列扩频系统的仿真以图4.1的扩频系统为基础,本文将对其进行SystemView仿真。下图4.2是作者的仿真原理图。本次仿真仅用来说明直序扩频在抗干扰方面的优越性,所以未按实际工程中使用的常规直序扩频原理建模,而是直接采用了比较简单而直接的方式来构造模型。数据信号源使用了一个较低频率(1kHz)的随机序列(图符0)通过一个1kHz的低通滤波器(图符3)来代替。扩频用的PN码采用了10kHz的PN码(图符2),这样理论上可以获得10倍的扩频增益。扩频调制也未使用通常的模2和加法运算,而是通过乘法器直接用PN码调制数据信号,合成后的扩频复合信号同样也是直接用更高的载波(图符12,100kHz)调制发射,省去了常规的平衡调制等步骤。为了观察扩频系统的抗干扰性能,使用了一个干扰信号源。该干扰信号可以是单频率窄带干扰,也可以是宽带的扫频信号,或者是高斯噪声,在这里我们使用90kHz-120kHz的扫频脉冲信号源。

图4.2 简化的直接序列扩频系统仿真结构图为简单起见,在接收端,通过本地载波解调后的复合信号直接与原扩频PN码相乘后解扩,中间省略了有关本地PN发生器和相关的码同步电路。因为直接使用原PN码,所以理论上可认为收发两端是完全同步的。不过在实现的工程中,码同步是一个十分复杂的问题,其复杂程度也及在此问题上付出的代价往往比扩频本身要多得多。由于作者水平有限,因而在此只作一些简单的仿真,以体现直序扩频系统的基本特性。
而作为SystemView仿真滤波器的一个实例,此例中两次采用到滤波器。
第一次使用到滤波器是图符3,这个滤波器是一个1kHz的巴特沃斯模拟低通滤波器,此时的作用是使用了一个较低频率(1kHz)的随机序列(图符0)通过它来代替数据信号源。图4.3所示即是经过此滤波器后的输入信号波形,也是模拟的数据信号源。

图4.3 仿真的数据信号源在图符1处,原信号源与PN码调制,扩频。而后在图符11处,与本地载波调制。
图4.4为还没有加干扰信号时的已调信号频谱图。此时模拟的数据信号源已通过乘法器直接用PN码调制数据信号,合成后的扩频复合信号用更高的载波(图符12,100kHz)调制发射。此时输出即是图4.4。
图4.4 没加干扰信号时的已调信号频谱图此时我们可以看到,原数据信号源的频谱已经扩展。
图符8是我们所设置的干扰源,为一个扫频脉冲信号源。通过加法器相加后,已调信号的频谱会产生变化,此时的频谱如图4.5所示。由图可知,此时的频谱在100kHz附近有较强的干扰存在。我们设置这个干扰的目的即是验证此系统的抗干扰能力,验证此系统在这个信号的干扰下是否能够恢复出与原信号相似的波形。
图4.5 加干扰信号后的已调信号频谱图此后是接收端仿真部分。在图符7处,已调信号与本地载波相乘解调,之后要解扩,由于PN码的同步较难实现,基于作者水平有限,故而使用之前扩频时的原PN码。
图符10是我们在此例中使用的第二个滤波器。此时作整形之用。同之前一样,这是一个1kHz的巴特沃斯模拟低通滤波器,由于我们所仿真的信号源实际是由一个随机序列经一个1kHz的巴特沃斯模拟低通滤波器而得,故而在输出时,也要使用一个相同滤波器整形。
图4.6即为解扩后整形的输出信号波形图。
图4.6 解扩后整形的输出信号波形图从以上波形可以看出,在100kHz附近有较强的干扰存在,而解扩后的信号与输入的原信号波形基本一致,并没有受到干扰的影响。但如果不断加大噪声或干扰的幅度,当达到系统的干扰门限时,则不能准确地恢复原始波形。
接着我们着重验证此系统中两个滤波器的作用。
为了能更清楚的演示出滤波器存在与否的差别,我们建立如图4.7的一个系统。

图4.7 识别滤波器建立的系统图中上下两部分拥有相同的结构、相同的信号源、相同的编解码和相同的干扰。此时我们可以看到,图符9和图符28的输出波形是一模一样的。在这种情况下,去掉滤波器的影响就会很明显地体现出来。
首先,我们在下半部分的流程中去掉第一个滤波器,此时的输入信号变为:

图4.7 使用滤波器一时的输入波形图4.8 不使用滤波器一时输入波形可看出,信号源经过巴特沃斯滤波器后,时域特性按照巴特沃斯滤波器的特性发生改变。
加入干扰源后,由Sink15和Sink22的输出可

Popular Window Clean Robot


China Window Cleaning Robot is very popular. window cleaning robot china sale very many and large quanity .

we supply and produce small window cleaning robot in the world. window cleaning robot cordless sale very good .

automatic window cleaning robot clean window glass,welcome to enquiry.


window clean robot

Popular Window Clean Robot

window cleaning robot china,window cleaning robot home,small window cleaning robot,window cleaning robot cordless,automatic window cleaning robot

Zhengzhou Bangmi Smart Technology Co., Ltd. , https://www.zzbhrobot.com