Files
BondGraph/BEdit/untitled.bedit.json

955 lines
28 KiB
JSON

{
"format": "bedit-document",
"version": 1,
"metadata": {
"name": "Untitled"
},
"roots": [
{
"id": "6060fdd6-e816-4da9-8bb6-fde1a66d3e92",
"name": "Test",
"position": {
"x": 0.0,
"y": 0.0
},
"rotation": 0.0,
"interface": {
"inputs": [],
"outputs": []
},
"parameters": [],
"icon": {
"shape": "rectangle",
"fill": "#f4f4f4",
"border": "#303030",
"text": "Graph",
"size": {
"width": 128.0,
"height": 128.0
},
"elements": [
{
"type": "rectangle",
"x": 32.0,
"y": 32.0,
"width": 64.0,
"height": 64.0,
"fill": "#f4f4f4",
"stroke": "#303030",
"lineWidth": 1.5,
"lineStyle": "solid",
"cornerRadius": 5.0
},
{
"type": "text",
"x": 40.0,
"y": 40.0,
"width": 48.0,
"height": 48.0,
"text": "Graph",
"color": "#202020",
"fontSize": 12.0
}
]
},
"properties": {
"showName": false
},
"library": {
"showSubtree": true
},
"implementation": {
"kind": "graph",
"graph": {
"blocks": [
{
"id": "2e6a192c-5aeb-45d6-80ee-d64a72392b76",
"name": "Constant0",
"position": {
"x": -160.0,
"y": -160.0
},
"rotation": 0.0,
"interface": {
"inputs": [],
"outputs": [
{
"id": "port-ddc97277",
"name": "y",
"position": {
"x": 0.0,
"y": 0.0
},
"properties": {
"iconPosition": {
"x": 88.0,
"y": 40.0
}
},
"type": "signal",
"multipleConnections": false
}
]
},
"parameters": [
{
"id": "parameter-022177fc",
"name": "v",
"type": "real",
"value": "2"
}
],
"icon": {
"shape": "rectangle",
"fill": "#f4f4f4",
"border": "#303030",
"text": "Text",
"size": {
"width": 128.0,
"height": 128.0
},
"elements": [
{
"cornerRadius": 5.0,
"fill": "#f4f4f4",
"height": 64.0,
"lineStyle": "solid",
"lineWidth": 1.5,
"stroke": "#303030",
"type": "rectangle",
"width": 64.0,
"x": 32.0,
"y": 32.0
},
{
"fill": "none",
"height": 48.0,
"lineStyle": "solid",
"lineWidth": 1.5,
"stroke": "#00007f",
"type": "line",
"width": 0.0,
"x": 40.0,
"y": 40.0
},
{
"fill": "none",
"height": 0.0,
"lineStyle": "solid",
"lineWidth": 1.5,
"stroke": "#00007f",
"type": "line",
"width": 48.0,
"x": 40.0,
"y": 88.0
},
{
"fill": "none",
"height": 0.0,
"lineStyle": "solid",
"lineWidth": 1.0,
"stroke": "#ffaa00",
"type": "line",
"width": 48.0,
"x": 40.0,
"y": 64.0
}
]
},
"properties": {
"showName": true
},
"library": {
"showSubtree": true
},
"implementation": {
"kind": "text",
"source": {
"equations": "y = v;",
"declarations": "",
"initialEquations": ""
}
}
},
{
"id": "f4a78255-8b73-4bb3-ae8e-24b566c72bc0",
"name": "gain0",
"position": {
"x": -32.0,
"y": -160.0
},
"rotation": 0.0,
"interface": {
"inputs": [
{
"id": "port-df34ce84",
"name": "u",
"position": {
"x": 0.0,
"y": 0.0
},
"properties": {
"iconPosition": {
"x": 64.0,
"y": 64.0
}
},
"type": "signal",
"multipleConnections": false
}
],
"outputs": [
{
"id": "port-fe9e6486",
"name": "y",
"position": {
"x": 0.0,
"y": 0.0
},
"properties": {
"iconPosition": {
"x": 88.0,
"y": 40.0
}
},
"type": "signal",
"multipleConnections": false
}
]
},
"parameters": [
{
"id": "parameter-61a43a86",
"name": "k",
"type": "real",
"value": "2.5"
}
],
"icon": {
"shape": "rectangle",
"fill": "#f4f4f4",
"border": "#303030",
"text": "Text",
"size": {
"width": 128.0,
"height": 128.0
},
"elements": [
{
"cornerRadius": 5.0,
"fill": "#f4f4f4",
"height": 64.0,
"lineStyle": "solid",
"lineWidth": 1.5,
"stroke": "#303030",
"type": "rectangle",
"width": 64.0,
"x": 32.0,
"y": 32.0
},
{
"color": "#00007f",
"fill": "#ffffff",
"fontSize": 24.0,
"height": 48.0,
"lineStyle": "solid",
"lineWidth": 1.5,
"stroke": "#00007f",
"text": "K",
"type": "text",
"width": 48.0,
"x": 40.0,
"y": 40.0
}
]
},
"properties": {
"showName": true
},
"library": {
"showSubtree": true
},
"implementation": {
"kind": "text",
"source": {
"equations": "y = k*u;",
"declarations": "",
"initialEquations": ""
}
}
},
{
"id": "0b29c706-eb1b-4839-8ad2-bbed64efc01e",
"name": "const_and_time",
"position": {
"x": -160.0,
"y": -32.0
},
"rotation": 0.0,
"interface": {
"inputs": [],
"outputs": [
{
"id": "port-ddc97277",
"name": "y",
"position": {
"x": 0.0,
"y": 0.0
},
"properties": {
"iconPosition": {
"x": 88.0,
"y": 40.0
}
},
"type": "signal",
"multipleConnections": false
}
]
},
"parameters": [
{
"id": "parameter-022177fc",
"name": "v",
"type": "real",
"value": "4.8"
}
],
"icon": {
"shape": "rectangle",
"fill": "#f4f4f4",
"border": "#303030",
"text": "Text",
"size": {
"width": 128.0,
"height": 128.0
},
"elements": [
{
"cornerRadius": 5.0,
"fill": "#f4f4f4",
"height": 64.0,
"lineStyle": "solid",
"lineWidth": 1.5,
"stroke": "#303030",
"type": "rectangle",
"width": 64.0,
"x": 32.0,
"y": 32.0
},
{
"fill": "none",
"height": 48.0,
"lineStyle": "solid",
"lineWidth": 1.5,
"stroke": "#00007f",
"type": "line",
"width": 0.0,
"x": 40.0,
"y": 40.0
},
{
"fill": "none",
"height": 0.0,
"lineStyle": "solid",
"lineWidth": 1.5,
"stroke": "#00007f",
"type": "line",
"width": 48.0,
"x": 40.0,
"y": 88.0
},
{
"fill": "none",
"height": 0.0,
"lineStyle": "solid",
"lineWidth": 1.0,
"stroke": "#ffaa00",
"type": "line",
"width": 48.0,
"x": 40.0,
"y": 64.0
}
]
},
"properties": {
"showName": true
},
"library": {
"showSubtree": true
},
"implementation": {
"kind": "text",
"source": {
"equations": "y = v+sin(10*time);",
"declarations": "",
"initialEquations": ""
}
}
},
{
"id": "43f739a0-e50f-44ae-bd95-0e0c1a10d1cf",
"name": "gain1",
"position": {
"x": -32.0,
"y": -32.0
},
"rotation": 0.0,
"interface": {
"inputs": [
{
"id": "port-df34ce84",
"name": "u",
"position": {
"x": 0.0,
"y": 0.0
},
"properties": {
"iconPosition": {
"x": 64.0,
"y": 64.0
}
},
"type": "signal",
"multipleConnections": false
}
],
"outputs": [
{
"id": "port-fe9e6486",
"name": "y",
"position": {
"x": 0.0,
"y": 0.0
},
"properties": {
"iconPosition": {
"x": 88.0,
"y": 40.0
}
},
"type": "signal",
"multipleConnections": false
}
]
},
"parameters": [
{
"id": "parameter-61a43a86",
"name": "k",
"type": "real",
"value": "-5"
}
],
"icon": {
"shape": "rectangle",
"fill": "#f4f4f4",
"border": "#303030",
"text": "Text",
"size": {
"width": 128.0,
"height": 128.0
},
"elements": [
{
"cornerRadius": 5.0,
"fill": "#f4f4f4",
"height": 64.0,
"lineStyle": "solid",
"lineWidth": 1.5,
"stroke": "#303030",
"type": "rectangle",
"width": 64.0,
"x": 32.0,
"y": 32.0
},
{
"color": "#00007f",
"fill": "#ffffff",
"fontSize": 24.0,
"height": 48.0,
"lineStyle": "solid",
"lineWidth": 1.5,
"stroke": "#00007f",
"text": "K",
"type": "text",
"width": 48.0,
"x": 40.0,
"y": 40.0
}
]
},
"properties": {
"showName": true
},
"library": {
"showSubtree": true
},
"implementation": {
"kind": "text",
"source": {
"equations": "y = k*u;",
"declarations": "",
"initialEquations": ""
}
}
},
{
"id": "59bb51be-8185-4b0b-a894-e38db61aff18",
"name": "add0",
"position": {
"x": 96.0,
"y": -96.0
},
"rotation": 0.0,
"interface": {
"inputs": [
{
"id": "port-c995845c",
"name": "u",
"position": {
"x": 0.0,
"y": 0.0
},
"properties": {
"iconPosition": {
"x": 64.0,
"y": 64.0
}
},
"type": "signal",
"multipleConnections": true
}
],
"outputs": [
{
"id": "port-a2f0dea6",
"name": "y",
"position": {
"x": 0.0,
"y": 0.0
},
"properties": {
"iconPosition": {
"x": 80.0,
"y": 48.0
}
},
"type": "signal",
"multipleConnections": false
}
]
},
"parameters": [],
"icon": {
"shape": "rectangle",
"fill": "#f4f4f4",
"border": "#303030",
"text": "Text",
"size": {
"width": 128.0,
"height": 128.0
},
"elements": [
{
"fill": "#f4f4f4",
"height": 48.0,
"lineStyle": "solid",
"lineWidth": 1.5,
"stroke": "#303030",
"type": "circle",
"width": 48.0,
"x": 40.0,
"y": 40.0
},
{
"color": "#00007f",
"fill": "none",
"fontSize": 18.0,
"height": 32.0,
"lineStyle": "none",
"lineWidth": 1.5,
"stroke": "#00007f",
"text": "+",
"type": "text",
"width": 32.0,
"x": 48.0,
"y": 48.0
}
]
},
"properties": {
"showName": false
},
"library": {
"showSubtree": true
},
"implementation": {
"kind": "text",
"source": {
"equations": "y = sum(u[i] for i in 1:$u_N$ );",
"declarations": "",
"initialEquations": ""
}
}
},
{
"id": "78c8fcb6-bd46-4b85-aa91-3276a8d1e8cb",
"name": "Integrate0",
"position": {
"x": 224.0,
"y": -96.0
},
"rotation": 0.0,
"interface": {
"inputs": [
{
"id": "port-df34ce84",
"name": "u",
"position": {
"x": 0.0,
"y": 0.0
},
"properties": {
"iconPosition": {
"x": 64.0,
"y": 64.0
}
},
"type": "signal",
"multipleConnections": false
}
],
"outputs": [
{
"id": "port-fe9e6486",
"name": "y",
"position": {
"x": 0.0,
"y": 0.0
},
"properties": {
"iconPosition": {
"x": 88.0,
"y": 40.0
}
},
"type": "signal",
"multipleConnections": false
}
]
},
"parameters": [
{
"id": "parameter-61a43a86",
"name": "y_start",
"type": "real",
"value": "0"
}
],
"icon": {
"shape": "rectangle",
"fill": "#f4f4f4",
"border": "#303030",
"text": "Text",
"size": {
"width": 128.0,
"height": 128.0
},
"elements": [
{
"cornerRadius": 5.0,
"fill": "#f4f4f4",
"height": 64.0,
"lineStyle": "solid",
"lineWidth": 1.5,
"stroke": "#303030",
"type": "rectangle",
"width": 64.0,
"x": 32.0,
"y": 32.0
},
{
"color": "#00007f",
"fill": "#ffffff",
"fontSize": 24.0,
"height": 48.0,
"lineStyle": "solid",
"lineWidth": 1.5,
"stroke": "#00007f",
"text": "dt",
"type": "text",
"width": 48.0,
"x": 48.0,
"y": 40.0
},
{
"type": "text",
"x": 32.0,
"y": 32.0,
"width": 32.0,
"height": 56.0,
"fill": "none",
"stroke": "#00007f",
"lineWidth": 1.5,
"lineStyle": "none",
"text": "\u222b",
"fontSize": 35.0,
"color": "#00007f"
}
]
},
"properties": {
"showName": true
},
"library": {
"showSubtree": true
},
"implementation": {
"kind": "text",
"source": {
"equations": "der(y) = u;",
"declarations": "",
"initialEquations": "y = y_start;"
}
}
},
{
"id": "f2caf59f-5688-46b4-b17d-bdc911580d7b",
"name": "Differentiate0",
"position": {
"x": 224.0,
"y": 32.0
},
"rotation": 0.0,
"interface": {
"inputs": [
{
"id": "port-df34ce84",
"name": "u",
"position": {
"x": 0.0,
"y": 0.0
},
"properties": {
"iconPosition": {
"x": 64.0,
"y": 64.0
}
},
"type": "signal",
"multipleConnections": false
}
],
"outputs": [
{
"id": "port-fe9e6486",
"name": "y",
"position": {
"x": 0.0,
"y": 0.0
},
"properties": {
"iconPosition": {
"x": 88.0,
"y": 40.0
}
},
"type": "signal",
"multipleConnections": false
}
]
},
"parameters": [
{
"id": "parameter-61a43a86",
"name": "x_start",
"type": "real",
"value": "0"
},
{
"id": "parameter-d110667b",
"name": "y_start",
"type": "real",
"value": "0"
},
{
"id": "parameter-873b503d",
"name": "k",
"type": "real",
"value": "1"
},
{
"id": "parameter-a55752c7",
"name": "T",
"type": "real",
"value": "0.01"
}
],
"icon": {
"shape": "rectangle",
"fill": "#f4f4f4",
"border": "#303030",
"text": "Text",
"size": {
"width": 128.0,
"height": 128.0
},
"elements": [
{
"cornerRadius": 5.0,
"fill": "#f4f4f4",
"height": 64.0,
"lineStyle": "solid",
"lineWidth": 1.5,
"stroke": "#303030",
"type": "rectangle",
"width": 64.0,
"x": 32.0,
"y": 32.0
},
{
"color": "#00007f",
"fill": "#ffffff",
"fontSize": 22.0,
"height": 48.0,
"lineStyle": "solid",
"lineWidth": 1.5,
"stroke": "#00007f",
"text": "d/dt",
"type": "text",
"width": 64.0,
"x": 32.0,
"y": 40.0
}
]
},
"properties": {
"showName": true
},
"library": {
"showSubtree": true
},
"implementation": {
"kind": "text",
"source": {
"equations": "assert(T > 0, \"Differentiate time constant T must be positive\");\n\nder(x) = (u - x)/T;\ny = (k/T)*(u - x);",
"declarations": "Real x(start=x_start);",
"initialEquations": "y = y_start;"
}
}
}
],
"connections": [
{
"id": "df23ff13-2a30-4c85-be66-56f66114d58e",
"source": {
"block": "2e6a192c-5aeb-45d6-80ee-d64a72392b76",
"port": "port-ddc97277"
},
"target": {
"block": "f4a78255-8b73-4bb3-ae8e-24b566c72bc0",
"port": "port-df34ce84"
},
"name": "",
"properties": {
"waypoints": []
}
},
{
"id": "00f7d291-641b-4200-afa3-f1ec941faed7",
"source": {
"block": "0b29c706-eb1b-4839-8ad2-bbed64efc01e",
"port": "port-ddc97277"
},
"target": {
"block": "43f739a0-e50f-44ae-bd95-0e0c1a10d1cf",
"port": "port-df34ce84"
},
"name": "",
"properties": {
"waypoints": []
}
},
{
"id": "7a776aab-deb5-4e50-838e-b6b4635f349c",
"source": {
"block": "f4a78255-8b73-4bb3-ae8e-24b566c72bc0",
"port": "port-fe9e6486"
},
"target": {
"block": "59bb51be-8185-4b0b-a894-e38db61aff18",
"port": "port-c995845c"
},
"name": "",
"properties": {
"waypoints": []
}
},
{
"id": "5b3d71c3-282a-4c2d-85f8-b92bba5bf2df",
"source": {
"block": "43f739a0-e50f-44ae-bd95-0e0c1a10d1cf",
"port": "port-fe9e6486"
},
"target": {
"block": "59bb51be-8185-4b0b-a894-e38db61aff18",
"port": "port-c995845c"
},
"name": "",
"properties": {
"waypoints": []
}
},
{
"id": "33e15cc2-7f33-469e-91a8-921c04f6b823",
"source": {
"block": "59bb51be-8185-4b0b-a894-e38db61aff18",
"port": "port-a2f0dea6"
},
"target": {
"block": "78c8fcb6-bd46-4b85-aa91-3276a8d1e8cb",
"port": "port-df34ce84"
},
"name": "",
"properties": {
"waypoints": []
}
},
{
"id": "26e10b34-f168-4492-b4f2-fb46d8a4aafa",
"source": {
"block": "59bb51be-8185-4b0b-a894-e38db61aff18",
"port": "port-a2f0dea6"
},
"target": {
"block": "f2caf59f-5688-46b4-b17d-bdc911580d7b",
"port": "port-df34ce84"
},
"name": "",
"properties": {
"waypoints": [
{
"x": 160.0,
"y": 96.0
}
]
}
}
],
"annotations": [],
"junctions": [],
"simulation": {
"enabled": false,
"startTime": 0.0,
"stopTime": 10.0,
"intervalMode": "intervalTime",
"numberOfIntervals": 50000,
"intervalTime": 0.002
}
}
}
}
]
}