matlab教學教案課件第八章+simulink+基礎(chǔ)_第1頁
matlab教學教案課件第八章+simulink+基礎(chǔ)_第2頁
matlab教學教案課件第八章+simulink+基礎(chǔ)_第3頁
matlab教學教案課件第八章+simulink+基礎(chǔ)_第4頁
matlab教學教案課件第八章+simulink+基礎(chǔ)_第5頁
已閱讀5頁,還剩28頁未讀, 繼續(xù)免費閱讀

下載本文檔

版權(quán)說明:本文檔由用戶提供并上傳,收益歸屬內(nèi)容提供方,若內(nèi)容存在侵權(quán),請進行舉報或認領(lǐng)

文檔簡介

第七章 Simulink 基礎(chǔ)Chapter 7: Introduction to Simulink一 Simulink 初步(Primer of Simulink)MATLAB Simulink是一個動態(tài)仿真系統(tǒng),用于對動態(tài)系統(tǒng)進行仿真和分析,預先模擬實際系統(tǒng)的特性和響應,根據(jù)設計和使用要求,對系統(tǒng)進行修改和優(yōu)化。Simulink提供了圖形化用戶界面,只須點擊鼠標就可以輕易的完成模型的創(chuàng)建、調(diào)試和仿真工作,用戶不須專門掌握一種程序設計語言。Simulink可將系統(tǒng)分為從高級到低級的幾個層次,每層又可以細分為幾個部分,每層系統(tǒng)構(gòu)建完成后,將各層連接起來構(gòu)成一個完整系統(tǒng)。模型創(chuàng)建完成后,可以啟動系統(tǒng)的仿真功能分析系統(tǒng)的動態(tài)特性,其內(nèi)置的分析工具包括各種仿真算法、系統(tǒng)線性化、尋求平衡點等。仿真結(jié)果可以以圖形方式在示波器窗口顯示,也可將輸出結(jié)果以變量形式保存起來,并輸入到MATLAB中以完成進一步的分析。Simulink可以仿真線性和非線性系統(tǒng),并能創(chuàng)建連續(xù)時間、離散時間或二者混合的系統(tǒng)。支持多采樣頻率系統(tǒng)。Simulink Version 6.0 (R14) 05-May-2004 Model analysis and construction functions.Simulation sim - Simulate a Simulink model. sldebug - Debug a Simulink model. simset - Define options to SIM Options structure. simget - Get SIM Options structure Linearization and trimming. linmod - Extract linear model from continuous-time system. linmod2 - Extract linear model, advanced method. dlinmod - Extract linear model from discrete-time system. trim - Find steady-state operating point. Model Construction. close_system - Close open model or block. new_system - Create new empty model window. open_system - Open existing model or block. load_system - Load existing model without making model visible. save_system - Save an open model. add_block - Add new block. add_line - Add new line. delete_block - Remove block. delete_line - Remove line. find_system - Search a model. hilite_system - Hilite objects within a model. replace_block - Replace existing blocks with a new block. set_param - Set parameter values for model or block. get_param - Get simulation parameter values from model. add_param - Add a user-defined string parameter to a model. delete_param - Delete a user-defined parameter from a model. bdclose - Close a Simulink window. bdroot - Root level model name. gcb - Get the name of the current block. gcbh - Get the handle of the current block. gcs - Get the name of the current system. getfullname - get the full path name of a block slupdate - Update older 1.x models to 3.x. addterms - Add terminators to unconnected ports. boolean - Convert numeric array to boolean. slhelp - Simulink users guide or block help. Masking. hasmask - Check for mask. hasmaskdlg - Check for mask dialog. hasmaskicon - Check for mask icon. iconedit - Design block icons using ginput function. maskpopups - Return and change masked blocks popup menu items. movemask - Restructure masked built-in blocks as masked subsystems. Library. libinfo - Get library information for a system. Diagnostics. sllastdiagnostic - Last diagnostic array. sllasterror - Last error array. sllastwarning - Last warning array. sldiagnostics - Get block count and compile stats for a model. Hardcopy and printing. frameedit - Edit print frames for annotated model printouts. print - Print graph or Simulink system; or save graph to M-file. printopt - Printer defaults. orient - Set paper orientation. simulink is both a directory and a function.Copyright 1990-2004 The MathWorks, Inc. Simulink的三大步驟(procedure of Simulink):模型創(chuàng)建與定義、( Model creating and definition)模型的分析、(Model analyzing)模型的修正。(Model modifying)Simulink的運行:(Running of Simulink)1、運行Simulink:命令窗口下點擊Simulink圖標(或鍵入Simulink命令)Simulink Library Browser(瀏覽器)simulink樹狀列表形式的模塊庫(包含simulink模塊庫中的各種模塊及其它Toolbox和 Blockset中的模塊)2、選擇建模模塊:展開樹狀列表,用鼠標點擊所需類別的模塊項, 所選模塊類的具體模塊庫就在右側(cè)的列表框中顯示出來,提供建模使用。也可以在在輸入欄中鍵入模塊名并點擊Find按鈕進行查詢。3、打開模型創(chuàng)建窗口:(open the window of mode creating)。在工具欄中選擇“建立新模型”的圖標,彈出名為Untitled的空白窗口,選擇Open窗口可以打開存于硬盤中已建的模型,完成模型的運行或修改。二 Simulink 的常用基本模塊(basic module)simulink瀏覽器窗口左側(cè)的simulink項上單擊鼠標右鍵,彈出菜單“Open the SimulinkLabrary”選項,將打開simulink模塊庫窗口。1信號源模塊:source,模塊及功能見(表 81)2輸出模塊:Sinks, 模塊及功能見(表 82)3. 連續(xù)系統(tǒng)模塊: Continuous, 模塊及功能見(表 83)4. 離散系統(tǒng)模塊:Discrete, 模塊及功能見(表 84)5. 數(shù)學運算模塊:Math, 模塊及功能見(表 85)6函數(shù)和表模塊: Function & Tables, 模塊及功能見(表 86)7. 非線性系統(tǒng)模塊:Nonlinear, 模塊及功能見(表 87)8. 信號與系統(tǒng)模塊:Signal & Systems, 模塊及功能見(表 88)還有:Commonly used blocks 常用模塊Discontinuous 非連續(xù)模塊Logical and bit operation 邏輯運算和二進制數(shù)位模塊Lookup tables 插值表Model Verification 模式識別Ports and subsystems 端口及子系統(tǒng)User defined functions 用戶自定義函數(shù)Additional math and discrete 輔助數(shù)學和離散系統(tǒng)表 81信號源模塊及功能模 塊功 能模 塊功 能In1創(chuàng)建輸入端Ground接地Constant常數(shù)Clock當前時間SignalGeneratur信號發(fā)生器Digital Clock數(shù)字時鐘Ramp斜波From File從文件讀數(shù)據(jù)SineWave正弦波FromWorkspace從工作空間讀數(shù)據(jù)Step階躍信號Random Number隨機信號Repeating Sequence重復系列UniformRandomNumber均勻隨機信號Pulse Generator脈沖發(fā)生器Band-LimitedWhileNoise帶限白噪音Chirp Signal 快速正弦掃描 表 82輸出模塊及功能模塊功能模塊功能Scope示波器To file輸出到文件Floating Scope可選示波器To Workspace 輸出到工作空間XY GraphXY顯示器Terminator通用終端Out1創(chuàng)建輸出端Stop Simulation輸入不為0時停止仿真Display實時數(shù)據(jù)顯示 表 83連續(xù)系統(tǒng)模塊及功能模塊功能模塊功能Integrator積分Zero-Pole 零極點Derivative微分Memory延時輸出Statae-Space狀態(tài)方程Transport Delay傳輸延時Transfer Fcn傳遞函數(shù)VariableTransport Delay可變傳輸延時 表 84離散系統(tǒng)模塊及功能模塊功能模塊功能Zero-Order-Hold零階保持器Discrete Filter離散濾波器Unit Delay單位延時采樣保持Discrete Transfer Fcn離散傳遞函數(shù)Descrete-Time Integrator離散時間積分Discrete Zero-pole離散零極點Discrete-State-Space離散狀態(tài)方程First-Order Hold一階保持器 表 85數(shù)學運算模塊及功能模塊功能模塊功能Sum求和Rounding Function取整函數(shù)Product積或商Combinatorial Logic邏輯真值表Dot Product點積Logical Operator邏輯算子Gain常數(shù)增益Bitwise Logical Operator位邏輯算子Slider Gain可變增益Relational Operator關(guān)系算子Matrix Gain矩陣增益Complex to Magnitude-Angle復數(shù)的模和輔角Math Function數(shù)學運算函數(shù)Magnitude-Angle to Complex模和輔角合成復數(shù)Trigonometric Function三角函數(shù)Complex to Real-Imag復數(shù)的實部和虛部NinMax求最大值Real-Imag to Complex實部和虛部合成復數(shù)Abs求絕對值A(chǔ)lgebraic Constant強迫輸入信號為零Sign符號函數(shù) 表 86函數(shù)和表模塊及功能模塊功能模塊功能Look-Up Table線性插值查表FcnC語言形式的表達式Look-Up Table (2-D)二維線性插值MATLAB Fcn MATLAB形式的表達式Look-Up Table (n-D)N維線性插值S-Function調(diào)用S-函數(shù)Prelook-Up Index Search預查下標Polynomial多項式InterPolation (n-D) Using PreLook-UpN維插值S-Function Builder用C代碼創(chuàng)建S-函數(shù)Direct Look-Up Table(n-D)直接查表 表 87非線性系統(tǒng)模塊及功能模塊功能模塊功能Rate Limiter速率限制器Relay繼電器Saturation飽和元件Switch開關(guān)Quantizer量化元件Maunal Switch手動開關(guān)Backlash間隙元件Multiport Switch多選開關(guān)Dead Zone死區(qū)元件Coulomb & Viscous Friction庫侖和粘性摩擦 表 88信號與系統(tǒng)模塊及功能模塊功能模塊功能Bus Creator創(chuàng)建信號總線Data Store Memory為存儲器定義內(nèi)存Bus Selector從信號總線中選擇信號Data Store Write向存儲器寫數(shù)據(jù)Mux多路傳輸器Function-Call Generator 函數(shù)調(diào)用發(fā)生器Demux多路分離器Reshape改變信號尺寸Selector選擇輸入信號Data Type Conversion數(shù)據(jù)類型轉(zhuǎn)換Assignment賦值Hit Crossing檢測零交叉點Matrix Concatenation矩陣串聯(lián)IC信號的初始值Merge信號合并Width信號的寬度From從GOTO模塊接收信號Model Info顯示模型信息Goto Tag Visibility定義GOTO模塊的范圍Signal Specification檢查信號參數(shù)Goto把信號送到From模塊Probe探測連線Data Store Read從存儲器讀數(shù)據(jù)可選示波器(Floating scope):可將普通示波器轉(zhuǎn)變?yōu)镕loating scope,也可在模型庫中直接選擇Floating scope模塊。利用Floating scope模塊可選擇顯示一或多個線程上的信號,模塊不必與模型中的信號線連接,可以在signal selection 快捷鍵打開的菜單中選擇要顯示的信號。*Floating scope: This option appears only on the General parameters pane for the Scope block. Selecting this option turns a Scope block into a floating scope. A floating scope is a Scope block that can display the signals carried on one or more lines. You can create a Floating Scope block in a model either by copying a Scope block from the Simulink Sinks library into a model and selecting this option or, more simply, by copying the Floating Scope block from the Sinks library into the model window. The Floating Scope block has the Floating scope parameter selected by default. To use a floating scope during a simulation, first open the scope. To display the signals carried on a line, select the line. Hold down the Shift key while clicking another line to select multiple lines. It might be necessary to click the Autoscale data button on the floating scopes toolbar to find the signal and adjust the axes to the signal values. Or you can use the floating scopes Signal Selector (see The Signal Selector in the online Simulink documentation) to select signals for display. To display a floating scopes Signal Selector, first start simulation of your model with the floating scope open. Then right-click your mouse in the floating scope and select Signal Selection from the pop-up menu that appears. You can have more than one floating scope in a model, but only one set of axes in one scope can be active at a given time. Active floating scopes show the active axes by making them blue. Selecting or deselecting lines affects the active floating scope only. Other floating scopes continue to display the signals that you selected when they were active. In other words, inactive floating scopes are locked, in that their signal displays cannot change. To specify display of a signal on one of the axes of a multiaxis floating scope, click the axis. Simulink draws a blue border around the axis. Then click the signal you want to display in the block diagram or the Signal Selector. When you run the model, the selected signal appears in the selected axis. If you plan to use a floating scope during a simulation, you should disable signal storage reuse. See Signal storage reuse in Optimizations for more information三. Simulink 建模(Simulinc module creating)1 模塊的創(chuàng)建與操作(Creating and operation of Simulink)(1) 創(chuàng)建模塊:(module creating)()在瀏覽器列表中點擊需要的模塊,按住鼠標左鍵并拖曳至模型窗口即可。()雙擊模塊可在彈出的對話框中修改相應的模塊參數(shù)()在模塊下方名稱處雙擊可改變模塊名稱。(2)模塊操作(module operation)(a)模塊的選擇(module selection)(b)移動模塊 (module moving)(c)模塊的縮放(modulee scaling)(d) 復制模塊:(module copy)四種方法: 在選定模塊處,按下鼠標右鍵并拖動至適當位置; 選定模塊,在工具欄中(或Edit菜單中)選中Copy與Paste按鈕; 在選定的模塊處點擊鼠標右鍵,在彈出的菜單中選擇Copy與Paste選項; 按住”Ctrl”鍵,按下鼠標左鍵,將選定的模塊拖至適當?shù)奈恢?。(e)模塊的旋轉(zhuǎn)與翻轉(zhuǎn):(Rotating and turnover of module)旋轉(zhuǎn):(rotate)將鼠標指向要翻轉(zhuǎn)的模塊并按下鼠標右鍵,選擇彈出菜單中的Format欄中的Rotate項,模塊順時針旋轉(zhuǎn)o。翻轉(zhuǎn):將鼠標指向要翻轉(zhuǎn)的模塊并按下鼠標右鍵,選擇彈出菜單中的Format欄中的Flip Block項,模塊順時針旋轉(zhuǎn)180o。(f) 模塊的連接 (h)連接分支線 (i)改變連線的形狀 (j)連線的標識:在連線的上或下方(或窗口內(nèi)任何位置)雙擊鼠標左鍵,可出現(xiàn)一個文本框用于輸入說明文字。(3)簡單模型(Simple mode) 信號發(fā)生器發(fā)生幅值為,頻率為0.2HZ的正弦波信號,信號分別按倍和倍送入兩個示波器。2 模型的修飾(Mode modifying) 1. 模塊加陰影:Format菜單中的Show drop shadow菜單項用于給模塊加陰影。2. 調(diào)整顏色:Format菜單中的Foreground color菜單項用于調(diào)整模塊的前景顏色。Background color菜單項用于選擇模塊的背景顏色。Screen color菜單項用于調(diào)整屏幕顏色。3. 變換模塊名的顯示位置:Format 菜單中的Flip name可將模塊名換到對稱的位置,Hide name可將模塊名隱藏起來。 4. 模塊修飾的一個簡單示例三 仿真計算與分析方法(simulink calculation and the method of analyzing)1連續(xù)系統(tǒng)建模(Module creating of continuous system)(1)用積分模塊創(chuàng)建微分方程求解的模型(creating the solve mode of differential equation with integral modules): 有二階微分方程x+0.2x+0.4x=0.2u(t), u(t)是單位階躍函數(shù),演示如何用積分器直接創(chuàng)建求解該微分方程的模型。(a) 改寫微分方程為(reforming differential equation): x=0.2u(t)-0.2x-0.4x(b) 利用Simulink庫中的標準模塊建模(Creating mode with modules in the library of Simulink) :基本思路是x經(jīng)積分后得 x,再積分得 x,再將 x和 x經(jīng)代數(shù)運算得到 x。結(jié)果送入示波器,也可同時存儲在工作空間變量simy中。(2)用傳遞函數(shù)模塊求解(Solving by transfer function module):以二階微分方程x+0.2x+0.4x=0.2u(t)為例, 初始狀態(tài)為0,u(t)是單位階躍函數(shù)。對方程兩邊進行Laplace變換,得到: s2X(s)+0.2sX(s)+0.4X(s)=0.2U(s)整理后得傳遞函數(shù):(Transfer function) G(s)=X(s)/U(s)=0.2/(s2+0.2s+0.4)利用上式采用傳遞函數(shù)模塊可建立求解微分方程的模型。2、將MATLAB工作空間中信號矩陣作為模型輸入:利用From Workspace模塊實現(xiàn)例:模擬下述方程表達的結(jié)果 t2 (0tT)U(t)= (2T-t)2 (Tt2T) 0 (其他)(1)首先編寫一個信號矩陣的M函數(shù)文件:function TU=source(TO,NO,K)t=linspace(0,K*TO,K*NO+1);N=length(t);u1=t(1:(NO+1).2;u2=(t(NO+2):(2*NO+1)-2*TO).2;u3(1:(N-(2*NO+2)+1)=0;u=u1,u2,u3;TU=t,u;(2)以source文件名保存,(3)然后建立一個簡單的具有接收workspace信號并顯示結(jié)果的模型。(4)在命令窗口運行TU=source(2,200,6),便在Workspace中產(chǎn)生一個TU信號矩陣。(5)再運行所創(chuàng)建的simulink模型就可得到輸出結(jié)果。執(zhí)行simulink后檢查輸出結(jié)果并做進一步的分析與判斷。(1) 輸出信號的觀察(output signal observation)(a) 將信號輸出到顯示模塊(Export signal to display module)* Scope(示波器):將信號顯示在示波器的獨立窗口中,通過雙擊模塊即可打開示波器模塊。* XY Graph 顯示器模塊:在MATLAB圖形窗口繪制二維圖形, * Display模塊:將結(jié)果以數(shù)字形式顯示出來,在模塊中直接滾動顯示。標量、矢量和矩陣形式得結(jié)果輸出窗口結(jié)構(gòu)略有不同。(b)將仿真結(jié)果存儲到工作空間,再用繪圖命令在命令窗口繪制圖形,(save the result of simulink to workspace and plotting figure on window by using plot command) 有三種方法可供選擇:* 通過示波器模塊向工作空間存儲數(shù)據(jù);* 通過選擇Sinks函數(shù)庫中的To workspace模塊,將數(shù)據(jù)保存到工作空間的simout變量中,同時還可以產(chǎn)生一個存放時間數(shù)據(jù)的變量(缺省tout);*通過Simulation菜單選擇Simulation Paremeter菜單項中的WorkspaceI/O頁,根據(jù)各個參數(shù)的選擇來確定存儲的數(shù)據(jù)內(nèi)容的類型。(c). 將仿真結(jié)果通過輸出端口返回到MATLAB命令窗口,再利用繪圖命令繪出輸出圖形 (return the result of simulink from export to MATLAB window and then drawing the plot on window by using plot command) :在Sinks函數(shù)庫中有一個名為Out1的模塊,將數(shù)據(jù)輸入到這個模塊,該模塊就會將數(shù)據(jù)輸出到 MATLAB 命令窗口,并用名為 yout的變量保存,同時還將時間數(shù)據(jù)用 tout變量保存。 存儲在工作空間的結(jié)果可以進行進一步的分析。2使用一般的分析工具(the using of General analysis tool) (a). 線性化:將狀態(tài)空間所描述的線性系統(tǒng)輸入輸出關(guān)系由下式表示:x=Ax+Buy=Cx+Du其中:x 代表狀態(tài)矢量y代表輸出矢量u代表輸入矢量A,B,C,D為系統(tǒng)線性化的狀態(tài)空間矩陣 如創(chuàng)建用于線性化的系統(tǒng)模型名為lmod,并保存為”lmod.mdl”.在命令窗口輸入命令 A B C D=linmod(lmod)就可以獲得系統(tǒng)的常微分方程 lmod的狀態(tài)空間線性模型,返回系統(tǒng)線性化的狀態(tài)空間矩陣。A B C D=linmod(lmod)(A,B,C,D=LINMOD(SYS) obtains the state-space linear model of the system of ordinary differential equations described in the block diagram SYS when the state variables and inputs are set to the defaults specified in the block diagram.)(b)由狀態(tài)方程轉(zhuǎn)成LTI對象(transfer state equations to LTI object):一旦數(shù)據(jù)形成了狀態(tài)空間形式或者轉(zhuǎn)變成了LTI對象,就可以使用Control System Toolbox函數(shù)進行進一步的分析。利用ss函數(shù)可將上面線性化的系統(tǒng)轉(zhuǎn)成LTI對象,命令格式為: sys=ss(A,B,C,D)(c) 繪制波德圖:(Bode plot drawing) 用bode 函數(shù)可繪制波德圖,(相位、幅值與頻率的關(guān)系圖)bode(A,B,C,D) 或 bode(sys) BODE(SYS) draws the Bode plot of the LTI model SYS (created with either TF, ZPK, SS, or FRD). The frequency range and number of points are chosen automatically.(d)線性時間響應(Linear time response):給一個階躍信號(step signal):step(A,B,C,D) 或 step(sys) 線性化階響應或給一個脈沖信號(impulse):impulse(A,B,C,D) 或 impulse(sys)線性化脈沖響應(e)求系統(tǒng)平衡點(find the balance point of system):在非線性系統(tǒng)中,分析評估系統(tǒng)穩(wěn)定性或穩(wěn)定狀態(tài)時大多需要用到平衡點。平衡點是指所有狀態(tài)導數(shù)等于零的點。若僅有部分狀態(tài)導數(shù)等于零,則稱為偏平衡點。要使輸出為1,并找出輸入以及狀態(tài)值時,可用”trim”函數(shù)來實現(xiàn)。以前面創(chuàng)建的”lmod”模型為例:%第一步:對狀態(tài)變量x以及輸入u做初步設定,并設定想要的輸出值。 x=0;0;0;u=0;y=1;1;%第二步:使用索引變量確定那些值可變,那些是固定不變的。 ix= ; %任何狀態(tài)值可變 iu= ; %任何輸入可變 iy=1,2; %兩個輸出不能變%第三步:調(diào)用trim函數(shù),求出系統(tǒng)平衡點。 x,u,y,dx=trim(lmod,x,u,y,ix,iu,iy)A,B,C,D=LINMOD(lmod) %系統(tǒng)線性化的狀態(tài)空間矩陣sys=ss(A,B,C,D) %由狀態(tài)方程轉(zhuǎn)成LTI對象figure(1)bode(sys) %繪制波德圖,(相位、幅值與頻率的關(guān)系圖)figure(2)step(A,B,C,D) %線性時間響應x=0;0;0; %設定狀態(tài)變量u=0; %設定輸入值y=1;1; %設定想要的輸出值ix=; %表示狀態(tài)不固定iu=; %表示輸入不固定iy=1,2; %固定第一個輸出及第二個輸出x,u,y,dx=trim(lmod,x,u,y,ix,iu,iy) %求系統(tǒng)平衡點A = -1 0 -2 -2 1 1 0 1 0B = 0 1 0C = -2 0 0 0 0 -2D = 1 0a = x1 x2 x3 x1 -1 0 -2 x2 -2 1 1 x3 0 1 0b = u1 x1 0 x2 1 x3 0c = x1 x2 x3 y1 -2 0 0 y2 0 0 -2 d = u1 y1 1 y2 0x = 1.3333 0.0000 -0.6667u = 3.3333y = 0.6667 1.3333dx = 1.0e-015 * 0 -0.1110 0.0000Simulink命令集仿真命令sim仿真運行一個simulink模塊sldebug調(diào)試一個simulink模塊simset設置仿真參數(shù)simget獲取仿真參數(shù)線性化和整理命令linmod從連續(xù)時間系統(tǒng)中獲取線性模型linmod2也是獲取線性模型,采用高級方法dinmod從離散時間系統(tǒng)中獲取線性模型trim為一個仿真系統(tǒng)尋找穩(wěn)定的狀態(tài)參數(shù)構(gòu)建模型命令open_system打開已有的模型close_system關(guān)閉打開的模型或模塊new_system創(chuàng)建一個新的空模型窗口load_system加載已有的模型并使模型不可見save_system保存一個打開的模型add_block添加一個新的模塊add_line添加一條線(兩個模塊之間的連線)delete_block刪除一個模塊delete_line刪除一根線find_system查找一個模塊hilite_system使一個模塊醒目顯示replace_block用一個新模塊代替已有的模塊set_param為模型或模塊設置參數(shù)get_param獲取模塊或模型的參數(shù)add_param為一個模型添加用戶自定義的字符串參數(shù)delete_param從一個模型中刪除一個用戶自定義的參數(shù)bdclose關(guān)閉一個simulink窗口bdroot根層次下的模塊名字gcb獲取當前模塊的名字gcbh獲取當前模塊的句柄gcs獲取當前系統(tǒng)的名字getfullname獲取一個模塊的完全路徑名slupdate將1.x的模塊升級為3.x的模塊addterms為未連接的端口添加terminators模塊boolean將數(shù)值數(shù)組轉(zhuǎn)化為布爾值slhelpsimulink的用戶向?qū)Щ蛘吣K幫助封裝命令hasmask檢查已有模塊是否封裝hasmaskdlg檢查已有模塊是否有封裝的對話框hasmaskicon檢查已有模塊是否有封裝的圖標iconedit使用ginput函數(shù)來設計模塊圖標maskpopups返回并改變封裝模塊的彈出菜單項movemask重建內(nèi)置封裝模塊為封裝的子模塊庫命令libinfo從系統(tǒng)中得到庫信息診斷命令sllastdiagnostic上一次診斷信息sllasterror上一次錯誤信息sllastwarning上一次警告信息sldiagnostics為一個模型獲取模塊的數(shù)目和編譯狀態(tài)硬拷貝和打印命令frameedit編輯打印畫面print將simulink系統(tǒng)打印成圖片,或?qū)D片保存為m文件printopt打印機默認設置orient設置紙張的方向常用Simulink模塊簡介Sources庫中模塊Band-LimitedwhiteNoise給連續(xù)系統(tǒng)引入白噪聲ChirpSignal產(chǎn)生一個頻率遞增的正弦波(線性調(diào)頻信號)Clock顯示并提供仿真時間Constant生成一個常量值CounterFree-Running自運行計數(shù)器,計數(shù)溢出時自動清零CounterLimited有限計數(shù)器,可自定義計數(shù)上限D(zhuǎn)igitalClock生成有給定采樣間隔的仿真時間FromFile從文件讀取數(shù)據(jù)FromWorkspace從工作空間中定義的矩陣中讀取數(shù)據(jù)Ground地線,提供零電平PulseGenerator生成有規(guī)則間隔的脈沖In1提供一個輸入端口Ramp生成一連續(xù)遞增或遞減的信號Rand

溫馨提示

  • 1. 本站所有資源如無特殊說明,都需要本地電腦安裝OFFICE2007和PDF閱讀器。圖紙軟件為CAD,CAXA,PROE,UG,SolidWorks等.壓縮文件請下載最新的WinRAR軟件解壓。
  • 2. 本站的文檔不包含任何第三方提供的附件圖紙等,如果需要附件,請聯(lián)系上傳者。文件的所有權(quán)益歸上傳用戶所有。
  • 3. 本站RAR壓縮包中若帶圖紙,網(wǎng)頁內(nèi)容里面會有圖紙預覽,若沒有圖紙預覽就沒有圖紙。
  • 4. 未經(jīng)權(quán)益所有人同意不得將文件中的內(nèi)容挪作商業(yè)或盈利用途。
  • 5. 人人文庫網(wǎng)僅提供信息存儲空間,僅對用戶上傳內(nèi)容的表現(xiàn)方式做保護處理,對用戶上傳分享的文檔內(nèi)容本身不做任何修改或編輯,并不能對任何下載內(nèi)容負責。
  • 6. 下載文件中如有侵權(quán)或不適當內(nèi)容,請與我們聯(lián)系,我們立即糾正。
  • 7. 本站不保證下載資源的準確性、安全性和完整性, 同時也不承擔用戶因使用這些下載資源對自己和他人造成任何形式的傷害或損失。

評論

0/150

提交評論