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. Keywords: SystemView, MATLAB, FIR filter, IIR filter, simulation of direct sequence spread spectrum system KEY WORDS SystemView, MATLAB, FIR filter, IIR filter, Direct-sequence spread spectrum Chapter 1 Introduction 1 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. 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. ω ω ω Figure 2.1 Ideal low-pass, high-pass, band-pass, band-reject filter amplitude characteristics (2.3) (2.4) (2.5) The corresponding difference equation is (2.7) (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). (3.4) 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]. Figure 3.3 Frequency characteristics of the designed FIR filter Figure 3.4 The phase characteristics of the designed FIR filter From this you can write the MATLAB program, see Appendix 3. Figure 3.5 Amplitude-frequency characteristics of FIR filter (3.9) When N is odd (N = 2m + 1), 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. 图3.7 æ¤åœ†æ»¤æ³¢å™¨å¢žç›Šå“应波形图按â€Timeâ€å¯çœ‹åˆ°å¦‚下图3.8ä¸çš„特性曲线图3.8 æ¤åœ†æ»¤æ³¢å™¨ç‰¹æ€§æ›²çº¿ç”±æ¤ï¼Œæˆ‘们å¯çœ‹å‡ºå…¶ç‰¹æ€§ä»¿çœŸä¸ŽMATLABä¸çš„仿真结果是相å»åˆçš„。 (3.12) å…¶ä¸ï¼šk=1,3,5,… 图3.9 方波分解原ç†æ¡†å›¾ 图ä¸å°†è¾“出信å·åŠ 到一个滤波器组,其ä¸æ¯ä¸€ä¸ªå•å…ƒæ»¤æ³¢å™¨ä¸å¿ƒé¢‘率ç‰äºŽä¿¡å·çš„å„次è°æ³¢é¢‘率。在滤波器输出端得到分开æ¥çš„基频信å·å’Œå„次è°æ³¢ä¿¡å·ã€‚ 图3.11 ä¿¡å·åˆ†è§£ä»¿çœŸæ¨¡åž‹å›¾3.12 ä¿¡å·åˆæˆä»¿çœŸæ¨¡åž‹ 如图3.9所示,将信å·è¿›è¡Œé€‰é¢‘滤波,滤出第1ã€3ã€5ã€7ã€9å’Œ11次è°æ³¢ï¼ˆå¶æ¬¡è°æ³¢ä¸º0),系统å–æ ·é€ŸçŽ‡ä¸º1000Hz,å–æ ·ç‚¹æ•°ä¸º20480,滤波器的带宽å–2Hz。多å–一些点数是为了å‡å°‘截æ–误差。使FFT更接近周期信å·çš„离散频谱。 图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.19 时域å•ä½å“应曲线å•å‡»å¢žç›Šâ€Gainâ€é€‰é¡¹ï¼Œå¯ä»¥çœ‹åˆ°å¦‚图3.20所示的增益å“应波形图。 图3.21 FIR滤波器相ä½å“应曲线å¯çœ‹åˆ°ï¼ŒSystemView的仿真结果与MATLABå‡ ä¹Žå¦‚å‡ºä¸€è¾™ã€‚ 图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.25 ä¸æ»¡è¶³å¥ˆå¥Žæ–¯ç‰¹ç¬¬ä¸€å‡†åˆ™æ—¶è¾“出信å·ä¸çš„错误脉冲从仿真结果ä¸ï¼Œæˆ‘们å¯ä»¥çœ‹åˆ°FIRæ•°å—滤波器将高斯噪声很好的滤除,得到与原伪éšæœºç 相一致的信å·ï¼Œæ»¤æ³¢æ•ˆæžœæ˜Žæ˜¾ã€‚ 图3.26 图3.27 图3.29 仿真界é¢åœ¨æ¤ä¾‹ä¸ï¼Œsink5输出的是通过M-link调用MATLAB函数得到的波形,而sink2输出的是直接使用SystemView的相应图符实现的相åŒçš„滤波器。在æ¤ä¾‹ä¸ä½œè€…使用的是方波信å·ã€‚在图3.30和图3.31ä¸æˆ‘们å¯ä»¥çœ‹åˆ°è¿™ä¸¤ç§æ–¹å¼åœ¨åˆ†æžçª—å£æ‰€å¾—到的结果。 图3.30 Sink5输出波形(调用MATLAB函数实现) 图3.31 Sink3输出波形(直接使用SystemView图符) 图4.1ç›´åºæ‰©é¢‘系统原ç†å›¾åœ¨å‘射机端,è¦ä¼ é€çš„ä¿¡æ¯å…ˆè½¬æ¢æˆäºŒè¿›åˆ¶æ•°æ®æˆ–符å·ï¼Œä¸Žä¼ªå™ªå£°ç (PNç )进行模2å’Œè¿ç®—åŽå½¢æˆå¤åˆç ,å†ç”¨è¯¥å¤åˆç 去直接调制载波。通常为æ高å‘射机的工作效率和å‘射功率,扩频系统ä¸ä¸€èˆ¬é‡‡ç”¨å¹³è¡¡è°ƒåˆ¶å™¨ã€‚抑制载波的平衡调制对æ高扩频信å·çš„æžä¾¦ç ´èƒ½åŠ›ä¹Ÿå分有利。在接收机端,用与å‘射机端完全åŒæ¥çš„PNç 对接收信å·è¿›è¡Œè§£æ‰©åŽç»è§£è°ƒå™¨è¿˜åŽŸè¾“出原始数æ®ä¿¡æ¯ã€‚ 图4.2 简化的直接åºåˆ—扩频系统仿真结构图为简å•èµ·è§ï¼Œåœ¨æŽ¥æ”¶ç«¯ï¼Œé€šè¿‡æœ¬åœ°è½½æ³¢è§£è°ƒåŽçš„å¤åˆä¿¡å·ç›´æŽ¥ä¸ŽåŽŸæ‰©é¢‘PNç 相乘åŽè§£æ‰©ï¼Œä¸é—´çœç•¥äº†æœ‰å…³æœ¬åœ°PNå‘生器和相关的ç åŒæ¥ç”µè·¯ã€‚å› ä¸ºç›´æŽ¥ä½¿ç”¨åŽŸPNç ,所以ç†è®ºä¸Šå¯è®¤ä¸ºæ”¶å‘两端是完全åŒæ¥çš„。ä¸è¿‡åœ¨å®žçŽ°çš„工程ä¸ï¼Œç åŒæ¥æ˜¯ä¸€ä¸ªå分å¤æ‚的问题,其å¤æ‚程度也åŠåœ¨æ¤é—®é¢˜ä¸Šä»˜å‡ºçš„代价往往比扩频本身è¦å¤šå¾—多。由于作者水平有é™ï¼Œå› 而在æ¤åªä½œä¸€äº›ç®€å•çš„仿真,以体现直åºæ‰©é¢‘系统的基本特性。 图4.3 仿真的数æ®ä¿¡å·æºåœ¨å›¾ç¬¦1处,原信å·æºä¸ŽPNç 调制,扩频。而åŽåœ¨å›¾ç¬¦11处,与本地载波调制。 图4.7 识别滤波器建立的系统图ä¸ä¸Šä¸‹ä¸¤éƒ¨åˆ†æ‹¥æœ‰ç›¸åŒçš„结构ã€ç›¸åŒçš„ä¿¡å·æºã€ç›¸åŒçš„编解ç 和相åŒçš„干扰。æ¤æ—¶æˆ‘们å¯ä»¥çœ‹åˆ°ï¼Œå›¾ç¬¦9和图符28çš„è¾“å‡ºæ³¢å½¢æ˜¯ä¸€æ¨¡ä¸€æ ·çš„ã€‚åœ¨è¿™ç§æƒ…况下,去掉滤波器的影å“就会很明显地体现出æ¥ã€‚ 图4.7 使用滤波器一时的输入波形图4.8 ä¸ä½¿ç”¨æ»¤æ³¢å™¨ä¸€æ—¶è¾“入波形å¯çœ‹å‡ºï¼Œä¿¡å·æºç»è¿‡å·´ç‰¹æ²ƒæ–¯æ»¤æ³¢å™¨åŽï¼Œæ—¶åŸŸç‰¹æ€§æŒ‰ç…§å·´ç‰¹æ²ƒæ–¯æ»¤æ³¢å™¨çš„特性å‘生改å˜ã€‚
Popular Window Clean Robot
China Window Cleaning Robot is very popular. window cleaning robot china sale very many and large quanity .
automatic window cleaning robot clean window glass,welcome to enquiry.
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
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.
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.
table of Contents
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
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
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
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:
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
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
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)
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:
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
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)
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.
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.
After the program runs, you can see the amplitude-frequency characteristics of the designed 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
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)
(3.11)
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.2.2æ¤åœ†æ»¤æ³¢å™¨æ•ˆæžœéªŒè¯ï¼ˆæ–¹æ³¢ä¿¡å·çš„åˆæˆåˆ†è§£ï¼‰
在æ¤èŠ‚ä¸ï¼Œä¸ºäº†æ›´å¥½çš„论è¯æ¤åœ†æ»¤æ³¢å™¨çš„特性,设计了一个仿真系统–方波信å·çš„åˆæˆä¸Žåˆ†è§£ï¼Œå€Ÿæ¤é˜æ˜Žå…¶æ»¤æ³¢ä½œç”¨ã€‚
1.ä¿¡å·åˆ†è§£ä¸ŽåˆæˆåŽŸç†ä¸ºäº†ä¾¿äºŽç ”究信å·ä¼ 输和信å·å¤„ç†ç‰é—®é¢˜ï¼Œå¾€å¾€å°†ä¸€äº›ä¿¡å·åˆ†è§£ä¸ºæ¯”较简å•ï¼ˆåŸºæœ¬ï¼‰çš„ä¿¡å·åˆ†é‡ä¹‹å’Œã€‚分解的方法有多ç§ï¼Œå¸¸è§çš„分æžæ–¹æ³•æœ‰ï¼šç›´æµåˆ†é‡ä¸Žäº¤æµåˆ†é‡ï¼Œå¶åˆ†é‡ä¸Žå¥‡åˆ†é‡ï¼Œè„‰å†²åˆ†é‡å’Œæ£äº¤å‡½æ•°é›†ç‰ã€‚å…¶ä¸å°†ä¿¡å·åˆ†è§£ä¸ºæ£äº¤å‡½æ•°é›†çš„ç ”ç©¶æ–¹æ³•åœ¨ä¿¡å·ä¸Žç³»ç»Ÿç†è®ºä¸å 有é‡è¦åœ°ä½ã€‚å‚…ç«‹å¶åˆ†æžæ³•æ˜¯å¸¸è§çš„一ç§ï¼Œä¸€ä¸ªå¶å¯¹ç§°çš„矩形信å·å¯åˆ†è§£ä¸ºï¼š
它åªå«æœ‰1,3,5ç‰å¥‡æ¬¡è°æ³¢åˆ†é‡[9]。
分解方法如图所示。
将图3.9所得到的基波和å„次è°æ³¢åˆ†é‡é€åˆ°ä¸€ä¸ªåŠ 法器输入端(如图3.10所示)é‡æ–°åˆæˆï¼ŒåˆæˆåŽçš„æ³¢å½¢ä»ŽåŠ æ³•å™¨è¾“å‡ºç«¯å¾—åˆ°ã€‚
图3.10 方波åˆæˆæ–¹æ¡ˆåŽŸç†æ¡†å›¾
2.仿真系统实现在SystemViewçŽ¯å¢ƒä¸Šï¼Œç”¨çº¿æ€§æ»¤æ³¢å™¨ï¼ŒåŠ æ³•å™¨ï¼Œä¹˜æ³•å™¨å¯å®žçŽ°æ³¢å½¢åˆæˆä¸Žåˆ†è§£ã€‚对应的仿真系统模型如图3.11å’Œ3.12所示。图3.11所示为信å·åˆ†è§£ä»¿çœŸæ¨¡åž‹ï¼Œè¢«åˆ†è§£ä¿¡å·ä¸ºæ–¹æ³¢ï¼Œå°†æ–¹æ³¢ä¿¡å·åˆ†è§£ä¸ºå‰6个ä¸ä¸ºé›¶çš„è°æ³¢åˆ†é‡ã€‚图3.12为信å·åˆæˆç³»ç»Ÿæ¨¡åž‹ï¼Œå°†åˆ†è§£åŽçš„ä¿¡å·åˆæˆã€‚
观察图3.13和图3.14å¯ä»¥çœ‹åŽŸæ–¹æ³¢ä»¥åŠç»æ»¤æ³¢å™¨åˆ†è§£åŽçš„å„è°æ³¢å åŠ æ³¢å½¢ï¼Œç”±æ¤å¯ä»¥æ¸…楚地看出å„次è°æ³¢ä¸ŽåŽŸä¿¡å·çš„频率关系。
我们从仿真结果ä¸å¯ä»¥æ¸…楚的看到,æ¤åœ†æ»¤æ³¢å™¨å¯ä»¥å°†æ–¹æ³¢ä¿¡å·åˆ†è§£æˆå¤šä¸ªä¸åŒå¹…值ã€ä¸åŒé¢‘率的æ£å¼¦æ³¢ä¿¡å·ï¼Œæ»¡è¶³äº†ç†è®ºä¸åˆ†è§£æƒ…况。åŒæ—¶åˆå°†åˆ†è§£åŽçš„æ£å¼¦æ³¢é‡æ–°åˆæˆï¼Œå¾—到较好的方波信å·ï¼Œæ¤åœ†æ»¤æ³¢å™¨å®žçŽ°äº†å…¶æ»¤æ³¢ä½œç”¨ã€‚
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.20 FIR滤波器增益å“应曲线å•å‡»â€phaseâ€é€‰é¡¹ï¼Œä¹Ÿå¯çœ‹åˆ°å¦‚图3.21所示的相ä½å“应。
3.2.4 FIR滤波器效果验è¯ï¼ˆå¥ˆå¥Žæ–¯ç‰¹å‡†åˆ™ä»¿çœŸï¼‰
为了更好的论è¯FIRæ•°å—滤波器的特性,设计奈奎斯特准则仿真系统,é˜æ˜ŽFIRæ•°å—滤波器的滤波作用。
奈奎斯特第一准则:
ä¿¡å·åœ¨æ— 噪声的信é“ä¸ä¼ 输时,对于二进制信å·çš„最大数æ®ä¼ 输率Rmax与通信信é“带宽B(B=f,å•ä½æ˜¯Hz)的关系å¯ä»¥å†™ä¸ºï¼š Rmax=2*f(bps) [4]。å³è§„定带é™ä¿¡é“çš„ç†æƒ³ä½Žé“截æ¢é¢‘率为fHæ—¶,æœ€é«˜çš„æ— ç é—´å¹²æ‰°ä¼ è¾“çš„æžé™é€Ÿåº¦ä¸º2fH。
下图3.23所示为通过å‡ä½™å¼¦æ»šé™æ»¤æ³¢å™¨åŽçš„ä¿¡å·ä¸ŽåŽŸè¾“入信å·çš„波形å åŠ ã€‚
图3.23 ç»è¿‡å‡ä½™å¼¦æ»šé™æ»¤æ³¢å™¨æ•´å½¢åŽçš„ä¿¡å·ä¸ŽåŽŸä¿¡å·å åŠ å›¾3.24为输入信å·æ³¢å™¨ä¸ŽæŽ¥æ”¶ä¿¡å·æ³¢å™¨çš„å åŠ ï¼Œå¯è§‚察到收å‘æ³¢å½¢åŸºæœ¬ä¸€è‡´ï¼ŒåŠ å…¥ä¸€å®šå¹…åº¦çš„å™ªå£°ä»ç„¶èƒ½æ£å¸¸ä¼ 输。奈奎斯特第一准则得以验è¯ã€‚将输入信å·çš„波特率由100bps改为110bps,æ¤æ—¶çš„æ¡ä»¶å·²ä¸æ»¡è¶³å¥ˆå¥Žæ–¯ç‰¹ç¬¬ä¸€å‡†åˆ™ï¼Œé‡æ–°è¿è¡Œç³»ç»Ÿï¼Œå¯è§‚察到信å·ä¼ 输错误,如图3.25所示。改å˜å™ªå£°å¹…度,错误波形å¯èƒ½å¢žå¤šã€‚
图3.24 输入信å·ä¸Žè¾“出信å·çš„波形å åŠ
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库管ç†çª—å£ç•Œé¢ã€‚
å…¶ä¸ï¼Œâ€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.28
为æ£ç¡®åœ°åœ¨MATLABå’ŒSystemView之间交æ¢æ•°æ®ã€ä¼ 递å‚数,必须对M-LINKä¸å…³äºŽæ•°æ®ã€å‚æ•°ä¼ é€’çš„ä¸€äº›è§„å®šä½œä¸€äº›äº†è§£ã€‚ä¾‹å¦‚ï¼Œå®šä¹‰ä¸€ä¸ªå¯¹ä¿¡å·è¿›è¡Œç›´æµå置的函数,è¦å°†ä¸€ä¸ªè¾“入信å·xå åŠ ä¸€ä¸ªç›´æµæˆä»½ï¼ˆå¸¸æ•°c)åŽè¾“出为y[11]。
为了对利用M-Link进行仿真有一个具体的感性认识,作者以一个实例进行简è¦çš„说明。作为对比,åŒæ—¶ä½¿ç”¨SystemViewç®—å库ä¸çš„相应图符和一个由MATLAB定义的外部函数。
本例ä¸çš„SystemView图符和M-link调用函数的方å¼çš„作用都是滤波。所用信å·æºä¸ºä¸€æ–¹æ³¢ã€‚
所调用MATLAB函数å³ä¸ºä¹‹å‰åœ¨MATLAB滤波器仿真ä¸å·²å®žçŽ°è¿‡çš„æ¤åœ†å¸¦é€šæ»¤æ³¢å™¨ã€‚æ¤æ—¶ç›´æŽ¥è°ƒç”¨ä¹‹å‰å·²ç»ç¼–好的程åºå³å¯ã€‚
仿真界é¢å¦‚图3.29所示。
由结果我们å¯ä»¥çœ‹åˆ°ï¼Œä¸¤ç§æ–¹å¼å®žçŽ°çš„ç»“æžœæ˜¯ä¸€æ¨¡ä¸€æ ·çš„ã€‚
ç¬¬å››ç« ä»¿çœŸåº”ç”¨â€“ç›´æŽ¥åºåˆ—扩频仿真在实际应用ä¸ï¼Œæ»¤æ³¢å™¨æœ‰å¾ˆå¤šä¸åŒçš„作用。它主è¦æ˜¯åœ¨é¢‘域ä¸å¯¹è¾“入信å·è¿›è¡Œæ»¤æ³¢ï¼Œåªå…许一定æ¡ä»¶çš„频率通过。通常用作滤波整形和预处ç†ç‰ä½œç”¨ã€‚æ¯”å¦‚æœ€å…¸åž‹çš„æŠ½æ ·å®šç†çš„仿真ä¸å°±ä¼šç”¨åˆ°ä¸¤ä¸ªå·´ç‰¹æ²ƒæ–¯ä½Žé€šæ»¤æ³¢å™¨ï¼Œå‰ä¸€ä¸ªä½Žé€šæ»¤æ³¢å™¨æ˜¯ä¸ºäº†æ»¤é™¤é¢‘率过高的输入信å·ï¼Œé˜²æ¢å‡ºçŽ°é¢‘谱混è¿çŽ°è±¡ï¼Œäº§ç”Ÿæ··è¿å™ªå£°ï¼Œå½±å“æ¢å¤å‡ºçš„ä¿¡å·è´¨é‡ã€‚åŽé¢ä¸€ä½Žé€šæ»¤æ³¢å™¨æ˜¯ä¸ºäº†ä»ŽæŠ½æ ·åºåˆ—ä¸æ¢å¤å‡ºä¿¡å·ï¼Œæ»¤é™¤æŠ½æ ·ä¿¡å·ä¸çš„高次è°æ³¢åˆ†é‡ã€‚
åœ¨æœ¬ç« èŠ‚ä¸ï¼Œä½œè€…å°±å°†ä»¥æŠ½æ ·å®šç†çš„仿真为实例,详细讲述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.2 直接åºåˆ—扩频系统的仿真以图4.1的扩频系统为基础,本文将对其进行SystemView仿真。下图4.2是作者的仿真原ç†å›¾ã€‚本次仿真仅用æ¥è¯´æ˜Žç›´åºæ‰©é¢‘在抗干扰方é¢çš„优越性,所以未按实际工程ä¸ä½¿ç”¨çš„常规直åºæ‰©é¢‘原ç†å»ºæ¨¡ï¼Œè€Œæ˜¯ç›´æŽ¥é‡‡ç”¨äº†æ¯”较简å•è€Œç›´æŽ¥çš„æ–¹å¼æ¥æž„é€ æ¨¡åž‹ã€‚æ•°æ®ä¿¡å·æºä½¿ç”¨äº†ä¸€ä¸ªè¾ƒä½Žé¢‘率(1kHz)的éšæœºåºåˆ—(图符0)通过一个1kHz的低通滤波器(图符3)æ¥ä»£æ›¿ã€‚扩频用的PNç 采用了10kHzçš„PNç (图符2ï¼‰ï¼Œè¿™æ ·ç†è®ºä¸Šå¯ä»¥èŽ·å¾—10å€çš„扩频增益。扩频调制也未使用通常的模2å’ŒåŠ æ³•è¿ç®—,而是通过乘法器直接用PNç 调制数æ®ä¿¡å·ï¼ŒåˆæˆåŽçš„扩频å¤åˆä¿¡å·åŒæ ·ä¹Ÿæ˜¯ç›´æŽ¥ç”¨æ›´é«˜çš„载波(图符12,100kHz)调制å‘射,çœåŽ»äº†å¸¸è§„的平衡调制ç‰æ¥éª¤ã€‚为了观察扩频系统的抗干扰性能,使用了一个干扰信å·æºã€‚该干扰信å·å¯ä»¥æ˜¯å•é¢‘率窄带干扰,也å¯ä»¥æ˜¯å®½å¸¦çš„扫频信å·ï¼Œæˆ–者是高斯噪声,在这里我们使用90kHz-120kHz的扫频脉冲信å·æºã€‚
而作为SystemView仿真滤波器的一个实例,æ¤ä¾‹ä¸ä¸¤æ¬¡é‡‡ç”¨åˆ°æ»¤æ³¢å™¨ã€‚
第一次使用到滤波器是图符3,这个滤波器是一个1kHz的巴特沃斯模拟低通滤波器,æ¤æ—¶çš„作用是使用了一个较低频率(1kHz)的éšæœºåºåˆ—(图符0)通过它æ¥ä»£æ›¿æ•°æ®ä¿¡å·æºã€‚图4.3所示å³æ˜¯ç»è¿‡æ¤æ»¤æ³¢å™¨åŽçš„输入信å·æ³¢å½¢ï¼Œä¹Ÿæ˜¯æ¨¡æ‹Ÿçš„æ•°æ®ä¿¡å·æºã€‚
图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的一个系统。
首先,我们在下åŠéƒ¨åˆ†çš„æµç¨‹ä¸åŽ»æŽ‰ç¬¬ä¸€ä¸ªæ»¤æ³¢å™¨ï¼Œæ¤æ—¶çš„输入信å·å˜ä¸ºï¼š
åŠ å…¥å¹²æ‰°æºåŽï¼Œç”±Sink15å’ŒSink22的输出å¯