the matlab®& simulink®interfaces · 2009-10-28 · shinho systems co., ltd. 3 amesimto...
TRANSCRIPT
![Page 1: The Matlab®& Simulink®interfaces · 2009-10-28 · Shinho Systems Co., Ltd. 3 AMESimto Simulinksoftware requirements AMESim®–Matlab®& Simulink®Interfaces](https://reader031.vdocuments.net/reader031/viewer/2022020216/5ca1597988c993352b8be380/html5/thumbnails/1.jpg)
Shinho Systems Co., Ltd.
The Matlab® & Simulink® interfaces
Shinho Systems Co., Ltd.
Tel:+82-31-737-6800 Fax:+82-31-737-6809
E-mail :[email protected], http://www.ishinho.com
2F Joongil Eines Plantz, Sangdaewon-dong, Seongnam-si, Gyeonggi-do, Korea
![Page 2: The Matlab®& Simulink®interfaces · 2009-10-28 · Shinho Systems Co., Ltd. 3 AMESimto Simulinksoftware requirements AMESim®–Matlab®& Simulink®Interfaces](https://reader031.vdocuments.net/reader031/viewer/2022020216/5ca1597988c993352b8be380/html5/thumbnails/2.jpg)
Shinho Systems Co., Ltd.2
AMESim - Simulink InterfacesEasy-to-use and efficient tool for coupling
AMESim plant model within Simulink control system model
AMESimMulti-domain systems
simulation platform
SimulinkThe de-facto standard for
control system design
AMESim-Simulink Standard Interface
Sine entry appliedto the system
Xp
SignalGenerator forvalve opening
xp
p1
p2
rpm
sv
AMESim: slink_
S-Function
P2
P1
1450
Constant forPump Speed
Rod displacement
Pressure @ port 1
Pressure @ port 2
AMESim® – Matlab® & Simulink® Interfaces
![Page 3: The Matlab®& Simulink®interfaces · 2009-10-28 · Shinho Systems Co., Ltd. 3 AMESimto Simulinksoftware requirements AMESim®–Matlab®& Simulink®Interfaces](https://reader031.vdocuments.net/reader031/viewer/2022020216/5ca1597988c993352b8be380/html5/thumbnails/3.jpg)
Shinho Systems Co., Ltd.3
AMESim to Simulink software requirements
AMESim® – Matlab® & Simulink® Interfaces
![Page 4: The Matlab®& Simulink®interfaces · 2009-10-28 · Shinho Systems Co., Ltd. 3 AMESimto Simulinksoftware requirements AMESim®–Matlab®& Simulink®Interfaces](https://reader031.vdocuments.net/reader031/viewer/2022020216/5ca1597988c993352b8be380/html5/thumbnails/4.jpg)
Shinho Systems Co., Ltd.4
Simulink to AMESim Software requireme
AMESim® – Matlab® & Simulink® Interfaces
![Page 5: The Matlab®& Simulink®interfaces · 2009-10-28 · Shinho Systems Co., Ltd. 3 AMESimto Simulinksoftware requirements AMESim®–Matlab®& Simulink®Interfaces](https://reader031.vdocuments.net/reader031/viewer/2022020216/5ca1597988c993352b8be380/html5/thumbnails/5.jpg)
Shinho Systems Co., Ltd.5
AMESim Simulink Interface 환경설정 MATLAB 설치위치
※ MATLAB 설치 시 C:\MATLAB 폴더에설치 할 것
(Default 설치위치는C:\Program\MATLAB)
![Page 6: The Matlab®& Simulink®interfaces · 2009-10-28 · Shinho Systems Co., Ltd. 3 AMESimto Simulinksoftware requirements AMESim®–Matlab®& Simulink®Interfaces](https://reader031.vdocuments.net/reader031/viewer/2022020216/5ca1597988c993352b8be380/html5/thumbnails/6.jpg)
Shinho Systems Co., Ltd.
AMESim Simulink Interface 환경설정1
Path 입력
Matlab 환경변수 추가
1
2
3
4
5
![Page 7: The Matlab®& Simulink®interfaces · 2009-10-28 · Shinho Systems Co., Ltd. 3 AMESimto Simulinksoftware requirements AMESim®–Matlab®& Simulink®Interfaces](https://reader031.vdocuments.net/reader031/viewer/2022020216/5ca1597988c993352b8be380/html5/thumbnails/7.jpg)
Shinho Systems Co., Ltd.
2 컴파일러 설정
※사전 Visual C++ 설치필수
2-1 AMESim 폴더내에 vcvars32.bat 파일이있는지확인
파일부재시 Visual C++ 설치폴더의 bin 폴더내에서vcvars32.bat 파일을 AMESim 설치폴더로복사할것
AMESim Simulink Interface 환경설정
1 2
![Page 8: The Matlab®& Simulink®interfaces · 2009-10-28 · Shinho Systems Co., Ltd. 3 AMESimto Simulinksoftware requirements AMESim®–Matlab®& Simulink®Interfaces](https://reader031.vdocuments.net/reader031/viewer/2022020216/5ca1597988c993352b8be380/html5/thumbnails/8.jpg)
Shinho Systems Co., Ltd.
2-2 도스창에서 $AME\lib\amemex.exe를 실행하여 Visual C++ 선택
도스창에서 AMESim의lib 폴더로 갈것
AMESim Simulink Interface 환경설정
3
1
2
AMESim ver 7
![Page 9: The Matlab®& Simulink®interfaces · 2009-10-28 · Shinho Systems Co., Ltd. 3 AMESimto Simulinksoftware requirements AMESim®–Matlab®& Simulink®Interfaces](https://reader031.vdocuments.net/reader031/viewer/2022020216/5ca1597988c993352b8be380/html5/thumbnails/9.jpg)
Shinho Systems Co., Ltd.
AMESim Simulink Interface 환경설정
2-3 AMESim 버전별 amemex 파일 위치(해당 디렉터리에서 파일 확인)
AMESim 4.3
AMESim 7
AMESim 8A
AMESim 8B
![Page 10: The Matlab®& Simulink®interfaces · 2009-10-28 · Shinho Systems Co., Ltd. 3 AMESimto Simulinksoftware requirements AMESim®–Matlab®& Simulink®Interfaces](https://reader031.vdocuments.net/reader031/viewer/2022020216/5ca1597988c993352b8be380/html5/thumbnails/10.jpg)
Shinho Systems Co., Ltd.
“Y”입력”
“amemex –setup”입력
AMESim Simulink Interface 환경설정4
5
6
![Page 11: The Matlab®& Simulink®interfaces · 2009-10-28 · Shinho Systems Co., Ltd. 3 AMESimto Simulinksoftware requirements AMESim®–Matlab®& Simulink®Interfaces](https://reader031.vdocuments.net/reader031/viewer/2022020216/5ca1597988c993352b8be380/html5/thumbnails/11.jpg)
Shinho Systems Co., Ltd.
2-4 AMESim 컴파일러 변경
AMESim Simulink Interface 환경설정
1
2
3
4
5
![Page 12: The Matlab®& Simulink®interfaces · 2009-10-28 · Shinho Systems Co., Ltd. 3 AMESimto Simulinksoftware requirements AMESim®–Matlab®& Simulink®Interfaces](https://reader031.vdocuments.net/reader031/viewer/2022020216/5ca1597988c993352b8be380/html5/thumbnails/12.jpg)
Shinho Systems Co., Ltd.
3 Interface 환경설정 후 Error 발생 시
Compilation window에서마우스단축키를클릭하여Interactive compilation 클릭한후 Visual C++ [2] 입력
AMESim Simulink Interface 환경설정
![Page 13: The Matlab®& Simulink®interfaces · 2009-10-28 · Shinho Systems Co., Ltd. 3 AMESimto Simulinksoftware requirements AMESim®–Matlab®& Simulink®Interfaces](https://reader031.vdocuments.net/reader031/viewer/2022020216/5ca1597988c993352b8be380/html5/thumbnails/13.jpg)
Shinho Systems Co., Ltd.
AMESim Simulink Interface 환경설정
Parameter Mode에서 System Build가완료되면정상적으로환경설정이완료됨.
![Page 14: The Matlab®& Simulink®interfaces · 2009-10-28 · Shinho Systems Co., Ltd. 3 AMESimto Simulinksoftware requirements AMESim®–Matlab®& Simulink®Interfaces](https://reader031.vdocuments.net/reader031/viewer/2022020216/5ca1597988c993352b8be380/html5/thumbnails/14.jpg)
Shinho Systems Co., Ltd.
AMESim Simulink Interface Modeling Interface Block 생성
![Page 15: The Matlab®& Simulink®interfaces · 2009-10-28 · Shinho Systems Co., Ltd. 3 AMESimto Simulinksoftware requirements AMESim®–Matlab®& Simulink®Interfaces](https://reader031.vdocuments.net/reader031/viewer/2022020216/5ca1597988c993352b8be380/html5/thumbnails/15.jpg)
Shinho Systems Co., Ltd.
Outputs Inputs
Seen as the Simulink block
Interface Block 생성
AMESim Simulink Interface Modeling
![Page 16: The Matlab®& Simulink®interfaces · 2009-10-28 · Shinho Systems Co., Ltd. 3 AMESimto Simulinksoftware requirements AMESim®–Matlab®& Simulink®Interfaces](https://reader031.vdocuments.net/reader031/viewer/2022020216/5ca1597988c993352b8be380/html5/thumbnails/16.jpg)
Shinho Systems Co., Ltd.
Outputs to Simulink®
=Simulink inputs
Inputs from Simulink®
=Simulink outputs
Interface Block 생성
AMESim Simulink Interface Modeling
![Page 17: The Matlab®& Simulink®interfaces · 2009-10-28 · Shinho Systems Co., Ltd. 3 AMESimto Simulinksoftware requirements AMESim®–Matlab®& Simulink®Interfaces](https://reader031.vdocuments.net/reader031/viewer/2022020216/5ca1597988c993352b8be380/html5/thumbnails/17.jpg)
Shinho Systems Co., Ltd.
Interface Block 생성
AMESim Simulink Interface Modeling
![Page 18: The Matlab®& Simulink®interfaces · 2009-10-28 · Shinho Systems Co., Ltd. 3 AMESimto Simulinksoftware requirements AMESim®–Matlab®& Simulink®Interfaces](https://reader031.vdocuments.net/reader031/viewer/2022020216/5ca1597988c993352b8be380/html5/thumbnails/18.jpg)
Shinho Systems Co., Ltd.
MATLAB SIMULINK 실행
AMESim Simulink Interface Modeling
![Page 19: The Matlab®& Simulink®interfaces · 2009-10-28 · Shinho Systems Co., Ltd. 3 AMESimto Simulinksoftware requirements AMESim®–Matlab®& Simulink®Interfaces](https://reader031.vdocuments.net/reader031/viewer/2022020216/5ca1597988c993352b8be380/html5/thumbnails/19.jpg)
Shinho Systems Co., Ltd.
AMESim® file = slink.ame
S-function name = slink_
1st parameter:
AMESim® results file created (1) or not (any other number)
2nd parameter:
AMESim® print interval in the results file (parameter 0 : same interval as the one defined in Simulink®)
Simulink S-Function 설정
AMESim Simulink Interface Modeling
![Page 20: The Matlab®& Simulink®interfaces · 2009-10-28 · Shinho Systems Co., Ltd. 3 AMESimto Simulinksoftware requirements AMESim®–Matlab®& Simulink®Interfaces](https://reader031.vdocuments.net/reader031/viewer/2022020216/5ca1597988c993352b8be380/html5/thumbnails/20.jpg)
Shinho Systems Co., Ltd.
1
2
12
S-Function 인식
※ Simulink를 Run(F5)시켜 S-Function과 AMESimInterface Block을 sink 시킨다
AMESim Simulink Interface Modeling
![Page 21: The Matlab®& Simulink®interfaces · 2009-10-28 · Shinho Systems Co., Ltd. 3 AMESimto Simulinksoftware requirements AMESim®–Matlab®& Simulink®Interfaces](https://reader031.vdocuments.net/reader031/viewer/2022020216/5ca1597988c993352b8be380/html5/thumbnails/21.jpg)
Shinho Systems Co., Ltd.
Hydraulic systems are normally stiff, so to solve such systems in Simulink,Select stiff integrator algorithms. (ode23s, ode15s)
Simulink simulation parameters
Solver 설정
AMESim Simulink Interface Modeling
![Page 22: The Matlab®& Simulink®interfaces · 2009-10-28 · Shinho Systems Co., Ltd. 3 AMESimto Simulinksoftware requirements AMESim®–Matlab®& Simulink®Interfaces](https://reader031.vdocuments.net/reader031/viewer/2022020216/5ca1597988c993352b8be380/html5/thumbnails/22.jpg)
Shinho Systems Co., Ltd.
AMESim Simulink Interface Modeling Simulink Results