Upload
truongduong
View
223
Download
0
Embed Size (px)
Citation preview
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
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
Shinho Systems Co., Ltd.3
AMESim to Simulink software requirements
AMESim® – Matlab® & Simulink® Interfaces
Shinho Systems Co., Ltd.4
Simulink to AMESim Software requireme
AMESim® – Matlab® & Simulink® Interfaces
Shinho Systems Co., Ltd.5
AMESim Simulink Interface 환경설정 MATLAB 설치위치
※ MATLAB 설치 시 C:\MATLAB 폴더에설치 할 것
(Default 설치위치는C:\Program\MATLAB)
Shinho Systems Co., Ltd.
AMESim Simulink Interface 환경설정1
Path 입력
Matlab 환경변수 추가
1
2
3
4
5
Shinho Systems Co., Ltd.
2 컴파일러 설정
※사전 Visual C++ 설치필수
2-1 AMESim 폴더내에 vcvars32.bat 파일이있는지확인
파일부재시 Visual C++ 설치폴더의 bin 폴더내에서vcvars32.bat 파일을 AMESim 설치폴더로복사할것
AMESim Simulink Interface 환경설정
1 2
Shinho Systems Co., Ltd.
2-2 도스창에서 $AME\lib\amemex.exe를 실행하여 Visual C++ 선택
도스창에서 AMESim의lib 폴더로 갈것
AMESim Simulink Interface 환경설정
3
1
2
AMESim ver 7
Shinho Systems Co., Ltd.
AMESim Simulink Interface 환경설정
2-3 AMESim 버전별 amemex 파일 위치(해당 디렉터리에서 파일 확인)
AMESim 4.3
AMESim 7
AMESim 8A
AMESim 8B
Shinho Systems Co., Ltd.
“Y”입력”
“amemex –setup”입력
AMESim Simulink Interface 환경설정4
5
6
Shinho Systems Co., Ltd.
2-4 AMESim 컴파일러 변경
AMESim Simulink Interface 환경설정
1
2
3
4
5
Shinho Systems Co., Ltd.
3 Interface 환경설정 후 Error 발생 시
Compilation window에서마우스단축키를클릭하여Interactive compilation 클릭한후 Visual C++ [2] 입력
AMESim Simulink Interface 환경설정
Shinho Systems Co., Ltd.
AMESim Simulink Interface 환경설정
Parameter Mode에서 System Build가완료되면정상적으로환경설정이완료됨.
Shinho Systems Co., Ltd.
AMESim Simulink Interface Modeling Interface Block 생성
Shinho Systems Co., Ltd.
Outputs Inputs
Seen as the Simulink block
Interface Block 생성
AMESim Simulink Interface Modeling
Shinho Systems Co., Ltd.
Outputs to Simulink®
=Simulink inputs
Inputs from Simulink®
=Simulink outputs
Interface Block 생성
AMESim Simulink Interface Modeling
Shinho Systems Co., Ltd.
Interface Block 생성
AMESim Simulink Interface Modeling
Shinho Systems Co., Ltd.
MATLAB SIMULINK 실행
AMESim Simulink Interface Modeling
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
Shinho Systems Co., Ltd.
1
2
12
S-Function 인식
※ Simulink를 Run(F5)시켜 S-Function과 AMESimInterface Block을 sink 시킨다
AMESim Simulink Interface Modeling
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
Shinho Systems Co., Ltd.
AMESim Simulink Interface Modeling Simulink Results