ch09
- 格式:pdf
- 大小:668.04 KB
- 文档页数:45
数字音频技术音频接口1610639528@文字内容来源于网络,如有侵权请联系邮箱接口与接头•接口(interface)和连接器(接头connecctor)•不同的音频标准都需要定义各自的的硬件接口标准,硬件接口定义了电子设备之间连接的物理特性,包括传输的信号频率、强度,以及相应连线的类型、数量,还包括插头、插座的机械结构设计。
•连接器是接口在物理上的实现,是实现电路互连的装置。
人们习惯于将接头分成两类:公头(或阳头)和母头(或阴头),即插头(英文:Male connector、plug)和插座(英文:Female connector、socket)。
•在实际应用中,由于习惯,人们经常将接口(interface)和接头(connector)二者不加区分的通用。
内容概要TRS接口•模拟音频接口RCA接口XLR接口模拟音频接口•TRS 接头•TRS 接头是一种常见的音频接头。
•TRS 的含义是Tip(signal)、Ring(signal)、Sleeve(ground)。
分别代表了该接头的3 个接触点。
•TRS 插头为圆柱体形状,触点之间,用绝缘的材料隔开。
•TRS 接头•为了适应不同的设备需求,TRS 有三种尺寸:1/4"(6.3 mm) ,1/8"(3.5mm),3/32"(2.5mm)•TRS 接头•从左至右尺寸依次为:2.5mm ,3.5mm, 6.3 mm• 2.5mm 接头在手机类便携轻薄型产品上比较常见,因为接口可以做的很小;3.5mm 接头在PC 类产品以及家用设备上比较常见,也是我们最常见到的接口类型;6.3mm 接头是为了提高接触面以及耐用度设计的模拟接头,常见于监听等专业音频设备上。
•TRS 接头•1/8" (3.5mm)TRS 接头(俗称:小三芯)• 3.5mmTRS 接头又叫做小三芯或者立体声接头,这是我们目前看到的最主要的声卡接口,除此之外,包括绝大部分MP3 播放器,MP4 播放器和部分音乐手机的耳机输出输出接口也使用这种接头。
第九章 LCD控制器LCD控制器提供PXA250與PXA210至被動(DSTN)或主動(TFT)面版顯示器的一個介面。
支援單色顯示與彩色像素格式(請參考第7-2頁,7.1.1節「特色」)。
此章節包含以下主題:z9.1節「概觀」z9.2節「LCD控制器操作」z9.3節「詳細模組說明」z9.4節「LCD外部調色盤與訊框緩衝區」z9.5節「功能時序」z9.6節「暫存器說明」9.1 概觀應用處理器LCD控制器支援單一或雙個顯示面版。
由核心所產生的編碼過的向素資料以、2、、8或16位元的增量儲存在外部記憶體內之訊框緩衝區。
資料以需求為基礎自外部記憶體抓取而載入至先進先出(FIFO)緩衝區,使用LCD控制器之雙通道DMA控制器(DMAC)。
單一面版使用一個通道,若雙面版則使用兩個通道。
訊框緩衝區資料包含編碼過的像素值,LCD控制器使用這些資料做為索引一個256通道×16位元寬的面版的指標。
為了每個像素16位元訊框緩衝區通道,會越過調色版RAM。
單色調色版通道為8位元寬,而彩色調色版則為16位元寬。
編碼像素資料決定可能的色彩,如下所示:z1位元寬像素位址調色版之上方2個位置z2位元寬像素位址調色版之上方4個位置z4位元寬像素位址調色版之上方16個位置z8位元寬像素位址調色版之上方256通道之任何一個z16位元寬像素越過調色版當啟動被動彩色16位元像素模式,彩色像素值會越過調色版而dither邏輯直接被送至LCD控制器的資料腳位。
每個訊框都會由LCD控制器的DMAC載入調色版RAM。
一旦編碼的像素值被用來選擇調色版通道,在通道內程式化的值會被傳送至dither邏輯,使用Temporal Modulated Energy Distribution(TMED)dithering演算法製造送至螢幕之像素資料。
Dithering為藉由重複多工處理LCD螢幕上不同的彩色像素來從調色版通道產生額外色彩的技術。
這就是大家所熟悉的訊框率控制(Frame Rate Control)。
CHAPTER 9AN INTRODUCTION TO ASSET PRICING MODELSTRUE/FALSE QUESTIONS(t) 1 One of the assumptions of Capital Market Theory is that investors can borrow or lend at the risk-free rate.(f) 2 An assumption of Capital Market Theory is that buying or selling of assets entailsno taxes, but entails significant transaction costs.(t) 3 A risky asset is an asset with uncertain future returns, and uncertainty (or risk) is measured by the variance or standard deviation of returns.(t) 4 The standard deviation of a portfolio that combines the risk-free asset with risky assets is the linear proportion of the standard deviation of the risky asset portfolio.(t) 5 The Capital Market Line (CML) is the line from the intercept point that represents the risk-free rate tangent to the original efficient frontier.(t) 6 The market portfolio consists of all risky assets.(f) 7 All portfolios on the CML are perfectly negatively correlated, which means thatall portfolios on the CML are perfectly negatively correlated with thecompletely diversified market portfolio since it lies on the CML.(t) 8 Diversification reduces the unsystematic risk in a portfolio.(f) 9 The Capital Asset Pricing Model (CAPM) is a technique for determining theexpected risk on an asset.(t) 10 Beta is a standardized measure of systematic risk.(t) 11 Multifactor models of risk and return can be broadly grouped into models that use macroeconomic factors and models that use microeconomic factors.(f) 12 Arbitrage Pricing Theory (APT) specifies the exact number of risk factors andtheir identity388MULTIPLE CHOICE QUESTIONS(d) 1 Which of the following is not an assumption of the Capital Market Theory?a)All investors are Markowitz efficient investors.b)All investors have homogeneous expectations.c)There are no taxes or transaction costs in buying or selling assets.d)There are no risk-free assets.e)All investors have the same one period time horizon.(e) 2 The market portfolio consists of alla)New York Stock Exchange stocks.b)International stocks and bonds.c)Stocks and bonds.d)U.S. and non-U.S. stocks and bonds.e)Risky assets.(c) 3 The separation theorems divides decisions on from decisions on .a)Lending, borrowingb)Risk, returnc)Investing, financingd)Risky assets, risk free assetse)Buying stocks, buying bonds(d) 4 When identifying undervalued and overvalued assets, which of the followingstatements is false?a)An asset is properly valued if its estimated rate of return is equal to itsrequired rate of return.b)An asset is considered overvalued if its estimated rate of return is below itsrequired rate of return.c)An asset is considered undervalued if its estimated rate of return is above itsrequired rate of return.d)An asset is considered overvalued if its required rate of return is below itsestimated rate of return.e)None of the above (that is, all are true statements)(b) 5 Utilizing the security market line an investor o wning a stock with a beta of (-2)would expect the stock's return to in a market thata)Rise or fall an indeterminate amountb)Rise by 20.0%389c)Fall by 20.0%d)Rise by 10.2%e)Fall by 10.2%(d) 6 The Capital Market Line (CML) refers to the efficient formed by creatingportfolios thata)Invest solely in the market portfolio M.b)Lend at the risk free asset and invest in the market portfolio.c)Borrow at the risk free asset and invest in the market portfolio.d)Lend and borrow at the risk free rate and invest in the market portfolio.e)Short sell the market portfolio.(e) 7 As the number of stocks in a portfolio increasesa)The expected return of the portfolio increases because systematic riskdecreases.b)The expected return of the portfolio increases because unsystematic riskdecreases.c)The standard deviation of the portfolio increases because systematic riskincreases.d)The standard deviation of the portfolio decreases because systematic riskincreases.e)The standard deviation of the portfolio decreases because unsystematic riskdecreases.(a) 8 The Security Market Line (SML) represents the relation betweena)Risk and required return on an asset.b)Systematic risk and required return on an asset.c)Risk and return on a diversified portfolio of assets.d)Unsystematic risk and required return on an assete)Systematic risk and required return on a diversified portfolio of assets.(a) 9 In a macro-economic based risk factor model the following factor would be oneof many appropriate factorsa)Confidence risk.b)Maturity risk.c)Expected inflation risk.d)Call risk.e)Return difference between small capitalization and large capitalization stocks.(d) 10 In a multifactor model, confidence risk representsa)Unanticipated changes in the level of overall business activity.390b)Unanticipated changes in investors’ desired time to receive payouts.c)Unanticipated changes in short term and long term inflation rates.d)Unanticipated changes in the willingness of investors to take on investmentrisk.e)None of the above.(b) 11 In a multifactor model, time horizon risk representsa)Unanticipated changes in the level of overall business activity.b)Unanticipated changes in investors’ desired time to receive payouts.c)Unanticipated changes in short term and long term inflation rates.d)Unanticipated changes in the willingness of investors to take on investmentrisk.e)None of the above.(e) 12 In a micro-economic based risk factor model the following factor would be oneof many appropriate factorsa)Confidence risk.b)Maturity risk.c)Expected inflation risk.d)Call risk.e)Return difference between small capitalization and large capitalization stocks.391MULTIPLE CHOICE PROBLEMS(b) 1 Consider an asset that has a beta of 1.5. The return on the risk-free asset is 6.5%and the expected return on the stock index is 15%. The estimated return on theasset is 20%. Calculate the alpha for the asset.a)19.25%b)0.75%c)–0.75%d)9.75%e)9.0%(b) 2 The table below provides factor risk sensitivities and factor risk premia for a threefactor model for a particular asset where factor 1 is MP the growth rate in U.S.industrial production, factor 2 is UI the difference between actual and expectedinflation, and factor 3 is UPR the unanticipated change in bond credit spread.Risk FactorFactorSensitivity(β)RiskPremium(λ)MP 1.760.0259UI -0.8-0.0432UPR 0.87 0.0149Calculate the expected excess return for the asset.a)12.32%b)9.32%c) 4.56%d) 6.32%e)8.02%(b) 3 The variance of returns for a risky asset is 25%. The variance of the error term,Var(e) is 8%. What portion of the total risk of the asset, as measured by variance,is unsystematic?a)32%b)8%c)68%d)25%e)75%(c) 4 An investor wishes to construct a portfolio consisting of a 40% allocation to astock index and a 60% allocation to a risk free asset. The return on the risk-free392asset is 2% and the expected return on the stock index is 10%. The standarddeviation of returns on the stock index 8%. Calculate the expected standarddeviation of the portfolio.a) 5.2%b)8.0%c) 3.2%d) 4.0%e) 1.2%(b) 5 An investor wishes to construct a portfolio by borrowing 35% of his originalwealth and investing all the money in a stock index. The return on the risk-freeasset is 4.0% and the expected return on the stock index is 15%. Calculate theexpected return on the portfolio.a)18.25%b)18.85%c)9.50%d)15.00%e)11.15%(d) 6 An investor wishes to construct a portfolio consisting of a 70% allocation to astock index and a 30% allocation to a risk free asset. The return on the risk-freeasset is 4.5% and the expected return on the stock index is 12%. Calculate theexpected return on the portfolio.a)8.25%b)16.50%c)17.50%d)9.75%e)14.38%(d) 7 A stock has a beta of the stock is 1.1. The risk free rate is 2.5% and the return onthe market is 12%. The estimated return for the stock is 14%. According to theCAPM you shoulda)Sell because required return is 9.95%.b)Sell because required return is 16.5%.c)Buy because required return 11.5%.d)Buy because required return is 12.95%.e)Short because it is undervalued.(b) 8 Consider a risky asset that has a standard deviation of returns of 15. Calculate thecorrelation between the risky asset and a risk free asset.a) 1.0b)0.0393c)-1.0d)0.5e)-0.5(a) 9 The expected return for a stock, calculated using the CAPM, is 10.5%. Themarket return is 9.5% and the beta of the stock is 1.50. Calculate the implied risk-free rate.a)7.50%b)13.91%c)17.50%d)21.88%e)14.38%(d) 10 The expected return for a stock, calculated using the CAPM, is 25%. The risk freerate is 7.5% and the beta of the stock is 0.80. Calculate the implied return on themarket.a)7.50%b)13.91%c)17.50%d)21.88%e)14.38%(c) 11 The expected return for Zbrite stock calculated using the CAPM is 15.5%. Therisk free rate is 3.5% and the beta of the stock is 1.2. Calculate the implied marketrisk premium.a) 5.5%b) 6.5%c)10.0%d)15.5%e)12.0%(d) 12 Calculate the expected return for Express Inc. which has a beta of .69 when therisk free rate is.09 and you expect the market return to be .14.a)0.05%b)13.91%c)10.92%d)12.45%e)14.25%USE THE FOLLOWING INFORMATION FOR THE NEXT THREE PROBLEMS394You expect the risk-free rate (RFR) to be 5 percent and the market return to be 9 percent. You also have the following information about three stocks.CURRENT E XPECTED EXPECTEDSTOCK BETA PRICE PRICE DIVIDENDY 0.50 $ 40 $ 43 $ 1.50Z 2.00 $ 45 $ 49 $ 1.00(b) 13 What are the expected (required) rates of return for the three stocks (in the orderX, Y, Z)?a)16.50%, 5.50%, 22.00%b)11.00%, 7.00%, 13.00%c)7.95%, 11.25%, 11.11%d) 6.20%, 2.20%, 8.20%e)15.00%, 3.50%, 7.30%(a) 14 What are the estimated rates of return for the three stocks (in the order X, Y, Z)?a)7.95%, 11.25%, 11.11%b) 6.20%, 2.20%, 8.20%c)16.50%, 5.50%, 22.00%d)11.00%, 7.00%, 13.00%e)15.00%, 3.50%, 7.30%(e) 15 What is your investment strategy concerning the three stocks?a)Buy stock Y, it is undervalued.b)Buy stock X and Z, they are undervalued.c)Sell stocks X and Z, they are overvalued.d)Sell stock Y, it is overvalued.e)Choices a and cUSE THE FOLLOWING INFORMATION FOR THE NEXT FOUR PROBLEMSYear Return forGBCReturn forMarket1 25 122 10 133 5 174 -13 -155 11 -86 -20 9395(a) 16 Compute the beta for GBC Company using the historic returns presented above.a)0.4255b)0.5929c) 5.6825d)9.4163e)0.3333(e) 17 Compute the correlation coefficient between GBC and the Market Index.a)0.4255b)0.5929c) 5.6825d)9.4163e)0.3333(b) 18 Compute the intercept of the characteristic linea)0.4255b) 1.013c) 1.4385d)0.5875e)0.5219(d) 19 The equation of the characteristic line isa)R GBC + 1.013 = 0.4255(R Market)b)R GBC = 1.013 - 0.4255(R Market)c)R Market = 1.013 + 0.4255(R GBC)d)R GBC = 1.013 + 0.4255(R Market)e)R Market = 1.013 - 0.4255(R Market)396CHAPTER 9ANSWERS TO PROBLEMS1 6.5 + 1.5(15 – 6.5) = 19.25%alpha = 20 –19.25 = 0.75%2 The table below shows the relevant calculationsRisk FactorFactorSensitivity(β)RiskPremium(λ)(β)x(λ)MP 1.760.02590.0456UI -0.8-0.04320.0346UPR 0.870.01490.013Expected return 0.12323 8%/25% = 0.32. = 32% unsystematic.4 0.4(0.08) = 0.032 or 3.2%5 -0.35(4) + 1.35(15) = 18.85%6 E(R)= 0.3(4.5) + 0.7(12) = 9.75%7 E(R)= 2.5 + 1.1(12 – 2.5) = 12.95%. Buy the stock is undervalued.8 The correlation between a risky asset and a risk-freeasset is always zero.9 10.5 = X + 1.5(9.5 – X). X = 7.5%.10 25 = 7.5 + 0.8(X). X = 14.38%. Return on market = 14.38 + 7.5 = 21.88%11 15.5 = 3.5 + 1.2(X). X = 10%.12 k = .09 + .69 (.14 - .09) = .1245 = 12.45%For problems 13 - 15STOCK REQUIRED ESTIMATED EVALUATIONX .05 + 1.50(.09 - .05) = 11% (23 - 22 + 0.75)/22 = 7.95% OvervaluedY .05 + 0.50(.09 -.05) = 7% (43 - 40 + 1.50)/40 = 11.25% UndervaluedZ .05 + 2.00(.09 - .05) = 13% (49 - 45 + 1.00)/45 = 11.11% Overvalued397For problems 16 – 19The table below shows the relevant calculations.(1) (2) (3) (4) (5) (6) (7) (8)x(7)(6)GBCMarketMarketGBC))2(R-E(R ))2R-E(R )R-E(R )Year GBC Market(R-E(R7.33161.2622.0053.731 25 12484.008.337.0058.312 10 1369.3949.0024.6612.332.003 5 174.00152.03-19.67314.72-16.004 -13 -15386.91256.00-12.67-101.368.0064.005 11 -8160.534.33-99.59-23.0018.756 -20 9529.00841.33 358.00 Total 18 281386.003.00004.67Average168.27Variance 277.20Dev. 16.6512.97Std.Covariance 71.60 Correlation 0.33 Beta 0.425516 Beta for GBC Computer is computed as follows:Beta = Cov(GBC, Market)/ Variance MarketBeta = 18.40/82 = 0.224417 The correlation coefficient can be computed as follows:Correlation = Cov(GBC, Market)/(SD GBC x SD Market)= 71.6/(16.65 x 12.97) = 0.33Where:SD GBC = [1386/5]1/2 = 16.65SD Market = [841.33/5]1/2 = 12.97Cov(GBC, Market) = 358/5 = 71.6018 The alpha or intercept of the characteristic line is computed as follows:alpha = 3.0 - [(0.4255)(4.67)] = 1.013%R GBC = 1.013 + 0.4255(R Market)19398。
鸿达对讲机CH-09频道设置方法
一、开机;
二、循环按功能键“FUNC”和“1”键,选择将本机处于“全频”工作状态;
三、按功能键“FUNC”后按“4”键进入步进频率选择状态, 再按进位键“▲”选择12.5KHZ,按退出键“EXIT”,步进频率已设为
12.5KHZ;
四、接收频率设置:输入频率138.075MHZ, 按存储键“#”,信道数闪动,再按进位键“▲”,把信道数调到CH-09,按接收存储键“*”。
信道数不显示,接收频率已存入9频道;
五、发射频率设置:输入频率144.0625MHZ(步进频率已设为
12.5KHZ,当输入数字“144062”时,频率自动变为144.0625MHZ), 按存储键“#”,信道数闪动,再按进位键“▲”,把信道数调到CH-09,按接收存储键“0”。
信道数不显示,发射频率已存入9频道;
六、发射亚音频设置:按功能键“FUNC”后按“2”键,屏幕右下角已显示“QT”,按功能键“FUNC”后按“3”键,显示模拟亚音频频率,再按进位键“▲”,选到118.8HZ, 按退出键“EXIT”,按存储键“#”,再按进位键“▲”,把信道数调到CH-09,按发射存储键“0”。
七、按功能键“FUNC”和“1”键,退出全频工作状态,选择CH-09信道,完成。
9SIMULINK交互式仿真集成环境9.1引导SIMULINK是一个进行动态系统建模、仿真和综合分析的集成软件包。
它可以处理的系统包括:线性、非线性系统;离散、连续及混合系统;单任务、多任务离散事件系统。
在SIMULINK 提供的图形用户界面GUI上,只要进行鼠标的简单拖拉操作就可构造出复杂的仿真模型。
它外表以方块图形式呈现,且采用分层结构。
从建模角度讲,这既适于自上而下(Top-down)的设计流程(概念、功能、系统、子系统、直至器件),又适于自下而上(Bottum-up)逆程设计。
从分析研究角度讲,这种SIMULINK模型不仅能让用户知道具体环节的动态细节,而且能让用户清晰地了解各器件、各子系统、各系统间的信息交换,掌握各部分之间的交互影响。
在SIMULINK环境中,用户将摆脱理论演绎时需做理想化假设的无奈,观察到现实世界中摩擦、风阻、齿隙、饱和、死区等非线性因素和各种随机因素对系统行为的影响。
在SIMULINK环境中,用户可以在仿真进程中改变感兴趣的参数,实时地观察系统行为的变化。
由于SIMULINK环境使用户摆脱了深奥数学推演的压力和烦琐编程的困扰,因此用户在此环境中会产生浓厚的探索兴趣,引发活跃的思维,感悟出新的真谛。
在MATLAB5.3版中,可直接在SIMULINK环境中运作的工具包很多,已覆盖通信、控制、信号处理、DSP、电力系统等诸多领域,所涉内容专业性极强。
本书无意论述涉及工具包的专业内容,而只是集中阐述:SIMULINK 3.0的基本使用技法和相关的数值考虑。
节9.1虽是专为SIMULINK初学者写的,但即便是熟悉SIMULINK以前版本的读者也值得快速浏览这部分内容,因为新版的界面、菜单、工具条、模块库都有较大的变化。
第9.2节比较详细地阐述建模的基本操作:通用模块的具体化设置、信号线勾画、标识、模型窗参数设置。
这部分内容是进一步深入的前提。
从第9.3节起,由浅入深地讲述SIMULINK 对各种数学、工程问题的建模、仿真和分析的基本方法。
本章采用“算例”作为主体,配以适量的归纳性表述。
本章包含了31个“尽量简单”又“独立完整”的“典型”算例,而这正是SIMULINK在线PDF文件之所缺。
读者通过“手、眼、脑”并用地练习算例,掌握SIMULINK的一般使用规则和操作技法。
鉴于SIMULINK的本质,本节算例必定涉及数学、物理、和若干工程考虑。
本书已采取“无量纲记述”、“注释”等措施使算例尽可能易读易懂,读者只要稍微耐心,就可以从这些有背景的内容体验到SIMULINK仿真之细腻和切实,从这些带背景性的算例品出SIMULINK的精妙之处。
9.1.1SIMULINK的安装9.1.2SIMULINK入门9.1.3SIMULINK库浏览器界面9.2模型的创建9.2.1模型概念和文件操作9.2.1.1SIMULINK模型是什么9.2.1.2模型文件的操作9.2.2模块操作9.2.2.1模块的基本操作9.2.2.2向量化模块和标量扩展【*例9.2.2.2-1】演示“示波”模块的向量显示能力。
图 9.2.2.2-1-1 示波器显示向量波形【*例9.2.2.2-2】演示“求和”模块的向量处理能力:输入扩展。
图 9.2.2.2-2-1 输入的标量扩展【*例9.2.2.2-3】演示“增益”模块的向量处理能力:参数扩展。
图 9.2.2.2-3-1 模块参数的标量扩展9.2.2.3参数设置9.2.3信号线操作9.2.3.1 产生连线9.2.3.2 信号线的分支和折曲 9.2.3.3 信号线宽度显示 9.2.3.4 彩色显示信号线 9.2.3.5 插入模块9.2.3.6 信号线标识(label )【例9.2.3.6-1】演示:信号线标识的传播9.2.4 对模型的注释 9.2.5 常用的Sourse 库信源【*例9.2.5-1】如何调用MATLAB 工作空间中的信号矩阵作为模型输入。
本例所需的输入为<≤<≤−=elseT t T T t t T t t u 200)2()(22 。
(1)编写一个产生信号矩阵的M 函数文件function TU=source925_1(T0,N0,K) t=linspace(0,K*T0,K*N0+1); N=length(t);u1=t(1:(N0+1)).^2;u2=(t((N0+2):(2*N0+1))-2*T0).^2; u3(1:(N-(2*N0+2)+1))=0; u=[u1,u2,u3]; TU=[t',u'];(2)构造简单的接受信号用的实验模型(如图9.2.5-1的左图)图9.2.5-1 接受信号用的实验模型(3)模块的参数设置(4)在指令窗中,运行以下指令,在MATLAB工作空间中产生TU信号矩阵。
TU=source925_1(1,100,4);(5)选中exm925_1模型窗菜单【Simulation:Start】,示波器呈现图9.2.5-1右图信号。
9.2.6常用的Sink库信宿9.2.6.1库信宿一览表9.2.6.2示波器9.2.7仿真的配置9.2.7.1解算器参数的设置(Solver)9.2.7.2仿真数据的输入输出设置(Workspace I/O)9.2.7.3仿真中异常情况的诊断(Diagnostics)9.3连续系统建模9.3.1线性系统9.3.1.1积分模块的功用【*例9.3.1.1-1】复位积分器的功用示例。
图9.3.1.1-19.3.1.2积分模块直接构造微分方程求解模型【*例9.3.1.2-1】假设从实际自然界(力学、电学、生态等)或社会中,抽象出有初始状态为0的二阶微分方程)(2.04.02.0t u x x x =+′+′′,)(t u 是单位阶跃函数。
本例演示如何用积分器直接构搭求解该微分方程的模型。
(1)改写微分方程(2)利用SIMULINK 库中的标准模块构作模型图9.3.1.2-1-1 求解微分方程的SIMULINK 模型exm9312_1.mdl(3)仿真操作(4)保存在MATLAB 工作空间中的数据 clftt=ScopeData.time; %为书写简单,把构架域的时间数据另赋给tt xx=ScopeData.signals.values; %目的同上。
[xm,km]=max(xx);plot(tt,xx,'r','LineWidth',4),hold onplot(tt(km),xm,'b.','MarkerSize',36),hold offstrmax=char('最大值',['t = ',num2str(tt(km))],['x = ',num2str(xm)]);9.3.1.3 传递函数模块【例9.3.1.3-1】直接利用传递函数模块求解方程(9.3.1.3-1)。
(1)根据式(9.3.1.3-3)构造如图9.3.1.3-1所示的模型exm9313_1.mdl图9.3.1.3-1 由传递函数模块构成的仿真模型exm9313_1.mdl(2)仿真操作9.3.1.4状态方程模块和单位脉冲输入的生成δ,研究该系统的位移【*例9.3.1.4-1】假设式(9.3.1.4-1)中的输入函数u是单位脉冲函数)(t变化。
本例演示:(A)状态方程模块的使用;(B)脉冲函数的生成方法。
(1)单位脉冲函数的数学含义及近似实现(2)利用库模块构造如图9.3.1.4-1-1所示的仿真模型exm9314_1.mdl图9.3.1.4-1-1 带近似单位脉冲的状态方程模块构成的仿真模型exm9314_1.mdl(3)仿真结果图9.3.1.4-1-2 仿真结果9.3.2非线性系统9.3.2.1建立非线性仿真模型的基本考虑【*例9.3.2.1-1】物理背景:如图9.3.2.1-1-1所示喷射动力车的定位控制问题。
图9.3.2.1-1-1 装置左右喷射发动机的车辆示意图(1)根据车辆的动态方程,构作基本仿真模型图9.3.2.1-1-2 基本仿真模型(2)为观察仿真时间进程,引入仿真时钟显示。
(3)为模仿“车辆速度与位移小于某阈值时被认为控制目标达到”,引入仿真终止环节。
图9.3.2.1-1-3 完整仿真模型exm9321_1.mdl(4)为模仿“符号切换的非瞬时性”,本例采用“定步长”Solver解算器(5)为便于分析接近原点时的颤振现象,通过模型窗I/O设置保存仿真数据(6)仿真操作和仿真结果观察(7)保存数据的利用和分析subplot(1,2,1),plot(xout(:,2),xout(:,1))grid on,axis([-0.2,1,-1,0.2]),axis squarexlabel('\fontsize{14}位移'),ylabel('\fontsize{14}速度'),subplot(1,2,2),plot(xout(:,2),xout(:,1))9.3.2.2任意非线性函数模块及其应用【例9.3.2.2-1】轿车沿直线山坡路向前行驶。
要求设计一个简单的比例放大器,使轿车能以指定的速度运动。
本例演示:(A)仿真系统的创建。
(B)非线性模块的使用。
(C)任意函数模块的应用。
(D)体现“自下而上”的建模方式。
(E)本例将作为下面章节多个算例的基础,读者切莫跳略此题。
(1)轿车的运动方程(2)轿车动力学的仿真模型图9.3.2.2-1-2 行驶轿车动力学仿真模型(2)比例控制及其仿真模型图9.3.2.2-1-3 比例控制器仿真模型(3)构成完整的仿真模型图9.3.2.2-1-4 受控轿车的完整仿真模型(4)仿真操作和说明9.4子系统的创建、装帧及受控执行9.4.1简装子系统及其应用9.4.1.1创建简装子系统的“先有内容后套包装”法【例9.4.1.1-1】题目的背景和参数与例9.3.2.2-1完全相同,要求创建利用比例控制器使轿车的运动速度稳定在期望车速的分层仿真模型。
本例演示:如何从非分层模型获得分层模型;创建简装子系统的“先有内容后套包装”法。
(1)将待“包装”模型另存为一个新模型(2)生成第一个简装子系统(3)生成第二个简装子系统(4)更改子系统的标识名(5)重命名输入输出口的名称图9.4.1.1-1 采用简装子系统的完整仿真模型9.4.1.2创建简装子系统的“先有包装后置内容”法【例9.4.1.2-1】本例演示:如何自上而下构造分层模型;产生简装子系统的“先有包装后置内容”法。
(1)在新建模型窗中复制包括子系统模块在内的所有标准模块(见图9.4.1.2-1)图 9.4.1.2-1 带标准子系统模块的新建模型窗(2)在Subsystem标准模块中“装入”轿车动态模型(3)在Subsystem 1标准模块中“装入”比例控制器模型(4)对Untitled模型窗中滑键模块进行适当设置,进行各模块间的连接,就形成与图9.4.1.1-1相同的完整仿真模型。