九九热最新网址,777奇米四色米奇影院在线播放,国产精品18久久久久久久久久,中文有码视频,亚洲一区在线免费观看,国产91精品在线,婷婷丁香六月天

matlab外文翻譯外文文獻(xiàn)英文文獻(xiàn)MATALAB混合仿真平臺控制算法的概述.doc

上傳人:good****022 文檔編號:116389083 上傳時(shí)間:2022-07-05 格式:DOC 頁數(shù):15 大小:71.03KB
收藏 版權(quán)申訴 舉報(bào) 下載
matlab外文翻譯外文文獻(xiàn)英文文獻(xiàn)MATALAB混合仿真平臺控制算法的概述.doc_第1頁
第1頁 / 共15頁
matlab外文翻譯外文文獻(xiàn)英文文獻(xiàn)MATALAB混合仿真平臺控制算法的概述.doc_第2頁
第2頁 / 共15頁
matlab外文翻譯外文文獻(xiàn)英文文獻(xiàn)MATALAB混合仿真平臺控制算法的概述.doc_第3頁
第3頁 / 共15頁

下載文檔到電腦,查找使用更方便

10 積分

下載資源

還剩頁未讀,繼續(xù)閱讀

資源描述:

《matlab外文翻譯外文文獻(xiàn)英文文獻(xiàn)MATALAB混合仿真平臺控制算法的概述.doc》由會員分享,可在線閱讀,更多相關(guān)《matlab外文翻譯外文文獻(xiàn)英文文獻(xiàn)MATALAB混合仿真平臺控制算法的概述.doc(15頁珍藏版)》請?jiān)谘b配圖網(wǎng)上搜索。

1、MATALAB 混合仿真平臺控制算法的概述MATALB 混合仿真平臺,即為將硬件引入到仿真回路里的半實(shí)物仿真系統(tǒng),可用于過程控制器的開發(fā)與測試。平臺提供了三種控制器的嵌入方法,尤其能用Matlab 語言編寫,大大提高了平臺的靈活性。為了建立過程控制混合仿真試驗(yàn)系統(tǒng),必須解決PC 機(jī)作為虛擬控制器設(shè)計(jì)環(huán)境的實(shí)現(xiàn)和在Windows 操作系統(tǒng)中實(shí)時(shí)控制的實(shí)現(xiàn)這兩個(gè)問題。我們先詳細(xì)闡述過程控制混合仿真試驗(yàn)系統(tǒng)的實(shí)現(xiàn)原理;最后介紹平臺控制算法的嵌入方法,并通過實(shí)驗(yàn)仿真驗(yàn)證平臺的有效性。 過程控制混合仿真平臺實(shí)現(xiàn)原理:(1)數(shù)值計(jì)算,MATLAB 提供了大約600 多個(gè)數(shù)學(xué)和工程上常用的函數(shù)。這些函數(shù)的數(shù)

2、值運(yùn)算是針對矩陣操作優(yōu)化過的,可以使用它來代替底層編程語言。在保持同樣性能的情況下,編程工作量非常小,數(shù)值計(jì)算采用了LAPACK,BLAS,F(xiàn)FTW 等優(yōu)秀數(shù)學(xué)函數(shù)庫,使得計(jì)算效率得到進(jìn)一步的提升。MATLAB 包含的主要數(shù)學(xué)函數(shù)有線性代數(shù)和矩陣運(yùn)算、傅立葉變換和統(tǒng)計(jì)分析、微分方程求解、稀疏矩陣運(yùn)算以及三角和其他初等數(shù)學(xué)運(yùn)算等;除此之外,隨著Matlab 的應(yīng)用領(lǐng)域不斷的擴(kuò)大,補(bǔ)充了用于許多特定領(lǐng)域的函數(shù)。(2)算法開發(fā),強(qiáng)大的計(jì)算能力,方便易用的編程語言和豐富的數(shù)學(xué)函數(shù)使MATLAB 最適于用于算法開發(fā)工作。典型的應(yīng)用包括:數(shù)據(jù)分析,信號處理,圖像處理,系統(tǒng)建模和高級算法研究等。不管用戶是使

3、用已有的算法,還是自行開發(fā),MATLAB 提供了一個(gè)通用的平臺。使用MATLAB 進(jìn)行算法開發(fā)就像平時(shí)書寫數(shù)學(xué)表達(dá)式一樣。將用戶在MATLAB 中開發(fā)的算法結(jié)合到外部運(yùn)行的系統(tǒng)中。一旦用戶的算法和仿真經(jīng)過了編寫和調(diào)試,MATLAB Compiler 和C/C+ Math Library 會將MATLAB 應(yīng)用自動(dòng)轉(zhuǎn)換成可移植C 和C+代碼的工具。對于信號處理,控制系統(tǒng)設(shè)計(jì)和其他一些應(yīng)用,MATLAB 工具箱提供了一系列先進(jìn)的技術(shù)。工具箱遠(yuǎn)遠(yuǎn)超出了提供一些基本算法的范疇:他們提供了一個(gè)學(xué)習(xí),研究,創(chuàng)新前沿理論和技術(shù)的舞臺。提供的算法工具箱有Neural Network Toolbox、Optim

4、ization Toolbox、System Identification Toolbox、Robust Control Toolbox、Model Predictive Control Toolbox、Control System Toolbox,F(xiàn)uzzy logic Toolbox 等。(3)數(shù)據(jù)分析與可視化,通過 MATLAB,用戶可以分析所有類別的數(shù)據(jù)包括信號,圖像,多項(xiàng)式,時(shí)間歷程,多變量數(shù)據(jù)和線性系統(tǒng)等。從分析中總結(jié)出來的結(jié)果可以作為將來進(jìn)一步的算法和模型開發(fā)的基礎(chǔ)。此外,用戶可以快速地將代碼片段和知識轉(zhuǎn)換成可以重復(fù)使用的自動(dòng)分析例程,不需要變量聲明和維數(shù)定義,可很快編寫出程序。

5、MATLAB 提供了方便的數(shù)據(jù)訪問工具。例如,Data Acquisition Toolbox 允許用戶將實(shí)時(shí)的測量數(shù)據(jù)直接傳送到MATLAB 進(jìn)行分析,Database Toolbox 允許用戶訪問符合ODBC 和JDBC的數(shù)據(jù)庫,而M 文件,C 和Fortran 程序中的處理文本和二進(jìn)制文件的I/O 函數(shù),則允許用戶處理任何格式的數(shù)據(jù)。MATLAB 和相關(guān)的工具箱包含了科學(xué)計(jì)算中需要的專業(yè)圖形功能。從2-D 原始數(shù)據(jù)的曲線圖到帶標(biāo)記的等值線圖和交互式的GUI,這些工具提供了模型可視化的能力,幫助用戶理解復(fù)雜的系統(tǒng)。特別是MATLAB 提供了對3-D 標(biāo)量和矢量可視化的能力,包括顯示等值面和

6、流圖。這個(gè)能力使科學(xué)家和工程師們能夠?qū)Υ罅?、?fù)雜和多維的數(shù)據(jù)進(jìn)行可視化。Matlab 實(shí)時(shí)仿真環(huán)境,RTW 是MATLAB 提供的一個(gè)實(shí)時(shí)開發(fā)環(huán)境,是MathWork 系列軟件的重要組成部分。RTW 與MATLAB 其他組成軟件的無縫連接,既滿足了設(shè)計(jì)者在系統(tǒng)概念與方案設(shè)計(jì)等方面的需求,也為系統(tǒng)的技術(shù)實(shí)現(xiàn)或完成不同功能的系統(tǒng)實(shí)時(shí)操作實(shí)驗(yàn)提供了方便,并且為并行工程的實(shí)現(xiàn)創(chuàng)造了一個(gè)良好的環(huán)境。它能直接從Simulink 的模型中產(chǎn)生優(yōu)化的、可移植的和個(gè)性化的代碼,并根據(jù)目標(biāo)配置自動(dòng)生成多種環(huán)境下的程序,在硬件上運(yùn)行動(dòng)態(tài)系統(tǒng)模型,同時(shí)還支持基于模型的調(diào)試。使用RTW 進(jìn)行實(shí)時(shí)硬件的設(shè)計(jì)測試,用戶可以

7、縮短開發(fā)周期,降低成本。當(dāng)用戶在Simulink環(huán)境下建模,并得到較滿意的仿真結(jié)果后,就可將RTW 與一個(gè)快速原型化目標(biāo)(例如RTWT 目標(biāo))聯(lián)合使用。該快速原型化目標(biāo)與用戶的物理系統(tǒng)連接在一起。用戶可使用Simulink 模型作為連接物理目標(biāo)的接口,完成對系統(tǒng)的測試。RTW 的實(shí)現(xiàn)機(jī)制是一個(gè)復(fù)雜的過程,這里僅從RTW 自動(dòng)構(gòu)建應(yīng)用程序的過程這一方面進(jìn)行分析。RTW 生成應(yīng)用程序的過程圖( modle 為建立的simulink 模型的名稱)。RTW 構(gòu)造應(yīng)用程序的過程由一個(gè)M-file 的命令來控制,對于大多數(shù)目標(biāo),缺省命令是make.rtw。其過程如下:1.模型分析,首先分析 Simulin

8、k 模型,分析的過程包括以下一些主要任務(wù)(1)數(shù)值化仿真參數(shù)和??騾?shù);(2)傳遞信號寬度和采樣時(shí)間;(3)確定模塊中框圖的執(zhí)行次序;(4)計(jì)算工作向量的大小(主要是針對S-Functions ???。在這個(gè)過程中,RTW 讀取模型文件modle.mdl,然后把它編譯為模型的內(nèi)部描述。這個(gè)描述存儲是與語言無關(guān)的ASCII 文件,名稱為model.rtw。我們可以把這個(gè)文件看作是下個(gè)過程的輸入,它將會在代碼生成后被自動(dòng)刪除。2.調(diào)用TLC 程序來生成C 代碼,在這個(gè)階段,TLC 把存儲在modle.rtw 中的內(nèi)部模型描述轉(zhuǎn)換為特定的目標(biāo)代碼。TLC 是一種解釋性的程序語言,設(shè)計(jì)這個(gè)程序語言的唯

9、一的目的就是把模型描述轉(zhuǎn)變成代碼。在編譯過程中TLC 執(zhí)行包含多個(gè)目標(biāo)文件(TLC 腳本文件)和TLC 函數(shù)庫的程序。目標(biāo)文件分為兩種:一種是系統(tǒng)目標(biāo)文件,一種是模塊目標(biāo)文件。這些目標(biāo)文件指定如何把 modle.rtw 用作輸入,從modle 中生成代碼。Real-Time Workshop 綁定了用于各種目標(biāo)環(huán)境下的系統(tǒng)目標(biāo)文件,圖3.5 給出了所有可用的系統(tǒng)目標(biāo)文件。在本系統(tǒng)中,我們的目標(biāo)環(huán)境是windows,選定的快速原型化目標(biāo)為RTWT,那么在構(gòu)建程序前,指定rtwin.tlc 作為我們在編譯過程用到的TLC 腳本文件。3.生成定制Makefile,在這一步中,將產(chǎn)生定制的模板文件(m

10、akefile ),文件名稱是model.mk.。生成的makefi1e 用來指導(dǎo)make utility 編譯和鏈接模型,從而生成源代碼。RTW是從一個(gè)系統(tǒng)生成模板(system template makefile)中生成modle.mk 的,這個(gè)模板文件名稱是system.tmf (syetem 是指被選擇目標(biāo)名稱),例如在上一步中,我們選擇了rtwin.tlc 作為我們的系統(tǒng)目標(biāo)文件,那么同時(shí)也選定了一個(gè)叫做rtwin.tmf 作為了我們的系統(tǒng)模板文件。模板文件(makefile )允許用戶定制編譯器、編譯器的選項(xiàng)和程序建立期間其他的信息,如果所用的編譯器不同,那么makefile 文件

11、也將不同,例如當(dāng)目標(biāo)為Windows 時(shí),系統(tǒng)目標(biāo)文件是rtwin.tlc,但是如果用visual CC+的編譯器時(shí),系統(tǒng)模板文件就是win_vc.tmf,而選用watcom 時(shí),系統(tǒng)的模板文件就是win_watc.tmf。molde.mk 只是system.tmf 的一個(gè)拷貝,可以修改此文件來定制構(gòu)建程序的過程。RTWT(Real-Time Windows Target)是MATLAB 提供和發(fā)行的一個(gè)基于RTW體系框架的附加產(chǎn)品,它可將PC 機(jī)轉(zhuǎn)變?yōu)橐粋€(gè)實(shí)時(shí)系統(tǒng),其目的是引入一種快速原型設(shè)計(jì)的方法,用于控制器的實(shí)時(shí)測試和開發(fā)。在這個(gè)環(huán)境里,一臺PC 機(jī)既作為宿主機(jī),又作為目標(biāo)機(jī)存在。對于R

12、TWT,Simulink 和所生成的代碼都運(yùn)行在同一個(gè)PC 機(jī)上,其運(yùn)行界面可使用戶PC 機(jī)的處理器運(yùn)行在Windows NT 或者Windows 95/98/2000/XP 操作系統(tǒng)的同時(shí)采用RTW 生成的代碼。RTWT 支持許多類型的I/O 設(shè)備板卡(包括ISA 和PCI 兩種類型) 。用戶只需要安裝相關(guān)的軟件、一個(gè)編譯器和I/O 設(shè)備板卡,就可將一個(gè)PC 機(jī)用作實(shí)時(shí)系統(tǒng)并通過I/O 設(shè)備與外部設(shè)備進(jìn)行連接。內(nèi)核通過I/O driver 模塊作為接口,與I/O 硬件進(jìn)行通訊,并且檢查I/O board 安裝的正確性。Simulink與實(shí)時(shí)程序之間的通訊是通過Simulink的外部模式下的模

13、塊來實(shí)現(xiàn)的。這個(gè)模塊直接與實(shí)時(shí)內(nèi)核建立通訊,來開始和終止可執(zhí)行程序的運(yùn)行。Simulink模型和實(shí)時(shí)應(yīng)用程序之間保持著一個(gè)校驗(yàn)機(jī)制,實(shí)時(shí)內(nèi)核使用這個(gè)校驗(yàn)機(jī)制來判斷Simulink模型結(jié)構(gòu)在代碼生成的自動(dòng)中是否和實(shí)時(shí)應(yīng)用程序的結(jié)構(gòu)保持一致。這就確保了在線修改模型參數(shù)的時(shí)候,Simulink模型的參數(shù)可以正確地映射到實(shí)時(shí)應(yīng)用程序相應(yīng)的參數(shù)上。RTWT 對I/0 board 的支持,在混合仿真試驗(yàn)系統(tǒng)中,數(shù)據(jù)的物理采集和物理控制輸出是靠I/O板卡完成的,那么實(shí)時(shí)應(yīng)用程序必須在軟件上具備數(shù)據(jù)采集和控制輸出的能力,也就說程序必須要和I/O板卡建立連接。這一功能的實(shí)現(xiàn)需要RTWT的支持。在Simulink

14、模型中加入輸入輸出模塊,設(shè)置與實(shí)際板卡一致的參數(shù),然后編譯連接就可以了,需要說明的是,板卡的驅(qū)動(dòng)程序并不真的參與編譯,而只是在程序運(yùn)行期間,需要采集數(shù)據(jù)或者輸出數(shù)據(jù)時(shí),進(jìn)行動(dòng)態(tài)連接。RTWT 支持標(biāo)準(zhǔn)的I/O boards。當(dāng)Simulink 模型的運(yùn)行期間,RTWT 從一個(gè)或多個(gè)輸入通道獲得采樣數(shù)據(jù)作為模型的輸入,然后快速的處理數(shù)據(jù),再通過I/O boards 的輸出通道輸送到外部。RTWT 提供了一個(gè)通用的Simulink block library-I/O driver block library. 在Matlab 命令中輸入rtwinlib 便可以查看,I/O driver block

15、 library 提供了RTWT 所支持的I/O board 的驅(qū)動(dòng)程序。通過各個(gè)block 可以很方便的設(shè)置I/O boards。這些block 和其他的Simulink block 一樣,都支持拖放操作。對于RTWT 不支持的板卡,可利用S-function 模塊自行開發(fā)板卡的驅(qū)動(dòng)程序。I/O boards 是由其廠商提供,往往通過Switches 或者Jumpers 和廠商提供的軟件來設(shè)定based dresses,voltage levels 和unipolar or bipolar modes。在Real-Time Windows Target 也提供了參數(shù)設(shè)定的功能,這個(gè)功能的應(yīng)用

16、與廠商提供的軟件有相同的靈活性。Simulink 外部模式下實(shí)現(xiàn)參數(shù)傳遞的機(jī)制,在外部模式下Simutink 不再對框圖表示的系統(tǒng)模型進(jìn)行仿真,而是把當(dāng)前的參數(shù)值下載到目標(biāo)系統(tǒng)。在初始下載完成后,Simulink 保持在等待狀態(tài),只有在框圖中的參數(shù)發(fā)生改變或者接收到來自目標(biāo)機(jī)的參數(shù)才開始動(dòng)作。當(dāng)框圖的參數(shù)發(fā)生改變,Simulink 調(diào)用一個(gè)外部接口Mex 文件,把新的參數(shù)值和其他一些信號傳遞給外部Mex 文件。外部接口Mex 文件執(zhí)行Inter Process Communication (IPC)通道一端的代碼,這個(gè)通道把Simulink 過程(Mex 文件執(zhí)行的過程)和外部可執(zhí)行性程序的過

17、程連接在一起。Mex 文件通過這個(gè)通道,把新的參數(shù)傳遞給外部程序。通道的另一端在外部程序中執(zhí)行,這一端把新的參數(shù)值寫到目標(biāo)參數(shù)結(jié)構(gòu)中。Simulink 通過發(fā)送一個(gè)含有參數(shù)信息的訊息初始化下載操作。在C/S 結(jié)構(gòu)中,Simulink 作為客戶端,外部程序?yàn)榉?wù)端。兩個(gè)過程可以是遠(yuǎn)程的,也可以是當(dāng)?shù)氐?。?dāng)客戶端和服務(wù)端是遠(yuǎn)程的時(shí)候,通過TCP/IP 方式傳遞數(shù)據(jù),當(dāng)客戶端與服務(wù)端是當(dāng)?shù)氐臅r(shí)候,采用共享內(nèi)存的方式傳送數(shù)據(jù),在本系統(tǒng)中采用的就是后一種方式。過程控制算法的實(shí)現(xiàn)方法,一個(gè)通用的仿真平臺,必須能夠方便的讓用戶加入自己的控制算法或控制系統(tǒng)設(shè)計(jì)方案,此過程控制混合仿真平臺提供了以下三種控制算法

18、的嵌入方法:應(yīng)用Simulink 提供的模塊搭建控制器模型,Simulink 提供了各種各樣的模塊集合,在Simulink 提供的圖形用戶界面上,只要進(jìn)行簡單拖拉操作,就可利用這些模塊集合構(gòu)造出復(fù)雜的控制器模型。此外Simulink 還提供了諸如模糊邏輯工具箱與神經(jīng)網(wǎng)絡(luò)工具箱之類的高級算法控制工具箱,利用這些工具箱,結(jié)合其他模塊,可搭建出各種與之相關(guān)的控制算法模型,如模糊PID、神經(jīng)網(wǎng)絡(luò)PID 等,如以模糊PID 控制器模型。利用工具箱的圖形用戶界面編輯控制器,可方便地設(shè)計(jì)智能控制器的直觀圖式系統(tǒng)。利用 Simulink 模塊搭建控制器模型靈活方便,它外表以方塊圖形式呈現(xiàn),且采用分層結(jié)構(gòu)。應(yīng)用

19、Simulink 模型作為控制器的可視化界面,不僅能讓用戶知道控制器具體環(huán)節(jié)的動(dòng)態(tài)細(xì)節(jié),而且能讓用戶清晰地了解控制器中各器件、各子系統(tǒng)的信息交換,掌握各部分間的交互影響,為進(jìn)一步分析改善控制器提供了便利條件。編寫C 語言的S-函數(shù)實(shí)現(xiàn)控制算法,在實(shí)際應(yīng)用中,通常會發(fā)現(xiàn)有些算法用普通的Simulink 模塊不容易搭建,對此可以使用Simulink支持的S-函數(shù)格式,S-函數(shù)作為Simulink 的擴(kuò)展工具有固定的程序格式,可采用MATLAB、C/C+、Fortran 等語言編寫。但由于在實(shí)時(shí)仿真過程中需要將Simulink 模型轉(zhuǎn)化為C 代碼并生成獨(dú)立文件,只有C/C+語言編寫的S-函數(shù)支持這一

20、功能,因此在算法擴(kuò)展中必須采用C/C+語言編寫的S-函數(shù)。S-函數(shù)的工作原理和Simulink的仿真原理基本類似,每一個(gè)Simulink模塊都具有輸入u、輸出y、狀態(tài)x三個(gè)向量和其他一些對應(yīng)仿真各階段的方法。Simulink通過循環(huán)調(diào)用模型中的各模塊的特定方法來完成諸如計(jì)算輸出值、更新離散狀態(tài)值、計(jì)算連續(xù)狀態(tài)微分等任務(wù)。在S-函數(shù)中提供了與Simulink仿真不同階段相對應(yīng)的回調(diào)函數(shù)。初始化階段包括mdlInitializeSizes , mdlInitializeSampleTimes 和mdlInitializeCondi 模塊它們分別起初始化系統(tǒng)輸入維數(shù)輸出維數(shù)、狀態(tài)變量個(gè)數(shù),定義仿真采

21、樣時(shí)間和初始化狀態(tài)變量的作用。輸出階段mdlOutputs模塊計(jì)算系統(tǒng)輸出。循環(huán)仿真階段mdlUpdate模塊計(jì)算更新系統(tǒng)當(dāng)前狀態(tài)變量的值。C語言S函數(shù)不僅可以將具有C語言描述功能的代碼嵌入Simulink模塊,以便于在Simulink中仿真,而且可以很容易的將C語言S-函數(shù)模塊功能代碼轉(zhuǎn)換成純C代碼。14MATALAB hybrid simulation platform control algorithm overviewMATLAB Hybrid simulation platform, that is, the hardware put into the simulation loop

22、 in the loop simulation system for process control of the development and testing. Platform embedded controller provides three methods, in particular, can use MATLAB language has greatly enhanced the flexibility of the platform. In order to build simulation system for process control systems must be

23、 addressed as a virtual controller PC, the environment and in the Windows operating system to achieve real-time control to achieve these two problems. We first elaborate simulation system for process control system principle, and finally introduced the embedded platform control algorithm method and

24、the experiment results verify the effectiveness of the platform. Hybrid simulation platform process control theory: (1) numerical calculation, based on more than 600 MATLAB provides some commonly used mathematical and engineering functions. The numerical computation of these functions are optimized

25、for matrix operations, you can use it to replace the underlying programming language. Maintain the same performance in the case, the programming effort is very small, value calculated using the LAPACK and BLAS, FFTW other excellent math library, so the calculation efficiency is further improved. MAT

26、LAB contains the main mathematical functions are linear algebra and matrix operations, Fourier transform and statistical analysis, solving differential equations, sparse matrix operations, and trigonometric and other elementary mathematics, etc. In addition, use of MATLAB applications with continuou

27、s expanded to add a function for a number of specific areas. (2) Algorithm development, computing power, easy to use programming language and rich mathematical functions to the most suitable for MATLAB for algorithm development. Typical applications include: data analysis, signal processing, image p

28、rocessing, system modeling and advanced algorithm research. Whether the user is using the existing algorithms or developing their own, based on MATLAB provides a common platform. MATLAB for algorithm development using the mathematical expression of the same writing as usual User-based algorithms dev

29、eloped in MATLAB integration to external systems running. Once the users algorithms and simulation through the writing and debugging, MATLAB compiler and the C / C + + Math Library MATLAB application will be automatically converted to portable and C + + code tool. For signal processing, control syst

30、em design and other applications, MATLAB toolbox providing a range of advanced technology. Toolbox far beyond the scope of provision of some basic algorithms: they provide a learning, research, innovation and cutting-edge theory and technology arena. Algorithm toolbox to provide a neural network too

31、lbox, optimization toolbox, system identification toolbox, robust control toolbox, model predictive control toolbox, the control system toolbox, fuzzy logic toolbox. (3) Data analysis and visualization, through the MATLAB software, users can analyze all types of data, including signal, image, polyno

32、mials, time course, data and multi-variable linear systems. From the analysis results can be summed up as a model for the further development of the algorithm and the base. In addition, users can quickly convert the code fragment and knowledge can be reused in automated analysis routines, no variabl

33、e declarations and the definition of dimension, can write programs quickly. Based on MATLAB provides a convenient data access tools. For example, the data acquisition toolbox allows users to send real-time measurement data directly into MATLAB for analysis, database toolkit to allow users to access

34、consistent with the ODBC and JDBC in the database, while M c and the Fortran language documents and procedures in handling text and binary file I / O function, then allow the user to handle any format. And related MATLAB toolbox contains a scientific computing need of professional graphics. The raw

35、data from the two-dimensional curve to the contour map with markers and interactive graphical user interface, these tools provide a model visualized capabilities to help users understand complex systems. In particular, provides a MATLAB-based three-dimensional scalar and vector visualization capabil

36、ities, including display equivalence face and flow diagram. This capability enables scientists and engineers to a large number of complex and multidimensional data visualization. MATLAB real-time simulation environment, RTW is to provide a real-time based on MATLAB other components of the software f

37、or seamless connection, not only to meet the designers in the system concept and program design needs, the technology for the system or perform different functions in real-time operating system provides the convenience of experiments, and for implementation of concurrent engineering to create a good

38、 environment. It directly from the SIMULINK simulation model produces optimized, portable and personalized code, and automatically generate a variety of configurations depending on the target under the program environment, the hardware running dynamic system model also supports model-based debug.Rea

39、l-time using the RTW of the design of test hardware, users can shorten the development cycle and reduce costs. When the user model in SIMULINK environment and get satisfactory simulation results, can be a RTW with the goal of rapid prototyping (such as RTWT target) joint use. The goal of rapid proto

40、typing of physical systems and users connected. Users can use the SIMULINK model as the interface to connect the physical target to complete system testing.RTW implementation mechanism is a complex process, where only from the RTW process automated building applications that were analyzed. RTW gener

41、ated application process diagram (model for the establishment of the SIMULINK name). RTW construction application process by an M-file in order to control for most of the target, the default command is make.rtw. The process is as follows: 1. model, first analyzes the SIMULINK model to analyze the pr

42、ocess includes the following main tasks (1) Numerical simulation parameters and molding parameters; (2)Passing the signal width and sampling time; (3) determine the module block diagram of the implementation of the order; (4) Calculation of the size of the vector (mainly for S-Functions module box).

43、 In this process, RTW read the model file modle.mdl, and then compile it as a model of internal description. This description is stored in ASCII files and language-independent, name model.rtw. We can use that file as input for the next process, it will be automatically deleted after the code generat

44、ion. 2. call TLC program to generate C code, at this stage, TLC stored in modle.rtw in the internal model description into a specific object code. TLC is an interpreted programming language, programming language design that the only purpose is to model description into the code. TLC in the compilati

45、on process of the implementation of multiple object files (TLC script file), and TLC library procedures. Object file is divided into two types: one is the target file system, one is the module object file. The target file to specify how to modle.rtw used as an input, generate code from modle. Real-T

46、ime Workshop target binding environment for a variety of target file system, Figure 3.5 shows all the available system target file. In this system, our target environment is windows, the selected target rapid prototyping RTWT, then the building process before, we specify rtwin.tlc as TLC used in the

47、 compilation process script file. 3.Generate customized M-file, in this step, will have a custom template file (M-file), the file name is model.mk. Generated makefi1e used to guide the make utility to compile and link model, which generates source code. RTW is a system-generated template (system tem

48、plate M-file) generated modle.mk, this template file name is system.tmf (syetem is the target name is selected), such as in the previous step, we selected rtwin.tlc as Our system target file, also called rtwin.tmf selected our system as a template file. Template file (M-file) allows users to customi

49、ze the compiler, compiler options and other information during the process to establish, if the compiler used in different, then the makefile file will be different, such as when the target is Windows, the system target file is rtwin . tlc, but with the visual C C + + compiler, the system template f

50、ile is win_vc.tmf, and choose watcom, the system of the template file is win_watc.tmf. molde.mk only system.tmf a copy, you can modify this file to customize the build process of the process. RTWT (Real-Time Windows Target) is to provide and distribute a MATLAB RTW system framework based on the addi

51、tional products are shipping 將 turn its machines into as a PC system with the aim of rapid prototyping one kind of methods for Kong real-time testing and development. In this environment, a PC, both as a host, but also as the target machine there. For RTWT, SIMULINK and the generated code running on

52、 the same PC, the interface allows users to run PC-processor running on Windows NT or Windows 95/98/2000/XP operating system, while the code generated by RTW . RTWT supports many types of I / O device boards (including the two types of ISA and PCI). Users only need to install related software, a com

53、piler and I / O device card, a PC machine can be used for real-time system and through I / O devices and external devices to connect. Core through the I / O driver module as the interface and I / O hardware, communication, and to check I / O board installation is correct. SIMULINK and Real-time comm

54、unication between processes is through the SIMULINK external mode, the module to achieve. This module is to establish communication directly with the real-time kernel to start and terminate the operation of an executable program. SIMULINK models and real-time applications have maintained a checking

55、mechanism to check real-time kernel to use this mechanism to determine the SIMULINK model structure in the automatic code generation and real-time whether the structure of the application consistent. This ensures that the line changes when the model parameters, SIMULINK model parameters can be corre

56、ctly mapped to the real-time application, the corresponding parameters. RTWT on the I / 0 boards support, in a mixed simulation systems, data collection and physical control of the physical output by I / O board to complete, then the real-time applications must have the software output data acquisit

57、ion and control capability , also said that procedures have to be, and I / O board to establish a connection. The realization of this function requires RTWT support.SIMULINK model, adding input and output modules, setting and actual card Yi Di , and then build the connection is available, and need t

58、o be explained that the boards procedure does not it is involved in compilation, but only during the program, need to data or output data collected when the dynamic connection. RTWT support standard I / O boards. When the SIMULINK model to run time, RTWT from one or more input channels were sampled

59、data as model input, and then process the data quickly, and then through the I / O boards to the external output channel delivery. RTWT provides a generic SIMULINK block library-I / O driver block library. In the MATLAB command input can see, I / O driver block library provides RTWT supported I / O

60、board driver. Each block can be easily by setting I / O boards. The block and, like other SIMULINK block, support drag and drop. Do not support the board for RTWT can use S-function modules developed by board driver. I / O boards is provided by companies, often through the Switches or Jumpers and so

61、ftware vendors to set based dresses, voltage levels, and bipolar modes. In Real-Time Windows Target also offers the functions of the parameters set, the function of application and software vendors have the same flexibility. SIMULINK external mode, parameter passing mechanisms to achieve in the exte

62、rnal mode SIMULINK no longer a system block diagram model simulation, but the current value of the parameter download to the target system. After the initial download is complete, SIMULINK to keep waiting for the state, only in the block diagram of the parameters change or receive parameters from th

63、e target machine began to move. When the parameters change diagram, SIMULINK calls an external interface M-file, the new parameter values and some other signal to an external M-file. External interface M-file execution Inter Process Communication (IPC) channel at one end of the code, the access to S

64、IMULINK process (M-file execution process) and external procedures executable process together. M-file through this channel, the new parameter to the external program. Channel the other end of the external program execution, the client writes the new value of the parameter object parameter structure

65、. SIMULINK information by sending a message containing the initialization parameter download operation. In the C / S structure, SIMULINK as a client, server-side external procedures. Two processes can be remote, it can be local. When the client and server is remote, when, through the TCP / IP mode t

66、ransmission of data, when the client and the server is local time, use shared memory, transmission of data, the system is used in the latter way. Implementation of process control algorithms, a common simulation platform, to Jean-users to easily add their own control algorithm or control system design, process control hybrid s

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

相關(guān)資源

更多
正為您匹配相似的精品文檔
關(guān)于我們 - 網(wǎng)站聲明 - 網(wǎng)站地圖 - 資源地圖 - 友情鏈接 - 網(wǎng)站客服 - 聯(lián)系我們

copyright@ 2023-2025  zhuangpeitu.com 裝配圖網(wǎng)版權(quán)所有   聯(lián)系電話:18123376007

備案號:ICP2024067431-1 川公網(wǎng)安備51140202000466號


本站為文檔C2C交易模式,即用戶上傳的文檔直接被用戶下載,本站只是中間服務(wù)平臺,本站所有文檔下載所得的收益歸上傳人(含作者)所有。裝配圖網(wǎng)僅提供信息存儲空間,僅對用戶上傳內(nèi)容的表現(xiàn)方式做保護(hù)處理,對上載內(nèi)容本身不做任何修改或編輯。若文檔所含內(nèi)容侵犯了您的版權(quán)或隱私,請立即通知裝配圖網(wǎng),我們立即給予刪除!