📄 pid_interpolation_model.mdl
字号:
DstBlock "Out3"
DstPort 1
}
}
Line {
SrcBlock "Tich phan 2"
SrcPort 1
Points [0, 0; 15, 0]
Branch {
Points [0, 0]
DstBlock "Mux"
DstPort 2
}
Branch {
Points [0, 150; -685, 0]
DstBlock "Sum3"
DstPort 2
}
}
Line {
SrcBlock "PI Controller\nDK toc do"
SrcPort 1
Points [0, 0; 15, 0]
Branch {
DstBlock "Khau quan tinh\nbac nhat"
DstPort 1
}
Branch {
Points [0, 185]
DstBlock "Upi-DK toc do"
DstPort 1
}
}
Line {
Labels [0, 1]
SrcBlock "PD Controller\nDK vi tri"
SrcPort 1
Points [0, 0; 10, 0]
Branch {
Points [0, -105]
DstBlock "Upd-DK vi tri"
DstPort 1
}
Branch {
DstBlock "Chuan hoa U"
DstPort 1
}
}
Line {
Labels [2, 0]
SrcBlock "Tich phan 1"
SrcPort 1
Points [0, 0; 15, 0]
Branch {
Points [0, 55; -315, 0]
DstBlock "Sum2"
DstPort 2
}
Branch {
DstBlock "Tich phan 2"
DstPort 1
}
Branch {
Points [0, -95]
DstBlock "Mux1"
DstPort 2
}
}
Line {
SrcBlock "Khau quan tinh\nbac nhat"
SrcPort 1
Points [0, 0; 10, 0]
Branch {
Points [0, 0]
DstBlock "Sum1"
DstPort 2
}
Branch {
Points [0, 90]
Branch {
Points [0, 95]
DstBlock "Gia toc dong co"
DstPort 1
}
Branch {
DstBlock "Momen\nquan tinh J"
DstPort 1
}
}
}
Line {
SrcBlock "Sum1"
SrcPort 1
Points [0, 5]
DstBlock "Tich phan 1"
DstPort 1
}
Line {
SrcBlock "Mux1"
SrcPort 1
DstBlock "Out1"
DstPort 1
}
Line {
SrcBlock "Khuech dai"
SrcPort 1
Points [0, 0; 5, 0]
Branch {
Points [0, 0]
DstBlock "Sum2"
DstPort 1
}
Branch {
Points [0, -145; 420, 0]
DstBlock "Mux1"
DstPort 1
}
}
Line {
SrcBlock "In1"
SrcPort 1
DstBlock "Khau quan tinh\ntien xu ly"
DstPort 1
}
Line {
SrcBlock "Nhieu do tai-gia toc 1"
SrcPort 1
Points [50, 0]
DstBlock "Sum1"
DstPort 1
}
Line {
Labels [0, 1]
SrcBlock "Chuan hoa U"
SrcPort 1
Points [0, 0; 15, 0]
Branch {
Labels [1, 0]
Points [0, 185]
DstBlock "Uref-DK bien tan"
DstPort 1
}
Branch {
Points [0, 0]
DstBlock "Khuech dai"
DstPort 1
}
}
Line {
SrcBlock "Momen\nquan tinh J"
SrcPort 1
DstBlock "Momen\ndong co Y"
DstPort 1
}
Line {
SrcBlock "Khau quan tinh\ntien xu ly"
SrcPort 1
Points [0, 0; 10, 0]
Branch {
DstBlock "Sum3"
DstPort 1
}
Branch {
Points [0, -60; 690, 0; 0, 45]
DstBlock "Mux"
DstPort 1
}
}
}
}
Block {
BlockType MATLABFcn
Name "Bo noi suy truc X"
Position [105, 80, 165, 110]
MATLABFcn "Interpolation_X"
}
Block {
BlockType MATLABFcn
Name "Bo noi suy truc Y"
Position [105, 270, 165, 300]
MATLABFcn "Interpolation_Y"
}
Block {
BlockType Outport
Name "Out1"
Position [330, 48, 360, 62]
}
Block {
BlockType Outport
Name "Out2"
Position [330, 88, 360, 102]
Port "2"
}
Block {
BlockType Outport
Name "Out3"
Position [330, 128, 360, 142]
Port "3"
}
Block {
BlockType Outport
Name "Out4"
Position [330, 238, 360, 252]
Port "4"
}
Block {
BlockType Outport
Name "Out5"
Position [330, 278, 360, 292]
Port "5"
}
Block {
BlockType Outport
Name "Out6"
Position [330, 318, 360, 332]
Port "6"
}
Line {
SrcBlock "Bo noi suy truc X"
SrcPort 1
DstBlock "Bo dieu khien\ntruc X"
DstPort 1
}
Line {
SrcBlock "In1"
SrcPort 1
DstBlock "Bo noi suy truc X"
DstPort 1
}
Line {
SrcBlock "In2"
SrcPort 1
DstBlock "Bo noi suy truc Y"
DstPort 1
}
Line {
SrcBlock "Bo dieu khien\ntruc X"
SrcPort 1
DstBlock "Out1"
DstPort 1
}
Line {
SrcBlock "Bo dieu khien\ntruc X"
SrcPort 2
DstBlock "Out2"
DstPort 1
}
Line {
SrcBlock "Bo dieu khien\ntruc Y"
SrcPort 1
DstBlock "Out4"
DstPort 1
}
Line {
SrcBlock "Bo dieu khien\ntruc Y"
SrcPort 2
DstBlock "Out5"
DstPort 1
}
Line {
SrcBlock "Bo noi suy truc Y"
SrcPort 1
DstBlock "Bo dieu khien\ntruc Y"
DstPort 1
}
Line {
SrcBlock "Bo dieu khien\ntruc X"
SrcPort 3
DstBlock "Out3"
DstPort 1
}
Line {
SrcBlock "Bo dieu khien\ntruc Y"
SrcPort 3
DstBlock "Out6"
DstPort 1
}
}
}
Block {
BlockType Reference
Name "Bo tao\nxung nhip"
Ports [0, 1]
Position [25, 105, 65, 145]
SourceBlock "fixpt_lib_4/Sources/Counter\nLimited"
SourceType "Fixed-Point Counter Limited"
uplimit "10"
tsamp "0.2"
}
Block {
BlockType Constant
Name "Hang so"
Position [70, 185, 100, 215]
}
Block {
BlockType Reference
Name "Int2Double"
Ports [1, 1]
Position [195, 145, 235, 185]
SourceBlock "fixpt_lib_4/Data Type/Gateway Out"
SourceType "Fixed-Point Gateway Out"
OutRealWorld "Real World Value"
OutBuiltInType "double"
RndMeth "Floor"
DoSatur off
}
Block {
BlockType Scope
Name "Sai lech vi tri truc X"
Ports [1]
Position [550, 114, 580, 146]
Location [1, 49, 1025, 689]
Open on
NumInputPorts "1"
List {
ListType AxesTitles
axes1 "%<SignalLabel>"
}
List {
ListType SelectedSignals
axes1 ""
}
TimeRange "10"
YMin "0"
YMax "0.0275"
SaveToWorkspace on
SaveName "Vitri_X1"
DataFormat "StructureWithTime"
LimitDataPoints off
}
Block {
BlockType Scope
Name "Sai lech vi tri truc Y"
Ports [1]
Position [550, 279, 580, 311]
Location [1, 49, 1025, 689]
Open on
NumInputPorts "1"
List {
ListType AxesTitles
axes1 "%<SignalLabel>"
}
List {
ListType SelectedSignals
axes1 ""
}
TimeRange "10"
YMin "0"
YMax "0.0275"
SaveToWorkspace on
SaveName "Vitri_X2"
DataFormat "StructureWithTime"
LimitDataPoints off
}
Block {
BlockType Display
Name "So buoc da\ngia cong"
Ports [1]
Position [325, 325, 415, 355]
Decimation "1"
}
Block {
BlockType Sum
Name "Sum"
Ports [2, 1]
Position [135, 144, 155, 186]
ShowName off
InputSameDT off
OutDataTypeMode "Inherit via internal rule"
}
Block {
BlockType Scope
Name "Toc do truc X"
Ports [1]
Position [550, 14, 580, 46]
Location [5, 53, 1029, 719]
Open off
NumInputPorts "1"
ZoomMode "yonly"
List {
ListType AxesTitles
axes1 "%<SignalLabel>"
}
List {
ListType SelectedSignals
axes1 ""
}
TimeRange "10"
YMin "-0.0021"
YMax "0.0001"
SaveToWorkspace on
SaveName "Tocdo_X"
DataFormat "StructureWithTime"
LimitDataPoints off
}
Block {
BlockType Scope
Name "Toc do truc Y"
Ports [1]
Position [550, 169, 580, 201]
Location [6, 53, 1020, 610]
Open off
NumInputPorts "1"
ZoomMode "yonly"
List {
ListType AxesTitles
axes1 "%<SignalLabel>"
}
List {
ListType SelectedSignals
axes1 ""
}
TimeRange "10"
YMin "-0.0021"
YMax "0.0001"
SaveToWorkspace on
SaveName "Tocdo_Y"
DataFormat "StructureWithTime"
LimitDataPoints off
}
Block {
BlockType Scope
Name "Vi tri truc X"
Ports [1]
Position [550, 64, 580, 96]
Location [1, 49, 1025, 689]
Open on
NumInputPorts "1"
List {
ListType AxesTitles
axes1 "%<SignalLabel>"
}
List {
ListType SelectedSignals
axes1 ""
}
TimeRange "10"
YMin "0"
YMax "0.0275"
SaveToWorkspace on
SaveName "Vitri_X"
DataFormat "StructureWithTime"
LimitDataPoints off
}
Block {
BlockType Scope
Name "Vi tri truc Y"
Ports [1]
Position [550, 224, 580, 256]
Location [1, 49, 1025, 689]
Open on
NumInputPorts "1"
List {
ListType AxesTitles
axes1 "%<SignalLabel>"
}
List {
ListType SelectedSignals
axes1 ""
}
TimeRange "10"
YMin "0"
YMax "0.0275"
SaveToWorkspace on
SaveName "Vitri_Y"
DataFormat "StructureWithTime"
LimitDataPoints off
}
Line {
SrcBlock "Sum"
SrcPort 1
DstBlock "Int2Double"
DstPort 1
}
Line {
SrcBlock "Bo tao\nxung nhip"
SrcPort 1
Points [50, 0]
DstBlock "Sum"
DstPort 1
}
Line {
SrcBlock "Hang so"
SrcPort 1
Points [15, 0]
DstBlock "Sum"
DstPort 2
}
Line {
Points [1040, 175; 20, 0; 0, 75]
}
Line {
SrcBlock "Int2Double"
SrcPort 1
Points [0, 0; 35, 0]
Branch {
Points [0, -55]
DstBlock "Bo noi suy va dieu khien\nmay phay CNC"
DstPort 1
}
Branch {
Points [0, 60]
Branch {
DstBlock "Bo noi suy va dieu khien\nmay phay CNC"
DstPort 2
}
Branch {
Points [0, 115]
DstBlock "So buoc da\ngia cong"
DstPort 1
}
}
}
Line {
SrcBlock "Bo noi suy va dieu khien\nmay phay CNC"
SrcPort 1
Points [25, 0; 0, -35]
DstBlock "Toc do truc X"
DstPort 1
}
Line {
SrcBlock "Bo noi suy va dieu khien\nmay phay CNC"
SrcPort 2
Points [25, 0; 0, -25]
DstBlock "Vi tri truc X"
DstPort 1
}
Line {
SrcBlock "Bo noi suy va dieu khien\nmay phay CNC"
SrcPort 3
Points [25, 0; 0, -15]
DstBlock "Sai lech vi tri truc X"
DstPort 1
}
Line {
SrcBlock "Bo noi suy va dieu khien\nmay phay CNC"
SrcPort 4
DstBlock "Toc do truc Y"
DstPort 1
}
Line {
SrcBlock "Bo noi suy va dieu khien\nmay phay CNC"
SrcPort 5
Points [25, 0; 0, 15]
DstBlock "Vi tri truc Y"
DstPort 1
}
Line {
SrcBlock "Bo noi suy va dieu khien\nmay phay CNC"
SrcPort 6
Points [25, 0; 0, 30]
DstBlock "Sai lech vi tri truc Y"
DstPort 1
}
}
}
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -